@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,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type NautColor, type NautExpression, type NautGesture, type NautShape } from './naut-avatar-engine.js';
|
|
3
|
+
export type { NautColor, NautExpression, NautGesture, NautShape } from './naut-avatar-engine.js';
|
|
4
|
+
export { NAUT_COLORS, NAUT_COLOR_KEYS, NAUT_EXPRESSIONS, NAUT_GESTURES, NAUT_SHAPES, isNautColor, isNautShape, nautAppearanceForSeed, } from './naut-avatar-engine.js';
|
|
5
|
+
export interface NautAppearance {
|
|
6
|
+
shape: NautShape;
|
|
7
|
+
color: NautColor;
|
|
8
|
+
}
|
|
9
|
+
export interface NautAvatarProps extends Omit<React.SVGProps<SVGSVGElement>, 'ref'> {
|
|
10
|
+
shape?: NautShape;
|
|
11
|
+
color?: NautColor;
|
|
12
|
+
expression?: NautExpression;
|
|
13
|
+
/** Blinks, glances and breathes on its own. Off renders a still face. */
|
|
14
|
+
idle?: boolean;
|
|
15
|
+
/** Where the eyes look, in [-1, 1]; omit to let idle wander. */
|
|
16
|
+
gaze?: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
} | null;
|
|
20
|
+
/** Any stable id — keeps a list of Nauts from blinking in unison. */
|
|
21
|
+
seed?: string | number;
|
|
22
|
+
}
|
|
23
|
+
export interface NautAvatarHandle {
|
|
24
|
+
play: (gesture: NautGesture) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A Naut's face: one solid shape with two cut-out eyes that sit on its surface and
|
|
28
|
+
* look around. The eyes are holes, so set `--naut-avatar-eye` to the surface the
|
|
29
|
+
* avatar sits on (defaults to `--background`).
|
|
30
|
+
*/
|
|
31
|
+
export declare const NautAvatar: React.ForwardRefExoticComponent<NautAvatarProps & React.RefAttributes<NautAvatarHandle>>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useReducedMotion } from 'motion/react';
|
|
5
|
+
import { cn } from '../lib/cn.js';
|
|
6
|
+
import { NAUT_VIEWBOX, NautAvatarEngine, hashSeed, } from './naut-avatar-engine.js';
|
|
7
|
+
export { NAUT_COLORS, NAUT_COLOR_KEYS, NAUT_EXPRESSIONS, NAUT_GESTURES, NAUT_SHAPES, isNautColor, isNautShape, nautAppearanceForSeed, } from './naut-avatar-engine.js';
|
|
8
|
+
/** One animation frame loop drives every mounted avatar; offscreen ones sit out. */
|
|
9
|
+
const ticker = {
|
|
10
|
+
entries: new Set(),
|
|
11
|
+
frame: 0,
|
|
12
|
+
last: 0,
|
|
13
|
+
tick(now) {
|
|
14
|
+
const dt = Math.min((now - ticker.last) / 1000, 0.05);
|
|
15
|
+
ticker.last = now;
|
|
16
|
+
for (const entry of ticker.entries)
|
|
17
|
+
if (entry.visible)
|
|
18
|
+
entry.engine.update(dt);
|
|
19
|
+
ticker.frame = ticker.entries.size ? requestAnimationFrame(ticker.tick) : 0;
|
|
20
|
+
},
|
|
21
|
+
add(entry) {
|
|
22
|
+
ticker.entries.add(entry);
|
|
23
|
+
if (!ticker.frame) {
|
|
24
|
+
ticker.last = performance.now();
|
|
25
|
+
ticker.frame = requestAnimationFrame(ticker.tick);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
remove(entry) {
|
|
29
|
+
ticker.entries.delete(entry);
|
|
30
|
+
if (!ticker.entries.size && ticker.frame) {
|
|
31
|
+
cancelAnimationFrame(ticker.frame);
|
|
32
|
+
ticker.frame = 0;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const seedNumber = (seed) => typeof seed === 'number' ? seed : hashSeed(seed ?? 'naut');
|
|
37
|
+
/**
|
|
38
|
+
* A Naut's face: one solid shape with two cut-out eyes that sit on its surface and
|
|
39
|
+
* look around. The eyes are holes, so set `--naut-avatar-eye` to the surface the
|
|
40
|
+
* avatar sits on (defaults to `--background`).
|
|
41
|
+
*/
|
|
42
|
+
export const NautAvatar = React.forwardRef(function NautAvatar({ shape = 'circle', color = 'ink', expression = 'neutral', idle = true, gaze = null, seed, className, style, ...props }, forwardedRef) {
|
|
43
|
+
const reducedMotion = useReducedMotion();
|
|
44
|
+
const animated = idle && !reducedMotion;
|
|
45
|
+
const svgRef = React.useRef(null);
|
|
46
|
+
const rootRef = React.useRef(null);
|
|
47
|
+
const bodyRef = React.useRef(null);
|
|
48
|
+
const eyesRef = React.useRef(null);
|
|
49
|
+
const eyeLRef = React.useRef(null);
|
|
50
|
+
const eyeRRef = React.useRef(null);
|
|
51
|
+
const [engine] = React.useState(() => new NautAvatarEngine({ shape, color, expression, seed: seedNumber(seed), idle: animated }));
|
|
52
|
+
React.useImperativeHandle(forwardedRef, () => ({ play: (gesture) => engine.play(gesture) }), [
|
|
53
|
+
engine,
|
|
54
|
+
]);
|
|
55
|
+
React.useLayoutEffect(() => {
|
|
56
|
+
engine.setShape(shape);
|
|
57
|
+
engine.setColor(color);
|
|
58
|
+
engine.setExpression(expression);
|
|
59
|
+
engine.idle = animated;
|
|
60
|
+
engine.gazeTarget = gaze;
|
|
61
|
+
}, [engine, shape, color, expression, animated, gaze]);
|
|
62
|
+
React.useLayoutEffect(() => {
|
|
63
|
+
if (!rootRef.current ||
|
|
64
|
+
!bodyRef.current ||
|
|
65
|
+
!eyesRef.current ||
|
|
66
|
+
!eyeLRef.current ||
|
|
67
|
+
!eyeRRef.current)
|
|
68
|
+
return;
|
|
69
|
+
engine.attach({
|
|
70
|
+
root: rootRef.current,
|
|
71
|
+
body: bodyRef.current,
|
|
72
|
+
eyes: eyesRef.current,
|
|
73
|
+
eyeL: eyeLRef.current,
|
|
74
|
+
eyeR: eyeRRef.current,
|
|
75
|
+
});
|
|
76
|
+
engine.settle();
|
|
77
|
+
engine.update(0);
|
|
78
|
+
}, [engine]);
|
|
79
|
+
React.useEffect(() => {
|
|
80
|
+
if (reducedMotion) {
|
|
81
|
+
engine.settle();
|
|
82
|
+
engine.update(0);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const entry = { engine, visible: true };
|
|
86
|
+
ticker.add(entry);
|
|
87
|
+
const svg = svgRef.current;
|
|
88
|
+
const observer = svg && typeof IntersectionObserver !== 'undefined'
|
|
89
|
+
? new IntersectionObserver((records) => {
|
|
90
|
+
for (const record of records)
|
|
91
|
+
entry.visible = record.isIntersecting;
|
|
92
|
+
})
|
|
93
|
+
: null;
|
|
94
|
+
if (svg && observer)
|
|
95
|
+
observer.observe(svg);
|
|
96
|
+
return () => {
|
|
97
|
+
observer?.disconnect();
|
|
98
|
+
ticker.remove(entry);
|
|
99
|
+
};
|
|
100
|
+
}, [engine, reducedMotion]);
|
|
101
|
+
React.useEffect(() => {
|
|
102
|
+
if (!reducedMotion)
|
|
103
|
+
return;
|
|
104
|
+
engine.settle();
|
|
105
|
+
engine.update(0);
|
|
106
|
+
}, [engine, reducedMotion, shape, color, expression]);
|
|
107
|
+
return (_jsx("svg", { ref: svgRef, viewBox: NAUT_VIEWBOX, "data-slot": "naut-avatar", "data-shape": shape, "data-color": color, "data-expression": expression, className: cn('block size-full overflow-visible select-none', className), style: style, "aria-hidden": props['aria-label'] ? undefined : true, ...props, children: _jsxs("g", { ref: rootRef, children: [_jsx("path", { ref: bodyRef }), _jsxs("g", { ref: eyesRef, children: [_jsx("path", { ref: eyeLRef, fill: "var(--naut-avatar-eye, var(--background))" }), _jsx("path", { ref: eyeRRef, fill: "var(--naut-avatar-eye, var(--background))" })] })] }) }));
|
|
108
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
|
|
3
|
+
export declare const NavigableList: React.ForwardRefExoticComponent<Omit<RovingFocusGroup.RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const NavigableListItem: React.ForwardRefExoticComponent<Omit<RovingFocusGroup.RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
|
|
5
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
6
|
+
const NavigableListContext = React.createContext(false);
|
|
7
|
+
export const NavigableList = React.forwardRef(({ orientation = 'vertical', loop = false, ...props }, ref) => (_jsx(NavigableListContext.Provider, { value: true, children: _jsx(RovingFocusGroup.Root, { ref: ref, orientation: orientation, loop: loop, ...props }) })));
|
|
8
|
+
NavigableList.displayName = 'NavigableList';
|
|
9
|
+
export const NavigableListItem = React.forwardRef(({ asChild = true, active, focusable, tabStopId, children, ...props }, ref) => {
|
|
10
|
+
const insideNavigableList = React.useContext(NavigableListContext);
|
|
11
|
+
if (insideNavigableList) {
|
|
12
|
+
return (_jsx(RovingFocusGroup.Item, { ref: ref, asChild: asChild, active: active, focusable: focusable, tabStopId: tabStopId, ...props, children: children }));
|
|
13
|
+
}
|
|
14
|
+
const Component = asChild ? Slot : 'span';
|
|
15
|
+
const fallbackChildren = typeof children === 'function'
|
|
16
|
+
? children({ hasTabStop: true, isCurrentTabStop: true })
|
|
17
|
+
: children;
|
|
18
|
+
return (_jsx(Component, { ref: ref, ...props, children: fallbackChildren }));
|
|
19
|
+
});
|
|
20
|
+
NavigableListItem.displayName = 'NavigableListItem';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type NoteIconFallback, type NoteIconValue } from './note-icon.js';
|
|
3
|
+
export declare function NoteIconPicker({ value, onChange, trigger, align, side, className, translate, }: {
|
|
4
|
+
value: NoteIconValue | null;
|
|
5
|
+
onChange: (next: NoteIconValue | null) => void;
|
|
6
|
+
trigger: ReactNode;
|
|
7
|
+
align?: 'start' | 'center' | 'end';
|
|
8
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
9
|
+
className?: string;
|
|
10
|
+
translate: (key: string, values?: Record<string, string>) => string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export declare const NoteIconTrigger: import("react").ForwardRefExoticComponent<{
|
|
13
|
+
icon: NoteIconValue | null;
|
|
14
|
+
className?: string;
|
|
15
|
+
iconClassName?: string;
|
|
16
|
+
label: string;
|
|
17
|
+
fallback?: "file" | "folder";
|
|
18
|
+
fallbackIcon?: NoteIconFallback;
|
|
19
|
+
renderEmpty?: ReactNode;
|
|
20
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useMemo, useRef, useState, } from 'react';
|
|
4
|
+
import { Check, X } from 'lucide-react';
|
|
5
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from './command.js';
|
|
6
|
+
import { Button } from './button.js';
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from './popover.js';
|
|
8
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from './tabs.js';
|
|
9
|
+
import { cn } from '../lib/cn.js';
|
|
10
|
+
import { NOTE_EMOJI_DEFS, NOTE_ICON_COLOR_DEFS, NOTE_ICON_DEFS, NoteIconGlyph, } from './note-icon.js';
|
|
11
|
+
export function NoteIconPicker({ value, onChange, trigger, align = 'center', side = 'bottom', className, translate, }) {
|
|
12
|
+
const t = translate;
|
|
13
|
+
const [open, setOpen] = useState(false);
|
|
14
|
+
const [mode, setMode] = useState(value?.kind ?? 'emoji');
|
|
15
|
+
const [query, setQuery] = useState('');
|
|
16
|
+
const inputRef = useRef(null);
|
|
17
|
+
const contentRef = useRef(null);
|
|
18
|
+
const q = query.trim().toLowerCase();
|
|
19
|
+
const iconColor = value?.kind === 'icon' ? (value.color ?? 'primary') : 'primary';
|
|
20
|
+
const icons = useMemo(() => NOTE_ICON_DEFS.filter((item) => `${item.label} ${item.keywords} ${item.id}`.toLowerCase().includes(q)), [q]);
|
|
21
|
+
const emojis = useMemo(() => NOTE_EMOJI_DEFS.filter((item) => `${item.label} ${item.keywords} ${item.emoji}`.toLowerCase().includes(q)), [q]);
|
|
22
|
+
const pick = (next) => {
|
|
23
|
+
onChange(next);
|
|
24
|
+
setOpen(false);
|
|
25
|
+
setQuery('');
|
|
26
|
+
};
|
|
27
|
+
const pickColor = (color) => {
|
|
28
|
+
if (value?.kind !== 'icon')
|
|
29
|
+
return;
|
|
30
|
+
onChange({ ...value, color });
|
|
31
|
+
};
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (!open)
|
|
34
|
+
return;
|
|
35
|
+
const id = window.setTimeout(() => inputRef.current?.focus(), 0);
|
|
36
|
+
return () => window.clearTimeout(id);
|
|
37
|
+
}, [open]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (!open)
|
|
40
|
+
return;
|
|
41
|
+
const frame = window.requestAnimationFrame(() => {
|
|
42
|
+
contentRef.current
|
|
43
|
+
?.querySelector('[data-note-icon-selected="true"]')
|
|
44
|
+
?.scrollIntoView({ block: 'nearest' });
|
|
45
|
+
});
|
|
46
|
+
return () => window.cancelAnimationFrame(frame);
|
|
47
|
+
}, [open, mode, value]);
|
|
48
|
+
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: trigger }), _jsx(PopoverContent, { ref: contentRef, side: side, align: align, sideOffset: 8, collisionPadding: 12, className: cn('w-[320px] max-w-[calc(100vw-24px)] overflow-hidden p-0', className), children: _jsxs(Tabs, { value: mode, onValueChange: (next) => setMode(next), className: "gap-0", children: [_jsxs("div", { className: "flex items-center justify-between border-b border-border/60 px-3 pt-2", children: [_jsxs(TabsList, { variant: "line", className: "h-8 gap-3 p-0", children: [_jsx(TabsTrigger, { value: "emoji", className: "h-8 px-0 text-[12.5px]", children: t('emoji') }), _jsx(TabsTrigger, { value: "icon", className: "h-8 px-0 text-[12.5px]", children: t('icon') })] }), value ? (_jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", onClick: () => pick(null), className: "text-muted-foreground hover:bg-muted/70 hover:text-foreground", "aria-label": t('clear'), children: _jsx(X, { className: "size-3.5", strokeWidth: 1.7 }) })) : null] }), _jsxs(Command, { shouldFilter: false, children: [_jsx(CommandInput, { ref: inputRef, variant: "inline", value: query, onValueChange: setQuery, placeholder: mode === 'emoji' ? t('searchEmoji') : t('searchIcons') }), _jsx(TabsContent, { value: "emoji", className: "m-0", children: _jsxs(CommandList, { className: "max-h-64", children: [_jsx(CommandEmpty, { children: t('emptyEmoji') }), _jsx(CommandGroup, { className: "p-1.5", children: _jsx("div", { className: "grid grid-cols-8 gap-1", children: emojis.map((item) => {
|
|
49
|
+
const selected = value?.kind === 'emoji' && value.value === item.emoji;
|
|
50
|
+
return (_jsxs(CommandItem, { value: `${item.emoji} ${item.label} ${item.keywords}`, onSelect: () => pick({ kind: 'emoji', value: item.emoji }), "data-note-icon-selected": selected ? 'true' : undefined, className: cn('relative aspect-square justify-center rounded-md p-0 text-[18px] cursor-pointer', 'data-[selected=true]:bg-transparent data-[selected=true]:text-foreground [&>svg:last-child]:hidden', selected
|
|
51
|
+
? 'bg-muted text-foreground ring-1 ring-border/80'
|
|
52
|
+
: 'text-foreground/90 hover:bg-muted/55'), "aria-label": item.label, children: [item.emoji, selected ? _jsx(SelectedMark, {}) : null] }, item.emoji));
|
|
53
|
+
}) }) })] }) }), _jsxs(TabsContent, { value: "icon", className: "m-0", children: [_jsxs(CommandList, { className: "max-h-64", children: [_jsx(CommandEmpty, { children: t('emptyIcon') }), _jsx(CommandGroup, { className: "p-1.5", children: _jsx("div", { className: "grid grid-cols-8 gap-1", children: icons.map((item) => {
|
|
54
|
+
const selected = value?.kind === 'icon' && value.value === item.id;
|
|
55
|
+
return (_jsxs(CommandItem, { value: `${item.label} ${item.keywords} ${item.id}`, onSelect: () => pick({
|
|
56
|
+
kind: 'icon',
|
|
57
|
+
value: item.id,
|
|
58
|
+
color: iconColor,
|
|
59
|
+
}), "data-note-icon-selected": selected ? 'true' : undefined, className: cn('relative aspect-square justify-center rounded-md p-0 cursor-pointer', 'data-[selected=true]:bg-transparent data-[selected=true]:text-foreground [&>svg:last-child]:hidden', selected
|
|
60
|
+
? 'bg-muted text-foreground ring-1 ring-border/80'
|
|
61
|
+
: 'text-foreground/90 hover:bg-muted/55'), "aria-label": item.label, children: [_jsx(NoteIconGlyph, { icon: { kind: 'icon', value: item.id, color: iconColor }, className: "text-current", iconClassName: "size-[18px]" }), selected ? _jsx(SelectedMark, {}) : null] }, item.id));
|
|
62
|
+
}) }) })] }), _jsxs("div", { className: "flex items-center gap-1.5 border-t border-border/60 px-3 py-2", children: [_jsx("span", { className: "mr-1 text-[11px] text-muted-foreground", children: t('color') }), NOTE_ICON_COLOR_DEFS.map((item) => {
|
|
63
|
+
const selected = value?.kind === 'icon' && iconColor === item.id;
|
|
64
|
+
return (_jsx("button", { type: "button", "aria-label": t('colorAria', { color: t(`colorName.${item.id}`) }), "aria-pressed": selected, disabled: value?.kind !== 'icon', onClick: () => pickColor(item.id), className: cn('inline-flex size-5 items-center justify-center rounded-full border border-border/60 cursor-pointer', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/45', 'disabled:cursor-not-allowed disabled:opacity-40', selected ? 'ring-1 ring-primary/60' : ''), children: _jsx("span", { className: "size-3.5 rounded-full", style: { backgroundColor: item.value } }) }, item.id));
|
|
65
|
+
})] })] })] })] }) })] }));
|
|
66
|
+
}
|
|
67
|
+
function SelectedMark() {
|
|
68
|
+
return (_jsx("span", { className: "absolute right-1.5 top-1.5 inline-flex size-3.5 items-center justify-center rounded-full bg-primary text-primary-foreground", children: _jsx(Check, { className: "size-2.5", strokeWidth: 2 }) }));
|
|
69
|
+
}
|
|
70
|
+
export const NoteIconTrigger = forwardRef(function NoteIconTrigger({ icon, className, iconClassName, label, fallback = 'file', fallbackIcon, renderEmpty, onClick, onMouseDown, onPointerDown, ...buttonProps }, ref) {
|
|
71
|
+
const handleClick = (event) => {
|
|
72
|
+
event.stopPropagation();
|
|
73
|
+
onClick?.(event);
|
|
74
|
+
};
|
|
75
|
+
const handleMouseDown = (event) => {
|
|
76
|
+
event.stopPropagation();
|
|
77
|
+
onMouseDown?.(event);
|
|
78
|
+
};
|
|
79
|
+
const handlePointerDown = (event) => {
|
|
80
|
+
event.stopPropagation();
|
|
81
|
+
onPointerDown?.(event);
|
|
82
|
+
};
|
|
83
|
+
return (_jsx("button", { ref: ref, type: "button", "aria-label": label, title: label, ...buttonProps, className: cn('inline-flex shrink-0 items-center justify-center rounded-md text-muted-foreground/80', 'cursor-pointer hover:bg-muted/70 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/45', className), onClick: handleClick, onMouseDown: handleMouseDown, onPointerDown: handlePointerDown, children: icon == null && renderEmpty != null ? (_jsx("span", { "aria-hidden": true, className: "inline-flex size-full items-center justify-center", children: renderEmpty })) : (_jsx(NoteIconGlyph, { icon: icon, fallback: fallback, fallbackIcon: fallbackIcon, className: "size-full", iconClassName: cn('size-3.5', iconClassName) })) }));
|
|
84
|
+
});
|