State import/export helpers exposed through AsukaDesigner.util.

interface AsukaStateApi {
    clearStorage: ((options?: {
        key?: string;
    }) => void);
    exportFull: (() => AsukaExportedState);
    exportPart: ((part: AsukaStatePart) => AsukaExportedState);
    extractRuntimeLayoutAsConfig: ((layoutState?: any) => LayoutConfig);
    importFull: ((state: AsukaExportedState, options?: AsukaImportOptions) => void);
    importPart: ((part: AsukaStatePart, state: AsukaExportedState, options?: AsukaImportOptions) => void);
    loadFromStorage: ((options?: {
        key?: string;
    }) => null | AsukaExportedState);
    normalizeLayoutConfigToRuntimeState: ((config: LayoutConfig, fallbackState?: any) => any);
    rebuildActiveViewFromDocument: ((targetViewId?: null | string) => void);
    replaceProduct: ((state: AsukaExportedState, options?: {
        recreate?: boolean;
    }) => AsukaDesigner);
    saveToStorage: ((state: AsukaExportedState, options?: {
        key?: string;
    }) => void);
}

Properties

clearStorage: ((options?: {
    key?: string;
}) => void)

Clear a previously persisted state payload from local storage.

exportFull: (() => AsukaExportedState)

Export the complete serializable app state.

exportPart: ((part: AsukaStatePart) => AsukaExportedState)

Export one named part such as template, theme, document, or pricing.

extractRuntimeLayoutAsConfig: ((layoutState?: any) => LayoutConfig)

Convert runtime layout state back into init-time layout config.

importFull: ((state: AsukaExportedState, options?: AsukaImportOptions) => void)

Import a complete serializable app state.

importPart: ((part: AsukaStatePart, state: AsukaExportedState, options?: AsukaImportOptions) => void)

Import only one named part from a part export or a complete state payload.

loadFromStorage: ((options?: {
    key?: string;
}) => null | AsukaExportedState)

Load a canonical state payload from local storage.

normalizeLayoutConfigToRuntimeState: ((config: LayoutConfig, fallbackState?: any) => any)

Convert init-time layout config into runtime layout state.

rebuildActiveViewFromDocument: ((targetViewId?: null | string) => void)

Rebuild the active Fabric view from the current document store.

replaceProduct: ((state: AsukaExportedState, options?: {
    recreate?: boolean;
}) => AsukaDesigner)

Replace the current product/session with a complete state payload.

saveToStorage: ((state: AsukaExportedState, options?: {
    key?: string;
}) => void)

Save a canonical state payload to local storage.