@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
package/NOTICE
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
Originally developed as part of netzbegruenung/Gruenerator (AGPL-3.0);
|
|
2
|
-
relicensed by the copyright holder under
|
|
2
|
+
relicensed by the copyright holder under AGPL-3.0-only. Versions up to and
|
|
3
|
+
including the alphas published before that change were released under MPL-2.0.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Alpha, untested.** Early work in progress: the API and the document format can change without notice. See the [repository README](../../README.md#ggraphic).
|
|
4
4
|
|
|
5
|
-
The brand-neutral canvas editor of ggraphic, built on react-konva: the editor shell with its sidebar, stage, text editing, elements (shapes, icons, illustrations, charts, badges, images), multi-page documents, undo, export (PNG, PDF, PPTX) and the Yjs page document for collaboration. Licensed under
|
|
5
|
+
The brand-neutral canvas editor of ggraphic, built on react-konva: the editor shell with its sidebar, stage, text editing, elements (shapes, icons, illustrations, charts, badges, images), multi-page documents, undo, export (PNG, PDF, PPTX) and the Yjs page document for collaboration. Licensed under [AGPL-3.0-only](./LICENSE). Versions published before the relicensing remain available under MPL-2.0.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -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 { createContext, useContext } from 'react';
|
|
4
4
|
const CanvasEditorContext = createContext({});
|
|
5
5
|
export function CanvasEditorProvider({ services, children, }) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
import { buildCanvasItems, buildSortedRenderList, } from '../utils/canvasLayerManager.js';
|
|
3
3
|
import { hostElementKind } from '../utils/elementKinds.js';
|
|
4
4
|
import { isLayerLocked } from '../utils/layerLock.js';
|
package/dist/brand/bindPick.js
CHANGED
package/dist/collab/pagesDoc.js
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import * as Y from 'yjs';
|
|
2
|
-
/**
|
|
3
|
-
* Push external changes of a page's `state` Y.Map into the mounted canvas.
|
|
4
|
-
*
|
|
5
|
-
* GenericCanvas holds template-field state as local React state seeded once
|
|
6
|
-
* from `page.state` — without this observer neither a chat sharepic edit
|
|
7
|
-
* (applied server-side via the Hocuspocus internal API) nor another studio
|
|
8
|
-
* client's edit (dual-written into the page state map by CanvasEditor) would
|
|
9
|
-
* appear in an open studio tab until reload.
|
|
10
|
-
*
|
|
11
|
-
* This client's own dual-writes carry PAGES_STATE_ORIGIN and are skipped —
|
|
12
|
-
* the local component state already has those values, and rebuilding it on
|
|
13
|
-
* every keystroke would disrupt inline text editing. Structural page ops are
|
|
14
|
-
* not skipped: the carousel chrome they rewrite is news to the canvas.
|
|
15
|
-
*/
|
|
16
2
|
export declare function useYjsPageStateSync(options: {
|
|
17
3
|
pageYMap: Y.Map<unknown> | null;
|
|
18
4
|
isSynced: boolean;
|
|
19
|
-
onRemoteState: (partial: Record<string, unknown>) => void;
|
|
5
|
+
onRemoteState: (partial: Record<string, unknown>, base: Record<string, unknown>) => void;
|
|
20
6
|
}): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
import { YDOC_KEYS } from './ydocKeys.js';
|
|
@@ -16,7 +16,22 @@ import { PAGES_STATE_ORIGIN } from './useYjsPages.js';
|
|
|
16
16
|
* the local component state already has those values, and rebuilding it on
|
|
17
17
|
* every keystroke would disrupt inline text editing. Structural page ops are
|
|
18
18
|
* not skipped: the carousel chrome they rewrite is news to the canvas.
|
|
19
|
+
*
|
|
20
|
+
* Next to each changed value the hook reports the value the writer started
|
|
21
|
+
* from (`base`), so the canvas can tell which part of a write is the other
|
|
22
|
+
* client's edit (#160). That is the value the write replaced here — except
|
|
23
|
+
* when it replaced this client's own write without having seen it (#176,
|
|
24
|
+
* last writer wins per key). Then the own write is no part of the remote
|
|
25
|
+
* edit: the base is the last own value the writer did see, or else the value
|
|
26
|
+
* the own writes replaced. The writer's history is read from the items
|
|
27
|
+
* themselves: a Y.Map set records the item it replaced as its `origin`.
|
|
28
|
+
*
|
|
29
|
+
* Own writes with another origin (a deck op, a deck undo's restore, a version
|
|
30
|
+
* lift) reach the canvas like remote ones: another stack owns them or they
|
|
31
|
+
* are not undoable, so the canvas history takes them in.
|
|
19
32
|
*/
|
|
33
|
+
/** Own values kept per key, to name the one a remote write started from. */
|
|
34
|
+
const OWN_VALUES_PER_KEY = 32;
|
|
20
35
|
export function useYjsPageStateSync(options) {
|
|
21
36
|
const { pageYMap, isSynced, onRemoteState } = options;
|
|
22
37
|
const onRemoteStateRef = useRef(onRemoteState);
|
|
@@ -24,22 +39,77 @@ export function useYjsPageStateSync(options) {
|
|
|
24
39
|
useEffect(() => {
|
|
25
40
|
if (!pageYMap || !isSynced)
|
|
26
41
|
return undefined;
|
|
42
|
+
// Read per use: Yjs gives a doc a new client id when it finds its own in use.
|
|
43
|
+
const me = () => pageYMap.doc?.clientID;
|
|
44
|
+
const idOf = (id) => `${id.client}:${id.clock}`;
|
|
45
|
+
// Per key: whether the value held now is an own write, the values of the
|
|
46
|
+
// latest own writes by item id, and the value (with its item) the current
|
|
47
|
+
// run of own writes replaced.
|
|
48
|
+
const holdsOwn = new Map();
|
|
49
|
+
const ownValues = new Map();
|
|
50
|
+
const runStart = new Map();
|
|
51
|
+
const track = (stateY, key, replaced) => {
|
|
52
|
+
const item = stateY._map.get(key);
|
|
53
|
+
const own = !!item && !item.deleted && item.id.client === me();
|
|
54
|
+
if (own) {
|
|
55
|
+
if (!holdsOwn.get(key))
|
|
56
|
+
runStart.set(key, { item: item.origin && idOf(item.origin), value: replaced });
|
|
57
|
+
const values = ownValues.get(key) ?? new Map();
|
|
58
|
+
values.set(idOf(item.id), stateY.get(key));
|
|
59
|
+
if (values.size > OWN_VALUES_PER_KEY)
|
|
60
|
+
values.delete(values.keys().next().value);
|
|
61
|
+
ownValues.set(key, values);
|
|
62
|
+
}
|
|
63
|
+
holdsOwn.set(key, own);
|
|
64
|
+
};
|
|
65
|
+
const initial = pageYMap.get(YDOC_KEYS.state);
|
|
66
|
+
if (initial instanceof Y.Map)
|
|
67
|
+
for (const key of initial.keys())
|
|
68
|
+
track(initial, key, initial.get(key));
|
|
69
|
+
/**
|
|
70
|
+
* The base of `item`'s write, which replaced an own write it may not have
|
|
71
|
+
* seen: the last own value on its way back, or what the own run replaced
|
|
72
|
+
* once the walk reaches that — also when the own value seen is no longer kept.
|
|
73
|
+
*/
|
|
74
|
+
const baseOverOwn = (stateY, key, item) => {
|
|
75
|
+
const store = stateY.doc.store;
|
|
76
|
+
const start = runStart.get(key);
|
|
77
|
+
const values = ownValues.get(key);
|
|
78
|
+
for (let id = item.origin; id;) {
|
|
79
|
+
const at = idOf(id);
|
|
80
|
+
if (at === start?.item)
|
|
81
|
+
break;
|
|
82
|
+
if (id.client === me() && values?.has(at))
|
|
83
|
+
return values.get(at);
|
|
84
|
+
const struct = Y.getItem(store, id);
|
|
85
|
+
if (!(struct instanceof Y.Item))
|
|
86
|
+
break;
|
|
87
|
+
id = struct.origin;
|
|
88
|
+
}
|
|
89
|
+
return start?.value;
|
|
90
|
+
};
|
|
27
91
|
const handler = (events) => {
|
|
28
92
|
const stateY = pageYMap.get(YDOC_KEYS.state);
|
|
29
93
|
if (!(stateY instanceof Y.Map))
|
|
30
94
|
return;
|
|
31
95
|
const partial = {};
|
|
96
|
+
const base = {};
|
|
32
97
|
for (const event of events) {
|
|
33
98
|
if (event.target !== stateY)
|
|
34
99
|
continue;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
100
|
+
const own = event.transaction.origin === PAGES_STATE_ORIGIN;
|
|
101
|
+
for (const [key, change] of event.changes.keys) {
|
|
102
|
+
if (!own) {
|
|
103
|
+
const item = stateY._map.get(key);
|
|
104
|
+
const overOwn = holdsOwn.get(key) === true && !!item && !item.deleted && item.id.client !== me();
|
|
105
|
+
partial[key] = stateY.get(key);
|
|
106
|
+
base[key] = overOwn ? baseOverOwn(stateY, key, item) : change.oldValue;
|
|
107
|
+
}
|
|
108
|
+
track(stateY, key, change.oldValue);
|
|
39
109
|
}
|
|
40
110
|
}
|
|
41
111
|
if (Object.keys(partial).length > 0)
|
|
42
|
-
onRemoteStateRef.current(partial);
|
|
112
|
+
onRemoteStateRef.current(partial, base);
|
|
43
113
|
};
|
|
44
114
|
pageYMap.observeDeep(handler);
|
|
45
115
|
return () => {
|
package/dist/collab/ydocKeys.js
CHANGED
package/dist/common/Lightbox.js
CHANGED
|
@@ -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 { Dialog, DialogContent, DialogDescription, DialogTitle } from '../ui/dialog.js';
|
|
5
5
|
export function Lightbox({ isOpen, onClose, imageSrc, altText }) {
|
|
@@ -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 { useRef, useState } from 'react';
|
|
@@ -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
|
* Die eine Live-Region des Editors (WCAG 4.1.3): leer eingehängt, damit
|
|
5
5
|
* Screenreader sie vor der ersten Ansage kennen; unsichtbar, aber nicht
|
|
@@ -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 { Dialog } from 'radix-ui';
|
|
4
4
|
import { useImperativeHandle, useRef, useState } from 'react';
|
|
5
5
|
import { PiAlignBottom, PiAlignCenterHorizontal, PiAlignCenterVertical, PiAlignLeft, PiAlignRight, PiAlignTop, PiArrowCounterClockwise, PiArrowDown, PiArrowLineDown, PiArrowLineUp, PiArrowUp, PiArrowsClockwise, PiCaretLeft, PiCaretRight, PiClipboardText, PiColumns, PiCopy, PiFiles, PiFlipHorizontal, PiFlipVertical, PiFrameCorners, PiImage, PiImageSquare, PiLockSimple, PiLockSimpleOpen, PiRows, PiScissors, PiSelectionAll, PiSlidersHorizontal, PiStack, PiTextT, 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 { ContextMenu } from 'radix-ui';
|
|
4
4
|
import { useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
5
5
|
import { PiCaretRight, PiCheck } from 'react-icons/pi';
|
|
@@ -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
|
/**
|
|
4
4
|
* CanvasEditorShell - Canvas editor with shared sidebar and page management
|
|
5
5
|
*
|
|
@@ -439,8 +439,8 @@ function CanvasEditorInner({ initialConfigId, formatId, documentTitle, initialPr
|
|
|
439
439
|
return () => pagesDoc.off('update', report);
|
|
440
440
|
}, [pagesDoc, reportsPages]);
|
|
441
441
|
useImperativeHandle(exportApiRef, () => ({
|
|
442
|
-
captureActivePage: async ({ pixelRatio = 1, transparent = false } = {}) => {
|
|
443
|
-
await ensureFontsReady();
|
|
442
|
+
captureActivePage: async ({ pixelRatio = 1, transparent = false, fontWaitMs } = {}) => {
|
|
443
|
+
await ensureFontsReady(fontWaitMs === undefined ? {} : { timeoutMs: fontWaitMs });
|
|
444
444
|
return handleCaptureCanvas({ format: 'png', pixelRatio, includeBackground: !transparent });
|
|
445
445
|
},
|
|
446
446
|
capturePages: async ({ pixelRatio = 1 } = {}) => {
|
|
@@ -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 { GenericCanvas } from '../GenericCanvas.js';
|
|
4
4
|
import { useMessages } from '../../i18n/messages.js';
|
|
5
5
|
import { cn } from '../../utils/cn.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
import { createContext, useContext } from 'react';
|
|
3
3
|
/** Provided by the host around the editor (`registerEditorShell`); null without blocks. */
|
|
4
4
|
export const BlockInsertContext = createContext(null);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CanvasEditorServices, CanvasSpecEditBridge } from '../../CanvasEditorProvider.js';
|
|
2
2
|
import type { GenericCanvasRef } from '../GenericCanvas.js';
|
|
3
|
+
import type { PageInheritance } from '../../configs/pageInheritance.js';
|
|
3
4
|
import type { HeterogeneousPage } from '../../configs/types.js';
|
|
4
5
|
import type { SidebarTab, SidebarTabId } from '../../sidebar/types.js';
|
|
5
6
|
import type React from 'react';
|
|
@@ -49,8 +50,13 @@ export interface EditorShellProviderProps {
|
|
|
49
50
|
configTabIds: readonly SidebarTabId[];
|
|
50
51
|
children: React.ReactNode;
|
|
51
52
|
}
|
|
52
|
-
/**
|
|
53
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Appends a page. `inherit` says what it takes from the active page: `true`
|
|
55
|
+
* its background and brand, `false` nothing, or each part on its own. A blank
|
|
56
|
+
* page asks for `{ brand: true, background: false }`: it stays bound to the
|
|
57
|
+
* deck's brand without the photo.
|
|
58
|
+
*/
|
|
59
|
+
export type EditorAddPage = (configId: string, inherit: boolean | PageInheritance, state?: Record<string, unknown>) => Promise<void>;
|
|
54
60
|
/** What the host's page picker gets: the „Seite hinzufügen" menu and „Vorlage ändern". */
|
|
55
61
|
export interface EditorPagePickerProps {
|
|
56
62
|
isOpen: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
import { useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import { buildCanvasMenu, } from '../../CanvasContextMenu/canvasMenuModel.js';
|
|
4
4
|
import { CanvasClipboard } from '../../../utils/canvasClipboard.js';
|
|
@@ -130,6 +130,8 @@ export interface CanvasEditorExportApi {
|
|
|
130
130
|
captureActivePage: (options?: {
|
|
131
131
|
pixelRatio?: number;
|
|
132
132
|
transparent?: boolean;
|
|
133
|
+
/** The longest wait for fonts, in ms; then the fallback faces are used. Default: no limit. */
|
|
134
|
+
fontWaitMs?: number;
|
|
133
135
|
}) => Promise<string | null>;
|
|
134
136
|
/** Every page as a PNG data URL, in page order; throws when a page cannot be rendered. */
|
|
135
137
|
capturePages: (options?: {
|
|
@@ -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 { getCanvasFormatOrDefault } from '../formats/index.js';
|
|
5
5
|
// Nur leichte Importe (kein Editor-Barrel): die Datei ist als eigener Subpath
|
|
@@ -20,5 +20,5 @@ export function CanvasPageSkeleton({ aspectRatio = DEFAULT_ASPECT_RATIO, }) {
|
|
|
20
20
|
}
|
|
21
21
|
export function CanvasEditorSkeleton({ chromeLeft, aspectRatio, topBar = true, }) {
|
|
22
22
|
const t = useMessages();
|
|
23
|
-
return (_jsxs("div", { role: "status", "aria-live": "polite", "aria-busy": "true", "aria-label": t.shell.loadingEditor, className: "flex flex-col h-[var(--editor-height)] min-h-[500px] bg-[var(--editor-bg)]", children: [topBar && (_jsxs("div", { className: "relative w-full h-[var(--editor-topbar-height)] shrink-0 bg-[image:var(--editor-menubar-gradient)] px-4 flex items-center gap-1 max-canvas-mobile:h-[52px] max-canvas-mobile:px-2.5", children: [chromeLeft ?? _jsx("div", { className: "size-[34px] rounded-[10px] bg-white/15" }), _jsx("div", { className: "absolute left-1/2 -translate-x-1/2 h-3.5 w-40 rounded animate-pulse bg-white/25" }), _jsx("div", { className: "ml-auto h-8 w-24 rounded-[10px] animate-pulse bg-white/15" })] })), _jsxs("div", { className: "flex flex-1 min-h-0 max-canvas-mobile:flex-col", children: [_jsx(CanvasTabRailSkeleton, {}), _jsxs("div", { className: "flex flex-1 min-h-0 flex-col bg-[var(--editor-canvas-bg)]", children: [_jsx("div", { className: "h-14 shrink-0 max-canvas-mobile:hidden" }), _jsx(CanvasPageSkeleton, { aspectRatio: aspectRatio }), _jsx("div", { className: "flex shrink-0 justify-end p-sm max-canvas-mobile:hidden", children: _jsx("div", { className: "h-9 w-48 rounded-xl border border-[var(--editor-border)] bg-[var(--editor-surface)]/80" }) })] })] })] }));
|
|
23
|
+
return (_jsxs("div", { role: "status", "aria-live": "polite", "aria-busy": "true", "aria-label": t.shell.loadingEditor, className: "flex flex-col h-[var(--editor-height,100dvh)] min-h-[500px] bg-[var(--editor-bg)]", children: [topBar && (_jsxs("div", { className: "relative w-full h-[var(--editor-topbar-height)] shrink-0 bg-[image:var(--editor-menubar-gradient)] px-4 flex items-center gap-1 max-canvas-mobile:h-[52px] max-canvas-mobile:px-2.5", children: [chromeLeft ?? _jsx("div", { className: "size-[34px] rounded-[10px] bg-white/15" }), _jsx("div", { className: "absolute left-1/2 -translate-x-1/2 h-3.5 w-40 rounded animate-pulse bg-white/25" }), _jsx("div", { className: "ml-auto h-8 w-24 rounded-[10px] animate-pulse bg-white/15" })] })), _jsxs("div", { className: "flex flex-1 min-h-0 max-canvas-mobile:flex-col", children: [_jsx(CanvasTabRailSkeleton, {}), _jsxs("div", { className: "flex flex-1 min-h-0 flex-col bg-[var(--editor-canvas-bg)]", children: [_jsx("div", { className: "h-14 shrink-0 max-canvas-mobile:hidden" }), _jsx(CanvasPageSkeleton, { aspectRatio: aspectRatio }), _jsx("div", { className: "flex shrink-0 justify-end p-sm max-canvas-mobile:hidden", children: _jsx("div", { className: "h-9 w-48 rounded-xl border border-[var(--editor-border)] bg-[var(--editor-surface)]/80" }) })] })] })] }));
|
|
24
24
|
}
|
|
@@ -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 { memo, useCallback, useEffect, useState } from 'react';
|
|
4
4
|
import { PiArrowCounterClockwise, PiArrowsOut, PiFile, PiMagnifyingGlassMinus, PiMagnifyingGlassPlus, } from 'react-icons/pi';
|
|
5
5
|
import { useMessages } from '../i18n/messages.js';
|
|
@@ -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 { memo } from 'react';
|
|
4
4
|
import { Group } from 'react-konva';
|
|
5
5
|
import { CanvasItemLockContext } from './canvasItemLock.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, 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
|
* Der Bearbeiten-Overlay für Leinwand-Text — EINE Erscheinung für beide
|
|
5
5
|
* Renderer, und zwar auf der DOM-Seite der Bühne.
|
|
@@ -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 { useLayoutEffect, useRef } from 'react';
|
|
4
4
|
import { useCanvasStoreSelector } from '../stores/CanvasStoreProvider.js';
|
|
5
5
|
import { paintCropGhosts, visibleContainerRect } from '../utils/cropGhost.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
|
* „Eigene Farbe" — der letzte Swatch jeder Farbpalette im Editor. Die
|
|
5
5
|
* Markenfarben davor bleiben die Vorgabe; dieser Swatch öffnet den nativen
|
|
@@ -208,6 +208,17 @@ export interface GenericCanvasRef {
|
|
|
208
208
|
/** False while an image element's source is still loading — a capture
|
|
209
209
|
* taken then is missing that image. */
|
|
210
210
|
imagesSettled: () => boolean;
|
|
211
|
+
/** How many image elements are still loading and how many failed to load.
|
|
212
|
+
* A capture is complete only when both are 0: `imagesSettled()` is also
|
|
213
|
+
* true when an image failed, and a host that captures at a deadline gets
|
|
214
|
+
* a picture without the images still pending. */
|
|
215
|
+
imageLoadState: () => {
|
|
216
|
+
pending: number;
|
|
217
|
+
failed: number;
|
|
218
|
+
};
|
|
219
|
+
/** Loads every failed image element again and returns how many. They count
|
|
220
|
+
* as pending at once; `use-image` alone loads only for a new url. */
|
|
221
|
+
retryFailedImages: () => number;
|
|
211
222
|
/** Lightweight JPEG capture for sending the canvas to vision models. */
|
|
212
223
|
captureCanvasForAi: () => Promise<string | null>;
|
|
213
224
|
/** The page's visible texts in reading order, for alt texts. */
|