@pixerate/editor-react 0.90.0 → 0.91.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/dist/animation-editor/AnimationEditor.d.cts +33 -0
- package/dist/animation-editor/AnimationEditor.d.ts +33 -0
- package/dist/animation-editor/AnimationEffectsPanel.d.cts +14 -0
- package/dist/animation-editor/AnimationEffectsPanel.d.ts +14 -0
- package/dist/animation-editor/AnimationStage.d.cts +24 -0
- package/dist/animation-editor/AnimationStage.d.ts +24 -0
- package/dist/animation-editor/CommandInspector.d.cts +14 -0
- package/dist/animation-editor/CommandInspector.d.ts +14 -0
- package/dist/animation-editor/CommandList.d.cts +16 -0
- package/dist/animation-editor/CommandList.d.ts +16 -0
- package/dist/animation-editor/CommitInput.d.cts +6 -0
- package/dist/animation-editor/CommitInput.d.ts +6 -0
- package/dist/animation-editor/EasePicker.d.cts +18 -0
- package/dist/animation-editor/EasePicker.d.ts +18 -0
- package/dist/animation-editor/PlayheadScrubber.d.cts +12 -0
- package/dist/animation-editor/PlayheadScrubber.d.ts +12 -0
- package/dist/animation-editor/SceneSettings.d.cts +12 -0
- package/dist/animation-editor/SceneSettings.d.ts +12 -0
- package/dist/animation-editor/ShotInspector.d.cts +14 -0
- package/dist/animation-editor/ShotInspector.d.ts +14 -0
- package/dist/animation-editor/ShotTimeline.d.cts +11 -0
- package/dist/animation-editor/ShotTimeline.d.ts +11 -0
- package/dist/animation-editor/index.cjs +0 -1
- package/dist/animation-editor/index.d.cts +11 -195
- package/dist/animation-editor/index.d.ts +11 -195
- package/dist/animation-editor/index.js +2 -3
- package/dist/animation-editor/useAnimationEditor.d.cts +34 -0
- package/dist/animation-editor/useAnimationEditor.d.ts +34 -0
- package/dist/canvas/AgentPresenceLayer.d.cts +11 -0
- package/dist/canvas/AgentPresenceLayer.d.ts +11 -0
- package/dist/canvas/AnimationTimeline.d.cts +22 -0
- package/dist/canvas/AnimationTimeline.d.ts +22 -0
- package/dist/canvas/CanvasComponentsPanel.d.cts +44 -0
- package/dist/canvas/CanvasComponentsPanel.d.ts +44 -0
- package/dist/canvas/CanvasDrawLayer.d.cts +23 -0
- package/dist/canvas/CanvasDrawLayer.d.ts +23 -0
- package/dist/canvas/CanvasEffects.d.cts +52 -0
- package/dist/canvas/CanvasEffects.d.ts +52 -0
- package/dist/canvas/CanvasGuidesLayer.d.cts +20 -0
- package/dist/canvas/CanvasGuidesLayer.d.ts +20 -0
- package/dist/canvas/DiagramPresenceLayer.d.cts +14 -0
- package/dist/canvas/DiagramPresenceLayer.d.ts +14 -0
- package/dist/canvas/MermaidDiagramNode.d.cts +37 -0
- package/dist/canvas/MermaidDiagramNode.d.ts +37 -0
- package/dist/canvas/MermaidFamilyScene.d.cts +29 -0
- package/dist/canvas/MermaidFamilyScene.d.ts +29 -0
- package/dist/canvas/MermaidThumbnail.d.cts +15 -0
- package/dist/canvas/MermaidThumbnail.d.ts +15 -0
- package/dist/canvas/ShapeNode.d.cts +31 -0
- package/dist/canvas/ShapeNode.d.ts +31 -0
- package/dist/canvas/TokenBindingPicker.d.cts +37 -0
- package/dist/canvas/TokenBindingPicker.d.ts +37 -0
- package/dist/canvas/index.cjs +0 -1
- package/dist/canvas/index.d.cts +40 -1084
- package/dist/canvas/index.d.ts +40 -1084
- package/dist/canvas/index.js +2 -3
- package/dist/canvas/useCanvasAnimation.d.cts +97 -0
- package/dist/canvas/useCanvasAnimation.d.ts +97 -0
- package/dist/canvas/useCanvasArrange.d.cts +80 -0
- package/dist/canvas/useCanvasArrange.d.ts +80 -0
- package/dist/canvas/useCanvasAutoLayout.d.cts +54 -0
- package/dist/canvas/useCanvasAutoLayout.d.ts +54 -0
- package/dist/canvas/useCanvasCapture.d.cts +20 -0
- package/dist/canvas/useCanvasCapture.d.ts +20 -0
- package/dist/canvas/useCanvasClipboard.d.cts +14 -0
- package/dist/canvas/useCanvasClipboard.d.ts +14 -0
- package/dist/canvas/useCanvasComponents.d.cts +74 -0
- package/dist/canvas/useCanvasComponents.d.ts +74 -0
- package/dist/canvas/useCanvasDocking.d.cts +15 -0
- package/dist/canvas/useCanvasDocking.d.ts +15 -0
- package/dist/canvas/useCanvasDraw.d.cts +37 -0
- package/dist/canvas/useCanvasDraw.d.ts +37 -0
- package/dist/canvas/useCanvasExplosion.d.cts +16 -0
- package/dist/canvas/useCanvasExplosion.d.ts +16 -0
- package/dist/canvas/useCanvasGraph.d.cts +27 -0
- package/dist/canvas/useCanvasGraph.d.ts +27 -0
- package/dist/canvas/useCanvasLayout.d.cts +25 -0
- package/dist/canvas/useCanvasLayout.d.ts +25 -0
- package/dist/canvas/useCanvasMeasure.d.cts +41 -0
- package/dist/canvas/useCanvasMeasure.d.ts +41 -0
- package/dist/canvas/useCanvasScenes.d.cts +61 -0
- package/dist/canvas/useCanvasScenes.d.ts +61 -0
- package/dist/canvas/useCanvasShortcuts.d.cts +22 -0
- package/dist/canvas/useCanvasShortcuts.d.ts +22 -0
- package/dist/canvas/useCanvasTokens.d.cts +24 -0
- package/dist/canvas/useCanvasTokens.d.ts +24 -0
- package/dist/canvas/useDiagramDirector.d.cts +21 -0
- package/dist/canvas/useDiagramDirector.d.ts +21 -0
- package/dist/canvas/useMermaidDiagram.d.cts +79 -0
- package/dist/canvas/useMermaidDiagram.d.ts +79 -0
- package/dist/canvas/useShapeBrushstroke.d.cts +37 -0
- package/dist/canvas/useShapeBrushstroke.d.ts +37 -0
- package/dist/canvas/useStreamingCanvas.d.cts +17 -0
- package/dist/canvas/useStreamingCanvas.d.ts +17 -0
- package/dist/chart/ChartCanvas.d.cts +44 -0
- package/dist/chart/ChartCanvas.d.ts +44 -0
- package/dist/chart/ChartDataGrid.d.cts +24 -0
- package/dist/chart/ChartDataGrid.d.ts +24 -0
- package/dist/chart/ChartEditor.d.cts +20 -0
- package/dist/chart/ChartEditor.d.ts +20 -0
- package/dist/chart/ChartInspector.d.cts +14 -0
- package/dist/chart/ChartInspector.d.ts +14 -0
- package/dist/chart/ChartStreamingView.d.cts +40 -0
- package/dist/chart/ChartStreamingView.d.ts +40 -0
- package/dist/chart/index.cjs +0 -1
- package/dist/chart/index.d.cts +7 -212
- package/dist/chart/index.d.ts +7 -212
- package/dist/chart/index.js +1 -2
- package/dist/chart/styles.d.cts +7 -0
- package/dist/chart/styles.d.ts +7 -0
- package/dist/chart/useChartEditor.d.cts +64 -0
- package/dist/chart/useChartEditor.d.ts +64 -0
- package/dist/chart-node/ChartNodeView.d.cts +27 -0
- package/dist/chart-node/ChartNodeView.d.ts +27 -0
- package/dist/chart-node/index.d.cts +1 -0
- package/dist/chart-node/index.d.ts +1 -0
- package/dist/{chunk-WOQ3H7KA.js → chunk-5R67YSSD.js} +1 -2
- package/dist/{chunk-SIEOYRHX.js → chunk-AILJ4JOW.js} +0 -1
- package/dist/{chunk-MO354USR.js → chunk-AJCWF6SN.js} +0 -1
- package/dist/{chunk-I3E4KSA2.js → chunk-FLS7Q32M.js} +0 -1
- package/dist/{chunk-34HEZX7J.js → chunk-GML6BYCN.js} +0 -1
- package/dist/{chunk-XWFU2CSG.js → chunk-NNM633RN.js} +0 -1
- package/dist/{chunk-ZQZAKUUM.js → chunk-OTGJEYHV.js} +0 -1
- package/dist/{chunk-4ZC2WCUO.js → chunk-SMLHUEEQ.js} +0 -1
- package/dist/{chunk-4FQXRPBN.js → chunk-SMMO7CZB.js} +2 -3
- package/dist/commands/CommandPalette.d.cts +16 -0
- package/dist/commands/CommandPalette.d.ts +16 -0
- package/dist/commands/index.cjs +0 -1
- package/dist/commands/index.d.cts +3 -69
- package/dist/commands/index.d.ts +3 -69
- package/dist/commands/index.js +1 -2
- package/dist/commands/useCommandPalette.d.cts +24 -0
- package/dist/commands/useCommandPalette.d.ts +24 -0
- package/dist/commands/useCommandShortcuts.d.cts +26 -0
- package/dist/commands/useCommandShortcuts.d.ts +26 -0
- package/dist/components/BubbleMenu.d.cts +13 -0
- package/dist/components/BubbleMenu.d.ts +13 -0
- package/dist/components/EditorContent.d.cts +6 -0
- package/dist/components/EditorContent.d.ts +6 -0
- package/dist/components/ExportDocxButton.d.cts +12 -0
- package/dist/components/ExportDocxButton.d.ts +12 -0
- package/dist/components/MergePreview.d.cts +28 -0
- package/dist/components/MergePreview.d.ts +28 -0
- package/dist/components/OutlinePanel.d.cts +28 -0
- package/dist/components/OutlinePanel.d.ts +28 -0
- package/dist/components/StylesGallery.d.cts +31 -0
- package/dist/components/StylesGallery.d.ts +31 -0
- package/dist/components/TemplateRenderer.d.cts +26 -0
- package/dist/components/TemplateRenderer.d.ts +26 -0
- package/dist/components/VariableForm.d.cts +27 -0
- package/dist/components/VariableForm.d.ts +27 -0
- package/dist/effects/EffectParameters.d.cts +28 -0
- package/dist/effects/EffectParameters.d.ts +28 -0
- package/dist/effects/EffectThumbnail.d.cts +15 -0
- package/dist/effects/EffectThumbnail.d.ts +15 -0
- package/dist/effects/EffectsBrowser.d.cts +22 -0
- package/dist/effects/EffectsBrowser.d.ts +22 -0
- package/dist/effects/index.cjs +0 -1
- package/dist/effects/index.d.cts +4 -82
- package/dist/effects/index.d.ts +4 -82
- package/dist/effects/index.js +2 -3
- package/dist/effects/useEffects.d.cts +16 -0
- package/dist/effects/useEffects.d.ts +16 -0
- package/dist/find-replace/FindReplaceBar.d.cts +19 -0
- package/dist/find-replace/FindReplaceBar.d.ts +19 -0
- package/dist/find-replace/index.d.cts +2 -0
- package/dist/find-replace/index.d.ts +2 -0
- package/dist/find-replace/useFindReplace.d.cts +24 -0
- package/dist/find-replace/useFindReplace.d.ts +24 -0
- package/dist/generation/AssetMentionChips.d.cts +24 -0
- package/dist/generation/AssetMentionChips.d.ts +24 -0
- package/dist/generation/GenerationHistory.d.cts +43 -0
- package/dist/generation/GenerationHistory.d.ts +43 -0
- package/dist/generation/GenerationSettings.d.cts +26 -0
- package/dist/generation/GenerationSettings.d.ts +26 -0
- package/dist/generation/JobProgress.d.cts +14 -0
- package/dist/generation/JobProgress.d.ts +14 -0
- package/dist/generation/index.cjs +0 -1
- package/dist/generation/index.d.cts +5 -124
- package/dist/generation/index.d.ts +5 -124
- package/dist/generation/index.js +1 -2
- package/dist/generation/useGenerationPlan.d.cts +18 -0
- package/dist/generation/useGenerationPlan.d.ts +18 -0
- package/dist/hooks/useAgentToolProvider.d.cts +11 -0
- package/dist/hooks/useAgentToolProvider.d.ts +11 -0
- package/dist/hooks/useDismissGuard.d.cts +26 -0
- package/dist/hooks/useDismissGuard.d.ts +26 -0
- package/dist/hooks/useDocxExport.d.cts +14 -0
- package/dist/hooks/useDocxExport.d.ts +14 -0
- package/dist/hooks/useEditor.d.cts +20 -0
- package/dist/hooks/useEditor.d.ts +20 -0
- package/dist/hooks/useFileImport.d.cts +23 -0
- package/dist/hooks/useFileImport.d.ts +23 -0
- package/dist/hooks/useHistory.d.cts +27 -0
- package/dist/hooks/useHistory.d.ts +27 -0
- package/dist/hooks/useHistoryDirty.d.cts +27 -0
- package/dist/hooks/useHistoryDirty.d.ts +27 -0
- package/dist/hooks/useHistoryShortcuts.d.cts +21 -0
- package/dist/hooks/useHistoryShortcuts.d.ts +21 -0
- package/dist/hooks/useMergePreview.d.cts +49 -0
- package/dist/hooks/useMergePreview.d.ts +49 -0
- package/dist/hooks/useNavigationGuard.d.cts +27 -0
- package/dist/hooks/useNavigationGuard.d.ts +27 -0
- package/dist/hooks/useOutline.d.cts +12 -0
- package/dist/hooks/useOutline.d.ts +12 -0
- package/dist/hooks/useParagraphStyles.d.cts +24 -0
- package/dist/hooks/useParagraphStyles.d.ts +24 -0
- package/dist/hooks/usePromptEditor.d.cts +57 -0
- package/dist/hooks/usePromptEditor.d.ts +57 -0
- package/dist/hooks/useToolBridge.d.cts +14 -0
- package/dist/hooks/useToolBridge.d.ts +14 -0
- package/dist/hooks/useToolRegistryView.d.cts +9 -0
- package/dist/hooks/useToolRegistryView.d.ts +9 -0
- package/dist/image-editor/AdjustmentLayersPanel.d.cts +13 -0
- package/dist/image-editor/AdjustmentLayersPanel.d.ts +13 -0
- package/dist/image-editor/BrushOptionsBar.d.cts +18 -0
- package/dist/image-editor/BrushOptionsBar.d.ts +18 -0
- package/dist/image-editor/ColorProfilePanel.d.cts +12 -0
- package/dist/image-editor/ColorProfilePanel.d.ts +12 -0
- package/dist/image-editor/ControlSlider.d.cts +12 -0
- package/dist/image-editor/ControlSlider.d.ts +12 -0
- package/dist/image-editor/CurvesEditor.d.cts +15 -0
- package/dist/image-editor/CurvesEditor.d.ts +15 -0
- package/dist/image-editor/FreeTransformOptionsBar.d.cts +14 -0
- package/dist/image-editor/FreeTransformOptionsBar.d.ts +14 -0
- package/dist/image-editor/Histogram.d.cts +14 -0
- package/dist/image-editor/Histogram.d.ts +14 -0
- package/dist/image-editor/ImageEditor.d.cts +22 -0
- package/dist/image-editor/ImageEditor.d.ts +22 -0
- package/dist/image-editor/ImageProviderEffectsPanel.d.cts +13 -0
- package/dist/image-editor/ImageProviderEffectsPanel.d.ts +13 -0
- package/dist/image-editor/LayerEffectsPanel.d.cts +14 -0
- package/dist/image-editor/LayerEffectsPanel.d.ts +14 -0
- package/dist/image-editor/LayersPanel.d.cts +22 -0
- package/dist/image-editor/LayersPanel.d.ts +22 -0
- package/dist/image-editor/PaintGradientEditor.d.cts +5 -0
- package/dist/image-editor/PaintGradientEditor.d.ts +5 -0
- package/dist/image-editor/RefineEdgePanel.d.cts +16 -0
- package/dist/image-editor/RefineEdgePanel.d.ts +16 -0
- package/dist/image-editor/SelectionOptionsBar.d.cts +18 -0
- package/dist/image-editor/SelectionOptionsBar.d.ts +18 -0
- package/dist/image-editor/ShapeOptionsBar.d.cts +14 -0
- package/dist/image-editor/ShapeOptionsBar.d.ts +14 -0
- package/dist/image-editor/TypeOptionsBar.d.cts +16 -0
- package/dist/image-editor/TypeOptionsBar.d.ts +16 -0
- package/dist/image-editor/index.cjs +0 -1
- package/dist/image-editor/index.d.cts +17 -296
- package/dist/image-editor/index.d.ts +17 -296
- package/dist/image-editor/index.js +4 -5
- package/dist/image-editor/useImageEditor.d.cts +70 -0
- package/dist/image-editor/useImageEditor.d.ts +70 -0
- package/dist/index.cjs +533 -514
- package/dist/index.d.cts +36 -802
- package/dist/index.d.ts +36 -802
- package/dist/index.js +59 -41
- package/dist/paint-editor/BrushPanel.d.cts +18 -0
- package/dist/paint-editor/BrushPanel.d.ts +18 -0
- package/dist/paint-editor/ColorPanel.d.cts +17 -0
- package/dist/paint-editor/ColorPanel.d.ts +17 -0
- package/dist/paint-editor/PaintCanvas.d.cts +40 -0
- package/dist/paint-editor/PaintCanvas.d.ts +40 -0
- package/dist/paint-editor/PaintEditor.d.cts +18 -0
- package/dist/paint-editor/PaintEditor.d.ts +18 -0
- package/dist/paint-editor/PaintEffectsPanel.d.cts +19 -0
- package/dist/paint-editor/PaintEffectsPanel.d.ts +19 -0
- package/dist/paint-editor/PaintGradientEditor.d.cts +5 -0
- package/dist/paint-editor/PaintGradientEditor.d.ts +5 -0
- package/dist/paint-editor/PaintGradientEditorView.d.cts +23 -0
- package/dist/paint-editor/PaintGradientEditorView.d.ts +23 -0
- package/dist/paint-editor/PaintLayersPanel.d.cts +12 -0
- package/dist/paint-editor/PaintLayersPanel.d.ts +12 -0
- package/dist/paint-editor/PaintToolbar.d.cts +17 -0
- package/dist/paint-editor/PaintToolbar.d.ts +17 -0
- package/dist/paint-editor/PaperPanel.d.cts +13 -0
- package/dist/paint-editor/PaperPanel.d.ts +13 -0
- package/dist/paint-editor/StickerPanel.d.cts +12 -0
- package/dist/paint-editor/StickerPanel.d.ts +12 -0
- package/dist/paint-editor/WetPanel.d.cts +14 -0
- package/dist/paint-editor/WetPanel.d.ts +14 -0
- package/dist/paint-editor/index.cjs +0 -1
- package/dist/paint-editor/index.d.cts +13 -211
- package/dist/paint-editor/index.d.ts +13 -211
- package/dist/paint-editor/index.js +3 -4
- package/dist/paint-editor/shared.d.cts +38 -0
- package/dist/paint-editor/shared.d.ts +38 -0
- package/dist/paint-editor/usePaintEditor.d.cts +22 -0
- package/dist/paint-editor/usePaintEditor.d.ts +22 -0
- package/dist/parameters/ParametersPanel.d.cts +27 -0
- package/dist/parameters/ParametersPanel.d.ts +27 -0
- package/dist/parameters/fields.d.cts +62 -0
- package/dist/parameters/fields.d.ts +62 -0
- package/dist/parameters/index.cjs +0 -1
- package/dist/parameters/index.d.cts +3 -121
- package/dist/parameters/index.d.ts +3 -121
- package/dist/parameters/index.js +1 -2
- package/dist/parameters/useParameters.d.cts +32 -0
- package/dist/parameters/useParameters.d.ts +32 -0
- package/dist/persistence/RecoveryPrompt.d.cts +20 -0
- package/dist/persistence/RecoveryPrompt.d.ts +20 -0
- package/dist/persistence/index.cjs +0 -1
- package/dist/persistence/index.d.cts +2 -77
- package/dist/persistence/index.d.ts +2 -77
- package/dist/persistence/index.js +1 -2
- package/dist/persistence/useAutosave.d.cts +54 -0
- package/dist/persistence/useAutosave.d.ts +54 -0
- package/dist/review/CommentButton.d.cts +12 -0
- package/dist/review/CommentButton.d.ts +12 -0
- package/dist/review/CommentsPanel.d.cts +21 -0
- package/dist/review/CommentsPanel.d.ts +21 -0
- package/dist/review/ReviewToolbar.d.cts +20 -0
- package/dist/review/ReviewToolbar.d.ts +20 -0
- package/dist/review/TrackedChangesList.d.cts +18 -0
- package/dist/review/TrackedChangesList.d.ts +18 -0
- package/dist/review/index.d.cts +6 -0
- package/dist/review/index.d.ts +6 -0
- package/dist/review/useDocumentCompare.d.cts +20 -0
- package/dist/review/useDocumentCompare.d.ts +20 -0
- package/dist/review/useReview.d.cts +32 -0
- package/dist/review/useReview.d.ts +32 -0
- package/dist/slots.d.cts +14 -0
- package/dist/slots.d.ts +14 -0
- package/dist/spreadsheet/FormulaHints.d.cts +24 -0
- package/dist/spreadsheet/FormulaHints.d.ts +24 -0
- package/dist/spreadsheet/NameManager.d.cts +14 -0
- package/dist/spreadsheet/NameManager.d.ts +14 -0
- package/dist/spreadsheet/SheetTabs.d.cts +13 -0
- package/dist/spreadsheet/SheetTabs.d.ts +13 -0
- package/dist/spreadsheet/SpreadsheetContextMenu.d.cts +14 -0
- package/dist/spreadsheet/SpreadsheetContextMenu.d.ts +14 -0
- package/dist/spreadsheet/SpreadsheetEditor.d.cts +24 -0
- package/dist/spreadsheet/SpreadsheetEditor.d.ts +24 -0
- package/dist/spreadsheet/SpreadsheetGroupRow.d.cts +19 -0
- package/dist/spreadsheet/SpreadsheetGroupRow.d.ts +19 -0
- package/dist/spreadsheet/SpreadsheetRulePanels.d.cts +18 -0
- package/dist/spreadsheet/SpreadsheetRulePanels.d.ts +18 -0
- package/dist/spreadsheet/SpreadsheetValidationDialog.d.cts +11 -0
- package/dist/spreadsheet/SpreadsheetValidationDialog.d.ts +11 -0
- package/dist/spreadsheet/index.cjs +0 -1
- package/dist/spreadsheet/index.d.cts +11 -309
- package/dist/spreadsheet/index.d.ts +11 -309
- package/dist/spreadsheet/index.js +1 -2
- package/dist/spreadsheet/useSpreadsheetEditor.d.cts +126 -0
- package/dist/spreadsheet/useSpreadsheetEditor.d.ts +126 -0
- package/dist/spreadsheet/useSpreadsheetTableInteractions.d.cts +30 -0
- package/dist/spreadsheet/useSpreadsheetTableInteractions.d.ts +30 -0
- package/dist/spreadsheet/useSpreadsheetViewport.d.cts +25 -0
- package/dist/spreadsheet/useSpreadsheetViewport.d.ts +25 -0
- package/dist/tables/InsertTableGrid.d.cts +25 -0
- package/dist/tables/InsertTableGrid.d.ts +25 -0
- package/dist/tables/TableBubbleMenu.d.cts +18 -0
- package/dist/tables/TableBubbleMenu.d.ts +18 -0
- package/dist/tables/TableToolbar.d.cts +23 -0
- package/dist/tables/TableToolbar.d.ts +23 -0
- package/dist/tables/index.d.cts +4 -0
- package/dist/tables/index.d.ts +4 -0
- package/dist/tables/useTableMenu.d.cts +17 -0
- package/dist/tables/useTableMenu.d.ts +17 -0
- package/dist/tokens/TokensPanel.d.cts +22 -0
- package/dist/tokens/TokensPanel.d.ts +22 -0
- package/dist/tokens/index.cjs +0 -1
- package/dist/tokens/index.d.cts +2 -54
- package/dist/tokens/index.d.ts +2 -54
- package/dist/tokens/index.js +0 -1
- package/dist/tokens/useTokens.d.cts +29 -0
- package/dist/tokens/useTokens.d.ts +29 -0
- package/dist/vector/VectorAppearancePanel.d.cts +14 -0
- package/dist/vector/VectorAppearancePanel.d.ts +14 -0
- package/dist/vector/VectorCanvas.d.cts +58 -0
- package/dist/vector/VectorCanvas.d.ts +58 -0
- package/dist/vector/VectorConnectorPanel.d.cts +12 -0
- package/dist/vector/VectorConnectorPanel.d.ts +12 -0
- package/dist/vector/VectorConstraintsPanel.d.cts +12 -0
- package/dist/vector/VectorConstraintsPanel.d.ts +12 -0
- package/dist/vector/VectorEditor.d.cts +23 -0
- package/dist/vector/VectorEditor.d.ts +23 -0
- package/dist/vector/VectorEffectsPanel.d.cts +13 -0
- package/dist/vector/VectorEffectsPanel.d.ts +13 -0
- package/dist/vector/VectorEnvelopePanel.d.cts +13 -0
- package/dist/vector/VectorEnvelopePanel.d.ts +13 -0
- package/dist/vector/VectorFramePanel.d.cts +12 -0
- package/dist/vector/VectorFramePanel.d.ts +12 -0
- package/dist/vector/VectorGeneratePanel.d.cts +15 -0
- package/dist/vector/VectorGeneratePanel.d.ts +15 -0
- package/dist/vector/VectorGradientEditor.d.cts +12 -0
- package/dist/vector/VectorGradientEditor.d.ts +12 -0
- package/dist/vector/VectorLensPanel.d.cts +12 -0
- package/dist/vector/VectorLensPanel.d.ts +12 -0
- package/dist/vector/VectorMaskPanel.d.cts +13 -0
- package/dist/vector/VectorMaskPanel.d.ts +13 -0
- package/dist/vector/VectorPagesPanel.d.cts +11 -0
- package/dist/vector/VectorPagesPanel.d.ts +11 -0
- package/dist/vector/VectorPerspectivePanel.d.cts +12 -0
- package/dist/vector/VectorPerspectivePanel.d.ts +12 -0
- package/dist/vector/VectorProviderEffectsPanel.d.cts +12 -0
- package/dist/vector/VectorProviderEffectsPanel.d.ts +12 -0
- package/dist/vector/VectorShadingPanel.d.cts +12 -0
- package/dist/vector/VectorShadingPanel.d.ts +12 -0
- package/dist/vector/VectorSymbolsPanel.d.cts +12 -0
- package/dist/vector/VectorSymbolsPanel.d.ts +12 -0
- package/dist/vector/VectorSymmetryPanel.d.cts +12 -0
- package/dist/vector/VectorSymmetryPanel.d.ts +12 -0
- package/dist/vector/VectorTextPanel.d.cts +14 -0
- package/dist/vector/VectorTextPanel.d.ts +14 -0
- package/dist/vector/VectorToolbar.d.cts +39 -0
- package/dist/vector/VectorToolbar.d.ts +39 -0
- package/dist/vector/VectorTracePanel.d.cts +12 -0
- package/dist/vector/VectorTracePanel.d.ts +12 -0
- package/dist/vector/VectorWidthPointEditor.d.cts +18 -0
- package/dist/vector/VectorWidthPointEditor.d.ts +18 -0
- package/dist/vector/index.cjs +0 -1
- package/dist/vector/index.d.cts +23 -384
- package/dist/vector/index.d.ts +23 -384
- package/dist/vector/index.js +2 -3
- package/dist/vector/useVectorEditor.d.cts +40 -0
- package/dist/vector/useVectorEditor.d.ts +40 -0
- package/dist/video-editor/ClipInspector.d.cts +14 -0
- package/dist/video-editor/ClipInspector.d.ts +14 -0
- package/dist/video-editor/MediaBin.d.cts +18 -0
- package/dist/video-editor/MediaBin.d.ts +18 -0
- package/dist/video-editor/TranscriptPanel.d.cts +17 -0
- package/dist/video-editor/TranscriptPanel.d.ts +17 -0
- package/dist/video-editor/VideoEditor.d.cts +41 -0
- package/dist/video-editor/VideoEditor.d.ts +41 -0
- package/dist/video-editor/VideoEffectsPanel.d.cts +13 -0
- package/dist/video-editor/VideoEffectsPanel.d.ts +13 -0
- package/dist/video-editor/VideoPreview.d.cts +17 -0
- package/dist/video-editor/VideoPreview.d.ts +17 -0
- package/dist/video-editor/VideoScopes.d.cts +17 -0
- package/dist/video-editor/VideoScopes.d.ts +17 -0
- package/dist/video-editor/VideoTimeline.d.cts +15 -0
- package/dist/video-editor/VideoTimeline.d.ts +15 -0
- package/dist/video-editor/VideoTransport.d.cts +14 -0
- package/dist/video-editor/VideoTransport.d.ts +14 -0
- package/dist/video-editor/index.cjs +0 -1
- package/dist/video-editor/index.d.cts +10 -203
- package/dist/video-editor/index.d.ts +10 -203
- package/dist/video-editor/index.js +2 -3
- package/dist/video-editor/useVideoEditor.d.cts +42 -0
- package/dist/video-editor/useVideoEditor.d.ts +42 -0
- package/package.json +124 -49
- package/dist/PaintGradientEditorView-CCPCY5Ib.d.cts +0 -14
- package/dist/PaintGradientEditorView-CCPCY5Ib.d.ts +0 -14
- package/dist/animation-editor/index.cjs.map +0 -1
- package/dist/animation-editor/index.js.map +0 -1
- package/dist/canvas/index.cjs.map +0 -1
- package/dist/canvas/index.js.map +0 -1
- package/dist/chart/index.cjs.map +0 -1
- package/dist/chart/index.js.map +0 -1
- package/dist/chunk-34HEZX7J.js.map +0 -1
- package/dist/chunk-4FQXRPBN.js.map +0 -1
- package/dist/chunk-4ZC2WCUO.js.map +0 -1
- package/dist/chunk-I3E4KSA2.js.map +0 -1
- package/dist/chunk-MO354USR.js.map +0 -1
- package/dist/chunk-SIEOYRHX.js.map +0 -1
- package/dist/chunk-WOQ3H7KA.js.map +0 -1
- package/dist/chunk-XWFU2CSG.js.map +0 -1
- package/dist/chunk-ZQZAKUUM.js.map +0 -1
- package/dist/commands/index.cjs.map +0 -1
- package/dist/commands/index.js.map +0 -1
- package/dist/effects/index.cjs.map +0 -1
- package/dist/effects/index.js.map +0 -1
- package/dist/generation/index.cjs.map +0 -1
- package/dist/generation/index.js.map +0 -1
- package/dist/image-editor/index.cjs.map +0 -1
- package/dist/image-editor/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/paint-editor/index.cjs.map +0 -1
- package/dist/paint-editor/index.js.map +0 -1
- package/dist/parameters/index.cjs.map +0 -1
- package/dist/parameters/index.js.map +0 -1
- package/dist/persistence/index.cjs.map +0 -1
- package/dist/persistence/index.js.map +0 -1
- package/dist/spreadsheet/index.cjs.map +0 -1
- package/dist/spreadsheet/index.js.map +0 -1
- package/dist/tokens/index.cjs.map +0 -1
- package/dist/tokens/index.js.map +0 -1
- package/dist/vector/index.cjs.map +0 -1
- package/dist/vector/index.js.map +0 -1
- package/dist/video-editor/index.cjs.map +0 -1
- package/dist/video-editor/index.js.map +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SliderControl } from '@pixerate/editor/paint-editor';
|
|
3
|
+
export declare const chip: (on: boolean) => string;
|
|
4
|
+
export declare const button = "px-2 py-1 rounded text-[11px] bg-slate-800 text-slate-200 hover:bg-slate-700 disabled:opacity-40";
|
|
5
|
+
export declare const panel = "flex flex-col gap-2 text-xs text-slate-200";
|
|
6
|
+
/** Draws RGBA pixels into a canvas (nothing without a 2D context, as in jsdom). */
|
|
7
|
+
export declare const PixelCanvas: React.FC<{
|
|
8
|
+
pixels: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
data: Uint8ClampedArray;
|
|
12
|
+
} | null;
|
|
13
|
+
label: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* A labelled range input. `onChange` runs while dragging; `onCommit` (if given) runs once on
|
|
19
|
+
* release (the native `change` event), for settings that are undo steps.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PaintSlider: React.FC<{
|
|
22
|
+
control: SliderControl;
|
|
23
|
+
value: number;
|
|
24
|
+
onChange?: (v: number) => void;
|
|
25
|
+
onCommit?: (v: number) => void;
|
|
26
|
+
}>;
|
|
27
|
+
/** Runs `fn`, turning a thrown error into a message. */
|
|
28
|
+
export declare function useAttempt(): [string | null, (fn: () => unknown) => void, (msg: string | null) => void];
|
|
29
|
+
export declare const ErrorLine: React.FC<{
|
|
30
|
+
error: string | null;
|
|
31
|
+
}>;
|
|
32
|
+
/** A colour input that commits once when the picker closes (the native `change` event). */
|
|
33
|
+
export declare const CommitColorInput: React.FC<{
|
|
34
|
+
value: string;
|
|
35
|
+
label: string;
|
|
36
|
+
onCommit: (v: string) => void;
|
|
37
|
+
className?: string;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PaintDirector, PaintEditorController, PaintPresence, type PaintDirectorOptions, type PaintEditorOptions, type PaintEditorState } from '@pixerate/editor/paint-editor';
|
|
2
|
+
export interface UsePaintEditorReturn {
|
|
3
|
+
controller: PaintEditorController;
|
|
4
|
+
/** The controller's snapshot (a new object after every change). */
|
|
5
|
+
state: PaintEditorState;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Creates a `PaintEditorController` once (from `options`, read on the first render) or uses the
|
|
9
|
+
* one given, and re-renders on every change.
|
|
10
|
+
*/
|
|
11
|
+
export declare function usePaintEditor(options?: PaintEditorOptions | PaintEditorController): UsePaintEditorReturn;
|
|
12
|
+
/** Subscribes to a controller's state. */
|
|
13
|
+
export declare function usePaintEditorState(controller: PaintEditorController): PaintEditorState;
|
|
14
|
+
/**
|
|
15
|
+
* A `PaintPresence` and `PaintDirector` for a paint editor: pass `presence` to `PaintEditor` (or
|
|
16
|
+
* `PaintCanvas`) and `director` to `createPaintEditorToolProvider`, so agent strokes are painted
|
|
17
|
+
* live by a cursor on the canvas. Options are read on the first render.
|
|
18
|
+
*/
|
|
19
|
+
export declare function usePaintDirector(controller: PaintEditorController, options?: Omit<PaintDirectorOptions, 'clock'>): {
|
|
20
|
+
presence: PaintPresence;
|
|
21
|
+
director: PaintDirector;
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PaintDirector, PaintEditorController, PaintPresence, type PaintDirectorOptions, type PaintEditorOptions, type PaintEditorState } from '@pixerate/editor/paint-editor';
|
|
2
|
+
export interface UsePaintEditorReturn {
|
|
3
|
+
controller: PaintEditorController;
|
|
4
|
+
/** The controller's snapshot (a new object after every change). */
|
|
5
|
+
state: PaintEditorState;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Creates a `PaintEditorController` once (from `options`, read on the first render) or uses the
|
|
9
|
+
* one given, and re-renders on every change.
|
|
10
|
+
*/
|
|
11
|
+
export declare function usePaintEditor(options?: PaintEditorOptions | PaintEditorController): UsePaintEditorReturn;
|
|
12
|
+
/** Subscribes to a controller's state. */
|
|
13
|
+
export declare function usePaintEditorState(controller: PaintEditorController): PaintEditorState;
|
|
14
|
+
/**
|
|
15
|
+
* A `PaintPresence` and `PaintDirector` for a paint editor: pass `presence` to `PaintEditor` (or
|
|
16
|
+
* `PaintCanvas`) and `director` to `createPaintEditorToolProvider`, so agent strokes are painted
|
|
17
|
+
* live by a cursor on the canvas. Options are read on the first render.
|
|
18
|
+
*/
|
|
19
|
+
export declare function usePaintDirector(controller: PaintEditorController, options?: Omit<PaintDirectorOptions, 'clock'>): {
|
|
20
|
+
presence: PaintPresence;
|
|
21
|
+
director: PaintDirector;
|
|
22
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ParametersController } from '@pixerate/editor/parameters';
|
|
3
|
+
import { type ParameterImageProps } from './fields.cjs';
|
|
4
|
+
export interface ParametersPanelProps {
|
|
5
|
+
controller: ParametersController;
|
|
6
|
+
/** Heading (default: the schema's title). Pass `null` for none. */
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
/** Undo, redo, reset and randomize buttons (default `true`). */
|
|
9
|
+
showToolbar?: boolean;
|
|
10
|
+
/** The preset picker with save and delete (default `true`). */
|
|
11
|
+
showPresets?: boolean;
|
|
12
|
+
/** Keyframe diamonds (default: when the controller has a keyframes adapter). */
|
|
13
|
+
showKeyframes?: boolean;
|
|
14
|
+
/** Per-field reset buttons on changed values (default `true`). */
|
|
15
|
+
showFieldReset?: boolean;
|
|
16
|
+
/** Turns a picked file into a URL for image fields. */
|
|
17
|
+
resolveFile?: ParameterImageProps['resolveFile'];
|
|
18
|
+
/** Shown when the schema has no fields. */
|
|
19
|
+
emptyMessage?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Renders a whole parameter schema: collapsible groups, one control per visible field,
|
|
24
|
+
* keyframe diamonds, per-field reset, presets, and undo / redo / reset / randomize. Slider
|
|
25
|
+
* drags and colour picks are one undo step each.
|
|
26
|
+
*/
|
|
27
|
+
export declare function ParametersPanel({ controller, title, showToolbar, showPresets, showKeyframes, showFieldReset, resolveFile, emptyMessage, className, }: ParametersPanelProps): React.JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ParametersController } from '@pixerate/editor/parameters';
|
|
3
|
+
import { type ParameterImageProps } from './fields.js';
|
|
4
|
+
export interface ParametersPanelProps {
|
|
5
|
+
controller: ParametersController;
|
|
6
|
+
/** Heading (default: the schema's title). Pass `null` for none. */
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
/** Undo, redo, reset and randomize buttons (default `true`). */
|
|
9
|
+
showToolbar?: boolean;
|
|
10
|
+
/** The preset picker with save and delete (default `true`). */
|
|
11
|
+
showPresets?: boolean;
|
|
12
|
+
/** Keyframe diamonds (default: when the controller has a keyframes adapter). */
|
|
13
|
+
showKeyframes?: boolean;
|
|
14
|
+
/** Per-field reset buttons on changed values (default `true`). */
|
|
15
|
+
showFieldReset?: boolean;
|
|
16
|
+
/** Turns a picked file into a URL for image fields. */
|
|
17
|
+
resolveFile?: ParameterImageProps['resolveFile'];
|
|
18
|
+
/** Shown when the schema has no fields. */
|
|
19
|
+
emptyMessage?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Renders a whole parameter schema: collapsible groups, one control per visible field,
|
|
24
|
+
* keyframe diamonds, per-field reset, presets, and undo / redo / reset / randomize. Slider
|
|
25
|
+
* drags and colour picks are one undo step each.
|
|
26
|
+
*/
|
|
27
|
+
export declare function ParametersPanel({ controller, title, showToolbar, showPresets, showKeyframes, showFieldReset, resolveFile, emptyMessage, className, }: ParametersPanelProps): React.JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type BooleanParameterField, type ChoiceParameterField, type ColorParameterField, type ImageParameterField, type NumberParameterField, type ParameterField, type ParameterKeyState, type ParameterValue, type TextParameterField, type VectorParameterField } from '@pixerate/editor/parameters';
|
|
3
|
+
/** Props every field control takes. Controls are controller-free: wire them to anything. */
|
|
4
|
+
export interface ParameterControlProps<F extends ParameterField, V extends ParameterValue> {
|
|
5
|
+
field: F;
|
|
6
|
+
value: V;
|
|
7
|
+
onChange: (value: V) => void;
|
|
8
|
+
/** A continuous edit (slider drag, colour pick) started: merge changes into one undo step. */
|
|
9
|
+
onGestureStart?: () => void;
|
|
10
|
+
onGestureEnd?: () => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** DOM id of the main input (for a `<label htmlFor>`). */
|
|
13
|
+
id?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const parameterInputClass = "h-7 w-full min-w-0 rounded-md border border-input bg-background px-2 text-xs text-foreground tabular-nums focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:cursor-not-allowed disabled:opacity-50";
|
|
16
|
+
export declare const parameterButtonClass = "inline-flex h-7 items-center justify-center gap-1 rounded-md border border-input bg-background px-2 text-xs text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:pointer-events-none disabled:opacity-50";
|
|
17
|
+
type CommitInputProps = {
|
|
18
|
+
value: string;
|
|
19
|
+
/** Called with the text and the element (e.g. to show the stored value again after a refused edit). */
|
|
20
|
+
onCommit: (value: string, input: HTMLInputElement | HTMLTextAreaElement) => void;
|
|
21
|
+
multiline?: boolean;
|
|
22
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement> & React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'defaultValue'>;
|
|
23
|
+
/** A text box that commits on blur or Enter (Mod+Enter when multiline) and resets on Escape. */
|
|
24
|
+
export declare function ParameterCommitInput({ value, onCommit, multiline, className, onKeyDown, ...rest }: CommitInputProps): React.JSX.Element;
|
|
25
|
+
/** A number box: type a value (units allowed), or step with the arrow keys (Shift ×10). */
|
|
26
|
+
export declare function ParameterNumberInput({ field, value, onChange, disabled, id, 'aria-label': ariaLabel, }: ParameterControlProps<NumberParameterField, number> & {
|
|
27
|
+
'aria-label'?: string;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
/** A slider plus number box for `number` / `int` fields (number box only for `control: 'input'` or unbounded fields). */
|
|
30
|
+
export declare function ParameterSlider(props: ParameterControlProps<NumberParameterField, number>): React.JSX.Element;
|
|
31
|
+
/** An on/off switch for `boolean` fields. */
|
|
32
|
+
export declare function ParameterToggle({ field, value, onChange, disabled, id }: ParameterControlProps<BooleanParameterField, boolean>): React.JSX.Element;
|
|
33
|
+
/** A dropdown (or segmented buttons with `control: 'segmented'`) for `choice` fields. */
|
|
34
|
+
export declare function ParameterSelect({ field, value, onChange, disabled, id }: ParameterControlProps<ChoiceParameterField, string | number>): React.JSX.Element;
|
|
35
|
+
/** A colour picker with a hex box, an alpha slider (with `alpha`) and swatches. */
|
|
36
|
+
export declare function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd, disabled, id }: ParameterControlProps<ColorParameterField, string>): React.JSX.Element;
|
|
37
|
+
/** One number box per component for `vector` fields. */
|
|
38
|
+
export declare function ParameterVector({ field, value, onChange, disabled, id }: ParameterControlProps<VectorParameterField, number[]>): React.JSX.Element;
|
|
39
|
+
export interface ParameterImageProps extends ParameterControlProps<ImageParameterField, string> {
|
|
40
|
+
/** Turns a picked file into a URL (upload it, or `URL.createObjectURL`). Without it there is no file button. */
|
|
41
|
+
resolveFile?: (file: File) => string | Promise<string>;
|
|
42
|
+
}
|
|
43
|
+
/** An image picker: suggested thumbnails, a URL box, an optional file button and a clear button. */
|
|
44
|
+
export declare function ParameterImage({ field, value, onChange, disabled, id, resolveFile }: ParameterImageProps): React.JSX.Element;
|
|
45
|
+
/** A text box (or textarea with `multiline`) that commits on blur or Enter. */
|
|
46
|
+
export declare function ParameterText({ field, value, onChange, disabled, id }: ParameterControlProps<TextParameterField, string>): React.JSX.Element;
|
|
47
|
+
export interface KeyframeDiamondProps {
|
|
48
|
+
state: ParameterKeyState;
|
|
49
|
+
onToggle: () => void;
|
|
50
|
+
/** The parameter's label (for the accessible name). */
|
|
51
|
+
label: string;
|
|
52
|
+
disabled?: boolean;
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
/** A keyframe toggle: filled when a key sits at the playhead, tinted when the value is animated. */
|
|
56
|
+
export declare function KeyframeDiamond({ state, onToggle, label, disabled, className }: KeyframeDiamondProps): React.JSX.Element;
|
|
57
|
+
export interface ParameterFieldControlProps extends ParameterControlProps<ParameterField, ParameterValue> {
|
|
58
|
+
resolveFile?: ParameterImageProps['resolveFile'];
|
|
59
|
+
}
|
|
60
|
+
/** The control for any field type. */
|
|
61
|
+
export declare function ParameterFieldControl({ field, value, onChange, resolveFile, ...rest }: ParameterFieldControlProps): React.JSX.Element;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type BooleanParameterField, type ChoiceParameterField, type ColorParameterField, type ImageParameterField, type NumberParameterField, type ParameterField, type ParameterKeyState, type ParameterValue, type TextParameterField, type VectorParameterField } from '@pixerate/editor/parameters';
|
|
3
|
+
/** Props every field control takes. Controls are controller-free: wire them to anything. */
|
|
4
|
+
export interface ParameterControlProps<F extends ParameterField, V extends ParameterValue> {
|
|
5
|
+
field: F;
|
|
6
|
+
value: V;
|
|
7
|
+
onChange: (value: V) => void;
|
|
8
|
+
/** A continuous edit (slider drag, colour pick) started: merge changes into one undo step. */
|
|
9
|
+
onGestureStart?: () => void;
|
|
10
|
+
onGestureEnd?: () => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** DOM id of the main input (for a `<label htmlFor>`). */
|
|
13
|
+
id?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const parameterInputClass = "h-7 w-full min-w-0 rounded-md border border-input bg-background px-2 text-xs text-foreground tabular-nums focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:cursor-not-allowed disabled:opacity-50";
|
|
16
|
+
export declare const parameterButtonClass = "inline-flex h-7 items-center justify-center gap-1 rounded-md border border-input bg-background px-2 text-xs text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:pointer-events-none disabled:opacity-50";
|
|
17
|
+
type CommitInputProps = {
|
|
18
|
+
value: string;
|
|
19
|
+
/** Called with the text and the element (e.g. to show the stored value again after a refused edit). */
|
|
20
|
+
onCommit: (value: string, input: HTMLInputElement | HTMLTextAreaElement) => void;
|
|
21
|
+
multiline?: boolean;
|
|
22
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement> & React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'defaultValue'>;
|
|
23
|
+
/** A text box that commits on blur or Enter (Mod+Enter when multiline) and resets on Escape. */
|
|
24
|
+
export declare function ParameterCommitInput({ value, onCommit, multiline, className, onKeyDown, ...rest }: CommitInputProps): React.JSX.Element;
|
|
25
|
+
/** A number box: type a value (units allowed), or step with the arrow keys (Shift ×10). */
|
|
26
|
+
export declare function ParameterNumberInput({ field, value, onChange, disabled, id, 'aria-label': ariaLabel, }: ParameterControlProps<NumberParameterField, number> & {
|
|
27
|
+
'aria-label'?: string;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
/** A slider plus number box for `number` / `int` fields (number box only for `control: 'input'` or unbounded fields). */
|
|
30
|
+
export declare function ParameterSlider(props: ParameterControlProps<NumberParameterField, number>): React.JSX.Element;
|
|
31
|
+
/** An on/off switch for `boolean` fields. */
|
|
32
|
+
export declare function ParameterToggle({ field, value, onChange, disabled, id }: ParameterControlProps<BooleanParameterField, boolean>): React.JSX.Element;
|
|
33
|
+
/** A dropdown (or segmented buttons with `control: 'segmented'`) for `choice` fields. */
|
|
34
|
+
export declare function ParameterSelect({ field, value, onChange, disabled, id }: ParameterControlProps<ChoiceParameterField, string | number>): React.JSX.Element;
|
|
35
|
+
/** A colour picker with a hex box, an alpha slider (with `alpha`) and swatches. */
|
|
36
|
+
export declare function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd, disabled, id }: ParameterControlProps<ColorParameterField, string>): React.JSX.Element;
|
|
37
|
+
/** One number box per component for `vector` fields. */
|
|
38
|
+
export declare function ParameterVector({ field, value, onChange, disabled, id }: ParameterControlProps<VectorParameterField, number[]>): React.JSX.Element;
|
|
39
|
+
export interface ParameterImageProps extends ParameterControlProps<ImageParameterField, string> {
|
|
40
|
+
/** Turns a picked file into a URL (upload it, or `URL.createObjectURL`). Without it there is no file button. */
|
|
41
|
+
resolveFile?: (file: File) => string | Promise<string>;
|
|
42
|
+
}
|
|
43
|
+
/** An image picker: suggested thumbnails, a URL box, an optional file button and a clear button. */
|
|
44
|
+
export declare function ParameterImage({ field, value, onChange, disabled, id, resolveFile }: ParameterImageProps): React.JSX.Element;
|
|
45
|
+
/** A text box (or textarea with `multiline`) that commits on blur or Enter. */
|
|
46
|
+
export declare function ParameterText({ field, value, onChange, disabled, id }: ParameterControlProps<TextParameterField, string>): React.JSX.Element;
|
|
47
|
+
export interface KeyframeDiamondProps {
|
|
48
|
+
state: ParameterKeyState;
|
|
49
|
+
onToggle: () => void;
|
|
50
|
+
/** The parameter's label (for the accessible name). */
|
|
51
|
+
label: string;
|
|
52
|
+
disabled?: boolean;
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
/** A keyframe toggle: filled when a key sits at the playhead, tinted when the value is animated. */
|
|
56
|
+
export declare function KeyframeDiamond({ state, onToggle, label, disabled, className }: KeyframeDiamondProps): React.JSX.Element;
|
|
57
|
+
export interface ParameterFieldControlProps extends ParameterControlProps<ParameterField, ParameterValue> {
|
|
58
|
+
resolveFile?: ParameterImageProps['resolveFile'];
|
|
59
|
+
}
|
|
60
|
+
/** The control for any field type. */
|
|
61
|
+
export declare function ParameterFieldControl({ field, value, onChange, resolveFile, ...rest }: ParameterFieldControlProps): React.JSX.Element;
|
|
62
|
+
export {};
|
|
@@ -1,121 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A `ParametersController` created once for the component's lifetime. When `options.schema`
|
|
6
|
-
* changes (a new object), the controller's schema is replaced and fitting values are kept.
|
|
7
|
-
*/
|
|
8
|
-
declare function useParametersController(options: ParametersControllerOptions): ParametersController;
|
|
9
|
-
/** The controller's state (re-renders on every change). */
|
|
10
|
-
declare function useParametersState(controller: ParametersController): ParametersState;
|
|
11
|
-
interface UseParametersResult {
|
|
12
|
-
controller: ParametersController;
|
|
13
|
-
state: ParametersState;
|
|
14
|
-
values: ParametersState['values'];
|
|
15
|
-
setValue: (id: string, value: ParameterValue) => ParameterSetResult;
|
|
16
|
-
undo: () => void;
|
|
17
|
-
redo: () => void;
|
|
18
|
-
reset: (ids?: readonly string[]) => void;
|
|
19
|
-
randomize: (ids?: readonly string[]) => void;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Subscribes to a parameters controller and exposes its state with bound actions. Pass
|
|
23
|
-
* options instead of a controller to create one for the component's lifetime.
|
|
24
|
-
*/
|
|
25
|
-
declare function useParameters(controllerOrOptions: ParametersController | ParametersControllerOptions): UseParametersResult;
|
|
26
|
-
/** Anything with `register(specs) → unregister` (a `CommandRegistry`). */
|
|
27
|
-
interface ParameterCommandTarget {
|
|
28
|
-
register(specs: any): () => void;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Registers the controller's palette / agent commands (`parameters.set`, `…randomize`, …)
|
|
32
|
-
* in `registry` while mounted, so `createCommandToolProvider` exposes them to agents.
|
|
33
|
-
*/
|
|
34
|
-
declare function useParameterCommands(registry: ParameterCommandTarget | null | undefined, controller: ParametersController, options?: ParameterCommandOptions): void;
|
|
35
|
-
|
|
36
|
-
/** Props every field control takes. Controls are controller-free: wire them to anything. */
|
|
37
|
-
interface ParameterControlProps<F extends ParameterField, V extends ParameterValue> {
|
|
38
|
-
field: F;
|
|
39
|
-
value: V;
|
|
40
|
-
onChange: (value: V) => void;
|
|
41
|
-
/** A continuous edit (slider drag, colour pick) started: merge changes into one undo step. */
|
|
42
|
-
onGestureStart?: () => void;
|
|
43
|
-
onGestureEnd?: () => void;
|
|
44
|
-
disabled?: boolean;
|
|
45
|
-
/** DOM id of the main input (for a `<label htmlFor>`). */
|
|
46
|
-
id?: string;
|
|
47
|
-
}
|
|
48
|
-
declare const parameterInputClass = "h-7 w-full min-w-0 rounded-md border border-input bg-background px-2 text-xs text-foreground tabular-nums focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:cursor-not-allowed disabled:opacity-50";
|
|
49
|
-
declare const parameterButtonClass = "inline-flex h-7 items-center justify-center gap-1 rounded-md border border-input bg-background px-2 text-xs text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:pointer-events-none disabled:opacity-50";
|
|
50
|
-
type CommitInputProps = {
|
|
51
|
-
value: string;
|
|
52
|
-
/** Called with the text and the element (e.g. to show the stored value again after a refused edit). */
|
|
53
|
-
onCommit: (value: string, input: HTMLInputElement | HTMLTextAreaElement) => void;
|
|
54
|
-
multiline?: boolean;
|
|
55
|
-
} & Omit<React__default.InputHTMLAttributes<HTMLInputElement> & React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'defaultValue'>;
|
|
56
|
-
/** A text box that commits on blur or Enter (Mod+Enter when multiline) and resets on Escape. */
|
|
57
|
-
declare function ParameterCommitInput({ value, onCommit, multiline, className, onKeyDown, ...rest }: CommitInputProps): React__default.JSX.Element;
|
|
58
|
-
/** A number box: type a value (units allowed), or step with the arrow keys (Shift ×10). */
|
|
59
|
-
declare function ParameterNumberInput({ field, value, onChange, disabled, id, 'aria-label': ariaLabel, }: ParameterControlProps<NumberParameterField, number> & {
|
|
60
|
-
'aria-label'?: string;
|
|
61
|
-
}): React__default.JSX.Element;
|
|
62
|
-
/** A slider plus number box for `number` / `int` fields (number box only for `control: 'input'` or unbounded fields). */
|
|
63
|
-
declare function ParameterSlider(props: ParameterControlProps<NumberParameterField, number>): React__default.JSX.Element;
|
|
64
|
-
/** An on/off switch for `boolean` fields. */
|
|
65
|
-
declare function ParameterToggle({ field, value, onChange, disabled, id }: ParameterControlProps<BooleanParameterField, boolean>): React__default.JSX.Element;
|
|
66
|
-
/** A dropdown (or segmented buttons with `control: 'segmented'`) for `choice` fields. */
|
|
67
|
-
declare function ParameterSelect({ field, value, onChange, disabled, id }: ParameterControlProps<ChoiceParameterField, string | number>): React__default.JSX.Element;
|
|
68
|
-
/** A colour picker with a hex box, an alpha slider (with `alpha`) and swatches. */
|
|
69
|
-
declare function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd, disabled, id }: ParameterControlProps<ColorParameterField, string>): React__default.JSX.Element;
|
|
70
|
-
/** One number box per component for `vector` fields. */
|
|
71
|
-
declare function ParameterVector({ field, value, onChange, disabled, id }: ParameterControlProps<VectorParameterField, number[]>): React__default.JSX.Element;
|
|
72
|
-
interface ParameterImageProps extends ParameterControlProps<ImageParameterField, string> {
|
|
73
|
-
/** Turns a picked file into a URL (upload it, or `URL.createObjectURL`). Without it there is no file button. */
|
|
74
|
-
resolveFile?: (file: File) => string | Promise<string>;
|
|
75
|
-
}
|
|
76
|
-
/** An image picker: suggested thumbnails, a URL box, an optional file button and a clear button. */
|
|
77
|
-
declare function ParameterImage({ field, value, onChange, disabled, id, resolveFile }: ParameterImageProps): React__default.JSX.Element;
|
|
78
|
-
/** A text box (or textarea with `multiline`) that commits on blur or Enter. */
|
|
79
|
-
declare function ParameterText({ field, value, onChange, disabled, id }: ParameterControlProps<TextParameterField, string>): React__default.JSX.Element;
|
|
80
|
-
interface KeyframeDiamondProps {
|
|
81
|
-
state: ParameterKeyState;
|
|
82
|
-
onToggle: () => void;
|
|
83
|
-
/** The parameter's label (for the accessible name). */
|
|
84
|
-
label: string;
|
|
85
|
-
disabled?: boolean;
|
|
86
|
-
className?: string;
|
|
87
|
-
}
|
|
88
|
-
/** A keyframe toggle: filled when a key sits at the playhead, tinted when the value is animated. */
|
|
89
|
-
declare function KeyframeDiamond({ state, onToggle, label, disabled, className }: KeyframeDiamondProps): React__default.JSX.Element;
|
|
90
|
-
interface ParameterFieldControlProps extends ParameterControlProps<ParameterField, ParameterValue> {
|
|
91
|
-
resolveFile?: ParameterImageProps['resolveFile'];
|
|
92
|
-
}
|
|
93
|
-
/** The control for any field type. */
|
|
94
|
-
declare function ParameterFieldControl({ field, value, onChange, resolveFile, ...rest }: ParameterFieldControlProps): React__default.JSX.Element;
|
|
95
|
-
|
|
96
|
-
interface ParametersPanelProps {
|
|
97
|
-
controller: ParametersController;
|
|
98
|
-
/** Heading (default: the schema's title). Pass `null` for none. */
|
|
99
|
-
title?: React__default.ReactNode;
|
|
100
|
-
/** Undo, redo, reset and randomize buttons (default `true`). */
|
|
101
|
-
showToolbar?: boolean;
|
|
102
|
-
/** The preset picker with save and delete (default `true`). */
|
|
103
|
-
showPresets?: boolean;
|
|
104
|
-
/** Keyframe diamonds (default: when the controller has a keyframes adapter). */
|
|
105
|
-
showKeyframes?: boolean;
|
|
106
|
-
/** Per-field reset buttons on changed values (default `true`). */
|
|
107
|
-
showFieldReset?: boolean;
|
|
108
|
-
/** Turns a picked file into a URL for image fields. */
|
|
109
|
-
resolveFile?: ParameterImageProps['resolveFile'];
|
|
110
|
-
/** Shown when the schema has no fields. */
|
|
111
|
-
emptyMessage?: React__default.ReactNode;
|
|
112
|
-
className?: string;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Renders a whole parameter schema: collapsible groups, one control per visible field,
|
|
116
|
-
* keyframe diamonds, per-field reset, presets, and undo / redo / reset / randomize. Slider
|
|
117
|
-
* drags and colour picks are one undo step each.
|
|
118
|
-
*/
|
|
119
|
-
declare function ParametersPanel({ controller, title, showToolbar, showPresets, showKeyframes, showFieldReset, resolveFile, emptyMessage, className, }: ParametersPanelProps): React__default.JSX.Element;
|
|
120
|
-
|
|
121
|
-
export { KeyframeDiamond, type KeyframeDiamondProps, ParameterColor, type ParameterCommandTarget, ParameterCommitInput, type ParameterControlProps, ParameterFieldControl, type ParameterFieldControlProps, ParameterImage, type ParameterImageProps, ParameterNumberInput, ParameterSelect, ParameterSlider, ParameterText, ParameterToggle, ParameterVector, ParametersPanel, type ParametersPanelProps, type UseParametersResult, parameterButtonClass, parameterInputClass, useParameterCommands, useParameters, useParametersController, useParametersState };
|
|
1
|
+
export * from './useParameters.cjs';
|
|
2
|
+
export * from './fields.cjs';
|
|
3
|
+
export * from './ParametersPanel.cjs';
|
|
@@ -1,121 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A `ParametersController` created once for the component's lifetime. When `options.schema`
|
|
6
|
-
* changes (a new object), the controller's schema is replaced and fitting values are kept.
|
|
7
|
-
*/
|
|
8
|
-
declare function useParametersController(options: ParametersControllerOptions): ParametersController;
|
|
9
|
-
/** The controller's state (re-renders on every change). */
|
|
10
|
-
declare function useParametersState(controller: ParametersController): ParametersState;
|
|
11
|
-
interface UseParametersResult {
|
|
12
|
-
controller: ParametersController;
|
|
13
|
-
state: ParametersState;
|
|
14
|
-
values: ParametersState['values'];
|
|
15
|
-
setValue: (id: string, value: ParameterValue) => ParameterSetResult;
|
|
16
|
-
undo: () => void;
|
|
17
|
-
redo: () => void;
|
|
18
|
-
reset: (ids?: readonly string[]) => void;
|
|
19
|
-
randomize: (ids?: readonly string[]) => void;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Subscribes to a parameters controller and exposes its state with bound actions. Pass
|
|
23
|
-
* options instead of a controller to create one for the component's lifetime.
|
|
24
|
-
*/
|
|
25
|
-
declare function useParameters(controllerOrOptions: ParametersController | ParametersControllerOptions): UseParametersResult;
|
|
26
|
-
/** Anything with `register(specs) → unregister` (a `CommandRegistry`). */
|
|
27
|
-
interface ParameterCommandTarget {
|
|
28
|
-
register(specs: any): () => void;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Registers the controller's palette / agent commands (`parameters.set`, `…randomize`, …)
|
|
32
|
-
* in `registry` while mounted, so `createCommandToolProvider` exposes them to agents.
|
|
33
|
-
*/
|
|
34
|
-
declare function useParameterCommands(registry: ParameterCommandTarget | null | undefined, controller: ParametersController, options?: ParameterCommandOptions): void;
|
|
35
|
-
|
|
36
|
-
/** Props every field control takes. Controls are controller-free: wire them to anything. */
|
|
37
|
-
interface ParameterControlProps<F extends ParameterField, V extends ParameterValue> {
|
|
38
|
-
field: F;
|
|
39
|
-
value: V;
|
|
40
|
-
onChange: (value: V) => void;
|
|
41
|
-
/** A continuous edit (slider drag, colour pick) started: merge changes into one undo step. */
|
|
42
|
-
onGestureStart?: () => void;
|
|
43
|
-
onGestureEnd?: () => void;
|
|
44
|
-
disabled?: boolean;
|
|
45
|
-
/** DOM id of the main input (for a `<label htmlFor>`). */
|
|
46
|
-
id?: string;
|
|
47
|
-
}
|
|
48
|
-
declare const parameterInputClass = "h-7 w-full min-w-0 rounded-md border border-input bg-background px-2 text-xs text-foreground tabular-nums focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:cursor-not-allowed disabled:opacity-50";
|
|
49
|
-
declare const parameterButtonClass = "inline-flex h-7 items-center justify-center gap-1 rounded-md border border-input bg-background px-2 text-xs text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:pointer-events-none disabled:opacity-50";
|
|
50
|
-
type CommitInputProps = {
|
|
51
|
-
value: string;
|
|
52
|
-
/** Called with the text and the element (e.g. to show the stored value again after a refused edit). */
|
|
53
|
-
onCommit: (value: string, input: HTMLInputElement | HTMLTextAreaElement) => void;
|
|
54
|
-
multiline?: boolean;
|
|
55
|
-
} & Omit<React__default.InputHTMLAttributes<HTMLInputElement> & React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'defaultValue'>;
|
|
56
|
-
/** A text box that commits on blur or Enter (Mod+Enter when multiline) and resets on Escape. */
|
|
57
|
-
declare function ParameterCommitInput({ value, onCommit, multiline, className, onKeyDown, ...rest }: CommitInputProps): React__default.JSX.Element;
|
|
58
|
-
/** A number box: type a value (units allowed), or step with the arrow keys (Shift ×10). */
|
|
59
|
-
declare function ParameterNumberInput({ field, value, onChange, disabled, id, 'aria-label': ariaLabel, }: ParameterControlProps<NumberParameterField, number> & {
|
|
60
|
-
'aria-label'?: string;
|
|
61
|
-
}): React__default.JSX.Element;
|
|
62
|
-
/** A slider plus number box for `number` / `int` fields (number box only for `control: 'input'` or unbounded fields). */
|
|
63
|
-
declare function ParameterSlider(props: ParameterControlProps<NumberParameterField, number>): React__default.JSX.Element;
|
|
64
|
-
/** An on/off switch for `boolean` fields. */
|
|
65
|
-
declare function ParameterToggle({ field, value, onChange, disabled, id }: ParameterControlProps<BooleanParameterField, boolean>): React__default.JSX.Element;
|
|
66
|
-
/** A dropdown (or segmented buttons with `control: 'segmented'`) for `choice` fields. */
|
|
67
|
-
declare function ParameterSelect({ field, value, onChange, disabled, id }: ParameterControlProps<ChoiceParameterField, string | number>): React__default.JSX.Element;
|
|
68
|
-
/** A colour picker with a hex box, an alpha slider (with `alpha`) and swatches. */
|
|
69
|
-
declare function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd, disabled, id }: ParameterControlProps<ColorParameterField, string>): React__default.JSX.Element;
|
|
70
|
-
/** One number box per component for `vector` fields. */
|
|
71
|
-
declare function ParameterVector({ field, value, onChange, disabled, id }: ParameterControlProps<VectorParameterField, number[]>): React__default.JSX.Element;
|
|
72
|
-
interface ParameterImageProps extends ParameterControlProps<ImageParameterField, string> {
|
|
73
|
-
/** Turns a picked file into a URL (upload it, or `URL.createObjectURL`). Without it there is no file button. */
|
|
74
|
-
resolveFile?: (file: File) => string | Promise<string>;
|
|
75
|
-
}
|
|
76
|
-
/** An image picker: suggested thumbnails, a URL box, an optional file button and a clear button. */
|
|
77
|
-
declare function ParameterImage({ field, value, onChange, disabled, id, resolveFile }: ParameterImageProps): React__default.JSX.Element;
|
|
78
|
-
/** A text box (or textarea with `multiline`) that commits on blur or Enter. */
|
|
79
|
-
declare function ParameterText({ field, value, onChange, disabled, id }: ParameterControlProps<TextParameterField, string>): React__default.JSX.Element;
|
|
80
|
-
interface KeyframeDiamondProps {
|
|
81
|
-
state: ParameterKeyState;
|
|
82
|
-
onToggle: () => void;
|
|
83
|
-
/** The parameter's label (for the accessible name). */
|
|
84
|
-
label: string;
|
|
85
|
-
disabled?: boolean;
|
|
86
|
-
className?: string;
|
|
87
|
-
}
|
|
88
|
-
/** A keyframe toggle: filled when a key sits at the playhead, tinted when the value is animated. */
|
|
89
|
-
declare function KeyframeDiamond({ state, onToggle, label, disabled, className }: KeyframeDiamondProps): React__default.JSX.Element;
|
|
90
|
-
interface ParameterFieldControlProps extends ParameterControlProps<ParameterField, ParameterValue> {
|
|
91
|
-
resolveFile?: ParameterImageProps['resolveFile'];
|
|
92
|
-
}
|
|
93
|
-
/** The control for any field type. */
|
|
94
|
-
declare function ParameterFieldControl({ field, value, onChange, resolveFile, ...rest }: ParameterFieldControlProps): React__default.JSX.Element;
|
|
95
|
-
|
|
96
|
-
interface ParametersPanelProps {
|
|
97
|
-
controller: ParametersController;
|
|
98
|
-
/** Heading (default: the schema's title). Pass `null` for none. */
|
|
99
|
-
title?: React__default.ReactNode;
|
|
100
|
-
/** Undo, redo, reset and randomize buttons (default `true`). */
|
|
101
|
-
showToolbar?: boolean;
|
|
102
|
-
/** The preset picker with save and delete (default `true`). */
|
|
103
|
-
showPresets?: boolean;
|
|
104
|
-
/** Keyframe diamonds (default: when the controller has a keyframes adapter). */
|
|
105
|
-
showKeyframes?: boolean;
|
|
106
|
-
/** Per-field reset buttons on changed values (default `true`). */
|
|
107
|
-
showFieldReset?: boolean;
|
|
108
|
-
/** Turns a picked file into a URL for image fields. */
|
|
109
|
-
resolveFile?: ParameterImageProps['resolveFile'];
|
|
110
|
-
/** Shown when the schema has no fields. */
|
|
111
|
-
emptyMessage?: React__default.ReactNode;
|
|
112
|
-
className?: string;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Renders a whole parameter schema: collapsible groups, one control per visible field,
|
|
116
|
-
* keyframe diamonds, per-field reset, presets, and undo / redo / reset / randomize. Slider
|
|
117
|
-
* drags and colour picks are one undo step each.
|
|
118
|
-
*/
|
|
119
|
-
declare function ParametersPanel({ controller, title, showToolbar, showPresets, showKeyframes, showFieldReset, resolveFile, emptyMessage, className, }: ParametersPanelProps): React__default.JSX.Element;
|
|
120
|
-
|
|
121
|
-
export { KeyframeDiamond, type KeyframeDiamondProps, ParameterColor, type ParameterCommandTarget, ParameterCommitInput, type ParameterControlProps, ParameterFieldControl, type ParameterFieldControlProps, ParameterImage, type ParameterImageProps, ParameterNumberInput, ParameterSelect, ParameterSlider, ParameterText, ParameterToggle, ParameterVector, ParametersPanel, type ParametersPanelProps, type UseParametersResult, parameterButtonClass, parameterInputClass, useParameterCommands, useParameters, useParametersController, useParametersState };
|
|
1
|
+
export * from './useParameters.js';
|
|
2
|
+
export * from './fields.js';
|
|
3
|
+
export * from './ParametersPanel.js';
|
package/dist/parameters/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ParameterVector,
|
|
13
13
|
parameterButtonClass,
|
|
14
14
|
parameterInputClass
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-OTGJEYHV.js";
|
|
16
16
|
|
|
17
17
|
// src/parameters/useParameters.ts
|
|
18
18
|
import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
@@ -280,4 +280,3 @@ export {
|
|
|
280
280
|
useParametersController,
|
|
281
281
|
useParametersState
|
|
282
282
|
};
|
|
283
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ParametersController, type ParameterCommandOptions, type ParametersControllerOptions, type ParametersState, type ParameterValue, type ParameterSetResult } from '@pixerate/editor/parameters';
|
|
2
|
+
/**
|
|
3
|
+
* A `ParametersController` created once for the component's lifetime. When `options.schema`
|
|
4
|
+
* changes (a new object), the controller's schema is replaced and fitting values are kept.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useParametersController(options: ParametersControllerOptions): ParametersController;
|
|
7
|
+
/** The controller's state (re-renders on every change). */
|
|
8
|
+
export declare function useParametersState(controller: ParametersController): ParametersState;
|
|
9
|
+
export interface UseParametersResult {
|
|
10
|
+
controller: ParametersController;
|
|
11
|
+
state: ParametersState;
|
|
12
|
+
values: ParametersState['values'];
|
|
13
|
+
setValue: (id: string, value: ParameterValue) => ParameterSetResult;
|
|
14
|
+
undo: () => void;
|
|
15
|
+
redo: () => void;
|
|
16
|
+
reset: (ids?: readonly string[]) => void;
|
|
17
|
+
randomize: (ids?: readonly string[]) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Subscribes to a parameters controller and exposes its state with bound actions. Pass
|
|
21
|
+
* options instead of a controller to create one for the component's lifetime.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useParameters(controllerOrOptions: ParametersController | ParametersControllerOptions): UseParametersResult;
|
|
24
|
+
/** Anything with `register(specs) → unregister` (a `CommandRegistry`). */
|
|
25
|
+
export interface ParameterCommandTarget {
|
|
26
|
+
register(specs: any): () => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Registers the controller's palette / agent commands (`parameters.set`, `…randomize`, …)
|
|
30
|
+
* in `registry` while mounted, so `createCommandToolProvider` exposes them to agents.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useParameterCommands(registry: ParameterCommandTarget | null | undefined, controller: ParametersController, options?: ParameterCommandOptions): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ParametersController, type ParameterCommandOptions, type ParametersControllerOptions, type ParametersState, type ParameterValue, type ParameterSetResult } from '@pixerate/editor/parameters';
|
|
2
|
+
/**
|
|
3
|
+
* A `ParametersController` created once for the component's lifetime. When `options.schema`
|
|
4
|
+
* changes (a new object), the controller's schema is replaced and fitting values are kept.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useParametersController(options: ParametersControllerOptions): ParametersController;
|
|
7
|
+
/** The controller's state (re-renders on every change). */
|
|
8
|
+
export declare function useParametersState(controller: ParametersController): ParametersState;
|
|
9
|
+
export interface UseParametersResult {
|
|
10
|
+
controller: ParametersController;
|
|
11
|
+
state: ParametersState;
|
|
12
|
+
values: ParametersState['values'];
|
|
13
|
+
setValue: (id: string, value: ParameterValue) => ParameterSetResult;
|
|
14
|
+
undo: () => void;
|
|
15
|
+
redo: () => void;
|
|
16
|
+
reset: (ids?: readonly string[]) => void;
|
|
17
|
+
randomize: (ids?: readonly string[]) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Subscribes to a parameters controller and exposes its state with bound actions. Pass
|
|
21
|
+
* options instead of a controller to create one for the component's lifetime.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useParameters(controllerOrOptions: ParametersController | ParametersControllerOptions): UseParametersResult;
|
|
24
|
+
/** Anything with `register(specs) → unregister` (a `CommandRegistry`). */
|
|
25
|
+
export interface ParameterCommandTarget {
|
|
26
|
+
register(specs: any): () => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Registers the controller's palette / agent commands (`parameters.set`, `…randomize`, …)
|
|
30
|
+
* in `registry` while mounted, so `createCommandToolProvider` exposes them to agents.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useParameterCommands(registry: ParameterCommandTarget | null | undefined, controller: ParametersController, options?: ParameterCommandOptions): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type RecoveryMeta } from '@pixerate/editor/persistence';
|
|
3
|
+
export interface RecoveryPromptProps {
|
|
4
|
+
/** `useAutosave().recovery`; nothing renders while it is `null`. */
|
|
5
|
+
recovery: {
|
|
6
|
+
meta: RecoveryMeta;
|
|
7
|
+
} | null;
|
|
8
|
+
onRestore: () => void;
|
|
9
|
+
onDiscard: () => void;
|
|
10
|
+
/** Formats the snapshot time (default `toLocaleString`). */
|
|
11
|
+
formatTime?: (time: number) => string;
|
|
12
|
+
restoreLabel?: string;
|
|
13
|
+
discardLabel?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* "Restore unsaved changes from <time>?" banner with Restore / Discard buttons
|
|
18
|
+
* (Tailwind + theme tokens).
|
|
19
|
+
*/
|
|
20
|
+
export declare const RecoveryPrompt: React.FC<RecoveryPromptProps>;
|