@ggraphic/editor 0.0.0-stage → 0.0.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 +18 -0
- package/dist/brand/brandRegistry.js +41 -0
- package/dist/brand/composerBrand.d.ts +146 -0
- package/dist/brand/composerBrand.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 +1138 -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 +525 -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 +80 -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 +780 -0
- package/dist/components/GenericCanvasElement.d.ts +34 -0
- package/dist/components/GenericCanvasElement.js +267 -0
- package/dist/components/MobileSelectionPill.d.ts +40 -0
- package/dist/components/MobileSelectionPill.js +85 -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 +212 -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 +123 -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 +319 -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 +87 -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/FloatingGradientControl.d.ts +9 -0
- package/dist/components/TopBar/modules/FloatingGradientControl.js +35 -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/FloatingOutlineControl.d.ts +11 -0
- package/dist/components/TopBar/modules/FloatingOutlineControl.js +31 -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/FloatingShadowControl.d.ts +12 -0
- package/dist/components/TopBar/modules/FloatingShadowControl.js +40 -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 +19 -0
- package/dist/components/markerMark.js +26 -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 +172 -0
- package/dist/configs/factory/actionFactories.js +611 -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 +420 -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 +44 -0
- package/dist/export/pptx/buildPptxModel.js +612 -0
- package/dist/export/pptx/exportPptxDeck.d.ts +23 -0
- package/dist/export/pptx/exportPptxDeck.js +77 -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 +13 -0
- package/dist/export/pptx/textModel.js +115 -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 +895 -0
- package/dist/i18n/de.js +959 -0
- package/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.js +948 -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 +281 -0
- package/dist/primitives/CanvasStage.d.ts +84 -0
- package/dist/primitives/CanvasStage.js +291 -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 +494 -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 +75 -0
- package/dist/sidebar/sections/CombinedTextSection.d.ts +16 -0
- package/dist/sidebar/sections/CombinedTextSection.js +42 -0
- package/dist/sidebar/sections/DiagrammeSection.d.ts +9 -0
- package/dist/sidebar/sections/DiagrammeSection.js +41 -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 +26 -0
- package/dist/sidebar/sections/FormenSection.js +428 -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 +32 -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 +84 -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 +59 -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 +42 -0
- package/dist/sidebar/sections/assets/useElementCatalog.js +371 -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 +32 -0
- package/dist/sidebar/sections/effects/OutlineSettings.d.ts +12 -0
- package/dist/sidebar/sections/effects/OutlineSettings.js +28 -0
- package/dist/sidebar/sections/effects/ShadowSettings.d.ts +13 -0
- package/dist/sidebar/sections/effects/ShadowSettings.js +37 -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 +85 -0
- package/dist/sidebar/sections/tools/GradientTextTool.d.ts +5 -0
- package/dist/sidebar/sections/tools/GradientTextTool.js +102 -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 +123 -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 +149 -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/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/balkenUtils.d.ts +22 -0
- package/dist/utils/balkenUtils.js +8 -0
- package/dist/utils/canvasAssets.d.ts +134 -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 +28 -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 +2 -0
- package/dist/utils/colorNames.js +8 -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 +25 -0
- package/dist/utils/fontMarkSupport.js +26 -0
- package/dist/utils/frameUtils.d.ts +19 -0
- package/dist/utils/frameUtils.js +282 -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 +24 -0
- package/dist/utils/illustrations/registry.js +104 -0
- package/dist/utils/illustrations/svgCache.d.ts +60 -0
- package/dist/utils/illustrations/svgCache.js +342 -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 +92 -0
- package/dist/utils/imageFilters.js +303 -0
- package/dist/utils/imageLook.d.ts +16 -0
- package/dist/utils/imageLook.js +39 -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 +23 -0
- package/dist/utils/markerBoxes.js +73 -0
- package/dist/utils/markerColors.d.ts +9 -0
- package/dist/utils/markerColors.js +39 -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 +22 -0
- package/dist/utils/photoPlaceholder.js +36 -0
- package/dist/utils/pillBadgeUtils.d.ts +40 -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 +62 -0
- package/dist/utils/shapes.js +836 -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 +250 -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 +8 -0
- package/dist/utils/zipPageImages.js +29 -0
- package/package.json +105 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ShareDropdownProps } from './TopBar/ShareDropdown.js';
|
|
3
|
+
/**
|
|
4
|
+
* Toolbar — the green menu bar (3a/3b design).
|
|
5
|
+
*
|
|
6
|
+
* Holds only the file-level chrome: host slots (title, presence), undo/redo,
|
|
7
|
+
* and the Share button. The selection-driven formatting controls live in the
|
|
8
|
+
* floating ContextToolbar (desktop) / the mobile sheet's MobileSelectionControls — see
|
|
9
|
+
* ContextControls.tsx.
|
|
10
|
+
*/
|
|
11
|
+
interface ToolbarProps {
|
|
12
|
+
canUndo: boolean;
|
|
13
|
+
canRedo: boolean;
|
|
14
|
+
handlers: {
|
|
15
|
+
undo: () => void;
|
|
16
|
+
/** Page-level undo, for a suggestion that replaced the deck. */
|
|
17
|
+
undoPages: () => void;
|
|
18
|
+
redo: () => void;
|
|
19
|
+
};
|
|
20
|
+
/** Share dropdown props — when provided, renders the share button in the top-right */
|
|
21
|
+
shareProps?: ShareDropdownProps;
|
|
22
|
+
/** Host-supplied content rendered at the very left of the bar (in-flow). */
|
|
23
|
+
chromeLeft?: React.ReactNode;
|
|
24
|
+
/** Host-supplied content rendered absolute-centered inside the bar (e.g. doc title, sync badge). */
|
|
25
|
+
chromeCenter?: React.ReactNode;
|
|
26
|
+
/** Host-supplied content rendered in the right cluster, before the ShareDropdown (e.g. presence, people-share). */
|
|
27
|
+
chromeRight?: React.ReactNode;
|
|
28
|
+
/** Mobile: the pending-suggestion banner lives here. Desktop shows it as a card in the context-bar slot. */
|
|
29
|
+
suggestionInBar: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The host draws the bar (see `CanvasEditorProps.hostChrome`): no bar here
|
|
32
|
+
* except the suggestion banner, and the share menu opens on the host's request.
|
|
33
|
+
*/
|
|
34
|
+
hostShare?: {
|
|
35
|
+
open: boolean;
|
|
36
|
+
onOpenChange: (open: boolean) => void;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export declare const Toolbar: React.MemoExoticComponent<({ canUndo, canRedo, handlers, shareProps, chromeLeft, chromeCenter, chromeRight, suggestionInBar, hostShare, }: ToolbarProps) => React.JSX.Element>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
import { useCanvasStoreSelector } from '@ggraphic/editor/stores/CanvasStoreProvider';
|
|
4
|
+
import { memo } from 'react';
|
|
5
|
+
import { AutoSaveIndicator } from '@ggraphic/editor/components/TopBar/AutoSaveIndicator';
|
|
6
|
+
import { FloatingAiSuggestionBanner } from '@ggraphic/editor/components/TopBar/modules/FloatingAiSuggestionBanner';
|
|
7
|
+
import { FloatingHistoryControls } from '@ggraphic/editor/components/TopBar/modules/FloatingHistoryControls';
|
|
8
|
+
import { ShareDropdown } from './TopBar/ShareDropdown.js';
|
|
9
|
+
import { TopBar } from '@ggraphic/editor/components/TopBar/TopBar';
|
|
10
|
+
export const Toolbar = memo(({ canUndo, canRedo, handlers, shareProps, chromeLeft, chromeCenter, chromeRight, suggestionInBar, hostShare, }) => {
|
|
11
|
+
const hasPendingAiSuggestion = useCanvasStoreSelector((s) => s.pendingAiSuggestion !== null);
|
|
12
|
+
if (hostShare) {
|
|
13
|
+
return (_jsxs(_Fragment, { children: [hasPendingAiSuggestion && suggestionInBar && (_jsx(TopBar, { visible: true, children: _jsx(FloatingAiSuggestionBanner, { onUndo: handlers.undo, onUndoPages: handlers.undoPages }) })), shareProps && (_jsx("div", { className: "relative h-0", children: _jsx(ShareDropdown, { ...shareProps, hostControl: hostShare }) }))] }));
|
|
14
|
+
}
|
|
15
|
+
const rightCluster = chromeRight || shareProps ? (_jsxs("div", { className: "ml-auto flex items-center gap-sm", children: [chromeRight, shareProps && _jsx(ShareDropdown, { ...shareProps })] })) : null;
|
|
16
|
+
const centerSlot = chromeCenter ? (_jsx("div", { className: "absolute inset-y-0 left-1/2 -translate-x-1/2 flex items-center max-w-[50%] min-w-0 pointer-events-none [&>*]:pointer-events-auto max-canvas-mobile:static max-canvas-mobile:translate-x-0 max-canvas-mobile:flex-1 max-canvas-mobile:max-w-none", children: chromeCenter })) : null;
|
|
17
|
+
// Override mode: when an AI suggestion is pending, undo/redo leave the bar
|
|
18
|
+
// (the decision is keep or discard). On mobile the accept/revert banner
|
|
19
|
+
// takes their place; `handlers.undo` is the per-page canvas's undo (via the
|
|
20
|
+
// imperative ref), hitting the correct inner store.
|
|
21
|
+
if (hasPendingAiSuggestion) {
|
|
22
|
+
return (_jsxs(TopBar, { visible: true, children: [chromeLeft, centerSlot, suggestionInBar && (_jsx(FloatingAiSuggestionBanner, { onUndo: handlers.undo, onUndoPages: handlers.undoPages })), rightCluster] }));
|
|
23
|
+
}
|
|
24
|
+
return (_jsxs(TopBar, { visible: true, children: [chromeLeft, centerSlot, _jsx("div", { className: "canvas-mobile:hidden", children: _jsx(AutoSaveIndicator, { onDark: true }) }), _jsx(FloatingHistoryControls, { onUndo: handlers.undo, onRedo: handlers.redo, canUndo: canUndo, canRedo: canRedo, onDark: true }), rightCluster] }));
|
|
25
|
+
});
|
|
26
|
+
Toolbar.displayName = 'Toolbar';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToolbarStateBridge — Renderless component that owns all selectedElement-derived computation.
|
|
3
|
+
*
|
|
4
|
+
* This component subscribes to `selectedElement` from the Zustand store and computes
|
|
5
|
+
* derived values (activeFloatingModule, canMoveUp/Down, floating handlers).
|
|
6
|
+
* It returns null — when selectedElement changes, only this component re-renders,
|
|
7
|
+
* NOT GenericCanvasInner or the Konva canvas tree.
|
|
8
|
+
*
|
|
9
|
+
* Reports toolbar state upward via onToolbarStateChange callback and
|
|
10
|
+
* exposes bridge handlers via a mutable ref for GenericCanvasInner's useImperativeHandle.
|
|
11
|
+
*/
|
|
12
|
+
import { type MutableRefObject } from 'react';
|
|
13
|
+
import type { ToolbarStateReport } from './GenericCanvas.js';
|
|
14
|
+
import type { BaseCanvasState } from '../configs/factory/baseTypes.js';
|
|
15
|
+
import type { FullCanvasConfig, LayoutResult } from '../configs/types.js';
|
|
16
|
+
import type { OptionalCanvasActions } from '../hooks/useCanvasElementHandlers.js';
|
|
17
|
+
import type { ShadowPatch } from '../hooks/useFloatingModuleHandlers.js';
|
|
18
|
+
import type { FloatingModuleState } from '../hooks/useFloatingModuleState.js';
|
|
19
|
+
import type { CanvasItem } from '../utils/canvasLayerManager.js';
|
|
20
|
+
import type { CropAspectId } from '@ggraphic/editor/utils/cropAspect';
|
|
21
|
+
import type { ImageLookId } from '@ggraphic/editor/utils/imageLook';
|
|
22
|
+
import type { GradientFill } from '@ggraphic/editor/utils/gradientFill';
|
|
23
|
+
import type { TextAlign } from '@ggraphic/editor/utils/textAlign';
|
|
24
|
+
import type Konva from 'konva';
|
|
25
|
+
export interface ToolbarBridgeState {
|
|
26
|
+
activeFloatingModule: FloatingModuleState | null;
|
|
27
|
+
handleColorSelect: (color: string) => void;
|
|
28
|
+
handleOpacityChange: (id: string, opacity: number, type: string) => void;
|
|
29
|
+
handleShadowChange: (id: string, patch: ShadowPatch, type: string) => void;
|
|
30
|
+
handleOutlineChange: (id: string, patch: {
|
|
31
|
+
stroke?: string;
|
|
32
|
+
strokeWidth?: number;
|
|
33
|
+
}) => void;
|
|
34
|
+
handleBlurChange: (id: string, blur: number) => void;
|
|
35
|
+
handleImageLookChange: (id: string, look: ImageLookId) => void;
|
|
36
|
+
handleGradientSelect: (gradient: GradientFill | null) => void;
|
|
37
|
+
handleTextAlignChange: (id: string, align: TextAlign) => void;
|
|
38
|
+
/** Ausschnitt mode for the selected framed photo. */
|
|
39
|
+
handleCropImage: () => void;
|
|
40
|
+
/** Seitenverhältnis-Vorgabe im Zuschneide-Modus eines eigenen Bildes. */
|
|
41
|
+
handleCropAspect: (id: CropAspectId) => void;
|
|
42
|
+
/** Begradigen im Zuschneide-Modus, Grad. */
|
|
43
|
+
handleCropRotation: (deg: number) => void;
|
|
44
|
+
/** „Automatisch" im Zuschneide-Modus: smartcrop wählt den Ausschnitt. */
|
|
45
|
+
handleSmartCrop: () => void;
|
|
46
|
+
/** „Erweitern" im Zuschneide-Modus: die KI ergänzt das Foto auf das Rahmenformat. */
|
|
47
|
+
handleExpandImage: () => void;
|
|
48
|
+
}
|
|
49
|
+
interface ToolbarStateBridgeProps<TState extends Record<string, unknown> & Partial<BaseCanvasState>, TActions extends OptionalCanvasActions> {
|
|
50
|
+
bridgeRef: MutableRefObject<ToolbarBridgeState | null>;
|
|
51
|
+
config: FullCanvasConfig<TState, TActions>;
|
|
52
|
+
state: TState;
|
|
53
|
+
layout: LayoutResult;
|
|
54
|
+
actions: TActions;
|
|
55
|
+
sortedRenderList: CanvasItem[];
|
|
56
|
+
setState: (partial: Partial<TState> | ((prev: TState) => TState)) => void;
|
|
57
|
+
debouncedSaveToHistory: (state: TState) => void;
|
|
58
|
+
canUndo: boolean;
|
|
59
|
+
canRedo: boolean;
|
|
60
|
+
/** Lesemodus: Drehen & Spiegeln werden nicht angeboten. */
|
|
61
|
+
readOnly: boolean;
|
|
62
|
+
saveToHistory: (state: TState) => void;
|
|
63
|
+
/** Mehrere Speicherungen als ein Verlaufsschritt (Erweitern: neue Quelle und Zuschnitt). */
|
|
64
|
+
runHistoryBatch: (fn: () => void) => void;
|
|
65
|
+
/** Zähler von „Abbrechen" je Element (`useCropSession`): Abbrechen verwirft nur dessen laufendes Erweitern. */
|
|
66
|
+
cropCancelCount: (id: string) => number;
|
|
67
|
+
/** Die Bühne der Seite: „Automatisch" liest dort das geladene Foto. */
|
|
68
|
+
getStage: () => Konva.Stage | null;
|
|
69
|
+
onToolbarStateChange?: (state: ToolbarStateReport) => void;
|
|
70
|
+
}
|
|
71
|
+
export declare function ToolbarStateBridge<TState extends Record<string, unknown> & Partial<BaseCanvasState>, TActions extends OptionalCanvasActions>({ bridgeRef, config, state, layout, actions, sortedRenderList, setState, debouncedSaveToHistory, canUndo, canRedo, readOnly, saveToHistory, runHistoryBatch, cropCancelCount, getStage, onToolbarStateChange, }: ToolbarStateBridgeProps<TState, TActions>): null;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
/**
|
|
3
|
+
* ToolbarStateBridge — Renderless component that owns all selectedElement-derived computation.
|
|
4
|
+
*
|
|
5
|
+
* This component subscribes to `selectedElement` from the Zustand store and computes
|
|
6
|
+
* derived values (activeFloatingModule, canMoveUp/Down, floating handlers).
|
|
7
|
+
* It returns null — when selectedElement changes, only this component re-renders,
|
|
8
|
+
* NOT GenericCanvasInner or the Konva canvas tree.
|
|
9
|
+
*
|
|
10
|
+
* Reports toolbar state upward via onToolbarStateChange callback and
|
|
11
|
+
* exposes bridge handlers via a mutable ref for GenericCanvasInner's useImperativeHandle.
|
|
12
|
+
*/
|
|
13
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
14
|
+
import { messages } from '@ggraphic/editor/i18n/messages';
|
|
15
|
+
import { useCanvasStore, useCanvasStoreSelector, useCanvasStoreShallow, } from '@ggraphic/editor/stores/CanvasStoreProvider';
|
|
16
|
+
import { toast } from '@ggraphic/editor/utils/editorToast';
|
|
17
|
+
import { userFacingMessage } from '@ggraphic/editor/utils/userFacingError';
|
|
18
|
+
import { useCanvasEditorServices } from '../CanvasEditorProvider.js';
|
|
19
|
+
import { useFloatingModuleHandlers } from '../hooks/useFloatingModuleHandlers.js';
|
|
20
|
+
import { useFloatingModuleState } from '../hooks/useFloatingModuleState.js';
|
|
21
|
+
import { plainImageUrls } from '../hostServices.js';
|
|
22
|
+
import { useOptionalUserUploads } from '../sidebar/UserUploadsProvider.js';
|
|
23
|
+
import { cropRotationOf, cropRotationUpdate } from '../utils/cropSession.js';
|
|
24
|
+
import { canEnterCrop } from '../utils/cropTarget.js';
|
|
25
|
+
import { cropImageSrc, expandedFileName, expandResetPatch, expandTarget, } from '../utils/expandImage.js';
|
|
26
|
+
import { pageLayerLabels } from '../utils/layerLabels.js';
|
|
27
|
+
import { fetchShareImageFile } from '../utils/mediaPlacement.js';
|
|
28
|
+
import { findOrientationDoor } from '../utils/orientElement.js';
|
|
29
|
+
import { selectionCapabilities } from '../utils/selectionCapabilities.js';
|
|
30
|
+
import { smartCropSource, smartCropUpdate, smartCropView, suggestSmartCrop, } from '../utils/smartCrop.js';
|
|
31
|
+
import { findTemplateEntry } from '../utils/templateElementInstance.js';
|
|
32
|
+
export function ToolbarStateBridge({ bridgeRef, config, state, layout, actions, sortedRenderList, setState, debouncedSaveToHistory, canUndo, canRedo, readOnly, saveToHistory, runHistoryBatch, cropCancelCount, getStage, onToolbarStateChange, }) {
|
|
33
|
+
const store = useCanvasStore();
|
|
34
|
+
const { expandImage, imageUrls = plainImageUrls } = useCanvasEditorServices();
|
|
35
|
+
const uploads = useOptionalUserUploads();
|
|
36
|
+
// Je Seite höchstens ein Erweitern zugleich; es kostet KI-Budget.
|
|
37
|
+
const [isExpanding, setIsExpanding] = useState(false);
|
|
38
|
+
const expandingRef = useRef(false);
|
|
39
|
+
const mountedRef = useRef(true);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
mountedRef.current = true;
|
|
42
|
+
return () => {
|
|
43
|
+
mountedRef.current = false;
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
const selectedElement = useCanvasStoreSelector((s) => s.selectedElement);
|
|
47
|
+
const activeFloatingModule = useFloatingModuleState({
|
|
48
|
+
selectedElement,
|
|
49
|
+
config,
|
|
50
|
+
state,
|
|
51
|
+
layout,
|
|
52
|
+
});
|
|
53
|
+
const selectedLayerIds = useCanvasStoreShallow((s) => s.selectedLayerIds);
|
|
54
|
+
// Die Ebenen-Liste der Seitenleiste liest die Seite nur über diesen Bericht.
|
|
55
|
+
const layers = useMemo(() => pageLayerLabels(sortedRenderList, state), [sortedRenderList, state]);
|
|
56
|
+
const setCroppingElement = useCanvasStoreSelector((s) => s.setCroppingElement);
|
|
57
|
+
const isCropping = useCanvasStoreSelector((s) => s.croppingElement !== null && s.croppingElement === s.selectedElement);
|
|
58
|
+
const cropAspect = useCanvasStoreSelector((s) => s.cropAspect);
|
|
59
|
+
const setCropAspect = useCanvasStoreSelector((s) => s.setCropAspect);
|
|
60
|
+
const croppingElement = useCanvasStoreSelector((s) => s.croppingElement);
|
|
61
|
+
const cropTarget = isCropping ? croppingElement : null;
|
|
62
|
+
const elements = config.elements;
|
|
63
|
+
const cropRotation = cropTarget ? cropRotationOf(state, elements, cropTarget) : 0;
|
|
64
|
+
/**
|
|
65
|
+
* Vorlagen-Grafiken liegen in keiner Sammlung des Zustands — gefunden werden
|
|
66
|
+
* sie nur über die Elementliste der Vorlage und das gerechnete Layout. Beides
|
|
67
|
+
* hat dieser Bridge, `duplicateElement` nicht (#3403).
|
|
68
|
+
*/
|
|
69
|
+
const templateEntry = useCallback((id) => findTemplateEntry(config.elements, state, layout, id), [config.elements, state, layout]);
|
|
70
|
+
// Dieselben Fragen, die die Türen beim Ausführen stellen (`utils/canvasCommands.ts`).
|
|
71
|
+
const capabilities = selectionCapabilities({
|
|
72
|
+
ids: selectedLayerIds,
|
|
73
|
+
state,
|
|
74
|
+
actions,
|
|
75
|
+
template: templateEntry,
|
|
76
|
+
renderList: sortedRenderList,
|
|
77
|
+
orient: (id) => findOrientationDoor({
|
|
78
|
+
state,
|
|
79
|
+
actions,
|
|
80
|
+
// Die Tür liest nur id, Typ und Positionsschlüssel (wie in GenericCanvas).
|
|
81
|
+
elements,
|
|
82
|
+
layout,
|
|
83
|
+
updateState: setState,
|
|
84
|
+
saveToHistory,
|
|
85
|
+
}, id),
|
|
86
|
+
readOnly,
|
|
87
|
+
});
|
|
88
|
+
const floatingHandlers = useFloatingModuleHandlers({
|
|
89
|
+
activeFloatingModule,
|
|
90
|
+
actions,
|
|
91
|
+
config,
|
|
92
|
+
state,
|
|
93
|
+
setState,
|
|
94
|
+
debouncedSaveToHistory,
|
|
95
|
+
});
|
|
96
|
+
// Nach dem Warten auf smartcrop schreibt der Stand der letzten Darstellung, nicht der beim Klick.
|
|
97
|
+
const applySmartCropRef = useRef(() => { });
|
|
98
|
+
const applyExpandRef = useRef(() => { });
|
|
99
|
+
// Write bridge state for GenericCanvasInner's useImperativeHandle.
|
|
100
|
+
// Uses useEffect (not render-time assignment) for React 19 concurrent mode safety.
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
const applyCropUpdate = (id, update) => {
|
|
103
|
+
if (update.kind === 'user-image') {
|
|
104
|
+
// updateUserImage schreibt den Verlauf selbst.
|
|
105
|
+
actions.updateUserImage?.(id, update.patch);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const next = { ...state, ...update.patch };
|
|
109
|
+
setState((prev) => ({ ...prev, ...update.patch }));
|
|
110
|
+
debouncedSaveToHistory(next);
|
|
111
|
+
};
|
|
112
|
+
bridgeRef.current = {
|
|
113
|
+
activeFloatingModule,
|
|
114
|
+
handleColorSelect: floatingHandlers.handleColorSelect,
|
|
115
|
+
handleOpacityChange: floatingHandlers.handleOpacityChange,
|
|
116
|
+
handleShadowChange: floatingHandlers.handleShadowChange,
|
|
117
|
+
handleOutlineChange: floatingHandlers.handleOutlineChange,
|
|
118
|
+
handleBlurChange: floatingHandlers.handleBlurChange,
|
|
119
|
+
handleImageLookChange: floatingHandlers.handleImageLookChange,
|
|
120
|
+
handleGradientSelect: floatingHandlers.handleGradientSelect,
|
|
121
|
+
handleTextAlignChange: floatingHandlers.handleTextAlignChange,
|
|
122
|
+
handleCropImage: () => {
|
|
123
|
+
if (isCropping)
|
|
124
|
+
setCroppingElement(null);
|
|
125
|
+
else if (selectedElement && canEnterCrop(state, elements, selectedElement)) {
|
|
126
|
+
setCroppingElement(selectedElement);
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
handleCropAspect: setCropAspect,
|
|
130
|
+
handleCropRotation: (deg) => {
|
|
131
|
+
if (!cropTarget)
|
|
132
|
+
return;
|
|
133
|
+
const update = cropRotationUpdate(state, elements, cropTarget, deg);
|
|
134
|
+
if (update)
|
|
135
|
+
applyCropUpdate(cropTarget, update);
|
|
136
|
+
},
|
|
137
|
+
handleSmartCrop: () => {
|
|
138
|
+
const id = cropTarget;
|
|
139
|
+
if (!id)
|
|
140
|
+
return;
|
|
141
|
+
const image = smartCropSource(getStage(), id);
|
|
142
|
+
const view = image
|
|
143
|
+
? smartCropView({
|
|
144
|
+
id,
|
|
145
|
+
state,
|
|
146
|
+
elements,
|
|
147
|
+
layout,
|
|
148
|
+
natural: { width: image.naturalWidth, height: image.naturalHeight },
|
|
149
|
+
})
|
|
150
|
+
: null;
|
|
151
|
+
if (!image || !view) {
|
|
152
|
+
toast.error(messages().errors.smartCropFailed);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const src = cropImageSrc(state, elements, id);
|
|
156
|
+
suggestSmartCrop(image, view).then((region) => {
|
|
157
|
+
// Inzwischen beendet oder gewechselt: nichts mehr schreiben.
|
|
158
|
+
if (store.getState().croppingElement !== id)
|
|
159
|
+
return;
|
|
160
|
+
applySmartCropRef.current(id, src, image, region);
|
|
161
|
+
}, () => toast.error(messages().errors.smartCropFailed));
|
|
162
|
+
},
|
|
163
|
+
handleExpandImage: () => {
|
|
164
|
+
const id = cropTarget;
|
|
165
|
+
if (!id || !expandImage || expandingRef.current)
|
|
166
|
+
return;
|
|
167
|
+
const target = expandTarget(state, elements, layout, id);
|
|
168
|
+
if (!target || !uploads) {
|
|
169
|
+
toast.error(messages().errors.expandFailed);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
expandingRef.current = true;
|
|
173
|
+
setIsExpanding(true);
|
|
174
|
+
// Nur „Abbrechen" verwirft; Fertig, Escape und Auswahlwechsel übernehmen das Ergebnis.
|
|
175
|
+
const cancels = cropCancelCount(id);
|
|
176
|
+
const run = async () => {
|
|
177
|
+
const source = await fetchShareImageFile(target.src, target.fileName, imageUrls);
|
|
178
|
+
const expanded = await expandImage(source, target.aspect);
|
|
179
|
+
const file = new File([expanded], expandedFileName(target.fileName, expanded.type), {
|
|
180
|
+
type: expanded.type,
|
|
181
|
+
});
|
|
182
|
+
// Wie „Ersetzen": erst hochladen, damit keine `blob:`/data-URL gespeichert wird.
|
|
183
|
+
const item = await uploads.upload(file, 'canvas-element');
|
|
184
|
+
const url = item ? imageUrls.placementUrl(item) : null;
|
|
185
|
+
if (!url)
|
|
186
|
+
throw new Error(messages().errors.expandFailed);
|
|
187
|
+
return { file, url };
|
|
188
|
+
};
|
|
189
|
+
run()
|
|
190
|
+
.then(({ file, url }) => {
|
|
191
|
+
if (cropCancelCount(id) !== cancels)
|
|
192
|
+
return;
|
|
193
|
+
applyExpandRef.current(id, target.src, file, url);
|
|
194
|
+
},
|
|
195
|
+
// Rohe Meldungen („Failed to fetch") gehören nicht in den Toast, nur ausdrücklich für Menschen geschriebene.
|
|
196
|
+
(error) => toast.error(userFacingMessage(error) ?? messages().errors.expandFailed))
|
|
197
|
+
.finally(() => {
|
|
198
|
+
expandingRef.current = false;
|
|
199
|
+
if (mountedRef.current)
|
|
200
|
+
setIsExpanding(false);
|
|
201
|
+
});
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
applySmartCropRef.current = (id, src, image, region) => {
|
|
205
|
+
// Inzwischen ersetzt (Erweitern, Ersetzen): der Vorschlag gilt für das alte Foto.
|
|
206
|
+
if (cropImageSrc(state, elements, id) !== src) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const update = smartCropUpdate({
|
|
210
|
+
id,
|
|
211
|
+
state,
|
|
212
|
+
elements,
|
|
213
|
+
layout,
|
|
214
|
+
natural: { width: image.naturalWidth, height: image.naturalHeight },
|
|
215
|
+
}, region);
|
|
216
|
+
if (update)
|
|
217
|
+
applyCropUpdate(id, update);
|
|
218
|
+
};
|
|
219
|
+
applyExpandRef.current = (id, src, file, url) => {
|
|
220
|
+
// Gelöscht oder inzwischen ersetzt: das Ergebnis gehört zum alten Foto.
|
|
221
|
+
if (cropImageSrc(state, elements, id) !== src)
|
|
222
|
+
return;
|
|
223
|
+
const reset = expandResetPatch(state, elements, id);
|
|
224
|
+
if (!reset)
|
|
225
|
+
return;
|
|
226
|
+
// „Fertig" vor dem Ersetzen: die Sitzung wird ihr eigener Schritt, das Erweitern der nächste.
|
|
227
|
+
if (store.getState().croppingElement === id)
|
|
228
|
+
store.getState().setCroppingElement(null);
|
|
229
|
+
if (reset.kind === 'user-image') {
|
|
230
|
+
// Ein Aufruf, ein Schritt; der Nachweis (`attribution`) bleibt am Bild.
|
|
231
|
+
actions.updateUserImage?.(id, { ...reset.patch, src: url, fileName: file.name });
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const background = config.background?.(state, actions);
|
|
235
|
+
const onImageChange = background?.onImageChange;
|
|
236
|
+
if (!onImageChange)
|
|
237
|
+
return;
|
|
238
|
+
runHistoryBatch(() => {
|
|
239
|
+
setState((prev) => ({ ...prev, ...reset.patch }));
|
|
240
|
+
// Ein erweitertes Stockfoto ist eine Bearbeitung desselben Fotos: der Nachweis bleibt.
|
|
241
|
+
onImageChange(file, url, background.imageAttribution ?? null);
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
});
|
|
245
|
+
// Ohne die Aktion des Hosts gibt es keine Schriftrolle, und die Leiste zeigt keine Auswahl.
|
|
246
|
+
const canChangeFontRole = !!actions.setAdditionalTextFontRole;
|
|
247
|
+
// Report toolbar state to CanvasEditor
|
|
248
|
+
useEffect(() => {
|
|
249
|
+
onToolbarStateChange?.({
|
|
250
|
+
selectedElement,
|
|
251
|
+
activeFloatingModule,
|
|
252
|
+
canUndo,
|
|
253
|
+
canRedo,
|
|
254
|
+
canMoveUp: capabilities.canBringForward,
|
|
255
|
+
canMoveDown: capabilities.canSendBackward,
|
|
256
|
+
canDuplicate: capabilities.canCopy,
|
|
257
|
+
canDelete: capabilities.canDelete,
|
|
258
|
+
isCropping,
|
|
259
|
+
cropAspect,
|
|
260
|
+
cropRotation,
|
|
261
|
+
isExpanding,
|
|
262
|
+
selectionCount: capabilities.count,
|
|
263
|
+
canCopy: capabilities.canCopy,
|
|
264
|
+
lockState: capabilities.lock,
|
|
265
|
+
canLock: capabilities.canLock,
|
|
266
|
+
canFlip: capabilities.canFlip,
|
|
267
|
+
canAlign: capabilities.canAlign,
|
|
268
|
+
canDistribute: capabilities.canDistribute,
|
|
269
|
+
canChangeFontRole,
|
|
270
|
+
layers,
|
|
271
|
+
selectedLayerIds,
|
|
272
|
+
});
|
|
273
|
+
}, [
|
|
274
|
+
isCropping,
|
|
275
|
+
cropAspect,
|
|
276
|
+
cropRotation,
|
|
277
|
+
isExpanding,
|
|
278
|
+
selectedElement,
|
|
279
|
+
activeFloatingModule,
|
|
280
|
+
canUndo,
|
|
281
|
+
canRedo,
|
|
282
|
+
capabilities.canBringForward,
|
|
283
|
+
capabilities.canSendBackward,
|
|
284
|
+
capabilities.canCopy,
|
|
285
|
+
capabilities.canDelete,
|
|
286
|
+
capabilities.count,
|
|
287
|
+
capabilities.lock,
|
|
288
|
+
capabilities.canLock,
|
|
289
|
+
capabilities.canFlip,
|
|
290
|
+
capabilities.canAlign,
|
|
291
|
+
capabilities.canDistribute,
|
|
292
|
+
canChangeFontRole,
|
|
293
|
+
layers,
|
|
294
|
+
selectedLayerIds,
|
|
295
|
+
onToolbarStateChange,
|
|
296
|
+
]);
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autosave status as a single glyph: spinner while saving, a check that fades
|
|
3
|
+
* after two seconds, a retry button on error. Shared by the desktop rail and
|
|
4
|
+
* the mobile menu bar (`onDark`).
|
|
5
|
+
*/
|
|
6
|
+
export declare function AutoSaveIndicator({ onDark }: {
|
|
7
|
+
onDark?: boolean;
|
|
8
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
import { useMessages } from '@ggraphic/editor/i18n/messages';
|
|
4
|
+
import { useAutoSaveStore } from '@ggraphic/editor/stores/useAutoSaveStore';
|
|
5
|
+
import { cn } from '@ggraphic/editor/utils/cn';
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
import { PiCheck, PiWarning } from 'react-icons/pi';
|
|
8
|
+
/**
|
|
9
|
+
* Autosave status as a single glyph: spinner while saving, a check that fades
|
|
10
|
+
* after two seconds, a retry button on error. Shared by the desktop rail and
|
|
11
|
+
* the mobile menu bar (`onDark`).
|
|
12
|
+
*/
|
|
13
|
+
export function AutoSaveIndicator({ onDark = false }) {
|
|
14
|
+
const t = useMessages();
|
|
15
|
+
const autoSaveStatus = useAutoSaveStore((s) => s.autoSaveStatus);
|
|
16
|
+
const retryAutoSave = useAutoSaveStore((s) => s.retryAutoSave);
|
|
17
|
+
const [showSaved, setShowSaved] = useState(false);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (autoSaveStatus === 'saved') {
|
|
20
|
+
setShowSaved(true);
|
|
21
|
+
const timer = setTimeout(() => setShowSaved(false), 2000);
|
|
22
|
+
return () => clearTimeout(timer);
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}, [autoSaveStatus]);
|
|
26
|
+
if (!autoSaveStatus)
|
|
27
|
+
return null;
|
|
28
|
+
const statusText = autoSaveStatus === 'saving'
|
|
29
|
+
? t.topBar.saveShort
|
|
30
|
+
: autoSaveStatus === 'saved'
|
|
31
|
+
? t.topBar.saved
|
|
32
|
+
: autoSaveStatus === 'error'
|
|
33
|
+
? t.topBar.saveErrorShort
|
|
34
|
+
: '';
|
|
35
|
+
return (_jsxs("div", { className: cn('flex items-center justify-center size-10 opacity-0 transition-opacity duration-300', (autoSaveStatus === 'saving' || autoSaveStatus === 'error' || showSaved) && 'opacity-100'), role: "status", title: autoSaveStatus === 'saving'
|
|
36
|
+
? t.topBar.saving
|
|
37
|
+
: autoSaveStatus === 'saved'
|
|
38
|
+
? t.topBar.saved
|
|
39
|
+
: autoSaveStatus === 'error'
|
|
40
|
+
? t.topBar.saveErrorRetry
|
|
41
|
+
: '', children: [_jsx("span", { className: "sr-only", children: statusText }), autoSaveStatus === 'saving' && (_jsx("div", { "aria-hidden": "true", className: cn('size-4 border-2 rounded-full animate-auto-save-spin', onDark
|
|
42
|
+
? 'border-white/30 border-t-white'
|
|
43
|
+
: 'border-[var(--border-subtle)] border-t-[var(--interactive-accent-color)]') })), showSaved && (_jsx(PiCheck, { "aria-hidden": "true", size: 14, className: cn('animate-auto-save-check', onDark ? 'text-white' : 'text-green-500') })), autoSaveStatus === 'error' && (_jsx("button", { className: "touch-target bg-transparent border-none p-0 cursor-pointer flex items-center justify-center min-w-6 min-h-6", onClick: () => retryAutoSave?.(), "aria-label": t.topBar.saveRetry, type: "button", children: _jsx(PiWarning, { "aria-hidden": "true", size: 14, className: onDark ? 'text-amber-300' : 'text-red-500' }) }))] }));
|
|
44
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { type FontRole } from '@ggraphic/core';
|
|
2
|
+
import { type BackgroundControls } from '@ggraphic/editor/configs/types';
|
|
3
|
+
import { type FloatingModuleState } from '@ggraphic/editor/hooks/useFloatingModuleState';
|
|
4
|
+
import { type SelectionGeometry } from '@ggraphic/editor/utils/canvasCommands';
|
|
5
|
+
import { type CropAspectId } from '@ggraphic/editor/utils/cropAspect';
|
|
6
|
+
import { type ImageLookId } from '@ggraphic/editor/utils/imageLook';
|
|
7
|
+
import { type LockState } from '@ggraphic/editor/utils/layerLock';
|
|
8
|
+
import { type TextAlign } from '@ggraphic/editor/utils/textAlign';
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { type PositionCommandId } from '@ggraphic/editor/components/TopBar/modules/FloatingPositionControl';
|
|
11
|
+
export interface ContextControlsProps {
|
|
12
|
+
selectedElement: string | null;
|
|
13
|
+
activeFloatingModule: FloatingModuleState | null;
|
|
14
|
+
canMoveUp: boolean;
|
|
15
|
+
canMoveDown: boolean;
|
|
16
|
+
/** Vorlagen-Elemente und Icons lassen sich nicht duplizieren — der Knopf
|
|
17
|
+
* bleibt sichtbar und ausgegraut, statt zu verschwinden. */
|
|
18
|
+
canDuplicate: boolean;
|
|
19
|
+
/** The selected framed photo is in Ausschnitt mode. */
|
|
20
|
+
isCropping?: boolean;
|
|
21
|
+
/** Seitenverhältnis-Vorgabe im Zuschneide-Modus (nur eigene Bilder). */
|
|
22
|
+
cropAspect?: CropAspectId;
|
|
23
|
+
/** Begradigungs-Winkel des Fotos im Zuschneide-Modus (Grad). */
|
|
24
|
+
cropRotation?: number;
|
|
25
|
+
/** Läuft ein „Erweitern" (KI): der Knopf wartet. */
|
|
26
|
+
isExpanding?: boolean;
|
|
27
|
+
/** Gesperrt: nicht ziehen, skalieren, ausrichten, löschen — gestalten geht weiter. */
|
|
28
|
+
lockState?: LockState;
|
|
29
|
+
canLock?: boolean;
|
|
30
|
+
/** Lässt sich die Auswahl verschieben — Ausrichten und Position (`selectionCapabilities`). */
|
|
31
|
+
canAlign?: boolean;
|
|
32
|
+
/** Bietet der Host die Schriftrolle an? Erst dann zeigen freie Texte die Auswahl (`handlers.handleFontRoleChange`). */
|
|
33
|
+
canChangeFontRole?: boolean;
|
|
34
|
+
/** Zählt hoch, wenn das Kontextmenü „Bild ersetzen …“ wählt: die Bildauswahl öffnet sich. */
|
|
35
|
+
backgroundPickerRequest?: number;
|
|
36
|
+
handlers: {
|
|
37
|
+
handleMoveLayer: (direction: 'up' | 'down') => void;
|
|
38
|
+
handleDuplicate: () => void;
|
|
39
|
+
handleColorSelect: (color: string) => void;
|
|
40
|
+
handleOpacityChange: (id: string, opacity: number, type: string) => void;
|
|
41
|
+
handleFontSizeChange: (id: string, size: number) => void;
|
|
42
|
+
/** Die Schrift eines freien Textes als Rolle der Marke (Überschrift, Text, Schmal, Akzent). */
|
|
43
|
+
handleFontRoleChange?: (id: string, role: FontRole) => void;
|
|
44
|
+
/** Ausrichten und Position laufen über die Befehls-Türen der Seite. */
|
|
45
|
+
runCommand?: (id: PositionCommandId) => void;
|
|
46
|
+
getGeometry?: () => SelectionGeometry | null;
|
|
47
|
+
handlePositionChange?: (patch: {
|
|
48
|
+
x?: number;
|
|
49
|
+
y?: number;
|
|
50
|
+
}) => void;
|
|
51
|
+
handleSizeChange?: (patch: {
|
|
52
|
+
width?: number;
|
|
53
|
+
height?: number;
|
|
54
|
+
}) => void;
|
|
55
|
+
handleBlurChange?: (id: string, blur: number) => void;
|
|
56
|
+
/** Look of the selected image: one choice, one history entry. */
|
|
57
|
+
handleImageLookChange?: (id: string, look: ImageLookId) => void;
|
|
58
|
+
/** Ausschnitt mode for a framed photo: the photo moves inside its frame. */
|
|
59
|
+
handleCropImage?: () => void;
|
|
60
|
+
/** Im Zuschneide-Modus: zurück zum Stand beim Betreten bzw. übernehmen. */
|
|
61
|
+
handleCancelCrop?: () => void;
|
|
62
|
+
handleFinishCrop?: () => void;
|
|
63
|
+
handleCropAspect?: (id: CropAspectId) => void;
|
|
64
|
+
handleCropRotation?: (deg: number) => void;
|
|
65
|
+
handleSmartCrop?: () => void;
|
|
66
|
+
handleExpandImage?: () => void;
|
|
67
|
+
/** Ausrichtung des Textes in seiner Box — freie und Vorlagen-Texte. */
|
|
68
|
+
handleTextAlignChange?: (id: string, align: TextAlign) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Schreibt den ausgezeichneten Text eines nur ausgewählten Textes (Fett, Akzent, Liste … für
|
|
71
|
+
* den ganzen Text), als ein Schritt. Ohne sie zeigt die Leiste diese Knöpfe nicht.
|
|
72
|
+
*/
|
|
73
|
+
handleTextFormatChange?: (id: string, text: string) => void;
|
|
74
|
+
handleToggleLock?: () => void;
|
|
75
|
+
/** Opens the image-adjust (t.topBar.edit) panel for the selected image. */
|
|
76
|
+
onEditImage?: () => void;
|
|
77
|
+
/** Opens the „Effekte“ area: gradient, outline and shadow of the selection. */
|
|
78
|
+
onOpenEffects?: () => void;
|
|
79
|
+
};
|
|
80
|
+
/** The page's background controls (colour plane and photo), if the template has them. */
|
|
81
|
+
background?: BackgroundControls | null;
|
|
82
|
+
/** Removes one own image by id — not "the selection", which can change meanwhile. */
|
|
83
|
+
onRemoveUserImage?: (id: string) => void;
|
|
84
|
+
/** Mobil, im „Auswahl“-Block des Sheets: die Seite löschen. */
|
|
85
|
+
onDeletePage?: () => void;
|
|
86
|
+
/** Clears the element selection. Escape does the same, but is invisible. */
|
|
87
|
+
onDeselect?: () => void;
|
|
88
|
+
/** Duplizieren, Sperren und Abwählen liegen in der Pille (`SelectionPill`), nicht hier. */
|
|
89
|
+
hideObjectActions?: boolean;
|
|
90
|
+
/** Anordnung der Zuschneide-Leiste; mobil mit eigener Begradigen-Zeile und festen Ausgängen. */
|
|
91
|
+
cropLayout?: 'inline' | 'mobile';
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Ist die Auswahl ein Objekt auf der Seite? Fläche und Hintergrundfoto sind es
|
|
95
|
+
* nicht: kein Duplizieren, keine Ebene, keine Pille.
|
|
96
|
+
*/
|
|
97
|
+
export declare function hasObjectActions(module: FloatingModuleState | null): boolean;
|
|
98
|
+
/** Läuft ein Zuschneide-Modus, zeigt die Leiste nur ihn (`CropModeControls`). */
|
|
99
|
+
export declare function showsCropModeBar({ isCropping, handlers, }: Pick<ContextControlsProps, 'isCropping' | 'handlers'>): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* ContextControls — the selection-driven formatting controls (color, font size,
|
|
102
|
+
* alignment, opacity, layer order, duplicate, lock, delete; delete page in the
|
|
103
|
+
* mobile sheet). Shared between the desktop
|
|
104
|
+
* floating ContextToolbar and the mobile bottom context row; owns its own
|
|
105
|
+
* color-picker expansion state. Renders nothing when there is no active module.
|
|
106
|
+
*/
|
|
107
|
+
export declare function ContextControls({ selectedElement, activeFloatingModule, canMoveUp, canMoveDown, canDuplicate, isCropping, cropAspect, cropRotation, isExpanding, lockState, canLock, canAlign, canChangeFontRole, backgroundPickerRequest, handlers, background, onRemoveUserImage, onDeletePage, onDeselect, hideObjectActions, cropLayout, }: ContextControlsProps): React.JSX.Element;
|