@ggraphic/editor 0.0.0-stage → 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +373 -0
- package/NOTICE +2 -0
- package/README.md +8 -2
- package/THIRD_PARTY_NOTICES +7 -0
- package/dist/CanvasEditorProvider.d.ts +214 -0
- package/dist/CanvasEditorProvider.js +10 -0
- package/dist/ai/applyOperation.d.ts +75 -0
- package/dist/ai/applyOperation.js +354 -0
- package/dist/ai/describeCanvasElements.d.ts +17 -0
- package/dist/ai/describeCanvasElements.js +148 -0
- package/dist/ai/illustrationCapability.d.ts +6 -0
- package/dist/ai/illustrationCapability.js +20 -0
- package/dist/ai/types.d.ts +91 -0
- package/dist/ai/types.js +1 -0
- package/dist/blocks/liftedBlock.d.ts +61 -0
- package/dist/blocks/liftedBlock.js +117 -0
- package/dist/brand/bindPick.d.ts +18 -0
- package/dist/brand/bindPick.js +28 -0
- package/dist/brand/bindableFields.d.ts +9 -0
- package/dist/brand/bindableFields.js +61 -0
- package/dist/brand/brandRegistry.d.ts +26 -0
- package/dist/brand/brandRegistry.js +56 -0
- package/dist/brand/composerBrand.d.ts +146 -0
- package/dist/brand/composerBrand.js +6 -0
- package/dist/brand/documentBrand.d.ts +16 -0
- package/dist/brand/documentBrand.js +6 -0
- package/dist/collab/documentVersion.d.ts +36 -0
- package/dist/collab/documentVersion.js +139 -0
- package/dist/collab/pageElementStateKeys.d.ts +33 -0
- package/dist/collab/pageElementStateKeys.js +148 -0
- package/dist/collab/pagesDoc.d.ts +152 -0
- package/dist/collab/pagesDoc.js +434 -0
- package/dist/collab/useAwarenessState.d.ts +12 -0
- package/dist/collab/useAwarenessState.js +47 -0
- package/dist/collab/useEmitHostStateChanges.d.ts +18 -0
- package/dist/collab/useEmitHostStateChanges.js +40 -0
- package/dist/collab/useSelectionAwareness.d.ts +22 -0
- package/dist/collab/useSelectionAwareness.js +60 -0
- package/dist/collab/useYjsCanvasBinding.d.ts +7 -0
- package/dist/collab/useYjsCanvasBinding.js +21 -0
- package/dist/collab/useYjsPageStateSync.d.ts +20 -0
- package/dist/collab/useYjsPageStateSync.js +49 -0
- package/dist/collab/useYjsPages.d.ts +73 -0
- package/dist/collab/useYjsPages.js +396 -0
- package/dist/collab/wrapCallbacksWithPageSync.d.ts +3 -0
- package/dist/collab/wrapCallbacksWithPageSync.js +62 -0
- package/dist/collab/ydocKeys.d.ts +50 -0
- package/dist/collab/ydocKeys.js +50 -0
- package/dist/collab/yjsBinding.d.ts +27 -0
- package/dist/collab/yjsBinding.js +105 -0
- package/dist/common/Lightbox.d.ts +8 -0
- package/dist/common/Lightbox.js +8 -0
- package/dist/common/imageSourceTypes.d.ts +1 -0
- package/dist/common/imageSourceTypes.js +1 -0
- package/dist/components/AddPageButton.d.ts +13 -0
- package/dist/components/AddPageButton.js +13 -0
- package/dist/components/CanvasAnnouncer.d.ts +8 -0
- package/dist/components/CanvasAnnouncer.js +10 -0
- package/dist/components/CanvasContextMenu/CanvasActionSheet.d.ts +12 -0
- package/dist/components/CanvasContextMenu/CanvasActionSheet.js +145 -0
- package/dist/components/CanvasContextMenu/CanvasContextMenu.d.ts +33 -0
- package/dist/components/CanvasContextMenu/CanvasContextMenu.js +107 -0
- package/dist/components/CanvasContextMenu/canvasMenuModel.d.ts +68 -0
- package/dist/components/CanvasContextMenu/canvasMenuModel.js +203 -0
- package/dist/components/CanvasEditor/CanvasEditorShell.d.ts +32 -0
- package/dist/components/CanvasEditor/CanvasEditorShell.js +1144 -0
- package/dist/components/CanvasEditor/PageWrapper.d.ts +7 -0
- package/dist/components/CanvasEditor/PageWrapper.js +103 -0
- package/dist/components/CanvasEditor/autoSwitchTab.d.ts +11 -0
- package/dist/components/CanvasEditor/autoSwitchTab.js +15 -0
- package/dist/components/CanvasEditor/blockInsertContext.d.ts +22 -0
- package/dist/components/CanvasEditor/blockInsertContext.js +5 -0
- package/dist/components/CanvasEditor/editorShell.d.ts +99 -0
- package/dist/components/CanvasEditor/editorShell.js +20 -0
- package/dist/components/CanvasEditor/hooks/useCanvasContextMenu.d.ts +32 -0
- package/dist/components/CanvasEditor/hooks/useCanvasContextMenu.js +140 -0
- package/dist/components/CanvasEditor/hooks/useLoadedConfigs.d.ts +13 -0
- package/dist/components/CanvasEditor/hooks/useLoadedConfigs.js +29 -0
- package/dist/components/CanvasEditor/hooks/useMobileSheetFit.d.ts +14 -0
- package/dist/components/CanvasEditor/hooks/useMobileSheetFit.js +56 -0
- package/dist/components/CanvasEditor/hooks/usePageRefs.d.ts +18 -0
- package/dist/components/CanvasEditor/hooks/usePageRefs.js +36 -0
- package/dist/components/CanvasEditor/hooks/usePageUndoRedoShortcuts.d.ts +25 -0
- package/dist/components/CanvasEditor/hooks/usePageUndoRedoShortcuts.js +49 -0
- package/dist/components/CanvasEditor/hooks/usePrintImpressumGate.d.ts +17 -0
- package/dist/components/CanvasEditor/hooks/usePrintImpressumGate.js +70 -0
- package/dist/components/CanvasEditor/hooks/useScrollToAddedPage.d.ts +17 -0
- package/dist/components/CanvasEditor/hooks/useScrollToAddedPage.js +31 -0
- package/dist/components/CanvasEditor/hooks/useToolbarHandlers.d.ts +75 -0
- package/dist/components/CanvasEditor/hooks/useToolbarHandlers.js +69 -0
- package/dist/components/CanvasEditor/hooks/useWorkAreaDeselect.d.ts +6 -0
- package/dist/components/CanvasEditor/hooks/useWorkAreaDeselect.js +56 -0
- package/dist/components/CanvasEditor/layersTab.d.ts +13 -0
- package/dist/components/CanvasEditor/layersTab.js +27 -0
- package/dist/components/CanvasEditor/mobileSelectionArea.d.ts +8 -0
- package/dist/components/CanvasEditor/mobileSelectionArea.js +27 -0
- package/dist/components/CanvasEditor/types.d.ts +202 -0
- package/dist/components/CanvasEditor/types.js +1 -0
- package/dist/components/CanvasEditorSkeleton.d.ts +16 -0
- package/dist/components/CanvasEditorSkeleton.js +24 -0
- package/dist/components/CanvasMetaBar.d.ts +16 -0
- package/dist/components/CanvasMetaBar.js +33 -0
- package/dist/components/CanvasRenderLayer.d.ts +37 -0
- package/dist/components/CanvasRenderLayer.js +54 -0
- package/dist/components/CanvasTextOverlay.d.ts +126 -0
- package/dist/components/CanvasTextOverlay.js +527 -0
- package/dist/components/ConfigCanvas.d.ts +35 -0
- package/dist/components/ConfigCanvas.js +30 -0
- package/dist/components/CropGhostOverlay.d.ts +13 -0
- package/dist/components/CropGhostOverlay.js +56 -0
- package/dist/components/CustomColorSwatch.d.ts +35 -0
- package/dist/components/CustomColorSwatch.js +81 -0
- package/dist/components/DownloadNotice.d.ts +7 -0
- package/dist/components/DownloadNotice.js +7 -0
- package/dist/components/GenericCanvas.d.ts +309 -0
- package/dist/components/GenericCanvas.js +787 -0
- package/dist/components/GenericCanvasElement.d.ts +34 -0
- package/dist/components/GenericCanvasElement.js +267 -0
- package/dist/components/MultiSelectionTransformer.d.ts +39 -0
- package/dist/components/MultiSelectionTransformer.js +107 -0
- package/dist/components/PagePreview.d.ts +14 -0
- package/dist/components/PagePreview.js +63 -0
- package/dist/components/PageThumbnailStrip.d.ts +25 -0
- package/dist/components/PageThumbnailStrip.js +46 -0
- package/dist/components/PageToolbar.d.ts +12 -0
- package/dist/components/PageToolbar.js +20 -0
- package/dist/components/PrintGuides.d.ts +13 -0
- package/dist/components/PrintGuides.js +28 -0
- package/dist/components/RemoteSelectionOverlay.d.ts +15 -0
- package/dist/components/RemoteSelectionOverlay.js +29 -0
- package/dist/components/RichTextField.d.ts +34 -0
- package/dist/components/RichTextField.js +216 -0
- package/dist/components/SelectionPill.d.ts +56 -0
- package/dist/components/SelectionPill.js +123 -0
- package/dist/components/SlideNotesPanel.d.ts +13 -0
- package/dist/components/SlideNotesPanel.js +28 -0
- package/dist/components/SlotBudgetStatus.d.ts +12 -0
- package/dist/components/SlotBudgetStatus.js +64 -0
- package/dist/components/StandaloneCanvas.d.ts +33 -0
- package/dist/components/StandaloneCanvas.js +61 -0
- package/dist/components/TextFormatButtons.d.ts +61 -0
- package/dist/components/TextFormatButtons.js +107 -0
- package/dist/components/TextFormatControls.d.ts +26 -0
- package/dist/components/TextFormatControls.js +73 -0
- package/dist/components/Toolbar.d.ts +40 -0
- package/dist/components/Toolbar.js +26 -0
- package/dist/components/ToolbarStateBridge.d.ts +72 -0
- package/dist/components/ToolbarStateBridge.js +298 -0
- package/dist/components/TopBar/AutoSaveIndicator.d.ts +8 -0
- package/dist/components/TopBar/AutoSaveIndicator.js +44 -0
- package/dist/components/TopBar/ContextControls.d.ts +107 -0
- package/dist/components/TopBar/ContextControls.js +321 -0
- package/dist/components/TopBar/ContextToolbar.d.ts +14 -0
- package/dist/components/TopBar/ContextToolbar.js +20 -0
- package/dist/components/TopBar/CropModeControls.d.ts +35 -0
- package/dist/components/TopBar/CropModeControls.js +84 -0
- package/dist/components/TopBar/DownloadSection.d.ts +47 -0
- package/dist/components/TopBar/DownloadSection.js +102 -0
- package/dist/components/TopBar/MobileSelectionBar.d.ts +16 -0
- package/dist/components/TopBar/MobileSelectionBar.js +26 -0
- package/dist/components/TopBar/MobileSelectionControls.d.ts +10 -0
- package/dist/components/TopBar/MobileSelectionControls.js +43 -0
- package/dist/components/TopBar/MultiSelectionToolbar.d.ts +19 -0
- package/dist/components/TopBar/MultiSelectionToolbar.js +30 -0
- package/dist/components/TopBar/ShareDropdown.d.ts +54 -0
- package/dist/components/TopBar/ShareDropdown.js +110 -0
- package/dist/components/TopBar/TopBar.d.ts +6 -0
- package/dist/components/TopBar/TopBar.js +6 -0
- package/dist/components/TopBar/barTiles.d.ts +15 -0
- package/dist/components/TopBar/barTiles.js +34 -0
- package/dist/components/TopBar/modules/FloatingAiSuggestionBanner.d.ts +28 -0
- package/dist/components/TopBar/modules/FloatingAiSuggestionBanner.js +26 -0
- package/dist/components/TopBar/modules/FloatingBackgroundControls.d.ts +38 -0
- package/dist/components/TopBar/modules/FloatingBackgroundControls.js +133 -0
- package/dist/components/TopBar/modules/FloatingColorPicker.d.ts +16 -0
- package/dist/components/TopBar/modules/FloatingColorPicker.js +89 -0
- package/dist/components/TopBar/modules/FloatingFontRoleControl.d.ts +17 -0
- package/dist/components/TopBar/modules/FloatingFontRoleControl.js +37 -0
- package/dist/components/TopBar/modules/FloatingFontSizeControl.d.ts +7 -0
- package/dist/components/TopBar/modules/FloatingFontSizeControl.js +22 -0
- package/dist/components/TopBar/modules/FloatingHistoryControls.d.ts +11 -0
- package/dist/components/TopBar/modules/FloatingHistoryControls.js +19 -0
- package/dist/components/TopBar/modules/FloatingImageLookControl.d.ts +9 -0
- package/dist/components/TopBar/modules/FloatingImageLookControl.js +15 -0
- package/dist/components/TopBar/modules/FloatingLayerControls.d.ts +9 -0
- package/dist/components/TopBar/modules/FloatingLayerControls.js +9 -0
- package/dist/components/TopBar/modules/FloatingOpacityControl.d.ts +11 -0
- package/dist/components/TopBar/modules/FloatingOpacityControl.js +19 -0
- package/dist/components/TopBar/modules/FloatingPositionControl.d.ts +38 -0
- package/dist/components/TopBar/modules/FloatingPositionControl.js +74 -0
- package/dist/components/TopBar/modules/FloatingTextAlignControl.d.ts +12 -0
- package/dist/components/TopBar/modules/FloatingTextAlignControl.js +27 -0
- package/dist/components/TransformHud.d.ts +11 -0
- package/dist/components/TransformHud.js +121 -0
- package/dist/components/WholeTextFormatControls.d.ts +10 -0
- package/dist/components/WholeTextFormatControls.js +37 -0
- package/dist/components/ZoomableViewport.d.ts +6 -0
- package/dist/components/ZoomableViewport.js +4 -0
- package/dist/components/accentMark.d.ts +20 -0
- package/dist/components/accentMark.js +24 -0
- package/dist/components/canvasItemLock.d.ts +13 -0
- package/dist/components/canvasItemLock.js +12 -0
- package/dist/components/kindRenderers.d.ts +118 -0
- package/dist/components/kindRenderers.js +151 -0
- package/dist/components/markColor.d.ts +13 -0
- package/dist/components/markColor.js +21 -0
- package/dist/components/markerMark.d.ts +24 -0
- package/dist/components/markerMark.js +22 -0
- package/dist/composer/cardFollowsText.d.ts +17 -0
- package/dist/composer/cardFollowsText.js +34 -0
- package/dist/composer/marks.d.ts +4 -0
- package/dist/composer/marks.js +15 -0
- package/dist/composer/steckbriefLayout.d.ts +147 -0
- package/dist/composer/steckbriefLayout.js +468 -0
- package/dist/composer/textFit.d.ts +31 -0
- package/dist/composer/textFit.js +89 -0
- package/dist/configs/buildSharepicText.d.ts +5 -0
- package/dist/configs/buildSharepicText.js +58 -0
- package/dist/configs/configLoader.d.ts +34 -0
- package/dist/configs/configLoader.js +60 -0
- package/dist/configs/factory/actionFactories.d.ts +201 -0
- package/dist/configs/factory/actionFactories.js +628 -0
- package/dist/configs/factory/baseTypes.d.ts +150 -0
- package/dist/configs/factory/baseTypes.js +8 -0
- package/dist/configs/factory/carryInstanceState.d.ts +82 -0
- package/dist/configs/factory/carryInstanceState.js +121 -0
- package/dist/configs/factory/createTextElement.d.ts +63 -0
- package/dist/configs/factory/createTextElement.js +63 -0
- package/dist/configs/factory/defineSection.d.ts +45 -0
- package/dist/configs/factory/defineSection.js +45 -0
- package/dist/configs/factory/layoutAccessors.d.ts +15 -0
- package/dist/configs/factory/layoutAccessors.js +20 -0
- package/dist/configs/featureInjector.d.ts +40 -0
- package/dist/configs/featureInjector.js +184 -0
- package/dist/configs/pageInheritance.d.ts +8 -0
- package/dist/configs/pageInheritance.js +82 -0
- package/dist/configs/placeholders.d.ts +14 -0
- package/dist/configs/placeholders.js +33 -0
- package/dist/configs/shareSection.d.ts +11 -0
- package/dist/configs/shareSection.js +65 -0
- package/dist/configs/types.d.ts +431 -0
- package/dist/configs/types.js +1 -0
- package/dist/configs/unifiedTabs.d.ts +26 -0
- package/dist/configs/unifiedTabs.js +6 -0
- package/dist/editorSeamTypes.d.ts +41 -0
- package/dist/editorSeamTypes.js +1 -0
- package/dist/export/pptx/buildPptxModel.d.ts +47 -0
- package/dist/export/pptx/buildPptxModel.js +612 -0
- package/dist/export/pptx/exportPptxDeck.d.ts +26 -0
- package/dist/export/pptx/exportPptxDeck.js +80 -0
- package/dist/export/pptx/pptxFonts.d.ts +26 -0
- package/dist/export/pptx/pptxFonts.js +41 -0
- package/dist/export/pptx/pptxUnits.d.ts +27 -0
- package/dist/export/pptx/pptxUnits.js +54 -0
- package/dist/export/pptx/textModel.d.ts +17 -0
- package/dist/export/pptx/textModel.js +118 -0
- package/dist/export/pptx/types.d.ts +161 -0
- package/dist/export/pptx/types.js +11 -0
- package/dist/export/pptx/writePptx.d.ts +40 -0
- package/dist/export/pptx/writePptx.js +206 -0
- package/dist/export/pptx/writeText.d.ts +19 -0
- package/dist/export/pptx/writeText.js +120 -0
- package/dist/export/printExport.d.ts +42 -0
- package/dist/export/printExport.js +94 -0
- package/dist/export/printPdf.d.ts +103 -0
- package/dist/export/printPdf.js +144 -0
- package/dist/export/slidesPdf.d.ts +9 -0
- package/dist/export/slidesPdf.js +31 -0
- package/dist/formats/index.d.ts +115 -0
- package/dist/formats/index.js +287 -0
- package/dist/groups/pageGroups.d.ts +32 -0
- package/dist/groups/pageGroups.js +91 -0
- package/dist/hooks/index.d.ts +29 -0
- package/dist/hooks/index.js +19 -0
- package/dist/hooks/useAiImageGeneration.d.ts +15 -0
- package/dist/hooks/useAiImageGeneration.js +73 -0
- package/dist/hooks/useAnnounce.d.ts +27 -0
- package/dist/hooks/useAnnounce.js +47 -0
- package/dist/hooks/useBoxSnap.d.ts +37 -0
- package/dist/hooks/useBoxSnap.js +49 -0
- package/dist/hooks/useCanvasAutoSave.d.ts +33 -0
- package/dist/hooks/useCanvasAutoSave.js +259 -0
- package/dist/hooks/useCanvasElementHandlers.d.ts +182 -0
- package/dist/hooks/useCanvasElementHandlers.js +326 -0
- package/dist/hooks/useCanvasHistorySetup.d.ts +37 -0
- package/dist/hooks/useCanvasHistorySetup.js +113 -0
- package/dist/hooks/useCanvasInteractions.d.ts +31 -0
- package/dist/hooks/useCanvasInteractions.js +103 -0
- package/dist/hooks/useCanvasKeyboardHandlers.d.ts +37 -0
- package/dist/hooks/useCanvasKeyboardHandlers.js +280 -0
- package/dist/hooks/useCanvasStoreReset.d.ts +25 -0
- package/dist/hooks/useCanvasStoreReset.js +35 -0
- package/dist/hooks/useCanvasUndoRedo.d.ts +34 -0
- package/dist/hooks/useCanvasUndoRedo.js +213 -0
- package/dist/hooks/useContextPress.d.ts +14 -0
- package/dist/hooks/useContextPress.js +45 -0
- package/dist/hooks/useCropSession.d.ts +23 -0
- package/dist/hooks/useCropSession.js +69 -0
- package/dist/hooks/useDebounce.d.ts +1 -0
- package/dist/hooks/useDebounce.js +14 -0
- package/dist/hooks/useDeckAutoSave.d.ts +30 -0
- package/dist/hooks/useDeckAutoSave.js +234 -0
- package/dist/hooks/useDeepSelect.d.ts +18 -0
- package/dist/hooks/useDeepSelect.js +135 -0
- package/dist/hooks/useElementSnapping.d.ts +13 -0
- package/dist/hooks/useElementSnapping.js +26 -0
- package/dist/hooks/useEmojiCatalog.d.ts +3 -0
- package/dist/hooks/useEmojiCatalog.js +13 -0
- package/dist/hooks/useFloatingModuleHandlers.d.ts +52 -0
- package/dist/hooks/useFloatingModuleHandlers.js +285 -0
- package/dist/hooks/useFloatingModuleState.d.ts +83 -0
- package/dist/hooks/useFloatingModuleState.js +250 -0
- package/dist/hooks/useFontGeneration.d.ts +10 -0
- package/dist/hooks/useFontGeneration.js +77 -0
- package/dist/hooks/useFontLoader.d.ts +53 -0
- package/dist/hooks/useFontLoader.js +129 -0
- package/dist/hooks/useGeometryReporter.d.ts +19 -0
- package/dist/hooks/useGeometryReporter.js +41 -0
- package/dist/hooks/useHoverOutline.d.ts +8 -0
- package/dist/hooks/useHoverOutline.js +78 -0
- package/dist/hooks/useIconCatalog.d.ts +12 -0
- package/dist/hooks/useIconCatalog.js +30 -0
- package/dist/hooks/useIconSearch.d.ts +2 -0
- package/dist/hooks/useIconSearch.js +14 -0
- package/dist/hooks/useIconSetsFor.d.ts +8 -0
- package/dist/hooks/useIconSetsFor.js +30 -0
- package/dist/hooks/useImageCoverFit.d.ts +17 -0
- package/dist/hooks/useImageCoverFit.js +35 -0
- package/dist/hooks/useIsCanvasMobile.d.ts +3 -0
- package/dist/hooks/useIsCanvasMobile.js +19 -0
- package/dist/hooks/useMarqueeSelection.d.ts +27 -0
- package/dist/hooks/useMarqueeSelection.js +140 -0
- package/dist/hooks/useMobileSheet.d.ts +48 -0
- package/dist/hooks/useMobileSheet.js +282 -0
- package/dist/hooks/useMultiPageExport.d.ts +30 -0
- package/dist/hooks/useMultiPageExport.js +117 -0
- package/dist/hooks/usePageManager.d.ts +132 -0
- package/dist/hooks/usePageManager.js +399 -0
- package/dist/hooks/usePageThumbnails.d.ts +10 -0
- package/dist/hooks/usePageThumbnails.js +122 -0
- package/dist/hooks/usePaginatedIcons.d.ts +11 -0
- package/dist/hooks/usePaginatedIcons.js +46 -0
- package/dist/hooks/useRovingToolbar.d.ts +17 -0
- package/dist/hooks/useRovingToolbar.js +76 -0
- package/dist/hooks/useSelectionAnnouncement.d.ts +13 -0
- package/dist/hooks/useSelectionAnnouncement.js +68 -0
- package/dist/hooks/useSnapScheduler.d.ts +20 -0
- package/dist/hooks/useSnapScheduler.js +61 -0
- package/dist/hooks/useTrackUnsplashDownload.d.ts +6 -0
- package/dist/hooks/useTrackUnsplashDownload.js +19 -0
- package/dist/hooks/useZoomGestures.d.ts +35 -0
- package/dist/hooks/useZoomGestures.js +185 -0
- package/dist/hostServices.d.ts +308 -0
- package/dist/hostServices.js +107 -0
- package/dist/i18n/de.d.ts +897 -0
- package/dist/i18n/de.js +961 -0
- package/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.js +949 -0
- package/dist/i18n/messages.d.ts +28 -0
- package/dist/i18n/messages.js +66 -0
- package/dist/layouts/CanvasEditorLayout.d.ts +28 -0
- package/dist/layouts/CanvasEditorLayout.js +56 -0
- package/dist/layouts/index.d.ts +2 -0
- package/dist/layouts/index.js +2 -0
- package/dist/primitives/AssetPrimitive.d.ts +24 -0
- package/dist/primitives/AssetPrimitive.js +158 -0
- package/dist/primitives/CanvasBackground.d.ts +33 -0
- package/dist/primitives/CanvasBackground.js +44 -0
- package/dist/primitives/CanvasIcons.d.ts +19 -0
- package/dist/primitives/CanvasIcons.js +46 -0
- package/dist/primitives/CanvasImage.d.ts +73 -0
- package/dist/primitives/CanvasImage.js +460 -0
- package/dist/primitives/CanvasRichText.d.ts +25 -0
- package/dist/primitives/CanvasRichText.js +284 -0
- package/dist/primitives/CanvasStage.d.ts +84 -0
- package/dist/primitives/CanvasStage.js +292 -0
- package/dist/primitives/CanvasText.d.ts +91 -0
- package/dist/primitives/CanvasText.js +293 -0
- package/dist/primitives/ChartPrimitive.d.ts +24 -0
- package/dist/primitives/ChartPrimitive.js +318 -0
- package/dist/primitives/CircleBadge.d.ts +43 -0
- package/dist/primitives/CircleBadge.js +233 -0
- package/dist/primitives/FramePrimitive.d.ts +14 -0
- package/dist/primitives/FramePrimitive.js +406 -0
- package/dist/primitives/IconPrimitive.d.ts +28 -0
- package/dist/primitives/IconPrimitive.js +119 -0
- package/dist/primitives/IllustrationPrimitive.d.ts +16 -0
- package/dist/primitives/IllustrationPrimitive.js +184 -0
- package/dist/primitives/PillBadge.d.ts +45 -0
- package/dist/primitives/PillBadge.js +237 -0
- package/dist/primitives/ShapePrimitive.d.ts +12 -0
- package/dist/primitives/ShapePrimitive.js +521 -0
- package/dist/primitives/SnapGuidelines.d.ts +19 -0
- package/dist/primitives/SnapGuidelines.js +34 -0
- package/dist/primitives/UserImagePrimitive.d.ts +30 -0
- package/dist/primitives/UserImagePrimitive.js +496 -0
- package/dist/primitives/index.d.ts +18 -0
- package/dist/primitives/index.js +11 -0
- package/dist/sidebar/SidebarPanel.d.ts +8 -0
- package/dist/sidebar/SidebarPanel.js +219 -0
- package/dist/sidebar/SidebarTabBar.d.ts +2 -0
- package/dist/sidebar/SidebarTabBar.js +31 -0
- package/dist/sidebar/SubsectionTabBar.d.ts +13 -0
- package/dist/sidebar/SubsectionTabBar.js +30 -0
- package/dist/sidebar/UserUploadsProvider.d.ts +31 -0
- package/dist/sidebar/UserUploadsProvider.js +139 -0
- package/dist/sidebar/components/AltTextField.d.ts +21 -0
- package/dist/sidebar/components/AltTextField.js +60 -0
- package/dist/sidebar/components/SidebarHint.d.ts +7 -0
- package/dist/sidebar/components/SidebarHint.js +38 -0
- package/dist/sidebar/components/SidebarSlider.d.ts +16 -0
- package/dist/sidebar/components/SidebarSlider.js +9 -0
- package/dist/sidebar/components/TextFieldPrimitives.d.ts +26 -0
- package/dist/sidebar/components/TextFieldPrimitives.js +56 -0
- package/dist/sidebar/sections/ChartSettingsSection.d.ts +9 -0
- package/dist/sidebar/sections/ChartSettingsSection.js +78 -0
- package/dist/sidebar/sections/CombinedTextSection.d.ts +16 -0
- package/dist/sidebar/sections/CombinedTextSection.js +43 -0
- package/dist/sidebar/sections/DiagrammeSection.d.ts +9 -0
- package/dist/sidebar/sections/DiagrammeSection.js +40 -0
- package/dist/sidebar/sections/EffectsSection.d.ts +20 -0
- package/dist/sidebar/sections/EffectsSection.js +23 -0
- package/dist/sidebar/sections/FormenSection.d.ts +28 -0
- package/dist/sidebar/sections/FormenSection.js +440 -0
- package/dist/sidebar/sections/FrameSettingsSection.d.ts +8 -0
- package/dist/sidebar/sections/FrameSettingsSection.js +26 -0
- package/dist/sidebar/sections/GenericShareSection.d.ts +26 -0
- package/dist/sidebar/sections/GenericShareSection.js +262 -0
- package/dist/sidebar/sections/IconsSection.d.ts +8 -0
- package/dist/sidebar/sections/IconsSection.js +55 -0
- package/dist/sidebar/sections/IllustrationSettings.d.ts +9 -0
- package/dist/sidebar/sections/IllustrationSettings.js +33 -0
- package/dist/sidebar/sections/IllustrationThumb.d.ts +7 -0
- package/dist/sidebar/sections/IllustrationThumb.js +15 -0
- package/dist/sidebar/sections/ImageAdjustSection.d.ts +13 -0
- package/dist/sidebar/sections/ImageAdjustSection.js +85 -0
- package/dist/sidebar/sections/LayersSection.d.ts +25 -0
- package/dist/sidebar/sections/LayersSection.js +155 -0
- package/dist/sidebar/sections/RahmenSection.d.ts +7 -0
- package/dist/sidebar/sections/RahmenSection.js +18 -0
- package/dist/sidebar/sections/StudioGallery.d.ts +33 -0
- package/dist/sidebar/sections/StudioGallery.js +58 -0
- package/dist/sidebar/sections/UploadsSection.d.ts +11 -0
- package/dist/sidebar/sections/UploadsSection.js +130 -0
- package/dist/sidebar/sections/assets/AssetsSection.d.ts +59 -0
- package/dist/sidebar/sections/assets/AssetsSection.js +27 -0
- package/dist/sidebar/sections/assets/BackgroundCatalog.d.ts +9 -0
- package/dist/sidebar/sections/assets/BackgroundCatalog.js +49 -0
- package/dist/sidebar/sections/assets/CategoryCard.d.ts +14 -0
- package/dist/sidebar/sections/assets/CategoryCard.js +15 -0
- package/dist/sidebar/sections/assets/ElementGrid.d.ts +14 -0
- package/dist/sidebar/sections/assets/ElementGrid.js +34 -0
- package/dist/sidebar/sections/assets/ElementThumb.d.ts +10 -0
- package/dist/sidebar/sections/assets/ElementThumb.js +61 -0
- package/dist/sidebar/sections/assets/ElementTile.d.ts +32 -0
- package/dist/sidebar/sections/assets/ElementTile.js +60 -0
- package/dist/sidebar/sections/assets/ElementsPanel.d.ts +7 -0
- package/dist/sidebar/sections/assets/ElementsPanel.js +249 -0
- package/dist/sidebar/sections/assets/EmojiTonePicker.d.ts +8 -0
- package/dist/sidebar/sections/assets/EmojiTonePicker.js +26 -0
- package/dist/sidebar/sections/assets/FotosCatalog.d.ts +12 -0
- package/dist/sidebar/sections/assets/FotosCatalog.js +41 -0
- package/dist/sidebar/sections/assets/IconifyCatalog.d.ts +14 -0
- package/dist/sidebar/sections/assets/IconifyCatalog.js +133 -0
- package/dist/sidebar/sections/assets/RecentCarousel.d.ts +7 -0
- package/dist/sidebar/sections/assets/RecentCarousel.js +42 -0
- package/dist/sidebar/sections/assets/StickerCatalog.d.ts +14 -0
- package/dist/sidebar/sections/assets/StickerCatalog.js +49 -0
- package/dist/sidebar/sections/assets/constants.d.ts +4 -0
- package/dist/sidebar/sections/assets/constants.js +15 -0
- package/dist/sidebar/sections/assets/elementPanelHost.d.ts +45 -0
- package/dist/sidebar/sections/assets/elementPanelHost.js +1 -0
- package/dist/sidebar/sections/assets/elementSearch.d.ts +10 -0
- package/dist/sidebar/sections/assets/elementSearch.js +38 -0
- package/dist/sidebar/sections/assets/elementTypes.d.ts +67 -0
- package/dist/sidebar/sections/assets/elementTypes.js +24 -0
- package/dist/sidebar/sections/assets/index.d.ts +3 -0
- package/dist/sidebar/sections/assets/index.js +3 -0
- package/dist/sidebar/sections/assets/useElementCatalog.d.ts +43 -0
- package/dist/sidebar/sections/assets/useElementCatalog.js +386 -0
- package/dist/sidebar/sections/assets/useRecentElements.d.ts +21 -0
- package/dist/sidebar/sections/assets/useRecentElements.js +67 -0
- package/dist/sidebar/sections/assets/useStockPhotos.d.ts +22 -0
- package/dist/sidebar/sections/assets/useStockPhotos.js +96 -0
- package/dist/sidebar/sections/effects/EffectCard.d.ts +11 -0
- package/dist/sidebar/sections/effects/EffectCard.js +14 -0
- package/dist/sidebar/sections/effects/GradientSettings.d.ts +10 -0
- package/dist/sidebar/sections/effects/GradientSettings.js +34 -0
- package/dist/sidebar/sections/effects/OutlineSettings.d.ts +12 -0
- package/dist/sidebar/sections/effects/OutlineSettings.js +29 -0
- package/dist/sidebar/sections/effects/ShadowSettings.d.ts +13 -0
- package/dist/sidebar/sections/effects/ShadowSettings.js +38 -0
- package/dist/sidebar/sections/effects/effectsFor.d.ts +16 -0
- package/dist/sidebar/sections/effects/effectsFor.js +24 -0
- package/dist/sidebar/sections/index.d.ts +28 -0
- package/dist/sidebar/sections/index.js +36 -0
- package/dist/sidebar/sections/lazyWithPreload.d.ts +11 -0
- package/dist/sidebar/sections/lazyWithPreload.js +29 -0
- package/dist/sidebar/sections/tools/AiCreateTool.d.ts +4 -0
- package/dist/sidebar/sections/tools/AiCreateTool.js +58 -0
- package/dist/sidebar/sections/tools/AiEditTool.d.ts +4 -0
- package/dist/sidebar/sections/tools/AiEditTool.js +57 -0
- package/dist/sidebar/sections/tools/AltTextTool.d.ts +11 -0
- package/dist/sidebar/sections/tools/AltTextTool.js +78 -0
- package/dist/sidebar/sections/tools/BlobCreatorTool.d.ts +5 -0
- package/dist/sidebar/sections/tools/BlobCreatorTool.js +90 -0
- package/dist/sidebar/sections/tools/GradientTextTool.d.ts +5 -0
- package/dist/sidebar/sections/tools/GradientTextTool.js +104 -0
- package/dist/sidebar/sections/tools/ImageInputPicker.d.ts +7 -0
- package/dist/sidebar/sections/tools/ImageInputPicker.js +68 -0
- package/dist/sidebar/sections/tools/QRCodeTool.d.ts +5 -0
- package/dist/sidebar/sections/tools/QRCodeTool.js +63 -0
- package/dist/sidebar/sections/tools/RemoveBackgroundTool.d.ts +4 -0
- package/dist/sidebar/sections/tools/RemoveBackgroundTool.js +52 -0
- package/dist/sidebar/sections/tools/TextPathCreatorTool.d.ts +5 -0
- package/dist/sidebar/sections/tools/TextPathCreatorTool.js +125 -0
- package/dist/sidebar/sections/tools/ToolPanel.d.ts +26 -0
- package/dist/sidebar/sections/tools/ToolPanel.js +13 -0
- package/dist/sidebar/sections/tools/ToolTiles.d.ts +5 -0
- package/dist/sidebar/sections/tools/ToolTiles.js +76 -0
- package/dist/sidebar/sections/tools/ToolsSection.d.ts +15 -0
- package/dist/sidebar/sections/tools/ToolsSection.js +151 -0
- package/dist/sidebar/sections/tools/UnsplashLimitNotice.d.ts +8 -0
- package/dist/sidebar/sections/tools/UnsplashLimitNotice.js +22 -0
- package/dist/sidebar/sections/tools/UnsplashTool.d.ts +10 -0
- package/dist/sidebar/sections/tools/UnsplashTool.js +47 -0
- package/dist/sidebar/sections/tools/index.d.ts +1 -0
- package/dist/sidebar/sections/tools/index.js +2 -0
- package/dist/sidebar/sections/tools/toolTiles.css +335 -0
- package/dist/sidebar/sections/tools/useToolImagePlacement.d.ts +19 -0
- package/dist/sidebar/sections/tools/useToolImagePlacement.js +23 -0
- package/dist/sidebar/sections/whenIdle.d.ts +2 -0
- package/dist/sidebar/sections/whenIdle.js +10 -0
- package/dist/sidebar/sidebarStyles.d.ts +60 -0
- package/dist/sidebar/sidebarStyles.js +61 -0
- package/dist/sidebar/tabTypes.d.ts +27 -0
- package/dist/sidebar/tabTypes.js +1 -0
- package/dist/sidebar/types.d.ts +43 -0
- package/dist/sidebar/types.js +1 -0
- package/dist/sidebar/useImagePlacement.d.ts +17 -0
- package/dist/sidebar/useImagePlacement.js +28 -0
- package/dist/stores/AutoSaveStoreProvider.d.ts +28 -0
- package/dist/stores/AutoSaveStoreProvider.js +45 -0
- package/dist/stores/CanvasStoreProvider.d.ts +43 -0
- package/dist/stores/CanvasStoreProvider.js +74 -0
- package/dist/stores/createAutoSaveStore.d.ts +50 -0
- package/dist/stores/createAutoSaveStore.js +42 -0
- package/dist/stores/createCanvasEditorStore.d.ts +126 -0
- package/dist/stores/createCanvasEditorStore.js +266 -0
- package/dist/stores/useAutoSaveStore.d.ts +12 -0
- package/dist/stores/useAutoSaveStore.js +12 -0
- package/dist/styles/editor.css +445 -0
- package/dist/styles/index.css +4 -0
- package/dist/styles/tailwind.css +239 -0
- package/dist/styles/tokens.css +199 -0
- package/dist/templates/fontWidths.generated.d.ts +1 -0
- package/dist/templates/fontWidths.generated.js +17 -0
- package/dist/templates/registry.d.ts +59 -0
- package/dist/templates/registry.js +40 -0
- package/dist/templates/templateGeometry.d.ts +32 -0
- package/dist/templates/templateGeometry.js +887 -0
- package/dist/templates/testKinds.d.ts +15 -0
- package/dist/templates/testKinds.js +151 -0
- package/dist/testing/documentBrandConfig.d.ts +14 -0
- package/dist/testing/documentBrandConfig.js +60 -0
- package/dist/testing/documentBrandPacks.d.ts +10 -0
- package/dist/testing/documentBrandPacks.js +45 -0
- package/dist/testing/fixtureTemplates.d.ts +13 -0
- package/dist/testing/fixtureTemplates.js +376 -0
- package/dist/testing/stampKind.d.ts +91 -0
- package/dist/testing/stampKind.js +56 -0
- package/dist/types/editorTypes.d.ts +65 -0
- package/dist/types/editorTypes.js +21 -0
- package/dist/ui/alert-dialog.d.ts +18 -0
- package/dist/ui/alert-dialog.js +42 -0
- package/dist/ui/button.d.ts +10 -0
- package/dist/ui/button.js +29 -0
- package/dist/ui/dialog.d.ts +15 -0
- package/dist/ui/dialog.js +53 -0
- package/dist/ui/icon-button.d.ts +18 -0
- package/dist/ui/icon-button.js +54 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.js +6 -0
- package/dist/ui/label.d.ts +4 -0
- package/dist/ui/label.js +8 -0
- package/dist/ui/masonry-grid.d.ts +11 -0
- package/dist/ui/masonry-grid.js +43 -0
- package/dist/ui/popover.d.ts +10 -0
- package/dist/ui/popover.js +26 -0
- package/dist/ui/select.d.ts +15 -0
- package/dist/ui/select.js +38 -0
- package/dist/ui/skeleton.d.ts +2 -0
- package/dist/ui/skeleton.js +7 -0
- package/dist/ui/switch.d.ts +6 -0
- package/dist/ui/switch.js +8 -0
- package/dist/utils/__snapshots__/kindSelection.vitest.ts.snap +1086 -0
- package/dist/utils/alignment.d.ts +21 -0
- package/dist/utils/alignment.js +54 -0
- package/dist/utils/axisLock.d.ts +30 -0
- package/dist/utils/axisLock.js +78 -0
- package/dist/utils/backgroundPhotoCrop.d.ts +28 -0
- package/dist/utils/backgroundPhotoCrop.js +28 -0
- package/dist/utils/canvasAssets.d.ts +140 -0
- package/dist/utils/canvasAssets.js +121 -0
- package/dist/utils/canvasClipboard.d.ts +51 -0
- package/dist/utils/canvasClipboard.js +37 -0
- package/dist/utils/canvasCommandRegistry.d.ts +207 -0
- package/dist/utils/canvasCommandRegistry.js +124 -0
- package/dist/utils/canvasCommands.d.ts +106 -0
- package/dist/utils/canvasCommands.js +564 -0
- package/dist/utils/canvasFontFamilies.d.ts +12 -0
- package/dist/utils/canvasFontFamilies.js +24 -0
- package/dist/utils/canvasIcons.d.ts +68 -0
- package/dist/utils/canvasIcons.js +293 -0
- package/dist/utils/canvasImageSource.d.ts +12 -0
- package/dist/utils/canvasImageSource.js +19 -0
- package/dist/utils/canvasItem.d.ts +102 -0
- package/dist/utils/canvasItem.js +1 -0
- package/dist/utils/canvasLayerManager.d.ts +51 -0
- package/dist/utils/canvasLayerManager.js +107 -0
- package/dist/utils/canvasValueResolver.d.ts +9 -0
- package/dist/utils/canvasValueResolver.js +13 -0
- package/dist/utils/captureStage.d.ts +59 -0
- package/dist/utils/captureStage.js +152 -0
- package/dist/utils/chartTypes.d.ts +6 -0
- package/dist/utils/chartTypes.js +2 -0
- package/dist/utils/chartUtils.d.ts +49 -0
- package/dist/utils/chartUtils.js +191 -0
- package/dist/utils/circleBadgeUtils.d.ts +30 -0
- package/dist/utils/circleBadgeUtils.js +85 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.js +66 -0
- package/dist/utils/collectAltTextPages.d.ts +6 -0
- package/dist/utils/collectAltTextPages.js +20 -0
- package/dist/utils/colorLuminance.d.ts +3 -0
- package/dist/utils/colorLuminance.js +14 -0
- package/dist/utils/colorNames.d.ts +7 -0
- package/dist/utils/colorNames.js +17 -0
- package/dist/utils/colorOptions.d.ts +20 -0
- package/dist/utils/colorOptions.js +20 -0
- package/dist/utils/cornerRadius.d.ts +14 -0
- package/dist/utils/cornerRadius.js +27 -0
- package/dist/utils/cornerReservation.d.ts +19 -0
- package/dist/utils/cornerReservation.js +7 -0
- package/dist/utils/coverFit.d.ts +117 -0
- package/dist/utils/coverFit.js +207 -0
- package/dist/utils/cropAspect.d.ts +47 -0
- package/dist/utils/cropAspect.js +53 -0
- package/dist/utils/cropGhost.d.ts +63 -0
- package/dist/utils/cropGhost.js +216 -0
- package/dist/utils/cropSession.d.ts +23 -0
- package/dist/utils/cropSession.js +92 -0
- package/dist/utils/cropTarget.d.ts +22 -0
- package/dist/utils/cropTarget.js +33 -0
- package/dist/utils/deepSelect.d.ts +43 -0
- package/dist/utils/deepSelect.js +74 -0
- package/dist/utils/downloadError.d.ts +2 -0
- package/dist/utils/downloadError.js +13 -0
- package/dist/utils/duplicateElement.d.ts +127 -0
- package/dist/utils/duplicateElement.js +235 -0
- package/dist/utils/editorFocus.d.ts +36 -0
- package/dist/utils/editorFocus.js +67 -0
- package/dist/utils/editorToast.d.ts +21 -0
- package/dist/utils/editorToast.js +7 -0
- package/dist/utils/elementKinds.d.ts +212 -0
- package/dist/utils/elementKinds.js +137 -0
- package/dist/utils/emoji/emojiCatalog.d.ts +12 -0
- package/dist/utils/emoji/emojiCatalog.en.json +9997 -0
- package/dist/utils/emoji/emojiCatalog.js +53 -0
- package/dist/utils/emoji/emojiCatalog.json +9913 -0
- package/dist/utils/ensureFontsReady.d.ts +12 -0
- package/dist/utils/ensureFontsReady.js +23 -0
- package/dist/utils/expandImage.d.ts +17 -0
- package/dist/utils/expandImage.js +76 -0
- package/dist/utils/externalIcons.d.ts +67 -0
- package/dist/utils/externalIcons.js +168 -0
- package/dist/utils/filterCache.d.ts +16 -0
- package/dist/utils/filterCache.js +31 -0
- package/dist/utils/filterUtils.d.ts +2 -0
- package/dist/utils/filterUtils.js +89 -0
- package/dist/utils/followStage.d.ts +2 -0
- package/dist/utils/followStage.js +48 -0
- package/dist/utils/fontAliases.d.ts +14 -0
- package/dist/utils/fontAliases.js +32 -0
- package/dist/utils/fontMarkSupport.d.ts +26 -0
- package/dist/utils/fontMarkSupport.js +32 -0
- package/dist/utils/frameUtils.d.ts +20 -0
- package/dist/utils/frameUtils.js +283 -0
- package/dist/utils/gradientFill.d.ts +55 -0
- package/dist/utils/gradientFill.js +57 -0
- package/dist/utils/gradientHitArea.d.ts +22 -0
- package/dist/utils/gradientHitArea.js +94 -0
- package/dist/utils/grain.d.ts +29 -0
- package/dist/utils/grain.js +103 -0
- package/dist/utils/grainSpec.d.ts +2 -0
- package/dist/utils/grainSpec.js +3 -0
- package/dist/utils/groupSnap.d.ts +27 -0
- package/dist/utils/groupSnap.js +54 -0
- package/dist/utils/handDrawn.d.ts +92 -0
- package/dist/utils/handDrawn.js +523 -0
- package/dist/utils/historyStamp.d.ts +22 -0
- package/dist/utils/historyStamp.js +31 -0
- package/dist/utils/hostStorageKeys.d.ts +16 -0
- package/dist/utils/hostStorageKeys.js +27 -0
- package/dist/utils/iconInstances.d.ts +80 -0
- package/dist/utils/iconInstances.js +109 -0
- package/dist/utils/illustrations/gophers.d.ts +11 -0
- package/dist/utils/illustrations/gophers.js +1236 -0
- package/dist/utils/illustrations/humaaans.d.ts +8 -0
- package/dist/utils/illustrations/humaaans.js +265 -0
- package/dist/utils/illustrations/illlustrations.d.ts +11 -0
- package/dist/utils/illustrations/illlustrations.js +929 -0
- package/dist/utils/illustrations/kawaii.d.ts +6 -0
- package/dist/utils/illustrations/kawaii.js +73 -0
- package/dist/utils/illustrations/opendoodles.d.ts +6 -0
- package/dist/utils/illustrations/opendoodles.js +271 -0
- package/dist/utils/illustrations/openpeeps.d.ts +9 -0
- package/dist/utils/illustrations/openpeeps.js +1522 -0
- package/dist/utils/illustrations/prefetchAnalytics.d.ts +78 -0
- package/dist/utils/illustrations/prefetchAnalytics.js +162 -0
- package/dist/utils/illustrations/registry.d.ts +27 -0
- package/dist/utils/illustrations/registry.js +106 -0
- package/dist/utils/illustrations/svgCache.d.ts +60 -0
- package/dist/utils/illustrations/svgCache.js +349 -0
- package/dist/utils/illustrations/transhumans.d.ts +8 -0
- package/dist/utils/illustrations/transhumans.js +313 -0
- package/dist/utils/illustrations/types.d.ts +25 -0
- package/dist/utils/illustrations/types.js +45 -0
- package/dist/utils/imageElementComparison.d.ts +19 -0
- package/dist/utils/imageElementComparison.js +121 -0
- package/dist/utils/imageFilters.d.ts +94 -0
- package/dist/utils/imageFilters.js +304 -0
- package/dist/utils/imageLook.d.ts +18 -0
- package/dist/utils/imageLook.js +41 -0
- package/dist/utils/keyboardCrop.d.ts +25 -0
- package/dist/utils/keyboardCrop.js +98 -0
- package/dist/utils/keyboardOwnership.d.ts +30 -0
- package/dist/utils/keyboardOwnership.js +93 -0
- package/dist/utils/layerLabels.d.ts +39 -0
- package/dist/utils/layerLabels.js +181 -0
- package/dist/utils/layerLock.d.ts +24 -0
- package/dist/utils/layerLock.js +52 -0
- package/dist/utils/layerSelection.d.ts +24 -0
- package/dist/utils/layerSelection.js +16 -0
- package/dist/utils/markerBoxes.d.ts +38 -0
- package/dist/utils/markerBoxes.js +60 -0
- package/dist/utils/markerColors.d.ts +16 -0
- package/dist/utils/markerColors.js +32 -0
- package/dist/utils/mediaDrop.d.ts +76 -0
- package/dist/utils/mediaDrop.js +95 -0
- package/dist/utils/mediaPlacement.d.ts +6 -0
- package/dist/utils/mediaPlacement.js +17 -0
- package/dist/utils/motifSizes.d.ts +8 -0
- package/dist/utils/motifSizes.js +9 -0
- package/dist/utils/multiSelect.d.ts +44 -0
- package/dist/utils/multiSelect.js +139 -0
- package/dist/utils/notch.d.ts +17 -0
- package/dist/utils/notch.js +23 -0
- package/dist/utils/orientElement.d.ts +46 -0
- package/dist/utils/orientElement.js +108 -0
- package/dist/utils/orientation.d.ts +119 -0
- package/dist/utils/orientation.js +411 -0
- package/dist/utils/pageCounter.d.ts +15 -0
- package/dist/utils/pageCounter.js +17 -0
- package/dist/utils/pendingImages.d.ts +10 -0
- package/dist/utils/pendingImages.js +25 -0
- package/dist/utils/photoCredit.d.ts +9 -0
- package/dist/utils/photoCredit.js +29 -0
- package/dist/utils/photoCredits.d.ts +5 -0
- package/dist/utils/photoCredits.js +17 -0
- package/dist/utils/photoPlaceholder.d.ts +25 -0
- package/dist/utils/photoPlaceholder.js +38 -0
- package/dist/utils/pillBadgeUtils.d.ts +41 -0
- package/dist/utils/pillBadgeUtils.js +94 -0
- package/dist/utils/pixelHitArea.d.ts +13 -0
- package/dist/utils/pixelHitArea.js +33 -0
- package/dist/utils/plainTextLayout.d.ts +11 -0
- package/dist/utils/plainTextLayout.js +64 -0
- package/dist/utils/printImageInfo.d.ts +9 -0
- package/dist/utils/printImageInfo.js +14 -0
- package/dist/utils/recacheNextFrame.d.ts +6 -0
- package/dist/utils/recacheNextFrame.js +15 -0
- package/dist/utils/removeElement.d.ts +17 -0
- package/dist/utils/removeElement.js +47 -0
- package/dist/utils/renderedBoxes.d.ts +19 -0
- package/dist/utils/renderedBoxes.js +67 -0
- package/dist/utils/resolveElementValue.d.ts +44 -0
- package/dist/utils/resolveElementValue.js +72 -0
- package/dist/utils/scrollBehavior.d.ts +6 -0
- package/dist/utils/scrollBehavior.js +17 -0
- package/dist/utils/searchTranslations.d.ts +20 -0
- package/dist/utils/searchTranslations.js +366 -0
- package/dist/utils/selectionCapabilities.d.ts +53 -0
- package/dist/utils/selectionCapabilities.js +52 -0
- package/dist/utils/shade.d.ts +24 -0
- package/dist/utils/shade.js +55 -0
- package/dist/utils/shapeDevices.d.ts +72 -0
- package/dist/utils/shapeDevices.js +100 -0
- package/dist/utils/shapeTransform.d.ts +29 -0
- package/dist/utils/shapeTransform.js +69 -0
- package/dist/utils/shapes.d.ts +64 -0
- package/dist/utils/shapes.js +838 -0
- package/dist/utils/smartCrop.d.ts +30 -0
- package/dist/utils/smartCrop.js +163 -0
- package/dist/utils/snapping.d.ts +116 -0
- package/dist/utils/snapping.js +426 -0
- package/dist/utils/stageCssScale.d.ts +7 -0
- package/dist/utils/stageCssScale.js +11 -0
- package/dist/utils/stateTypeAssertions.d.ts +99 -0
- package/dist/utils/stateTypeAssertions.js +197 -0
- package/dist/utils/straighten.d.ts +51 -0
- package/dist/utils/straighten.js +254 -0
- package/dist/utils/surfaceGlow.d.ts +7 -0
- package/dist/utils/surfaceGlow.js +27 -0
- package/dist/utils/templateElementInstance.d.ts +43 -0
- package/dist/utils/templateElementInstance.js +100 -0
- package/dist/utils/templateRotation.d.ts +24 -0
- package/dist/utils/templateRotation.js +56 -0
- package/dist/utils/textAlign.d.ts +17 -0
- package/dist/utils/textAlign.js +30 -0
- package/dist/utils/textEditorOpeners.d.ts +12 -0
- package/dist/utils/textEditorOpeners.js +40 -0
- package/dist/utils/textRouting.d.ts +17 -0
- package/dist/utils/textRouting.js +22 -0
- package/dist/utils/textUtils.d.ts +102 -0
- package/dist/utils/textUtils.js +254 -0
- package/dist/utils/touchInput.d.ts +7 -0
- package/dist/utils/touchInput.js +19 -0
- package/dist/utils/transformHudLabel.d.ts +3 -0
- package/dist/utils/transformHudLabel.js +12 -0
- package/dist/utils/unsplashLinks.d.ts +2 -0
- package/dist/utils/unsplashLinks.js +7 -0
- package/dist/utils/userFacingError.d.ts +10 -0
- package/dist/utils/userFacingError.js +10 -0
- package/dist/utils/userImageCrop.d.ts +4 -0
- package/dist/utils/userImageCrop.js +26 -0
- package/dist/utils/userImageUtils.d.ts +44 -0
- package/dist/utils/userImageUtils.js +136 -0
- package/dist/utils/viewport.d.ts +16 -0
- package/dist/utils/viewport.js +30 -0
- package/dist/utils/zipPageImages.d.ts +9 -0
- package/dist/utils/zipPageImages.js +30 -0
- package/package.json +105 -3
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Tailwind class constants for canvas-editor sidebar components.
|
|
3
|
+
* Replaces SidebarPrimitives.css with composable string constants.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CARD_GRID = "grid grid-cols-[repeat(auto-fill,minmax(68px,1fr))] gap-2 w-full max-canvas-mobile:grid-cols-[repeat(auto-fill,minmax(44px,1fr))] max-canvas-mobile:gap-1";
|
|
6
|
+
/** iOS zoomt beim Fokus in Felder unter 16px — auf dem Handy daher mindestens text-base. */
|
|
7
|
+
export declare const MOBILE_INPUT_TEXT = "max-canvas-mobile:text-base";
|
|
8
|
+
export declare const CARD_GRID_SINGLE_COL = "grid grid-cols-1 gap-2 w-full";
|
|
9
|
+
/** Horizontal scroll container without a visible scrollbar */
|
|
10
|
+
export declare const HIDDEN_SCROLLBAR = "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden [-webkit-overflow-scrolling:touch]";
|
|
11
|
+
export declare const SELECTABLE_CARD = "aspect-square p-1.5 rounded-lg bg-transparent border border-transparent cursor-pointer transition-[background,border-color] duration-150 flex items-center justify-center hover:bg-hover-alt";
|
|
12
|
+
export declare const SELECTABLE_CARD_ACTIVE = "border-accent bg-background-alt";
|
|
13
|
+
export declare const SELECTABLE_CARD_WITH_LABEL = "aspect-square p-1.5 rounded-lg bg-transparent border border-transparent cursor-pointer transition-[background,border-color] duration-150 flex items-center justify-start gap-sm hover:bg-hover-alt";
|
|
14
|
+
export declare const SELECTABLE_CARD_WITH_TEXT = "p-sm rounded-lg bg-transparent border border-transparent cursor-pointer transition-[background,border-color] duration-150 flex items-start justify-start gap-sm hover:bg-hover-alt";
|
|
15
|
+
export declare const SECTION_LABEL = "text-xs font-semibold text-foreground uppercase tracking-wide mb-1";
|
|
16
|
+
export declare const CONTROL_GROUP = "bg-[var(--card-background)] border border-[var(--card-border)] rounded-[var(--card-border-radius-small)] p-sm flex flex-col gap-xs";
|
|
17
|
+
export declare const CONTROL_GROUP_HEADER = "flex items-center gap-xs";
|
|
18
|
+
export declare const CONTROL_GROUP_ICON = "text-primary-600 shrink-0";
|
|
19
|
+
export declare const CONTROL_GROUP_LABEL = "text-[length:var(--font-size-small)] font-semibold text-foreground";
|
|
20
|
+
export declare const SLIDER_ROW = "flex items-center gap-sm";
|
|
21
|
+
export declare const SLIDER_ROW_WITH_BOUNDS = "flex items-center gap-xs";
|
|
22
|
+
export declare const SLIDER_BOUND = "text-[8px] text-[var(--font-color-secondary)] min-w-[40px] text-center";
|
|
23
|
+
export declare const SLIDER_VALUE = "min-w-[48px] text-right text-[length:var(--font-size-small)] text-[var(--font-color-muted)] tabular-nums";
|
|
24
|
+
export declare const SLIDER_VALUE_BADGE = "text-center font-medium text-primary-600 bg-background p-[var(--spacing-xxsmall)_var(--spacing-xsmall)] rounded min-w-[50px]";
|
|
25
|
+
export declare const SIDEBAR_HINT = "m-0 p-sm bg-[var(--card-background)] border border-[var(--card-border)] rounded-[var(--card-border-radius-small)] text-[length:var(--font-size-xs)] text-[var(--font-color-muted)] leading-relaxed text-left";
|
|
26
|
+
export declare const RESET_BTN = "flex items-center justify-center gap-xs py-xs px-sm bg-[var(--card-background)] border border-[var(--card-border)] rounded-[var(--card-border-radius-small)] text-[var(--font-color-secondary)] text-[length:var(--font-size-small)] cursor-pointer transition-[background-color,border-color,color] duration-150 hover:bg-background-alt hover:border-primary-600 hover:text-primary-600";
|
|
27
|
+
export declare const SIDEBAR_SECTION = "flex flex-col gap-sm";
|
|
28
|
+
export declare const SIDEBAR_SECTION_FIELD = "flex flex-col gap-xs";
|
|
29
|
+
export declare const SIDEBAR_SECTION_HINT = "m-0 text-[0.65rem] text-[var(--font-color-secondary)]";
|
|
30
|
+
export declare const SIDEBAR_SECTION_EMPTY = "m-0 p-lg text-center text-[0.7rem] text-[var(--font-color-secondary)]";
|
|
31
|
+
export declare const SECTION_TOGGLE = "flex items-center gap-sm w-full bg-transparent border-none cursor-pointer py-sm px-0 text-foreground text-[length:var(--font-size-base)] font-semibold transition-colors duration-200 hover:text-[var(--interactive-accent-color)] [&>svg:last-child]:ml-auto [&>svg:last-child]:transition-transform [&>svg:last-child]:duration-200";
|
|
32
|
+
export declare const SECTION_TOGGLE_OPEN = "[&>svg:last-child]:rotate-180";
|
|
33
|
+
export declare const ALTERNATIVES_LIST = "flex flex-wrap gap-xs py-sm";
|
|
34
|
+
export declare const ALTERNATIVE_ITEM = "bg-background-alt border border-[var(--border-color)] rounded-full py-xs px-sm text-[length:var(--font-size-small)] cursor-pointer transition-all duration-200 max-w-full overflow-hidden text-ellipsis whitespace-nowrap hover:bg-hover-alt hover:border-[var(--interactive-accent-color)] hover:text-[var(--interactive-accent-color)]";
|
|
35
|
+
export declare const ALTERNATIVE_ITEM_ACTIVE = "border-[var(--interactive-accent-color)] bg-background-alt text-[var(--interactive-accent-color)]";
|
|
36
|
+
export declare const FONT_SIZE_ROW = "flex items-center gap-md py-sm";
|
|
37
|
+
export declare const FONT_SIZE_BUTTONS = "flex gap-xs";
|
|
38
|
+
export declare const FONT_SIZE_BTN = "w-8 h-8 flex items-center justify-center border border-[var(--border-color)] rounded-full bg-background text-foreground cursor-pointer transition-all duration-200 hover:bg-background-alt hover:border-primary-600 hover:text-primary-600 active:scale-95";
|
|
39
|
+
/** Preview container inside a selectable card (centered, fills parent) */
|
|
40
|
+
export declare const CARD_PREVIEW = "relative w-full h-full flex items-center justify-center shrink-0";
|
|
41
|
+
/** Check badge overlaid on a card preview (small, bottom-right) */
|
|
42
|
+
export declare const CARD_CHECK_SMALL = "absolute -bottom-[3px] -right-[3px] size-3.5 flex items-center justify-center bg-[var(--interactive-accent-color)] text-background rounded-full";
|
|
43
|
+
/** Check badge for list items (normal size, top-right-aligned) */
|
|
44
|
+
export declare const CARD_CHECK = "size-[18px] flex items-center justify-center bg-[var(--interactive-accent-color)] text-background rounded-full shrink-0 self-start mt-0.5";
|
|
45
|
+
/** Label inside a card with text */
|
|
46
|
+
export declare const CARD_LABEL = "text-[length:var(--font-size-small)] text-foreground flex-1 text-left";
|
|
47
|
+
/** Active state for selectable cards (border highlight) */
|
|
48
|
+
export declare const SELECTABLE_CARD_DISABLED = "opacity-40 cursor-not-allowed";
|
|
49
|
+
/** Section header row (title + action buttons) */
|
|
50
|
+
export declare const SECTION_HEADER = "flex items-center justify-between px-3 py-1.5";
|
|
51
|
+
/** Section title text */
|
|
52
|
+
export declare const SECTION_TITLE = "flex-1 text-[11px] font-semibold text-[var(--font-color-secondary)] uppercase tracking-[0.8px]";
|
|
53
|
+
/** Small action button (icon-only) for section headers */
|
|
54
|
+
export declare const ACTION_BTN = "size-7 flex items-center justify-center bg-transparent border-none rounded-md cursor-pointer text-[var(--text-secondary,#666)] transition-[background-color,color] duration-150 hover:bg-[var(--hover-background,#f0f0f0)] hover:text-foreground";
|
|
55
|
+
/** Danger variant of action button */
|
|
56
|
+
export declare const ACTION_BTN_DANGER = "size-7 flex items-center justify-center bg-transparent border-none rounded-md cursor-pointer text-[var(--text-secondary,#666)] transition-[background-color,color] duration-150 hover:bg-red-50 hover:text-red-600";
|
|
57
|
+
/** Text action button (inline, small text) */
|
|
58
|
+
export declare const ACTION_BTN_TEXT = "ml-auto text-[length:var(--font-size-xs)] text-primary-600 bg-transparent border-none cursor-pointer hover:underline";
|
|
59
|
+
/** Id of the open sidebar panel / mobile sheet; the tab buttons point at it via aria-controls. */
|
|
60
|
+
export declare const SIDEBAR_PANEL_ID = "canvas-sidebar-panel";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Shared Tailwind class constants for canvas-editor sidebar components.
|
|
4
|
+
* Replaces SidebarPrimitives.css with composable string constants.
|
|
5
|
+
*/
|
|
6
|
+
export const CARD_GRID = 'grid grid-cols-[repeat(auto-fill,minmax(68px,1fr))] gap-2 w-full max-canvas-mobile:grid-cols-[repeat(auto-fill,minmax(44px,1fr))] max-canvas-mobile:gap-1';
|
|
7
|
+
/** iOS zoomt beim Fokus in Felder unter 16px — auf dem Handy daher mindestens text-base. */
|
|
8
|
+
export const MOBILE_INPUT_TEXT = 'max-canvas-mobile:text-base';
|
|
9
|
+
export const CARD_GRID_SINGLE_COL = 'grid grid-cols-1 gap-2 w-full';
|
|
10
|
+
/** Horizontal scroll container without a visible scrollbar */
|
|
11
|
+
export const HIDDEN_SCROLLBAR = '[scrollbar-width:none] [&::-webkit-scrollbar]:hidden [-webkit-overflow-scrolling:touch]';
|
|
12
|
+
export const SELECTABLE_CARD = 'aspect-square p-1.5 rounded-lg bg-transparent border border-transparent cursor-pointer transition-[background,border-color] duration-150 flex items-center justify-center hover:bg-hover-alt';
|
|
13
|
+
export const SELECTABLE_CARD_ACTIVE = 'border-accent bg-background-alt';
|
|
14
|
+
export const SELECTABLE_CARD_WITH_LABEL = 'aspect-square p-1.5 rounded-lg bg-transparent border border-transparent cursor-pointer transition-[background,border-color] duration-150 flex items-center justify-start gap-sm hover:bg-hover-alt';
|
|
15
|
+
export const SELECTABLE_CARD_WITH_TEXT = 'p-sm rounded-lg bg-transparent border border-transparent cursor-pointer transition-[background,border-color] duration-150 flex items-start justify-start gap-sm hover:bg-hover-alt';
|
|
16
|
+
export const SECTION_LABEL = 'text-xs font-semibold text-foreground uppercase tracking-wide mb-1';
|
|
17
|
+
export const CONTROL_GROUP = 'bg-[var(--card-background)] border border-[var(--card-border)] rounded-[var(--card-border-radius-small)] p-sm flex flex-col gap-xs';
|
|
18
|
+
export const CONTROL_GROUP_HEADER = 'flex items-center gap-xs';
|
|
19
|
+
export const CONTROL_GROUP_ICON = 'text-primary-600 shrink-0';
|
|
20
|
+
export const CONTROL_GROUP_LABEL = 'text-[length:var(--font-size-small)] font-semibold text-foreground';
|
|
21
|
+
export const SLIDER_ROW = 'flex items-center gap-sm';
|
|
22
|
+
export const SLIDER_ROW_WITH_BOUNDS = 'flex items-center gap-xs';
|
|
23
|
+
export const SLIDER_BOUND = 'text-[8px] text-[var(--font-color-secondary)] min-w-[40px] text-center';
|
|
24
|
+
export const SLIDER_VALUE = 'min-w-[48px] text-right text-[length:var(--font-size-small)] text-[var(--font-color-muted)] tabular-nums';
|
|
25
|
+
export const SLIDER_VALUE_BADGE = 'text-center font-medium text-primary-600 bg-background p-[var(--spacing-xxsmall)_var(--spacing-xsmall)] rounded min-w-[50px]';
|
|
26
|
+
export const SIDEBAR_HINT = 'm-0 p-sm bg-[var(--card-background)] border border-[var(--card-border)] rounded-[var(--card-border-radius-small)] text-[length:var(--font-size-xs)] text-[var(--font-color-muted)] leading-relaxed text-left';
|
|
27
|
+
export const RESET_BTN = 'flex items-center justify-center gap-xs py-xs px-sm bg-[var(--card-background)] border border-[var(--card-border)] rounded-[var(--card-border-radius-small)] text-[var(--font-color-secondary)] text-[length:var(--font-size-small)] cursor-pointer transition-[background-color,border-color,color] duration-150 hover:bg-background-alt hover:border-primary-600 hover:text-primary-600';
|
|
28
|
+
export const SIDEBAR_SECTION = 'flex flex-col gap-sm';
|
|
29
|
+
export const SIDEBAR_SECTION_FIELD = 'flex flex-col gap-xs';
|
|
30
|
+
export const SIDEBAR_SECTION_HINT = 'm-0 text-[0.65rem] text-[var(--font-color-secondary)]';
|
|
31
|
+
export const SIDEBAR_SECTION_EMPTY = 'm-0 p-lg text-center text-[0.7rem] text-[var(--font-color-secondary)]';
|
|
32
|
+
export const SECTION_TOGGLE = 'flex items-center gap-sm w-full bg-transparent border-none cursor-pointer py-sm px-0 text-foreground text-[length:var(--font-size-base)] font-semibold transition-colors duration-200 hover:text-[var(--interactive-accent-color)] [&>svg:last-child]:ml-auto [&>svg:last-child]:transition-transform [&>svg:last-child]:duration-200';
|
|
33
|
+
export const SECTION_TOGGLE_OPEN = '[&>svg:last-child]:rotate-180';
|
|
34
|
+
export const ALTERNATIVES_LIST = 'flex flex-wrap gap-xs py-sm';
|
|
35
|
+
export const ALTERNATIVE_ITEM = 'bg-background-alt border border-[var(--border-color)] rounded-full py-xs px-sm text-[length:var(--font-size-small)] cursor-pointer transition-all duration-200 max-w-full overflow-hidden text-ellipsis whitespace-nowrap hover:bg-hover-alt hover:border-[var(--interactive-accent-color)] hover:text-[var(--interactive-accent-color)]';
|
|
36
|
+
export const ALTERNATIVE_ITEM_ACTIVE = 'border-[var(--interactive-accent-color)] bg-background-alt text-[var(--interactive-accent-color)]';
|
|
37
|
+
export const FONT_SIZE_ROW = 'flex items-center gap-md py-sm';
|
|
38
|
+
export const FONT_SIZE_BUTTONS = 'flex gap-xs';
|
|
39
|
+
export const FONT_SIZE_BTN = 'w-8 h-8 flex items-center justify-center border border-[var(--border-color)] rounded-full bg-background text-foreground cursor-pointer transition-all duration-200 hover:bg-background-alt hover:border-primary-600 hover:text-primary-600 active:scale-95';
|
|
40
|
+
/** Preview container inside a selectable card (centered, fills parent) */
|
|
41
|
+
export const CARD_PREVIEW = 'relative w-full h-full flex items-center justify-center shrink-0';
|
|
42
|
+
/** Check badge overlaid on a card preview (small, bottom-right) */
|
|
43
|
+
export const CARD_CHECK_SMALL = 'absolute -bottom-[3px] -right-[3px] size-3.5 flex items-center justify-center bg-[var(--interactive-accent-color)] text-background rounded-full';
|
|
44
|
+
/** Check badge for list items (normal size, top-right-aligned) */
|
|
45
|
+
export const CARD_CHECK = 'size-[18px] flex items-center justify-center bg-[var(--interactive-accent-color)] text-background rounded-full shrink-0 self-start mt-0.5';
|
|
46
|
+
/** Label inside a card with text */
|
|
47
|
+
export const CARD_LABEL = 'text-[length:var(--font-size-small)] text-foreground flex-1 text-left';
|
|
48
|
+
/** Active state for selectable cards (border highlight) */
|
|
49
|
+
export const SELECTABLE_CARD_DISABLED = 'opacity-40 cursor-not-allowed';
|
|
50
|
+
/** Section header row (title + action buttons) */
|
|
51
|
+
export const SECTION_HEADER = 'flex items-center justify-between px-3 py-1.5';
|
|
52
|
+
/** Section title text */
|
|
53
|
+
export const SECTION_TITLE = 'flex-1 text-[11px] font-semibold text-[var(--font-color-secondary)] uppercase tracking-[0.8px]';
|
|
54
|
+
/** Small action button (icon-only) for section headers */
|
|
55
|
+
export const ACTION_BTN = 'size-7 flex items-center justify-center bg-transparent border-none rounded-md cursor-pointer text-[var(--text-secondary,#666)] transition-[background-color,color] duration-150 hover:bg-[var(--hover-background,#f0f0f0)] hover:text-foreground';
|
|
56
|
+
/** Danger variant of action button */
|
|
57
|
+
export const ACTION_BTN_DANGER = 'size-7 flex items-center justify-center bg-transparent border-none rounded-md cursor-pointer text-[var(--text-secondary,#666)] transition-[background-color,color] duration-150 hover:bg-red-50 hover:text-red-600';
|
|
58
|
+
/** Text action button (inline, small text) */
|
|
59
|
+
export const ACTION_BTN_TEXT = 'ml-auto text-[length:var(--font-size-xs)] text-primary-600 bg-transparent border-none cursor-pointer hover:underline';
|
|
60
|
+
/** Id of the open sidebar panel / mobile sheet; the tab buttons point at it via aria-controls. */
|
|
61
|
+
export const SIDEBAR_PANEL_ID = 'canvas-sidebar-panel';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IconType } from 'react-icons';
|
|
2
|
+
export { type BackgroundColorOption } from '@ggraphic/core';
|
|
3
|
+
/**
|
|
4
|
+
* The sidebar tab ids the editor itself knows.
|
|
5
|
+
*
|
|
6
|
+
* Unified tabs (used in heterogeneous multi-page):
|
|
7
|
+
* - 'text': Text editing section
|
|
8
|
+
* - 'elements': Decorative elements (icons, shapes, illustrations)
|
|
9
|
+
* - 'share': Export and sharing options
|
|
10
|
+
*
|
|
11
|
+
* Legacy tabs (template-specific, being migrated):
|
|
12
|
+
* - 'assets': Elements section (→ 'elements')
|
|
13
|
+
* - 'position': template-specific position controls
|
|
14
|
+
* - 'fontsize': Deprecated - merged into 'text'
|
|
15
|
+
*/
|
|
16
|
+
export type CoreSidebarTabId = 'text' | 'elements' | 'share' | 'uploads' | 'tools' | 'chat' | 'vorlagen' | 'layers' | 'effects' | 'fontsize' | 'assets' | 'position' | 'settings' | 'frame-settings' | 'chart-settings' | 'image-adjust' | 'design';
|
|
17
|
+
/**
|
|
18
|
+
* A sidebar tab id: one the editor knows, or one a host's config brings with
|
|
19
|
+
* its own section. `string & {}` keeps the core ids as completions.
|
|
20
|
+
*/
|
|
21
|
+
export type SidebarTabId = CoreSidebarTabId | (string & {});
|
|
22
|
+
export interface SidebarTab {
|
|
23
|
+
id: SidebarTabId;
|
|
24
|
+
icon: IconType;
|
|
25
|
+
label: string;
|
|
26
|
+
ariaLabel: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AdditionalText } from '@ggraphic/editor/configs/types';
|
|
2
|
+
import type { SidebarTab, SidebarTabId } from '@ggraphic/editor/sidebar/tabTypes';
|
|
3
|
+
export type { BackgroundColorOption, CoreSidebarTabId, SidebarTab, SidebarTabId, } from '@ggraphic/editor/sidebar/tabTypes';
|
|
4
|
+
export interface TextSectionProps {
|
|
5
|
+
quote: string;
|
|
6
|
+
name: string;
|
|
7
|
+
onQuoteChange: (quote: string) => void;
|
|
8
|
+
onNameChange: (name: string) => void;
|
|
9
|
+
onAddHeader?: () => void;
|
|
10
|
+
onAddText?: () => void;
|
|
11
|
+
additionalTexts?: AdditionalText[];
|
|
12
|
+
onUpdateAdditionalText?: (id: string, text: string) => void;
|
|
13
|
+
onRemoveAdditionalText?: (id: string) => void;
|
|
14
|
+
quoteFontSize?: number;
|
|
15
|
+
nameFontSize?: number;
|
|
16
|
+
onQuoteFontSizeChange?: (size: number) => void;
|
|
17
|
+
onNameFontSizeChange?: (size: number) => void;
|
|
18
|
+
onUpdateAdditionalTextFontSize?: (id: string, size: number) => void;
|
|
19
|
+
}
|
|
20
|
+
export type { StockImageAttribution } from '@ggraphic/editor/common/imageSourceTypes';
|
|
21
|
+
export interface ImageSectionProps {
|
|
22
|
+
scale: number;
|
|
23
|
+
onScaleChange: (scale: number) => void;
|
|
24
|
+
onReset: () => void;
|
|
25
|
+
}
|
|
26
|
+
export interface GradientSectionProps {
|
|
27
|
+
opacity: number;
|
|
28
|
+
onOpacityChange: (opacity: number) => void;
|
|
29
|
+
}
|
|
30
|
+
export type AutoSaveStatus = 'idle' | 'saving' | 'saved' | 'error';
|
|
31
|
+
export interface SidebarTabBarProps {
|
|
32
|
+
tabs: SidebarTab[];
|
|
33
|
+
activeTab: SidebarTabId | null;
|
|
34
|
+
onTabClick: (tabId: SidebarTabId) => void;
|
|
35
|
+
onExport?: () => void;
|
|
36
|
+
disabledTabs?: SidebarTabId[];
|
|
37
|
+
horizontal?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface SidebarPanelProps {
|
|
40
|
+
isOpen: boolean;
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
onClose?: () => void;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type CanvasUploadSource } from '@ggraphic/editor/hostServices';
|
|
2
|
+
export interface PlacedImage {
|
|
3
|
+
/** Durable, placeable URL for the uploaded file (null if none could be resolved). */
|
|
4
|
+
url: string | null;
|
|
5
|
+
/** Display name for the placed image. */
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Single upload-then-place flow shared by the generator tools and the Uploads
|
|
10
|
+
* tab. Uploads `file` with the given source, resolves a durable URL, and — when
|
|
11
|
+
* `onPlaceUrl` is wired — places it straight onto the canvas. Throws
|
|
12
|
+
* t.sidebar.uploadFailed when the upload fails so callers can surface it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useImagePlacement(onPlaceUrl?: (url: string, fileName: string) => void): {
|
|
15
|
+
place: (file: File, source: CanvasUploadSource) => Promise<PlacedImage>;
|
|
16
|
+
isUploading: boolean;
|
|
17
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
import { useCanvasEditorServices } from '@ggraphic/editor/CanvasEditorProvider';
|
|
3
|
+
import { plainImageUrls } from '@ggraphic/editor/hostServices';
|
|
4
|
+
import { useMessages } from '@ggraphic/editor/i18n/messages';
|
|
5
|
+
import { useUserUploads } from '@ggraphic/editor/sidebar/UserUploadsProvider';
|
|
6
|
+
import { useCallback } from 'react';
|
|
7
|
+
/**
|
|
8
|
+
* Single upload-then-place flow shared by the generator tools and the Uploads
|
|
9
|
+
* tab. Uploads `file` with the given source, resolves a durable URL, and — when
|
|
10
|
+
* `onPlaceUrl` is wired — places it straight onto the canvas. Throws
|
|
11
|
+
* t.sidebar.uploadFailed when the upload fails so callers can surface it.
|
|
12
|
+
*/
|
|
13
|
+
export function useImagePlacement(onPlaceUrl) {
|
|
14
|
+
const t = useMessages();
|
|
15
|
+
const { upload, isUploading } = useUserUploads();
|
|
16
|
+
const { imageUrls = plainImageUrls } = useCanvasEditorServices();
|
|
17
|
+
const place = useCallback(async (file, source) => {
|
|
18
|
+
const item = await upload(file, source);
|
|
19
|
+
if (!item)
|
|
20
|
+
throw new Error(t.sidebar.uploadFailed);
|
|
21
|
+
const name = item.originalFilename ?? item.title ?? file.name;
|
|
22
|
+
const url = imageUrls.placementUrl(item);
|
|
23
|
+
if (url && onPlaceUrl)
|
|
24
|
+
onPlaceUrl(url, name);
|
|
25
|
+
return { url, name };
|
|
26
|
+
}, [t, upload, onPlaceUrl, imageUrls]);
|
|
27
|
+
return { place, isUploading };
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AutoSaveStoreProvider — Scoped Zustand auto-save store distribution.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors {@link CanvasStoreProvider}: each Provider creates an independent
|
|
5
|
+
* {@link AutoSaveStoreApi} via useRef so the context value is stable. Without
|
|
6
|
+
* a Provider, hooks fall back to the default singleton store for backward
|
|
7
|
+
* compatibility with code paths that haven't been migrated yet.
|
|
8
|
+
*/
|
|
9
|
+
import type { AutoSaveStore, AutoSaveStoreApi } from './createAutoSaveStore.js';
|
|
10
|
+
import type { ReactNode } from 'react';
|
|
11
|
+
export declare function AutoSaveStoreProvider({ children, initialShareToken, }: {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
initialShareToken?: string | null;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Get the raw store API (for getState/subscribe outside React render).
|
|
17
|
+
* Returns the context-scoped store, or the default singleton if no Provider.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useAutoSaveStoreApi(): AutoSaveStoreApi;
|
|
20
|
+
/**
|
|
21
|
+
* Subscribe to a slice of the auto-save store via selector. Re-renders only
|
|
22
|
+
* when the selected value changes (strict equality).
|
|
23
|
+
*/
|
|
24
|
+
export declare function useAutoSaveStore<T>(selector: (state: AutoSaveStore) => T): T;
|
|
25
|
+
/**
|
|
26
|
+
* Subscribe to a derived object/array from the store via shallow comparison.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useAutoSaveStoreShallow<T>(selector: (state: AutoSaveStore) => T): T;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
/**
|
|
4
|
+
* AutoSaveStoreProvider — Scoped Zustand auto-save store distribution.
|
|
5
|
+
*
|
|
6
|
+
* Mirrors {@link CanvasStoreProvider}: each Provider creates an independent
|
|
7
|
+
* {@link AutoSaveStoreApi} via useRef so the context value is stable. Without
|
|
8
|
+
* a Provider, hooks fall back to the default singleton store for backward
|
|
9
|
+
* compatibility with code paths that haven't been migrated yet.
|
|
10
|
+
*/
|
|
11
|
+
import { createContext, useContext, useRef } from 'react';
|
|
12
|
+
import { useStore } from 'zustand';
|
|
13
|
+
import { useShallow } from 'zustand/shallow';
|
|
14
|
+
import { createAutoSaveStore, defaultAutoSaveStore } from './createAutoSaveStore.js';
|
|
15
|
+
const AutoSaveStoreContext = createContext(null);
|
|
16
|
+
export function AutoSaveStoreProvider({ children, initialShareToken, }) {
|
|
17
|
+
const storeRef = useRef(null);
|
|
18
|
+
if (!storeRef.current) {
|
|
19
|
+
storeRef.current = createAutoSaveStore({ initialShareToken });
|
|
20
|
+
}
|
|
21
|
+
return (_jsx(AutoSaveStoreContext.Provider, { value: storeRef.current, children: children }));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the raw store API (for getState/subscribe outside React render).
|
|
25
|
+
* Returns the context-scoped store, or the default singleton if no Provider.
|
|
26
|
+
*/
|
|
27
|
+
export function useAutoSaveStoreApi() {
|
|
28
|
+
const contextStore = useContext(AutoSaveStoreContext);
|
|
29
|
+
return contextStore ?? defaultAutoSaveStore;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Subscribe to a slice of the auto-save store via selector. Re-renders only
|
|
33
|
+
* when the selected value changes (strict equality).
|
|
34
|
+
*/
|
|
35
|
+
export function useAutoSaveStore(selector) {
|
|
36
|
+
const store = useAutoSaveStoreApi();
|
|
37
|
+
return useStore(store, selector);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Subscribe to a derived object/array from the store via shallow comparison.
|
|
41
|
+
*/
|
|
42
|
+
export function useAutoSaveStoreShallow(selector) {
|
|
43
|
+
const store = useAutoSaveStoreApi();
|
|
44
|
+
return useStore(store, useShallow(selector));
|
|
45
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CanvasStoreProvider — Scoped Zustand store distribution via React Context
|
|
3
|
+
*
|
|
4
|
+
* Each CanvasStoreProvider creates an independent store instance.
|
|
5
|
+
* The store reference is stable (useRef), so the context value never changes —
|
|
6
|
+
* this means zero context-triggered re-renders in the entire subtree.
|
|
7
|
+
*
|
|
8
|
+
* Components subscribe to state via useCanvasStoreSelector/useCanvasStoreShallow,
|
|
9
|
+
* which use Zustand's useStore() with selectors for granular re-render control.
|
|
10
|
+
*
|
|
11
|
+
* Without a provider, hooks fall back to the default singleton store
|
|
12
|
+
* for backward compatibility.
|
|
13
|
+
*/
|
|
14
|
+
import type { CanvasEditorStoreApi, CanvasEditorStoreState } from './createCanvasEditorStore.js';
|
|
15
|
+
import type { ReactNode } from 'react';
|
|
16
|
+
export declare function CanvasStoreProvider({ children, initialFormatId, }: {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
initialFormatId?: string;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Get the store API instance (for getState/setState outside React).
|
|
22
|
+
* Returns context-scoped store, or default singleton if no provider.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useCanvasStore(): CanvasEditorStoreApi;
|
|
25
|
+
/**
|
|
26
|
+
* Subscribe to a single value from the store via selector.
|
|
27
|
+
* Only re-renders when the selected value changes (strict equality).
|
|
28
|
+
*
|
|
29
|
+
* Use for primitive values: `useCanvasStoreSelector((s) => s.renderVersion)`
|
|
30
|
+
*/
|
|
31
|
+
export declare function useCanvasStoreSelector<T>(selector: (state: CanvasEditorStoreState) => T): T;
|
|
32
|
+
/**
|
|
33
|
+
* Subscribe to a derived object/array from the store via shallow comparison.
|
|
34
|
+
* Only re-renders when any top-level property of the selected object changes.
|
|
35
|
+
*
|
|
36
|
+
* Use for objects/arrays: `useCanvasStoreShallow((s) => ({ a: s.a, b: s.b }))`
|
|
37
|
+
*/
|
|
38
|
+
export declare function useCanvasStoreShallow<T>(selector: (state: CanvasEditorStoreState) => T): T;
|
|
39
|
+
/**
|
|
40
|
+
* Returns true if the given element is the currently selected canvas element.
|
|
41
|
+
* Uses strict equality on a boolean — only re-renders when selected status flips.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useIsElementSelected(id: string): boolean;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
/**
|
|
4
|
+
* CanvasStoreProvider — Scoped Zustand store distribution via React Context
|
|
5
|
+
*
|
|
6
|
+
* Each CanvasStoreProvider creates an independent store instance.
|
|
7
|
+
* The store reference is stable (useRef), so the context value never changes —
|
|
8
|
+
* this means zero context-triggered re-renders in the entire subtree.
|
|
9
|
+
*
|
|
10
|
+
* Components subscribe to state via useCanvasStoreSelector/useCanvasStoreShallow,
|
|
11
|
+
* which use Zustand's useStore() with selectors for granular re-render control.
|
|
12
|
+
*
|
|
13
|
+
* Without a provider, hooks fall back to the default singleton store
|
|
14
|
+
* for backward compatibility.
|
|
15
|
+
*/
|
|
16
|
+
import { createContext, useContext, useRef } from 'react';
|
|
17
|
+
import { useStore } from 'zustand';
|
|
18
|
+
import { useShallow } from 'zustand/shallow';
|
|
19
|
+
import { createCanvasEditorStore, defaultCanvasEditorStore } from './createCanvasEditorStore.js';
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// CONTEXT
|
|
22
|
+
// =============================================================================
|
|
23
|
+
const CanvasStoreContext = createContext(null);
|
|
24
|
+
// =============================================================================
|
|
25
|
+
// PROVIDER
|
|
26
|
+
// =============================================================================
|
|
27
|
+
export function CanvasStoreProvider({ children, initialFormatId, }) {
|
|
28
|
+
const storeRef = useRef(null);
|
|
29
|
+
if (!storeRef.current) {
|
|
30
|
+
storeRef.current = createCanvasEditorStore();
|
|
31
|
+
if (initialFormatId) {
|
|
32
|
+
storeRef.current.getState().setFormat(initialFormatId);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return (_jsx(CanvasStoreContext.Provider, { value: storeRef.current, children: children }));
|
|
36
|
+
}
|
|
37
|
+
// =============================================================================
|
|
38
|
+
// HOOKS
|
|
39
|
+
// =============================================================================
|
|
40
|
+
/**
|
|
41
|
+
* Get the store API instance (for getState/setState outside React).
|
|
42
|
+
* Returns context-scoped store, or default singleton if no provider.
|
|
43
|
+
*/
|
|
44
|
+
export function useCanvasStore() {
|
|
45
|
+
const contextStore = useContext(CanvasStoreContext);
|
|
46
|
+
return contextStore ?? defaultCanvasEditorStore;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Subscribe to a single value from the store via selector.
|
|
50
|
+
* Only re-renders when the selected value changes (strict equality).
|
|
51
|
+
*
|
|
52
|
+
* Use for primitive values: `useCanvasStoreSelector((s) => s.renderVersion)`
|
|
53
|
+
*/
|
|
54
|
+
export function useCanvasStoreSelector(selector) {
|
|
55
|
+
const store = useCanvasStore();
|
|
56
|
+
return useStore(store, selector);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Subscribe to a derived object/array from the store via shallow comparison.
|
|
60
|
+
* Only re-renders when any top-level property of the selected object changes.
|
|
61
|
+
*
|
|
62
|
+
* Use for objects/arrays: `useCanvasStoreShallow((s) => ({ a: s.a, b: s.b }))`
|
|
63
|
+
*/
|
|
64
|
+
export function useCanvasStoreShallow(selector) {
|
|
65
|
+
const store = useCanvasStore();
|
|
66
|
+
return useStore(store, useShallow(selector));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Returns true if the given element is the currently selected canvas element.
|
|
70
|
+
* Uses strict equality on a boolean — only re-renders when selected status flips.
|
|
71
|
+
*/
|
|
72
|
+
export function useIsElementSelected(id) {
|
|
73
|
+
return useCanvasStoreSelector((s) => s.selectedElement === id);
|
|
74
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createAutoSaveStore — Vanilla Zustand store factory for canvas auto-save state.
|
|
3
|
+
*
|
|
4
|
+
* Each editor instance gets its own store via {@link AutoSaveStoreProvider}.
|
|
5
|
+
* The shareToken, status, and last-image dedup all scope to the instance,
|
|
6
|
+
* so opening a different canvas can't write into the previous canvas's record.
|
|
7
|
+
*/
|
|
8
|
+
export type AutoSaveStatus = 'idle' | 'saving' | 'saved' | 'error';
|
|
9
|
+
export interface AutoSaveState {
|
|
10
|
+
autoSaveStatus: AutoSaveStatus;
|
|
11
|
+
autoSavedShareToken: string | null;
|
|
12
|
+
lastAutoSavedImageSrc: string | null;
|
|
13
|
+
/** True while there are edits that have not been persisted yet. */
|
|
14
|
+
isDirty: boolean;
|
|
15
|
+
/** Re-runs the last auto-save attempt. Registered by useCanvasAutoSave. */
|
|
16
|
+
retryAutoSave: (() => void) | null;
|
|
17
|
+
/**
|
|
18
|
+
* Alt text the person typed for the exported image; `null` = follow the
|
|
19
|
+
* canvas-text suggestion. Session-only, shared by sidebar and top-bar share.
|
|
20
|
+
*/
|
|
21
|
+
shareAltText: string | null;
|
|
22
|
+
/** Whether the alt text goes into the shared post text; off unless ticked. */
|
|
23
|
+
shareAltTextInCaption: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface AutoSaveActions {
|
|
26
|
+
setAutoSaveStatus: (status: AutoSaveStatus) => void;
|
|
27
|
+
setAutoSavedShareToken: (token: string | null) => void;
|
|
28
|
+
setLastAutoSavedImageSrc: (src: string | null) => void;
|
|
29
|
+
setDirty: (dirty: boolean) => void;
|
|
30
|
+
setRetryAutoSave: (retry: (() => void) | null) => void;
|
|
31
|
+
setShareAltText: (text: string | null) => void;
|
|
32
|
+
setShareAltTextInCaption: (include: boolean) => void;
|
|
33
|
+
clearAutoSaveState: () => void;
|
|
34
|
+
}
|
|
35
|
+
export type AutoSaveStore = AutoSaveState & AutoSaveActions;
|
|
36
|
+
export interface CreateAutoSaveStoreOptions {
|
|
37
|
+
/**
|
|
38
|
+
* Seed the per-instance store with a known share token, e.g. from the URL
|
|
39
|
+
* when the editor is opened against an existing share. Without this seed,
|
|
40
|
+
* the first save after a reload creates a new draft instead of updating.
|
|
41
|
+
*/
|
|
42
|
+
initialShareToken?: string | null;
|
|
43
|
+
}
|
|
44
|
+
export declare function createAutoSaveStore(options?: CreateAutoSaveStoreOptions): import("zustand").StoreApi<AutoSaveStore>;
|
|
45
|
+
export type AutoSaveStoreApi = ReturnType<typeof createAutoSaveStore>;
|
|
46
|
+
/**
|
|
47
|
+
* Default singleton retained for code paths that mount canvas-editor primitives
|
|
48
|
+
* without an {@link AutoSaveStoreProvider}. New code should prefer the Provider.
|
|
49
|
+
*/
|
|
50
|
+
export declare const defaultAutoSaveStore: import("zustand").StoreApi<AutoSaveStore>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
/**
|
|
3
|
+
* createAutoSaveStore — Vanilla Zustand store factory for canvas auto-save state.
|
|
4
|
+
*
|
|
5
|
+
* Each editor instance gets its own store via {@link AutoSaveStoreProvider}.
|
|
6
|
+
* The shareToken, status, and last-image dedup all scope to the instance,
|
|
7
|
+
* so opening a different canvas can't write into the previous canvas's record.
|
|
8
|
+
*/
|
|
9
|
+
import { createStore } from 'zustand/vanilla';
|
|
10
|
+
export function createAutoSaveStore(options = {}) {
|
|
11
|
+
const initialShareToken = options.initialShareToken ?? null;
|
|
12
|
+
return createStore()((set) => ({
|
|
13
|
+
autoSaveStatus: 'idle',
|
|
14
|
+
autoSavedShareToken: initialShareToken,
|
|
15
|
+
lastAutoSavedImageSrc: null,
|
|
16
|
+
isDirty: false,
|
|
17
|
+
retryAutoSave: null,
|
|
18
|
+
shareAltText: null,
|
|
19
|
+
shareAltTextInCaption: false,
|
|
20
|
+
setAutoSaveStatus: (status) => set({ autoSaveStatus: status }),
|
|
21
|
+
setAutoSavedShareToken: (token) => set({ autoSavedShareToken: token }),
|
|
22
|
+
setLastAutoSavedImageSrc: (src) => set({ lastAutoSavedImageSrc: src }),
|
|
23
|
+
setDirty: (dirty) => set({ isDirty: dirty }),
|
|
24
|
+
setRetryAutoSave: (retry) => set({ retryAutoSave: retry }),
|
|
25
|
+
setShareAltText: (text) => set({ shareAltText: text }),
|
|
26
|
+
setShareAltTextInCaption: (include) => set({ shareAltTextInCaption: include }),
|
|
27
|
+
clearAutoSaveState: () => set({
|
|
28
|
+
autoSaveStatus: 'idle',
|
|
29
|
+
autoSavedShareToken: null,
|
|
30
|
+
lastAutoSavedImageSrc: null,
|
|
31
|
+
isDirty: false,
|
|
32
|
+
retryAutoSave: null,
|
|
33
|
+
shareAltText: null,
|
|
34
|
+
shareAltTextInCaption: false,
|
|
35
|
+
}),
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Default singleton retained for code paths that mount canvas-editor primitives
|
|
40
|
+
* without an {@link AutoSaveStoreProvider}. New code should prefer the Provider.
|
|
41
|
+
*/
|
|
42
|
+
export const defaultAutoSaveStore = createAutoSaveStore();
|