@pstdio/ui 0.15.0 → 0.17.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/{MermaidComponent-DBJsTOmj.js → MermaidComponent-BCMQqPqu.js} +11 -11
- package/dist/{MermaidComponent-DBJsTOmj.js.map → MermaidComponent-BCMQqPqu.js.map} +1 -1
- package/dist/browser-storage-BinyFNJX.js +40 -0
- package/dist/browser-storage-BinyFNJX.js.map +1 -0
- package/dist/chat-ui.js +1832 -1275
- package/dist/chat-ui.js.map +1 -1
- package/dist/checkbox-B2zYVemL.js +70 -0
- package/dist/checkbox-B2zYVemL.js.map +1 -0
- package/dist/components/chat-ui/components/ai-conversation.d.ts +1 -1
- package/dist/components/chat-ui/components/ai-message.d.ts +1 -1
- package/dist/components/chat-ui/components/ai-response.d.ts +0 -1
- package/dist/components/chat-ui/components/attachment-list.d.ts +1 -1
- package/dist/components/chat-ui/components/auto-scroll.d.ts +27 -0
- package/dist/components/chat-ui/components/chat-input-actions.d.ts +1 -0
- package/dist/components/chat-ui/components/chat-input.d.ts +8 -2
- package/dist/components/chat-ui/components/chat-message-animation.d.ts +22 -0
- package/dist/components/chat-ui/components/chat-panel.d.ts +11 -5
- package/dist/components/chat-ui/components/composer-constants.d.ts +1 -0
- package/dist/components/chat-ui/components/conversation-browse.d.ts +22 -0
- package/dist/components/chat-ui/components/message-types.d.ts +14 -0
- package/dist/components/chat-ui/components/queued-follow-up-list-state.d.ts +4 -0
- package/dist/components/chat-ui/components/queued-follow-up-list.d.ts +11 -0
- package/dist/components/chat-ui/components/timeline.d.ts +5 -2
- package/dist/components/chat-ui/components/working-indicator.d.ts +9 -0
- package/dist/components/chat-ui/components/workspace-hub.d.ts +8 -1
- package/dist/components/chat-ui/index.d.ts +4 -2
- package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -1
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +4 -14
- package/dist/components/chat-ui/tool-rendering/question-prompt.d.ts +9 -0
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
- package/dist/components/chat-ui/tool-rendering/types.d.ts +1 -2
- package/dist/components/command-palette/index.d.ts +4 -0
- package/dist/components/data-table/build-columns.d.ts +13 -2
- package/dist/components/data-table/categorical-color-cell.d.ts +8 -0
- package/dist/components/data-table/color-cell-style.d.ts +13 -0
- package/dist/components/data-table/color-scale-cell.d.ts +7 -0
- package/dist/components/data-table/data-table-column-menu.d.ts +12 -0
- package/dist/components/data-table/data-table-header.d.ts +18 -0
- package/dist/components/data-table/data-table-stat-chart.d.ts +21 -0
- package/dist/components/data-table/data-table-state.d.ts +27 -0
- package/dist/components/data-table/data-table-stats-row.d.ts +11 -0
- package/dist/components/data-table/data-table-stats.d.ts +19 -0
- package/dist/components/data-table/data-table-table-parts.d.ts +21 -0
- package/dist/components/data-table/data-table.story-descriptions.d.ts +6 -0
- package/dist/components/data-table/data-table.story-fixtures.d.ts +6 -0
- package/dist/components/data-table/friendly-json-display.d.ts +31 -0
- package/dist/components/data-table/index.d.ts +3 -1
- package/dist/components/data-table/json-cell.d.ts +6 -0
- package/dist/components/data-table/pagination-footer.d.ts +4 -1
- package/dist/components/data-table/selection-toolbar.d.ts +3 -1
- package/dist/components/data-table/types.d.ts +72 -0
- package/dist/components/diff-viewer/diff-card.d.ts +1 -0
- package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -19
- package/dist/components/diff-viewer/diff-drawer.d.ts +1 -0
- package/dist/components/diff-viewer/index.d.ts +2 -0
- package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +7 -3
- package/dist/components/internal/style-guide.d.ts +14 -0
- package/dist/components/internal/token-editor-controls.d.ts +8 -0
- package/dist/components/internal/token-editor-data.d.ts +40 -0
- package/dist/components/internal/token-editor-state.d.ts +22 -0
- package/dist/components/{data-renderer → kanban-renderer}/display-menu.d.ts +4 -4
- package/dist/components/{data-renderer → kanban-renderer}/filter-menu.d.ts +3 -3
- package/dist/components/kanban-renderer/index.d.ts +19 -0
- package/dist/components/kanban-renderer/kanban-renderer-attribute-badge.d.ts +7 -0
- package/dist/components/{data-renderer/data-renderer-board-column-header.d.ts → kanban-renderer/kanban-renderer-board-column-header.d.ts} +2 -2
- package/dist/components/{data-renderer/data-renderer-board-group-section.d.ts → kanban-renderer/kanban-renderer-board-group-section.d.ts} +2 -2
- package/dist/components/{data-renderer/data-renderer-board-move.d.ts → kanban-renderer/kanban-renderer-board-move.d.ts} +3 -3
- package/dist/components/{data-renderer/data-renderer-board.d.ts → kanban-renderer/kanban-renderer-board.d.ts} +16 -15
- package/dist/components/{data-renderer/data-renderer-card.d.ts → kanban-renderer/kanban-renderer-card.d.ts} +5 -4
- package/dist/components/{data-renderer/data-renderer-content.d.ts → kanban-renderer/kanban-renderer-content.d.ts} +8 -8
- package/dist/components/kanban-renderer/kanban-renderer-create-dialog.d.ts +12 -0
- package/dist/components/kanban-renderer/kanban-renderer-create-field.d.ts +10 -0
- package/dist/components/kanban-renderer/kanban-renderer-grouping.d.ts +23 -0
- package/dist/components/{data-renderer/data-renderer-helpers.d.ts → kanban-renderer/kanban-renderer-helpers.d.ts} +15 -15
- package/dist/components/kanban-renderer/kanban-renderer-list-items.d.ts +25 -0
- package/dist/components/kanban-renderer/kanban-renderer-list.d.ts +43 -0
- package/dist/components/{data-renderer/data-renderer-story-fixtures.d.ts → kanban-renderer/kanban-renderer-story-fixtures.d.ts} +3 -2
- package/dist/components/kanban-renderer/kanban-renderer-toolbar.d.ts +15 -0
- package/dist/components/kanban-renderer/kanban-renderer-view-bar.d.ts +14 -0
- package/dist/components/kanban-renderer/kanban-renderer-views.d.ts +12 -0
- package/dist/components/{data-renderer/data-renderer.d.ts → kanban-renderer/kanban-renderer.d.ts} +12 -9
- package/dist/components/{data-renderer → kanban-renderer}/types.d.ts +51 -14
- package/dist/components/kanban-renderer/use-kanban-renderer-store.d.ts +78 -0
- package/dist/components/layout/index.d.ts +7 -0
- package/dist/components/layout/panel-header.constants.d.ts +3 -0
- package/dist/components/{resizable-split-layout.d.ts → layout/resizable-split-layout.d.ts} +3 -2
- package/dist/components/layout/resizable-split-layout.geometry.d.ts +56 -0
- package/dist/components/{resizable-split-layout.handle.d.ts → layout/resizable-split-layout.handle.d.ts} +6 -2
- package/dist/components/layout/resizable-split-layout.panels.d.ts +25 -0
- package/dist/components/list-row/list-row-actions.d.ts +1 -0
- package/dist/components/list-row/list-row-content.d.ts +7 -0
- package/dist/components/list-row/list-row.types.d.ts +4 -1
- package/dist/components/overlays/attached-menu.d.ts +6 -0
- package/dist/components/overlays/attachment-chip.d.ts +13 -0
- package/dist/components/overlays/index.d.ts +16 -0
- package/dist/components/{resource-context-menu.d.ts → overlays/resource-context-menu.d.ts} +13 -1
- package/dist/components/{search-modal-content.d.ts → overlays/search-modal-content.d.ts} +1 -1
- package/dist/components/{searchable-menu.d.ts → overlays/searchable-menu.d.ts} +1 -1
- package/dist/components/param-editor/index.d.ts +24 -0
- package/dist/components/param-editor/inputs/action-input.d.ts +13 -0
- package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +12 -0
- package/dist/components/param-editor/inputs/anchor-grid.d.ts +4 -0
- package/dist/components/param-editor/inputs/file-accept.d.ts +22 -0
- package/dist/components/param-editor/inputs/file-drop-input.d.ts +14 -0
- package/dist/components/param-editor/inputs/numeric-value.d.ts +6 -0
- package/dist/components/param-editor/inputs/range-input.d.ts +17 -0
- package/dist/components/param-editor/inputs/range-value.d.ts +5 -0
- package/dist/components/param-editor/inputs/resource-input-chips.d.ts +15 -0
- package/dist/components/param-editor/inputs/resource-input.d.ts +18 -0
- package/dist/components/param-editor/inputs/segmented-input.d.ts +14 -0
- package/dist/components/param-editor/{selection-input.d.ts → inputs/selection-input.d.ts} +6 -6
- package/dist/components/param-editor/inputs/selection-menu.d.ts +29 -0
- package/dist/components/param-editor/inputs/slider-marks.d.ts +5 -0
- package/dist/components/param-editor/inputs/vector-input.d.ts +17 -0
- package/dist/components/param-editor/inputs/vector-value.d.ts +7 -0
- package/dist/components/param-editor/param-editor-control-item.d.ts +15 -0
- package/dist/components/param-editor/param-editor-control-list.d.ts +5 -0
- package/dist/components/param-editor/param-editor-field-label.d.ts +1 -0
- package/dist/components/param-editor/param-editor-field.d.ts +11 -0
- package/dist/components/param-editor/param-editor-horizontal.d.ts +1 -0
- package/dist/components/param-editor/param-editor-inline-group.d.ts +5 -0
- package/dist/components/param-editor/param-editor-read-only-field.d.ts +9 -0
- package/dist/components/param-editor/param-editor-section.d.ts +17 -0
- package/dist/components/param-editor/param-editor.d.ts +3 -1
- package/dist/components/param-editor/param-editor.types.d.ts +135 -24
- package/dist/components/{breadcrumb.d.ts → primitives/breadcrumb.d.ts} +1 -1
- package/dist/components/primitives/index.d.ts +28 -0
- package/dist/components/{number-input.d.ts → primitives/number-input.d.ts} +0 -2
- package/dist/components/{session-indicator.d.ts → primitives/session-indicator.d.ts} +2 -1
- package/dist/components/{tooltip.d.ts → primitives/tooltip.d.ts} +0 -1
- package/dist/components/rich-text/prompt-input/commands.d.ts +0 -17
- package/dist/components/rich-text/prompt-input/events.d.ts +0 -13
- package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +1 -2
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +2 -1
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +2 -1
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +2 -1
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +1 -2
- package/dist/components/rich-text/prompt-input/prompt-input.d.ts +3 -2
- package/dist/components/rich-text/prompt-input/utils.d.ts +1 -2
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -1
- package/dist/components/rich-text/types.d.ts +1 -1
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
- package/dist/components/{sidebar/sidebar-footer.d.ts → sidenav/sidenav-footer.d.ts} +2 -2
- package/dist/components/{sidebar/sidebar-header.d.ts → sidenav/sidenav-header.d.ts} +2 -2
- package/dist/components/sidenav/sidenav.d.ts +2 -0
- package/dist/components/sidenav/sidenav.store.d.ts +49 -0
- package/dist/components/{sidebar/sidebar.types.d.ts → sidenav/sidenav.types.d.ts} +6 -6
- package/dist/components/tab-strip/tab-visibility-filter.d.ts +2 -1
- package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor.types.d.ts +1 -1
- package/dist/components/terminal/bind-session.d.ts +33 -0
- package/dist/components/terminal/index.d.ts +6 -0
- package/dist/components/terminal/scripted-bridge.d.ts +35 -0
- package/dist/components/terminal/terminal-contract.d.ts +22 -0
- package/dist/components/terminal/terminal-theme.d.ts +12 -0
- package/dist/components/terminal/terminal.d.ts +56 -0
- package/dist/components/terminal/types.d.ts +35 -0
- package/dist/components/terminal/use-terminal-session.d.ts +21 -0
- package/dist/components/tree-list/tree-list-order-filter.d.ts +1 -2
- package/dist/components/tree-list/tree-list-visibility-filter.d.ts +1 -2
- package/dist/components/tree-list/tree-list.d.ts +2 -2
- package/dist/components/tree-list/tree-list.types.d.ts +4 -0
- package/dist/data-table.js +1271 -0
- package/dist/data-table.js.map +1 -0
- package/dist/diff-editor-BnfV8cYB.js +182 -0
- package/dist/diff-editor-BnfV8cYB.js.map +1 -0
- package/dist/diff.js +1313 -0
- package/dist/diff.js.map +1 -0
- package/dist/empty-state-Bo4HVrgr.js +34 -0
- package/dist/empty-state-Bo4HVrgr.js.map +1 -0
- package/dist/foundations/gallery/gallery-frame.d.ts +21 -0
- package/dist/foundations/gallery/sections/badges-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/buttons-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/composite-chat-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/composites-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/feedback-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/input-authoring-card.d.ts +1 -0
- package/dist/foundations/gallery/sections/inputs-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/layout-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/overlays-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/panels-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +1 -0
- package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +1 -0
- package/dist/index.d.ts +14 -87
- package/dist/index.js +2027 -7501
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer-toolbar-B9ro-9z1.js +1318 -0
- package/dist/kanban-renderer-toolbar-B9ro-9z1.js.map +1 -0
- package/dist/kanban-renderer.js +1087 -0
- package/dist/kanban-renderer.js.map +1 -0
- package/dist/list-row-YRUxEcy3.js +808 -0
- package/dist/list-row-YRUxEcy3.js.map +1 -0
- package/dist/mermaid-renderer-DZo3qj6D.js +425 -0
- package/dist/mermaid-renderer-DZo3qj6D.js.map +1 -0
- package/dist/mermaid.js +5 -0
- package/dist/mermaid.js.map +1 -0
- package/dist/param-editor-CYZJbmKu.js +933 -0
- package/dist/param-editor-CYZJbmKu.js.map +1 -0
- package/dist/param-editor-read-only-field-DgtLqcFa.js +925 -0
- package/dist/param-editor-read-only-field-DgtLqcFa.js.map +1 -0
- package/dist/prism-BXb57lxL.js +125 -0
- package/dist/prism-BXb57lxL.js.map +1 -0
- package/dist/radio-cLMEBBZk.js +76 -0
- package/dist/radio-cLMEBBZk.js.map +1 -0
- package/dist/resource-badge-qCWHP-wQ.js +99 -0
- package/dist/resource-badge-qCWHP-wQ.js.map +1 -0
- package/dist/{rich-message-DNSEhxXh.js → rich-message-DBf_5YlW.js} +462 -481
- package/dist/rich-message-DBf_5YlW.js.map +1 -0
- package/dist/rich-text.js +300 -299
- package/dist/rich-text.js.map +1 -1
- package/dist/scroll-area-BMbg1WcD.js +91 -0
- package/dist/scroll-area-BMbg1WcD.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/terminal.js +359 -0
- package/dist/terminal.js.map +1 -0
- package/dist/theme/global.d.ts +3 -0
- package/dist/theme/primitives/sizes.d.ts +23 -0
- package/dist/theme/recipes/badge.d.ts +50 -0
- package/dist/theme/recipes/button.d.ts +30 -19
- package/dist/theme/recipes/color-picker.d.ts +1 -0
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/input.d.ts +55 -0
- package/dist/theme/recipes/number-input.d.ts +98 -0
- package/dist/theme/recipes/tabs.d.ts +49 -28
- package/dist/theme/recipes/textarea.d.ts +62 -1
- package/dist/theme/recipes/timeline.d.ts +74 -0
- package/dist/theme/tokens/borders.d.ts +0 -3
- package/dist/theme/tokens/colors.d.ts +118 -94
- package/dist/{theme-25P7ij4C.js → theme-CNhnbvcE.js} +1300 -375
- package/dist/theme-CNhnbvcE.js.map +1 -0
- package/dist/theme-preference-DOzHx64J.js +123 -0
- package/dist/theme-preference-DOzHx64J.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-CZHLAURU.js +1033 -0
- package/dist/tree-list-CZHLAURU.js.map +1 -0
- package/package.json +29 -3
- package/dist/components/data-renderer/card-interaction-guard.d.ts +0 -2
- package/dist/components/data-renderer/data-renderer-attribute-badge.d.ts +0 -7
- package/dist/components/data-renderer/data-renderer-grouping.d.ts +0 -23
- package/dist/components/data-renderer/data-renderer-list.d.ts +0 -39
- package/dist/components/data-renderer/data-renderer-toolbar.d.ts +0 -12
- package/dist/components/data-renderer/use-data-renderer-store.d.ts +0 -59
- package/dist/components/file-tree-helpers.d.ts +0 -8
- package/dist/components/open-source-notices-screen.d.ts +0 -20
- package/dist/components/panel-header.constants.d.ts +0 -1
- package/dist/components/param-editor/input-group.d.ts +0 -10
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/index.d.ts +0 -1
- package/dist/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -5
- package/dist/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -2
- package/dist/components/rich-text/theme/report-theme.d.ts +0 -3
- package/dist/components/sidebar/sidebar.d.ts +0 -2
- package/dist/components/sidebar/sidebar.store.d.ts +0 -49
- package/dist/components/style-guide-data.d.ts +0 -40
- package/dist/components/style-guide.d.ts +0 -1
- package/dist/mermaid-renderer-CPGj6vsb.js +0 -570
- package/dist/mermaid-renderer-CPGj6vsb.js.map +0 -1
- package/dist/radio-DJtQY9po.js +0 -286
- package/dist/radio-DJtQY9po.js.map +0 -1
- package/dist/resource-badge-CeJTOn8F.js +0 -188
- package/dist/resource-badge-CeJTOn8F.js.map +0 -1
- package/dist/rich-message-DNSEhxXh.js.map +0 -1
- package/dist/theme-25P7ij4C.js.map +0 -1
- package/dist/utils/formats.d.ts +0 -7
- /package/dist/components/{palette-filter.d.ts → command-palette/palette-filter.d.ts} +0 -0
- /package/dist/components/{palette-list.d.ts → command-palette/palette-list.d.ts} +0 -0
- /package/dist/components/{palette-shortcut.d.ts → command-palette/palette-shortcut.d.ts} +0 -0
- /package/dist/components/{palette.d.ts → command-palette/palette.d.ts} +0 -0
- /package/dist/components/{code-editor.d.ts → diff-viewer/code-editor.d.ts} +0 -0
- /package/dist/components/{column-file-browser.d.ts → file-browser/column-file-browser.d.ts} +0 -0
- /package/dist/components/{performance-panel.d.ts → internal/performance-panel.d.ts} +0 -0
- /package/dist/components/{data-renderer/data-renderer-badge-helpers.d.ts → kanban-renderer/kanban-renderer-badge-helpers.d.ts} +0 -0
- /package/dist/components/{data-renderer/data-renderer-enum-helpers.d.ts → kanban-renderer/kanban-renderer-enum-helpers.d.ts} +0 -0
- /package/dist/components/{data-renderer → kanban-renderer}/use-resolved-attributes.d.ts +0 -0
- /package/dist/components/{header.d.ts → layout/header.d.ts} +0 -0
- /package/dist/components/{horizontal-menu-stack.d.ts → layout/horizontal-menu-stack.d.ts} +0 -0
- /package/dist/components/{item-section.d.ts → layout/item-section.d.ts} +0 -0
- /package/dist/components/{attached-panel.d.ts → overlays/attached-panel.d.ts} +0 -0
- /package/dist/components/{bubble-button.d.ts → overlays/bubble-button.d.ts} +0 -0
- /package/dist/components/{bubble-panel.d.ts → overlays/bubble-panel.d.ts} +0 -0
- /package/dist/components/{delete-confirmation-modal.d.ts → overlays/delete-confirmation-modal.d.ts} +0 -0
- /package/dist/components/{repo-picker-dialog.d.ts → overlays/repo-picker-dialog.d.ts} +0 -0
- /package/dist/components/param-editor/{color-input.d.ts → inputs/color-input.d.ts} +0 -0
- /package/dist/components/param-editor/{date-input.d.ts → inputs/date-input.d.ts} +0 -0
- /package/dist/components/param-editor/{horizontal-text-input.d.ts → inputs/horizontal-text-input.d.ts} +0 -0
- /package/dist/components/param-editor/{number-input.d.ts → inputs/number-input.d.ts} +0 -0
- /package/dist/components/param-editor/{text-input.d.ts → inputs/text-input.d.ts} +0 -0
- /package/dist/components/{alert.d.ts → primitives/alert.d.ts} +0 -0
- /package/dist/components/{checkbox.d.ts → primitives/checkbox.d.ts} +0 -0
- /package/dist/components/{content-placeholder.d.ts → primitives/content-placeholder.d.ts} +0 -0
- /package/dist/components/{empty-state.d.ts → primitives/empty-state.d.ts} +0 -0
- /package/dist/components/{error-boundary.d.ts → primitives/error-boundary.d.ts} +0 -0
- /package/dist/components/{icon-color-picker.d.ts → primitives/icon-color-picker.d.ts} +0 -0
- /package/dist/components/{info-card.d.ts → primitives/info-card.d.ts} +0 -0
- /package/dist/components/{integration-card.d.ts → primitives/integration-card.d.ts} +0 -0
- /package/dist/components/{radio.d.ts → primitives/radio.d.ts} +0 -0
- /package/dist/components/{resource-badge.d.ts → primitives/resource-badge.d.ts} +0 -0
- /package/dist/components/{scroll-area.d.ts → primitives/scroll-area.d.ts} +0 -0
- /package/dist/components/{simple-card.d.ts → primitives/simple-card.d.ts} +0 -0
- /package/dist/components/{slider.d.ts → primitives/slider.d.ts} +0 -0
- /package/dist/components/{switch.d.ts → primitives/switch.d.ts} +0 -0
- /package/dist/components/{toaster.d.ts → primitives/toaster.d.ts} +0 -0
- /package/dist/components/{workspace-badge.d.ts → primitives/workspace-badge.d.ts} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface AttachmentChipProps {
|
|
2
|
+
file: File;
|
|
3
|
+
/** Accessible label for the remove control; the caller owns translation. */
|
|
4
|
+
removeLabel: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onRemove: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A file queued for upload, before the resource it belongs to exists. Removal
|
|
10
|
+
* lives on the chip because there is no other surface between picking a file
|
|
11
|
+
* and submitting where a mistaken attachment can be taken back.
|
|
12
|
+
*/
|
|
13
|
+
export declare const AttachmentChip: (props: AttachmentChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type { AttachedMenuProps } from './attached-menu';
|
|
2
|
+
export { AttachedMenu } from './attached-menu';
|
|
3
|
+
export { AttachedPanel } from './attached-panel';
|
|
4
|
+
export type { AttachmentChipProps } from './attachment-chip';
|
|
5
|
+
export { AttachmentChip } from './attachment-chip';
|
|
6
|
+
export { BubbleButton } from './bubble-button';
|
|
7
|
+
export { BubblePanel } from './bubble-panel';
|
|
8
|
+
export { DeleteConfirmationModal } from './delete-confirmation-modal';
|
|
9
|
+
export type { RepoPickerDialogEntry, RepoPickerDialogProps } from './repo-picker-dialog';
|
|
10
|
+
export { RepoPickerDialog } from './repo-picker-dialog';
|
|
11
|
+
export type { ResourceActionMenuProps, ResourceContextAction } from './resource-context-menu';
|
|
12
|
+
export { ResourceActionMenu, ResourceContextMenu } from './resource-context-menu';
|
|
13
|
+
export type { SearchModalContentProps } from './search-modal-content';
|
|
14
|
+
export { SearchModalContent } from './search-modal-content';
|
|
15
|
+
export type { SearchableMenuItem, SearchableMenuParentList } from './searchable-menu';
|
|
16
|
+
export { SearchableMenu } from './searchable-menu';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Menu } from '@chakra-ui/react';
|
|
2
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { ComponentProps, ReactElement, ReactNode } from 'react';
|
|
3
3
|
type MenuRootProps = ComponentProps<typeof Menu.Root>;
|
|
4
4
|
export interface ResourceContextAction {
|
|
5
5
|
key: string;
|
|
6
6
|
label: string;
|
|
7
|
+
commandId?: string;
|
|
7
8
|
onClick: () => Promise<void> | void;
|
|
8
9
|
isDisabled?: boolean;
|
|
9
10
|
icon?: ReactNode;
|
|
@@ -18,6 +19,17 @@ interface ResourceContextMenuProps {
|
|
|
18
19
|
positioning?: MenuRootProps["positioning"];
|
|
19
20
|
/** Keep the menu open after selecting an item — useful for menus that toggle several entries in one pass. */
|
|
20
21
|
closeOnSelect?: MenuRootProps["closeOnSelect"];
|
|
22
|
+
/** Preserve the trigger tree while actions load or change. */
|
|
23
|
+
keepMountedWhenEmpty?: boolean;
|
|
21
24
|
}
|
|
25
|
+
export interface ResourceActionMenuProps {
|
|
26
|
+
actions: ResourceContextAction[];
|
|
27
|
+
children: ReactElement;
|
|
28
|
+
contentMinWidth?: string;
|
|
29
|
+
contentBackground?: string;
|
|
30
|
+
positioning?: MenuRootProps["positioning"];
|
|
31
|
+
closeOnSelect?: MenuRootProps["closeOnSelect"];
|
|
32
|
+
}
|
|
33
|
+
export declare const ResourceActionMenu: (props: ResourceActionMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
34
|
export declare const ResourceContextMenu: (props: ResourceContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
35
|
export {};
|
|
@@ -9,7 +9,7 @@ export interface SearchableMenuItem {
|
|
|
9
9
|
secondaryLabel?: string;
|
|
10
10
|
tooltipLabel?: ReactNode;
|
|
11
11
|
icon?: ElementType;
|
|
12
|
-
variant?: "default" | "compact";
|
|
12
|
+
variant?: "default" | "compact" | "full-width";
|
|
13
13
|
isDisabled?: boolean;
|
|
14
14
|
isSelected?: boolean;
|
|
15
15
|
onSelect?: () => void;
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
+
export { ActionInput } from './inputs/action-input';
|
|
2
|
+
export { ANCHOR_GRID_VALUES, isAnchorGridValue } from './inputs/anchor-grid';
|
|
3
|
+
export { AnchorGridInput } from './inputs/anchor-grid-input';
|
|
4
|
+
export { ColorInput } from './inputs/color-input';
|
|
5
|
+
export { DateInput } from './inputs/date-input';
|
|
6
|
+
export { FileDropInput } from './inputs/file-drop-input';
|
|
7
|
+
export { HorizontalTextInput } from './inputs/horizontal-text-input';
|
|
8
|
+
export { NumberInput } from './inputs/number-input';
|
|
9
|
+
export { RangeInput } from './inputs/range-input';
|
|
10
|
+
export { ResourceInput } from './inputs/resource-input';
|
|
11
|
+
export { SegmentedInput } from './inputs/segmented-input';
|
|
12
|
+
export { SelectionInput } from './inputs/selection-input';
|
|
13
|
+
export { TextInput } from './inputs/text-input';
|
|
14
|
+
export { VectorInput } from './inputs/vector-input';
|
|
1
15
|
export type { ParamEditorProps } from './param-editor';
|
|
2
16
|
export { ParamEditor } from './param-editor';
|
|
17
|
+
export type { ActionOption, ActionsParam, AnchorGridParam, AnchorGridValue, BaseParam, ColorParam, DateParam, FileDropParam, FileDropValue, InputGroup, NumberParam, Param, ParamEditorReadOnlyContent, ParamEditorReadOnlyImage, ParamValue, ParamValueMap, PropertyParam, RangeParam, RangeValue, ReadOnlyParam, ResourceOption, ResourceParam, ResourceRefValue, SegmentedOption, SegmentedParam, SelectionParam, TextParam, VectorParam, VectorValue, } from './param-editor.types';
|
|
18
|
+
export { ParamEditorControlItem } from './param-editor-control-item';
|
|
19
|
+
export { ParamEditorControlList } from './param-editor-control-list';
|
|
20
|
+
export { ParamEditorField } from './param-editor-field';
|
|
21
|
+
export { ParamEditorFieldLabel } from './param-editor-field-label';
|
|
22
|
+
export { ParamEditorInlineGroup } from './param-editor-inline-group';
|
|
23
|
+
export { ParamEditorLabel } from './param-editor-label';
|
|
24
|
+
export { ParamEditorReadOnlyField } from './param-editor-read-only-field';
|
|
25
|
+
export { ParamEditorReadOnlyValue } from './param-editor-read-only-value';
|
|
26
|
+
export { ParamEditorSection } from './param-editor-section';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ActionOption } from '../param-editor.types';
|
|
2
|
+
interface ActionInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
options: ActionOption[];
|
|
8
|
+
onChange: (id: string, value: string) => void;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const ActionInput: (props: ActionInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnchorGridValue } from '../param-editor.types';
|
|
2
|
+
interface AnchorGridInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: AnchorGridValue;
|
|
7
|
+
onChange: (id: string, value: AnchorGridValue) => void;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const AnchorGridInput: (props: AnchorGridInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AnchorGridValue } from '../param-editor.types';
|
|
2
|
+
/** The nine anchors in row-major order (top-left → bottom-right). */
|
|
3
|
+
export declare const ANCHOR_GRID_VALUES: AnchorGridValue[];
|
|
4
|
+
export declare const isAnchorGridValue: (value: unknown) => value is AnchorGridValue;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FileDropValue } from '../param-editor.types';
|
|
2
|
+
interface AcceptClause {
|
|
3
|
+
kind: "extension" | "mime" | "wildcard";
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
/** Parse an accept string ("image/*,.png,image/jpeg") into normalized clauses. */
|
|
7
|
+
export declare const parseAccept: (accept?: string) => AcceptClause[];
|
|
8
|
+
export interface AcceptCandidate {
|
|
9
|
+
name: string;
|
|
10
|
+
mimeType?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Whether a file satisfies the accept string. An empty accept matches anything. */
|
|
13
|
+
export declare const acceptsFile: (candidate: AcceptCandidate, accept?: string) => boolean;
|
|
14
|
+
interface FileMetadataInput {
|
|
15
|
+
name: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
size?: number;
|
|
18
|
+
dataUrl?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Build the serializable metadata a file-drop control commits (never a live File). */
|
|
21
|
+
export declare const fileDropValueFromFile: (input: FileMetadataInput) => FileDropValue;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FileDropValue } from '../param-editor.types';
|
|
2
|
+
interface FileDropInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: FileDropValue | null;
|
|
7
|
+
accept?: string;
|
|
8
|
+
assetKind?: "file" | "image";
|
|
9
|
+
onChange: (id: string, value: FileDropValue | null) => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const FileDropInput: (props: FileDropInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Clamp `value` into the inclusive range, tolerating an inverted min/max. */
|
|
2
|
+
export declare const clampToRange: (value: number, min: number, max: number) => number;
|
|
3
|
+
/** Snap `value` to the nearest multiple of `step` measured from `origin`. */
|
|
4
|
+
export declare const snapToStep: (value: number, step: number, origin?: number) => number;
|
|
5
|
+
/** Format a number with an optional unit suffix, trimming float noise. */
|
|
6
|
+
export declare const formatUnitValue: (value: number, unit?: string) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RangeValue } from '../param-editor.types';
|
|
2
|
+
interface RangeInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: RangeValue;
|
|
7
|
+
min: number;
|
|
8
|
+
max: number;
|
|
9
|
+
step?: number;
|
|
10
|
+
unit?: string;
|
|
11
|
+
markerCount?: number;
|
|
12
|
+
onChange: (id: string, value: RangeValue) => void;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const RangeInput: (props: RangeInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RangeValue } from '../param-editor.types';
|
|
2
|
+
/** Order both handles and clamp (and optionally snap) them into `[min, max]`. */
|
|
3
|
+
export declare const normalizeRange: (value: RangeValue, min: number, max: number, step?: number) => RangeValue;
|
|
4
|
+
/** Replace a single handle, keeping the pair ordered. */
|
|
5
|
+
export declare const updateRangeHandle: (value: RangeValue, index: 0 | 1, next: number, min: number, max: number, step?: number) => RangeValue;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ResourceOption, ResourceRefValue } from '../param-editor.types';
|
|
2
|
+
interface ResourceChipProps {
|
|
3
|
+
option: ResourceOption;
|
|
4
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
5
|
+
onRemove?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ResourceChip: (props: ResourceChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
interface ResourceChipListProps {
|
|
9
|
+
options: ResourceOption[];
|
|
10
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
11
|
+
onRemove?: (optionId: string) => void;
|
|
12
|
+
emptyText?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ResourceChipList: (props: ResourceChipListProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ResourceOption, ResourceRefValue } from '../param-editor.types';
|
|
2
|
+
interface ResourceInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: string | string[];
|
|
7
|
+
options: ResourceOption[];
|
|
8
|
+
onChange: (id: string, value: string | string[]) => void;
|
|
9
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
editable?: boolean;
|
|
12
|
+
multiSelect?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
emptyText?: string;
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const ResourceInput: (props: ResourceInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SegmentedOption } from '../param-editor.types';
|
|
2
|
+
interface SegmentedInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: string;
|
|
7
|
+
options: SegmentedOption[];
|
|
8
|
+
variant?: "default" | "dots";
|
|
9
|
+
onChange: (id: string, value: string) => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const SegmentedInput: (props: SegmentedInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
icon?: string;
|
|
5
|
-
}
|
|
1
|
+
import { SelectionMenuOption } from './selection-menu';
|
|
6
2
|
interface SelectionInputProps {
|
|
7
3
|
id: string;
|
|
8
4
|
defaultValue: string | string[];
|
|
9
5
|
name: string;
|
|
10
|
-
options:
|
|
6
|
+
options: SelectionMenuOption[];
|
|
11
7
|
onChange: (id: string, value: string | string[]) => void;
|
|
12
8
|
description: string;
|
|
13
9
|
readOnly?: boolean;
|
|
@@ -16,6 +12,10 @@ interface SelectionInputProps {
|
|
|
16
12
|
tooltipPlacement?: "top" | "right" | "bottom" | "left";
|
|
17
13
|
placeholder?: string;
|
|
18
14
|
fullWidth?: boolean;
|
|
15
|
+
/** Re-picking the selected option clears it. */
|
|
16
|
+
clearable?: boolean;
|
|
17
|
+
/** Inert, but still rendered as a control. */
|
|
18
|
+
disabled?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare const SelectionInput: (props: SelectionInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SelectionMenuOption {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
/** Palette key (e.g. "blue") applied to the option's icon. */
|
|
7
|
+
color?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SelectionMenuProps {
|
|
11
|
+
triggerLabel: ReactNode;
|
|
12
|
+
options: SelectionMenuOption[];
|
|
13
|
+
selectedIds: string[];
|
|
14
|
+
multiSelect: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
onToggle: (optionId: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const selectionIndicator: (multiSelect: boolean, selected: boolean) => import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
export declare const selectionOptionIcon: (option: SelectionMenuOption | undefined, boxSize: string) => import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
/**
|
|
22
|
+
* The single dropdown behind every option picker in the editor — selection
|
|
23
|
+
* params and editable resource params alike. Sharing it is what keeps a
|
|
24
|
+
* resource attribute and a command param from drifting into two looks.
|
|
25
|
+
*
|
|
26
|
+
* Single-selects clear by re-picking the selected option; a dedicated "none"
|
|
27
|
+
* row would read as just another value to choose.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SelectionMenu: (props: SelectionMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VectorValue } from '../param-editor.types';
|
|
2
|
+
interface VectorInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: VectorValue;
|
|
7
|
+
xLabel?: string;
|
|
8
|
+
yLabel?: string;
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
onChange: (id: string, value: VectorValue) => void;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const VectorInput: (props: VectorInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VectorValue } from '../param-editor.types';
|
|
2
|
+
export interface VectorBounds {
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
}
|
|
6
|
+
/** Update a single axis without dropping the other, clamping into optional bounds. */
|
|
7
|
+
export declare const updateVectorAxis: (value: VectorValue, axis: "x" | "y", next: number, bounds?: VectorBounds) => VectorValue;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type ControlItemOrientation = "auto" | "inline" | "stacked";
|
|
3
|
+
interface ParamEditorControlItemProps {
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
hideLabel?: boolean;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
/** `auto` renders inline when compact and stacked when full-width. */
|
|
9
|
+
orientation?: ControlItemOrientation;
|
|
10
|
+
/** Rendered on the label row, right-aligned (e.g. an editable value readout). */
|
|
11
|
+
labelTrailing?: ReactNode;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const ParamEditorControlItem: (props: ParamEditorControlItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ParamEditorLabel as ParamEditorFieldLabel } from './param-editor-label';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Param, ParamValue, ParamValueMap, ResourceRefValue } from './param-editor.types';
|
|
2
|
+
interface ParamEditorFieldProps {
|
|
3
|
+
param: Param;
|
|
4
|
+
defaultValues: ParamValueMap;
|
|
5
|
+
onChange: (id: string, value: ParamValue) => void;
|
|
6
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const ParamEditorField: (props: ParamEditorFieldProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -6,5 +6,6 @@ export interface ParamEditorHorizontalProps {
|
|
|
6
6
|
onChange: (id: string, value: ParamValue) => void;
|
|
7
7
|
readOnly?: boolean;
|
|
8
8
|
fullWidth?: boolean;
|
|
9
|
+
variant?: "default" | "small";
|
|
9
10
|
}
|
|
10
11
|
export declare const ParamEditorHorizontal: (props: ParamEditorHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Param } from './param-editor.types';
|
|
2
|
+
interface ParamEditorReadOnlyFieldProps {
|
|
3
|
+
param: Extract<Param, {
|
|
4
|
+
type: "readOnly";
|
|
5
|
+
}>;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const ParamEditorReadOnlyField: (props: ParamEditorReadOnlyFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Param, ParamValue, ParamValueMap, ResourceRefValue } from './param-editor.types';
|
|
2
|
+
interface ParamEditorSectionProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
params: Param[];
|
|
6
|
+
defaultValues: ParamValueMap;
|
|
7
|
+
onChange: (id: string, value: ParamValue) => void;
|
|
8
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
collapsible?: boolean;
|
|
12
|
+
defaultCollapsed?: boolean;
|
|
13
|
+
isFirst?: boolean;
|
|
14
|
+
variant?: "default" | "small";
|
|
15
|
+
}
|
|
16
|
+
export declare const ParamEditorSection: (props: ParamEditorSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { InputGroup, Param, ParamValue, ParamValueMap } from './param-editor.types';
|
|
1
|
+
import { InputGroup, Param, ParamValue, ParamValueMap, ResourceRefValue } from './param-editor.types';
|
|
2
2
|
export interface ParamEditorProps {
|
|
3
3
|
params?: Param[];
|
|
4
4
|
groups?: InputGroup[];
|
|
5
5
|
defaultValues?: ParamValueMap;
|
|
6
6
|
onChange?: (id: string, value: ParamValue) => void;
|
|
7
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
7
8
|
readOnly?: boolean;
|
|
8
9
|
fullWidth?: boolean;
|
|
10
|
+
variant?: "default" | "small";
|
|
9
11
|
}
|
|
10
12
|
export declare const ParamEditor: (props: ParamEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,8 @@ export interface BaseParam {
|
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
/** Locks this one param while the rest of the editor stays editable. */
|
|
7
|
+
readOnly?: boolean;
|
|
6
8
|
}
|
|
7
9
|
export interface NumberParam extends BaseParam {
|
|
8
10
|
type: "number";
|
|
@@ -16,16 +18,26 @@ export interface TextParam extends BaseParam {
|
|
|
16
18
|
defaultValue: string;
|
|
17
19
|
singleLine?: boolean;
|
|
18
20
|
}
|
|
21
|
+
export interface SelectionOption {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
icon?: string;
|
|
25
|
+
/** Palette key (e.g. "blue") applied to the option's icon. */
|
|
26
|
+
color?: string;
|
|
27
|
+
}
|
|
19
28
|
export interface SelectionParam extends BaseParam {
|
|
20
29
|
type: "selection";
|
|
21
30
|
defaultValue: string | string[];
|
|
22
|
-
options:
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
icon?: string;
|
|
26
|
-
}[];
|
|
31
|
+
options: SelectionOption[];
|
|
27
32
|
multiSelect?: boolean;
|
|
28
33
|
placeholder?: string;
|
|
34
|
+
/** Adds a "clear" row so a single-select can be returned to unset. */
|
|
35
|
+
clearable?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Renders the control inert but still as a control — unlike `readOnly`, which
|
|
38
|
+
* collapses it to plain text and drops the option's icon.
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
29
41
|
}
|
|
30
42
|
export interface DateParam extends BaseParam {
|
|
31
43
|
type: "date";
|
|
@@ -41,20 +53,126 @@ export interface PropertyParam extends BaseParam {
|
|
|
41
53
|
type: "property";
|
|
42
54
|
value: ReactNode;
|
|
43
55
|
}
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
export interface ParamEditorReadOnlyImage {
|
|
57
|
+
src: string;
|
|
58
|
+
alt: string;
|
|
59
|
+
}
|
|
60
|
+
export type ParamEditorReadOnlyContent = string | number | boolean | null | Array<string | number | boolean | null> | {
|
|
61
|
+
type: "image";
|
|
62
|
+
src: string;
|
|
63
|
+
alt: string;
|
|
64
|
+
} | {
|
|
65
|
+
type: "image-gallery";
|
|
66
|
+
images: ParamEditorReadOnlyImage[];
|
|
67
|
+
};
|
|
68
|
+
/** Serializable display-only value rendered by the read-only Param Editor. */
|
|
69
|
+
export interface ReadOnlyParam extends BaseParam {
|
|
70
|
+
type: "readOnly";
|
|
71
|
+
value: ParamEditorReadOnlyContent;
|
|
72
|
+
}
|
|
73
|
+
/** A reference the host can open (e.g. another resource tab). */
|
|
74
|
+
export interface ResourceRefValue {
|
|
75
|
+
type: string;
|
|
76
|
+
id: string;
|
|
77
|
+
label?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Serializable resource chip. Clicking it opens `href` externally, opens `ref` via
|
|
81
|
+
* `onOpenResource`, or copies `copyText` to the clipboard — whichever is set.
|
|
82
|
+
*/
|
|
83
|
+
export interface ResourceOption {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
icon?: string;
|
|
87
|
+
color?: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
href?: string;
|
|
90
|
+
ref?: ResourceRefValue;
|
|
91
|
+
copyText?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Resource references rendered as tags/chips. View-only by default; set `editable`
|
|
95
|
+
* to pick from `options` via a dropdown. Value is the selected option id(s), mirroring
|
|
96
|
+
* {@link SelectionParam}, so it stays JSON-safe across the controls-command boundary.
|
|
97
|
+
*/
|
|
98
|
+
export interface ResourceParam extends BaseParam {
|
|
99
|
+
type: "resource";
|
|
100
|
+
defaultValue: string | string[];
|
|
101
|
+
options: ResourceOption[];
|
|
102
|
+
multiSelect?: boolean;
|
|
103
|
+
editable?: boolean;
|
|
104
|
+
placeholder?: string;
|
|
105
|
+
emptyText?: string;
|
|
106
|
+
}
|
|
107
|
+
export type RangeValue = [number, number];
|
|
108
|
+
/** Two-handle numeric range control. Values normalize to ordered `[start, end]`. */
|
|
109
|
+
export interface RangeParam extends BaseParam {
|
|
110
|
+
type: "range";
|
|
111
|
+
defaultValue: RangeValue;
|
|
112
|
+
min: number;
|
|
113
|
+
max: number;
|
|
114
|
+
step?: number;
|
|
115
|
+
unit?: string;
|
|
116
|
+
markerCount?: number;
|
|
117
|
+
}
|
|
118
|
+
export interface SegmentedOption {
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
icon?: string;
|
|
122
|
+
indicatorColor?: string;
|
|
123
|
+
}
|
|
124
|
+
/** Mutually-exclusive mode control rendered as a segmented button group. */
|
|
125
|
+
export interface SegmentedParam extends BaseParam {
|
|
126
|
+
type: "segmented";
|
|
127
|
+
defaultValue: string;
|
|
128
|
+
options: SegmentedOption[];
|
|
129
|
+
variant?: "default" | "dots";
|
|
130
|
+
}
|
|
131
|
+
export interface ActionOption {
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
icon?: string;
|
|
135
|
+
disabled?: boolean;
|
|
136
|
+
}
|
|
137
|
+
/** Compact command set rendered as an action button row. */
|
|
138
|
+
export interface ActionsParam extends BaseParam {
|
|
139
|
+
type: "actions";
|
|
140
|
+
defaultValue?: string;
|
|
141
|
+
options: ActionOption[];
|
|
49
142
|
}
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
143
|
+
export type AnchorGridValue = "top-left" | "top" | "top-right" | "left" | "center" | "right" | "bottom-left" | "bottom" | "bottom-right";
|
|
144
|
+
/** Nine-point alignment picker. */
|
|
145
|
+
export interface AnchorGridParam extends BaseParam {
|
|
146
|
+
type: "anchorGrid";
|
|
147
|
+
defaultValue: AnchorGridValue;
|
|
54
148
|
}
|
|
149
|
+
export interface VectorValue {
|
|
150
|
+
x: number;
|
|
151
|
+
y: number;
|
|
152
|
+
}
|
|
153
|
+
/** Paired x/y numeric control. */
|
|
55
154
|
export interface VectorParam extends BaseParam {
|
|
56
155
|
type: "vector";
|
|
57
|
-
defaultValue:
|
|
156
|
+
defaultValue: VectorValue;
|
|
157
|
+
coordinateMode?: "cartesian" | "screen";
|
|
158
|
+
xLabel?: string;
|
|
159
|
+
yLabel?: string;
|
|
160
|
+
min?: number;
|
|
161
|
+
max?: number;
|
|
162
|
+
step?: number;
|
|
163
|
+
}
|
|
164
|
+
/** File selection metadata. Not a live `File` object — hosts own persistence. */
|
|
165
|
+
export interface FileDropValue {
|
|
166
|
+
name: string;
|
|
167
|
+
mimeType?: string;
|
|
168
|
+
size?: number;
|
|
169
|
+
dataUrl?: string;
|
|
170
|
+
}
|
|
171
|
+
export interface FileDropParam extends BaseParam {
|
|
172
|
+
type: "fileDrop";
|
|
173
|
+
defaultValue: FileDropValue | null;
|
|
174
|
+
accept?: string;
|
|
175
|
+
assetKind?: "file" | "image";
|
|
58
176
|
}
|
|
59
177
|
export interface InputGroup {
|
|
60
178
|
id: string;
|
|
@@ -64,13 +182,6 @@ export interface InputGroup {
|
|
|
64
182
|
collapsible?: boolean;
|
|
65
183
|
defaultCollapsed?: boolean;
|
|
66
184
|
}
|
|
67
|
-
export type ParamValue = number | string | null |
|
|
68
|
-
export type Param = NumberParam | TextParam | SelectionParam | DateParam | ColorParam | PropertyParam |
|
|
185
|
+
export type ParamValue = number | string | null | string[] | RangeValue | VectorValue | FileDropValue;
|
|
186
|
+
export type Param = NumberParam | TextParam | SelectionParam | DateParam | ColorParam | PropertyParam | ReadOnlyParam | ResourceParam | RangeParam | SegmentedParam | ActionsParam | AnchorGridParam | VectorParam | FileDropParam;
|
|
69
187
|
export type ParamValueMap = Record<string, ParamValue>;
|
|
70
|
-
type WithOptionalDefault<T extends {
|
|
71
|
-
defaultValue: unknown;
|
|
72
|
-
}> = Omit<T, "defaultValue"> & {
|
|
73
|
-
defaultValue?: T["defaultValue"];
|
|
74
|
-
};
|
|
75
|
-
export type ParamConfig = WithOptionalDefault<NumberParam> | WithOptionalDefault<TextParam> | WithOptionalDefault<SelectionParam> | WithOptionalDefault<DateParam> | WithOptionalDefault<ColorParam> | WithOptionalDefault<ObjectParam> | WithOptionalDefault<ListParam> | WithOptionalDefault<VectorParam>;
|
|
76
|
-
export {};
|