Engine-neutral product operations exposed through AsukaDesigner.api.

Renderer-specific capabilities remain grouped on designer.engine, for example canvas2d, products, materials, or surface.

interface AsukaDesignerApi {
    addCustomFont: ((payload: AsukaCustomFontConfig) => Promise<string>);
    addDesign: ((input: AsukaDesignInput) => AsukaMutationPromise<AsukaObjectRef>);
    addElement: ((input: AsukaElementInput) => AsukaMutationPromise<AsukaObjectRef>);
    addGoogleFont: ((payload: string | AsukaGoogleFontConfig) => Promise<string>);
    addImage: ((input: AsukaImageInput) => AsukaMutationPromise<AsukaObjectRef>);
    addSystemFont: ((payload: string | AsukaSystemFontConfig) => string);
    addText: ((input: AsukaTextInput) => AsukaMutationPromise<AsukaObjectRef>);
    addView: ((payload?: string | AsukaViewCreatePayload) => string);
    applyElementVariation: ((input: AsukaElementVariationApplyInput) => Promise<boolean>);
    beginPlacement: ((input: AsukaPlacementBeginInput) => AsukaPlacementStatus);
    bringObjectForward: ((id: string, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectSummary>);
    cancelPlacement: ((metadata?: Record<string, unknown>) => null | AsukaPlacementStatus);
    commitHistorySnapshot: ((options?: AsukaHistoryOptions) => AsukaMutationPromise<AsukaHistoryInfo>);
    commitPlacement: ((metadata?: Record<string, unknown>) => null | AsukaPlacementStatus);
    download: ((target?: unknown, options?: AsukaDownloadOptions) => void | Promise<void>);
    duplicateObject: ((id: string, options?: AsukaObjectDuplicateOptions) => AsukaMutationPromise<null | AsukaObjectRef>);
    ensureExportSupport: ((format: string, options?: Record<string, unknown>) => boolean | Promise<boolean>);
    exportPng: ((options?: AsukaExportOptions) => Promise<Blob>);
    exportProductionMeasurements: (() => AsukaProductionMeasurementExport);
    fitView: (() => void);
    getActiveViewId: (() => null | string);
    getFonts: (() => AsukaRegisteredFont[]);
    getHistoryInfo: (() => AsukaHistoryInfo);
    getObject: ((id: string) => null | AsukaObjectSummary);
    getObjects: (() => AsukaObjectSummary[]);
    getObjectTransform: ((id: string) => null | AsukaObjectTransform);
    getPlacementStatus: (() => null | AsukaPlacementStatus);
    getPrice: ((externalPrice?: AsukaPriceInput) => number);
    getPriceUiBreakdown: ((externalPrice?: AsukaPriceInput) => PriceUiBreakdown);
    getPricingRules: ((baseTotal?: number) => number);
    getSceneGraph: (() => AsukaSceneGraphNode[]);
    getSelectedObjects: (() => AsukaObjectSummary[]);
    getStandardPrices: ((objects?: unknown[]) => number);
    getViews: (() => AsukaView[]);
    goToHistory: ((index: number) => AsukaMutationPromise<AsukaHistoryInfo>);
    isExportFormatAvailable: ((format: string, options?: Record<string, unknown>) => boolean);
    listObjects: ((options?: Record<string, unknown>) => AsukaObjectSummary[]);
    loadFont: ((id: string) => Promise<boolean>);
    measureLayer: ((id: string, options?: AsukaLayerMeasurementOptions) => null | AsukaLayerMeasurement);
    recalcPricing: (() => void);
    redo: (() => AsukaMutationPromise<AsukaHistoryInfo>);
    removeFont: ((id: string) => void);
    removeObject: ((id: string) => AsukaMutationPromise<null | AsukaObjectSummary>);
    removeView: ((id: string) => void);
    reset: (() => AsukaMutationPromise<AsukaHistoryInfo>);
    resizeLayerPhysical: ((id: string, input: AsukaPhysicalLayerResizeInput) => Promise<AsukaLayerMeasurement>);
    selectObject: ((id: null | string) => void);
    sendObjectBackward: ((id: string, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectSummary>);
    setActiveView: ((id: string) => void);
    setObjectLocked: ((id: string, locked: boolean, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectSummary>);
    setObjectVisible: ((id: string, visible: boolean, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectSummary>);
    undo: (() => AsukaMutationPromise<AsukaHistoryInfo>);
    updateObject: ((id: string, patch: AsukaObjectPatch) => AsukaMutationPromise<null | AsukaObjectSummary>);
    updateObjectTransform: ((id: string, patch: Partial<AsukaObjectTransform> & AsukaObjectPatch, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectTransform>);
    updatePlacement: ((input: AsukaPlacementUpdateInput) => AsukaPlacementStatus);
    updateView: ((id: string, patch: AsukaViewUpdatePatch) => void);
    zoomIn: (() => void);
    zoomOut: (() => void);
}

Properties

addCustomFont: ((payload: AsukaCustomFontConfig) => Promise<string>)

Register a custom web font in the runtime registry and optionally load it.

Add a design/SVG/image design to the active engine.

Add an element to the active engine.

addGoogleFont: ((payload: string | AsukaGoogleFontConfig) => Promise<string>)

Register a Google Font in the runtime registry and optionally load it.

Add an image to the active engine.

addSystemFont: ((payload: string | AsukaSystemFontConfig) => string)

Register a system font family in the runtime registry.

Add a text object/sticker to the active engine.

addView: ((payload?: string | AsukaViewCreatePayload) => string)

Create a new view from a name or a full payload.

applyElementVariation: ((input: AsukaElementVariationApplyInput) => Promise<boolean>)

Apply one element variation and synchronize every linked 2D/3D view.

beginPlacement: ((input: AsukaPlacementBeginInput) => AsukaPlacementStatus)

Start a placement lifecycle without exposing native renderer objects.

bringObjectForward: ((id: string, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectSummary>)

Move object one step toward the front in the active engine.

cancelPlacement: ((metadata?: Record<string, unknown>) => null | AsukaPlacementStatus)

Cancel placement and resolve to its initial transform.

commitHistorySnapshot: ((options?: AsukaHistoryOptions) => AsukaMutationPromise<AsukaHistoryInfo>)
commitPlacement: ((metadata?: Record<string, unknown>) => null | AsukaPlacementStatus)

Commit the current candidate or its last valid fallback.

download: ((target?: unknown, options?: AsukaDownloadOptions) => void | Promise<void>)

Download an export target through the active renderer.

duplicateObject: ((id: string, options?: AsukaObjectDuplicateOptions) => AsukaMutationPromise<null | AsukaObjectRef>)

Duplicate an object in the active engine.

ensureExportSupport: ((format: string, options?: Record<string, unknown>) => boolean | Promise<boolean>)

Load optional support required by an export format.

exportPng: ((options?: AsukaExportOptions) => Promise<Blob>)

Export the active engine as a PNG blob when supported.

exportProductionMeasurements: (() => AsukaProductionMeasurementExport)

Export calibrated areas and exact layer dimensions for a production workflow.

fitView: (() => void)
getActiveViewId: (() => null | string)

Return the id of the active view.

getFonts: (() => AsukaRegisteredFont[])

Return the font registry available to text-related modules.

getHistoryInfo: (() => AsukaHistoryInfo)

Read and mutate history through the same asynchronous renderer contract.

getObject: ((id: string) => null | AsukaObjectSummary)

Return one object from the active engine registry.

getObjects: (() => AsukaObjectSummary[])

Return objects from the active render engine.

getObjectTransform: ((id: string) => null | AsukaObjectTransform)

Read normalized transform values from the active engine.

getPlacementStatus: (() => null | AsukaPlacementStatus)

Inspect the current cross-renderer placement lifecycle.

getPrice: ((externalPrice?: AsukaPriceInput) => number)

Pricing helpers remain engine-aware through the active runtime/store.

getPriceUiBreakdown: ((externalPrice?: AsukaPriceInput) => PriceUiBreakdown)
getPricingRules: ((baseTotal?: number) => number)
getSceneGraph: (() => AsukaSceneGraphNode[])

Return the active render engine scene graph when available.

getSelectedObjects: (() => AsukaObjectSummary[])

Return selected objects from the active engine registry.

getStandardPrices: ((objects?: unknown[]) => number)
getViews: (() => AsukaView[])

Return every registered view.

goToHistory: ((index: number) => AsukaMutationPromise<AsukaHistoryInfo>)
isExportFormatAvailable: ((format: string, options?: Record<string, unknown>) => boolean)

Return whether the active renderer supports an export format.

listObjects: ((options?: Record<string, unknown>) => AsukaObjectSummary[])

Preferred engine-neutral object registry list used by generic modules.

loadFont: ((id: string) => Promise<boolean>)

Load a font that is already present in the runtime registry.

measureLayer: ((id: string, options?: AsukaLayerMeasurementOptions) => null | AsukaLayerMeasurement)

Measure a layer in renderer-native, relative and real-world units.

recalcPricing: (() => void)
removeFont: ((id: string) => void)

Remove a font from the runtime registry.

removeObject: ((id: string) => AsukaMutationPromise<null | AsukaObjectSummary>)

Remove an object from the active engine.

removeView: ((id: string) => void)

Remove a view by id.

resizeLayerPhysical: ((id: string, input: AsukaPhysicalLayerResizeInput) => Promise<AsukaLayerMeasurement>)

Resize a calibrated layer using real-world dimensions and reject print-area overflow.

selectObject: ((id: null | string) => void)

Select an object in the active engine.

sendObjectBackward: ((id: string, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectSummary>)

Move object one step toward the back in the active engine.

setActiveView: ((id: string) => void)

Switch the editor to another view.

setObjectLocked: ((id: string, locked: boolean, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectSummary>)

Set object lock state through the active engine.

setObjectVisible: ((id: string, visible: boolean, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectSummary>)

Set object visibility through the active engine.

updateObject: ((id: string, patch: AsukaObjectPatch) => AsukaMutationPromise<null | AsukaObjectSummary>)

Patch an object in the active engine.

updateObjectTransform: ((id: string, patch: Partial<AsukaObjectTransform> & AsukaObjectPatch, options?: AsukaObjectMutationOptions) => AsukaMutationPromise<null | AsukaObjectTransform>)

Patch normalized transform values through the active engine.

updatePlacement: ((input: AsukaPlacementUpdateInput) => AsukaPlacementStatus)

Report a renderer-owned placement candidate and its validity.

updateView: ((id: string, patch: AsukaViewUpdatePatch) => void)

Update view metadata such as size, unit or label.

zoomIn: (() => void)

Camera/canvas zoom helpers delegated to the active engine.

zoomOut: (() => void)