@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,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Types for Canvas Config Factory
|
|
3
|
+
*
|
|
4
|
+
* Shared state and action types that all canvas templates use.
|
|
5
|
+
* These provide the foundation for the factory pattern.
|
|
6
|
+
*/
|
|
7
|
+
import { type IconState } from '@ggraphic/core';
|
|
8
|
+
import type { AssetInstance } from '../../utils/canvasAssets.js';
|
|
9
|
+
import type { HostElementState } from '../../utils/canvasItem.js';
|
|
10
|
+
import type { AdditionalText, LayoutResult } from '../types.js';
|
|
11
|
+
import type { StockImageAttribution } from '@ggraphic/editor/common/imageSourceTypes';
|
|
12
|
+
import type { ExternalIconPayload } from '@ggraphic/editor/utils/externalIcons';
|
|
13
|
+
import type { ChartInstance, ChartType } from '@ggraphic/editor/utils/chartTypes';
|
|
14
|
+
import type { CircleBadgeInstance } from '@ggraphic/editor/utils/circleBadgeUtils';
|
|
15
|
+
import type { FrameClipType, FrameInstance } from '@ggraphic/editor/utils/frameUtils';
|
|
16
|
+
import type { IllustrationInstance } from '@ggraphic/editor/utils/illustrations/types';
|
|
17
|
+
import type { PillBadgeInstance } from '@ggraphic/editor/utils/pillBadgeUtils';
|
|
18
|
+
import type { ShapeInstance, ShapeType } from '@ggraphic/editor/utils/shapes';
|
|
19
|
+
import type { TextAlign } from '@ggraphic/editor/utils/textAlign';
|
|
20
|
+
import type { ElementPlacement, UserImageInstance } from '@ggraphic/editor/utils/userImageUtils';
|
|
21
|
+
import type { StickerRef } from '@ggraphic/schema';
|
|
22
|
+
export { type IconState } from '@ggraphic/core';
|
|
23
|
+
/** Base state shared by ALL canvas templates, with the host kinds' lists (`HostElementKinds`). */
|
|
24
|
+
export interface BaseCanvasState extends HostElementState {
|
|
25
|
+
isDesktop: boolean;
|
|
26
|
+
assetInstances: AssetInstance[];
|
|
27
|
+
selectedIcons: string[];
|
|
28
|
+
iconStates: Record<string, IconState>;
|
|
29
|
+
shapeInstances: ShapeInstance[];
|
|
30
|
+
illustrationInstances: IllustrationInstance[];
|
|
31
|
+
additionalTexts: AdditionalText[];
|
|
32
|
+
pillBadgeInstances: PillBadgeInstance[];
|
|
33
|
+
circleBadgeInstances: CircleBadgeInstance[];
|
|
34
|
+
frameInstances: FrameInstance[];
|
|
35
|
+
userImageInstances: UserImageInstance[];
|
|
36
|
+
chartInstances: ChartInstance[];
|
|
37
|
+
layerOrder?: string[];
|
|
38
|
+
/** Gesperrte Elemente: nicht ziehen, skalieren, drehen oder löschen. */
|
|
39
|
+
lockedLayerIds?: string[];
|
|
40
|
+
/** Drehung der Vorlagen-Elemente (Text, Grafiken), je Element-ID in Grad. */
|
|
41
|
+
templateRotations?: Record<string, number>;
|
|
42
|
+
/** Gewählte Ausrichtung der Vorlagen-Texte, je Element-ID (`utils/textAlign.ts`). */
|
|
43
|
+
templateTextAligns?: Record<string, TextAlign>;
|
|
44
|
+
imageAttribution?: StockImageAttribution | null;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
/** State for templates with image backgrounds */
|
|
48
|
+
export interface ImageBackgroundState {
|
|
49
|
+
currentImageSrc: string;
|
|
50
|
+
backgroundImageFile?: File | Blob | null;
|
|
51
|
+
imageOffset: {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
};
|
|
55
|
+
imageScale: number;
|
|
56
|
+
backgroundImageOpacity?: number;
|
|
57
|
+
imageAttribution?: StockImageAttribution | null;
|
|
58
|
+
}
|
|
59
|
+
/** State for templates with solid color backgrounds */
|
|
60
|
+
export interface ColorBackgroundState {
|
|
61
|
+
backgroundColor: string;
|
|
62
|
+
}
|
|
63
|
+
/** State for 2 text fields (primary + secondary) */
|
|
64
|
+
export interface TwoTextFieldsState<TPrimary extends string, TSecondary extends string> {
|
|
65
|
+
[key: string]: unknown;
|
|
66
|
+
}
|
|
67
|
+
/** Opacity and color overrides for text elements */
|
|
68
|
+
export interface TextStylingState {
|
|
69
|
+
primaryOpacity?: number;
|
|
70
|
+
secondaryOpacity?: number;
|
|
71
|
+
primaryColor?: string;
|
|
72
|
+
secondaryColor?: string;
|
|
73
|
+
customPrimaryFontSize: number | null;
|
|
74
|
+
customSecondaryFontSize: number | null;
|
|
75
|
+
}
|
|
76
|
+
/** Base actions shared by ALL canvas templates */
|
|
77
|
+
export interface BaseCanvasActions {
|
|
78
|
+
addAsset: (assetId: string, options?: ElementPlacement) => void;
|
|
79
|
+
addStickerAsset: (ref: StickerRef, options?: ElementPlacement) => void;
|
|
80
|
+
updateAsset: (id: string, partial: Partial<AssetInstance>) => void;
|
|
81
|
+
removeAsset: (id: string) => void;
|
|
82
|
+
toggleIcon: (id: string, selected: boolean, options?: ElementPlacement, external?: ExternalIconPayload) => void;
|
|
83
|
+
updateIcon: (id: string, partial: Partial<IconState>) => void;
|
|
84
|
+
addShape: (type: ShapeType, color?: string, options?: ElementPlacement) => void;
|
|
85
|
+
updateShape: (id: string, partial: Partial<ShapeInstance>) => void;
|
|
86
|
+
removeShape: (id: string) => void;
|
|
87
|
+
addIllustration: (id: string, options?: ElementPlacement) => void;
|
|
88
|
+
updateIllustration: (id: string, partial: Partial<IllustrationInstance>) => void;
|
|
89
|
+
removeIllustration: (id: string) => void;
|
|
90
|
+
addHeader: () => void;
|
|
91
|
+
addText: () => void;
|
|
92
|
+
updateAdditionalText: (id: string, partial: Partial<AdditionalText>) => void;
|
|
93
|
+
removeAdditionalText: (id: string) => void;
|
|
94
|
+
addPillBadge: (preset?: string) => void;
|
|
95
|
+
updatePillBadge: (id: string, partial: Partial<PillBadgeInstance>) => void;
|
|
96
|
+
removePillBadge: (id: string) => void;
|
|
97
|
+
addCircleBadge: (preset?: string) => void;
|
|
98
|
+
updateCircleBadge: (id: string, partial: Partial<CircleBadgeInstance>) => void;
|
|
99
|
+
removeCircleBadge: (id: string) => void;
|
|
100
|
+
addFrame: (clipType: FrameClipType, options?: ElementPlacement) => void;
|
|
101
|
+
updateFrame: (id: string, partial: Partial<FrameInstance>) => void;
|
|
102
|
+
removeFrame: (id: string) => void;
|
|
103
|
+
setFrameImage: (id: string, file: File, objectUrl: string) => void;
|
|
104
|
+
addUserImage: (file: File, objectUrl: string) => void;
|
|
105
|
+
updateUserImage: (id: string, partial: Partial<UserImageInstance>) => void;
|
|
106
|
+
removeUserImage: (id: string) => void;
|
|
107
|
+
addChart: (chartType: ChartType, options?: ElementPlacement) => void;
|
|
108
|
+
updateChart: (id: string, partial: Partial<ChartInstance>) => void;
|
|
109
|
+
removeChart: (id: string) => void;
|
|
110
|
+
}
|
|
111
|
+
/** Actions for image background templates */
|
|
112
|
+
export interface ImageBackgroundActions {
|
|
113
|
+
setCurrentImageSrc: (file: File | null, objectUrl?: string) => void;
|
|
114
|
+
setImageScale: (scale: number) => void;
|
|
115
|
+
setImageAttribution?: (attribution: StockImageAttribution | null) => void;
|
|
116
|
+
}
|
|
117
|
+
/** Actions for color background templates */
|
|
118
|
+
export interface ColorBackgroundActions {
|
|
119
|
+
setBackgroundColor: (color: string) => void;
|
|
120
|
+
}
|
|
121
|
+
/** Text field definition */
|
|
122
|
+
export interface TextFieldDefinition {
|
|
123
|
+
key: string;
|
|
124
|
+
label: string;
|
|
125
|
+
type: 'text' | 'textarea';
|
|
126
|
+
placeholder?: string;
|
|
127
|
+
}
|
|
128
|
+
/** Feature flags for canvas capabilities */
|
|
129
|
+
export interface CanvasFeatures {
|
|
130
|
+
icons?: boolean;
|
|
131
|
+
shapes?: boolean;
|
|
132
|
+
illustrations?: boolean;
|
|
133
|
+
pillBadge?: boolean;
|
|
134
|
+
circleBadge?: boolean;
|
|
135
|
+
frames?: boolean;
|
|
136
|
+
charts?: boolean;
|
|
137
|
+
}
|
|
138
|
+
/** Canvas dimension configuration */
|
|
139
|
+
export interface CanvasDimensions {
|
|
140
|
+
width: number;
|
|
141
|
+
height: number;
|
|
142
|
+
}
|
|
143
|
+
/** Base factory options shared by all factories */
|
|
144
|
+
export interface BaseFactoryOptions<TState> {
|
|
145
|
+
id: string;
|
|
146
|
+
canvas: CanvasDimensions;
|
|
147
|
+
features?: CanvasFeatures;
|
|
148
|
+
maxPages?: number;
|
|
149
|
+
calculateLayout: (state: TState) => LayoutResult;
|
|
150
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Carries the element collections a user builds up on a canvas — added icons,
|
|
3
|
+
* shapes, illustrations, texts, badges, frames, charts, uploaded images —
|
|
4
|
+
* from a seed into a freshly built state.
|
|
5
|
+
*
|
|
6
|
+
* `createInitialState` is not only the mint seed. Card renders and the
|
|
7
|
+
* remote-sync re-seed (`GenericCanvas.handleRemotePageState`) push the full
|
|
8
|
+
* previous state back through it, so every collection a config hard-set to
|
|
9
|
+
* `[]` was erased on the next chat edit.
|
|
10
|
+
*
|
|
11
|
+
* Collections a template derives from its own text fields (the slider pill,
|
|
12
|
+
* the event date circle) are still owned by that
|
|
13
|
+
* template: spread this first, then override the derived key.
|
|
14
|
+
*
|
|
15
|
+
* `layerOrder` rides along because it is the z-order OF these collections and
|
|
16
|
+
* nothing else — an id array that `buildSortedRenderList` lets outrank each
|
|
17
|
+
* element's declared `order`. It used to be missing here, so every template
|
|
18
|
+
* except the three-line template and `freeform` (which read it from the props by hand)
|
|
19
|
+
* handed a user their shapes back in the default order after a reload (#3420).
|
|
20
|
+
*
|
|
21
|
+
* `lockedLayerIds` is the same kind of id array: which of these elements the
|
|
22
|
+
* user locked. Copies and pastes get new ids, so they come out unlocked.
|
|
23
|
+
*
|
|
24
|
+
* `backgroundImageAdjustments` is the "Bearbeiten" look of the template's
|
|
25
|
+
* background photo. It rides here for the same reason: one read-back for every
|
|
26
|
+
* template, and the list doubles as the page's writer (pageElementStateKeys()).
|
|
27
|
+
* `backgroundImageRotation` (Begradigen, Grad) is the same photo's straighten
|
|
28
|
+
* angle and rides the same way; missing means never straightened.
|
|
29
|
+
*
|
|
30
|
+
* `templateRotations` is the turn of the template's own text and marks, keyed
|
|
31
|
+
* by element config id. One record for every template, so no template needs a
|
|
32
|
+
* rotation key of its own and the page writer syncs it like the rest.
|
|
33
|
+
* `templateTextAligns` is the same for the alignment of the template's texts.
|
|
34
|
+
*/
|
|
35
|
+
import { type TextAlign } from '@ggraphic/editor/utils/textAlign';
|
|
36
|
+
import type { IconState } from './baseTypes.js';
|
|
37
|
+
import type { AssetInstance } from '../../utils/canvasAssets.js';
|
|
38
|
+
import type { HostElementState } from '../../utils/canvasItem.js';
|
|
39
|
+
import type { AdditionalText } from '../types.js';
|
|
40
|
+
import type { ChartInstance } from '@ggraphic/editor/utils/chartTypes';
|
|
41
|
+
import type { CircleBadgeInstance } from '@ggraphic/editor/utils/circleBadgeUtils';
|
|
42
|
+
import type { FrameInstance } from '@ggraphic/editor/utils/frameUtils';
|
|
43
|
+
import type { IllustrationInstance } from '@ggraphic/editor/utils/illustrations/types';
|
|
44
|
+
import type { PillBadgeInstance } from '@ggraphic/editor/utils/pillBadgeUtils';
|
|
45
|
+
import type { ShapeInstance } from '@ggraphic/editor/utils/shapes';
|
|
46
|
+
import type { ImageAdjustments, UserImageInstance } from '@ggraphic/editor/utils/userImageUtils';
|
|
47
|
+
/** The carried collections; a host kind's list rides along under its `stateKey`. */
|
|
48
|
+
export interface CarriedInstanceState extends HostElementState {
|
|
49
|
+
assetInstances: AssetInstance[];
|
|
50
|
+
selectedIcons: string[];
|
|
51
|
+
iconStates: Record<string, IconState>;
|
|
52
|
+
shapeInstances: ShapeInstance[];
|
|
53
|
+
illustrationInstances: IllustrationInstance[];
|
|
54
|
+
additionalTexts: AdditionalText[];
|
|
55
|
+
pillBadgeInstances: PillBadgeInstance[];
|
|
56
|
+
circleBadgeInstances: CircleBadgeInstance[];
|
|
57
|
+
frameInstances: FrameInstance[];
|
|
58
|
+
chartInstances: ChartInstance[];
|
|
59
|
+
userImageInstances: UserImageInstance[];
|
|
60
|
+
layerOrder: string[];
|
|
61
|
+
lockedLayerIds: string[];
|
|
62
|
+
templateRotations: Record<string, number>;
|
|
63
|
+
templateTextAligns: Record<string, TextAlign>;
|
|
64
|
+
backgroundImageAdjustments?: ImageAdjustments;
|
|
65
|
+
backgroundImageRotation?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The core's keys `carryInstanceState` reads. With the host kinds' lists:
|
|
69
|
+
* `carriedInstanceKeys()`, which guards and re-seed logic read.
|
|
70
|
+
*/
|
|
71
|
+
export declare const CARRIED_INSTANCE_KEYS: readonly ["assetInstances", "selectedIcons", "iconStates", "shapeInstances", "illustrationInstances", "additionalTexts", "pillBadgeInstances", "circleBadgeInstances", "frameInstances", "chartInstances", "userImageInstances", "layerOrder", "lockedLayerIds", "templateRotations", "templateTextAligns", "backgroundImageAdjustments", "backgroundImageRotation"];
|
|
72
|
+
/** Every key `carryInstanceState` reads: the core's, then each host kind's list. */
|
|
73
|
+
export declare const carriedInstanceKeys: () => readonly string[];
|
|
74
|
+
export declare function carryInstanceState(props: Record<string, unknown>): CarriedInstanceState;
|
|
75
|
+
/** The background photo's straighten angle, when the seed carries one; omitted otherwise. */
|
|
76
|
+
export declare function carryBackgroundRotation(props: Record<string, unknown>): Pick<CarriedInstanceState, 'backgroundImageRotation'>;
|
|
77
|
+
/** The background photo's look, when the seed carries one; omitted otherwise. */
|
|
78
|
+
export declare function carryBackgroundAdjustments(props: Record<string, unknown>): Pick<CarriedInstanceState, 'backgroundImageAdjustments'>;
|
|
79
|
+
/** The turn of each template element, keyed by element id; `{}` for anything else. */
|
|
80
|
+
export declare function carryTemplateRotations(props: Record<string, unknown>): Record<string, number>;
|
|
81
|
+
/** The chosen alignment of each template text, keyed by element id; unknown values are dropped. */
|
|
82
|
+
export declare function carryTemplateTextAligns(props: Record<string, unknown>): Record<string, TextAlign>;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Carries the element collections a user builds up on a canvas — added icons,
|
|
4
|
+
* shapes, illustrations, texts, badges, frames, charts, uploaded images —
|
|
5
|
+
* from a seed into a freshly built state.
|
|
6
|
+
*
|
|
7
|
+
* `createInitialState` is not only the mint seed. Card renders and the
|
|
8
|
+
* remote-sync re-seed (`GenericCanvas.handleRemotePageState`) push the full
|
|
9
|
+
* previous state back through it, so every collection a config hard-set to
|
|
10
|
+
* `[]` was erased on the next chat edit.
|
|
11
|
+
*
|
|
12
|
+
* Collections a template derives from its own text fields (the slider pill,
|
|
13
|
+
* the event date circle) are still owned by that
|
|
14
|
+
* template: spread this first, then override the derived key.
|
|
15
|
+
*
|
|
16
|
+
* `layerOrder` rides along because it is the z-order OF these collections and
|
|
17
|
+
* nothing else — an id array that `buildSortedRenderList` lets outrank each
|
|
18
|
+
* element's declared `order`. It used to be missing here, so every template
|
|
19
|
+
* except the three-line template and `freeform` (which read it from the props by hand)
|
|
20
|
+
* handed a user their shapes back in the default order after a reload (#3420).
|
|
21
|
+
*
|
|
22
|
+
* `lockedLayerIds` is the same kind of id array: which of these elements the
|
|
23
|
+
* user locked. Copies and pastes get new ids, so they come out unlocked.
|
|
24
|
+
*
|
|
25
|
+
* `backgroundImageAdjustments` is the "Bearbeiten" look of the template's
|
|
26
|
+
* background photo. It rides here for the same reason: one read-back for every
|
|
27
|
+
* template, and the list doubles as the page's writer (pageElementStateKeys()).
|
|
28
|
+
* `backgroundImageRotation` (Begradigen, Grad) is the same photo's straighten
|
|
29
|
+
* angle and rides the same way; missing means never straightened.
|
|
30
|
+
*
|
|
31
|
+
* `templateRotations` is the turn of the template's own text and marks, keyed
|
|
32
|
+
* by element config id. One record for every template, so no template needs a
|
|
33
|
+
* rotation key of its own and the page writer syncs it like the rest.
|
|
34
|
+
* `templateTextAligns` is the same for the alignment of the template's texts.
|
|
35
|
+
*/
|
|
36
|
+
import { fromHostKinds, hostElementKinds } from '@ggraphic/editor/utils/elementKinds';
|
|
37
|
+
import { isTextAlign } from '@ggraphic/editor/utils/textAlign';
|
|
38
|
+
/**
|
|
39
|
+
* The core's keys `carryInstanceState` reads. With the host kinds' lists:
|
|
40
|
+
* `carriedInstanceKeys()`, which guards and re-seed logic read.
|
|
41
|
+
*/
|
|
42
|
+
export const CARRIED_INSTANCE_KEYS = [
|
|
43
|
+
'assetInstances',
|
|
44
|
+
'selectedIcons',
|
|
45
|
+
'iconStates',
|
|
46
|
+
'shapeInstances',
|
|
47
|
+
'illustrationInstances',
|
|
48
|
+
'additionalTexts',
|
|
49
|
+
'pillBadgeInstances',
|
|
50
|
+
'circleBadgeInstances',
|
|
51
|
+
'frameInstances',
|
|
52
|
+
'chartInstances',
|
|
53
|
+
'userImageInstances',
|
|
54
|
+
'layerOrder',
|
|
55
|
+
'lockedLayerIds',
|
|
56
|
+
'templateRotations',
|
|
57
|
+
'templateTextAligns',
|
|
58
|
+
'backgroundImageAdjustments',
|
|
59
|
+
'backgroundImageRotation',
|
|
60
|
+
];
|
|
61
|
+
/** Every key `carryInstanceState` reads: the core's, then each host kind's list. */
|
|
62
|
+
export const carriedInstanceKeys = fromHostKinds((kinds) => [
|
|
63
|
+
...CARRIED_INSTANCE_KEYS,
|
|
64
|
+
...kinds.map((kind) => kind.stateKey),
|
|
65
|
+
]);
|
|
66
|
+
function list(value) {
|
|
67
|
+
return Array.isArray(value) ? value : [];
|
|
68
|
+
}
|
|
69
|
+
export function carryInstanceState(props) {
|
|
70
|
+
return {
|
|
71
|
+
assetInstances: list(props.assetInstances),
|
|
72
|
+
selectedIcons: list(props.selectedIcons),
|
|
73
|
+
iconStates: props.iconStates && typeof props.iconStates === 'object'
|
|
74
|
+
? props.iconStates
|
|
75
|
+
: {},
|
|
76
|
+
shapeInstances: list(props.shapeInstances),
|
|
77
|
+
illustrationInstances: list(props.illustrationInstances),
|
|
78
|
+
additionalTexts: list(props.additionalTexts),
|
|
79
|
+
pillBadgeInstances: list(props.pillBadgeInstances),
|
|
80
|
+
circleBadgeInstances: list(props.circleBadgeInstances),
|
|
81
|
+
frameInstances: list(props.frameInstances),
|
|
82
|
+
chartInstances: list(props.chartInstances),
|
|
83
|
+
userImageInstances: list(props.userImageInstances),
|
|
84
|
+
layerOrder: list(props.layerOrder),
|
|
85
|
+
lockedLayerIds: list(props.lockedLayerIds),
|
|
86
|
+
templateRotations: carryTemplateRotations(props),
|
|
87
|
+
templateTextAligns: carryTemplateTextAligns(props),
|
|
88
|
+
...carryBackgroundAdjustments(props),
|
|
89
|
+
...carryBackgroundRotation(props),
|
|
90
|
+
// Boundary: one list per host kind, under the key its type names.
|
|
91
|
+
...Object.fromEntries(hostElementKinds().map((kind) => [kind.stateKey, list(props[kind.stateKey])])),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/** The background photo's straighten angle, when the seed carries one; omitted otherwise. */
|
|
95
|
+
export function carryBackgroundRotation(props) {
|
|
96
|
+
const value = props.backgroundImageRotation;
|
|
97
|
+
return typeof value === 'number' && Number.isFinite(value)
|
|
98
|
+
? { backgroundImageRotation: value }
|
|
99
|
+
: {};
|
|
100
|
+
}
|
|
101
|
+
/** The background photo's look, when the seed carries one; omitted otherwise. */
|
|
102
|
+
export function carryBackgroundAdjustments(props) {
|
|
103
|
+
const value = props.backgroundImageAdjustments;
|
|
104
|
+
return value && typeof value === 'object'
|
|
105
|
+
? { backgroundImageAdjustments: value }
|
|
106
|
+
: {};
|
|
107
|
+
}
|
|
108
|
+
/** The turn of each template element, keyed by element id; `{}` for anything else. */
|
|
109
|
+
export function carryTemplateRotations(props) {
|
|
110
|
+
const value = props.templateRotations;
|
|
111
|
+
return value && typeof value === 'object' && !Array.isArray(value)
|
|
112
|
+
? value
|
|
113
|
+
: {};
|
|
114
|
+
}
|
|
115
|
+
/** The chosen alignment of each template text, keyed by element id; unknown values are dropped. */
|
|
116
|
+
export function carryTemplateTextAligns(props) {
|
|
117
|
+
const value = props.templateTextAligns;
|
|
118
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
119
|
+
return {};
|
|
120
|
+
return Object.fromEntries(Object.entries(value).filter(([, align]) => isTextAlign(align)));
|
|
121
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { LayoutResult, PositionValue, TextElementConfig } from '@ggraphic/editor/configs/types';
|
|
2
|
+
/**
|
|
3
|
+
* Shared shape for the primary/secondary text-element factories.
|
|
4
|
+
*
|
|
5
|
+
* Encodes what every factory-template text element looks like: layout-driven
|
|
6
|
+
* x/y/fontSize, static width/font, the standard defaults
|
|
7
|
+
* (`align: 'left'`, `wrap: 'word'`, `padding: 0`, `editable: true`,
|
|
8
|
+
* `draggable: true`), and a `fillFallback` hook for templates that read a
|
|
9
|
+
* theme colour from `layout._meta.fontColor` (zitat-pure, info).
|
|
10
|
+
*/
|
|
11
|
+
interface TextElementOptions<TState> {
|
|
12
|
+
/** Element id, also used for layout lookup. */
|
|
13
|
+
id: string;
|
|
14
|
+
/** State key that holds this element's text. */
|
|
15
|
+
textKey: string;
|
|
16
|
+
/** Z-index. */
|
|
17
|
+
order: number;
|
|
18
|
+
/** Static width. */
|
|
19
|
+
width: PositionValue<TState>;
|
|
20
|
+
/** Font family (helper appends ', Arial, sans-serif'). */
|
|
21
|
+
fontFamily: string;
|
|
22
|
+
fontStyle?: 'bold' | 'normal' | 'italic' | 'bold italic';
|
|
23
|
+
lineHeight?: number;
|
|
24
|
+
/** Markdown-lite im Text, Bearbeitung mit dem Rich-Text-Editor — siehe `TextElementConfig.richText`. */
|
|
25
|
+
richText?: boolean;
|
|
26
|
+
/** Hard-coded fallback colour when neither state nor `fillFallback` resolves. */
|
|
27
|
+
defaultColor: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional secondary fill source — used when the per-element state colour
|
|
30
|
+
* (`primaryColor`/`secondaryColor`) is unset. zitat-pure / info pull from
|
|
31
|
+
* `layout._meta.fontColor`; zitat / simple omit this and rely on `defaultColor`.
|
|
32
|
+
*/
|
|
33
|
+
fillFallback?: (state: TState, layout: LayoutResult) => string | undefined;
|
|
34
|
+
/** Layout fallbacks for x/y/fontSize (used when layout doesn't resolve). */
|
|
35
|
+
layoutFallback: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
fontSize: number;
|
|
39
|
+
};
|
|
40
|
+
align?: 'left' | 'center' | 'right';
|
|
41
|
+
/**
|
|
42
|
+
* State key holding an absolute `{ x, y }` override. When set (e.g. by a
|
|
43
|
+
* chat `update-element` op or a studio drag), it wins over the computed
|
|
44
|
+
* layout position; when absent the element stays auto-laid-out.
|
|
45
|
+
*
|
|
46
|
+
* Defaults to `primaryPosition` / `secondaryPosition`. Pass an explicit key
|
|
47
|
+
* only where one is already persisted (zitat-pure's `namePosition`) — the
|
|
48
|
+
* element is `draggable`, and without any key `handleElementPositionChange`
|
|
49
|
+
* drops the drop and the next render pulls x/y back out of the layout.
|
|
50
|
+
*/
|
|
51
|
+
positionStateKey?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Builds the primary (headline / quote / header) text element with the
|
|
55
|
+
* canonical state-key wiring: customPrimaryFontSize / primaryOpacity / primaryColor.
|
|
56
|
+
*/
|
|
57
|
+
export declare function createPrimaryText<TState>(options: TextElementOptions<TState>): TextElementConfig<TState>;
|
|
58
|
+
/**
|
|
59
|
+
* Builds the secondary (subtext / name / body) text element with the
|
|
60
|
+
* canonical state-key wiring: customSecondaryFontSize / secondaryOpacity / secondaryColor.
|
|
61
|
+
*/
|
|
62
|
+
export declare function createSecondaryText<TState>(options: TextElementOptions<TState>): TextElementConfig<TState>;
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
import { fromLayout } from '@ggraphic/editor/configs/factory/layoutAccessors';
|
|
3
|
+
const PRIMARY_POSITION_KEY = 'primaryPosition';
|
|
4
|
+
const SECONDARY_POSITION_KEY = 'secondaryPosition';
|
|
5
|
+
const PRIMARY_FONT_SIZE_KEY = 'customPrimaryFontSize';
|
|
6
|
+
const PRIMARY_OPACITY_KEY = 'primaryOpacity';
|
|
7
|
+
const PRIMARY_COLOR_KEY = 'primaryColor';
|
|
8
|
+
const SECONDARY_FONT_SIZE_KEY = 'customSecondaryFontSize';
|
|
9
|
+
const SECONDARY_OPACITY_KEY = 'secondaryOpacity';
|
|
10
|
+
const SECONDARY_COLOR_KEY = 'secondaryColor';
|
|
11
|
+
function buildFill(colorKey, defaultColor, fillFallback) {
|
|
12
|
+
return (state, layout) => {
|
|
13
|
+
const stateColor = state[colorKey];
|
|
14
|
+
if (typeof stateColor === 'string')
|
|
15
|
+
return stateColor;
|
|
16
|
+
if (fillFallback) {
|
|
17
|
+
const fallbackColor = fillFallback(state, layout);
|
|
18
|
+
if (typeof fallbackColor === 'string')
|
|
19
|
+
return fallbackColor;
|
|
20
|
+
}
|
|
21
|
+
return defaultColor;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function buildBaseElement(options, fontSizeStateKey, opacityStateKey, fillStateKey, positionStateKey, fill) {
|
|
25
|
+
return {
|
|
26
|
+
id: options.id,
|
|
27
|
+
type: 'text',
|
|
28
|
+
x: fromLayout(options.id, 'x', options.layoutFallback.x),
|
|
29
|
+
y: fromLayout(options.id, 'y', options.layoutFallback.y),
|
|
30
|
+
order: options.order,
|
|
31
|
+
textKey: options.textKey,
|
|
32
|
+
width: options.width,
|
|
33
|
+
fontSize: fromLayout(options.id, 'fontSize', options.layoutFallback.fontSize),
|
|
34
|
+
fontFamily: `${options.fontFamily}, Arial, sans-serif`,
|
|
35
|
+
fontStyle: options.fontStyle,
|
|
36
|
+
align: options.align ?? 'left',
|
|
37
|
+
lineHeight: options.lineHeight,
|
|
38
|
+
wrap: 'word',
|
|
39
|
+
padding: 0,
|
|
40
|
+
editable: true,
|
|
41
|
+
richText: options.richText ?? false,
|
|
42
|
+
draggable: true,
|
|
43
|
+
fontSizeStateKey,
|
|
44
|
+
opacityStateKey,
|
|
45
|
+
fill,
|
|
46
|
+
fillStateKey,
|
|
47
|
+
positionStateKey: options.positionStateKey ?? positionStateKey,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Builds the primary (headline / quote / header) text element with the
|
|
52
|
+
* canonical state-key wiring: customPrimaryFontSize / primaryOpacity / primaryColor.
|
|
53
|
+
*/
|
|
54
|
+
export function createPrimaryText(options) {
|
|
55
|
+
return buildBaseElement(options, PRIMARY_FONT_SIZE_KEY, PRIMARY_OPACITY_KEY, PRIMARY_COLOR_KEY, PRIMARY_POSITION_KEY, buildFill(PRIMARY_COLOR_KEY, options.defaultColor, options.fillFallback));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Builds the secondary (subtext / name / body) text element with the
|
|
59
|
+
* canonical state-key wiring: customSecondaryFontSize / secondaryOpacity / secondaryColor.
|
|
60
|
+
*/
|
|
61
|
+
export function createSecondaryText(options) {
|
|
62
|
+
return buildBaseElement(options, SECONDARY_FONT_SIZE_KEY, SECONDARY_OPACITY_KEY, SECONDARY_COLOR_KEY, SECONDARY_POSITION_KEY, buildFill(SECONDARY_COLOR_KEY, options.defaultColor, options.fillFallback));
|
|
63
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { SectionConfig, SectionContext } from '@ggraphic/editor/configs/types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a section definer bound to a template's `TState` / `TActions`.
|
|
4
|
+
*
|
|
5
|
+
* The returned `defineSection` infers `TProps` from the `component` field
|
|
6
|
+
* (anchored via `NoInfer` so `propsFactory`'s return cannot widen it), then
|
|
7
|
+
* verifies `propsFactory` returns the same shape. This regains the
|
|
8
|
+
* compile-time link between component and propsFactory that
|
|
9
|
+
* `SectionConfig<TState, TActions, any>` (in `FullCanvasConfig.sections`)
|
|
10
|
+
* structurally erases — the Record stays heterogeneous, but each definition
|
|
11
|
+
* site gets its own typed slot.
|
|
12
|
+
*
|
|
13
|
+
* **What this catches:** missing required props, wrong prop types
|
|
14
|
+
* (e.g., passing a `number` where the component expects a `string`).
|
|
15
|
+
*
|
|
16
|
+
* **What this does NOT catch:** excess properties / typos in optional
|
|
17
|
+
* fields. This is a TypeScript limitation — excess-property checking only
|
|
18
|
+
* fires for "fresh" object literals at the immediate assignment site, and
|
|
19
|
+
* literals that flow through a generic function parameter lose freshness.
|
|
20
|
+
* Even `NoInfer` can't recover this. To catch excess props you'd need an
|
|
21
|
+
* `Exact<T>` utility type, which is out of scope for this helper.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* ```
|
|
25
|
+
* const section = makeSectionDefiner<MyState, MyActions>();
|
|
26
|
+
*
|
|
27
|
+
* const textSection = section({
|
|
28
|
+
* component: CombinedTextSection,
|
|
29
|
+
* propsFactory: (state, actions) => ({ ... }), // ← typed against its props
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* If `CombinedTextSection`'s prop type is later renamed, `propsFactory` here
|
|
34
|
+
* fails to compile — instead of silently passing the wrong shape at runtime.
|
|
35
|
+
*
|
|
36
|
+
* This is also the *only* sanctioned producer of a branded `SectionConfig`
|
|
37
|
+
* (see the brand in `configs/types.ts`). The cast below is the assertion that
|
|
38
|
+
* the checked input satisfies the brand — a true type-boundary cast, not a
|
|
39
|
+
* hole: `SectionConfig` is a structural subtype of the input shape, so the
|
|
40
|
+
* only thing the cast adds is the phantom brand.
|
|
41
|
+
*/
|
|
42
|
+
export declare function makeSectionDefiner<TState, TActions>(): <TProps>(config: {
|
|
43
|
+
component: React.ComponentType<TProps>;
|
|
44
|
+
propsFactory: (state: TState, actions: TActions, context?: SectionContext) => NoInfer<TProps>;
|
|
45
|
+
}) => SectionConfig<TState, TActions, TProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a section definer bound to a template's `TState` / `TActions`.
|
|
3
|
+
*
|
|
4
|
+
* The returned `defineSection` infers `TProps` from the `component` field
|
|
5
|
+
* (anchored via `NoInfer` so `propsFactory`'s return cannot widen it), then
|
|
6
|
+
* verifies `propsFactory` returns the same shape. This regains the
|
|
7
|
+
* compile-time link between component and propsFactory that
|
|
8
|
+
* `SectionConfig<TState, TActions, any>` (in `FullCanvasConfig.sections`)
|
|
9
|
+
* structurally erases — the Record stays heterogeneous, but each definition
|
|
10
|
+
* site gets its own typed slot.
|
|
11
|
+
*
|
|
12
|
+
* **What this catches:** missing required props, wrong prop types
|
|
13
|
+
* (e.g., passing a `number` where the component expects a `string`).
|
|
14
|
+
*
|
|
15
|
+
* **What this does NOT catch:** excess properties / typos in optional
|
|
16
|
+
* fields. This is a TypeScript limitation — excess-property checking only
|
|
17
|
+
* fires for "fresh" object literals at the immediate assignment site, and
|
|
18
|
+
* literals that flow through a generic function parameter lose freshness.
|
|
19
|
+
* Even `NoInfer` can't recover this. To catch excess props you'd need an
|
|
20
|
+
* `Exact<T>` utility type, which is out of scope for this helper.
|
|
21
|
+
*
|
|
22
|
+
* Usage:
|
|
23
|
+
* ```
|
|
24
|
+
* const section = makeSectionDefiner<MyState, MyActions>();
|
|
25
|
+
*
|
|
26
|
+
* const textSection = section({
|
|
27
|
+
* component: CombinedTextSection,
|
|
28
|
+
* propsFactory: (state, actions) => ({ ... }), // ← typed against its props
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* If `CombinedTextSection`'s prop type is later renamed, `propsFactory` here
|
|
33
|
+
* fails to compile — instead of silently passing the wrong shape at runtime.
|
|
34
|
+
*
|
|
35
|
+
* This is also the *only* sanctioned producer of a branded `SectionConfig`
|
|
36
|
+
* (see the brand in `configs/types.ts`). The cast below is the assertion that
|
|
37
|
+
* the checked input satisfies the brand — a true type-boundary cast, not a
|
|
38
|
+
* hole: `SectionConfig` is a structural subtype of the input shape, so the
|
|
39
|
+
* only thing the cast adds is the phantom brand.
|
|
40
|
+
*/
|
|
41
|
+
export function makeSectionDefiner() {
|
|
42
|
+
return function defineSection(config) {
|
|
43
|
+
return config;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LayoutElementResult, PositionValue } from '@ggraphic/editor/configs/types';
|
|
2
|
+
type LayoutNumericField = keyof LayoutElementResult;
|
|
3
|
+
/**
|
|
4
|
+
* Reads a numeric field from a `LayoutResult` entry by element id, falling
|
|
5
|
+
* back to a literal default when the layout doesn't provide it.
|
|
6
|
+
*
|
|
7
|
+
* Replaces the inline pattern:
|
|
8
|
+
* `(_s, l) => (l['quote-text'] as { x?: number })?.x ?? FALLBACK`
|
|
9
|
+
*
|
|
10
|
+
* with a typed lookup against `LayoutElementResult` (the actual shape) plus a
|
|
11
|
+
* runtime number-check, so a layout entry that's missing or non-numeric
|
|
12
|
+
* silently falls back instead of producing `NaN`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function fromLayout<TState>(id: string, field: LayoutNumericField, fallback: number): PositionValue<TState>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads a numeric field from a `LayoutResult` entry by element id, falling
|
|
3
|
+
* back to a literal default when the layout doesn't provide it.
|
|
4
|
+
*
|
|
5
|
+
* Replaces the inline pattern:
|
|
6
|
+
* `(_s, l) => (l['quote-text'] as { x?: number })?.x ?? FALLBACK`
|
|
7
|
+
*
|
|
8
|
+
* with a typed lookup against `LayoutElementResult` (the actual shape) plus a
|
|
9
|
+
* runtime number-check, so a layout entry that's missing or non-numeric
|
|
10
|
+
* silently falls back instead of producing `NaN`.
|
|
11
|
+
*/
|
|
12
|
+
export function fromLayout(id, field, fallback) {
|
|
13
|
+
return (_state, layout) => {
|
|
14
|
+
const entry = layout[id];
|
|
15
|
+
if (!entry || typeof entry !== 'object')
|
|
16
|
+
return fallback;
|
|
17
|
+
const value = entry[field];
|
|
18
|
+
return typeof value === 'number' ? value : fallback;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Injector - Convention-Based Auto-Wiring
|
|
3
|
+
*
|
|
4
|
+
* Automatically detects and injects feature props for AssetsSection based on
|
|
5
|
+
* naming conventions in state and actions.
|
|
6
|
+
*
|
|
7
|
+
* **Conventions:**
|
|
8
|
+
* - Icons: state.selectedIcons + actions.toggleIcon
|
|
9
|
+
* - Shapes: state.shapeInstances + actions.addShape
|
|
10
|
+
* - Charts: state.chartInstances + actions.addChart
|
|
11
|
+
* - Illustrations: state.illustrationInstances + actions.addIllustration
|
|
12
|
+
* - Host kinds: their list (`stateKey`) + their add action (`registerElementKind`)
|
|
13
|
+
*
|
|
14
|
+
* This eliminates 60+ lines of manual prop passing per config (83% code reduction).
|
|
15
|
+
*/
|
|
16
|
+
import type { ExtendedAssetsSectionProps } from '@ggraphic/editor/sidebar/sections/assets/index';
|
|
17
|
+
import type { SectionContext } from '@ggraphic/editor/configs/types';
|
|
18
|
+
/**
|
|
19
|
+
* Auto-inject feature props for AssetsSection based on state/action presence
|
|
20
|
+
*
|
|
21
|
+
* @param state - Canvas state (checked for feature properties)
|
|
22
|
+
* @param actions - Canvas actions (checked for feature methods)
|
|
23
|
+
* @param context - Canvas context (for selectedElement)
|
|
24
|
+
* @returns Partial props object to spread into AssetsSection
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* assets: {
|
|
29
|
+
* component: AssetsSection,
|
|
30
|
+
* propsFactory: (state, actions, context) => ({
|
|
31
|
+
* // Asset instance props
|
|
32
|
+
* onAddAsset: actions.addAsset,
|
|
33
|
+
*
|
|
34
|
+
* // Auto-inject all feature props (one line!)
|
|
35
|
+
* ...injectFeatureProps(state, actions, context),
|
|
36
|
+
* }),
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function injectFeatureProps<S extends object, A extends object>(state: S, actions: A, context?: SectionContext): Partial<ExtendedAssetsSectionProps>;
|