@atmos.build/ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.js +40 -0
- package/dist/components/at-search.d.ts +35 -0
- package/dist/components/at-search.js +57 -0
- package/dist/components/attachment-thumbnail-stack.d.ts +13 -0
- package/dist/components/attachment-thumbnail-stack.js +23 -0
- package/dist/components/audio-preview.d.ts +33 -0
- package/dist/components/audio-preview.js +176 -0
- package/dist/components/avatar-uploader.d.ts +29 -0
- package/dist/components/avatar-uploader.js +67 -0
- package/dist/components/avatar.d.ts +12 -0
- package/dist/components/avatar.js +38 -0
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/badge.js +25 -0
- package/dist/components/button-group.d.ts +12 -0
- package/dist/components/button-group.js +29 -0
- package/dist/components/button.d.ts +10 -0
- package/dist/components/button.js +42 -0
- package/dist/components/calendar.d.ts +26 -0
- package/dist/components/calendar.js +154 -0
- package/dist/components/channel-list.d.ts +33 -0
- package/dist/components/channel-list.js +40 -0
- package/dist/components/charts/area-chart.d.ts +2 -0
- package/dist/components/charts/area-chart.js +5 -0
- package/dist/components/charts/bar-chart.d.ts +2 -0
- package/dist/components/charts/bar-chart.js +58 -0
- package/dist/components/charts/colors.d.ts +2 -0
- package/dist/components/charts/colors.js +42 -0
- package/dist/components/charts/hover.d.ts +20 -0
- package/dist/components/charts/hover.js +31 -0
- package/dist/components/charts/index.d.ts +10 -0
- package/dist/components/charts/index.js +9 -0
- package/dist/components/charts/layout.d.ts +35 -0
- package/dist/components/charts/layout.js +101 -0
- package/dist/components/charts/legend.d.ts +6 -0
- package/dist/components/charts/legend.js +7 -0
- package/dist/components/charts/line-area-chart.d.ts +4 -0
- package/dist/components/charts/line-area-chart.js +86 -0
- package/dist/components/charts/line-chart.d.ts +2 -0
- package/dist/components/charts/line-chart.js +5 -0
- package/dist/components/charts/pie-chart.d.ts +2 -0
- package/dist/components/charts/pie-chart.js +22 -0
- package/dist/components/charts/radar-chart.d.ts +2 -0
- package/dist/components/charts/radar-chart.js +29 -0
- package/dist/components/charts/radial-chart.d.ts +2 -0
- package/dist/components/charts/radial-chart.js +19 -0
- package/dist/components/charts/scatter-chart.d.ts +2 -0
- package/dist/components/charts/scatter-chart.js +16 -0
- package/dist/components/charts/story-data.d.ts +24 -0
- package/dist/components/charts/story-data.js +48 -0
- package/dist/components/charts/types.d.ts +43 -0
- package/dist/components/charts/types.js +1 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.js +10 -0
- package/dist/components/chip.d.ts +25 -0
- package/dist/components/chip.js +36 -0
- package/dist/components/code-editor-theme.d.ts +19 -0
- package/dist/components/code-editor-theme.js +100 -0
- package/dist/components/collapsible-section-header.d.ts +82 -0
- package/dist/components/collapsible-section-header.js +82 -0
- package/dist/components/collection-view/collection-view-group-settings.d.ts +73 -0
- package/dist/components/collection-view/collection-view-group-settings.js +55 -0
- package/dist/components/collection-view/collection-view-settings.d.ts +115 -0
- package/dist/components/collection-view/collection-view-settings.js +146 -0
- package/dist/components/collection-view/collection-view.d.ts +87 -0
- package/dist/components/collection-view/collection-view.js +95 -0
- package/dist/components/collection-view/index.d.ts +6 -0
- package/dist/components/collection-view/index.js +6 -0
- package/dist/components/collection-view/use-collection-detail-navigation.d.ts +11 -0
- package/dist/components/collection-view/use-collection-detail-navigation.js +12 -0
- package/dist/components/collection-view/use-collection-escape.d.ts +9 -0
- package/dist/components/collection-view/use-collection-escape.js +20 -0
- package/dist/components/collection-view/use-collection-selection.d.ts +42 -0
- package/dist/components/collection-view/use-collection-selection.js +203 -0
- package/dist/components/color-picker.d.ts +18 -0
- package/dist/components/color-picker.js +77 -0
- package/dist/components/color-swatch-list.d.ts +16 -0
- package/dist/components/color-swatch-list.js +60 -0
- package/dist/components/combobox/combobox.d.ts +4 -0
- package/dist/components/combobox/combobox.js +70 -0
- package/dist/components/combobox/compound.d.ts +68 -0
- package/dist/components/combobox/compound.js +151 -0
- package/dist/components/combobox/context.d.ts +34 -0
- package/dist/components/combobox/context.js +123 -0
- package/dist/components/combobox/create-step.d.ts +12 -0
- package/dist/components/combobox/create-step.js +8 -0
- package/dist/components/combobox/index.d.ts +10 -0
- package/dist/components/combobox/index.js +5 -0
- package/dist/components/combobox/inline-create-form.d.ts +24 -0
- package/dist/components/combobox/inline-create-form.js +43 -0
- package/dist/components/combobox/types.d.ts +57 -0
- package/dist/components/combobox/types.js +10 -0
- package/dist/components/command.d.ts +35 -0
- package/dist/components/command.js +76 -0
- package/dist/components/comment-pin.d.ts +13 -0
- package/dist/components/comment-pin.js +33 -0
- package/dist/components/confidence-meter.d.ts +11 -0
- package/dist/components/confidence-meter.js +24 -0
- package/dist/components/context-menu.d.ts +31 -0
- package/dist/components/context-menu.js +54 -0
- package/dist/components/copy-button.d.ts +12 -0
- package/dist/components/copy-button.js +32 -0
- package/dist/components/date-picker.d.ts +29 -0
- package/dist/components/date-picker.js +86 -0
- package/dist/components/date-tile.d.ts +11 -0
- package/dist/components/date-tile.js +16 -0
- package/dist/components/date-time-picker.d.ts +25 -0
- package/dist/components/date-time-picker.js +153 -0
- package/dist/components/detail-breadcrumb-utils.d.ts +2 -0
- package/dist/components/detail-breadcrumb-utils.js +18 -0
- package/dist/components/detail-nav-bar.d.ts +28 -0
- package/dist/components/detail-nav-bar.js +28 -0
- package/dist/components/detail-top-bar.d.ts +49 -0
- package/dist/components/detail-top-bar.js +41 -0
- package/dist/components/dialog.d.ts +22 -0
- package/dist/components/dialog.js +51 -0
- package/dist/components/dropdown-menu.d.ts +29 -0
- package/dist/components/dropdown-menu.js +52 -0
- package/dist/components/editable-doc-title.d.ts +17 -0
- package/dist/components/editable-doc-title.js +147 -0
- package/dist/components/empty-state.d.ts +12 -0
- package/dist/components/empty-state.js +6 -0
- package/dist/components/filter-condition-editor.d.ts +18 -0
- package/dist/components/filter-condition-editor.js +102 -0
- package/dist/components/form-dialog.d.ts +30 -0
- package/dist/components/form-dialog.js +52 -0
- package/dist/components/formula-editor.d.ts +18 -0
- package/dist/components/formula-editor.js +154 -0
- package/dist/components/hover-card.d.ts +52 -0
- package/dist/components/hover-card.js +51 -0
- package/dist/components/icon-button.d.ts +15 -0
- package/dist/components/icon-button.js +18 -0
- package/dist/components/inline-alert.d.ts +11 -0
- package/dist/components/inline-alert.js +17 -0
- package/dist/components/input.d.ts +3 -0
- package/dist/components/input.js +7 -0
- package/dist/components/kanban-board.d.ts +27 -0
- package/dist/components/kanban-board.js +145 -0
- package/dist/components/kbd.d.ts +3 -0
- package/dist/components/kbd.js +8 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.js +9 -0
- package/dist/components/markdown-editor/index.d.ts +4 -0
- package/dist/components/markdown-editor/index.js +2 -0
- package/dist/components/markdown-editor/markdown-editor.d.ts +16 -0
- package/dist/components/markdown-editor/markdown-editor.js +53 -0
- package/dist/components/markdown-editor/serialize.d.ts +12 -0
- package/dist/components/markdown-editor/serialize.js +122 -0
- package/dist/components/markdown-editor/vim.d.ts +8 -0
- package/dist/components/markdown-editor/vim.js +394 -0
- package/dist/components/metric-grid.d.ts +41 -0
- package/dist/components/metric-grid.js +39 -0
- package/dist/components/microphone-priority.d.ts +29 -0
- package/dist/components/microphone-priority.js +15 -0
- package/dist/components/middle-truncate.d.ts +6 -0
- package/dist/components/middle-truncate.js +15 -0
- package/dist/components/multi-combobox.d.ts +48 -0
- package/dist/components/multi-combobox.js +221 -0
- package/dist/components/naut-avatar-engine.d.ts +83 -0
- package/dist/components/naut-avatar-engine.js +803 -0
- package/dist/components/naut-avatar.d.ts +31 -0
- package/dist/components/naut-avatar.js +108 -0
- package/dist/components/navigable-list.d.ts +4 -0
- package/dist/components/navigable-list.js +20 -0
- package/dist/components/note-icon-picker.d.ts +20 -0
- package/dist/components/note-icon-picker.js +84 -0
- package/dist/components/note-icon.d.ts +690 -0
- package/dist/components/note-icon.js +353 -0
- package/dist/components/note-row.d.ts +33 -0
- package/dist/components/note-row.js +29 -0
- package/dist/components/overlapping-dots.d.ts +10 -0
- package/dist/components/overlapping-dots.js +13 -0
- package/dist/components/overview-card.d.ts +12 -0
- package/dist/components/overview-card.js +9 -0
- package/dist/components/panel-header.d.ts +8 -0
- package/dist/components/panel-header.js +6 -0
- package/dist/components/panel-section-states.d.ts +9 -0
- package/dist/components/panel-section-states.js +10 -0
- package/dist/components/person-avatar.d.ts +10 -0
- package/dist/components/person-avatar.js +23 -0
- package/dist/components/photo-avatar.d.ts +11 -0
- package/dist/components/photo-avatar.js +24 -0
- package/dist/components/picker-field.d.ts +23 -0
- package/dist/components/picker-field.js +24 -0
- package/dist/components/popover-stack.d.ts +26 -0
- package/dist/components/popover-stack.js +89 -0
- package/dist/components/popover.d.ts +12 -0
- package/dist/components/popover.js +31 -0
- package/dist/components/portal-login-barrier.d.ts +12 -0
- package/dist/components/portal-login-barrier.js +41 -0
- package/dist/components/presence-dot.d.ts +8 -0
- package/dist/components/presence-dot.js +15 -0
- package/dist/components/presence-overlay.d.ts +27 -0
- package/dist/components/presence-overlay.js +34 -0
- package/dist/components/property-list.d.ts +64 -0
- package/dist/components/property-list.js +313 -0
- package/dist/components/property-panel.d.ts +54 -0
- package/dist/components/property-panel.js +87 -0
- package/dist/components/property-selector.d.ts +36 -0
- package/dist/components/property-selector.js +141 -0
- package/dist/components/provenance-chip.d.ts +12 -0
- package/dist/components/provenance-chip.js +17 -0
- package/dist/components/qr-code.d.ts +13 -0
- package/dist/components/qr-code.js +42 -0
- package/dist/components/qr-encode.d.ts +2 -0
- package/dist/components/qr-encode.js +469 -0
- package/dist/components/quantity-stepper.d.ts +25 -0
- package/dist/components/quantity-stepper.js +43 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.js +13 -0
- package/dist/components/rename-dialog.d.ts +19 -0
- package/dist/components/rename-dialog.js +35 -0
- package/dist/components/row-surface.d.ts +1 -0
- package/dist/components/row-surface.js +5 -0
- package/dist/components/row-trailing.d.ts +30 -0
- package/dist/components/row-trailing.js +59 -0
- package/dist/components/run-status-badge.d.ts +16 -0
- package/dist/components/run-status-badge.js +43 -0
- package/dist/components/scroll-area.d.ts +5 -0
- package/dist/components/scroll-area.js +12 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +39 -0
- package/dist/components/selectable-card.d.ts +33 -0
- package/dist/components/selectable-card.js +66 -0
- package/dist/components/separator.d.ts +3 -0
- package/dist/components/separator.js +8 -0
- package/dist/components/settings-dialog-shell.d.ts +46 -0
- package/dist/components/settings-dialog-shell.js +48 -0
- package/dist/components/shimmer-text.d.ts +8 -0
- package/dist/components/shimmer-text.js +26 -0
- package/dist/components/side-panel-tokens.d.ts +27 -0
- package/dist/components/side-panel-tokens.js +26 -0
- package/dist/components/side-panel.d.ts +94 -0
- package/dist/components/side-panel.js +106 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +6 -0
- package/dist/components/sortable.d.ts +65 -0
- package/dist/components/sortable.js +110 -0
- package/dist/components/spec-strip.d.ts +18 -0
- package/dist/components/spec-strip.js +15 -0
- package/dist/components/speech-playback.d.ts +25 -0
- package/dist/components/speech-playback.js +35 -0
- package/dist/components/sql-editor.d.ts +13 -0
- package/dist/components/sql-editor.js +228 -0
- package/dist/components/stat-tile.d.ts +7 -0
- package/dist/components/stat-tile.js +6 -0
- package/dist/components/status-badge.d.ts +17 -0
- package/dist/components/status-badge.js +8 -0
- package/dist/components/status-tone.d.ts +9 -0
- package/dist/components/status-tone.js +10 -0
- package/dist/components/sticky-header-fade.d.ts +8 -0
- package/dist/components/sticky-header-fade.js +11 -0
- package/dist/components/swatch-button.d.ts +14 -0
- package/dist/components/swatch-button.js +25 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +9 -0
- package/dist/components/system-load/index.d.ts +6 -0
- package/dist/components/system-load/index.js +6 -0
- package/dist/components/system-load/load-block.d.ts +20 -0
- package/dist/components/system-load/load-block.js +23 -0
- package/dist/components/system-load/load-grid.d.ts +16 -0
- package/dist/components/system-load/load-grid.js +23 -0
- package/dist/components/system-load/load-meter.d.ts +25 -0
- package/dist/components/system-load/load-meter.js +29 -0
- package/dist/components/system-load/load-tone.d.ts +21 -0
- package/dist/components/system-load/load-tone.js +29 -0
- package/dist/components/system-load/meter-row.d.ts +31 -0
- package/dist/components/system-load/meter-row.js +29 -0
- package/dist/components/system-load/resource-meter.d.ts +19 -0
- package/dist/components/system-load/resource-meter.js +15 -0
- package/dist/components/tab-title-bar.d.ts +12 -0
- package/dist/components/tab-title-bar.js +9 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.js +29 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.js +97 -0
- package/dist/components/template-chip-input.d.ts +36 -0
- package/dist/components/template-chip-input.js +271 -0
- package/dist/components/template-input.d.ts +24 -0
- package/dist/components/template-input.js +57 -0
- package/dist/components/terminal-spinner.d.ts +11 -0
- package/dist/components/terminal-spinner.js +48 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.js +7 -0
- package/dist/components/time-column.d.ts +24 -0
- package/dist/components/time-column.js +60 -0
- package/dist/components/timestamped-transcript.d.ts +38 -0
- package/dist/components/timestamped-transcript.js +29 -0
- package/dist/components/timezone-picker.d.ts +22 -0
- package/dist/components/timezone-picker.js +60 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +29 -0
- package/dist/components/transcription-overlay.d.ts +47 -0
- package/dist/components/transcription-overlay.js +30 -0
- package/dist/components/usage-bar.d.ts +17 -0
- package/dist/components/usage-bar.js +26 -0
- package/dist/components/view-query-bar.d.ts +13 -0
- package/dist/components/view-query-bar.js +13 -0
- package/dist/components/view-query-controls.d.ts +159 -0
- package/dist/components/view-query-controls.js +109 -0
- package/dist/components/view-save-menu.d.ts +20 -0
- package/dist/components/view-save-menu.js +13 -0
- package/dist/components/view-sort-editor.d.ts +40 -0
- package/dist/components/view-sort-editor.js +47 -0
- package/dist/components/voice-line.d.ts +37 -0
- package/dist/components/voice-line.js +293 -0
- package/dist/components/weekly-schedule-editor.d.ts +15 -0
- package/dist/components/weekly-schedule-editor.js +28 -0
- package/dist/flow/canvas/canvas-frame.d.ts +160 -0
- package/dist/flow/canvas/canvas-frame.js +521 -0
- package/dist/flow/canvas/collaborator-layer.d.ts +12 -0
- package/dist/flow/canvas/collaborator-layer.js +43 -0
- package/dist/flow/canvas/connector-edge.d.ts +22 -0
- package/dist/flow/canvas/connector-edge.js +61 -0
- package/dist/flow/canvas/editor-context.d.ts +23 -0
- package/dist/flow/canvas/editor-context.js +6 -0
- package/dist/flow/canvas/graph-core.d.ts +60 -0
- package/dist/flow/canvas/graph-core.js +296 -0
- package/dist/flow/canvas/minimap-sticky-overlay.d.ts +4 -0
- package/dist/flow/canvas/minimap-sticky-overlay.js +45 -0
- package/dist/flow/canvas/node-card.d.ts +46 -0
- package/dist/flow/canvas/node-card.js +56 -0
- package/dist/flow/canvas/node-library.d.ts +40 -0
- package/dist/flow/canvas/node-library.js +54 -0
- package/dist/flow/canvas/sticky-notes.d.ts +25 -0
- package/dist/flow/canvas/sticky-notes.js +101 -0
- package/dist/flow/collaborative-graph-presence.d.ts +28 -0
- package/dist/flow/collaborative-graph-presence.js +55 -0
- package/dist/flow/collaborative-graph-sync.d.ts +40 -0
- package/dist/flow/collaborative-graph-sync.js +127 -0
- package/dist/flow/editor/adapter.d.ts +64 -0
- package/dist/flow/editor/adapter.js +1 -0
- package/dist/flow/editor/command-registry.d.ts +10 -0
- package/dist/flow/editor/command-registry.js +35 -0
- package/dist/flow/editor/dag-canvas.d.ts +18 -0
- package/dist/flow/editor/dag-canvas.js +33 -0
- package/dist/flow/editor/flow-editor.d.ts +54 -0
- package/dist/flow/editor/flow-editor.js +199 -0
- package/dist/flow/editor/issues-popover.d.ts +11 -0
- package/dist/flow/editor/issues-popover.js +70 -0
- package/dist/flow/editor/library-rail.d.ts +19 -0
- package/dist/flow/editor/library-rail.js +25 -0
- package/dist/flow/editor/make-controller.d.ts +18 -0
- package/dist/flow/editor/make-controller.js +44 -0
- package/dist/flow/editor/node-chip.d.ts +2 -0
- package/dist/flow/editor/node-chip.js +16 -0
- package/dist/flow/editor/save-publish-bar.d.ts +27 -0
- package/dist/flow/editor/save-publish-bar.js +14 -0
- package/dist/flow/editor/settings-dialog.d.ts +11 -0
- package/dist/flow/editor/settings-dialog.js +11 -0
- package/dist/flow/editor/settings-shell.d.ts +21 -0
- package/dist/flow/editor/settings-shell.js +20 -0
- package/dist/flow/editor/side-rail.d.ts +22 -0
- package/dist/flow/editor/side-rail.js +15 -0
- package/dist/flow/editor/use-dag-editor.d.ts +94 -0
- package/dist/flow/editor/use-dag-editor.js +502 -0
- package/dist/flow/index.d.ts +25 -0
- package/dist/flow/index.js +25 -0
- package/dist/flow/presence-motion.d.ts +10 -0
- package/dist/flow/presence-motion.js +88 -0
- package/dist/flow/styles.css +1 -0
- package/dist/flow/use-collaborative-graph.d.ts +61 -0
- package/dist/flow/use-collaborative-graph.js +396 -0
- package/dist/flow/use-debounced-value.d.ts +1 -0
- package/dist/flow/use-debounced-value.js +10 -0
- package/dist/hooks/use-detail-nav.d.ts +11 -0
- package/dist/hooks/use-detail-nav.js +49 -0
- package/dist/hooks/use-flush-on-hide.d.ts +1 -0
- package/dist/hooks/use-flush-on-hide.js +21 -0
- package/dist/hooks/use-media-query.d.ts +1 -0
- package/dist/hooks/use-media-query.js +20 -0
- package/dist/hooks/use-virtualizer.d.ts +1 -0
- package/dist/hooks/use-virtualizer.js +1 -0
- package/dist/index.d.ts +139 -0
- package/dist/index.js +139 -0
- package/dist/lib/brand-style.d.ts +6 -0
- package/dist/lib/brand-style.js +16 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/cn.js +5 -0
- package/dist/lib/composited-glint.d.ts +7 -0
- package/dist/lib/composited-glint.js +98 -0
- package/dist/lib/date-time-format.d.ts +2 -0
- package/dist/lib/date-time-format.js +21 -0
- package/dist/lib/disclosure-state.d.ts +11 -0
- package/dist/lib/disclosure-state.js +22 -0
- package/dist/lib/label-swatches.d.ts +10 -0
- package/dist/lib/label-swatches.js +24 -0
- package/dist/lib/local-ui-state.d.ts +10 -0
- package/dist/lib/local-ui-state.js +95 -0
- package/dist/lib/parse-loose-datetime.d.ts +1 -0
- package/dist/lib/parse-loose-datetime.js +180 -0
- package/dist/lib/parse-loose-time.d.ts +6 -0
- package/dist/lib/parse-loose-time.js +53 -0
- package/dist/lib/parse-loose.d.ts +1 -0
- package/dist/lib/parse-loose.js +170 -0
- package/dist/lib/react-19-jsx.d.ts +8 -0
- package/dist/lib/react-19-jsx.js +1 -0
- package/dist/lib/view-chrome.d.ts +5 -0
- package/dist/lib/view-chrome.js +5 -0
- package/dist/lib/view-query/config.d.ts +26 -0
- package/dist/lib/view-query/config.js +162 -0
- package/dist/lib/view-query/evaluate.d.ts +11 -0
- package/dist/lib/view-query/evaluate.js +196 -0
- package/dist/lib/view-query/group-order.d.ts +25 -0
- package/dist/lib/view-query/group-order.js +49 -0
- package/dist/lib/view-query/index.d.ts +6 -0
- package/dist/lib/view-query/index.js +6 -0
- package/dist/lib/view-query/model.d.ts +34 -0
- package/dist/lib/view-query/model.js +88 -0
- package/dist/lib/view-query/sort.d.ts +7 -0
- package/dist/lib/view-query/sort.js +30 -0
- package/dist/lib/view-query/types.d.ts +70 -0
- package/dist/lib/view-query/types.js +12 -0
- package/dist/lib/weekly-schedule.d.ts +8 -0
- package/dist/lib/weekly-schedule.js +10 -0
- package/dist/mcp-app/index.d.ts +4 -0
- package/dist/mcp-app/index.js +3 -0
- package/dist/mcp-app/shadcn.css +629 -0
- package/dist/mcp-app/styles.css +72 -0
- package/dist/mcp-app/theme.d.ts +2 -0
- package/dist/mcp-app/theme.js +62 -0
- package/dist/mcp-app/use-atmos-mcp-app.d.ts +109 -0
- package/dist/mcp-app/use-atmos-mcp-app.js +30 -0
- package/dist/mcp-app/vite.d.ts +7 -0
- package/dist/mcp-app/vite.js +30 -0
- package/dist/tokens/index.d.ts +7 -0
- package/dist/tokens/index.js +7 -0
- package/dist/tokens/semantic.css +110 -0
- package/dist/tokens/tokens.css +195 -0
- package/package.json +98 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type ComponentType, type ComponentPropsWithoutRef, type ElementRef, type ForwardRefExoticComponent, type RefAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { Button } from './button.js';
|
|
3
|
+
import { Separator } from './separator.js';
|
|
4
|
+
import { CollapsibleSectionHeader } from './collapsible-section-header.js';
|
|
5
|
+
import { type IconButtonProps } from './icon-button.js';
|
|
6
|
+
import { type PanelHeaderProps } from './panel-header.js';
|
|
7
|
+
interface SidePanelScrollPort {
|
|
8
|
+
element: HTMLElement | null;
|
|
9
|
+
}
|
|
10
|
+
export type SidePanelScrollProps = ComponentPropsWithoutRef<'div'>;
|
|
11
|
+
/**
|
|
12
|
+
* The single scroll port for a side panel. Wrapping a panel in one moves its whole contents —
|
|
13
|
+
* actions, section labels and rows alike — past whatever the shell pins above it, instead of
|
|
14
|
+
* leaving each list to scroll inside its own well below fixed chrome.
|
|
15
|
+
*/
|
|
16
|
+
export declare function SidePanelScroll({ className, ...props }: SidePanelScrollProps): import("react").JSX.Element;
|
|
17
|
+
/** The element a panel actually scrolls in, for readers that must measure or listen to it. */
|
|
18
|
+
export declare function useSidePanelScrollPort(): SidePanelScrollPort | null;
|
|
19
|
+
export type SidePanelProps = ComponentPropsWithoutRef<'div'>;
|
|
20
|
+
export declare const SidePanel: ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export type SidePanelHeaderProps = PanelHeaderProps;
|
|
22
|
+
export declare function SidePanelHeader({ className, ...props }: SidePanelHeaderProps): import("react").JSX.Element;
|
|
23
|
+
export interface SidePanelSectionLabelProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
24
|
+
label: ReactNode;
|
|
25
|
+
actions?: ReactNode;
|
|
26
|
+
labelClassName?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function SidePanelSectionLabel({ label, actions, labelClassName, className, ...props }: SidePanelSectionLabelProps): import("react").JSX.Element;
|
|
29
|
+
export type SidePanelActionBarProps = ComponentPropsWithoutRef<'div'>;
|
|
30
|
+
export declare const SidePanelActionBar: ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export interface SidePanelBodyProps extends ComponentPropsWithoutRef<'div'> {
|
|
32
|
+
scroll?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare const SidePanelBody: ForwardRefExoticComponent<SidePanelBodyProps & RefAttributes<HTMLDivElement>>;
|
|
35
|
+
export interface SidePanelFooterProps extends ComponentPropsWithoutRef<'div'> {
|
|
36
|
+
chromeFont?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare const SidePanelFooter: ForwardRefExoticComponent<SidePanelFooterProps & RefAttributes<HTMLDivElement>>;
|
|
39
|
+
export interface SidePanelSectionProps extends ComponentPropsWithoutRef<'section'> {
|
|
40
|
+
spacing?: 'none' | 'compact' | 'default';
|
|
41
|
+
/** Names the section so this browser reopens it the way its reader left it. */
|
|
42
|
+
sectionId?: string;
|
|
43
|
+
defaultOpen?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare const SidePanelSection: ForwardRefExoticComponent<SidePanelSectionProps & RefAttributes<HTMLElement>>;
|
|
46
|
+
type OmitEach<Member, Keys extends PropertyKey> = Member extends unknown ? Omit<Member, Keys> : never;
|
|
47
|
+
export type SidePanelSectionHeaderProps = OmitEach<ComponentPropsWithoutRef<typeof CollapsibleSectionHeader>, 'open' | 'onToggle'> & {
|
|
48
|
+
open?: boolean;
|
|
49
|
+
onOpenChange?: (open: boolean) => void;
|
|
50
|
+
};
|
|
51
|
+
export declare function SidePanelSectionHeader({ open, onOpenChange, labelClassName, className, ...props }: SidePanelSectionHeaderProps): import("react").JSX.Element;
|
|
52
|
+
export interface SidePanelSectionPlaceholderProps extends ComponentPropsWithoutRef<'div'> {
|
|
53
|
+
chromeFont?: string;
|
|
54
|
+
}
|
|
55
|
+
export declare const SidePanelSectionPlaceholder: ForwardRefExoticComponent<SidePanelSectionPlaceholderProps & RefAttributes<HTMLDivElement>>;
|
|
56
|
+
export interface SidePanelSectionBodyProps extends Omit<ComponentPropsWithoutRef<'div'>, 'placeholder'> {
|
|
57
|
+
open?: boolean;
|
|
58
|
+
isEmpty?: boolean;
|
|
59
|
+
placeholder?: ReactNode;
|
|
60
|
+
placeholderClassName?: string;
|
|
61
|
+
contentClassName?: string;
|
|
62
|
+
chromeFont?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare const SidePanelSectionBody: ForwardRefExoticComponent<SidePanelSectionBodyProps & RefAttributes<HTMLDivElement>>;
|
|
65
|
+
export interface SidePanelItemClassOptions {
|
|
66
|
+
active?: boolean;
|
|
67
|
+
className?: string;
|
|
68
|
+
}
|
|
69
|
+
export declare function sidePanelItemClassName({ active, className, }?: SidePanelItemClassOptions): string;
|
|
70
|
+
export interface SidePanelItemProps extends ComponentPropsWithoutRef<'button'> {
|
|
71
|
+
active?: boolean;
|
|
72
|
+
leading?: ReactNode;
|
|
73
|
+
trailing?: ReactNode;
|
|
74
|
+
}
|
|
75
|
+
export declare const SidePanelItem: ForwardRefExoticComponent<SidePanelItemProps & RefAttributes<HTMLButtonElement>>;
|
|
76
|
+
export type SidePanelActionListProps = ComponentPropsWithoutRef<'div'>;
|
|
77
|
+
export declare const SidePanelActionList: ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
78
|
+
export type SidePanelSeparatorProps = ComponentPropsWithoutRef<typeof Separator>;
|
|
79
|
+
export declare const SidePanelSeparator: ForwardRefExoticComponent<SidePanelSeparatorProps & RefAttributes<ElementRef<typeof Separator>>>;
|
|
80
|
+
type SidePanelActionIcon = ComponentType<{
|
|
81
|
+
className?: string;
|
|
82
|
+
strokeWidth?: number;
|
|
83
|
+
'aria-hidden'?: boolean;
|
|
84
|
+
}>;
|
|
85
|
+
export interface SidePanelActionButtonProps extends Omit<ComponentPropsWithoutRef<typeof Button>, 'children'> {
|
|
86
|
+
icon: SidePanelActionIcon;
|
|
87
|
+
/** Set on an action that names a destination the panel is currently showing. */
|
|
88
|
+
active?: boolean;
|
|
89
|
+
children: ReactNode;
|
|
90
|
+
}
|
|
91
|
+
export declare const SidePanelActionButton: ForwardRefExoticComponent<SidePanelActionButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
92
|
+
export type SidePanelIconButtonProps = IconButtonProps;
|
|
93
|
+
export declare function SidePanelIconButton({ tooltip, title, 'aria-label': ariaLabel, ...props }: SidePanelIconButtonProps): import("react").JSX.Element;
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Children, createContext, forwardRef, useContext, useMemo, useState, } from 'react';
|
|
4
|
+
import { Button } from './button.js';
|
|
5
|
+
import { Separator } from './separator.js';
|
|
6
|
+
import { cn } from '../lib/cn.js';
|
|
7
|
+
import { CollapsibleSectionContent, CollapsibleSectionHeader } from './collapsible-section-header.js';
|
|
8
|
+
import { useDisclosureState } from '../lib/disclosure-state.js';
|
|
9
|
+
import { IconButton } from './icon-button.js';
|
|
10
|
+
import { PanelHeader } from './panel-header.js';
|
|
11
|
+
import { sidePanelRowClassName } from './side-panel-tokens.js';
|
|
12
|
+
import { NavigableList, NavigableListItem } from './navigable-list.js';
|
|
13
|
+
const SidePanelScrollContext = createContext(null);
|
|
14
|
+
/**
|
|
15
|
+
* The single scroll port for a side panel. Wrapping a panel in one moves its whole contents —
|
|
16
|
+
* actions, section labels and rows alike — past whatever the shell pins above it, instead of
|
|
17
|
+
* leaving each list to scroll inside its own well below fixed chrome.
|
|
18
|
+
*/
|
|
19
|
+
export function SidePanelScroll({ className, ...props }) {
|
|
20
|
+
const [element, setElement] = useState(null);
|
|
21
|
+
const port = useMemo(() => ({ element }), [element]);
|
|
22
|
+
return (_jsx(SidePanelScrollContext.Provider, { value: port, children: _jsx("div", { ref: setElement, "data-slot": "side-panel-scroll", className: cn('relative min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain', className), ...props }) }));
|
|
23
|
+
}
|
|
24
|
+
/** The element a panel actually scrolls in, for readers that must measure or listen to it. */
|
|
25
|
+
export function useSidePanelScrollPort() {
|
|
26
|
+
return useContext(SidePanelScrollContext);
|
|
27
|
+
}
|
|
28
|
+
export const SidePanel = forwardRef(function SidePanel({ className, ...props }, ref) {
|
|
29
|
+
const scrolledByShell = useContext(SidePanelScrollContext) !== null;
|
|
30
|
+
return (_jsx("div", { ref: ref, "data-slot": "side-panel", className: cn(scrolledByShell ? 'block' : 'flex h-full min-h-0 flex-col overflow-hidden', className), ...props }));
|
|
31
|
+
});
|
|
32
|
+
export function SidePanelHeader({ className, ...props }) {
|
|
33
|
+
return _jsx(PanelHeader, { "data-slot": "side-panel-header", className: className, ...props });
|
|
34
|
+
}
|
|
35
|
+
export function SidePanelSectionLabel({ label, actions, labelClassName, className, ...props }) {
|
|
36
|
+
return (_jsxs("div", { "data-slot": "side-panel-section-label", className: cn('text-muted-foreground/75 flex h-7 shrink-0 items-center px-3 text-[11px] font-medium', className), ...props, children: [_jsx("span", { className: cn('min-w-0 flex-1 truncate', labelClassName), children: label }), actions ? _jsx("div", { className: "-mr-1 ml-auto flex items-center gap-0.5", children: actions }) : null] }));
|
|
37
|
+
}
|
|
38
|
+
export const SidePanelActionBar = forwardRef(function SidePanelActionBar({ className, ...props }, ref) {
|
|
39
|
+
return (_jsx("div", { ref: ref, "data-slot": "side-panel-action-bar", className: cn('flex items-center gap-0.5', className), ...props }));
|
|
40
|
+
});
|
|
41
|
+
export const SidePanelBody = forwardRef(function SidePanelBody({ className, scroll = true, ...props }, ref) {
|
|
42
|
+
const scrolledByShell = useContext(SidePanelScrollContext) !== null;
|
|
43
|
+
return (_jsx(NavigableList, { asChild: true, children: _jsx("div", { ref: ref, "data-slot": "side-panel-body", "data-navigable-list": true, className: cn('min-h-0 min-w-0 flex-1 px-1 pb-2', scroll && !scrolledByShell && 'overflow-y-auto overscroll-contain', className), ...props }) }));
|
|
44
|
+
});
|
|
45
|
+
export const SidePanelFooter = forwardRef(function SidePanelFooter({ className, chromeFont, ...props }, ref) {
|
|
46
|
+
return (_jsx("div", { ref: ref, "data-slot": "side-panel-footer", className: cn('border-border/40 text-muted-foreground/80 flex h-7 shrink-0 items-center border-t px-3 font-mono text-[10.5px] tabular-nums', chromeFont, className), ...props }));
|
|
47
|
+
});
|
|
48
|
+
const SidePanelSectionContext = createContext(null);
|
|
49
|
+
/**
|
|
50
|
+
* A header or body reads the state its enclosing section keeps, unless the call site drives
|
|
51
|
+
* the section itself and passes `open` in.
|
|
52
|
+
*/
|
|
53
|
+
function useSidePanelSectionDisclosure({ open, onOpenChange, }) {
|
|
54
|
+
const section = useContext(SidePanelSectionContext);
|
|
55
|
+
return {
|
|
56
|
+
open: open ?? section?.open ?? true,
|
|
57
|
+
setOpen: onOpenChange ?? section?.setOpen ?? (() => { }),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export const SidePanelSection = forwardRef(function SidePanelSection({ className, spacing = 'default', sectionId, defaultOpen = true, children, ...props }, ref) {
|
|
61
|
+
const { open, setOpen } = useDisclosureState(sectionId, defaultOpen);
|
|
62
|
+
const disclosure = useMemo(() => ({ open, setOpen }), [open, setOpen]);
|
|
63
|
+
return (_jsx(SidePanelSectionContext.Provider, { value: disclosure, children: _jsx("section", { ref: ref, "data-slot": "side-panel-section", "data-section-id": sectionId, className: cn(spacing === 'compact' && 'mt-3', spacing === 'default' && 'mt-4', className), ...props, children: children }) }));
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* A section's own inset matches the one SidePanelSectionBody puts around its rows, so a
|
|
67
|
+
* header and the rows it heads share a left edge instead of stepping by a hair.
|
|
68
|
+
*/
|
|
69
|
+
const sectionHeaderInsetClassName = 'mx-0.5 w-[calc(100%-0.25rem)]';
|
|
70
|
+
export function SidePanelSectionHeader({ open, onOpenChange, labelClassName, className, ...props }) {
|
|
71
|
+
const section = useSidePanelSectionDisclosure({ open, onOpenChange });
|
|
72
|
+
return (_jsx(CollapsibleSectionHeader, { open: section.open, onToggle: () => section.setOpen(!section.open), labelClassName: labelClassName, className: cn(sectionHeaderInsetClassName, className), ...props }));
|
|
73
|
+
}
|
|
74
|
+
export const SidePanelSectionPlaceholder = forwardRef(function SidePanelSectionPlaceholder({ className, chromeFont, ...props }, ref) {
|
|
75
|
+
return (_jsx("div", { ref: ref, "data-slot": "side-panel-section-placeholder", className: cn('text-muted-foreground/60 px-4 py-1 text-[11px]', chromeFont, className), ...props }));
|
|
76
|
+
});
|
|
77
|
+
export const SidePanelSectionBody = forwardRef(function SidePanelSectionBody({ className, open, children, isEmpty, placeholder, placeholderClassName, contentClassName, chromeFont, ...props }, ref) {
|
|
78
|
+
const showPlaceholder = placeholder !== undefined && (isEmpty ?? Children.toArray(children).length === 0);
|
|
79
|
+
const section = useSidePanelSectionDisclosure({ open });
|
|
80
|
+
return (_jsx(CollapsibleSectionContent, { ref: ref, "data-slot": "side-panel-section-body", open: section.open, className: contentClassName, innerClassName: cn('space-y-0.5 p-0.5', className), ...props, children: showPlaceholder ? (_jsx(SidePanelSectionPlaceholder, { className: placeholderClassName, chromeFont: chromeFont, children: placeholder })) : (children) }));
|
|
81
|
+
});
|
|
82
|
+
export function sidePanelItemClassName({ active, className, } = {}) {
|
|
83
|
+
return sidePanelRowClassName({
|
|
84
|
+
selected: active,
|
|
85
|
+
className: cn('group/side-panel-item pr-2 pl-0', className),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export const SidePanelItem = forwardRef(function SidePanelItem({ active, leading, trailing, children, className, onContextMenu, ...props }, ref) {
|
|
89
|
+
return (_jsx(NavigableListItem, { active: active, children: _jsxs("button", { ref: ref, type: "button", "aria-current": active ? 'page' : undefined, onContextMenu: (event) => {
|
|
90
|
+
event.currentTarget.focus({ preventScroll: true });
|
|
91
|
+
onContextMenu?.(event);
|
|
92
|
+
}, className: sidePanelItemClassName({ active, className: cn('px-2', className) }), ...props, children: [leading ? (_jsx("span", { "data-slot": "side-panel-item-leading", className: "inline-flex size-4 shrink-0 items-center justify-center", children: leading })) : null, _jsx("span", { className: "min-w-0 flex-1 truncate", children: children }), trailing ? (_jsx("span", { "data-slot": "side-panel-item-trailing", className: "ml-auto shrink-0", children: trailing })) : null] }) }));
|
|
93
|
+
});
|
|
94
|
+
export const SidePanelActionList = forwardRef(function SidePanelActionList({ className, ...props }, ref) {
|
|
95
|
+
return (_jsx(NavigableList, { asChild: true, children: _jsx("div", { ref: ref, "data-slot": "side-panel-action-list", "data-navigable-list": true, className: cn('space-y-0.5', className), ...props }) }));
|
|
96
|
+
});
|
|
97
|
+
export const SidePanelSeparator = forwardRef(function SidePanelSeparator({ className, ...props }, ref) {
|
|
98
|
+
return (_jsx(Separator, { ref: ref, "data-slot": "side-panel-separator", className: cn('bg-border/50 my-1.5 w-full shrink-0', className), ...props }));
|
|
99
|
+
});
|
|
100
|
+
export const SidePanelActionButton = forwardRef(function SidePanelActionButton({ icon: Icon, active, children, className, variant = 'ghost', ...props }, ref) {
|
|
101
|
+
return (_jsx(NavigableListItem, { active: active, children: _jsxs(Button, { ref: ref, type: "button", variant: variant, "aria-current": active ? 'page' : undefined, className: cn(sidePanelRowClassName({ selected: active }), 'justify-start font-normal [&_svg]:size-3.5', className), ...props, children: [_jsx(Icon, { className: "size-3.5 shrink-0", strokeWidth: 1.7, "aria-hidden": true }), _jsx("span", { className: "truncate", children: children })] }) }));
|
|
102
|
+
});
|
|
103
|
+
export function SidePanelIconButton({ tooltip, title, 'aria-label': ariaLabel, ...props }) {
|
|
104
|
+
const fallbackLabel = typeof title === 'string' ? title : undefined;
|
|
105
|
+
return (_jsx(IconButton, { size: "sm", tooltip: tooltip ?? fallbackLabel, "aria-label": ariaLabel ?? fallbackLabel, ...props }));
|
|
106
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../lib/cn.js';
|
|
3
|
+
function Skeleton({ className, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
export { Skeleton };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import '../lib/react-19-jsx.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { type ReactNode } from 'react';
|
|
4
|
+
import { DndContext, DragOverlay, KeyboardSensor, PointerSensor, closestCenter, useDraggable, useDroppable, useSensor, useSensors, type DragEndEvent, type DragOverEvent, type DragStartEvent } from '@dnd-kit/core';
|
|
5
|
+
import { SortableContext, arrayMove, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
6
|
+
export type DragHandleProps = Record<string, unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* The drag preview positions itself against the viewport, so any ancestor that establishes a
|
|
9
|
+
* containing block — a transform, a filter, `backdrop-blur`, a centered Radix dialog — drags it
|
|
10
|
+
* off toward that ancestor's corner instead of keeping it under the pointer. Rendering it into
|
|
11
|
+
* the body is what keeps the preview honest, so every sortable surface goes through here.
|
|
12
|
+
*/
|
|
13
|
+
export declare function DragPreview({ dropAnimation, className, children, }: {
|
|
14
|
+
dropAnimation?: React.ComponentProps<typeof DragOverlay>['dropAnimation'];
|
|
15
|
+
className?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
export interface ReorderDetail {
|
|
19
|
+
beforeId: string | null;
|
|
20
|
+
afterId: string | null;
|
|
21
|
+
fromIndex: number;
|
|
22
|
+
toIndex: number;
|
|
23
|
+
nextIds: string[];
|
|
24
|
+
}
|
|
25
|
+
interface SortableRenderArgs {
|
|
26
|
+
dragHandleProps: DragHandleProps;
|
|
27
|
+
isDragging: boolean;
|
|
28
|
+
overlay: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface SortableListProps<T> {
|
|
31
|
+
items: T[];
|
|
32
|
+
keyOf: (item: T) => string;
|
|
33
|
+
onReorder: (movedId: string, detail: ReorderDetail) => void;
|
|
34
|
+
renderItem: (item: T, args: SortableRenderArgs) => ReactNode;
|
|
35
|
+
orientation?: 'vertical' | 'horizontal';
|
|
36
|
+
handle?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function SortableList<T>({ items, keyOf, onReorder, renderItem, orientation, handle, disabled, className, }: SortableListProps<T>): React.JSX.Element;
|
|
41
|
+
export declare function useSortableHandle(id: string, options?: {
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
}): {
|
|
44
|
+
setNodeRef: (node: HTMLElement | null) => void;
|
|
45
|
+
attributes: import("@dnd-kit/core").DraggableAttributes;
|
|
46
|
+
listeners: import("@dnd-kit/core/dist/hooks/utilities").SyntheticListenerMap | undefined;
|
|
47
|
+
style: React.CSSProperties;
|
|
48
|
+
isDragging: boolean;
|
|
49
|
+
};
|
|
50
|
+
export declare const useSortableRow: typeof useSortableHandle;
|
|
51
|
+
export declare function SortableItem({ id, disabled, className, children, }: {
|
|
52
|
+
id: string;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
className?: string;
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
}): React.JSX.Element;
|
|
57
|
+
export declare const SortableRow: typeof SortableItem;
|
|
58
|
+
export declare const DragHandle: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
59
|
+
dragHandleProps?: DragHandleProps;
|
|
60
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
61
|
+
export { DndContext, KeyboardSensor, PointerSensor, SortableContext, arrayMove, closestCenter, sortableKeyboardCoordinates, useDraggable, useDroppable, useSensor, useSensors, verticalListSortingStrategy, };
|
|
62
|
+
export type { DragEndEvent, DragOverEvent, DragStartEvent };
|
|
63
|
+
export declare function reorderById<T extends {
|
|
64
|
+
id: string;
|
|
65
|
+
}>(items: T[], movedId: string, beforeId: string | null): T[];
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import '../lib/react-19-jsx.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import {} from 'react';
|
|
6
|
+
import { DndContext, DragOverlay, KeyboardSensor, PointerSensor, closestCenter, useDraggable, useDroppable, useSensor, useSensors, } from '@dnd-kit/core';
|
|
7
|
+
import { SortableContext, arrayMove, horizontalListSortingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy, } from '@dnd-kit/sortable';
|
|
8
|
+
import { CSS } from '@dnd-kit/utilities';
|
|
9
|
+
import { createPortal } from 'react-dom';
|
|
10
|
+
import { GripVertical } from 'lucide-react';
|
|
11
|
+
import { cn } from '../lib/cn.js';
|
|
12
|
+
/**
|
|
13
|
+
* The drag preview positions itself against the viewport, so any ancestor that establishes a
|
|
14
|
+
* containing block — a transform, a filter, `backdrop-blur`, a centered Radix dialog — drags it
|
|
15
|
+
* off toward that ancestor's corner instead of keeping it under the pointer. Rendering it into
|
|
16
|
+
* the body is what keeps the preview honest, so every sortable surface goes through here.
|
|
17
|
+
*/
|
|
18
|
+
export function DragPreview({ dropAnimation = null, className, children, }) {
|
|
19
|
+
const overlay = (_jsx(DragOverlay, { dropAnimation: dropAnimation, className: cn('cursor-grabbing', className), children: children }));
|
|
20
|
+
return typeof document === 'undefined' ? overlay : createPortal(overlay, document.body);
|
|
21
|
+
}
|
|
22
|
+
export function SortableList({ items, keyOf, onReorder, renderItem, orientation = 'vertical', handle = false, disabled = false, className, }) {
|
|
23
|
+
const ids = React.useMemo(() => items.map(keyOf), [items, keyOf]);
|
|
24
|
+
const [activeId, setActiveId] = React.useState(null);
|
|
25
|
+
const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 4 } }), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }));
|
|
26
|
+
const strategy = orientation === 'horizontal' ? horizontalListSortingStrategy : verticalListSortingStrategy;
|
|
27
|
+
function handleStart(event) {
|
|
28
|
+
setActiveId(String(event.active.id));
|
|
29
|
+
}
|
|
30
|
+
function handleEnd(event) {
|
|
31
|
+
setActiveId(null);
|
|
32
|
+
const { active, over } = event;
|
|
33
|
+
if (!over || active.id === over.id)
|
|
34
|
+
return;
|
|
35
|
+
const from = ids.indexOf(String(active.id));
|
|
36
|
+
const to = ids.indexOf(String(over.id));
|
|
37
|
+
if (from < 0 || to < 0)
|
|
38
|
+
return;
|
|
39
|
+
const nextIds = arrayMove(ids, from, to);
|
|
40
|
+
const pos = nextIds.indexOf(String(active.id));
|
|
41
|
+
onReorder(String(active.id), {
|
|
42
|
+
beforeId: pos > 0 ? (nextIds[pos - 1] ?? null) : null,
|
|
43
|
+
afterId: pos < nextIds.length - 1 ? (nextIds[pos + 1] ?? null) : null,
|
|
44
|
+
fromIndex: from,
|
|
45
|
+
toIndex: to,
|
|
46
|
+
nextIds,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
const activeItem = activeId == null ? null : (items.find((item) => keyOf(item) === activeId) ?? null);
|
|
50
|
+
return (_jsxs(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragStart: handleStart, onDragEnd: handleEnd, onDragCancel: () => setActiveId(null), children: [_jsx(SortableContext, { items: ids, strategy: strategy, disabled: disabled, children: _jsx("div", { className: className, "data-slot": "sortable-list", "data-orientation": orientation, children: items.map((item) => (_jsx(SortableListItem, { id: keyOf(item), item: item, renderItem: renderItem, handle: handle, disabled: disabled }, keyOf(item)))) }) }), _jsx(DragPreview, { children: activeItem
|
|
51
|
+
? renderItem(activeItem, { dragHandleProps: {}, isDragging: true, overlay: true })
|
|
52
|
+
: null })] }));
|
|
53
|
+
}
|
|
54
|
+
function SortableListItem({ id, item, renderItem, handle, disabled, }) {
|
|
55
|
+
const { setNodeRef, attributes, listeners, transform, transition, isDragging } = useSortable({
|
|
56
|
+
id,
|
|
57
|
+
disabled,
|
|
58
|
+
});
|
|
59
|
+
const style = {
|
|
60
|
+
transform: CSS.Transform.toString(transform),
|
|
61
|
+
transition,
|
|
62
|
+
opacity: isDragging ? 0.4 : undefined,
|
|
63
|
+
zIndex: isDragging ? 10 : undefined,
|
|
64
|
+
outline: isDragging ? 'none' : undefined,
|
|
65
|
+
position: 'relative',
|
|
66
|
+
};
|
|
67
|
+
const dragHandleProps = { ...attributes, ...listeners };
|
|
68
|
+
return (_jsx("div", { ref: setNodeRef, style: style, "data-slot": "sortable-item", ...(handle ? {} : dragHandleProps), children: renderItem(item, {
|
|
69
|
+
dragHandleProps: handle ? dragHandleProps : {},
|
|
70
|
+
isDragging,
|
|
71
|
+
overlay: false,
|
|
72
|
+
}) }));
|
|
73
|
+
}
|
|
74
|
+
export function useSortableHandle(id, options) {
|
|
75
|
+
const { setNodeRef, attributes, listeners, transform, transition, isDragging } = useSortable({
|
|
76
|
+
id,
|
|
77
|
+
disabled: options?.disabled,
|
|
78
|
+
});
|
|
79
|
+
const style = {
|
|
80
|
+
transform: CSS.Transform.toString(transform),
|
|
81
|
+
transition,
|
|
82
|
+
opacity: isDragging ? 0.5 : undefined,
|
|
83
|
+
zIndex: isDragging ? 10 : undefined,
|
|
84
|
+
outline: isDragging ? 'none' : undefined,
|
|
85
|
+
position: 'relative',
|
|
86
|
+
};
|
|
87
|
+
return { setNodeRef, attributes, listeners, style, isDragging };
|
|
88
|
+
}
|
|
89
|
+
export const useSortableRow = useSortableHandle;
|
|
90
|
+
export function SortableItem({ id, disabled, className, children, }) {
|
|
91
|
+
const { setNodeRef, attributes, listeners, style } = useSortableHandle(id, { disabled });
|
|
92
|
+
return (_jsx("div", { ref: setNodeRef, style: style, "data-slot": "sortable-item", className: className, ...attributes, ...listeners, children: children }));
|
|
93
|
+
}
|
|
94
|
+
export const SortableRow = SortableItem;
|
|
95
|
+
export const DragHandle = React.forwardRef(function DragHandle({ className, dragHandleProps, 'aria-label': ariaLabel = 'Drag to reorder', ...props }, ref) {
|
|
96
|
+
return (_jsx("button", { ref: ref, type: "button", "data-slot": "drag-handle", "aria-label": ariaLabel, className: cn('inline-flex items-center justify-center rounded-md outline-none', 'text-muted-foreground/60 size-4 cursor-grab opacity-0', 'transition-opacity group-hover:opacity-100 focus-visible:opacity-100', 'focus-visible:ring-ring/50 focus-visible:ring-2 active:cursor-grabbing', className), ...dragHandleProps, ...props, children: _jsx(GripVertical, { className: "size-4", "aria-hidden": true }) }));
|
|
97
|
+
});
|
|
98
|
+
export { DndContext, KeyboardSensor, PointerSensor, SortableContext, arrayMove, closestCenter, sortableKeyboardCoordinates, useDraggable, useDroppable, useSensor, useSensors, verticalListSortingStrategy, };
|
|
99
|
+
export function reorderById(items, movedId, beforeId) {
|
|
100
|
+
const moved = items.find((i) => i.id === movedId);
|
|
101
|
+
if (!moved)
|
|
102
|
+
return items;
|
|
103
|
+
const without = items.filter((i) => i.id !== movedId);
|
|
104
|
+
if (beforeId == null)
|
|
105
|
+
return [moved, ...without];
|
|
106
|
+
const idx = without.findIndex((i) => i.id === beforeId);
|
|
107
|
+
if (idx < 0)
|
|
108
|
+
return items;
|
|
109
|
+
return [...without.slice(0, idx + 1), moved, ...without.slice(idx + 1)];
|
|
110
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface SpecStripItem {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
label: string;
|
|
5
|
+
value: React.ReactNode;
|
|
6
|
+
suffix?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface SpecStripProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
9
|
+
items: SpecStripItem[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A machine's fixed shape — cores, memory, disk — as one line of specification.
|
|
13
|
+
*
|
|
14
|
+
* Deliberately flat: no fill, no card. The filled tiles in this system mean a measurement
|
|
15
|
+
* that moves, so a shape that never changes must not borrow their treatment or the fill
|
|
16
|
+
* stops meaning anything.
|
|
17
|
+
*/
|
|
18
|
+
export declare function SpecStrip({ items, className, ...props }: SpecStripProps): React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { cn } from '../lib/cn.js';
|
|
5
|
+
import { Separator } from './separator.js';
|
|
6
|
+
/**
|
|
7
|
+
* A machine's fixed shape — cores, memory, disk — as one line of specification.
|
|
8
|
+
*
|
|
9
|
+
* Deliberately flat: no fill, no card. The filled tiles in this system mean a measurement
|
|
10
|
+
* that moves, so a shape that never changes must not borrow their treatment or the fill
|
|
11
|
+
* stops meaning anything.
|
|
12
|
+
*/
|
|
13
|
+
export function SpecStrip({ items, className, ...props }) {
|
|
14
|
+
return (_jsx("div", { "data-slot": "spec-strip", className: cn('flex items-stretch gap-3', className), ...props, children: items.map((item, index) => (_jsxs(React.Fragment, { children: [index > 0 ? _jsx(Separator, { orientation: "vertical", className: "bg-border/60" }) : null, _jsxs("div", { className: "flex min-w-0 flex-1 flex-col items-center gap-1.5 py-1", children: [_jsx("span", { className: "text-muted-foreground [&_svg]:size-5", "aria-hidden": true, children: item.icon }), _jsxs("span", { className: "truncate text-[17px] font-medium tabular-nums", children: [item.value, item.suffix ? (_jsx("span", { className: "text-muted-foreground ml-1 text-[12px] font-normal", children: item.suffix })) : null] }), _jsx("span", { className: "text-muted-foreground truncate text-[11.5px]", children: item.label })] })] }, item.label))) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type SpeechPlaybackState = 'idle' | 'buffering' | 'streaming' | 'speaking' | 'paused' | 'completed' | 'error';
|
|
3
|
+
export interface SpeechPlaybackLabels {
|
|
4
|
+
pause: string;
|
|
5
|
+
resume: string;
|
|
6
|
+
cancel: string;
|
|
7
|
+
retry: string;
|
|
8
|
+
progress: (played: string, duration: string) => string;
|
|
9
|
+
}
|
|
10
|
+
export interface SpeechPlaybackProps extends Omit<React.ComponentProps<'section'>, 'children'> {
|
|
11
|
+
state: SpeechPlaybackState;
|
|
12
|
+
ariaLabel: string;
|
|
13
|
+
statusLabel: string;
|
|
14
|
+
labels: SpeechPlaybackLabels;
|
|
15
|
+
text?: React.ReactNode;
|
|
16
|
+
analyser?: AnalyserNode | null;
|
|
17
|
+
playedMs?: number;
|
|
18
|
+
durationMs?: number;
|
|
19
|
+
formatTime?: (milliseconds: number) => string;
|
|
20
|
+
onPause?: () => void;
|
|
21
|
+
onResume?: () => void;
|
|
22
|
+
onCancel?: () => void;
|
|
23
|
+
onRetry?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function SpeechPlayback({ state, ariaLabel, statusLabel, labels, text, analyser, playedMs, durationMs, formatTime, onPause, onResume, onCancel, onRetry, className, ...props }: SpeechPlaybackProps): React.JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Pause, Play, RotateCcw, Square } from 'lucide-react';
|
|
5
|
+
import { cn } from '../lib/cn.js';
|
|
6
|
+
import { Button } from './button.js';
|
|
7
|
+
import { VoiceLine } from './voice-line.js';
|
|
8
|
+
const VOICE_STATE = {
|
|
9
|
+
idle: 'idle',
|
|
10
|
+
buffering: 'generating',
|
|
11
|
+
streaming: 'speaking',
|
|
12
|
+
speaking: 'speaking',
|
|
13
|
+
paused: 'idle',
|
|
14
|
+
completed: 'idle',
|
|
15
|
+
error: 'reprompt',
|
|
16
|
+
};
|
|
17
|
+
export function SpeechPlayback({ state, ariaLabel, statusLabel, labels, text, analyser = null, playedMs = 0, durationMs = 0, formatTime, onPause, onResume, onCancel, onRetry, className, ...props }) {
|
|
18
|
+
const active = state === 'streaming' || state === 'speaking';
|
|
19
|
+
const pausable = active && Boolean(onPause);
|
|
20
|
+
const resumable = state === 'paused' && Boolean(onResume);
|
|
21
|
+
const cancellable = (state === 'buffering' ||
|
|
22
|
+
state === 'streaming' ||
|
|
23
|
+
state === 'speaking' ||
|
|
24
|
+
state === 'paused') &&
|
|
25
|
+
Boolean(onCancel);
|
|
26
|
+
const safeDuration = Math.max(0, durationMs);
|
|
27
|
+
const safePlayed = Math.max(0, Math.min(playedMs, safeDuration || playedMs));
|
|
28
|
+
const progress = safeDuration > 0 ? safePlayed / safeDuration : 0;
|
|
29
|
+
const playedText = formatTime?.(safePlayed);
|
|
30
|
+
const durationText = formatTime?.(safeDuration);
|
|
31
|
+
const progressLabel = playedText !== undefined && durationText !== undefined
|
|
32
|
+
? labels.progress(playedText, durationText)
|
|
33
|
+
: undefined;
|
|
34
|
+
return (_jsxs("section", { "data-slot": "speech-playback", "data-state": state, "aria-label": ariaLabel, className: cn('border-border bg-card overflow-hidden rounded-xl border', className), ...props, children: [_jsx(VoiceLine, { state: VOICE_STATE[state], who: statusLabel, caption: text, partial: state === 'streaming', analyser: analyser, active: active, className: "rounded-none border-0 bg-transparent shadow-none ring-0" }), progressLabel ? (_jsxs("div", { className: "px-4 pb-3", children: [_jsx("div", { role: "progressbar", "aria-valuemin": 0, "aria-valuemax": Math.round(safeDuration), "aria-valuenow": Math.round(safePlayed), "aria-label": progressLabel, className: "bg-muted h-1 overflow-hidden rounded-full", children: _jsx("div", { className: "bg-primary h-full origin-left rounded-full transition-transform motion-reduce:transition-none", style: { transform: `scaleX(${progress})` } }) }), _jsxs("div", { className: "text-muted-foreground mt-1.5 flex justify-between font-mono text-[11px] tabular-nums", children: [_jsx("span", { children: playedText }), _jsx("span", { children: durationText })] })] })) : null, pausable || resumable || cancellable || (state === 'error' && onRetry) ? (_jsxs("div", { className: "border-border/70 flex justify-end gap-1 border-t px-3 py-2", children: [pausable ? (_jsxs(Button, { type: "button", variant: "ghost", size: "sm", onClick: onPause, children: [_jsx(Pause, { className: "size-3.5", strokeWidth: 1.5, "aria-hidden": true }), labels.pause] })) : null, resumable ? (_jsxs(Button, { type: "button", variant: "ghost", size: "sm", onClick: onResume, children: [_jsx(Play, { className: "size-3.5", strokeWidth: 1.5, "aria-hidden": true }), labels.resume] })) : null, cancellable ? (_jsxs(Button, { type: "button", variant: "outline", size: "sm", onClick: onCancel, children: [_jsx(Square, { className: "size-3", strokeWidth: 1.5, "aria-hidden": true }), labels.cancel] })) : null, state === 'error' && onRetry ? (_jsxs(Button, { type: "button", variant: "outline", size: "sm", onClick: onRetry, children: [_jsx(RotateCcw, { className: "size-3.5", strokeWidth: 1.5, "aria-hidden": true }), labels.retry] })) : null] })) : null] }));
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface SqlEditorSchemaObject {
|
|
2
|
+
slug?: unknown;
|
|
3
|
+
attributes?: readonly unknown[];
|
|
4
|
+
}
|
|
5
|
+
export interface SqlEditorProps {
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: (value: string) => void;
|
|
8
|
+
schema: SqlEditorSchemaObject[];
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
bodyFont?: string;
|
|
11
|
+
params?: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare function SqlEditor({ value, onChange, schema, placeholder, params }: SqlEditorProps): import("react").JSX.Element;
|