@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,31 @@
|
|
|
1
|
+
/** Greedy word wrap; a single over-long word keeps its own line. */
|
|
2
|
+
export declare function wrapWords(text: string, width: number, measureLine: (line: string) => number): string[];
|
|
3
|
+
/**
|
|
4
|
+
* Same line count as a greedy wrap, but at the narrowest width that keeps it —
|
|
5
|
+
* so a box never ends on a lone word ("Mutter. Jeden / Tag.").
|
|
6
|
+
*/
|
|
7
|
+
export declare function balancedWrap(text: string, width: number, measureLine: (line: string) => number): string[];
|
|
8
|
+
/**
|
|
9
|
+
* Largest size <= `size` at which every word of `texts` (plus `indent`) fits
|
|
10
|
+
* `width` — the editor's wrap breaks a word that does not fit mid-letter.
|
|
11
|
+
* Measured bold, the widest face a mark can switch to.
|
|
12
|
+
*/
|
|
13
|
+
export declare function largestSizeWordsFit(texts: string[], size: number, width: number, indent: number, measureWord: (word: string, size: number) => number, minSize?: number): number;
|
|
14
|
+
/** Distance between Störer lines, as a share of the font size. */
|
|
15
|
+
export declare const STOERER_LINE_STEP = 1.1;
|
|
16
|
+
/** Largest Störer type as a share of the radius (88 px at 125). */
|
|
17
|
+
export declare const STOERER_MAX_SIZE_SHARE = 0.7;
|
|
18
|
+
/** Smallest Störer type that still reads at feed size (on 1080 px). */
|
|
19
|
+
export declare const STOERER_MIN_READABLE = 32;
|
|
20
|
+
/** DE Störer sizes, largest first; the largest holds any 28-character text. */
|
|
21
|
+
export declare const STOERER_RADII: number[];
|
|
22
|
+
/**
|
|
23
|
+
* DE Störer text: the largest size at which some wrap of the text fits,
|
|
24
|
+
* corner to corner, inside 90 % of the circle. Each line counts as a box
|
|
25
|
+
* `size` high, centred on its offset — taller than the glyphs, so the margin
|
|
26
|
+
* only grows.
|
|
27
|
+
*/
|
|
28
|
+
export declare function fitStoererText(text: string, radius: number, measureLine: (line: string, size: number) => number, maxSize: number, minSize?: number): {
|
|
29
|
+
lines: string[];
|
|
30
|
+
size: number;
|
|
31
|
+
} | null;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
/** Greedy word wrap; a single over-long word keeps its own line. */
|
|
3
|
+
export function wrapWords(text, width, measureLine) {
|
|
4
|
+
const lines = [];
|
|
5
|
+
for (const paragraph of text.split('\n')) {
|
|
6
|
+
let current = '';
|
|
7
|
+
for (const word of paragraph.split(/\s+/).filter(Boolean)) {
|
|
8
|
+
const candidate = current ? `${current} ${word}` : word;
|
|
9
|
+
if (current && measureLine(candidate) > width) {
|
|
10
|
+
lines.push(current);
|
|
11
|
+
current = word;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
current = candidate;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (current)
|
|
18
|
+
lines.push(current);
|
|
19
|
+
}
|
|
20
|
+
return lines;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Same line count as a greedy wrap, but at the narrowest width that keeps it —
|
|
24
|
+
* so a box never ends on a lone word ("Mutter. Jeden / Tag.").
|
|
25
|
+
*/
|
|
26
|
+
export function balancedWrap(text, width, measureLine) {
|
|
27
|
+
const lines = wrapWords(text, width, measureLine);
|
|
28
|
+
if (lines.length < 2)
|
|
29
|
+
return lines;
|
|
30
|
+
let low = 0;
|
|
31
|
+
let high = width;
|
|
32
|
+
for (let step = 0; step < 12; step++) {
|
|
33
|
+
const mid = (low + high) / 2;
|
|
34
|
+
if (wrapWords(text, mid, measureLine).length > lines.length)
|
|
35
|
+
low = mid;
|
|
36
|
+
else
|
|
37
|
+
high = mid;
|
|
38
|
+
}
|
|
39
|
+
return wrapWords(text, high, measureLine);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Largest size <= `size` at which every word of `texts` (plus `indent`) fits
|
|
43
|
+
* `width` — the editor's wrap breaks a word that does not fit mid-letter.
|
|
44
|
+
* Measured bold, the widest face a mark can switch to.
|
|
45
|
+
*/
|
|
46
|
+
export function largestSizeWordsFit(texts, size, width, indent, measureWord, minSize = 24) {
|
|
47
|
+
const words = texts
|
|
48
|
+
.join(' ')
|
|
49
|
+
.replace(/\*\*|__|==|\+\+|\*/g, '')
|
|
50
|
+
.split(/\s+/)
|
|
51
|
+
.filter(Boolean);
|
|
52
|
+
let fitted = size;
|
|
53
|
+
while (fitted > minSize && words.some((w) => indent + measureWord(w, fitted) > width))
|
|
54
|
+
fitted--;
|
|
55
|
+
return fitted;
|
|
56
|
+
}
|
|
57
|
+
/** Distance between Störer lines, as a share of the font size. */
|
|
58
|
+
export const STOERER_LINE_STEP = 1.1;
|
|
59
|
+
/** The DE design guide keeps 10 % of the Störer free around its text. */
|
|
60
|
+
const STOERER_TEXT_SHARE = 0.9;
|
|
61
|
+
/** Largest Störer type as a share of the radius (88 px at 125). */
|
|
62
|
+
export const STOERER_MAX_SIZE_SHARE = 0.7;
|
|
63
|
+
/** Smallest Störer type that still reads at feed size (on 1080 px). */
|
|
64
|
+
export const STOERER_MIN_READABLE = 32;
|
|
65
|
+
/** DE Störer sizes, largest first; the largest holds any 28-character text. */
|
|
66
|
+
export const STOERER_RADII = [175, 165, 155, 145, 135, 125, 115, 105, 95];
|
|
67
|
+
/**
|
|
68
|
+
* DE Störer text: the largest size at which some wrap of the text fits,
|
|
69
|
+
* corner to corner, inside 90 % of the circle. Each line counts as a box
|
|
70
|
+
* `size` high, centred on its offset — taller than the glyphs, so the margin
|
|
71
|
+
* only grows.
|
|
72
|
+
*/
|
|
73
|
+
export function fitStoererText(text, radius, measureLine, maxSize, minSize = 20) {
|
|
74
|
+
const inner = radius * STOERER_TEXT_SHARE;
|
|
75
|
+
const fits = (lines, size) => lines.every((line, i) => {
|
|
76
|
+
const edge = Math.abs((i - (lines.length - 1) / 2) * size * STOERER_LINE_STEP) + size / 2;
|
|
77
|
+
return (measureLine(line, size) / 2) ** 2 + edge ** 2 <= inner ** 2;
|
|
78
|
+
});
|
|
79
|
+
for (let size = maxSize; size >= minSize; size--) {
|
|
80
|
+
const measureAt = (l) => measureLine(l, size);
|
|
81
|
+
// Narrower wraps trade width for lines; the circle has room for either.
|
|
82
|
+
for (let width = 2 * inner; width >= size; width -= 10) {
|
|
83
|
+
const lines = balancedWrap(text, width, measureAt);
|
|
84
|
+
if (fits(lines, size))
|
|
85
|
+
return { lines, size };
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
import { messages } from '@ggraphic/editor/i18n/messages';
|
|
3
|
+
const FIELD_KEYS = [
|
|
4
|
+
'quote',
|
|
5
|
+
'name',
|
|
6
|
+
'header',
|
|
7
|
+
'subheader',
|
|
8
|
+
'body',
|
|
9
|
+
'eventTitle',
|
|
10
|
+
'weekday',
|
|
11
|
+
'date',
|
|
12
|
+
'time',
|
|
13
|
+
'locationName',
|
|
14
|
+
'address',
|
|
15
|
+
'line1',
|
|
16
|
+
'line2',
|
|
17
|
+
'line3',
|
|
18
|
+
'headline',
|
|
19
|
+
'title',
|
|
20
|
+
];
|
|
21
|
+
function asString(value) {
|
|
22
|
+
if (typeof value !== 'string')
|
|
23
|
+
return null;
|
|
24
|
+
const trimmed = value.trim();
|
|
25
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Builds a structured text description in the active language of the current canvas content.
|
|
29
|
+
* Used by ChatSection to inject the sharepic content into the chat composer.
|
|
30
|
+
*/
|
|
31
|
+
export function buildSharepicText(state) {
|
|
32
|
+
const lines = [];
|
|
33
|
+
const t = messages().sharepicText;
|
|
34
|
+
const canvasType = asString(state.canvasType);
|
|
35
|
+
if (canvasType) {
|
|
36
|
+
lines.push(t.type(canvasType));
|
|
37
|
+
}
|
|
38
|
+
for (const key of FIELD_KEYS) {
|
|
39
|
+
const label = t.labels[key];
|
|
40
|
+
const value = asString(state[key]);
|
|
41
|
+
if (value) {
|
|
42
|
+
lines.push(`${label}: ${value}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const additional = state.additionalTexts;
|
|
46
|
+
if (Array.isArray(additional) && additional.length > 0) {
|
|
47
|
+
const additionalStrings = additional
|
|
48
|
+
.map((entry) => asString(entry.text))
|
|
49
|
+
.filter((value) => value !== null);
|
|
50
|
+
if (additionalStrings.length > 0) {
|
|
51
|
+
lines.push(t.more(additionalStrings.join(' / ')));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (lines.length === 0) {
|
|
55
|
+
return t.empty;
|
|
56
|
+
}
|
|
57
|
+
return lines.join('\n');
|
|
58
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic Canvas Config Loader
|
|
3
|
+
*
|
|
4
|
+
* Loads canvas configurations on demand instead of statically importing all configs.
|
|
5
|
+
* This reduces the initial ControllableCanvasWrapper bundle from ~2.3 MB to ~800 KB.
|
|
6
|
+
*
|
|
7
|
+
* Previously, all 6 canvas configs were imported statically in ControllableCanvasWrapper.tsx,
|
|
8
|
+
* which meant every config and its dependencies (sidebar sections, illustrations, etc.)
|
|
9
|
+
* were bundled together even if only one canvas type was used.
|
|
10
|
+
*
|
|
11
|
+
* Now, configs are loaded dynamically based on the canvas type being used.
|
|
12
|
+
*/
|
|
13
|
+
import { type TemplateId } from '@ggraphic/editor/templates/registry';
|
|
14
|
+
import type { AnyCanvasConfig } from './types.js';
|
|
15
|
+
/**
|
|
16
|
+
* Load a registered canvas configuration dynamically based on type. Each
|
|
17
|
+
* template's loader lives in its registry entry; the host registers its
|
|
18
|
+
* catalogue before the first lookup.
|
|
19
|
+
* @param type - The canvas type to load
|
|
20
|
+
* @param formatId - The canvas's format; only freeform lays out on it, every
|
|
21
|
+
* other template keeps its own 4:5 sheet
|
|
22
|
+
* @returns Promise resolving to the canvas configuration
|
|
23
|
+
*/
|
|
24
|
+
export declare function loadCanvasConfig(type: TemplateId, formatId?: string): Promise<AnyCanvasConfig>;
|
|
25
|
+
/**
|
|
26
|
+
* Fetch a template's config chunk and request its fonts before the editor
|
|
27
|
+
* mounts. The canvas type is known as soon as the canvas document arrives,
|
|
28
|
+
* while `useFontLoader` only asks once the first page has rendered — by then
|
|
29
|
+
* the first paint has used the fallback face and has to re-lay out.
|
|
30
|
+
*
|
|
31
|
+
* Best effort: `useFontLoader` still owns the gate, this only gets the
|
|
32
|
+
* requests going earlier.
|
|
33
|
+
*/
|
|
34
|
+
export declare function preloadCanvasTemplate(type: string, formatId?: string): Promise<void>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Dynamic Canvas Config Loader
|
|
4
|
+
*
|
|
5
|
+
* Loads canvas configurations on demand instead of statically importing all configs.
|
|
6
|
+
* This reduces the initial ControllableCanvasWrapper bundle from ~2.3 MB to ~800 KB.
|
|
7
|
+
*
|
|
8
|
+
* Previously, all 6 canvas configs were imported statically in ControllableCanvasWrapper.tsx,
|
|
9
|
+
* which meant every config and its dependencies (sidebar sections, illustrations, etc.)
|
|
10
|
+
* were bundled together even if only one canvas type was used.
|
|
11
|
+
*
|
|
12
|
+
* Now, configs are loaded dynamically based on the canvas type being used.
|
|
13
|
+
*/
|
|
14
|
+
import { styledFontSpecs } from '@ggraphic/editor/hooks/useFontLoader';
|
|
15
|
+
import { getTemplate } from '@ggraphic/editor/templates/registry';
|
|
16
|
+
import { canvasFontFamilies } from '../utils/canvasFontFamilies.js';
|
|
17
|
+
/**
|
|
18
|
+
* Load a registered canvas configuration dynamically based on type. Each
|
|
19
|
+
* template's loader lives in its registry entry; the host registers its
|
|
20
|
+
* catalogue before the first lookup.
|
|
21
|
+
* @param type - The canvas type to load
|
|
22
|
+
* @param formatId - The canvas's format; only freeform lays out on it, every
|
|
23
|
+
* other template keeps its own 4:5 sheet
|
|
24
|
+
* @returns Promise resolving to the canvas configuration
|
|
25
|
+
*/
|
|
26
|
+
export async function loadCanvasConfig(type, formatId) {
|
|
27
|
+
const template = getTemplate(type);
|
|
28
|
+
if (!template)
|
|
29
|
+
throw new Error(`loadCanvasConfig: unknown canvas type ${type}`);
|
|
30
|
+
// Boundary cast: the registry holds every template's config untyped.
|
|
31
|
+
return (await template.load(formatId));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Fetch a template's config chunk and request its fonts before the editor
|
|
35
|
+
* mounts. The canvas type is known as soon as the canvas document arrives,
|
|
36
|
+
* while `useFontLoader` only asks once the first page has rendered — by then
|
|
37
|
+
* the first paint has used the fallback face and has to re-lay out.
|
|
38
|
+
*
|
|
39
|
+
* Best effort: `useFontLoader` still owns the gate, this only gets the
|
|
40
|
+
* requests going earlier.
|
|
41
|
+
*/
|
|
42
|
+
export async function preloadCanvasTemplate(type, formatId) {
|
|
43
|
+
if (getTemplate(type) === undefined || typeof document === 'undefined' || !document.fonts)
|
|
44
|
+
return;
|
|
45
|
+
try {
|
|
46
|
+
const config = await loadCanvasConfig(type, formatId);
|
|
47
|
+
if (config.fonts?.requireFontLoad === false)
|
|
48
|
+
return;
|
|
49
|
+
const families = canvasFontFamilies(config);
|
|
50
|
+
const fontSize = config.fonts?.fontSize ?? 60;
|
|
51
|
+
const specs = [
|
|
52
|
+
...families.map((family) => `${fontSize}px ${family}`),
|
|
53
|
+
...styledFontSpecs(families, fontSize),
|
|
54
|
+
];
|
|
55
|
+
await Promise.all(specs.map((spec) => document.fonts.load(spec).catch(() => undefined)));
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
// The editor loads the config itself and reports a failure there.
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common Action Creators for Canvas Factory
|
|
3
|
+
*
|
|
4
|
+
* Reusable action creator functions that work with any canvas state.
|
|
5
|
+
* These eliminate the need to duplicate action logic across configs.
|
|
6
|
+
*/
|
|
7
|
+
import { type BrandPack } from '@ggraphic/core';
|
|
8
|
+
import { type ChartInstance, type ChartType } from '@ggraphic/editor/utils/chartUtils';
|
|
9
|
+
import type { IconState, BaseCanvasState } from '@ggraphic/editor/configs/factory/baseTypes';
|
|
10
|
+
import type { AdditionalText } from '@ggraphic/editor/configs/types';
|
|
11
|
+
import type { AssetInstance } from '@ggraphic/editor/utils/canvasAssets';
|
|
12
|
+
import type { CircleBadgeInstance } from '@ggraphic/editor/utils/circleBadgeUtils';
|
|
13
|
+
import type { ExternalIconPayload } from '@ggraphic/editor/utils/externalIcons';
|
|
14
|
+
import type { FrameClipType, FrameInstance } from '@ggraphic/editor/utils/frameUtils';
|
|
15
|
+
import type { IllustrationInstance } from '@ggraphic/editor/utils/illustrations/types';
|
|
16
|
+
import type { PillBadgeInstance } from '@ggraphic/editor/utils/pillBadgeUtils';
|
|
17
|
+
import type { ShapeInstance, ShapeType } from '@ggraphic/editor/utils/shapes';
|
|
18
|
+
import type { ElementPlacement, ImageAdjustments, UserImageInstance, UserImagePlacement } from '@ggraphic/editor/utils/userImageUtils';
|
|
19
|
+
import type { StickerRef } from '@ggraphic/schema';
|
|
20
|
+
type StateSetter<TState> = (partial: Partial<TState> | ((prev: TState) => TState)) => void;
|
|
21
|
+
type HistorySaver<TState> = (state: TState) => void;
|
|
22
|
+
export declare function createAssetActions<TState extends {
|
|
23
|
+
assetInstances: AssetInstance[];
|
|
24
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>, canvasWidth: number, canvasHeight: number, insertScale?: number): {
|
|
25
|
+
addAsset: (assetId: string, options?: ElementPlacement) => void;
|
|
26
|
+
addStickerAsset: (ref: StickerRef, options?: ElementPlacement) => void;
|
|
27
|
+
updateAsset: (id: string, partial: Partial<AssetInstance>) => void;
|
|
28
|
+
removeAsset: (id: string) => void;
|
|
29
|
+
};
|
|
30
|
+
export interface IconActionsConfig {
|
|
31
|
+
defaultColor?: string;
|
|
32
|
+
defaultOpacity?: number;
|
|
33
|
+
/** Startgröße neuer Icons (`insertScaleFor`); 1 auf Sharepics. */
|
|
34
|
+
defaultScale?: number;
|
|
35
|
+
}
|
|
36
|
+
export declare function createIconActions<TState extends {
|
|
37
|
+
selectedIcons: string[];
|
|
38
|
+
iconStates: Record<string, IconState>;
|
|
39
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>, canvasWidth: number, canvasHeight: number, config?: IconActionsConfig): {
|
|
40
|
+
toggleIcon: (id: string, selected: boolean, options?: ElementPlacement, external?: ExternalIconPayload) => void;
|
|
41
|
+
updateIcon: (id: string, partial: Partial<IconState>) => void;
|
|
42
|
+
handleIconDragEnd: (id: string, x: number, y: number) => void;
|
|
43
|
+
};
|
|
44
|
+
export declare function createShapeActions<TState extends {
|
|
45
|
+
shapeInstances: ShapeInstance[];
|
|
46
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>, canvasWidth: number, canvasHeight: number,
|
|
47
|
+
/** The fill of a shape that names none; absent: the first colour of `brand`. */
|
|
48
|
+
defaultColor?: string, insertScale?: number,
|
|
49
|
+
/** The pack of the page's document; the active brand by default. */
|
|
50
|
+
brand?: BrandPack): {
|
|
51
|
+
addShape: (type: ShapeType, color?: string, options?: ElementPlacement) => void;
|
|
52
|
+
updateShape: (id: string, partial: Partial<ShapeInstance>) => void;
|
|
53
|
+
removeShape: (id: string) => void;
|
|
54
|
+
};
|
|
55
|
+
export declare function createIllustrationActions<TState extends {
|
|
56
|
+
illustrationInstances: IllustrationInstance[];
|
|
57
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>, canvasWidth: number, canvasHeight: number,
|
|
58
|
+
/** The pack of the page's document; the active brand by default. */
|
|
59
|
+
brand?: BrandPack): {
|
|
60
|
+
addIllustration: (id: string, options?: ElementPlacement) => void;
|
|
61
|
+
updateIllustration: (id: string, partial: Partial<IllustrationInstance>) => void;
|
|
62
|
+
removeIllustration: (id: string) => void;
|
|
63
|
+
duplicateIllustration: (illustrationId: string) => void;
|
|
64
|
+
handleIllustrationDragEnd: (illustrationId: string, x: number, y: number) => void;
|
|
65
|
+
handleIllustrationTransformEnd: (illustrationId: string, width: number, height: number, rotation?: number) => void;
|
|
66
|
+
};
|
|
67
|
+
export declare function createAdditionalTextActions<TState extends {
|
|
68
|
+
additionalTexts: AdditionalText[];
|
|
69
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>, canvasWidth: number, canvasHeight: number, fontColor?: string, insertScale?: number,
|
|
70
|
+
/** The pack of the page's document; the active brand by default. */
|
|
71
|
+
brand?: BrandPack): {
|
|
72
|
+
addHeader: () => void;
|
|
73
|
+
addSubheader: () => void;
|
|
74
|
+
addText: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Add a body text with explicit content. Used by AI-suggestion appliers
|
|
77
|
+
* that need to emit a finished text element rather than a placeholder.
|
|
78
|
+
*/
|
|
79
|
+
addBodyTextWithContent: (content: string) => void;
|
|
80
|
+
updateAdditionalText: (id: string, partial: Partial<AdditionalText>) => void;
|
|
81
|
+
removeAdditionalText: (id: string) => void;
|
|
82
|
+
};
|
|
83
|
+
export declare function createPillBadgeActions<TState extends {
|
|
84
|
+
pillBadgeInstances: PillBadgeInstance[];
|
|
85
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>,
|
|
86
|
+
/** The pack of the page's document; the active brand by default. */
|
|
87
|
+
brand?: BrandPack): {
|
|
88
|
+
addPillBadge: (preset?: string) => void;
|
|
89
|
+
updatePillBadge: (id: string, partial: Partial<PillBadgeInstance>) => void;
|
|
90
|
+
removePillBadge: (id: string) => void;
|
|
91
|
+
};
|
|
92
|
+
export declare function createCircleBadgeActions<TState extends {
|
|
93
|
+
circleBadgeInstances: CircleBadgeInstance[];
|
|
94
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>,
|
|
95
|
+
/** The pack of the page's document; the active brand by default. */
|
|
96
|
+
brand?: BrandPack): {
|
|
97
|
+
addCircleBadge: (preset?: string) => void;
|
|
98
|
+
updateCircleBadge: (id: string, partial: Partial<CircleBadgeInstance>) => void;
|
|
99
|
+
removeCircleBadge: (id: string) => void;
|
|
100
|
+
};
|
|
101
|
+
export declare function createChartActions<TState extends {
|
|
102
|
+
chartInstances: ChartInstance[];
|
|
103
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>, canvasWidth: number, canvasHeight: number,
|
|
104
|
+
/** Series colours of a new chart; absent: the `chart` of `brand`. */
|
|
105
|
+
chartColors?: readonly string[], insertScale?: number,
|
|
106
|
+
/** The pack of the page's document; the active brand by default. */
|
|
107
|
+
brand?: BrandPack): {
|
|
108
|
+
addChart: (chartType: ChartType, options?: ElementPlacement) => void;
|
|
109
|
+
updateChart: (id: string, partial: Partial<ChartInstance>) => void;
|
|
110
|
+
removeChart: (id: string) => void;
|
|
111
|
+
};
|
|
112
|
+
export declare function createFrameActions<TState extends {
|
|
113
|
+
frameInstances: FrameInstance[];
|
|
114
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>, canvasWidth: number, canvasHeight: number,
|
|
115
|
+
/** The pack of the page's document; the active brand by default. */
|
|
116
|
+
brand?: BrandPack): {
|
|
117
|
+
addFrame: (clipType: FrameClipType, options?: ElementPlacement) => void;
|
|
118
|
+
updateFrame: (id: string, partial: Partial<FrameInstance>) => void;
|
|
119
|
+
removeFrame: (id: string) => void;
|
|
120
|
+
setFrameImage: (id: string, _file: File, objectUrl: string) => void;
|
|
121
|
+
};
|
|
122
|
+
export declare function createUserImageActions<TState extends {
|
|
123
|
+
userImageInstances: UserImageInstance[];
|
|
124
|
+
}>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>, canvasWidth: number, canvasHeight: number): {
|
|
125
|
+
addUserImage: (file: File, objectUrl: string) => void;
|
|
126
|
+
addUserImageFromUrl: (url: string, fileName: string, options?: UserImagePlacement) => void;
|
|
127
|
+
/**
|
|
128
|
+
* Place a freshly-picked file instantly via a local blob preview (dimensions
|
|
129
|
+
* read locally, no network) and return the new instance id. The caller
|
|
130
|
+
* uploads in the background and calls `updateUserImage(id, { src })` to swap
|
|
131
|
+
* the blob for the durable URL — mirrors the optimistic background path.
|
|
132
|
+
*/
|
|
133
|
+
placeUserImageFromFile: (file: File) => Promise<string>;
|
|
134
|
+
updateUserImage: (id: string, partial: Partial<UserImageInstance>) => void;
|
|
135
|
+
/** The template background photo's "Bearbeiten" look; merges like `updateUserImage`. */
|
|
136
|
+
updateBackgroundImageAdjustments: (partial: Partial<ImageAdjustments>) => void;
|
|
137
|
+
removeUserImage: (id: string) => void;
|
|
138
|
+
};
|
|
139
|
+
export declare function createElementActions<TState extends BaseCanvasState>(getState: () => TState, setState: StateSetter<TState>, saveToHistory: HistorySaver<TState>, debouncedSaveToHistory: HistorySaver<TState>, canvasWidth: number, canvasHeight: number, fontColor?: string, chartColors?: readonly string[],
|
|
140
|
+
/** Startgröße neuer Elemente (`insertScaleFor`); 1 = Sharepic-Werte. */
|
|
141
|
+
insertScale?: number,
|
|
142
|
+
/**
|
|
143
|
+
* The pack of the page's document (`FullCanvasConfig.brand`): what new elements take their
|
|
144
|
+
* colours and fonts from. Last, and a `BrandPack`, so it cannot be bound to `chartColors`
|
|
145
|
+
* (a string list) or `insertScale` (a number). The active brand by default.
|
|
146
|
+
*/
|
|
147
|
+
brand?: BrandPack): {
|
|
148
|
+
addUserImage: (file: File, objectUrl: string) => void;
|
|
149
|
+
addUserImageFromUrl: (url: string, fileName: string, options?: UserImagePlacement) => void;
|
|
150
|
+
/**
|
|
151
|
+
* Place a freshly-picked file instantly via a local blob preview (dimensions
|
|
152
|
+
* read locally, no network) and return the new instance id. The caller
|
|
153
|
+
* uploads in the background and calls `updateUserImage(id, { src })` to swap
|
|
154
|
+
* the blob for the durable URL — mirrors the optimistic background path.
|
|
155
|
+
*/
|
|
156
|
+
placeUserImageFromFile: (file: File) => Promise<string>;
|
|
157
|
+
updateUserImage: (id: string, partial: Partial<UserImageInstance>) => void;
|
|
158
|
+
/** The template background photo's "Bearbeiten" look; merges like `updateUserImage`. */
|
|
159
|
+
updateBackgroundImageAdjustments: (partial: Partial<ImageAdjustments>) => void;
|
|
160
|
+
removeUserImage: (id: string) => void;
|
|
161
|
+
addFrame: (clipType: FrameClipType, options?: ElementPlacement) => void;
|
|
162
|
+
updateFrame: (id: string, partial: Partial<FrameInstance>) => void;
|
|
163
|
+
removeFrame: (id: string) => void;
|
|
164
|
+
setFrameImage: (id: string, _file: File, objectUrl: string) => void;
|
|
165
|
+
addChart: (chartType: ChartType, options?: ElementPlacement) => void;
|
|
166
|
+
updateChart: (id: string, partial: Partial<ChartInstance>) => void;
|
|
167
|
+
removeChart: (id: string) => void;
|
|
168
|
+
addCircleBadge: (preset?: string) => void;
|
|
169
|
+
updateCircleBadge: (id: string, partial: Partial<CircleBadgeInstance>) => void;
|
|
170
|
+
removeCircleBadge: (id: string) => void;
|
|
171
|
+
addPillBadge: (preset?: string) => void;
|
|
172
|
+
updatePillBadge: (id: string, partial: Partial<PillBadgeInstance>) => void;
|
|
173
|
+
removePillBadge: (id: string) => void;
|
|
174
|
+
addHeader: () => void;
|
|
175
|
+
addSubheader: () => void;
|
|
176
|
+
addText: () => void;
|
|
177
|
+
/**
|
|
178
|
+
* Add a body text with explicit content. Used by AI-suggestion appliers
|
|
179
|
+
* that need to emit a finished text element rather than a placeholder.
|
|
180
|
+
*/
|
|
181
|
+
addBodyTextWithContent: (content: string) => void;
|
|
182
|
+
updateAdditionalText: (id: string, partial: Partial<AdditionalText>) => void;
|
|
183
|
+
removeAdditionalText: (id: string) => void;
|
|
184
|
+
addIllustration: (id: string, options?: ElementPlacement) => void;
|
|
185
|
+
updateIllustration: (id: string, partial: Partial<IllustrationInstance>) => void;
|
|
186
|
+
removeIllustration: (id: string) => void;
|
|
187
|
+
duplicateIllustration: (illustrationId: string) => void;
|
|
188
|
+
handleIllustrationDragEnd: (illustrationId: string, x: number, y: number) => void;
|
|
189
|
+
handleIllustrationTransformEnd: (illustrationId: string, width: number, height: number, rotation?: number) => void;
|
|
190
|
+
addShape: (type: ShapeType, color?: string, options?: ElementPlacement) => void;
|
|
191
|
+
updateShape: (id: string, partial: Partial<ShapeInstance>) => void;
|
|
192
|
+
removeShape: (id: string) => void;
|
|
193
|
+
toggleIcon: (id: string, selected: boolean, options?: ElementPlacement, external?: ExternalIconPayload) => void;
|
|
194
|
+
updateIcon: (id: string, partial: Partial<IconState>) => void;
|
|
195
|
+
handleIconDragEnd: (id: string, x: number, y: number) => void;
|
|
196
|
+
addAsset: (assetId: string, options?: ElementPlacement) => void;
|
|
197
|
+
addStickerAsset: (ref: StickerRef, options?: ElementPlacement) => void;
|
|
198
|
+
updateAsset: (id: string, partial: Partial<AssetInstance>) => void;
|
|
199
|
+
removeAsset: (id: string) => void;
|
|
200
|
+
};
|
|
201
|
+
export {};
|