@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,19 @@
|
|
|
1
|
+
import { type FrameCategory, type FrameClipType, type FrameInstance } from '@ggraphic/core';
|
|
2
|
+
import type { IconType } from 'react-icons';
|
|
3
|
+
export { type FrameCategory, type FrameClipType, type FrameInstance } from '@ggraphic/core';
|
|
4
|
+
export interface FramePreset<T extends FrameClipType = FrameClipType> {
|
|
5
|
+
id: T;
|
|
6
|
+
name: string;
|
|
7
|
+
tags: readonly string[];
|
|
8
|
+
category: FrameCategory;
|
|
9
|
+
}
|
|
10
|
+
export declare const FRAME_PRESETS: ReadonlyArray<FramePreset>;
|
|
11
|
+
export declare const getFramePreset: <T extends FrameClipType>(type: T) => FramePreset<T>;
|
|
12
|
+
/**
|
|
13
|
+
* Display order (top-to-bottom) for category subheaders in the Rahmen panel.
|
|
14
|
+
*/
|
|
15
|
+
export declare const FRAME_CATEGORY_ORDER: readonly FrameCategory[];
|
|
16
|
+
export declare const FRAME_ICON_MAP: Record<FrameClipType, IconType>;
|
|
17
|
+
export declare const FRAME_PRESET_PATHS: Record<FrameClipType, string>;
|
|
18
|
+
export declare const DEFAULT_FRAME_SIZE = 300;
|
|
19
|
+
export declare function createFrameInstance(clipType: FrameClipType, x: number, y: number): FrameInstance;
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { PiCircleFill, PiCircleDashedBold, PiCloudFill, PiChatCircleFill, PiDiamondFill, PiDropFill, PiEggFill, PiFrameCornersFill, PiHeartFill, PiHexagonFill, PiLeafFill, PiOctagonFill, PiSquareFill, PiStarFill, PiTagFill, PiTriangleFill, } from 'react-icons/pi';
|
|
2
|
+
import { activeBrand } from '@ggraphic/editor/brand/brandRegistry';
|
|
3
|
+
import { messages } from '@ggraphic/editor/i18n/messages';
|
|
4
|
+
/**
|
|
5
|
+
* Source of truth for frame metadata. Typed as `{ [K in FrameClipType]: FramePreset<K> }`
|
|
6
|
+
* so adding a new FrameClipType without registering it here is a compile error.
|
|
7
|
+
* Each entry's `id` is bound to its key. Object key insertion order is the
|
|
8
|
+
* fallback search order; FRAME_PRESETS is derived.
|
|
9
|
+
*/
|
|
10
|
+
const FRAME_PRESET_DEFS = {
|
|
11
|
+
circle: {
|
|
12
|
+
id: 'circle',
|
|
13
|
+
get name() {
|
|
14
|
+
return messages().frames['circle'];
|
|
15
|
+
},
|
|
16
|
+
tags: ['kreis', 'circle', 'rund', 'round', 'rahmen', 'frame', 'bild', 'foto'],
|
|
17
|
+
category: 'soft',
|
|
18
|
+
},
|
|
19
|
+
oval: {
|
|
20
|
+
id: 'oval',
|
|
21
|
+
get name() {
|
|
22
|
+
return messages().frames['oval'];
|
|
23
|
+
},
|
|
24
|
+
tags: ['oval', 'ellipse', 'ei', 'egg', 'rahmen', 'frame'],
|
|
25
|
+
category: 'soft',
|
|
26
|
+
},
|
|
27
|
+
ring: {
|
|
28
|
+
id: 'ring',
|
|
29
|
+
get name() {
|
|
30
|
+
return messages().frames['ring'];
|
|
31
|
+
},
|
|
32
|
+
tags: ['ring', 'donut', 'kranz', 'rahmen', 'frame'],
|
|
33
|
+
category: 'soft',
|
|
34
|
+
},
|
|
35
|
+
square: {
|
|
36
|
+
id: 'square',
|
|
37
|
+
get name() {
|
|
38
|
+
return messages().frames['square'];
|
|
39
|
+
},
|
|
40
|
+
tags: ['rechteck', 'quadrat', 'square', 'rahmen', 'frame', 'eckig'],
|
|
41
|
+
category: 'geometric',
|
|
42
|
+
},
|
|
43
|
+
'rounded-rect': {
|
|
44
|
+
id: 'rounded-rect',
|
|
45
|
+
get name() {
|
|
46
|
+
return messages().frames['rounded-rect'];
|
|
47
|
+
},
|
|
48
|
+
tags: ['rechteck', 'rectangle', 'rahmen', 'frame', 'bild', 'foto', 'abgerundet', 'rounded'],
|
|
49
|
+
category: 'geometric',
|
|
50
|
+
},
|
|
51
|
+
triangle: {
|
|
52
|
+
id: 'triangle',
|
|
53
|
+
get name() {
|
|
54
|
+
return messages().frames['triangle'];
|
|
55
|
+
},
|
|
56
|
+
tags: ['dreieck', 'triangle', 'rahmen', 'frame', 'spitz'],
|
|
57
|
+
category: 'geometric',
|
|
58
|
+
},
|
|
59
|
+
diamond: {
|
|
60
|
+
id: 'diamond',
|
|
61
|
+
get name() {
|
|
62
|
+
return messages().frames['diamond'];
|
|
63
|
+
},
|
|
64
|
+
tags: ['raute', 'diamond', 'rhombus', 'karo', 'rahmen', 'frame'],
|
|
65
|
+
category: 'geometric',
|
|
66
|
+
},
|
|
67
|
+
pentagon: {
|
|
68
|
+
id: 'pentagon',
|
|
69
|
+
get name() {
|
|
70
|
+
return messages().frames['pentagon'];
|
|
71
|
+
},
|
|
72
|
+
tags: ['fuenfeck', 'fünfeck', 'pentagon', 'rahmen', 'frame'],
|
|
73
|
+
category: 'geometric',
|
|
74
|
+
},
|
|
75
|
+
hexagon: {
|
|
76
|
+
id: 'hexagon',
|
|
77
|
+
get name() {
|
|
78
|
+
return messages().frames['hexagon'];
|
|
79
|
+
},
|
|
80
|
+
tags: ['sechseck', 'hexagon', 'wabe', 'rahmen', 'frame'],
|
|
81
|
+
category: 'geometric',
|
|
82
|
+
},
|
|
83
|
+
octagon: {
|
|
84
|
+
id: 'octagon',
|
|
85
|
+
get name() {
|
|
86
|
+
return messages().frames['octagon'];
|
|
87
|
+
},
|
|
88
|
+
tags: ['achteck', 'octagon', 'rahmen', 'frame', 'stop'],
|
|
89
|
+
category: 'geometric',
|
|
90
|
+
},
|
|
91
|
+
arch: {
|
|
92
|
+
id: 'arch',
|
|
93
|
+
get name() {
|
|
94
|
+
return messages().frames['arch'];
|
|
95
|
+
},
|
|
96
|
+
tags: ['bogen', 'arch', 'tor', 'fenster', 'rahmen', 'frame'],
|
|
97
|
+
category: 'geometric',
|
|
98
|
+
},
|
|
99
|
+
drop: {
|
|
100
|
+
id: 'drop',
|
|
101
|
+
get name() {
|
|
102
|
+
return messages().frames['drop'];
|
|
103
|
+
},
|
|
104
|
+
tags: ['tropfen', 'drop', 'wasser', 'rahmen', 'frame'],
|
|
105
|
+
category: 'organic',
|
|
106
|
+
},
|
|
107
|
+
leaf: {
|
|
108
|
+
id: 'leaf',
|
|
109
|
+
get name() {
|
|
110
|
+
return messages().frames['leaf'];
|
|
111
|
+
},
|
|
112
|
+
tags: ['blatt', 'leaf', 'natur', 'gruen', 'rahmen', 'frame'],
|
|
113
|
+
category: 'organic',
|
|
114
|
+
},
|
|
115
|
+
heart: {
|
|
116
|
+
id: 'heart',
|
|
117
|
+
get name() {
|
|
118
|
+
return messages().frames['heart'];
|
|
119
|
+
},
|
|
120
|
+
tags: ['herz', 'heart', 'liebe', 'love', 'rahmen', 'frame'],
|
|
121
|
+
category: 'organic',
|
|
122
|
+
},
|
|
123
|
+
cloud: {
|
|
124
|
+
id: 'cloud',
|
|
125
|
+
get name() {
|
|
126
|
+
return messages().frames['cloud'];
|
|
127
|
+
},
|
|
128
|
+
tags: ['wolke', 'cloud', 'himmel', 'rahmen', 'frame'],
|
|
129
|
+
category: 'organic',
|
|
130
|
+
},
|
|
131
|
+
blob: {
|
|
132
|
+
id: 'blob',
|
|
133
|
+
get name() {
|
|
134
|
+
return messages().frames['blob'];
|
|
135
|
+
},
|
|
136
|
+
tags: ['blob', 'organisch', 'klecks', 'rahmen', 'frame', 'modern'],
|
|
137
|
+
category: 'organic',
|
|
138
|
+
},
|
|
139
|
+
star: {
|
|
140
|
+
id: 'star',
|
|
141
|
+
get name() {
|
|
142
|
+
return messages().frames['star'];
|
|
143
|
+
},
|
|
144
|
+
tags: ['stern', 'star', 'rahmen', 'frame'],
|
|
145
|
+
category: 'stars',
|
|
146
|
+
},
|
|
147
|
+
'speech-bubble': {
|
|
148
|
+
id: 'speech-bubble',
|
|
149
|
+
get name() {
|
|
150
|
+
return messages().frames['speech-bubble'];
|
|
151
|
+
},
|
|
152
|
+
tags: ['sprechblase', 'speech', 'bubble', 'zitat', 'quote', 'rahmen', 'frame'],
|
|
153
|
+
category: 'speech',
|
|
154
|
+
},
|
|
155
|
+
'banner-tag': {
|
|
156
|
+
id: 'banner-tag',
|
|
157
|
+
get name() {
|
|
158
|
+
return messages().frames['banner-tag'];
|
|
159
|
+
},
|
|
160
|
+
tags: ['etikett', 'tag', 'label', 'banner', 'rahmen', 'frame'],
|
|
161
|
+
category: 'banners',
|
|
162
|
+
},
|
|
163
|
+
ribbon: {
|
|
164
|
+
id: 'ribbon',
|
|
165
|
+
get name() {
|
|
166
|
+
return messages().frames['ribbon'];
|
|
167
|
+
},
|
|
168
|
+
tags: ['banner', 'ribbon', 'fahne', 'header', 'rahmen', 'frame'],
|
|
169
|
+
category: 'banners',
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
export const FRAME_PRESETS = Object.values(FRAME_PRESET_DEFS);
|
|
173
|
+
export const getFramePreset = (type) => FRAME_PRESET_DEFS[type];
|
|
174
|
+
/**
|
|
175
|
+
* Display order (top-to-bottom) for category subheaders in the Rahmen panel.
|
|
176
|
+
*/
|
|
177
|
+
export const FRAME_CATEGORY_ORDER = [
|
|
178
|
+
'geometric',
|
|
179
|
+
'soft',
|
|
180
|
+
'organic',
|
|
181
|
+
'stars',
|
|
182
|
+
'speech',
|
|
183
|
+
'banners',
|
|
184
|
+
];
|
|
185
|
+
export const FRAME_ICON_MAP = {
|
|
186
|
+
circle: PiCircleFill,
|
|
187
|
+
'rounded-rect': PiFrameCornersFill,
|
|
188
|
+
square: PiSquareFill,
|
|
189
|
+
oval: PiEggFill,
|
|
190
|
+
hexagon: PiHexagonFill,
|
|
191
|
+
diamond: PiDiamondFill,
|
|
192
|
+
drop: PiDropFill,
|
|
193
|
+
leaf: PiLeafFill,
|
|
194
|
+
star: PiStarFill,
|
|
195
|
+
heart: PiHeartFill,
|
|
196
|
+
cloud: PiCloudFill,
|
|
197
|
+
blob: PiCircleFill,
|
|
198
|
+
arch: PiFrameCornersFill,
|
|
199
|
+
octagon: PiOctagonFill,
|
|
200
|
+
pentagon: PiHexagonFill,
|
|
201
|
+
triangle: PiTriangleFill,
|
|
202
|
+
'speech-bubble': PiChatCircleFill,
|
|
203
|
+
'banner-tag': PiTagFill,
|
|
204
|
+
ring: PiCircleDashedBold,
|
|
205
|
+
ribbon: PiTagFill,
|
|
206
|
+
};
|
|
207
|
+
// SVG path strings for each frame silhouette, normalized to a 44x44 viewBox.
|
|
208
|
+
// Used to render filled mini-previews in the sidebar preset grid (Canva-style).
|
|
209
|
+
export const FRAME_PRESET_PATHS = {
|
|
210
|
+
circle: 'M22 2 a20 20 0 1 0 0 40 a20 20 0 1 0 0 -40',
|
|
211
|
+
'rounded-rect': 'M8 2 h28 a6 6 0 0 1 6 6 v28 a6 6 0 0 1 -6 6 h-28 a6 6 0 0 1 -6 -6 v-28 a6 6 0 0 1 6 -6 z',
|
|
212
|
+
square: 'M2 2 h40 v40 h-40 z',
|
|
213
|
+
oval: 'M22 2 a14 20 0 1 0 0 40 a14 20 0 1 0 0 -40',
|
|
214
|
+
hexagon: 'M22 2 L40 12 L40 32 L22 42 L4 32 L4 12 z',
|
|
215
|
+
diamond: 'M22 2 L42 22 L22 42 L2 22 z',
|
|
216
|
+
drop: 'M22 2 C 8 16, 8 36, 22 42 C 36 36, 36 16, 22 2 z',
|
|
217
|
+
leaf: 'M2 42 C 2 12, 12 2, 42 2 C 42 32, 32 42, 2 42 z',
|
|
218
|
+
// 5-point star
|
|
219
|
+
star: 'M22 2 L27 16 L42 16 L30 25 L34 40 L22 31 L10 40 L14 25 L2 16 L17 16 z',
|
|
220
|
+
// Classic rounded heart
|
|
221
|
+
heart: 'M22 40 C 22 40 4 28 4 14 C 4 5 13 2 22 12 C 31 2 40 5 40 14 C 40 28 22 40 22 40 z',
|
|
222
|
+
// Soft 3-bump cloud
|
|
223
|
+
cloud: 'M14 32 C 6 32 2 26 5 20 C 7 14 14 13 17 17 C 18 9 28 7 33 14 C 38 9 42 14 42 20 C 42 28 36 32 30 31 C 26 35 18 35 14 32 z',
|
|
224
|
+
// Asymmetric organic blob
|
|
225
|
+
blob: 'M22 2 C 33 4 41 12 42 22 C 42 32 35 41 24 42 C 14 43 4 36 2 26 C 0 16 7 7 14 4 C 17 3 19 2 22 2 z',
|
|
226
|
+
// Round-top, flat-bottom arch (window/door shape)
|
|
227
|
+
arch: 'M2 42 L2 22 C 2 11 11 2 22 2 C 33 2 42 11 42 22 L42 42 z',
|
|
228
|
+
// Regular 8-sided octagon
|
|
229
|
+
octagon: 'M14 2 L30 2 L42 14 L42 30 L30 42 L14 42 L2 30 L2 14 z',
|
|
230
|
+
// Regular 5-sided pentagon
|
|
231
|
+
pentagon: 'M22 2 L42 16 L34 40 L10 40 L2 16 z',
|
|
232
|
+
// Equilateral triangle (point up)
|
|
233
|
+
triangle: 'M22 2 L42 40 L2 40 z',
|
|
234
|
+
// Speech bubble with bottom-left tail
|
|
235
|
+
'speech-bubble': 'M2 4 L42 4 L42 32 L20 32 L10 42 L12 32 L2 32 z',
|
|
236
|
+
// Banner-tag: rect with chevron-cut left side (price-tag style)
|
|
237
|
+
'banner-tag': 'M2 22 L12 4 L42 4 L42 40 L12 40 z',
|
|
238
|
+
// Annular ring (donut) — outer + inner subpaths; even-odd fill in <path fill-rule="evenodd"> usage
|
|
239
|
+
ring: 'M22 2 a20 20 0 1 0 0 40 a20 20 0 1 0 0 -40 z M22 14 a8 8 0 1 0 0 16 a8 8 0 1 0 0 -16 z',
|
|
240
|
+
// Ribbon: rectangular middle with chevron tails left and right
|
|
241
|
+
ribbon: 'M2 14 L10 22 L2 30 L14 30 L14 38 L30 38 L30 30 L42 30 L34 22 L42 14 L30 14 L30 6 L14 6 L14 14 z',
|
|
242
|
+
};
|
|
243
|
+
export const DEFAULT_FRAME_SIZE = 300;
|
|
244
|
+
/**
|
|
245
|
+
* Per-clip-type initial dimensions. Frames whose silhouette is naturally
|
|
246
|
+
* non-square (banners, arches, ribbons) open at a sensible aspect ratio.
|
|
247
|
+
* Anything not listed defaults to DEFAULT_FRAME_SIZE × DEFAULT_FRAME_SIZE.
|
|
248
|
+
*/
|
|
249
|
+
const DEFAULT_FRAME_DIMENSIONS = {
|
|
250
|
+
arch: { width: 300, height: 380 },
|
|
251
|
+
'speech-bubble': { width: 360, height: 300 },
|
|
252
|
+
'banner-tag': { width: 380, height: 220 },
|
|
253
|
+
ribbon: { width: 380, height: 220 },
|
|
254
|
+
oval: { width: 300, height: 220 },
|
|
255
|
+
};
|
|
256
|
+
let instanceCounter = 0;
|
|
257
|
+
export function createFrameInstance(clipType, x, y) {
|
|
258
|
+
instanceCounter += 1;
|
|
259
|
+
const dims = DEFAULT_FRAME_DIMENSIONS[clipType] ?? {
|
|
260
|
+
width: DEFAULT_FRAME_SIZE,
|
|
261
|
+
height: DEFAULT_FRAME_SIZE,
|
|
262
|
+
};
|
|
263
|
+
return {
|
|
264
|
+
id: `frame-${Date.now()}-${instanceCounter}`,
|
|
265
|
+
clipType,
|
|
266
|
+
x,
|
|
267
|
+
y,
|
|
268
|
+
width: dims.width,
|
|
269
|
+
height: dims.height,
|
|
270
|
+
rotation: 0,
|
|
271
|
+
scaleX: 1,
|
|
272
|
+
scaleY: 1,
|
|
273
|
+
opacity: 1,
|
|
274
|
+
imageSrc: null,
|
|
275
|
+
imageOffsetX: 0,
|
|
276
|
+
imageOffsetY: 0,
|
|
277
|
+
imageScale: 1,
|
|
278
|
+
borderColor: activeBrand().colors.primary,
|
|
279
|
+
borderWidth: 3,
|
|
280
|
+
cornerRadius: clipType === 'rounded-rect' ? 24 : 0,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gradient fill for shapes and text.
|
|
3
|
+
*
|
|
4
|
+
* Stored on an instance as an optional `fillGradient`. When present it overrides
|
|
5
|
+
* the solid `fill`. The render helper converts the angle + stops into the Konva
|
|
6
|
+
* `fillLinearGradient*` props relative to a node's bounding box; a radial fill
|
|
7
|
+
* (only the sharepic composer writes one) runs from the box centre to its corners.
|
|
8
|
+
*/
|
|
9
|
+
import { type GradientFill } from '@ggraphic/core';
|
|
10
|
+
export { type GradientFill, type GradientStop } from '@ggraphic/core';
|
|
11
|
+
export interface KonvaLinearGradientProps {
|
|
12
|
+
fillLinearGradientStartPoint: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
fillLinearGradientEndPoint: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
fillLinearGradientColorStops: Array<number | string>;
|
|
21
|
+
}
|
|
22
|
+
export interface KonvaRadialGradientProps {
|
|
23
|
+
fillRadialGradientStartPoint: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
fillRadialGradientEndPoint: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
};
|
|
31
|
+
fillRadialGradientStartRadius: number;
|
|
32
|
+
fillRadialGradientEndRadius: number;
|
|
33
|
+
fillRadialGradientColorStops: Array<number | string>;
|
|
34
|
+
}
|
|
35
|
+
export interface LocalRect {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Konva paints gradients in the node's local coordinate space. Given the node's
|
|
43
|
+
* local bounding box (from `node.getSelfRect()` — works for both top-left origin
|
|
44
|
+
* shapes like Rect/Text and center-origin shapes like Circle/Star), project the
|
|
45
|
+
* gradient angle onto the box so the axis spans corner to corner in any
|
|
46
|
+
* direction, centered on the box.
|
|
47
|
+
*/
|
|
48
|
+
export declare function gradientToKonvaProps(gradient: GradientFill, rect: LocalRect): KonvaLinearGradientProps;
|
|
49
|
+
/** Konva fill props for either kind, with the `fillPriority` that makes Konva paint it. */
|
|
50
|
+
export declare function gradientFillProps(gradient: GradientFill, rect: LocalRect): (KonvaLinearGradientProps & {
|
|
51
|
+
fillPriority: 'linear-gradient';
|
|
52
|
+
}) | (KonvaRadialGradientProps & {
|
|
53
|
+
fillPriority: 'radial-gradient';
|
|
54
|
+
});
|
|
55
|
+
export declare function createDefaultGradient(baseColor: string): GradientFill;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Gradient fill for shapes and text.
|
|
4
|
+
*
|
|
5
|
+
* Stored on an instance as an optional `fillGradient`. When present it overrides
|
|
6
|
+
* the solid `fill`. The render helper converts the angle + stops into the Konva
|
|
7
|
+
* `fillLinearGradient*` props relative to a node's bounding box; a radial fill
|
|
8
|
+
* (only the sharepic composer writes one) runs from the box centre to its corners.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Konva paints gradients in the node's local coordinate space. Given the node's
|
|
12
|
+
* local bounding box (from `node.getSelfRect()` — works for both top-left origin
|
|
13
|
+
* shapes like Rect/Text and center-origin shapes like Circle/Star), project the
|
|
14
|
+
* gradient angle onto the box so the axis spans corner to corner in any
|
|
15
|
+
* direction, centered on the box.
|
|
16
|
+
*/
|
|
17
|
+
export function gradientToKonvaProps(gradient, rect) {
|
|
18
|
+
const rad = (gradient.angle * Math.PI) / 180;
|
|
19
|
+
const dx = Math.cos(rad);
|
|
20
|
+
const dy = Math.sin(rad);
|
|
21
|
+
const cx = rect.x + rect.width / 2;
|
|
22
|
+
const cy = rect.y + rect.height / 2;
|
|
23
|
+
const ex = (rect.width / 2) * dx;
|
|
24
|
+
const ey = (rect.height / 2) * dy;
|
|
25
|
+
return {
|
|
26
|
+
fillLinearGradientStartPoint: { x: cx - ex, y: cy - ey },
|
|
27
|
+
fillLinearGradientEndPoint: { x: cx + ex, y: cy + ey },
|
|
28
|
+
fillLinearGradientColorStops: gradient.stops.flatMap((s) => [s.offset, s.color]),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** Konva fill props for either kind, with the `fillPriority` that makes Konva paint it. */
|
|
32
|
+
export function gradientFillProps(gradient, rect) {
|
|
33
|
+
if (gradient.type === 'radial') {
|
|
34
|
+
const centre = gradient.centre
|
|
35
|
+
? { x: rect.x + gradient.centre.x, y: rect.y + gradient.centre.y }
|
|
36
|
+
: { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 };
|
|
37
|
+
return {
|
|
38
|
+
fillRadialGradientStartPoint: centre,
|
|
39
|
+
fillRadialGradientEndPoint: centre,
|
|
40
|
+
fillRadialGradientStartRadius: 0,
|
|
41
|
+
fillRadialGradientEndRadius: gradient.radius ?? Math.hypot(rect.width, rect.height) / 2,
|
|
42
|
+
fillRadialGradientColorStops: gradient.stops.flatMap((s) => [s.offset, s.color]),
|
|
43
|
+
fillPriority: 'radial-gradient',
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return { ...gradientToKonvaProps(gradient, rect), fillPriority: 'linear-gradient' };
|
|
47
|
+
}
|
|
48
|
+
export function createDefaultGradient(baseColor) {
|
|
49
|
+
return {
|
|
50
|
+
type: 'linear',
|
|
51
|
+
angle: 90,
|
|
52
|
+
stops: [
|
|
53
|
+
{ offset: 0, color: baseColor },
|
|
54
|
+
{ offset: 1, color: '#ffffff' },
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Konva from 'konva';
|
|
2
|
+
import { type GradientFill, type LocalRect } from './gradientFill.js';
|
|
3
|
+
/**
|
|
4
|
+
* The stretches of the gradient axis (0 = start, 1 = end) where its alpha is at
|
|
5
|
+
* least `threshold`, interpolated linearly between stops like the canvas paints
|
|
6
|
+
* it. A stretch touching an end runs on past it, since the end colour carries on.
|
|
7
|
+
*/
|
|
8
|
+
export declare function alphaIntervals(stops: GradientFill['stops'], threshold: number): Array<[number, number]>;
|
|
9
|
+
/** A polygon per interval: the strip of the plane between two axis positions, cut generously wide. */
|
|
10
|
+
export declare function alphaBands(gradient: GradientFill, rect: LocalRect, threshold: number): Array<Array<{
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}>>;
|
|
14
|
+
/**
|
|
15
|
+
* A hit function for a shape filled with a linear gradient that fades to
|
|
16
|
+
* transparent (the sharepic scrim): it answers to the pointer only where the
|
|
17
|
+
* fill can be seen, so a click on the clear part reaches the photo beneath.
|
|
18
|
+
* `undefined` keeps Konva's full hit — an opaque gradient, or a wholly clear
|
|
19
|
+
* one, which would otherwise not be reachable at all. Only the hit canvas is
|
|
20
|
+
* affected; what is drawn and exported stays the same.
|
|
21
|
+
*/
|
|
22
|
+
export declare function translucentHitFunc(fillGradient: GradientFill | null | undefined): ((context: Konva.Context, shape: Konva.Shape) => void) | undefined;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
import Konva from 'konva';
|
|
3
|
+
import { gradientToKonvaProps } from './gradientFill.js';
|
|
4
|
+
import { HIT_ALPHA_THRESHOLD } from './pixelHitArea.js';
|
|
5
|
+
/** Beyond the gradient axis' ends the colour is clamped; a band reaching an end runs on this far. */
|
|
6
|
+
const OPEN_END = 1e3;
|
|
7
|
+
function stopAlpha(color) {
|
|
8
|
+
return Konva.Util.colorToRGBA(color)?.a ?? 1;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The stretches of the gradient axis (0 = start, 1 = end) where its alpha is at
|
|
12
|
+
* least `threshold`, interpolated linearly between stops like the canvas paints
|
|
13
|
+
* it. A stretch touching an end runs on past it, since the end colour carries on.
|
|
14
|
+
*/
|
|
15
|
+
export function alphaIntervals(stops, threshold) {
|
|
16
|
+
const sorted = [...stops].sort((a, b) => a.offset - b.offset);
|
|
17
|
+
if (sorted.length === 0)
|
|
18
|
+
return [];
|
|
19
|
+
const points = sorted.map((s) => ({ t: s.offset, a: stopAlpha(s.color) }));
|
|
20
|
+
points.unshift({ t: -OPEN_END, a: points[0].a });
|
|
21
|
+
points.push({ t: OPEN_END, a: points[points.length - 1].a });
|
|
22
|
+
const intervals = [];
|
|
23
|
+
let start = null;
|
|
24
|
+
for (let i = 0; i < points.length - 1; i++) {
|
|
25
|
+
const p = points[i];
|
|
26
|
+
const q = points[i + 1];
|
|
27
|
+
if (start === null && p.a >= threshold)
|
|
28
|
+
start = p.t;
|
|
29
|
+
// Only read where p and q lie on opposite sides of the threshold.
|
|
30
|
+
const crossing = (threshold - p.a) / (q.a - p.a);
|
|
31
|
+
if (start === null && q.a >= threshold) {
|
|
32
|
+
start = p.t + crossing * (q.t - p.t);
|
|
33
|
+
}
|
|
34
|
+
else if (start !== null && q.a < threshold) {
|
|
35
|
+
intervals.push([start, p.t + crossing * (q.t - p.t)]);
|
|
36
|
+
start = null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (start !== null)
|
|
40
|
+
intervals.push([start, OPEN_END]);
|
|
41
|
+
return intervals;
|
|
42
|
+
}
|
|
43
|
+
/** A polygon per interval: the strip of the plane between two axis positions, cut generously wide. */
|
|
44
|
+
export function alphaBands(gradient, rect, threshold) {
|
|
45
|
+
const { fillLinearGradientStartPoint: s, fillLinearGradientEndPoint: e } = gradientToKonvaProps(gradient, rect);
|
|
46
|
+
const dx = e.x - s.x;
|
|
47
|
+
const dy = e.y - s.y;
|
|
48
|
+
const reach = Math.hypot(rect.width, rect.height);
|
|
49
|
+
const len = Math.hypot(dx, dy);
|
|
50
|
+
if (!(len > 0))
|
|
51
|
+
return [];
|
|
52
|
+
const nx = (-dy / len) * reach;
|
|
53
|
+
const ny = (dx / len) * reach;
|
|
54
|
+
return alphaIntervals(gradient.stops, threshold).map(([t0, t1]) => {
|
|
55
|
+
const a = { x: s.x + dx * t0, y: s.y + dy * t0 };
|
|
56
|
+
const b = { x: s.x + dx * t1, y: s.y + dy * t1 };
|
|
57
|
+
return [
|
|
58
|
+
{ x: a.x + nx, y: a.y + ny },
|
|
59
|
+
{ x: b.x + nx, y: b.y + ny },
|
|
60
|
+
{ x: b.x - nx, y: b.y - ny },
|
|
61
|
+
{ x: a.x - nx, y: a.y - ny },
|
|
62
|
+
];
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A hit function for a shape filled with a linear gradient that fades to
|
|
67
|
+
* transparent (the sharepic scrim): it answers to the pointer only where the
|
|
68
|
+
* fill can be seen, so a click on the clear part reaches the photo beneath.
|
|
69
|
+
* `undefined` keeps Konva's full hit — an opaque gradient, or a wholly clear
|
|
70
|
+
* one, which would otherwise not be reachable at all. Only the hit canvas is
|
|
71
|
+
* affected; what is drawn and exported stays the same.
|
|
72
|
+
*/
|
|
73
|
+
export function translucentHitFunc(fillGradient) {
|
|
74
|
+
if (!fillGradient || fillGradient.type !== 'linear')
|
|
75
|
+
return undefined;
|
|
76
|
+
const threshold = HIT_ALPHA_THRESHOLD / 255;
|
|
77
|
+
const alphas = fillGradient.stops.map((s) => stopAlpha(s.color));
|
|
78
|
+
if (!alphas.some((a) => a < threshold) || !alphas.some((a) => a >= threshold))
|
|
79
|
+
return undefined;
|
|
80
|
+
return (context, shape) => {
|
|
81
|
+
const bands = alphaBands(fillGradient, shape.getSelfRect(), threshold);
|
|
82
|
+
context.save();
|
|
83
|
+
context.beginPath();
|
|
84
|
+
for (const band of bands) {
|
|
85
|
+
context.moveTo(band[0].x, band[0].y);
|
|
86
|
+
for (const p of band.slice(1))
|
|
87
|
+
context.lineTo(p.x, p.y);
|
|
88
|
+
context.closePath();
|
|
89
|
+
}
|
|
90
|
+
context.clip();
|
|
91
|
+
shape.sceneFunc().call(shape, context, shape);
|
|
92
|
+
context.restore();
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grain and patterns for rects: a noise tile, a dot grid and stripes, both drawn by `ShapePrimitive`
|
|
3
|
+
* as a second node over the fill. Deterministic, so goldens stay stable.
|
|
4
|
+
*/
|
|
5
|
+
import Konva from 'konva';
|
|
6
|
+
import type { ShapeInstance } from './shapes.js';
|
|
7
|
+
export declare const GRAIN_TILE_SIZE = 256;
|
|
8
|
+
/** Dot radius as a share of the spacing (the prototypes' 3 px dot on a 40 px grid, rounded). */
|
|
9
|
+
export declare const DOT_RADIUS_SHARE = 0.07;
|
|
10
|
+
export declare const DEFAULT_PATTERN_SPACING = 0.037;
|
|
11
|
+
/**
|
|
12
|
+
* Square RGBA noise of `size` × `size`: colour flat (black for `dark`, white for `light`),
|
|
13
|
+
* alpha per pixel from the seeded PRNG.
|
|
14
|
+
*/
|
|
15
|
+
export declare function grainTile(seed: number, size: number, tone?: 'dark' | 'light'): Uint8ClampedArray;
|
|
16
|
+
/** Centres of a dot grid with `spacing` px between them, the first at `spacing / 2`. */
|
|
17
|
+
export declare function dotCenters(width: number, height: number, spacing: number): Array<{
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}>;
|
|
21
|
+
/** Fills the clip already set on `ctx` with the dot grid of `shape`. */
|
|
22
|
+
export declare function paintDots(ctx: Konva.Context, shape: Pick<ShapeInstance, 'patternColor' | 'patternSpacing'>, width: number, height: number, canvasWidth: number): void;
|
|
23
|
+
/**
|
|
24
|
+
* Fills the clip already set on `ctx` with vertical stripes of `shape.patternColor`: bands of
|
|
25
|
+
* `patternSpacing` (a canvas share) alternate fill, stripe, fill, … from the left edge.
|
|
26
|
+
*/
|
|
27
|
+
export declare function paintStripes(ctx: Konva.Context, shape: Pick<ShapeInstance, 'patternColor' | 'patternSpacing'>, width: number, height: number, canvasWidth: number): void;
|
|
28
|
+
/** Fills the clip already set on `ctx` with the noise tile; the node's opacity carries the strength. */
|
|
29
|
+
export declare function paintGrain(ctx: Konva.Context, tone: 'dark' | 'light', width: number, height: number): void;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Grain and patterns for rects: a noise tile, a dot grid and stripes, both drawn by `ShapePrimitive`
|
|
4
|
+
* as a second node over the fill. Deterministic, so goldens stay stable.
|
|
5
|
+
*/
|
|
6
|
+
import Konva from 'konva';
|
|
7
|
+
import { GRAIN_SPECK_ALPHA } from './grainSpec.js';
|
|
8
|
+
export const GRAIN_TILE_SIZE = 256;
|
|
9
|
+
/** Dot radius as a share of the spacing (the prototypes' 3 px dot on a 40 px grid, rounded). */
|
|
10
|
+
export const DOT_RADIUS_SHARE = 0.07;
|
|
11
|
+
export const DEFAULT_PATTERN_SPACING = 0.037;
|
|
12
|
+
/** A small fast seeded PRNG (mulberry32): the same seed always draws the same specks. */
|
|
13
|
+
function mulberry32(seed) {
|
|
14
|
+
let a = seed >>> 0;
|
|
15
|
+
return () => {
|
|
16
|
+
a = (a + 0x6d2b79f5) >>> 0;
|
|
17
|
+
let t = a;
|
|
18
|
+
t = Math.imul(t ^ (t >>> 15), t | 1);
|
|
19
|
+
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
|
|
20
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** Peak alpha of a speck: uniform 0…140 gives a mean near 70, visible texture rather than a tint. */
|
|
24
|
+
const SPECK_ALPHA = GRAIN_SPECK_ALPHA;
|
|
25
|
+
/**
|
|
26
|
+
* Square RGBA noise of `size` × `size`: colour flat (black for `dark`, white for `light`),
|
|
27
|
+
* alpha per pixel from the seeded PRNG.
|
|
28
|
+
*/
|
|
29
|
+
export function grainTile(seed, size, tone = 'dark') {
|
|
30
|
+
const next = mulberry32(seed);
|
|
31
|
+
const data = new Uint8ClampedArray(size * size * 4);
|
|
32
|
+
const value = tone === 'light' ? 255 : 0;
|
|
33
|
+
for (let i = 0; i < data.length; i += 4) {
|
|
34
|
+
data[i] = value;
|
|
35
|
+
data[i + 1] = value;
|
|
36
|
+
data[i + 2] = value;
|
|
37
|
+
data[i + 3] = Math.floor(next() * (SPECK_ALPHA + 1));
|
|
38
|
+
}
|
|
39
|
+
return data;
|
|
40
|
+
}
|
|
41
|
+
/** Centres of a dot grid with `spacing` px between them, the first at `spacing / 2`. */
|
|
42
|
+
export function dotCenters(width, height, spacing) {
|
|
43
|
+
if (!(spacing > 0))
|
|
44
|
+
return [];
|
|
45
|
+
const centres = [];
|
|
46
|
+
for (let y = spacing / 2; y < height; y += spacing) {
|
|
47
|
+
for (let x = spacing / 2; x < width; x += spacing)
|
|
48
|
+
centres.push({ x, y });
|
|
49
|
+
}
|
|
50
|
+
return centres;
|
|
51
|
+
}
|
|
52
|
+
const tiles = new Map();
|
|
53
|
+
/** The noise tile as a canvas to repeat as a pattern (seed 1, 256 px). */
|
|
54
|
+
function grainCanvas(tone) {
|
|
55
|
+
const cached = tiles.get(tone);
|
|
56
|
+
if (cached)
|
|
57
|
+
return cached;
|
|
58
|
+
const canvas = Konva.Util.createCanvasElement();
|
|
59
|
+
canvas.width = GRAIN_TILE_SIZE;
|
|
60
|
+
canvas.height = GRAIN_TILE_SIZE;
|
|
61
|
+
const image = canvas.getContext('2d').createImageData(GRAIN_TILE_SIZE, GRAIN_TILE_SIZE);
|
|
62
|
+
image.data.set(grainTile(1, GRAIN_TILE_SIZE, tone));
|
|
63
|
+
const context = canvas.getContext('2d');
|
|
64
|
+
context.putImageData(image, 0, 0);
|
|
65
|
+
// The context's own canvas is the element in a browser; the test shim backs it with another.
|
|
66
|
+
const source = context.canvas;
|
|
67
|
+
tiles.set(tone, source);
|
|
68
|
+
return source;
|
|
69
|
+
}
|
|
70
|
+
/** Fills the clip already set on `ctx` with the dot grid of `shape`. */
|
|
71
|
+
export function paintDots(ctx, shape, width, height, canvasWidth) {
|
|
72
|
+
const spacing = (shape.patternSpacing ?? DEFAULT_PATTERN_SPACING) * canvasWidth;
|
|
73
|
+
const radius = spacing * DOT_RADIUS_SHARE;
|
|
74
|
+
ctx.setAttr('fillStyle', shape.patternColor ?? 'rgba(255,255,255,0.35)');
|
|
75
|
+
ctx.beginPath();
|
|
76
|
+
for (const c of dotCenters(width, height, spacing)) {
|
|
77
|
+
ctx.moveTo(c.x + radius, c.y);
|
|
78
|
+
ctx.arc(c.x, c.y, radius, 0, Math.PI * 2);
|
|
79
|
+
}
|
|
80
|
+
ctx.fill();
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Fills the clip already set on `ctx` with vertical stripes of `shape.patternColor`: bands of
|
|
84
|
+
* `patternSpacing` (a canvas share) alternate fill, stripe, fill, … from the left edge.
|
|
85
|
+
*/
|
|
86
|
+
export function paintStripes(ctx, shape, width, height, canvasWidth) {
|
|
87
|
+
const band = (shape.patternSpacing ?? DEFAULT_PATTERN_SPACING) * canvasWidth;
|
|
88
|
+
if (!(band > 0))
|
|
89
|
+
return;
|
|
90
|
+
ctx.setAttr('fillStyle', shape.patternColor ?? 'rgba(255,255,255,0.35)');
|
|
91
|
+
ctx.beginPath();
|
|
92
|
+
for (let x = band; x < width; x += 2 * band)
|
|
93
|
+
ctx.rect(x, 0, band, height);
|
|
94
|
+
ctx.fill();
|
|
95
|
+
}
|
|
96
|
+
/** Fills the clip already set on `ctx` with the noise tile; the node's opacity carries the strength. */
|
|
97
|
+
export function paintGrain(ctx, tone, width, height) {
|
|
98
|
+
const pattern = ctx.createPattern(grainCanvas(tone), 'repeat');
|
|
99
|
+
if (!pattern)
|
|
100
|
+
return;
|
|
101
|
+
ctx.setAttr('fillStyle', pattern);
|
|
102
|
+
ctx.fillRect(0, 0, width, height);
|
|
103
|
+
}
|