@ggraphic/editor 0.1.0-alpha.1 → 0.1.0-alpha.2
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/README.md +4 -4
- package/THIRD_PARTY_NOTICES +12 -3
- package/dist/CanvasEditorProvider.d.ts +8 -8
- package/dist/ai/applyOperation.d.ts +6 -6
- package/dist/ai/applyOperation.js +4 -4
- package/dist/ai/describeCanvasElements.d.ts +2 -2
- package/dist/ai/describeCanvasElements.js +4 -4
- package/dist/ai/illustrationCapability.d.ts +1 -1
- package/dist/ai/illustrationCapability.js +1 -1
- package/dist/blocks/liftedBlock.d.ts +5 -5
- package/dist/blocks/liftedBlock.js +2 -2
- package/dist/collab/useSelectionAwareness.js +3 -3
- package/dist/collab/useYjsPageStateSync.js +1 -1
- package/dist/collab/useYjsPages.d.ts +2 -2
- package/dist/collab/useYjsPages.js +4 -4
- package/dist/collab/yjsBinding.js +1 -1
- package/dist/common/Lightbox.js +2 -2
- package/dist/components/AddPageButton.js +2 -2
- package/dist/components/CanvasContextMenu/CanvasActionSheet.d.ts +1 -1
- package/dist/components/CanvasContextMenu/CanvasActionSheet.js +4 -4
- package/dist/components/CanvasContextMenu/CanvasContextMenu.d.ts +2 -2
- package/dist/components/CanvasContextMenu/canvasMenuModel.d.ts +1 -1
- package/dist/components/CanvasContextMenu/canvasMenuModel.js +2 -2
- package/dist/components/CanvasEditor/CanvasEditorShell.d.ts +2 -2
- package/dist/components/CanvasEditor/CanvasEditorShell.js +99 -76
- package/dist/components/CanvasEditor/PageWrapper.d.ts +1 -1
- package/dist/components/CanvasEditor/PageWrapper.js +16 -16
- package/dist/components/CanvasEditor/blockInsertContext.d.ts +2 -2
- package/dist/components/CanvasEditor/editorShell.d.ts +5 -5
- package/dist/components/CanvasEditor/hooks/useCanvasContextMenu.d.ts +1 -1
- package/dist/components/CanvasEditor/hooks/useCanvasContextMenu.js +3 -3
- package/dist/components/CanvasEditor/hooks/useLoadedConfigs.d.ts +1 -1
- package/dist/components/CanvasEditor/hooks/usePageRefs.d.ts +1 -1
- package/dist/components/CanvasEditor/hooks/usePageUndoRedoShortcuts.d.ts +1 -1
- package/dist/components/CanvasEditor/hooks/usePageUndoRedoShortcuts.js +2 -2
- package/dist/components/CanvasEditor/hooks/usePrintImpressumGate.d.ts +1 -1
- package/dist/components/CanvasEditor/hooks/usePrintImpressumGate.js +5 -5
- package/dist/components/CanvasEditor/hooks/useToolbarHandlers.d.ts +9 -9
- package/dist/components/CanvasEditor/hooks/useToolbarHandlers.js +1 -1
- package/dist/components/CanvasEditor/hooks/useWorkAreaDeselect.js +1 -1
- package/dist/components/CanvasEditor/layersTab.js +1 -1
- package/dist/components/CanvasEditor/mobileSelectionArea.d.ts +1 -1
- package/dist/components/CanvasEditor/types.d.ts +15 -6
- package/dist/components/CanvasEditorSkeleton.js +3 -3
- package/dist/components/CanvasMetaBar.js +1 -1
- package/dist/components/CanvasRenderLayer.d.ts +3 -3
- package/dist/components/CanvasRenderLayer.js +5 -5
- package/dist/components/CanvasTextOverlay.js +5 -5
- package/dist/components/ConfigCanvas.js +1 -1
- package/dist/components/CropGhostOverlay.js +1 -1
- package/dist/components/CustomColorSwatch.js +3 -3
- package/dist/components/GenericCanvas.d.ts +10 -10
- package/dist/components/GenericCanvas.js +41 -30
- package/dist/components/GenericCanvasElement.d.ts +2 -2
- package/dist/components/GenericCanvasElement.js +7 -7
- package/dist/components/MultiSelectionTransformer.js +4 -4
- package/dist/components/PagePreview.js +2 -2
- package/dist/components/PageThumbnailStrip.d.ts +1 -1
- package/dist/components/PageThumbnailStrip.js +2 -2
- package/dist/components/PageToolbar.js +1 -1
- package/dist/components/RichTextField.js +4 -4
- package/dist/components/SelectionPill.d.ts +1 -1
- package/dist/components/SelectionPill.js +5 -5
- package/dist/components/SlideNotesPanel.js +1 -1
- package/dist/components/StandaloneCanvas.d.ts +3 -3
- package/dist/components/StandaloneCanvas.js +3 -3
- package/dist/components/TextFormatButtons.js +4 -4
- package/dist/components/TextFormatControls.js +1 -1
- package/dist/components/Toolbar.js +5 -5
- package/dist/components/ToolbarStateBridge.d.ts +4 -4
- package/dist/components/ToolbarStateBridge.js +4 -4
- package/dist/components/TopBar/AutoSaveIndicator.js +3 -3
- package/dist/components/TopBar/ContextControls.d.ts +8 -8
- package/dist/components/TopBar/ContextControls.js +18 -18
- package/dist/components/TopBar/ContextToolbar.d.ts +1 -1
- package/dist/components/TopBar/ContextToolbar.js +2 -2
- package/dist/components/TopBar/CropModeControls.d.ts +1 -1
- package/dist/components/TopBar/CropModeControls.js +4 -4
- package/dist/components/TopBar/DownloadSection.d.ts +3 -3
- package/dist/components/TopBar/DownloadSection.js +19 -19
- package/dist/components/TopBar/MobileSelectionBar.d.ts +1 -1
- package/dist/components/TopBar/MobileSelectionBar.js +7 -7
- package/dist/components/TopBar/MobileSelectionControls.d.ts +1 -1
- package/dist/components/TopBar/MobileSelectionControls.js +6 -6
- package/dist/components/TopBar/MultiSelectionToolbar.d.ts +1 -1
- package/dist/components/TopBar/MultiSelectionToolbar.js +4 -4
- package/dist/components/TopBar/ShareDropdown.js +11 -11
- package/dist/components/TopBar/barTiles.js +1 -1
- package/dist/components/TopBar/modules/FloatingAiSuggestionBanner.d.ts +1 -1
- package/dist/components/TopBar/modules/FloatingAiSuggestionBanner.js +4 -4
- package/dist/components/TopBar/modules/FloatingBackgroundControls.d.ts +2 -2
- package/dist/components/TopBar/modules/FloatingBackgroundControls.js +9 -9
- package/dist/components/TopBar/modules/FloatingColorPicker.d.ts +1 -1
- package/dist/components/TopBar/modules/FloatingColorPicker.js +6 -6
- package/dist/components/TopBar/modules/FloatingFontRoleControl.js +5 -5
- package/dist/components/TopBar/modules/FloatingFontSizeControl.js +2 -2
- package/dist/components/TopBar/modules/FloatingHistoryControls.js +1 -1
- package/dist/components/TopBar/modules/FloatingImageLookControl.d.ts +1 -1
- package/dist/components/TopBar/modules/FloatingImageLookControl.js +2 -2
- package/dist/components/TopBar/modules/FloatingLayerControls.js +1 -1
- package/dist/components/TopBar/modules/FloatingOpacityControl.js +3 -3
- package/dist/components/TopBar/modules/FloatingPositionControl.d.ts +1 -1
- package/dist/components/TopBar/modules/FloatingPositionControl.js +5 -5
- package/dist/components/TopBar/modules/FloatingTextAlignControl.d.ts +1 -1
- package/dist/components/TopBar/modules/FloatingTextAlignControl.js +3 -3
- package/dist/components/kindRenderers.d.ts +6 -6
- package/dist/components/kindRenderers.js +9 -9
- package/dist/components/markerMark.js +1 -1
- package/dist/composer/cardFollowsText.d.ts +2 -2
- package/dist/composer/cardFollowsText.js +1 -1
- package/dist/composer/steckbriefLayout.d.ts +1 -1
- package/dist/composer/steckbriefLayout.js +1 -1
- package/dist/configs/buildCanvasText.d.ts +5 -0
- package/dist/configs/buildCanvasText.js +58 -0
- package/dist/configs/buildSharepicText.d.ts +2 -5
- package/dist/configs/buildSharepicText.js +2 -57
- package/dist/configs/configLoader.d.ts +1 -1
- package/dist/configs/configLoader.js +2 -2
- package/dist/configs/factory/actionFactories.d.ts +11 -11
- package/dist/configs/factory/actionFactories.js +13 -13
- package/dist/configs/factory/baseTypes.d.ts +10 -10
- package/dist/configs/factory/carryInstanceState.d.ts +8 -8
- package/dist/configs/factory/carryInstanceState.js +2 -2
- package/dist/configs/factory/createTextElement.d.ts +1 -1
- package/dist/configs/factory/createTextElement.js +1 -1
- package/dist/configs/factory/defineSection.d.ts +1 -1
- package/dist/configs/factory/layoutAccessors.d.ts +1 -1
- package/dist/configs/featureInjector.d.ts +2 -2
- package/dist/configs/featureInjector.js +2 -2
- package/dist/configs/placeholders.js +1 -1
- package/dist/configs/shareSection.d.ts +3 -3
- package/dist/configs/shareSection.js +12 -8
- package/dist/configs/types.d.ts +5 -5
- package/dist/embed/EmbeddedEditor.d.ts +4 -0
- package/dist/embed/EmbeddedEditor.js +68 -0
- package/dist/embed/GgraphicEditor.d.ts +2 -0
- package/dist/embed/GgraphicEditor.js +16 -0
- package/dist/embed/index.d.ts +6 -0
- package/dist/embed/index.js +5 -0
- package/dist/embed/loadTemplatePack.d.ts +8 -0
- package/dist/embed/loadTemplatePack.js +9 -0
- package/dist/embed/types.d.ts +44 -0
- package/dist/embed/types.js +1 -0
- package/dist/entries/ai.d.ts +5 -0
- package/dist/entries/ai.js +5 -0
- package/dist/entries/brand.d.ts +4 -0
- package/dist/entries/brand.js +5 -0
- package/dist/entries/canvas.d.ts +5 -0
- package/dist/entries/canvas.js +6 -0
- package/dist/entries/collab.d.ts +6 -0
- package/dist/entries/collab.js +7 -0
- package/dist/entries/config.d.ts +12 -0
- package/dist/entries/config.js +9 -0
- package/dist/entries/elements.d.ts +21 -0
- package/dist/entries/elements.js +17 -0
- package/dist/entries/embed.d.ts +2 -0
- package/dist/entries/embed.js +7 -0
- package/dist/entries/export.d.ts +8 -0
- package/dist/entries/export.js +7 -0
- package/dist/entries/host.d.ts +30 -0
- package/dist/entries/host.js +10 -0
- package/dist/entries/hostReact.d.ts +9 -0
- package/dist/entries/hostReact.js +11 -0
- package/dist/entries/i18n.d.ts +2 -0
- package/dist/entries/i18n.js +3 -0
- package/dist/entries/illustrations/gophers.d.ts +2 -0
- package/dist/entries/illustrations/gophers.js +3 -0
- package/dist/entries/illustrations/humaaans.d.ts +2 -0
- package/dist/entries/illustrations/humaaans.js +3 -0
- package/dist/entries/illustrations/illlustrations.d.ts +2 -0
- package/dist/entries/illustrations/illlustrations.js +3 -0
- package/dist/entries/illustrations/kawaii.d.ts +2 -0
- package/dist/entries/illustrations/kawaii.js +3 -0
- package/dist/entries/illustrations/opendoodles.d.ts +2 -0
- package/dist/entries/illustrations/opendoodles.js +3 -0
- package/dist/entries/illustrations/openpeeps.d.ts +2 -0
- package/dist/entries/illustrations/openpeeps.js +3 -0
- package/dist/entries/illustrations/transhumans.d.ts +2 -0
- package/dist/entries/illustrations/transhumans.js +3 -0
- package/dist/entries/kinds.d.ts +101 -0
- package/dist/entries/kinds.js +100 -0
- package/dist/entries/page.d.ts +13 -0
- package/dist/entries/page.js +13 -0
- package/dist/entries/services.d.ts +6 -0
- package/dist/entries/services.js +4 -0
- package/dist/entries/shell.d.ts +13 -0
- package/dist/entries/shell.js +13 -0
- package/dist/entries/sidebar.d.ts +15 -0
- package/dist/entries/sidebar.js +13 -0
- package/dist/entries/store.d.ts +3 -0
- package/dist/entries/store.js +4 -0
- package/dist/entries/templates.d.ts +4 -0
- package/dist/entries/templates.js +5 -0
- package/dist/entries/text.d.ts +6 -0
- package/dist/entries/text.js +7 -0
- package/dist/export/pptx/buildPptxModel.d.ts +1 -1
- package/dist/export/pptx/buildPptxModel.js +9 -9
- package/dist/export/pptx/exportPptxDeck.d.ts +2 -2
- package/dist/export/pptx/exportPptxDeck.js +2 -2
- package/dist/export/pptx/textModel.d.ts +1 -1
- package/dist/export/pptx/textModel.js +1 -1
- package/dist/export/pptx/writePptx.d.ts +5 -2
- package/dist/export/pptx/writePptx.js +6 -3
- package/dist/export/pptx/writeText.d.ts +60 -6
- package/dist/export/pptx/writeText.js +2 -2
- package/dist/export/printExport.d.ts +1 -1
- package/dist/export/printExport.js +2 -2
- package/dist/export/slidesPdf.js +1 -1
- package/dist/formats/index.d.ts +37 -15
- package/dist/formats/index.js +51 -95
- package/dist/formats/legacyCatalog.d.ts +21 -0
- package/dist/formats/legacyCatalog.js +76 -0
- package/dist/hooks/editorBox.d.ts +20 -0
- package/dist/hooks/editorBox.js +65 -0
- package/dist/hooks/index.d.ts +13 -13
- package/dist/hooks/index.js +9 -9
- package/dist/hooks/stageFit.d.ts +24 -0
- package/dist/hooks/stageFit.js +76 -0
- package/dist/hooks/useAiImageGeneration.js +2 -2
- package/dist/hooks/useCanvasAutoSave.js +1 -1
- package/dist/hooks/useCanvasElementHandlers.d.ts +6 -6
- package/dist/hooks/useCanvasInteractions.d.ts +1 -1
- package/dist/hooks/useCanvasInteractions.js +1 -1
- package/dist/hooks/useCanvasKeyboardHandlers.d.ts +1 -1
- package/dist/hooks/useCanvasKeyboardHandlers.js +4 -4
- package/dist/hooks/useCanvasUndoRedo.js +3 -3
- package/dist/hooks/useContextPress.js +3 -3
- package/dist/hooks/useCropSession.js +1 -1
- package/dist/hooks/useDeckAutoSave.js +3 -3
- package/dist/hooks/useDeepSelect.js +2 -2
- package/dist/hooks/useFloatingModuleHandlers.d.ts +3 -3
- package/dist/hooks/useFloatingModuleHandlers.js +2 -2
- package/dist/hooks/useFloatingModuleState.d.ts +3 -3
- package/dist/hooks/useFloatingModuleState.js +1 -1
- package/dist/hooks/useFontGeneration.d.ts +1 -9
- package/dist/hooks/useFontGeneration.js +3 -48
- package/dist/hooks/useFontLoader.d.ts +1 -9
- package/dist/hooks/useFontLoader.js +2 -16
- package/dist/hooks/useIconSetsFor.js +1 -1
- package/dist/hooks/useIsCanvasMobile.d.ts +5 -1
- package/dist/hooks/useIsCanvasMobile.js +10 -2
- package/dist/hooks/useMarqueeSelection.js +2 -2
- package/dist/hooks/useMultiPageExport.d.ts +1 -1
- package/dist/hooks/useMultiPageExport.js +3 -3
- package/dist/hooks/usePageManager.d.ts +1 -1
- package/dist/hooks/usePageManager.js +4 -4
- package/dist/hooks/useSelectionAnnouncement.js +2 -2
- package/dist/hooks/useTrackUnsplashDownload.d.ts +1 -1
- package/dist/hooks/useTrackUnsplashDownload.js +1 -1
- package/dist/hostServices.d.ts +53 -31
- package/dist/hostServices.js +6 -4
- package/dist/i18n/catalogue.d.ts +21 -0
- package/dist/i18n/catalogue.js +58 -0
- package/dist/i18n/de.d.ts +14 -15
- package/dist/i18n/de.js +16 -32
- package/dist/i18n/en.js +16 -32
- package/dist/i18n/messages.d.ts +1 -13
- package/dist/i18n/messages.js +2 -52
- package/dist/layouts/CanvasEditorLayout.d.ts +1 -1
- package/dist/layouts/CanvasEditorLayout.js +11 -7
- package/dist/page/actions.d.ts +9 -9
- package/dist/page/actions.js +8 -8
- package/dist/page/config.d.ts +1 -1
- package/dist/page/config.js +52 -15
- package/dist/page/fitting.js +1 -1
- package/dist/page/hug.js +1 -1
- package/dist/page/instantiate.js +2 -2
- package/dist/page/pageState.d.ts +1 -1
- package/dist/page/pageState.js +2 -2
- package/dist/page/typography.js +1 -1
- package/dist/primitives/AssetPrimitive.d.ts +2 -2
- package/dist/primitives/AssetPrimitive.js +9 -9
- package/dist/primitives/CanvasIcons.js +1 -1
- package/dist/primitives/CanvasImage.d.ts +4 -4
- package/dist/primitives/CanvasImage.js +9 -9
- package/dist/primitives/CanvasRichText.js +13 -13
- package/dist/primitives/CanvasStage.d.ts +7 -1
- package/dist/primitives/CanvasStage.js +29 -16
- package/dist/primitives/CanvasText.d.ts +6 -6
- package/dist/primitives/CanvasText.js +11 -11
- package/dist/primitives/ChartPrimitive.d.ts +2 -2
- package/dist/primitives/ChartPrimitive.js +6 -6
- package/dist/primitives/CircleBadge.d.ts +1 -1
- package/dist/primitives/CircleBadge.js +9 -9
- package/dist/primitives/FramePrimitive.d.ts +2 -2
- package/dist/primitives/FramePrimitive.js +5 -5
- package/dist/primitives/IllustrationPrimitive.d.ts +2 -2
- package/dist/primitives/IllustrationPrimitive.js +6 -6
- package/dist/primitives/PillBadge.d.ts +1 -1
- package/dist/primitives/PillBadge.js +9 -9
- package/dist/primitives/ShapePrimitive.d.ts +2 -2
- package/dist/primitives/ShapePrimitive.js +9 -9
- package/dist/primitives/UserImagePrimitive.d.ts +2 -2
- package/dist/primitives/UserImagePrimitive.js +14 -14
- package/dist/primitives/index.d.ts +12 -12
- package/dist/primitives/index.js +7 -7
- package/dist/sidebar/SidebarPanel.d.ts +1 -1
- package/dist/sidebar/SidebarPanel.js +7 -7
- package/dist/sidebar/SidebarTabBar.d.ts +1 -1
- package/dist/sidebar/SidebarTabBar.js +5 -5
- package/dist/sidebar/SubsectionTabBar.js +5 -5
- package/dist/sidebar/UserUploadsProvider.js +2 -2
- package/dist/sidebar/components/AltTextField.js +3 -3
- package/dist/sidebar/components/SidebarHint.js +2 -2
- package/dist/sidebar/components/TextFieldPrimitives.d.ts +1 -1
- package/dist/sidebar/components/TextFieldPrimitives.js +1 -1
- package/dist/sidebar/coreSidebar.d.ts +23 -0
- package/dist/sidebar/coreSidebar.js +12 -0
- package/dist/sidebar/coreSidebarParts.d.ts +3 -0
- package/dist/sidebar/coreSidebarParts.js +20 -0
- package/dist/sidebar/sections/AssetGallery.d.ts +33 -0
- package/dist/sidebar/sections/AssetGallery.js +58 -0
- package/dist/sidebar/sections/ChartSettingsSection.d.ts +1 -1
- package/dist/sidebar/sections/ChartSettingsSection.js +6 -6
- package/dist/sidebar/sections/ChartsSection.d.ts +9 -0
- package/dist/sidebar/sections/ChartsSection.js +40 -0
- package/dist/sidebar/sections/CombinedTextSection.d.ts +2 -2
- package/dist/sidebar/sections/CombinedTextSection.js +7 -7
- package/dist/sidebar/sections/DiagrammeSection.d.ts +6 -9
- package/dist/sidebar/sections/DiagrammeSection.js +4 -39
- package/dist/sidebar/sections/EffectsSection.d.ts +3 -3
- package/dist/sidebar/sections/EffectsSection.js +5 -5
- package/dist/sidebar/sections/FormenSection.d.ts +6 -28
- package/dist/sidebar/sections/FormenSection.js +4 -439
- package/dist/sidebar/sections/FrameSettingsSection.d.ts +1 -1
- package/dist/sidebar/sections/FrameSettingsSection.js +3 -3
- package/dist/sidebar/sections/FramesSection.d.ts +7 -0
- package/dist/sidebar/sections/FramesSection.js +18 -0
- package/dist/sidebar/sections/GenericShareSection.js +8 -8
- package/dist/sidebar/sections/IconsSection.js +6 -4
- package/dist/sidebar/sections/IllustrationSettings.d.ts +1 -1
- package/dist/sidebar/sections/IllustrationSettings.js +5 -5
- package/dist/sidebar/sections/IllustrationThumb.d.ts +1 -1
- package/dist/sidebar/sections/IllustrationThumb.js +2 -2
- package/dist/sidebar/sections/ImageAdjustSection.d.ts +1 -1
- package/dist/sidebar/sections/ImageAdjustSection.js +8 -8
- package/dist/sidebar/sections/LayersSection.d.ts +2 -2
- package/dist/sidebar/sections/LayersSection.js +3 -3
- package/dist/sidebar/sections/RahmenSection.d.ts +2 -7
- package/dist/sidebar/sections/RahmenSection.js +2 -17
- package/dist/sidebar/sections/ShapesSection.d.ts +28 -0
- package/dist/sidebar/sections/ShapesSection.js +440 -0
- package/dist/sidebar/sections/StudioGallery.d.ts +4 -33
- package/dist/sidebar/sections/StudioGallery.js +4 -57
- package/dist/sidebar/sections/UploadsSection.js +11 -11
- package/dist/sidebar/sections/assets/AssetsSection.d.ts +8 -8
- package/dist/sidebar/sections/assets/AssetsSection.js +2 -2
- package/dist/sidebar/sections/assets/BackgroundCatalog.d.ts +1 -1
- package/dist/sidebar/sections/assets/BackgroundCatalog.js +7 -7
- package/dist/sidebar/sections/assets/CategoryCard.js +1 -1
- package/dist/sidebar/sections/assets/ElementThumb.js +10 -8
- package/dist/sidebar/sections/assets/ElementTile.js +4 -4
- package/dist/sidebar/sections/assets/ElementsPanel.js +12 -12
- package/dist/sidebar/sections/assets/EmojiTonePicker.js +2 -2
- package/dist/sidebar/sections/assets/FotosCatalog.js +5 -5
- package/dist/sidebar/sections/assets/IconifyCatalog.d.ts +1 -1
- package/dist/sidebar/sections/assets/IconifyCatalog.js +4 -4
- package/dist/sidebar/sections/assets/RecentCarousel.js +4 -4
- package/dist/sidebar/sections/assets/StickerCatalog.js +5 -5
- package/dist/sidebar/sections/assets/constants.d.ts +1 -1
- package/dist/sidebar/sections/assets/elementPanelHost.d.ts +2 -2
- package/dist/sidebar/sections/assets/elementSearch.js +1 -1
- package/dist/sidebar/sections/assets/elementTypes.d.ts +6 -6
- package/dist/sidebar/sections/assets/elementTypes.js +1 -1
- package/dist/sidebar/sections/assets/useElementCatalog.d.ts +4 -4
- package/dist/sidebar/sections/assets/useElementCatalog.js +14 -14
- package/dist/sidebar/sections/assets/useRecentElements.js +2 -2
- package/dist/sidebar/sections/assets/useStockPhotos.d.ts +2 -2
- package/dist/sidebar/sections/assets/useStockPhotos.js +3 -3
- package/dist/sidebar/sections/effects/EffectCard.js +2 -2
- package/dist/sidebar/sections/effects/GradientSettings.d.ts +1 -1
- package/dist/sidebar/sections/effects/GradientSettings.js +6 -6
- package/dist/sidebar/sections/effects/OutlineSettings.js +5 -5
- package/dist/sidebar/sections/effects/ShadowSettings.d.ts +1 -1
- package/dist/sidebar/sections/effects/ShadowSettings.js +5 -5
- package/dist/sidebar/sections/effects/effectsFor.d.ts +1 -1
- package/dist/sidebar/sections/effects/effectsFor.js +1 -1
- package/dist/sidebar/sections/index.d.ts +6 -2
- package/dist/sidebar/sections/index.js +5 -3
- package/dist/sidebar/sections/registerBundledIconSets.d.ts +6 -0
- package/dist/sidebar/sections/registerBundledIconSets.js +11 -0
- package/dist/sidebar/sections/tools/AiCreateTool.js +3 -3
- package/dist/sidebar/sections/tools/AiEditTool.js +5 -5
- package/dist/sidebar/sections/tools/AltTextTool.d.ts +1 -1
- package/dist/sidebar/sections/tools/AltTextTool.js +5 -5
- package/dist/sidebar/sections/tools/BlobCreatorTool.js +6 -6
- package/dist/sidebar/sections/tools/GradientTextTool.js +8 -8
- package/dist/sidebar/sections/tools/ImageInputPicker.js +6 -6
- package/dist/sidebar/sections/tools/QRCodeTool.js +5 -5
- package/dist/sidebar/sections/tools/RemoveBackgroundTool.js +4 -4
- package/dist/sidebar/sections/tools/TextPathCreatorTool.js +8 -8
- package/dist/sidebar/sections/tools/ToolPanel.js +2 -2
- package/dist/sidebar/sections/tools/ToolTiles.js +1 -1
- package/dist/sidebar/sections/tools/ToolsSection.d.ts +2 -2
- package/dist/sidebar/sections/tools/ToolsSection.js +17 -17
- package/dist/sidebar/sections/tools/UnsplashLimitNotice.js +2 -2
- package/dist/sidebar/sections/tools/UnsplashTool.d.ts +1 -1
- package/dist/sidebar/sections/tools/UnsplashTool.js +8 -8
- package/dist/sidebar/sections/usePreloadSections.d.ts +16 -0
- package/dist/sidebar/sections/usePreloadSections.js +29 -0
- package/dist/sidebar/tabTypes.d.ts +1 -1
- package/dist/sidebar/types.d.ts +4 -4
- package/dist/sidebar/useImagePlacement.d.ts +1 -1
- package/dist/sidebar/useImagePlacement.js +4 -4
- package/dist/stores/createCanvasEditorStore.d.ts +4 -4
- package/dist/stores/createCanvasEditorStore.js +2 -2
- package/dist/styles/compiled.css +1 -1
- package/dist/styles/editor.css +33 -41
- package/dist/styles/tailwind.css +20 -3
- package/dist/styles/tokens.css +3 -2
- package/dist/templates/templateGeometry.js +26 -1
- package/dist/templates/testKinds.d.ts +1 -1
- package/dist/templates/testKinds.js +1 -1
- package/dist/testing/fixtureTemplates.d.ts +1 -1
- package/dist/testing/fixtureTemplates.js +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/utils/canvasAssets.d.ts +3 -3
- package/dist/utils/canvasCommandRegistry.js +1 -1
- package/dist/utils/canvasCommands.d.ts +3 -3
- package/dist/utils/canvasCommands.js +7 -7
- package/dist/utils/canvasIcons.d.ts +7 -0
- package/dist/utils/canvasIcons.js +16 -4
- package/dist/utils/canvasItem.d.ts +7 -7
- package/dist/utils/canvasLayerManager.d.ts +7 -7
- package/dist/utils/captureStage.d.ts +1 -1
- package/dist/utils/captureStage.js +1 -1
- package/dist/utils/chartUtils.d.ts +2 -2
- package/dist/utils/chartUtils.js +3 -3
- package/dist/utils/circleBadgeUtils.js +2 -2
- package/dist/utils/collectAltTextPages.d.ts +2 -2
- package/dist/utils/collectAltTextPages.js +1 -1
- package/dist/utils/colorNames.js +3 -3
- package/dist/utils/colorOptions.js +1 -1
- package/dist/utils/cropAspect.js +1 -1
- package/dist/utils/cropGhost.d.ts +1 -1
- package/dist/utils/cropSession.d.ts +1 -1
- package/dist/utils/cropSession.js +1 -1
- package/dist/utils/cropTarget.d.ts +1 -1
- package/dist/utils/downloadError.js +1 -1
- package/dist/utils/duplicateElement.d.ts +7 -7
- package/dist/utils/emoji/emojiCatalog.d.ts +1 -1
- package/dist/utils/emoji/emojiCatalog.js +2 -2
- package/dist/utils/expandImage.js +1 -1
- package/dist/utils/externalIcons.js +1 -1
- package/dist/utils/fontGeneration.d.ts +16 -0
- package/dist/utils/fontGeneration.js +56 -0
- package/dist/utils/fontMarkSupport.js +1 -1
- package/dist/utils/fontSpecs.d.ts +9 -0
- package/dist/utils/fontSpecs.js +17 -0
- package/dist/utils/framePresets.d.ts +19 -0
- package/dist/utils/framePresets.js +260 -0
- package/dist/utils/frameUtils.d.ts +3 -18
- package/dist/utils/frameUtils.js +2 -261
- package/dist/utils/iconInstances.d.ts +1 -1
- package/dist/utils/illustrations/gophers.d.ts +1 -1
- package/dist/utils/illustrations/humaaans.d.ts +1 -1
- package/dist/utils/illustrations/illlustrations.d.ts +1 -1
- package/dist/utils/illustrations/kawaii.d.ts +1 -1
- package/dist/utils/illustrations/opendoodles.d.ts +1 -1
- package/dist/utils/illustrations/openpeeps.d.ts +1 -1
- package/dist/utils/illustrations/registry.d.ts +3 -3
- package/dist/utils/illustrations/registry.js +2 -2
- package/dist/utils/illustrations/svgCache.d.ts +1 -1
- package/dist/utils/illustrations/transhumans.d.ts +1 -1
- package/dist/utils/illustrations/types.js +1 -1
- package/dist/utils/imageElementComparison.js +3 -3
- package/dist/utils/imageFilters.d.ts +1 -3
- package/dist/utils/imageFilters.js +7 -11
- package/dist/utils/keyboardCrop.d.ts +1 -1
- package/dist/utils/keyboardCrop.js +3 -3
- package/dist/utils/layerLabels.js +2 -2
- package/dist/utils/markerColors.js +2 -2
- package/dist/utils/mediaDrop.d.ts +13 -7
- package/dist/utils/mediaDrop.js +12 -6
- package/dist/utils/mediaPlacement.js +2 -2
- package/dist/utils/photoCredit.js +1 -1
- package/dist/utils/photoCredits.d.ts +1 -1
- package/dist/utils/photoCredits.js +2 -2
- package/dist/utils/photoPlaceholder.js +1 -1
- package/dist/utils/pillBadgeUtils.js +2 -2
- package/dist/utils/renderedBoxes.d.ts +5 -5
- package/dist/utils/renderedBoxes.js +2 -2
- package/dist/utils/resolveElementValue.js +1 -1
- package/dist/utils/shapes.d.ts +2 -2
- package/dist/utils/shapes.js +2 -2
- package/dist/utils/smartCrop.d.ts +2 -2
- package/dist/utils/smartCrop.js +4 -4
- package/dist/utils/surfaceGlow.js +1 -1
- package/dist/utils/templateElementInstance.js +1 -1
- package/dist/utils/templateRotation.js +1 -1
- package/dist/utils/textUtils.js +2 -2
- package/dist/utils/unsplashLinks.js +1 -1
- package/dist/utils/userImageCrop.d.ts +1 -1
- package/dist/utils/userImageCrop.js +2 -2
- package/dist/utils/userImageUtils.d.ts +2 -0
- package/dist/utils/userImageUtils.js +6 -1
- package/dist/utils/viewport.d.ts +12 -8
- package/dist/utils/viewport.js +17 -13
- package/dist/utils/zipPageImages.js +1 -1
- package/dist/vendor/pptxgen.LICENSES.txt +1023 -0
- package/dist/vendor/pptxgen.d.ts +2679 -0
- package/dist/vendor/pptxgen.js +8831 -0
- package/package.json +178 -23
- package/skills/ggraphic-embed/SKILL.md +174 -53
package/dist/utils/frameUtils.js
CHANGED
|
@@ -1,187 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
-
];
|
|
1
|
+
import { PiChatCircleFill, PiCircleDashedBold, PiCircleFill, PiCloudFill, PiDiamondFill, PiDropFill, PiEggFill, PiFrameCornersFill, PiHeartFill, PiHexagonFill, PiLeafFill, PiOctagonFill, PiSquareFill, PiStarFill, PiTagFill, PiTriangleFill, } from 'react-icons/pi';
|
|
2
|
+
export { createFrameInstance, DEFAULT_FRAME_SIZE, FRAME_CATEGORY_ORDER, FRAME_PRESET_PATHS, FRAME_PRESETS, getFramePreset, } from './framePresets.js';
|
|
185
3
|
export const FRAME_ICON_MAP = {
|
|
186
4
|
circle: PiCircleFill,
|
|
187
5
|
'rounded-rect': PiFrameCornersFill,
|
|
@@ -204,80 +22,3 @@ export const FRAME_ICON_MAP = {
|
|
|
204
22
|
ring: PiCircleDashedBold,
|
|
205
23
|
ribbon: PiTagFill,
|
|
206
24
|
};
|
|
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
|
-
/** A new frame; its border takes the colour of `brand`, the active brand by default. */
|
|
258
|
-
export function createFrameInstance(clipType, x, y, brand = activeBrand()) {
|
|
259
|
-
instanceCounter += 1;
|
|
260
|
-
const dims = DEFAULT_FRAME_DIMENSIONS[clipType] ?? {
|
|
261
|
-
width: DEFAULT_FRAME_SIZE,
|
|
262
|
-
height: DEFAULT_FRAME_SIZE,
|
|
263
|
-
};
|
|
264
|
-
return {
|
|
265
|
-
id: `frame-${Date.now()}-${instanceCounter}`,
|
|
266
|
-
clipType,
|
|
267
|
-
x,
|
|
268
|
-
y,
|
|
269
|
-
width: dims.width,
|
|
270
|
-
height: dims.height,
|
|
271
|
-
rotation: 0,
|
|
272
|
-
scaleX: 1,
|
|
273
|
-
scaleY: 1,
|
|
274
|
-
opacity: 1,
|
|
275
|
-
imageSrc: null,
|
|
276
|
-
imageOffsetX: 0,
|
|
277
|
-
imageOffsetY: 0,
|
|
278
|
-
imageScale: 1,
|
|
279
|
-
borderColor: brand.colors.primary,
|
|
280
|
-
borderWidth: 3,
|
|
281
|
-
cornerRadius: clipType === 'rounded-rect' ? 24 : 0,
|
|
282
|
-
};
|
|
283
|
-
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* Katalog zieht `@iconify` nach und hat in der Node-Lane nichts zu suchen.
|
|
19
19
|
*/
|
|
20
20
|
import type { IconState } from '../configs/factory/baseTypes.js';
|
|
21
|
-
import type { IconDef } from '
|
|
21
|
+
import type { IconDef } from './canvasIcons.js';
|
|
22
22
|
/**
|
|
23
23
|
* Zum Auflösen zählt nur dieses eine Feld. Der Renderer hält seinen eigenen,
|
|
24
24
|
* lockereren Zustandstyp (alles optional) — der passt hier herein, ohne dass
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* 32 people figures by Pablo Stanley (https://humaaans.com/),
|
|
5
5
|
* free for personal and commercial use. Rendered in native colors.
|
|
6
6
|
*/
|
|
7
|
-
import type { SvgDef } from '
|
|
7
|
+
import type { SvgDef } from './types.js';
|
|
8
8
|
export declare const HUMAAANS: SvgDef[];
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* React Kawaii Illustration Definitions
|
|
3
3
|
* 11 cute React Kawaii components with German names and tags
|
|
4
4
|
*/
|
|
5
|
-
import type { KawaiiDef } from '
|
|
5
|
+
import type { KawaiiDef } from './types.js';
|
|
6
6
|
export declare const KAWAII_ILLUSTRATIONS: KawaiiDef[];
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* OpenDoodles Illustration Definitions
|
|
3
3
|
* 33 hand-drawn SVG illustrations with German names and tags
|
|
4
4
|
*/
|
|
5
|
-
import type { SvgDef } from '
|
|
5
|
+
import type { SvgDef } from './types.js';
|
|
6
6
|
export declare const OPENDOODLES: SvgDef[];
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* CC0 / public domain. Rendered in native colors. Mix-&-match component
|
|
6
6
|
* atoms are intentionally excluded — only complete illustrations here.
|
|
7
7
|
*/
|
|
8
|
-
import type { SvgDef } from '
|
|
8
|
+
import type { SvgDef } from './types.js';
|
|
9
9
|
export declare const OPENPEEPS: SvgDef[];
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* through the render layer and action factories).
|
|
9
9
|
*/
|
|
10
10
|
import { type BrandPack } from '@ggraphic/core';
|
|
11
|
-
import type { KawaiiDef, SvgDef, IllustrationDef, IllustrationInstance } from '
|
|
12
|
-
export type { KawaiiDef, SvgDef, IllustrationDef, IllustrationInstance, KawaiiInstance, SvgInstance, KawaiiMood, KawaiiIllustrationType, } from '
|
|
13
|
-
export { KAWAII_MOODS } from '
|
|
11
|
+
import type { KawaiiDef, SvgDef, IllustrationDef, IllustrationInstance } from './types.js';
|
|
12
|
+
export type { KawaiiDef, SvgDef, IllustrationDef, IllustrationInstance, KawaiiInstance, SvgInstance, KawaiiMood, KawaiiIllustrationType, } from './types.js';
|
|
13
|
+
export { KAWAII_MOODS } from './types.js';
|
|
14
14
|
export declare function loadKawaiiIllustrations(): Promise<KawaiiDef[]>;
|
|
15
15
|
export declare function getAllIllustrations(): Promise<IllustrationDef[]>;
|
|
16
16
|
export declare function getAllSvgIllustrations(): Promise<SvgDef[]>;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* the metadata lands in the editor-core chunk (this module is reached eagerly
|
|
9
9
|
* through the render layer and action factories).
|
|
10
10
|
*/
|
|
11
|
-
import { activeBrand } from '
|
|
11
|
+
import { activeBrand } from '../../brand/brandRegistry.js';
|
|
12
12
|
import { registeredAssetCatalog } from '../canvasAssets.js';
|
|
13
|
-
export { KAWAII_MOODS } from '
|
|
13
|
+
export { KAWAII_MOODS } from './types.js';
|
|
14
14
|
// =============================================================================
|
|
15
15
|
// HOST SOURCES
|
|
16
16
|
// =============================================================================
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 3. Three-tier priority prefetching (visible → high → background)
|
|
8
8
|
* 4. RequestIdleCallback for non-blocking background loads
|
|
9
9
|
*/
|
|
10
|
-
import type { SvgDef } from '
|
|
10
|
+
import type { SvgDef } from './types.js';
|
|
11
11
|
/**
|
|
12
12
|
* Get cached SVG synchronously (instant return)
|
|
13
13
|
* Returns null if not cached
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* 38 illustrations by Pablo Stanley (https://transhumans.xyz/),
|
|
5
5
|
* free for personal and commercial use. Rendered in native colors.
|
|
6
6
|
*/
|
|
7
|
-
import type { SvgDef } from '
|
|
7
|
+
import type { SvgDef } from './types.js';
|
|
8
8
|
export declare const TRANSHUMANS: SvgDef[];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Shared types and constants for illustration registry
|
|
4
4
|
*/
|
|
5
|
-
import { messages } from '
|
|
5
|
+
import { messages } from '../../i18n/catalogue.js';
|
|
6
6
|
// =============================================================================
|
|
7
7
|
// SHARED CONSTANTS
|
|
8
8
|
// =============================================================================
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* Höhe — und das Bild bleibt stehen, bis ein anderer Grund ein Neuzeichnen
|
|
11
11
|
* erzwingt.
|
|
12
12
|
*/
|
|
13
|
-
import { backgroundAdjustments } from '
|
|
14
|
-
import { assertAsPosition, assertAsSize } from '
|
|
15
|
-
import { backgroundStraighten } from '
|
|
13
|
+
import { backgroundAdjustments } from './imageFilters.js';
|
|
14
|
+
import { assertAsPosition, assertAsSize } from './stateTypeAssertions.js';
|
|
15
|
+
import { backgroundStraighten } from './straighten.js';
|
|
16
16
|
import { BACKGROUND_IMAGE_NODE_ID } from './printImageInfo.js';
|
|
17
17
|
import { templateRotationOf } from './templateRotation.js';
|
|
18
18
|
function geometryOf(layout, id) {
|
|
@@ -89,6 +89,4 @@ export declare function withoutDuotone(img: Bound | undefined): {
|
|
|
89
89
|
duotoneHigh: null;
|
|
90
90
|
bind: Bindings | undefined;
|
|
91
91
|
};
|
|
92
|
-
|
|
93
|
-
export declare function backgroundAdjustments(state: Record<string, unknown>): ImageAdjustments | null;
|
|
94
|
-
export {};
|
|
92
|
+
export { backgroundAdjustments } from './userImageUtils.js';
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { duotoneRamp, resolveRef, resolveScheme, SCHEME_IDS, withBinding, withoutBinding, } from '@ggraphic/core';
|
|
8
8
|
import Konva from 'konva';
|
|
9
|
-
import { activeBrand } from '
|
|
10
|
-
import { messages } from '
|
|
9
|
+
import { activeBrand } from '../brand/brandRegistry.js';
|
|
10
|
+
import { messages } from '../i18n/catalogue.js';
|
|
11
11
|
/**
|
|
12
12
|
* Custom warm/cool filter (Konva has none): shifts red up / blue down for warm,
|
|
13
13
|
* the inverse for cool. Reads the node's `temperature` attr (-100..100).
|
|
@@ -206,16 +206,16 @@ export const IMAGE_PRESETS = [
|
|
|
206
206
|
values: { ...EMPTY_ADJUSTMENTS },
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
|
-
id: '
|
|
209
|
+
id: 'tinted',
|
|
210
210
|
get label() {
|
|
211
|
-
return messages().imageLooks.
|
|
211
|
+
return messages().imageLooks.tinted;
|
|
212
212
|
},
|
|
213
213
|
values: { ...EMPTY_ADJUSTMENTS, tintStrength: 1 },
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
|
-
id: '
|
|
216
|
+
id: 'grayscale',
|
|
217
217
|
get label() {
|
|
218
|
-
return messages().imageLooks.
|
|
218
|
+
return messages().imageLooks.grayscale;
|
|
219
219
|
},
|
|
220
220
|
values: { ...EMPTY_ADJUSTMENTS, grayscale: true },
|
|
221
221
|
},
|
|
@@ -297,8 +297,4 @@ export function withoutDuotone(img) {
|
|
|
297
297
|
bind: withoutBinding(withoutBinding(img?.bind, 'duotoneLow'), 'duotoneHigh'),
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
|
-
|
|
301
|
-
export function backgroundAdjustments(state) {
|
|
302
|
-
const value = state.backgroundImageAdjustments;
|
|
303
|
-
return value && typeof value === 'object' ? value : null;
|
|
304
|
-
}
|
|
300
|
+
export { backgroundAdjustments } from './userImageUtils.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Rect, type Size } from '
|
|
1
|
+
import { type Rect, type Size } from './coverFit.js';
|
|
2
2
|
import type { UserImageInstance } from './userImageUtils.js';
|
|
3
3
|
/** Ein Tastendruck im Zuschneide-Modus: Pfeile verschieben (Umschalt = 10 px), +/- zoomen. */
|
|
4
4
|
export type CropKey = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
-
import { framedPhotoRect, panOfFramedPhoto, clampPan, panWindowPhoto, windowInPhoto, zoomWindow, } from '
|
|
3
|
-
import { isWidgetOwnedKey } from '
|
|
4
|
-
import { minStraightenZoom, panOfStraightPhoto, panStraightPhoto, straightFramedPhoto, windowPhotoOfStraight, zoomStraightPhoto, } from '
|
|
2
|
+
import { framedPhotoRect, panOfFramedPhoto, clampPan, panWindowPhoto, windowInPhoto, zoomWindow, } from './coverFit.js';
|
|
3
|
+
import { isWidgetOwnedKey } from './keyboardOwnership.js';
|
|
4
|
+
import { minStraightenZoom, panOfStraightPhoto, panStraightPhoto, straightFramedPhoto, windowPhotoOfStraight, zoomStraightPhoto, } from './straighten.js';
|
|
5
5
|
const PAN_KEYS = {
|
|
6
6
|
ArrowUp: [0, -1],
|
|
7
7
|
ArrowDown: [0, 1],
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* damit Bühnen-Beschriftung, Alt-Text und Ansagen dieselben Namen lesen.
|
|
7
7
|
*/
|
|
8
8
|
import { stripInlineMarks } from '@ggraphic/schema';
|
|
9
|
-
import { messages } from '
|
|
10
|
-
import { getShapeDef } from '
|
|
9
|
+
import { messages } from '../i18n/catalogue.js';
|
|
10
|
+
import { getShapeDef } from './shapes.js';
|
|
11
11
|
import { getAssetById, isStickerLikeInstance } from './canvasAssets.js';
|
|
12
12
|
import { hostElementKind } from './elementKinds.js';
|
|
13
13
|
import { isLayerLocked } from './layerLock.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { activeBrand } from '
|
|
2
|
-
import { contrastRatio, luminance } from '
|
|
1
|
+
import { activeBrand } from '../brand/brandRegistry.js';
|
|
2
|
+
import { contrastRatio, luminance } from './colorLuminance.js';
|
|
3
3
|
import { asColorOptions } from './colorOptions.js';
|
|
4
4
|
const MARKER_INK_LIGHT = '#FFFFFF';
|
|
5
5
|
/** Die Kastenfarben eines Markenpakets (Vorgabe: des aktiven), für den Farbwähler. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type HostElementAction } from './elementKinds.js';
|
|
2
2
|
import type { StockImageAttribution } from '../common/imageSourceTypes.js';
|
|
3
|
-
import type { ChartType } from '
|
|
4
|
-
import type { FrameClipType } from '
|
|
5
|
-
import type { ShapeType } from '
|
|
3
|
+
import type { ChartType } from './chartTypes.js';
|
|
4
|
+
import type { FrameClipType } from './frameUtils.js';
|
|
5
|
+
import type { ShapeType } from './shapes.js';
|
|
6
6
|
import type { StickerRef } from '@ggraphic/schema';
|
|
7
7
|
import type Konva from 'konva';
|
|
8
8
|
/** Drag type of an upload or photo tile; the payload is `MediaDragPayload` as JSON. */
|
|
@@ -52,10 +52,16 @@ export declare function readElementDrag(dataTransfer: DataTransfer | null): Elem
|
|
|
52
52
|
export declare function markDropPlaced(): void;
|
|
53
53
|
/** Whether the drop placed something; reading it resets it for the next drag. */
|
|
54
54
|
export declare function takeDropPlaced(): boolean;
|
|
55
|
-
/** Drag type of a
|
|
56
|
-
export declare const
|
|
57
|
-
export declare function
|
|
58
|
-
export declare function
|
|
55
|
+
/** Drag type of a template tile; the payload is the template id. */
|
|
56
|
+
export declare const TEMPLATE_DRAG_TYPE = "application/x-ggraphic-template";
|
|
57
|
+
export declare function isTemplateDrag(dataTransfer: DataTransfer | null): boolean;
|
|
58
|
+
export declare function readTemplateDrag(dataTransfer: DataTransfer | null): string | null;
|
|
59
|
+
/** @deprecated Use `TEMPLATE_DRAG_TYPE`. Removed in the next alpha. */
|
|
60
|
+
export declare const VORLAGE_DRAG_TYPE = "application/x-ggraphic-template";
|
|
61
|
+
/** @deprecated Use `isTemplateDrag`. Removed in the next alpha. */
|
|
62
|
+
export declare const isVorlageDrag: typeof isTemplateDrag;
|
|
63
|
+
/** @deprecated Use `readTemplateDrag`. Removed in the next alpha. */
|
|
64
|
+
export declare const readVorlageDrag: typeof readTemplateDrag;
|
|
59
65
|
export declare function isMediaDrag(dataTransfer: DataTransfer | null): boolean;
|
|
60
66
|
export declare function readMediaDrag(dataTransfer: DataTransfer | null): MediaDragPayload | null;
|
|
61
67
|
/**
|
package/dist/utils/mediaDrop.js
CHANGED
|
@@ -45,14 +45,20 @@ export function takeDropPlaced() {
|
|
|
45
45
|
dropPlaced = false;
|
|
46
46
|
return placed;
|
|
47
47
|
}
|
|
48
|
-
/** Drag type of a
|
|
49
|
-
export const
|
|
50
|
-
export function
|
|
51
|
-
return !!dataTransfer && Array.from(dataTransfer.types).includes(
|
|
48
|
+
/** Drag type of a template tile; the payload is the template id. */
|
|
49
|
+
export const TEMPLATE_DRAG_TYPE = 'application/x-ggraphic-template';
|
|
50
|
+
export function isTemplateDrag(dataTransfer) {
|
|
51
|
+
return !!dataTransfer && Array.from(dataTransfer.types).includes(TEMPLATE_DRAG_TYPE);
|
|
52
52
|
}
|
|
53
|
-
export function
|
|
54
|
-
return dataTransfer?.getData(
|
|
53
|
+
export function readTemplateDrag(dataTransfer) {
|
|
54
|
+
return dataTransfer?.getData(TEMPLATE_DRAG_TYPE) || null;
|
|
55
55
|
}
|
|
56
|
+
/** @deprecated Use `TEMPLATE_DRAG_TYPE`. Removed in the next alpha. */
|
|
57
|
+
export const VORLAGE_DRAG_TYPE = TEMPLATE_DRAG_TYPE;
|
|
58
|
+
/** @deprecated Use `isTemplateDrag`. Removed in the next alpha. */
|
|
59
|
+
export const isVorlageDrag = isTemplateDrag;
|
|
60
|
+
/** @deprecated Use `readTemplateDrag`. Removed in the next alpha. */
|
|
61
|
+
export const readVorlageDrag = readTemplateDrag;
|
|
56
62
|
export function isMediaDrag(dataTransfer) {
|
|
57
63
|
return !!dataTransfer && Array.from(dataTransfer.types).includes(MEDIA_DRAG_TYPE);
|
|
58
64
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
-
import { messages } from '
|
|
3
|
-
import { downscaleImageForUpload } from '
|
|
2
|
+
import { messages } from '../i18n/catalogue.js';
|
|
3
|
+
import { downscaleImageForUpload } from './userImageUtils.js';
|
|
4
4
|
/**
|
|
5
5
|
* A stored image as the File a background pick hands to `onImageChange`. The
|
|
6
6
|
* canvas renders the host's variant anyway; the stored original can be many MB.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
-
import { messages } from '
|
|
2
|
+
import { messages } from '../i18n/catalogue.js';
|
|
3
3
|
/**
|
|
4
4
|
* Bildnachweis für den Beitragstext. Unsplash verlangt ihn im Post selbst,
|
|
5
5
|
* nicht nur am Bild, damit niemand das Foto für das eigene hält — mit dem
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type StockImageAttribution } from '
|
|
1
|
+
import { type StockImageAttribution } from '../common/imageSourceTypes.js';
|
|
2
2
|
/** Alle Foto-Nachweise einer Seite: Hintergrundfoto und eingefügte Fotos. */
|
|
3
3
|
export declare function pagePhotoCredits(state: Record<string, unknown>): StockImageAttribution[];
|
|
4
4
|
/** Photo and icon credits of one or more pages, one line each, for the post text. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { iconCreditLine, pageIconSources } from '
|
|
2
|
-
import { photoCreditLine } from '
|
|
1
|
+
import { iconCreditLine, pageIconSources } from './externalIcons.js';
|
|
2
|
+
import { photoCreditLine } from './photoCredit.js';
|
|
3
3
|
/** Alle Foto-Nachweise einer Seite: Hintergrundfoto und eingefügte Fotos. */
|
|
4
4
|
export function pagePhotoCredits(state) {
|
|
5
5
|
const background = state.imageAttribution;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MPL-2.0
|
|
2
2
|
import { mixColors, resolveScheme, SCHEME_IDS, } from '@ggraphic/core';
|
|
3
|
-
import { activeBrand } from '
|
|
3
|
+
import { activeBrand } from '../brand/brandRegistry.js';
|
|
4
4
|
/** Share of the ink mixed into the ground for the placeholder fill. */
|
|
5
5
|
const FILL_INK = 0.12;
|
|
6
6
|
/** Icon edge as a share of the shorter side of the frame. */
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* A pill badge is a rounded rectangle with centered text, commonly used
|
|
7
7
|
* for labels like "Wusstest du?" in slider templates.
|
|
8
8
|
*/
|
|
9
|
-
import { activeBrand } from '
|
|
10
|
-
import { messages } from '
|
|
9
|
+
import { activeBrand } from '../brand/brandRegistry.js';
|
|
10
|
+
import { messages } from '../i18n/catalogue.js';
|
|
11
11
|
import { measureTextWidthWithFont } from './textUtils.js';
|
|
12
12
|
// ============================================================================
|
|
13
13
|
// PRESETS
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* trotzdem am Kasten, weil die genaue Fläche nur eine Messung am Knoten kennt.
|
|
8
8
|
*/
|
|
9
9
|
import type { UserImageInstance } from './userImageUtils.js';
|
|
10
|
-
import type { RenderedBox } from '
|
|
11
|
-
import type { ChartInstance } from '
|
|
12
|
-
import type { FrameInstance } from '
|
|
13
|
-
import type { IllustrationInstance } from '
|
|
14
|
-
import type { ShapeInstance } from '
|
|
10
|
+
import type { RenderedBox } from '../hooks/useBoxSnap.js';
|
|
11
|
+
import type { ChartInstance } from './chartTypes.js';
|
|
12
|
+
import type { FrameInstance } from './frameUtils.js';
|
|
13
|
+
import type { IllustrationInstance } from './illustrations/types.js';
|
|
14
|
+
import type { ShapeInstance } from './shapes.js';
|
|
15
15
|
export declare function shapeBox(shape: ShapeInstance): RenderedBox;
|
|
16
16
|
export declare function frameBox(frame: FrameInstance): RenderedBox;
|
|
17
17
|
export declare function userImageBox(image: UserImageInstance): RenderedBox;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* ist die gezeichnete Fläche etwas kleiner als dieser Kasten; gesnappt wird
|
|
8
8
|
* trotzdem am Kasten, weil die genaue Fläche nur eine Messung am Knoten kennt.
|
|
9
9
|
*/
|
|
10
|
-
import { ILLUSTRATION_TARGET_SIZE } from '
|
|
11
|
-
import { PATH_OFFSETS, PATH_VIEWBOX } from '
|
|
10
|
+
import { ILLUSTRATION_TARGET_SIZE } from './motifSizes.js';
|
|
11
|
+
import { PATH_OFFSETS, PATH_VIEWBOX } from './shapeTransform.js';
|
|
12
12
|
export function shapeBox(shape) {
|
|
13
13
|
// Pfad-Formen sitzen auf ihrem `PATH_OFFSETS`-Punkt im 100er-Raster — bei
|
|
14
14
|
// Wolke, Sprechblasen, Berg nicht in der Mitte. Gespiegelt wandert er mit.
|