@snowcone-app/canvas 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +70 -0
- package/README.md +357 -0
- package/dist/CanvasStateV1-D5GzvmnY.cjs +65 -0
- package/dist/CanvasStateV1-D5GzvmnY.cjs.map +1 -0
- package/dist/CanvasStateV1-ejb4d_LM.js +3692 -0
- package/dist/CanvasStateV1-ejb4d_LM.js.map +1 -0
- package/dist/ElementFactory-B7UOaJSD.cjs +23865 -0
- package/dist/ElementFactory-B7UOaJSD.cjs.map +1 -0
- package/dist/ElementFactory-uJTXU-nP.js +29615 -0
- package/dist/ElementFactory-uJTXU-nP.js.map +1 -0
- package/dist/HybridHistoryManager-BV6XV0nD.js +8048 -0
- package/dist/HybridHistoryManager-BV6XV0nD.js.map +1 -0
- package/dist/HybridHistoryManager-BXD93pp8.cjs +8 -0
- package/dist/HybridHistoryManager-BXD93pp8.cjs.map +1 -0
- package/dist/ImportManager-BYwuK6n4.cjs +2 -0
- package/dist/ImportManager-BYwuK6n4.cjs.map +1 -0
- package/dist/ImportManager-CxiaRg1N.js +222 -0
- package/dist/ImportManager-CxiaRg1N.js.map +1 -0
- package/dist/ThemeContext-4mJ_y0Me.cjs +2 -0
- package/dist/ThemeContext-4mJ_y0Me.cjs.map +1 -0
- package/dist/ThemeContext-H0Z-MqqR.js +1077 -0
- package/dist/ThemeContext-H0Z-MqqR.js.map +1 -0
- package/dist/advanced.d.ts +2 -0
- package/dist/advanced.js +48 -0
- package/dist/advanced.js.map +1 -0
- package/dist/advanced.mjs +15679 -0
- package/dist/advanced.mjs.map +1 -0
- package/dist/api/advanced.d.ts +110 -0
- package/dist/api/internals.d.ts +39 -0
- package/dist/api/stable.d.ts +44 -0
- package/dist/api/testing.d.ts +25 -0
- package/dist/browser-module-D0gHY9rY.cjs +9 -0
- package/dist/browser-module-D0gHY9rY.cjs.map +1 -0
- package/dist/browser-module-DFvKXBUE.js +15474 -0
- package/dist/browser-module-DFvKXBUE.js.map +1 -0
- package/dist/components/ArtboardDistressPanel.d.ts +7 -0
- package/dist/components/ArtboardImageMaskPanel.d.ts +7 -0
- package/dist/components/ArtboardPropertiesToolbar.d.ts +19 -0
- package/dist/components/ArtboardToolbar.d.ts +10 -0
- package/dist/components/BackButton.d.ts +7 -0
- package/dist/components/BackgroundPickerDropdown.d.ts +11 -0
- package/dist/components/BackgroundSwitcher.d.ts +7 -0
- package/dist/components/CanvasA11yFallback.d.ts +62 -0
- package/dist/components/CanvasEditor/CanvasRendererComponent.d.ts +51 -0
- package/dist/components/CanvasEditor/handlers/cropModeHandlers.d.ts +114 -0
- package/dist/components/CanvasEditor/handlers/groupChildHandlers.d.ts +65 -0
- package/dist/components/CanvasEditor/handlers/index.d.ts +10 -0
- package/dist/components/CanvasEditor/handlers/multiSelectionHandlers.d.ts +86 -0
- package/dist/components/CanvasEditor/hooks/buildSpreadClipShape.d.ts +20 -0
- package/dist/components/CanvasEditor/hooks/index.d.ts +24 -0
- package/dist/components/CanvasEditor/hooks/useActiveChild.d.ts +23 -0
- package/dist/components/CanvasEditor/hooks/useAnimatedFocusRect.d.ts +17 -0
- package/dist/components/CanvasEditor/hooks/useCanvasInteraction.d.ts +284 -0
- package/dist/components/CanvasEditor/hooks/useCanvasLayout.d.ts +50 -0
- package/dist/components/CanvasEditor/hooks/useCanvasRenderLoop.d.ts +140 -0
- package/dist/components/CanvasEditor/hooks/useCropMode.d.ts +4 -0
- package/dist/components/CanvasEditor/hooks/useHoverState.d.ts +9 -0
- package/dist/components/CanvasEditor/hooks/useInteractionState.d.ts +23 -0
- package/dist/components/CanvasEditor/hooks/useKeyboardHandlers.d.ts +16 -0
- package/dist/components/CanvasEditor/hooks/useMarqueeSelection.d.ts +22 -0
- package/dist/components/CanvasEditor/hooks/useMultiSelection.d.ts +5 -0
- package/dist/components/CanvasEditor/hooks/usePenTool.d.ts +10 -0
- package/dist/components/CanvasEditor/hooks/useRenderState.d.ts +31 -0
- package/dist/components/CanvasEditor/hooks/useSnapAndSpacing.d.ts +42 -0
- package/dist/components/CanvasEditor/hooks/useTextEditing.d.ts +56 -0
- package/dist/components/CanvasEditor/hooks/useTextEditingHandlers.d.ts +75 -0
- package/dist/components/CanvasEditor/renderers/hoverRenderer.d.ts +12 -0
- package/dist/components/CanvasEditor/renderers/index.d.ts +10 -0
- package/dist/components/CanvasEditor/renderers/marqueeRenderer.d.ts +21 -0
- package/dist/components/CanvasEditor/renderers/multiSelectionRenderer.d.ts +52 -0
- package/dist/components/CanvasEditor/renderers/renderingConstants.d.ts +59 -0
- package/dist/components/CanvasEditor/types/index.d.ts +11 -0
- package/dist/components/CanvasEditor.d.ts +102 -0
- package/dist/components/ColorPickerDropdown.d.ts +29 -0
- package/dist/components/CompositingPanel.d.ts +8 -0
- package/dist/components/ContextualToolbars.d.ts +150 -0
- package/dist/components/CropPanel.d.ts +20 -0
- package/dist/components/DistressPanel.d.ts +7 -0
- package/dist/components/DocsPage.d.ts +6 -0
- package/dist/components/Drawer.d.ts +39 -0
- package/dist/components/EffectsPanel.d.ts +14 -0
- package/dist/components/ExportTestPanel.d.ts +16 -0
- package/dist/components/FontBrowserDrawer.d.ts +20 -0
- package/dist/components/FontSizeDropdown.d.ts +12 -0
- package/dist/components/GlyphBrowserDrawer.d.ts +13 -0
- package/dist/components/GlyphPicker.d.ts +14 -0
- package/dist/components/IconMatchTest.d.ts +3 -0
- package/dist/components/IconSizeTest.d.ts +3 -0
- package/dist/components/ImageBrowserDrawer.d.ts +27 -0
- package/dist/components/ImageToolbar.d.ts +47 -0
- package/dist/components/LayerEffects.d.ts +11 -0
- package/dist/components/LayerLeadingChip.d.ts +9 -0
- package/dist/components/LayersPanel.d.ts +30 -0
- package/dist/components/MaskItem.d.ts +12 -0
- package/dist/components/MasksPanel.d.ts +7 -0
- package/dist/components/MonotypeDemoPage.d.ts +2 -0
- package/dist/components/MoreMenu.d.ts +15 -0
- package/dist/components/OpenTypeFeaturesPanel.d.ts +12 -0
- package/dist/components/PathToolbar.d.ts +10 -0
- package/dist/components/PenToolDemo.d.ts +3 -0
- package/dist/components/ProgressiveBlur.d.ts +25 -0
- package/dist/components/RotationHandle.d.ts +47 -0
- package/dist/components/SaveLoadMenu.d.ts +15 -0
- package/dist/components/ShapeToolbar.d.ts +71 -0
- package/dist/components/ShapeTypeDrawer.d.ts +10 -0
- package/dist/components/StrokePanel.d.ts +7 -0
- package/dist/components/TailwindDemo.d.ts +3 -0
- package/dist/components/TextEffectsDropdown.d.ts +14 -0
- package/dist/components/TextToolbar.d.ts +47 -0
- package/dist/components/TextTypeDrawer.d.ts +8 -0
- package/dist/components/ThemeToggle.d.ts +2 -0
- package/dist/components/TransformControlPanel.d.ts +12 -0
- package/dist/components/VisualGuideOverlay.d.ts +156 -0
- package/dist/components/embed/ArtboardTabs.d.ts +74 -0
- package/dist/components/embed/Canvas.d.ts +72 -0
- package/dist/components/embed/EffectsPanel.d.ts +76 -0
- package/dist/components/embed/ErrorBoundary.d.ts +34 -0
- package/dist/components/embed/ExportPanel.d.ts +51 -0
- package/dist/components/embed/GlyphPanel.d.ts +70 -0
- package/dist/components/embed/ImagePanel.d.ts +58 -0
- package/dist/components/embed/LayersPanel.d.ts +13 -0
- package/dist/components/embed/LoadingStates.d.ts +32 -0
- package/dist/components/embed/MenuButton.d.ts +47 -0
- package/dist/components/embed/SnowconeCanvas.d.ts +844 -0
- package/dist/components/embed/ZoomControls.d.ts +16 -0
- package/dist/components/embed/index.d.ts +129 -0
- package/dist/components/embed/primitives/index.d.ts +42 -0
- package/dist/components/embed/ui/index.d.ts +52 -0
- package/dist/components/embed/utils/index.d.ts +31 -0
- package/dist/components/embedded/ArtboardEmbed.d.ts +70 -0
- package/dist/components/embedded/MerchifyThemeWrapper.d.ts +30 -0
- package/dist/components/embedded/ProductPreviewCard.d.ts +8 -0
- package/dist/components/embedded/index.d.ts +7 -0
- package/dist/components/primitives/ButtonGroup.d.ts +27 -0
- package/dist/components/primitives/ControlGroup.d.ts +15 -0
- package/dist/components/primitives/Dropdown.d.ts +27 -0
- package/dist/components/primitives/DropdownMenu.d.ts +9 -0
- package/dist/components/primitives/MenuItem.d.ts +13 -0
- package/dist/components/primitives/Panel.d.ts +25 -0
- package/dist/components/primitives/SecondaryToolbar.d.ts +9 -0
- package/dist/components/primitives/Switch.d.ts +10 -0
- package/dist/components/primitives/Toggle.d.ts +17 -0
- package/dist/components/primitives/index.d.ts +22 -0
- package/dist/components/stories/utils/MockEditorProvider.d.ts +32 -0
- package/dist/components/stories/utils/QACanvasCard.d.ts +41 -0
- package/dist/components/stories/utils/VisualQACard.d.ts +24 -0
- package/dist/components/stories/utils/element-factories.d.ts +188 -0
- package/dist/components/stories/utils/spec-to-elements.d.ts +74 -0
- package/dist/components/stories/utils/themeDecorator.d.ts +45 -0
- package/dist/components/stories/utils/unified-test-cases.d.ts +27 -0
- package/dist/components/text-toolbar/BoldButton.d.ts +5 -0
- package/dist/components/text-toolbar/FontColorButton.d.ts +6 -0
- package/dist/components/text-toolbar/FontSizeGroup.d.ts +5 -0
- package/dist/components/text-toolbar/ItalicButton.d.ts +5 -0
- package/dist/components/text-toolbar/TextAlignButton.d.ts +5 -0
- package/dist/components/text-toolbar/TextMoreMenu.d.ts +7 -0
- package/dist/components/text-toolbar/UnderlineButton.d.ts +5 -0
- package/dist/components/text-toolbar/UppercaseButton.d.ts +5 -0
- package/dist/components/text-toolbar/index.d.ts +25 -0
- package/dist/components/toolbars/EmbeddedToolbarLayout.d.ts +49 -0
- package/dist/components/toolbars/ExpandedPanelIcon.d.ts +13 -0
- package/dist/components/toolbars/FloatingPanels.d.ts +23 -0
- package/dist/components/toolbars/GroupElementToolbar.d.ts +35 -0
- package/dist/components/toolbars/SecondaryPanels.d.ts +125 -0
- package/dist/components/toolbars/index.d.ts +18 -0
- package/dist/components/toolbars/shared/ColorPanelWrapper.d.ts +9 -0
- package/dist/components/toolbars/shared/SecondaryPanelWrapper.d.ts +9 -0
- package/dist/components/ui/PresetCarousel.d.ts +21 -0
- package/dist/components/ui/SecondaryPanel.d.ts +28 -0
- package/dist/components/ui/SliderRow.d.ts +30 -0
- package/dist/components/ui/collapsed-toolbar-header.d.ts +14 -0
- package/dist/components/ui/custom-icons.d.ts +25 -0
- package/dist/components/ui/icons.d.ts +100 -0
- package/dist/components/ui/index.d.ts +48 -0
- package/dist/components/ui/normalized-icon.d.ts +63 -0
- package/dist/components/ui/toolbar-button.d.ts +24 -0
- package/dist/compose-Bo108juW.cjs +33 -0
- package/dist/compose-Bo108juW.cjs.map +1 -0
- package/dist/compose-DQ1FZS3O.js +7690 -0
- package/dist/compose-DQ1FZS3O.js.map +1 -0
- package/dist/constants.d.ts +121 -0
- package/dist/contexts/CommandContext.d.ts +87 -0
- package/dist/contexts/EditorContext.d.ts +190 -0
- package/dist/contexts/ElementsContext.d.ts +104 -0
- package/dist/contexts/HistoryContext.d.ts +60 -0
- package/dist/contexts/KitContext.d.ts +50 -0
- package/dist/contexts/SelectionContext.d.ts +51 -0
- package/dist/contexts/ThemeContext.d.ts +55 -0
- package/dist/contexts/ToolStateContext.d.ts +60 -0
- package/dist/contexts/ViewportContext.d.ts +87 -0
- package/dist/core/AlignmentSnapSystem.d.ts +270 -0
- package/dist/core/ArtboardElement.d.ts +106 -0
- package/dist/core/ArtboardManager.d.ts +130 -0
- package/dist/core/ArtboardRenderer.d.ts +97 -0
- package/dist/core/BaseElement.d.ts +94 -0
- package/dist/core/CanvasRenderer.d.ts +237 -0
- package/dist/core/CommandHistory.d.ts +173 -0
- package/dist/core/CoordinateTransform.d.ts +69 -0
- package/dist/core/CropModeController.d.ts +90 -0
- package/dist/core/EditModeRenderer.d.ts +51 -0
- package/dist/core/ElementFactory.d.ts +73 -0
- package/dist/core/ElementStore.d.ts +69 -0
- package/dist/core/EventBus.d.ts +163 -0
- package/dist/core/GeometryUtils.d.ts +247 -0
- package/dist/core/GroupElement.d.ts +134 -0
- package/dist/core/HoverRenderer.d.ts +103 -0
- package/dist/core/HybridHistoryManager.d.ts +137 -0
- package/dist/core/ImageCache.d.ts +63 -0
- package/dist/core/ImageElement.d.ts +226 -0
- package/dist/core/ImageLoadEvents.d.ts +23 -0
- package/dist/core/InteractionFeedbackRenderer.d.ts +15 -0
- package/dist/core/InteractionStateMachine.d.ts +199 -0
- package/dist/core/PathElement.d.ts +84 -0
- package/dist/core/PenToolManager.d.ts +112 -0
- package/dist/core/PinchHandler.d.ts +32 -0
- package/dist/core/ResizeHandler.d.ts +51 -0
- package/dist/core/ResizePipeline.d.ts +83 -0
- package/dist/core/ResizeUtils.d.ts +17 -0
- package/dist/core/RotationAnchorResolver.d.ts +60 -0
- package/dist/core/RotationUtils.d.ts +28 -0
- package/dist/core/SelectionRenderer.d.ts +24 -0
- package/dist/core/ShapeElement.d.ts +121 -0
- package/dist/core/SpacingSystem.d.ts +73 -0
- package/dist/core/SpatialGrid.d.ts +53 -0
- package/dist/core/TextElement.d.ts +80 -0
- package/dist/core/TextMetrics.d.ts +117 -0
- package/dist/core/Transform.d.ts +158 -0
- package/dist/core/TransformConverter.d.ts +16 -0
- package/dist/core/TransformHandles.d.ts +55 -0
- package/dist/core/artboardReducer.d.ts +46 -0
- package/dist/effects/DistressGenerator.d.ts +26 -0
- package/dist/effects/DistressTextureCache.d.ts +49 -0
- package/dist/effects/distress-presets.d.ts +86 -0
- package/dist/effects/distress-textures.d.ts +34 -0
- package/dist/effects/distress-utils.d.ts +39 -0
- package/dist/effects/mask-presets.d.ts +36 -0
- package/dist/fonts/google-fonts.d.ts +48 -0
- package/dist/google-fonts.json +1 -0
- package/dist/hooks/index.d.ts +42 -0
- package/dist/hooks/useArtboards.d.ts +71 -0
- package/dist/hooks/useAutoExport.d.ts +66 -0
- package/dist/hooks/useBreakpoint.d.ts +53 -0
- package/dist/hooks/useCanvasEvents.d.ts +8 -0
- package/dist/hooks/useCanvasReady.d.ts +22 -0
- package/dist/hooks/useClickOutside.d.ts +3 -0
- package/dist/hooks/useCommandHistory.d.ts +39 -0
- package/dist/hooks/useCommands.d.ts +47 -0
- package/dist/hooks/useContentReady.d.ts +18 -0
- package/dist/hooks/useElementById.d.ts +20 -0
- package/dist/hooks/useElementByName.d.ts +10 -0
- package/dist/hooks/useElementProperties.d.ts +29 -0
- package/dist/hooks/useExport.d.ts +89 -0
- package/dist/hooks/useImageBinding.d.ts +34 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +13 -0
- package/dist/hooks/useLayerDndKit.d.ts +24 -0
- package/dist/hooks/useLayerDragDrop.d.ts +58 -0
- package/dist/hooks/useLayerPreview.d.ts +31 -0
- package/dist/hooks/useLayerSelection.d.ts +76 -0
- package/dist/hooks/useLayers.d.ts +91 -0
- package/dist/hooks/usePerformance.d.ts +48 -0
- package/dist/hooks/useProjectLoader.d.ts +64 -0
- package/dist/hooks/useSelectedElement.d.ts +17 -0
- package/dist/hooks/useTextBinding.d.ts +26 -0
- package/dist/hooks/useTextToolbar.d.ts +61 -0
- package/dist/hooks/useViewport.d.ts +46 -0
- package/dist/icons/icon-data.d.ts +2 -0
- package/dist/icons/registry.d.ts +28 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1138 -0
- package/dist/index.mjs.map +1 -0
- package/dist/internals.d.ts +2 -0
- package/dist/internals.js +2 -0
- package/dist/internals.js.map +1 -0
- package/dist/internals.mjs +219 -0
- package/dist/internals.mjs.map +1 -0
- package/dist/kits/compose.d.ts +69 -0
- package/dist/kits/index.d.ts +21 -0
- package/dist/kits/presets.d.ts +40 -0
- package/dist/kits/registry.d.ts +33 -0
- package/dist/kits/sections.d.ts +119 -0
- package/dist/kits/serialization.d.ts +78 -0
- package/dist/kits/types.d.ts +129 -0
- package/dist/kits/validation.d.ts +36 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/plugins/ElementTypePlugin.d.ts +90 -0
- package/dist/presets/artboard-color-presets.d.ts +22 -0
- package/dist/presets/tshirt-presets.d.ts +60 -0
- package/dist/rendering/CompositingRenderer.d.ts +33 -0
- package/dist/rendering/DistressTextureRenderer.d.ts +39 -0
- package/dist/rendering/ElementRenderUtils.d.ts +17 -0
- package/dist/rendering/MaskRenderer.d.ts +41 -0
- package/dist/rendering/PieceGuideRenderer.d.ts +177 -0
- package/dist/rendering/StrokeRenderer.d.ts +24 -0
- package/dist/rendering/canvas-renderer.d.ts +18 -0
- package/dist/rendering/element-serializer.d.ts +143 -0
- package/dist/rendering/image-renderer.d.ts +6 -0
- package/dist/rendering/knockout-utils.d.ts +48 -0
- package/dist/rendering/mask-utils.d.ts +65 -0
- package/dist/rendering/renderer-types.d.ts +79 -0
- package/dist/rendering/rich-text-renderer.d.ts +43 -0
- package/dist/rendering/serialize-for-server.d.ts +45 -0
- package/dist/rendering/shape-renderer.d.ts +6 -0
- package/dist/rendering/stroke-utils.d.ts +18 -0
- package/dist/rendering/text-renderer.d.ts +71 -0
- package/dist/rendering/transform-renderer.d.ts +33 -0
- package/dist/services/AutoExportManager.d.ts +107 -0
- package/dist/services/falApi.d.ts +63 -0
- package/dist/services/nounProjectApi.d.ts +90 -0
- package/dist/services/recraftApi.d.ts +65 -0
- package/dist/services/runwareApi.d.ts +69 -0
- package/dist/state/CanvasStateV1.d.ts +373 -0
- package/dist/state/index.d.ts +10 -0
- package/dist/style.css +1 -0
- package/dist/taco-reference-cropped.jpg +0 -0
- package/dist/testing/MockEditorProvider.d.ts +49 -0
- package/dist/testing/index.d.ts +25 -0
- package/dist/testing/utils.d.ts +128 -0
- package/dist/testing.d.ts +2 -0
- package/dist/testing.js +2 -0
- package/dist/testing.js.map +1 -0
- package/dist/testing.mjs +140 -0
- package/dist/testing.mjs.map +1 -0
- package/dist/textures/glass-frame.svg +32 -0
- package/dist/theme.d.ts +99 -0
- package/dist/themes/index.d.ts +23 -0
- package/dist/transforms/ArchTransform.d.ts +14 -0
- package/dist/transforms/AscendTransform.d.ts +14 -0
- package/dist/transforms/CircleTransform.d.ts +51 -0
- package/dist/transforms/CustomTransform.d.ts +81 -0
- package/dist/transforms/FlagTransform.d.ts +14 -0
- package/dist/transforms/LeanTransform.d.ts +14 -0
- package/dist/transforms/WaveTransform.d.ts +16 -0
- package/dist/transforms/defaults.d.ts +33 -0
- package/dist/transforms/index.d.ts +10 -0
- package/dist/transforms/registry.d.ts +51 -0
- package/dist/types/capabilities.d.ts +50 -0
- package/dist/types/guards.d.ts +31 -0
- package/dist/types/index.d.ts +765 -0
- package/dist/types/public.d.ts +31 -0
- package/dist/types/react.d.ts +132 -0
- package/dist/utils/ArtworkPlacement.d.ts +97 -0
- package/dist/utils/ElementPreviewRenderer.d.ts +19 -0
- package/dist/utils/ExportManager.d.ts +208 -0
- package/dist/utils/FontAnalyzer.d.ts +137 -0
- package/dist/utils/GlyphRenderer.d.ts +55 -0
- package/dist/utils/GoogleFontsService.d.ts +37 -0
- package/dist/utils/ImageLoader.d.ts +124 -0
- package/dist/utils/ImportManager.d.ts +72 -0
- package/dist/utils/MonotypeCategoryMapping.d.ts +36 -0
- package/dist/utils/MonotypeService.d.ts +148 -0
- package/dist/utils/PerformanceMonitor.d.ts +54 -0
- package/dist/utils/TextureManager.d.ts +60 -0
- package/dist/utils/UnifiedFontService.d.ts +117 -0
- package/dist/utils/WorkerExportManager.d.ts +185 -0
- package/dist/utils/clickProtection.d.ts +39 -0
- package/dist/utils/cn.d.ts +4 -0
- package/dist/utils/colorConversion.d.ts +101 -0
- package/dist/utils/documentColors.d.ts +108 -0
- package/dist/utils/featureApplied.d.ts +14 -0
- package/dist/utils/google-fonts-loader.d.ts +67 -0
- package/dist/utils/logger.d.ts +66 -0
- package/dist/utils/selectionPreservation.d.ts +42 -0
- package/dist/utils/textCursorUtils.d.ts +39 -0
- package/dist/utils/textUtils.d.ts +11 -0
- package/dist/workers/export-protocol.d.ts +119 -0
- package/dist/workers/export-worker.bundle.string.d.ts +2 -0
- package/dist/workers/export-worker.d.ts +5 -0
- package/package.json +201 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ImageElement } from '../../core/ImageElement.js';
|
|
3
|
+
import { StrokeConfig, CompositingScope } from '../../types/index.js';
|
|
4
|
+
export interface CornerRadiusPanelProps {
|
|
5
|
+
value: number;
|
|
6
|
+
onChange: (value: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const CornerRadiusPanel: React.FC<CornerRadiusPanelProps>;
|
|
9
|
+
export interface RotationPanelProps {
|
|
10
|
+
value: number;
|
|
11
|
+
onChange: (value: number) => void;
|
|
12
|
+
onRotate90: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const RotationPanel: React.FC<RotationPanelProps>;
|
|
15
|
+
export interface FontSizePanelProps {
|
|
16
|
+
value: number;
|
|
17
|
+
onChange: (value: number) => void;
|
|
18
|
+
/** Current text-box width. When null/undefined the width slider is
|
|
19
|
+
* hidden (e.g. element type doesn't expose a width on transformData). */
|
|
20
|
+
widthValue?: number | null;
|
|
21
|
+
/** Called when the width slider moves. */
|
|
22
|
+
onWidthChange?: (value: number) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const FontSizePanel: React.FC<FontSizePanelProps>;
|
|
25
|
+
export interface OpacityPanelProps {
|
|
26
|
+
/** Opacity value 0-1 */
|
|
27
|
+
value: number;
|
|
28
|
+
/** Called with 0-1 range */
|
|
29
|
+
onChange: (value: number) => void;
|
|
30
|
+
}
|
|
31
|
+
export declare const OpacityPanel: React.FC<OpacityPanelProps>;
|
|
32
|
+
export interface ShapeCornerRadiusPanelProps {
|
|
33
|
+
value: number;
|
|
34
|
+
onChange: (value: number) => void;
|
|
35
|
+
}
|
|
36
|
+
export declare const ShapeCornerRadiusPanel: React.FC<ShapeCornerRadiusPanelProps>;
|
|
37
|
+
export interface ShapeTransparencyPanelProps {
|
|
38
|
+
/** Fill opacity 0-1 */
|
|
39
|
+
value: number;
|
|
40
|
+
/** Called with 0-1 range */
|
|
41
|
+
onChange: (value: number) => void;
|
|
42
|
+
}
|
|
43
|
+
export declare const ShapeTransparencyPanel: React.FC<ShapeTransparencyPanelProps>;
|
|
44
|
+
export interface ShapeSidesPanelProps {
|
|
45
|
+
value: number;
|
|
46
|
+
onChange: (value: number) => void;
|
|
47
|
+
}
|
|
48
|
+
export declare const ShapeSidesPanel: React.FC<ShapeSidesPanelProps>;
|
|
49
|
+
export interface ShapePointsPanelProps {
|
|
50
|
+
value: number;
|
|
51
|
+
onChange: (value: number) => void;
|
|
52
|
+
}
|
|
53
|
+
export declare const ShapePointsPanel: React.FC<ShapePointsPanelProps>;
|
|
54
|
+
export interface ShapeInnerRadiusPanelProps {
|
|
55
|
+
/** Inner radius 0-1 */
|
|
56
|
+
value: number;
|
|
57
|
+
/** Called with 0-1 range */
|
|
58
|
+
onChange: (value: number) => void;
|
|
59
|
+
}
|
|
60
|
+
export declare const ShapeInnerRadiusPanel: React.FC<ShapeInnerRadiusPanelProps>;
|
|
61
|
+
export interface ShapeColorPanelProps {
|
|
62
|
+
value: string;
|
|
63
|
+
onChange: (color: string) => void;
|
|
64
|
+
documentColors: string[];
|
|
65
|
+
imageColors?: string[];
|
|
66
|
+
}
|
|
67
|
+
export declare const ShapeColorPanel: React.FC<ShapeColorPanelProps>;
|
|
68
|
+
export interface TextColorPanelProps {
|
|
69
|
+
value: string;
|
|
70
|
+
onChange: (e: {
|
|
71
|
+
target: {
|
|
72
|
+
value: string;
|
|
73
|
+
};
|
|
74
|
+
}) => void;
|
|
75
|
+
documentColors: string[];
|
|
76
|
+
imageColors?: string[];
|
|
77
|
+
}
|
|
78
|
+
export declare const TextColorPanel: React.FC<TextColorPanelProps>;
|
|
79
|
+
export type CompositingMode = 'clip' | 'knockout';
|
|
80
|
+
export interface CompositingPanelProps {
|
|
81
|
+
mode: CompositingMode;
|
|
82
|
+
fill: boolean;
|
|
83
|
+
stroke: boolean;
|
|
84
|
+
scope: CompositingScope;
|
|
85
|
+
onModeChange: (mode: CompositingMode) => void;
|
|
86
|
+
onFillChange: (fill: boolean) => void;
|
|
87
|
+
onStrokeChange: (stroke: boolean) => void;
|
|
88
|
+
onScopeChange: (scope: CompositingScope) => void;
|
|
89
|
+
}
|
|
90
|
+
export declare const CompositingPanel: React.FC<CompositingPanelProps>;
|
|
91
|
+
/** @deprecated Use CompositingPanel instead */
|
|
92
|
+
export type KnockoutPanelProps = CompositingPanelProps;
|
|
93
|
+
/** @deprecated Use CompositingPanel instead */
|
|
94
|
+
export declare const KnockoutPanel: React.FC<CompositingPanelProps>;
|
|
95
|
+
export interface DistressTexturePanelProps {
|
|
96
|
+
textureUrl: string;
|
|
97
|
+
/** Opacity 0-100 (percentage) */
|
|
98
|
+
opacity: number;
|
|
99
|
+
onTextureChange: (url: string) => void;
|
|
100
|
+
onOpacityChange: (pct: number) => void;
|
|
101
|
+
}
|
|
102
|
+
export declare const DistressTexturePanel: React.FC<DistressTexturePanelProps>;
|
|
103
|
+
export interface ImageMaskPanelProps {
|
|
104
|
+
imageUrl: string;
|
|
105
|
+
maskType: 'clip' | 'alpha' | 'luma';
|
|
106
|
+
opacity: number;
|
|
107
|
+
inverted: boolean;
|
|
108
|
+
onImageChange: (url: string) => void;
|
|
109
|
+
onMaskTypeChange: (type: 'clip' | 'alpha' | 'luma') => void;
|
|
110
|
+
onOpacityChange: (pct: number) => void;
|
|
111
|
+
onInvertedChange: (inverted: boolean) => void;
|
|
112
|
+
}
|
|
113
|
+
export declare const ImageMaskPanel: React.FC<ImageMaskPanelProps>;
|
|
114
|
+
export interface StrokePanelProps {
|
|
115
|
+
stroke?: StrokeConfig;
|
|
116
|
+
onChange: (stroke: StrokeConfig | undefined) => void;
|
|
117
|
+
documentColors?: string[];
|
|
118
|
+
imageColors?: string[];
|
|
119
|
+
}
|
|
120
|
+
export declare const StrokePanel: React.FC<StrokePanelProps>;
|
|
121
|
+
export interface CropPanelContentProps {
|
|
122
|
+
element: ImageElement;
|
|
123
|
+
onElementUpdate: (element: ImageElement) => void;
|
|
124
|
+
}
|
|
125
|
+
export declare const CropPanelContent: React.FC<CropPanelContentProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toolbar components barrel export.
|
|
3
|
+
*
|
|
4
|
+
* Per-element toolbars and shared utilities for the contextual toolbar system.
|
|
5
|
+
*/
|
|
6
|
+
export { GroupElementToolbar } from './GroupElementToolbar.js';
|
|
7
|
+
export type { GroupElementToolbarProps } from './GroupElementToolbar.js';
|
|
8
|
+
export { CornerRadiusPanel, RotationPanel, OpacityPanel, FontSizePanel, ShapeCornerRadiusPanel, ShapeTransparencyPanel, ShapeSidesPanel, ShapePointsPanel, ShapeInnerRadiusPanel, ShapeColorPanel, TextColorPanel, CompositingPanel, KnockoutPanel, StrokePanel, CropPanelContent, DistressTexturePanel, ImageMaskPanel, } from './SecondaryPanels.js';
|
|
9
|
+
export type { CompositingMode, StrokePanelProps, DistressTexturePanelProps, ImageMaskPanelProps } from './SecondaryPanels.js';
|
|
10
|
+
export { ExpandedPanelIcon } from './ExpandedPanelIcon.js';
|
|
11
|
+
export type { ExpandedPanelIconProps } from './ExpandedPanelIcon.js';
|
|
12
|
+
export { EmbeddedToolbarLayout } from './EmbeddedToolbarLayout.js';
|
|
13
|
+
export type { EmbeddedToolbarLayoutProps } from './EmbeddedToolbarLayout.js';
|
|
14
|
+
export { FloatingCornerRadiusPanel, FloatingCropPanel } from './FloatingPanels.js';
|
|
15
|
+
export { SecondaryPanelWrapper } from './shared/SecondaryPanelWrapper.js';
|
|
16
|
+
export type { SecondaryPanelWrapperProps } from './shared/SecondaryPanelWrapper.js';
|
|
17
|
+
export { ColorPanelWrapper } from './shared/ColorPanelWrapper.js';
|
|
18
|
+
export type { ColorPanelWrapperProps } from './shared/ColorPanelWrapper.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ColorPanelWrapperProps {
|
|
3
|
+
/** Whether this panel is currently open/expanded */
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
/** The panel content to render inside the wrapper */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const ColorPanelWrapper: React.FC<ColorPanelWrapperProps>;
|
|
9
|
+
export default ColorPanelWrapper;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SecondaryPanelWrapperProps {
|
|
3
|
+
/** Whether this panel is currently open/expanded */
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
/** The panel content to render inside the wrapper */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const SecondaryPanelWrapper: React.FC<SecondaryPanelWrapperProps>;
|
|
9
|
+
export default SecondaryPanelWrapper;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PresetItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
thumbnailUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PresetCarouselProps {
|
|
8
|
+
/** Array of preset items to display */
|
|
9
|
+
presets: PresetItem[];
|
|
10
|
+
/** Currently selected preset ID, or empty string for "Off" */
|
|
11
|
+
selectedId: string;
|
|
12
|
+
/** Called when a preset is selected. Empty string means "Off". */
|
|
13
|
+
onSelect: (id: string) => void;
|
|
14
|
+
/** Show an "Off" button as the first item. Default: true */
|
|
15
|
+
showOff?: boolean;
|
|
16
|
+
/** Thumbnail size in pixels. Default: 40 */
|
|
17
|
+
size?: number;
|
|
18
|
+
/** Accessible label for the carousel */
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const PresetCarousel: React.FC<PresetCarouselProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SecondaryPanelProps {
|
|
3
|
+
/** Panel content */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Additional class name for styling/identification */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Padding variant (default: 'normal') */
|
|
8
|
+
padding?: 'none' | 'compact' | 'normal';
|
|
9
|
+
/** Whether to add data-preserve-selection attribute (default: true) */
|
|
10
|
+
preserveSelection?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Size of the invisible "safe zone" around the panel that still preserves selection.
|
|
13
|
+
* Prevents accidental deselection when dragging sliders and going slightly outside.
|
|
14
|
+
* Default: 24px
|
|
15
|
+
*/
|
|
16
|
+
safeZone?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* SecondaryPanel - Container for secondary toolbar panels
|
|
20
|
+
*
|
|
21
|
+
* Features:
|
|
22
|
+
* - Consistent padding and styling
|
|
23
|
+
* - Touch handling to prevent parent scroll interference
|
|
24
|
+
* - data-preserve-selection to prevent accidental deselection
|
|
25
|
+
* - Invisible safe zone around panel edges
|
|
26
|
+
*/
|
|
27
|
+
export declare const SecondaryPanel: React.FC<SecondaryPanelProps>;
|
|
28
|
+
export default SecondaryPanel;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SliderRowProps {
|
|
3
|
+
/** Label displayed to the left of the slider */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Current value */
|
|
6
|
+
value: number;
|
|
7
|
+
/** Callback when value changes */
|
|
8
|
+
onChange: (value: number) => void;
|
|
9
|
+
/** Minimum value */
|
|
10
|
+
min: number;
|
|
11
|
+
/** Maximum value */
|
|
12
|
+
max: number;
|
|
13
|
+
/** Step increment (default: 1) */
|
|
14
|
+
step?: number;
|
|
15
|
+
/** Unit to display after value (e.g., "%", "°", "px") */
|
|
16
|
+
unit?: string;
|
|
17
|
+
/** Show number input field (default: false) */
|
|
18
|
+
showInput?: boolean;
|
|
19
|
+
/** Width of the number input (default: '56px') */
|
|
20
|
+
inputWidth?: string;
|
|
21
|
+
/** Additional class name for the container */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Layout variant: 'inline' (default) or 'stacked' */
|
|
24
|
+
variant?: 'inline' | 'stacked';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* SliderRow - A labeled slider with optional input and value display
|
|
28
|
+
*/
|
|
29
|
+
export declare const SliderRow: React.FC<SliderRowProps>;
|
|
30
|
+
export default SliderRow;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CollapsedToolbarHeaderProps {
|
|
3
|
+
/** Iconify icon string (e.g., "lucide:square-round-corner") or custom React node */
|
|
4
|
+
icon: string | React.ReactNode;
|
|
5
|
+
/** Label text to display */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Callback when close button is clicked */
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** Additional CSS classes */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Close button style: 'icon' shows X, 'done' shows Done button */
|
|
12
|
+
closeButtonStyle?: 'icon' | 'done';
|
|
13
|
+
}
|
|
14
|
+
export declare const CollapsedToolbarHeader: React.FC<CollapsedToolbarHeaderProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface IconProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
size?: number | string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Rotate Left icon (lucide-style stroked version)
|
|
8
|
+
*/
|
|
9
|
+
export declare const RotateLeftIcon: React.FC<IconProps>;
|
|
10
|
+
/**
|
|
11
|
+
* Rotate Right icon (lucide-style stroked version)
|
|
12
|
+
*/
|
|
13
|
+
export declare const RotateRightIcon: React.FC<IconProps>;
|
|
14
|
+
/**
|
|
15
|
+
* Sparkles icon (based on gravity-ui:sparkles)
|
|
16
|
+
* Two sparkle shapes - main 4-point star and smaller accent
|
|
17
|
+
*/
|
|
18
|
+
export declare const SparklesIcon: React.FC<IconProps>;
|
|
19
|
+
export declare const CustomIcons: {
|
|
20
|
+
readonly 'rotate-left': React.FC<IconProps>;
|
|
21
|
+
readonly 'rotate-right': React.FC<IconProps>;
|
|
22
|
+
readonly sparkles: React.FC<IconProps>;
|
|
23
|
+
};
|
|
24
|
+
export type CustomIconName = keyof typeof CustomIcons;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon Constants
|
|
3
|
+
*
|
|
4
|
+
* Centralized icon definitions using lucide (preferred) with custom icons where needed.
|
|
5
|
+
* Import icons from here instead of using iconify strings directly.
|
|
6
|
+
*/
|
|
7
|
+
export declare const icons: {
|
|
8
|
+
readonly plus: "lucide:plus";
|
|
9
|
+
readonly minus: "lucide:minus";
|
|
10
|
+
readonly close: "lucide:x";
|
|
11
|
+
readonly check: "lucide:check";
|
|
12
|
+
readonly menu: "lucide:menu";
|
|
13
|
+
readonly moreHorizontal: "lucide:ellipsis";
|
|
14
|
+
readonly moreVertical: "lucide:ellipsis-vertical";
|
|
15
|
+
readonly chevronDown: "lucide:chevron-down";
|
|
16
|
+
readonly chevronUp: "lucide:chevron-up";
|
|
17
|
+
readonly chevronLeft: "lucide:chevron-left";
|
|
18
|
+
readonly chevronRight: "lucide:chevron-right";
|
|
19
|
+
readonly text: "lucide:type";
|
|
20
|
+
readonly image: "lucide:image";
|
|
21
|
+
readonly layers: "lucide:layers";
|
|
22
|
+
readonly shapes: "lucide:shapes";
|
|
23
|
+
readonly trash: "lucide:trash-2";
|
|
24
|
+
readonly copy: "lucide:copy";
|
|
25
|
+
readonly pencil: "lucide:pencil";
|
|
26
|
+
readonly scissors: "lucide:scissors";
|
|
27
|
+
readonly save: "lucide:save";
|
|
28
|
+
readonly folderOpen: "lucide:folder-open";
|
|
29
|
+
readonly download: "lucide:download";
|
|
30
|
+
readonly upload: "lucide:upload";
|
|
31
|
+
readonly eye: "lucide:eye";
|
|
32
|
+
readonly eyeOff: "lucide:eye-off";
|
|
33
|
+
readonly lock: "lucide:lock";
|
|
34
|
+
readonly lockOpen: "lucide:lock-open";
|
|
35
|
+
readonly search: "lucide:search";
|
|
36
|
+
readonly link: "lucide:link";
|
|
37
|
+
readonly settings: "lucide:settings";
|
|
38
|
+
readonly palette: "lucide:palette";
|
|
39
|
+
readonly sun: "lucide:sun";
|
|
40
|
+
readonly moon: "lucide:moon";
|
|
41
|
+
readonly rotateLeft: "lucide:rotate-ccw";
|
|
42
|
+
readonly rotateRight: "lucide:rotate-cw";
|
|
43
|
+
readonly rotateCcwSquare: "lucide:rotate-ccw-square";
|
|
44
|
+
readonly bold: "lucide:bold";
|
|
45
|
+
readonly italic: "lucide:italic";
|
|
46
|
+
readonly underline: "lucide:underline";
|
|
47
|
+
readonly alignLeft: "lucide:align-left";
|
|
48
|
+
readonly alignCenter: "lucide:align-center";
|
|
49
|
+
readonly alignRight: "lucide:align-right";
|
|
50
|
+
readonly alignJustify: "lucide:align-justify";
|
|
51
|
+
readonly play: "lucide:play";
|
|
52
|
+
readonly pause: "lucide:pause";
|
|
53
|
+
readonly crop: "lucide:crop";
|
|
54
|
+
readonly flipHorizontal: "lucide:flip-horizontal-2";
|
|
55
|
+
readonly flipVertical: "lucide:flip-vertical-2";
|
|
56
|
+
readonly blend: "lucide:blend";
|
|
57
|
+
readonly cornerRadius: "lucide:square-round-corner";
|
|
58
|
+
readonly grip: "lucide:grip-vertical";
|
|
59
|
+
readonly folder: "lucide:folder";
|
|
60
|
+
readonly file: "lucide:file";
|
|
61
|
+
readonly fileText: "lucide:file-text";
|
|
62
|
+
readonly layerForward: "lucide:bring-to-front";
|
|
63
|
+
readonly layerBackward: "lucide:send-to-back";
|
|
64
|
+
readonly group: "lucide:group";
|
|
65
|
+
readonly ungroup: "lucide:ungroup";
|
|
66
|
+
readonly undo: "lucide:undo-2";
|
|
67
|
+
readonly redo: "lucide:redo-2";
|
|
68
|
+
readonly zoomIn: "lucide:zoom-in";
|
|
69
|
+
readonly zoomOut: "lucide:zoom-out";
|
|
70
|
+
readonly fitScreen: "lucide:scan";
|
|
71
|
+
readonly maximize: "lucide:maximize";
|
|
72
|
+
readonly move: "lucide:move";
|
|
73
|
+
readonly resize: "lucide:maximize-2";
|
|
74
|
+
readonly share: "lucide:share";
|
|
75
|
+
readonly externalLink: "lucide:external-link";
|
|
76
|
+
readonly cloudUpload: "lucide:cloud-upload";
|
|
77
|
+
readonly info: "lucide:info";
|
|
78
|
+
readonly helpCircle: "lucide:help-circle";
|
|
79
|
+
readonly alertCircle: "lucide:alert-circle";
|
|
80
|
+
readonly alertTriangle: "lucide:triangle-alert";
|
|
81
|
+
readonly checkCircle: "lucide:circle-check";
|
|
82
|
+
readonly arrowLeft: "lucide:arrow-left";
|
|
83
|
+
readonly arrowRight: "lucide:arrow-right";
|
|
84
|
+
readonly arrowUp: "lucide:arrow-up";
|
|
85
|
+
readonly arrowDown: "lucide:arrow-down";
|
|
86
|
+
readonly layout: "lucide:layout-grid";
|
|
87
|
+
readonly grid: "lucide:grid-3x3";
|
|
88
|
+
readonly list: "lucide:list";
|
|
89
|
+
readonly droplet: "lucide:droplet";
|
|
90
|
+
readonly paintBucket: "lucide:paint-bucket";
|
|
91
|
+
readonly letterSpacing: "lucide:space";
|
|
92
|
+
readonly lineHeight: "lucide:arrow-up-down";
|
|
93
|
+
readonly wand: "lucide:wand-2";
|
|
94
|
+
readonly rocket: "lucide:rocket";
|
|
95
|
+
readonly refresh: "lucide:refresh-cw";
|
|
96
|
+
readonly circle: "lucide:circle";
|
|
97
|
+
readonly circleFill: "lucide:circle-dot";
|
|
98
|
+
};
|
|
99
|
+
export type IconName = keyof typeof icons;
|
|
100
|
+
export { RotateLeftIcon, RotateRightIcon, SparklesIcon } from './custom-icons';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export { Label } from '@snowcone-app/ui';
|
|
2
|
+
export { Switch } from '@snowcone-app/ui';
|
|
3
|
+
export { Separator } from '@snowcone-app/ui';
|
|
4
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from '@snowcone-app/ui';
|
|
5
|
+
export { Spinner, spinnerVariants } from '@snowcone-app/ui';
|
|
6
|
+
export type { SpinnerProps } from '@snowcone-app/ui';
|
|
7
|
+
export { Surface, surfaceVariants, useSurface, SurfaceContext } from '@snowcone-app/ui';
|
|
8
|
+
export type { SurfaceProps } from '@snowcone-app/ui';
|
|
9
|
+
export { TextField } from '@snowcone-app/ui';
|
|
10
|
+
export type { TextFieldProps } from '@snowcone-app/ui';
|
|
11
|
+
export { Kbd, kbdVariants } from '@snowcone-app/ui';
|
|
12
|
+
export type { KbdProps } from '@snowcone-app/ui';
|
|
13
|
+
export { Fieldset, Legend } from '@snowcone-app/ui';
|
|
14
|
+
export type { FieldsetProps, LegendProps } from '@snowcone-app/ui';
|
|
15
|
+
export { Link, LinkIcon, linkVariants } from '@snowcone-app/ui';
|
|
16
|
+
export type { LinkProps } from '@snowcone-app/ui';
|
|
17
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent, TabsRoot } from '@snowcone-app/ui';
|
|
18
|
+
export { RadioGroup, RadioGroupItem, Radio } from '@snowcone-app/ui';
|
|
19
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent, CollapsibleRoot, Disclosure, DisclosureTrigger, DisclosureContent, } from '@snowcone-app/ui';
|
|
20
|
+
export { Textarea, TextArea } from '@snowcone-app/ui';
|
|
21
|
+
export type { TextareaProps } from '@snowcone-app/ui';
|
|
22
|
+
export { Input } from '@snowcone-app/ui';
|
|
23
|
+
export type { InputProps } from '@snowcone-app/ui';
|
|
24
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, TooltipRoot } from '@snowcone-app/ui';
|
|
25
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from '@snowcone-app/ui';
|
|
26
|
+
export { Checkbox } from '@snowcone-app/ui';
|
|
27
|
+
export { Badge, Chip, badgeVariants } from '@snowcone-app/ui';
|
|
28
|
+
export type { BadgeProps } from '@snowcone-app/ui';
|
|
29
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from '@snowcone-app/ui';
|
|
30
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from '@snowcone-app/ui';
|
|
31
|
+
export { Button, buttonVariants } from '@snowcone-app/ui';
|
|
32
|
+
export type { ButtonProps } from '@snowcone-app/ui';
|
|
33
|
+
export { Slider, SliderTrack, SliderThumb, SliderFill, SliderOutput } from '@snowcone-app/ui';
|
|
34
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverRoot } from '@snowcone-app/ui';
|
|
35
|
+
export { ToolbarButton } from './toolbar-button';
|
|
36
|
+
export type { ToolbarButtonProps } from './toolbar-button';
|
|
37
|
+
export { NormalizedIcon, getIconSet, getScaleFactor, getNormalizedSize, SET_SCALE_FACTORS, SIZE_PRESETS, } from './normalized-icon';
|
|
38
|
+
export type { NormalizedIconProps } from './normalized-icon';
|
|
39
|
+
export { CollapsedToolbarHeader } from './collapsed-toolbar-header';
|
|
40
|
+
export type { CollapsedToolbarHeaderProps } from './collapsed-toolbar-header';
|
|
41
|
+
export { SliderRow } from './SliderRow';
|
|
42
|
+
export type { SliderRowProps } from './SliderRow';
|
|
43
|
+
export { SecondaryPanel } from './SecondaryPanel';
|
|
44
|
+
export type { SecondaryPanelProps } from './SecondaryPanel';
|
|
45
|
+
export { PresetCarousel } from './PresetCarousel';
|
|
46
|
+
export type { PresetCarouselProps, PresetItem } from './PresetCarousel';
|
|
47
|
+
export { icons, type IconName } from './icons';
|
|
48
|
+
export { RotateLeftIcon, RotateRightIcon, SparklesIcon, CustomIcons, type CustomIconName } from './custom-icons';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface NormalizedIconProps {
|
|
3
|
+
/** Iconify icon string (e.g., "lucide:crop" or "gravity-ui:bold") */
|
|
4
|
+
icon: string;
|
|
5
|
+
/** Size preset - 'toolbar' is responsive (24px mobile, 20px desktop) */
|
|
6
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'toolbar';
|
|
7
|
+
/** Additional CSS classes (e.g., for color) */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Scaling factors per icon set to achieve visual consistency.
|
|
12
|
+
*
|
|
13
|
+
* These values compensate for differences in stroke width and viewbox padding
|
|
14
|
+
* across icon sets. Lucide (1.0) is the reference.
|
|
15
|
+
*
|
|
16
|
+
* Rationale:
|
|
17
|
+
* - gravity-ui: Thinner strokes, needs +15% to match visual weight
|
|
18
|
+
* - lucide: Reference set, no adjustment needed
|
|
19
|
+
* - hugeicons: Similar visual weight to lucide
|
|
20
|
+
* - mdi: Slightly bolder strokes, reduce by 5%
|
|
21
|
+
* - fa6-solid: Solid fill is visually heavy, reduce by 20%
|
|
22
|
+
*/
|
|
23
|
+
declare const SET_SCALE_FACTORS: Record<string, number>;
|
|
24
|
+
/**
|
|
25
|
+
* Per-icon offset corrections for centering.
|
|
26
|
+
* Some icons have asymmetric viewbox padding and need manual offset.
|
|
27
|
+
* Values are in pixels at base size, scaled proportionally.
|
|
28
|
+
*/
|
|
29
|
+
declare const ICON_OFFSETS: Record<string, {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Base pixel sizes for each preset.
|
|
35
|
+
* 'toolbar' is special - it has mobile and desktop values.
|
|
36
|
+
*/
|
|
37
|
+
declare const SIZE_PRESETS: Record<string, number | {
|
|
38
|
+
mobile: number;
|
|
39
|
+
desktop: number;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* Extract the icon set prefix from an icon string.
|
|
43
|
+
* @example getIconSet("gravity-ui:plus") => "gravity-ui"
|
|
44
|
+
* @example getIconSet("lucide:crop") => "lucide"
|
|
45
|
+
*/
|
|
46
|
+
declare function getIconSet(icon: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Get the scale factor for an icon set.
|
|
49
|
+
*/
|
|
50
|
+
declare function getScaleFactor(iconSet: string): number;
|
|
51
|
+
/**
|
|
52
|
+
* Get the offset correction for a specific icon.
|
|
53
|
+
*/
|
|
54
|
+
declare function getIconOffset(icon: string): {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
} | null;
|
|
58
|
+
/**
|
|
59
|
+
* Calculate the normalized pixel size for an icon.
|
|
60
|
+
*/
|
|
61
|
+
declare function getNormalizedSize(baseSize: number, iconSet: string): number;
|
|
62
|
+
export declare const NormalizedIcon: React.FC<NormalizedIconProps>;
|
|
63
|
+
export { getIconSet, getScaleFactor, getIconOffset, getNormalizedSize, SET_SCALE_FACTORS, SIZE_PRESETS, ICON_OFFSETS };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ToolbarButtonProps {
|
|
3
|
+
/** Iconify icon string (e.g., "lucide:crop" or "gravity-ui:bold") or React node for custom icons */
|
|
4
|
+
icon: string | React.ReactNode;
|
|
5
|
+
/** Click handler */
|
|
6
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
/** Active/pressed state - applies primary color styling */
|
|
8
|
+
active?: boolean;
|
|
9
|
+
/** Tooltip text (if provided, wraps button in Tooltip) */
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
/** Tooltip delay in ms (default: 300) */
|
|
12
|
+
tooltipDelay?: number;
|
|
13
|
+
/** Temporarily disable the tooltip (useful for preventing tooltip flicker after click) */
|
|
14
|
+
tooltipDisabled?: boolean;
|
|
15
|
+
/** Accessible label */
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
/** Disabled state */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Additional CSS classes */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Optional mouse leave handler (for tooltip management) */
|
|
22
|
+
onMouseLeave?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const ToolbarButton: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
|