@ggraphic/editor 0.1.0-alpha.2 → 0.1.0-alpha.4
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 +661 -373
- package/NOTICE +2 -1
- package/README.md +1 -1
- package/dist/CanvasEditorProvider.js +1 -1
- package/dist/ai/applyOperation.js +1 -1
- package/dist/ai/describeCanvasElements.js +1 -1
- package/dist/ai/illustrationCapability.js +1 -1
- package/dist/blocks/liftedBlock.js +1 -1
- package/dist/brand/bindPick.js +1 -1
- package/dist/brand/brandRegistry.js +1 -1
- package/dist/collab/documentVersion.js +1 -1
- package/dist/collab/pageElementStateKeys.js +1 -1
- package/dist/collab/pagesDoc.js +1 -1
- package/dist/collab/useAwarenessState.js +1 -1
- package/dist/collab/useEmitHostStateChanges.js +1 -1
- package/dist/collab/useSelectionAwareness.js +1 -1
- package/dist/collab/useYjsCanvasBinding.js +1 -1
- package/dist/collab/useYjsPageStateSync.d.ts +1 -15
- package/dist/collab/useYjsPageStateSync.js +76 -6
- package/dist/collab/wrapCallbacksWithPageSync.js +1 -1
- package/dist/collab/ydocKeys.js +1 -1
- package/dist/collab/yjsBinding.js +1 -1
- package/dist/common/Lightbox.js +1 -1
- package/dist/components/AddPageButton.js +1 -1
- package/dist/components/CanvasAnnouncer.js +1 -1
- package/dist/components/CanvasContextMenu/CanvasActionSheet.js +1 -1
- package/dist/components/CanvasContextMenu/CanvasContextMenu.js +1 -1
- package/dist/components/CanvasContextMenu/canvasMenuModel.js +1 -1
- package/dist/components/CanvasEditor/CanvasEditorShell.js +3 -3
- package/dist/components/CanvasEditor/PageWrapper.js +1 -1
- package/dist/components/CanvasEditor/blockInsertContext.js +1 -1
- package/dist/components/CanvasEditor/editorShell.d.ts +8 -2
- package/dist/components/CanvasEditor/hooks/useCanvasContextMenu.js +1 -1
- package/dist/components/CanvasEditor/hooks/useLoadedConfigs.js +1 -1
- package/dist/components/CanvasEditor/hooks/useMobileSheetFit.js +1 -1
- package/dist/components/CanvasEditor/hooks/usePageRefs.js +1 -1
- package/dist/components/CanvasEditor/hooks/usePageUndoRedoShortcuts.js +1 -1
- package/dist/components/CanvasEditor/hooks/usePrintImpressumGate.js +1 -1
- package/dist/components/CanvasEditor/hooks/useScrollToAddedPage.js +1 -1
- 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/types.d.ts +2 -0
- package/dist/components/CanvasEditorSkeleton.js +2 -2
- package/dist/components/CanvasMetaBar.js +1 -1
- package/dist/components/CanvasRenderLayer.js +1 -1
- package/dist/components/CanvasTextOverlay.js +1 -1
- package/dist/components/ConfigCanvas.js +1 -1
- package/dist/components/CropGhostOverlay.js +1 -1
- package/dist/components/CustomColorSwatch.js +1 -1
- package/dist/components/GenericCanvas.d.ts +11 -0
- package/dist/components/GenericCanvas.js +65 -18
- package/dist/components/GenericCanvasElement.js +5 -3
- package/dist/components/MultiSelectionTransformer.js +1 -1
- package/dist/components/PagePreview.js +1 -1
- package/dist/components/PageThumbnailStrip.js +1 -1
- package/dist/components/PageToolbar.js +1 -1
- package/dist/components/PrintGuides.js +1 -1
- package/dist/components/RemoteSelectionOverlay.js +1 -1
- package/dist/components/RichTextField.js +1 -1
- package/dist/components/SelectionPill.js +1 -1
- package/dist/components/SlideNotesPanel.js +1 -1
- package/dist/components/SlotBudgetStatus.js +1 -1
- package/dist/components/StandaloneCanvas.js +1 -1
- package/dist/components/TextFormatControls.js +1 -1
- package/dist/components/Toolbar.js +1 -1
- package/dist/components/ToolbarStateBridge.js +1 -1
- package/dist/components/TopBar/AutoSaveIndicator.js +1 -1
- package/dist/components/TopBar/CropModeControls.js +1 -1
- package/dist/components/TopBar/DownloadSection.js +1 -1
- package/dist/components/TopBar/MobileSelectionControls.js +1 -1
- package/dist/components/TopBar/ShareDropdown.js +1 -1
- package/dist/components/TopBar/barTiles.js +1 -1
- package/dist/components/TopBar/modules/FloatingAiSuggestionBanner.js +1 -1
- package/dist/components/TopBar/modules/FloatingBackgroundControls.js +1 -1
- package/dist/components/TopBar/modules/FloatingFontRoleControl.js +1 -1
- package/dist/components/TopBar/modules/FloatingFontSizeControl.js +1 -1
- package/dist/components/TopBar/modules/FloatingHistoryControls.js +1 -1
- package/dist/components/TopBar/modules/FloatingImageLookControl.js +1 -1
- package/dist/components/TopBar/modules/FloatingLayerControls.js +1 -1
- package/dist/components/TopBar/modules/FloatingOpacityControl.js +1 -1
- package/dist/components/TopBar/modules/FloatingPositionControl.js +1 -1
- package/dist/components/TopBar/modules/FloatingTextAlignControl.js +1 -1
- package/dist/components/TransformHud.js +1 -1
- package/dist/components/WholeTextFormatControls.js +1 -1
- package/dist/components/accentMark.js +1 -1
- package/dist/components/canvasItemLock.js +1 -1
- package/dist/components/kindRenderers.js +1 -1
- package/dist/components/markColor.js +1 -1
- package/dist/composer/cardFollowsText.js +1 -1
- package/dist/composer/marks.js +1 -1
- package/dist/composer/steckbriefLayout.js +1 -1
- package/dist/composer/textFit.js +1 -1
- package/dist/configs/buildCanvasText.js +1 -1
- package/dist/configs/buildSharepicText.js +1 -1
- package/dist/configs/configLoader.js +1 -1
- package/dist/configs/factory/actionFactories.d.ts +9 -5
- package/dist/configs/factory/actionFactories.js +50 -28
- package/dist/configs/factory/baseTypes.js +1 -1
- package/dist/configs/factory/carryInstanceState.js +1 -1
- package/dist/configs/factory/createTextElement.js +1 -1
- package/dist/configs/featureInjector.js +1 -1
- package/dist/configs/pageInheritance.d.ts +10 -1
- package/dist/configs/pageInheritance.js +38 -10
- package/dist/configs/placeholders.js +1 -1
- package/dist/configs/shareSection.js +1 -1
- package/dist/configs/types.d.ts +9 -1
- package/dist/configs/unifiedTabs.js +1 -1
- package/dist/embed/EmbeddedEditor.d.ts +2 -2
- package/dist/embed/EmbeddedEditor.js +2 -2
- package/dist/embed/GgraphicEditor.js +1 -1
- package/dist/embed/blankPage.d.ts +6 -0
- package/dist/embed/blankPage.js +7 -0
- package/dist/embed/index.d.ts +1 -0
- package/dist/embed/index.js +2 -1
- package/dist/entries/ai.js +1 -1
- package/dist/entries/brand.js +1 -1
- package/dist/entries/canvas.js +1 -1
- package/dist/entries/collab.js +1 -1
- package/dist/entries/config.d.ts +1 -1
- package/dist/entries/elements.js +1 -1
- package/dist/entries/embed.d.ts +1 -1
- package/dist/entries/embed.js +2 -2
- package/dist/entries/export.js +1 -1
- package/dist/entries/host.d.ts +2 -1
- package/dist/entries/host.js +2 -1
- package/dist/entries/hostReact.js +1 -1
- package/dist/entries/i18n.js +1 -1
- package/dist/entries/illustrations/gophers.js +1 -1
- package/dist/entries/illustrations/humaaans.js +1 -1
- package/dist/entries/illustrations/illlustrations.js +1 -1
- package/dist/entries/illustrations/kawaii.js +1 -1
- package/dist/entries/illustrations/opendoodles.js +1 -1
- package/dist/entries/illustrations/openpeeps.js +1 -1
- package/dist/entries/illustrations/transhumans.js +1 -1
- package/dist/entries/kinds.js +1 -1
- package/dist/entries/page.js +1 -1
- package/dist/entries/shell.d.ts +1 -0
- package/dist/entries/shell.js +1 -1
- package/dist/entries/sidebar.js +1 -1
- package/dist/entries/store.js +1 -1
- package/dist/entries/templates.d.ts +1 -1
- package/dist/entries/templates.js +2 -2
- package/dist/entries/text.js +1 -1
- package/dist/export/pptx/buildPptxModel.js +1 -1
- package/dist/export/pptx/exportPptxDeck.js +1 -1
- package/dist/export/pptx/pptxFonts.js +1 -1
- package/dist/export/pptx/pptxUnits.js +1 -1
- package/dist/export/pptx/types.js +1 -1
- package/dist/export/pptx/writePptx.js +1 -1
- package/dist/export/pptx/writeText.js +1 -1
- package/dist/export/printExport.js +1 -1
- package/dist/export/printPdf.js +1 -1
- package/dist/export/slidesPdf.js +1 -1
- package/dist/formats/index.d.ts +6 -3
- package/dist/formats/index.js +5 -4
- package/dist/groups/pageGroups.js +1 -1
- package/dist/hooks/editorBox.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/stageFit.js +1 -1
- package/dist/hooks/useAiImageGeneration.js +1 -1
- package/dist/hooks/useAnnounce.js +1 -1
- package/dist/hooks/useBoxSnap.js +1 -1
- package/dist/hooks/useCanvasAutoSave.js +1 -1
- package/dist/hooks/useCanvasElementHandlers.js +1 -1
- package/dist/hooks/useCanvasHistorySetup.d.ts +2 -0
- package/dist/hooks/useCanvasHistorySetup.js +3 -2
- package/dist/hooks/useCanvasInteractions.js +1 -1
- package/dist/hooks/useCanvasKeyboardHandlers.js +1 -1
- package/dist/hooks/useCanvasStoreReset.js +1 -1
- package/dist/hooks/useCanvasUndoRedo.d.ts +2 -0
- package/dist/hooks/useCanvasUndoRedo.js +5 -1
- package/dist/hooks/useContextPress.js +1 -1
- package/dist/hooks/useCropSession.js +1 -1
- package/dist/hooks/useDebounce.js +1 -1
- package/dist/hooks/useDeckAutoSave.js +1 -1
- package/dist/hooks/useDeepSelect.js +1 -1
- package/dist/hooks/useElementSnapping.js +1 -1
- package/dist/hooks/useEmojiCatalog.js +1 -1
- package/dist/hooks/useFloatingModuleState.js +1 -1
- package/dist/hooks/useFontGeneration.js +1 -1
- package/dist/hooks/useFontLoader.js +1 -1
- package/dist/hooks/useGeometryReporter.js +1 -1
- package/dist/hooks/useHoverOutline.js +1 -1
- package/dist/hooks/useIconCatalog.js +1 -1
- package/dist/hooks/useIconSearch.js +1 -1
- package/dist/hooks/useIconSetsFor.js +1 -1
- package/dist/hooks/useImageCoverFit.js +1 -1
- package/dist/hooks/useIsCanvasMobile.js +1 -1
- package/dist/hooks/useMarqueeSelection.js +1 -1
- package/dist/hooks/useMobileSheet.js +1 -1
- package/dist/hooks/useMultiPageExport.js +1 -1
- package/dist/hooks/usePageManager.d.ts +2 -1
- package/dist/hooks/usePageManager.js +7 -5
- package/dist/hooks/usePageThumbnails.js +1 -1
- package/dist/hooks/usePaginatedIcons.js +1 -1
- package/dist/hooks/useRovingToolbar.js +1 -1
- package/dist/hooks/useSelectionAnnouncement.js +1 -1
- package/dist/hooks/useSnapScheduler.js +1 -1
- package/dist/hooks/useTrackUnsplashDownload.js +1 -1
- package/dist/hooks/useZoomGestures.js +1 -1
- package/dist/hostServices.js +1 -1
- package/dist/i18n/catalogue.js +1 -1
- package/dist/i18n/de.js +1 -1
- package/dist/i18n/messages.js +1 -1
- package/dist/layouts/CanvasEditorLayout.js +2 -2
- package/dist/layouts/index.js +1 -1
- package/dist/page/actions.js +1 -1
- package/dist/page/config.js +1 -1
- package/dist/page/fitting.js +1 -1
- package/dist/page/hug.js +1 -1
- package/dist/page/instantiate.js +1 -1
- package/dist/page/logoSize.js +1 -1
- package/dist/page/templatePack.js +1 -1
- package/dist/primitives/AssetPrimitive.js +8 -6
- package/dist/primitives/CanvasBackground.js +1 -1
- package/dist/primitives/CanvasIcons.js +1 -1
- package/dist/primitives/CanvasImage.js +1 -1
- package/dist/primitives/CanvasRichText.js +1 -1
- package/dist/primitives/CanvasStage.js +1 -1
- package/dist/primitives/CanvasText.js +1 -1
- package/dist/primitives/ChartPrimitive.js +1 -1
- package/dist/primitives/FramePrimitive.js +1 -1
- package/dist/primitives/IconPrimitive.js +1 -1
- package/dist/primitives/IllustrationPrimitive.js +1 -1
- package/dist/primitives/PillBadge.js +2 -2
- package/dist/primitives/ShapePrimitive.js +1 -1
- package/dist/primitives/SnapGuidelines.js +1 -1
- package/dist/primitives/UserImagePrimitive.js +13 -7
- package/dist/primitives/index.js +1 -1
- package/dist/sidebar/SidebarPanel.js +1 -1
- package/dist/sidebar/SidebarTabBar.js +1 -1
- package/dist/sidebar/SubsectionTabBar.js +1 -1
- package/dist/sidebar/UserUploadsProvider.js +1 -1
- package/dist/sidebar/components/AltTextField.js +1 -1
- package/dist/sidebar/components/SidebarHint.js +1 -1
- package/dist/sidebar/components/SidebarSlider.js +1 -1
- package/dist/sidebar/components/TextFieldPrimitives.js +1 -1
- package/dist/sidebar/coreSidebarParts.js +1 -1
- package/dist/sidebar/sections/AssetGallery.js +1 -1
- package/dist/sidebar/sections/ChartSettingsSection.js +1 -1
- package/dist/sidebar/sections/ChartsSection.js +1 -1
- package/dist/sidebar/sections/CombinedTextSection.js +1 -1
- package/dist/sidebar/sections/DiagrammeSection.js +1 -1
- package/dist/sidebar/sections/FormenSection.js +1 -1
- package/dist/sidebar/sections/FrameSettingsSection.js +1 -1
- package/dist/sidebar/sections/FramesSection.js +1 -1
- package/dist/sidebar/sections/GenericShareSection.js +1 -1
- package/dist/sidebar/sections/IconsSection.js +1 -1
- package/dist/sidebar/sections/IllustrationSettings.js +1 -1
- package/dist/sidebar/sections/IllustrationThumb.js +1 -1
- package/dist/sidebar/sections/ImageAdjustSection.js +1 -1
- package/dist/sidebar/sections/LayersSection.js +1 -1
- package/dist/sidebar/sections/RahmenSection.js +1 -1
- package/dist/sidebar/sections/ShapesSection.js +1 -1
- package/dist/sidebar/sections/StudioGallery.js +1 -1
- package/dist/sidebar/sections/UploadsSection.js +1 -1
- package/dist/sidebar/sections/assets/AssetsSection.js +1 -1
- package/dist/sidebar/sections/assets/BackgroundCatalog.js +1 -1
- package/dist/sidebar/sections/assets/CategoryCard.js +1 -1
- package/dist/sidebar/sections/assets/ElementGrid.js +1 -1
- package/dist/sidebar/sections/assets/ElementThumb.js +1 -1
- package/dist/sidebar/sections/assets/ElementTile.js +1 -1
- package/dist/sidebar/sections/assets/ElementsPanel.js +1 -1
- package/dist/sidebar/sections/assets/EmojiTonePicker.js +1 -1
- package/dist/sidebar/sections/assets/FotosCatalog.js +1 -1
- package/dist/sidebar/sections/assets/IconifyCatalog.js +1 -1
- package/dist/sidebar/sections/assets/RecentCarousel.js +1 -1
- package/dist/sidebar/sections/assets/StickerCatalog.js +1 -1
- package/dist/sidebar/sections/assets/constants.js +1 -1
- package/dist/sidebar/sections/assets/elementSearch.js +1 -1
- package/dist/sidebar/sections/assets/elementTypes.js +1 -1
- package/dist/sidebar/sections/assets/index.js +1 -1
- package/dist/sidebar/sections/assets/useRecentElements.js +1 -1
- package/dist/sidebar/sections/assets/useStockPhotos.js +1 -1
- package/dist/sidebar/sections/effects/EffectCard.js +1 -1
- package/dist/sidebar/sections/effects/GradientSettings.js +1 -1
- package/dist/sidebar/sections/effects/OutlineSettings.js +1 -1
- package/dist/sidebar/sections/effects/ShadowSettings.js +1 -1
- package/dist/sidebar/sections/effects/effectsFor.js +1 -1
- package/dist/sidebar/sections/index.js +1 -1
- package/dist/sidebar/sections/lazyWithPreload.js +1 -1
- package/dist/sidebar/sections/registerBundledIconSets.js +1 -1
- package/dist/sidebar/sections/tools/AiCreateTool.js +1 -1
- package/dist/sidebar/sections/tools/AiEditTool.js +1 -1
- package/dist/sidebar/sections/tools/AltTextTool.js +1 -1
- package/dist/sidebar/sections/tools/ImageInputPicker.js +1 -1
- package/dist/sidebar/sections/tools/QRCodeTool.js +1 -1
- package/dist/sidebar/sections/tools/RemoveBackgroundTool.js +1 -1
- package/dist/sidebar/sections/tools/ToolPanel.js +1 -1
- package/dist/sidebar/sections/tools/ToolTiles.js +1 -1
- package/dist/sidebar/sections/tools/ToolsSection.js +1 -1
- package/dist/sidebar/sections/tools/UnsplashLimitNotice.js +1 -1
- package/dist/sidebar/sections/tools/UnsplashTool.js +1 -1
- package/dist/sidebar/sections/tools/index.js +1 -1
- package/dist/sidebar/sections/tools/toolTiles.css +1 -1
- package/dist/sidebar/sections/tools/useToolImagePlacement.js +1 -1
- package/dist/sidebar/sections/usePreloadSections.js +1 -1
- package/dist/sidebar/sections/whenIdle.js +1 -1
- package/dist/sidebar/sidebarStyles.js +1 -1
- package/dist/sidebar/useImagePlacement.js +1 -1
- package/dist/stores/AutoSaveStoreProvider.js +1 -1
- package/dist/stores/CanvasStoreProvider.js +1 -1
- package/dist/stores/createAutoSaveStore.js +1 -1
- package/dist/stores/createCanvasEditorStore.d.ts +11 -0
- package/dist/stores/createCanvasEditorStore.js +47 -1
- package/dist/stores/useAutoSaveStore.js +1 -1
- package/dist/styles/compiled.css +2 -2
- package/dist/styles/editor.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/tailwind.css +1 -1
- package/dist/styles/tokens.css +1 -1
- package/dist/templates/fontWidths.generated.js +1 -1
- package/dist/templates/registry.js +1 -1
- package/dist/templates/templateGeometry.js +1 -1
- package/dist/templates/testKinds.js +1 -1
- package/dist/testing/documentBrandPacks.js +1 -1
- package/dist/testing/fixtureTemplates.js +1 -1
- package/dist/testing/stampKind.js +1 -1
- package/dist/types/editorTypes.js +1 -1
- package/dist/ui/alert-dialog.js +1 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/editorScope.js +1 -1
- package/dist/ui/icon-button.js +1 -1
- package/dist/ui/label.js +1 -1
- package/dist/ui/masonry-grid.js +1 -1
- package/dist/ui/popover.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/utils/alignment.js +1 -1
- package/dist/utils/axisLock.js +1 -1
- package/dist/utils/backgroundPhotoCrop.js +1 -1
- package/dist/utils/canvasAssets.js +1 -1
- package/dist/utils/canvasClipboard.js +1 -1
- package/dist/utils/canvasCommandRegistry.js +1 -1
- package/dist/utils/canvasCommands.js +1 -1
- package/dist/utils/canvasFontFamilies.js +1 -1
- package/dist/utils/canvasIcons.js +1 -1
- package/dist/utils/canvasLayerManager.d.ts +4 -0
- package/dist/utils/canvasLayerManager.js +12 -7
- package/dist/utils/captureStage.js +1 -1
- package/dist/utils/chartTypes.js +1 -1
- package/dist/utils/chartUtils.js +1 -1
- package/dist/utils/circleBadgeUtils.js +1 -1
- package/dist/utils/cn.js +1 -1
- package/dist/utils/collectAltTextPages.js +1 -1
- package/dist/utils/colorLuminance.js +1 -1
- package/dist/utils/coverFit.js +1 -1
- package/dist/utils/cropAspect.js +1 -1
- package/dist/utils/cropGhost.js +1 -1
- package/dist/utils/cropSession.js +1 -1
- package/dist/utils/cropTarget.js +1 -1
- package/dist/utils/deepSelect.js +1 -1
- package/dist/utils/downloadError.js +1 -1
- package/dist/utils/duplicateElement.js +1 -1
- package/dist/utils/editorFocus.js +1 -1
- package/dist/utils/elementKinds.js +1 -1
- package/dist/utils/emoji/emojiCatalog.js +1 -1
- package/dist/utils/ensureFontsReady.d.ts +8 -2
- package/dist/utils/ensureFontsReady.js +20 -10
- package/dist/utils/expandImage.js +1 -1
- package/dist/utils/externalIcons.js +1 -1
- package/dist/utils/filterCache.js +1 -1
- package/dist/utils/filterUtils.js +1 -1
- package/dist/utils/fontAliases.js +1 -1
- package/dist/utils/fontGeneration.js +1 -1
- package/dist/utils/fontMarkSupport.js +1 -1
- package/dist/utils/fontSpecs.js +1 -1
- package/dist/utils/gradientFill.js +1 -1
- package/dist/utils/gradientHitArea.js +1 -1
- package/dist/utils/grain.js +1 -1
- package/dist/utils/grainSpec.js +1 -1
- package/dist/utils/groupSnap.js +1 -1
- package/dist/utils/handDrawn.js +1 -1
- package/dist/utils/historyStamp.js +1 -1
- package/dist/utils/hostStorageKeys.js +1 -1
- package/dist/utils/iconInstances.js +1 -1
- package/dist/utils/illustrations/gophers.js +1 -1
- package/dist/utils/illustrations/humaaans.js +1 -1
- package/dist/utils/illustrations/illlustrations.js +1 -1
- package/dist/utils/illustrations/kawaii.js +1 -1
- package/dist/utils/illustrations/opendoodles.js +1 -1
- package/dist/utils/illustrations/openpeeps.js +1 -1
- package/dist/utils/illustrations/prefetchAnalytics.js +1 -1
- package/dist/utils/illustrations/registry.js +1 -1
- package/dist/utils/illustrations/svgCache.js +1 -1
- package/dist/utils/illustrations/transhumans.js +1 -1
- package/dist/utils/illustrations/types.js +1 -1
- package/dist/utils/imageElementComparison.js +1 -1
- package/dist/utils/imageFilters.js +1 -1
- package/dist/utils/imageLook.js +1 -1
- package/dist/utils/keyboardCrop.js +1 -1
- package/dist/utils/keyboardOwnership.js +1 -1
- package/dist/utils/layerLabels.js +1 -1
- package/dist/utils/layerLock.js +1 -1
- package/dist/utils/layerSelection.js +1 -1
- package/dist/utils/mediaDrop.js +1 -1
- package/dist/utils/mediaPlacement.js +1 -1
- package/dist/utils/motifSizes.js +1 -1
- package/dist/utils/multiSelect.js +1 -1
- package/dist/utils/notch.js +1 -1
- package/dist/utils/orientElement.js +1 -1
- package/dist/utils/orientation.js +1 -1
- package/dist/utils/pageCounter.js +1 -1
- package/dist/utils/pendingImages.d.ts +17 -4
- package/dist/utils/pendingImages.js +18 -14
- package/dist/utils/photoCredit.js +1 -1
- package/dist/utils/photoPlaceholder.js +1 -1
- package/dist/utils/pillBadgeUtils.js +1 -1
- package/dist/utils/plainTextLayout.js +1 -1
- package/dist/utils/rebaseHistoryState.d.ts +71 -0
- package/dist/utils/rebaseHistoryState.js +208 -0
- package/dist/utils/removeElement.js +1 -1
- package/dist/utils/renderedBoxes.js +1 -1
- package/dist/utils/resolveElementValue.js +1 -1
- package/dist/utils/scrollBehavior.js +1 -1
- package/dist/utils/searchTranslations.js +1 -1
- package/dist/utils/selectionCapabilities.js +1 -1
- package/dist/utils/shade.js +1 -1
- package/dist/utils/shapeTransform.js +1 -1
- package/dist/utils/smartCrop.js +1 -1
- package/dist/utils/snapping.js +1 -1
- package/dist/utils/stateTypeAssertions.js +1 -1
- package/dist/utils/straighten.js +1 -1
- package/dist/utils/surfaceGlow.js +1 -1
- package/dist/utils/templateElementInstance.js +1 -1
- package/dist/utils/templateRotation.js +1 -1
- package/dist/utils/textAlign.js +1 -1
- package/dist/utils/textEditorOpeners.js +1 -1
- package/dist/utils/textRouting.js +1 -1
- package/dist/utils/transformHudLabel.js +1 -1
- package/dist/utils/unsplashLinks.js +1 -1
- package/dist/utils/userImageCrop.js +1 -1
- package/dist/utils/viewport.js +1 -1
- package/dist/utils/zipPageImages.js +1 -1
- package/package.json +4 -4
- package/skills/ggraphic-embed/SKILL.md +13 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
/**
|
|
4
4
|
* GenericCanvas - Unified config-driven canvas component
|
|
5
5
|
*
|
|
@@ -29,7 +29,7 @@ import { applyLayerSelection } from '../utils/layerSelection.js';
|
|
|
29
29
|
import { locateDrop } from '../utils/mediaDrop.js';
|
|
30
30
|
import { selectableItemIds } from '../utils/multiSelect.js';
|
|
31
31
|
import { rotaterRects, visibleArea } from '../utils/orientation.js';
|
|
32
|
-
import { PendingImagesContext } from '../utils/pendingImages.js';
|
|
32
|
+
import { ImageRetryContext, PendingImagesContext, } from '../utils/pendingImages.js';
|
|
33
33
|
import { PreviewRenderContext } from '../utils/filterCache.js';
|
|
34
34
|
import { stageCssScale } from '../utils/stageCssScale.js';
|
|
35
35
|
import { STAGE_VERTICAL_CHROME, getOptimalContainerWidth, isMobile } from '../utils/viewport.js';
|
|
@@ -51,7 +51,7 @@ import { floatingModuleFor } from '../hooks/useFloatingModuleState.js';
|
|
|
51
51
|
import { CanvasStage, SnapGuidelines } from '../primitives/index.js';
|
|
52
52
|
import { createCanvasCommands, } from '../utils/canvasCommands.js';
|
|
53
53
|
import { canvasFontFamilies } from '../utils/canvasFontFamilies.js';
|
|
54
|
-
import { buildCanvasItems, buildSortedRenderList, withInsertsOnTop, } from '../utils/canvasLayerManager.js';
|
|
54
|
+
import { buildCanvasItems, buildSortedRenderList, insertedItemIds, withInsertsOnTop, } from '../utils/canvasLayerManager.js';
|
|
55
55
|
import { addHostElement, fromHostKinds } from '../utils/elementKinds.js';
|
|
56
56
|
import { captureStageImage, captureStageImageAsync, rasterizeStageElement, visibleStageTexts, } from '../utils/captureStage.js';
|
|
57
57
|
import { MAX_ICON_SELECTIONS, selectedCatalogIconIds } from '../utils/iconInstances.js';
|
|
@@ -70,7 +70,9 @@ function GenericCanvasWithRef(props) {
|
|
|
70
70
|
const shortcutsEnabled = interactive && isActivePage;
|
|
71
71
|
const stageRef = useRef(null);
|
|
72
72
|
const getStage = useCallback(() => stageRef.current?.getStage() ?? null, []);
|
|
73
|
-
const [
|
|
73
|
+
const [imageLoads] = useState(() => ({ pending: new Set(), failed: new Set() }));
|
|
74
|
+
// Never pruned: one entry per retried element is bounded; pruning on cleanup would remount it.
|
|
75
|
+
const [imageRetries, setImageRetries] = useState(() => new Map());
|
|
74
76
|
// Export state (used by auto-save and attribution overlay)
|
|
75
77
|
const [exportedImage, setExportedImage] = useState(null);
|
|
76
78
|
const exportedImageRef = useRef(null);
|
|
@@ -130,11 +132,15 @@ function GenericCanvasWithRef(props) {
|
|
|
130
132
|
});
|
|
131
133
|
}, []);
|
|
132
134
|
// The setter the element actions get: whatever an action inserts is drawn on top of the page,
|
|
133
|
-
// regardless of its kind. The canvas commands (paste,
|
|
134
|
-
// elements and keep the plain setter.
|
|
135
|
+
// regardless of its kind, and selected once committed (#162). The canvas commands (paste,
|
|
136
|
+
// duplicate, reorder) place and select their own elements and keep the plain setter.
|
|
137
|
+
const insertedRef = useRef(null);
|
|
135
138
|
const setActionState = useCallback((partial) => {
|
|
136
139
|
setStateRaw((prev) => {
|
|
137
140
|
const next = typeof partial === 'function' ? partial(prev) : { ...prev, ...partial };
|
|
141
|
+
const inserted = insertedItemIds(config, prev, next);
|
|
142
|
+
if (inserted.length > 0)
|
|
143
|
+
insertedRef.current = inserted;
|
|
138
144
|
return withInsertsOnTop(config, prev, next);
|
|
139
145
|
});
|
|
140
146
|
}, [config]);
|
|
@@ -149,10 +155,24 @@ function GenericCanvasWithRef(props) {
|
|
|
149
155
|
// derives is the template's own knowledge, and `createInitialState` is where
|
|
150
156
|
// it already lives.
|
|
151
157
|
const [remoteStateCount, setRemoteStateCount] = useState(0);
|
|
152
|
-
const
|
|
158
|
+
const committedStateRef = useRef(state);
|
|
159
|
+
useLayoutEffect(() => {
|
|
160
|
+
committedStateRef.current = state;
|
|
161
|
+
}, [state]);
|
|
162
|
+
const store = useCanvasStore();
|
|
163
|
+
// The edit is not this client's step: the history takes it in as well, so
|
|
164
|
+
// undo cannot write the value from before it back (#160). What it changed
|
|
165
|
+
// is measured from the values its writer started from, not from this
|
|
166
|
+
// canvas: an own value not yet written, or one the write overrode, is no
|
|
167
|
+
// part of the other client's edit.
|
|
168
|
+
const handleRemotePageState = useCallback((partial, base) => {
|
|
169
|
+
const committed = committedStateRef.current;
|
|
170
|
+
store
|
|
171
|
+
.getState()
|
|
172
|
+
.rebaseHistory(config.createInitialState({ ...committed, ...base }), config.createInitialState({ ...committed, ...partial }));
|
|
153
173
|
setStateRaw((prev) => config.createInitialState({ ...prev, ...partial }));
|
|
154
174
|
setRemoteStateCount((n) => n + 1);
|
|
155
|
-
}, [config]);
|
|
175
|
+
}, [store, config]);
|
|
156
176
|
// Measured fits need the brand fonts, so normalization waits for them. The
|
|
157
177
|
// result reaches the page through useEmitHostStateChanges like any edit; a
|
|
158
178
|
// preview has no writers and only renders it.
|
|
@@ -175,10 +195,6 @@ function GenericCanvasWithRef(props) {
|
|
|
175
195
|
onRemoteState: handleRemotePageState,
|
|
176
196
|
});
|
|
177
197
|
const collectState = useCallback(() => state, [state]);
|
|
178
|
-
const committedStateRef = useRef(state);
|
|
179
|
-
useLayoutEffect(() => {
|
|
180
|
-
committedStateRef.current = state;
|
|
181
|
-
}, [state]);
|
|
182
198
|
// Text fields reach the page document only through their `on<Key>Change`
|
|
183
199
|
// callback, so a restore reports each one it changed (#4247). The emitted
|
|
184
200
|
// keys are left to useEmitHostStateChanges, which already reports them.
|
|
@@ -208,7 +224,7 @@ function GenericCanvasWithRef(props) {
|
|
|
208
224
|
callback?.(restoredState[key]);
|
|
209
225
|
}
|
|
210
226
|
}, [callbacks]);
|
|
211
|
-
const { saveToHistory, debouncedSaveToHistory, runHistoryBatch, checkpoint, flushPendingSaves, undo, redo, canUndo, canRedo, } = useCanvasHistorySetup(collectState, handleRestore, 500, shortcutsEnabled);
|
|
227
|
+
const { saveToHistory, debouncedSaveToHistory, runHistoryBatch, checkpoint, flushPendingSaves, replaceInHistory, undo, redo, canUndo, canRedo, } = useCanvasHistorySetup(collectState, handleRestore, 500, shortcutsEnabled);
|
|
212
228
|
// Read through the ref so `actions` keeps its identity across edits; every
|
|
213
229
|
// action calls getState() when it runs, so it still sees the latest state.
|
|
214
230
|
const getState = useCallback(() => committedStateRef.current, []);
|
|
@@ -221,7 +237,7 @@ function GenericCanvasWithRef(props) {
|
|
|
221
237
|
// `runHistoryBatch` rides on the actions so the AI bridge (built from the
|
|
222
238
|
// page's live actions) coalesces one op batch into one undo step.
|
|
223
239
|
const actions = useMemo(() => ({
|
|
224
|
-
...config.createActions(getState, setActionState, saveToHistory, debouncedSaveToHistory, callbacks),
|
|
240
|
+
...config.createActions(getState, setActionState, saveToHistory, debouncedSaveToHistory, callbacks, { replaceInHistory }),
|
|
225
241
|
runHistoryBatch,
|
|
226
242
|
}), [
|
|
227
243
|
config,
|
|
@@ -231,6 +247,7 @@ function GenericCanvasWithRef(props) {
|
|
|
231
247
|
debouncedSaveToHistory,
|
|
232
248
|
runHistoryBatch,
|
|
233
249
|
callbacks,
|
|
250
|
+
replaceInHistory,
|
|
234
251
|
]);
|
|
235
252
|
// Allowlist of state fields that calculateLayout reads across all canvas configs.
|
|
236
253
|
// New fields must be added here if a new config's calculateLayout reads them.
|
|
@@ -285,7 +302,6 @@ function GenericCanvasWithRef(props) {
|
|
|
285
302
|
stateForGroups.current = state;
|
|
286
303
|
const getGroups = useCallback(() => readGroups(stateForGroups.current), []);
|
|
287
304
|
const { setSelectedElement, selectElement, beginMarquee, handleStageClick, handleSnapChange, getSnapTargets, } = useCanvasInteractions({ stageRef, marqueeEnabled: interactive, getGroups });
|
|
288
|
-
const store = useCanvasStore();
|
|
289
305
|
const { setSnapLines, updateElementPosition } = store.getState();
|
|
290
306
|
// Before the deep select: a ⌃-click on a Mac is a right-click, not a pick.
|
|
291
307
|
useContextPress(stageRef, interactive);
|
|
@@ -295,6 +311,15 @@ function GenericCanvasWithRef(props) {
|
|
|
295
311
|
if (!isActivePage)
|
|
296
312
|
setSelectedElement(null);
|
|
297
313
|
}, [isActivePage, setSelectedElement]);
|
|
314
|
+
// What an action inserted is selected, and only it (`setActionState`).
|
|
315
|
+
useLayoutEffect(() => {
|
|
316
|
+
const inserted = insertedRef.current;
|
|
317
|
+
if (!inserted)
|
|
318
|
+
return;
|
|
319
|
+
insertedRef.current = null;
|
|
320
|
+
if (isActivePage)
|
|
321
|
+
store.getState().setSelectedLayers(inserted);
|
|
322
|
+
}, [state, isActivePage, store]);
|
|
298
323
|
// Output canvas dimensions are driven by the chosen format. Layout calculators
|
|
299
324
|
// continue to operate in the template's reference space (config.canvas.{width,height});
|
|
300
325
|
// CanvasStage scales them up to the format dims via a Konva Group when they differ.
|
|
@@ -535,7 +560,29 @@ function GenericCanvasWithRef(props) {
|
|
|
535
560
|
return stageRef.current?.toTileJpeg({ ...tile, pixelRatio, quality }) ?? null;
|
|
536
561
|
},
|
|
537
562
|
getPrintImages: () => stageRef.current?.getPrintImages() ?? [],
|
|
538
|
-
imagesSettled: () =>
|
|
563
|
+
imagesSettled: () => imageLoads.pending.size === 0,
|
|
564
|
+
imageLoadState: () => ({
|
|
565
|
+
pending: imageLoads.pending.size,
|
|
566
|
+
failed: imageLoads.failed.size,
|
|
567
|
+
}),
|
|
568
|
+
retryFailedImages: () => {
|
|
569
|
+
const failed = [...imageLoads.failed];
|
|
570
|
+
if (failed.length === 0)
|
|
571
|
+
return 0;
|
|
572
|
+
// Pending at once, before the elements re-render: a host polling right
|
|
573
|
+
// after the call must not read a settled canvas.
|
|
574
|
+
for (const id of failed) {
|
|
575
|
+
imageLoads.failed.delete(id);
|
|
576
|
+
imageLoads.pending.add(id);
|
|
577
|
+
}
|
|
578
|
+
setImageRetries((prev) => {
|
|
579
|
+
const next = new Map(prev);
|
|
580
|
+
for (const id of failed)
|
|
581
|
+
next.set(id, (prev.get(id) ?? 0) + 1);
|
|
582
|
+
return next;
|
|
583
|
+
});
|
|
584
|
+
return failed.length;
|
|
585
|
+
},
|
|
539
586
|
captureCanvasForAi: async () => captureStageImage(stageRef.current, { format: 'jpeg', pixelRatio: 1, quality: 0.85 }),
|
|
540
587
|
getVisibleTexts: () => visibleStageTexts(stageRef.current?.getStage() ?? null),
|
|
541
588
|
rasterizeElement: async (elementId) => {
|
|
@@ -770,7 +817,7 @@ function GenericCanvasWithRef(props) {
|
|
|
770
817
|
elementHandlers.handleTextFormatChange,
|
|
771
818
|
setSelectedElement,
|
|
772
819
|
beginMarquee,
|
|
773
|
-
|
|
820
|
+
imageLoads,
|
|
774
821
|
store,
|
|
775
822
|
actions,
|
|
776
823
|
stageWidth,
|
|
@@ -780,7 +827,7 @@ function GenericCanvasWithRef(props) {
|
|
|
780
827
|
config,
|
|
781
828
|
cropSession,
|
|
782
829
|
]);
|
|
783
|
-
return (_jsx(PendingImagesContext.Provider, { value:
|
|
830
|
+
return (_jsx(PendingImagesContext.Provider, { value: imageLoads, children: _jsx(ImageRetryContext.Provider, { value: imageRetries, children: _jsxs(PreviewRenderContext.Provider, { value: preview ? (previewCaptureRatio ?? 0) : null, children: [_jsxs(CanvasStage, { ref: stageRef, width: stageWidth, height: stageHeight, logicalWidth: referenceWidth, logicalHeight: referenceHeight, responsive: true, maxContainerWidth: maxWidth, maxContainerHeight: maxHeight, fitToParent: fitToParent, onStageClick: handleStageClick, listening: interactive, ariaLabel: stageLabel, className: `${config.id}-stage`, overlay: interactive ? (_jsxs(_Fragment, { children: [_jsx(CropGhostOverlay, { getStage: getStage }), _jsx(SlotBudgetStatus, { state: state, canvasWidth: referenceWidth, canvasHeight: referenceHeight })] })) : null, children: [_jsx(CanvasRenderLayer, { sortedRenderList: sortedRenderList, canRotateSelection: canRotateSelection, config: config, state: drawnState, layout: layout, handlers: elementHandlers, getSnapTargets: getSnapTargets, registerGeometry: updateElementPosition, handleSnapChange: handleSnapChange, setSnapLines: setSnapLines, stageWidth: config.canvas.width, stageHeight: config.canvas.height, isFontAvailable: isFontAvailable, remoteSelections: remoteSelections, ...(pageNumber === undefined ? {} : { pageNumber }) }), _jsx(PrintGuides, { format: format }), _jsx(SnapGuidelines, {})] }), _jsx(ToolbarStateBridge, { bridgeRef: bridgeRef, config: config, state: state, layout: layout, actions: actions, sortedRenderList: sortedRenderList, setState: setStateWrapper, debouncedSaveToHistory: debouncedSaveToHistory, canUndo: canUndo, canRedo: canRedo, readOnly: !interactive, saveToHistory: saveToHistory, runHistoryBatch: runHistoryBatch, cropCancelCount: cropSession.cancelCount, getStage: getStage, onToolbarStateChange: onToolbarStateChange })] }) }) }));
|
|
784
831
|
}
|
|
785
832
|
GenericCanvasWithRef.displayName = 'GenericCanvasInner';
|
|
786
833
|
const MemoizedGenericCanvas = memo(GenericCanvasWithRef);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
/**
|
|
4
4
|
* GenericCanvasElement - Memoized renderer for config-driven canvas elements
|
|
5
5
|
*
|
|
@@ -13,7 +13,7 @@ import { Group, Rect, Circle } from 'react-konva';
|
|
|
13
13
|
import useImage from 'use-image';
|
|
14
14
|
import { useCanvasStore, useCanvasStoreSelector, useIsElementSelected, } from '../stores/CanvasStoreProvider.js';
|
|
15
15
|
import { backgroundAdjustments } from '../utils/imageFilters.js';
|
|
16
|
-
import { useTrackPendingImage } from '../utils/pendingImages.js';
|
|
16
|
+
import { useImageRetry, useTrackPendingImage } from '../utils/pendingImages.js';
|
|
17
17
|
import { assertAsString, assertAsPosition, assertAsOpacity, getOptionalStateValue, } from '../utils/stateTypeAssertions.js';
|
|
18
18
|
import { backgroundStraighten } from '../utils/straighten.js';
|
|
19
19
|
import { surfaceGlow } from '../utils/surfaceGlow.js';
|
|
@@ -230,6 +230,8 @@ const MemoizedBackgroundElement = memo(function MemoizedBackgroundElement({ conf
|
|
|
230
230
|
});
|
|
231
231
|
export const GenericCanvasElement = memo(function GenericCanvasElement({ config, state, layout, onSelect, onTextChange, onFontSizeChange, onPositionChange, onGeometryChange, onImageDragEnd, onImageTransformEnd, onTemplateTransformEnd, onSnapChange, onSnapLinesChange, stageWidth, stageHeight, getSnapTargets, }) {
|
|
232
232
|
const selected = useIsElementSelected(config.id);
|
|
233
|
+
// A retry remounts the image element: its `use-image` then loads afresh.
|
|
234
|
+
const imageRetry = useImageRetry(config.id);
|
|
233
235
|
// Check visibility
|
|
234
236
|
if (config.visible && !config.visible(state)) {
|
|
235
237
|
return null;
|
|
@@ -238,7 +240,7 @@ export const GenericCanvasElement = memo(function GenericCanvasElement({ config,
|
|
|
238
240
|
case 'text':
|
|
239
241
|
return (_jsx(MemoizedTextElement, { config: config, state: state, layout: layout, selected: selected, onSelect: onSelect, onTextChange: onTextChange, onFontSizeChange: onFontSizeChange, onPositionChange: onPositionChange, onTemplateTransformEnd: onTemplateTransformEnd, onGeometryChange: onGeometryChange, onSnapChange: onSnapChange, onSnapLinesChange: onSnapLinesChange, stageWidth: stageWidth, stageHeight: stageHeight, getSnapTargets: getSnapTargets }));
|
|
240
242
|
case 'image':
|
|
241
|
-
return (_jsx(MemoizedImageElement, { config: config, state: state, layout: layout, selected: selected, onSelect: onSelect, onDragEnd: onImageDragEnd, onTransformEnd: onImageTransformEnd, onPositionChange: onPositionChange, onGeometryChange: onGeometryChange, stageWidth: stageWidth, stageHeight: stageHeight, onSnapChange: onSnapChange, onSnapLinesChange: onSnapLinesChange, getSnapTargets: getSnapTargets }));
|
|
243
|
+
return (_jsx(MemoizedImageElement, { config: config, state: state, layout: layout, selected: selected, onSelect: onSelect, onDragEnd: onImageDragEnd, onTransformEnd: onImageTransformEnd, onPositionChange: onPositionChange, onGeometryChange: onGeometryChange, stageWidth: stageWidth, stageHeight: stageHeight, onSnapChange: onSnapChange, onSnapLinesChange: onSnapLinesChange, getSnapTargets: getSnapTargets }, imageRetry));
|
|
242
244
|
case 'rect':
|
|
243
245
|
return (_jsx(MemoizedRectElement, { config: config, state: state, layout: layout }));
|
|
244
246
|
case 'circle':
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { cn } from '../utils/cn.js';
|
|
4
4
|
import { useMessages } from '../i18n/messages.js';
|
|
5
5
|
import { memo, useCallback, useRef, useState } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useMessages } from '../i18n/messages.js';
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { PiArrowUp, PiArrowDown, PiCopy, PiSwap, PiTrash } from 'react-icons/pi';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
/**
|
|
4
4
|
* Beschnitt- und Schutzzonen-Hilfslinien für Druckformate: Beschnittkante
|
|
5
5
|
* (Endformat) und Schutzzone als dünne gestrichelte Linien, der Beschnittstreifen
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { Group, Label as KonvaLabel, Rect, Tag, Text } from 'react-konva';
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useEffect, useLayoutEffect, useState } from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
import { PiCopy, PiDotsThreeBold, PiFlipHorizontal, PiFlipVertical, PiLockSimple, PiLockSimpleOpen, PiTrash, } from 'react-icons/pi';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useMessages } from '../i18n/messages.js';
|
|
4
4
|
import { useEffect, useId, useRef, useState } from 'react';
|
|
5
5
|
import { PiNote } from 'react-icons/pi';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useEffect, useRef } from 'react';
|
|
4
4
|
import { checkSlotBudget } from '@ggraphic/core';
|
|
5
5
|
import { useCanvasEditorServices } from '../CanvasEditorProvider.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { messages } from '../i18n/messages.js';
|
|
4
4
|
/**
|
|
5
5
|
* StandaloneCanvas — Lightweight canvas component for direct embedding
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
/**
|
|
4
4
|
* TextFormatControls — die Knöpfe für Fett, Kursiv, Unterstrichen, Akzent,
|
|
5
5
|
* Textmarker und Listen, solange ein Text im Editor bearbeitet wird: sie
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useCanvasStoreSelector } from '../stores/CanvasStoreProvider.js';
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { AutoSaveIndicator } from './TopBar/AutoSaveIndicator.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useMessages } from '../../i18n/messages.js';
|
|
4
4
|
import { useAutoSaveStore } from '../../stores/useAutoSaveStore.js';
|
|
5
5
|
import { cn } from '../../utils/cn.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useMessages } from '../../i18n/messages.js';
|
|
4
4
|
import { cn } from '../../utils/cn.js';
|
|
5
5
|
import { CROP_ASPECT_PRESETS, isCropAspectId } from '../../utils/cropAspect.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useCanvasEditorServices } from '../../CanvasEditorProvider.js';
|
|
4
4
|
import { useMessages } from '../../i18n/messages.js';
|
|
5
5
|
import { Button } from '../../ui/button.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useMessages } from '../../i18n/messages.js';
|
|
4
4
|
import { useCanvasStoreSelector } from '../../stores/CanvasStoreProvider.js';
|
|
5
5
|
import { cn } from '../../utils/cn.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useCanvasEditorServices } from '../../CanvasEditorProvider.js';
|
|
4
4
|
import { useMessages } from '../../i18n/messages.js';
|
|
5
5
|
import { browserFileDelivery } from '../../hostServices.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useMessages } from '../../../i18n/messages.js';
|
|
4
4
|
import { useCanvasStoreSelector } from '../../../stores/CanvasStoreProvider.js';
|
|
5
5
|
import { Check, LayoutTemplate, RotateCcw, Sparkles } from 'lucide-react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { Slider } from 'radix-ui';
|
|
4
4
|
import { useEffect, useId, useRef, useState } from 'react';
|
|
5
5
|
import { HiArrowUpTray, HiMagnifyingGlass, HiMagnifyingGlassPlus, HiOutlinePhoto, HiOutlineTrash, } from 'react-icons/hi2';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { currentFontRole, fontRoleOptions } from '@ggraphic/core';
|
|
4
4
|
import { useDocumentBrand } from '../../../brand/documentBrand.js';
|
|
5
5
|
import { TileCaption, useBarTiles } from '../barTiles.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { TileCaption, useBarTiles } from '../barTiles.js';
|
|
4
4
|
import { useMessages } from '../../../i18n/messages.js';
|
|
5
5
|
import { PiPlus, PiMinus } from 'react-icons/pi';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useMessages } from '../../../i18n/messages.js';
|
|
4
4
|
import { PiArrowCounterClockwise, PiArrowClockwise } from 'react-icons/pi';
|
|
5
5
|
const iconBtnLight = 'size-8 max-canvas-mobile:size-11 rounded-full max-canvas-mobile:rounded-[10px] border-none bg-transparent cursor-pointer flex items-center justify-center text-foreground transition-[background-color,color] duration-200 hover:enabled:bg-hover-alt hover:enabled:text-primary-600 active:enabled:bg-editor-canvas-hover disabled:opacity-30 disabled:cursor-not-allowed disabled:text-grey-400';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useMessages } from '../../../i18n/messages.js';
|
|
4
4
|
import { currentImageLook, IMAGE_LOOK_IDS, } from '../../../utils/imageLook.js';
|
|
5
5
|
/** Look of the selected image: None, Black & white, Duotone, Darken. A native select: keyboard and screen reader for free. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useMessages } from '../../../i18n/messages.js';
|
|
4
4
|
import { PiStackPlus, PiStackMinus } from 'react-icons/pi';
|
|
5
5
|
const iconBtn = 'inline-flex items-center justify-center size-8 max-canvas-mobile:size-11 shrink-0 rounded-md border-none bg-transparent cursor-pointer text-[var(--editor-text)] transition-colors duration-150 hover:enabled:bg-[var(--editor-surface-hover)] hover:enabled:text-[var(--editor-active-fg)] disabled:opacity-30 disabled:cursor-not-allowed';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { Slider } from 'radix-ui';
|
|
4
4
|
import { PiCheckerboard } from 'react-icons/pi';
|
|
5
5
|
import { TILE, TileCaption, useBarTiles } from '../barTiles.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useId, useState } from 'react';
|
|
4
4
|
import { PiAlignBottom, PiAlignCenterHorizontal, PiAlignCenterVertical, PiAlignLeft, PiAlignRight, PiAlignTop, PiArrowsOutCardinal, PiColumns, PiRows, } from 'react-icons/pi';
|
|
5
5
|
import { TILE, useBarTiles } from '../barTiles.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { PiTextAlignCenter, PiTextAlignLeft, PiTextAlignRight } from 'react-icons/pi';
|
|
4
4
|
import { TILE, TileCaption, useBarTiles } from '../barTiles.js';
|
|
5
5
|
import { useMessages } from '../../../i18n/messages.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { useEffect, useRef } from 'react';
|
|
4
4
|
import { readNodeFrame } from '../utils/orientation.js';
|
|
5
5
|
import { transformHudLabel } from '../utils/transformHudLabel.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
/**
|
|
4
4
|
* WholeTextFormatControls — dieselben Knöpfe wie im Editor (`TextFormatButtons`),
|
|
5
5
|
* für einen Text, der nur ausgewählt ist. Es gibt keine Auswahl IM Text, also
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// SPDX-License-Identifier:
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
import { ChartPrimitive } from '../primitives/ChartPrimitive.js';
|
|
5
5
|
import { CircleBadge } from '../primitives/CircleBadge.js';
|
package/dist/composer/marks.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
import { foldMarkerIntoAccent } from '@ggraphic/schema';
|
|
3
3
|
/** A text without its inline marks (`**bold**`, `==accent==`, `++marker++` …) and hand-mark sentinels. */
|
|
4
4
|
export const stripMarks = (text) => text.replace(/\*\*|__|==|\+\+|[\u2061-\u2064]/g, '');
|
package/dist/composer/textFit.js
CHANGED