@nadicodeai/ui 12.1.95 → 12.1.97
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/AGENTS.md +5 -1
- package/dist/components/accordion.d.ts +13 -0
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +13 -0
- package/dist/components/account-menu.d.ts +62 -18
- package/dist/components/account-menu.d.ts.map +1 -1
- package/dist/components/account-menu.js +32 -8
- package/dist/components/action-menu.d.ts +61 -5
- package/dist/components/action-menu.d.ts.map +1 -1
- package/dist/components/action-menu.js +31 -2
- package/dist/components/action-status.d.ts +13 -3
- package/dist/components/action-status.d.ts.map +1 -1
- package/dist/components/action-status.js +13 -3
- package/dist/components/activity-calendar.d.ts +14 -0
- package/dist/components/activity-calendar.d.ts.map +1 -1
- package/dist/components/activity-calendar.js +14 -0
- package/dist/components/activity-feed.d.ts +62 -0
- package/dist/components/activity-feed.d.ts.map +1 -0
- package/dist/components/activity-feed.js +54 -0
- package/dist/components/agent-card.d.ts +15 -0
- package/dist/components/agent-card.d.ts.map +1 -1
- package/dist/components/agent-card.js +15 -0
- package/dist/components/agent-list-row.d.ts +11 -7
- package/dist/components/agent-list-row.d.ts.map +1 -1
- package/dist/components/agent-list-row.js +10 -8
- package/dist/components/agent-orb-appearance.d.ts +5 -4
- package/dist/components/agent-orb-appearance.d.ts.map +1 -1
- package/dist/components/agent-orb.d.ts +16 -0
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +17 -0
- package/dist/components/agent-profile.d.ts +39 -10
- package/dist/components/agent-profile.d.ts.map +1 -1
- package/dist/components/agent-profile.js +40 -10
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +14 -0
- package/dist/components/alert.d.ts +14 -0
- package/dist/components/alert.d.ts.map +1 -1
- package/dist/components/alert.js +14 -0
- package/dist/components/app-mark.d.ts +14 -4
- package/dist/components/app-mark.d.ts.map +1 -1
- package/dist/components/app-mark.js +16 -4
- package/dist/components/approval-row.d.ts +15 -2
- package/dist/components/approval-row.d.ts.map +1 -1
- package/dist/components/approval-row.js +15 -2
- package/dist/components/aspect-ratio.d.ts +10 -0
- package/dist/components/aspect-ratio.d.ts.map +1 -1
- package/dist/components/aspect-ratio.js +13 -1
- package/dist/components/avatar.d.ts +15 -0
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +15 -0
- package/dist/components/badge.d.ts +11 -1
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +10 -5
- package/dist/components/brand-field.d.ts +10 -0
- package/dist/components/brand-field.d.ts.map +1 -1
- package/dist/components/brand-field.js +10 -0
- package/dist/components/brand.d.ts +14 -0
- package/dist/components/brand.d.ts.map +1 -1
- package/dist/components/brand.js +18 -4
- package/dist/components/breadcrumb.d.ts +20 -2
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb.js +13 -3
- package/dist/components/button-group.d.ts +21 -0
- package/dist/components/button-group.d.ts.map +1 -1
- package/dist/components/button-group.js +21 -0
- package/dist/components/button.d.ts +20 -0
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +20 -0
- package/dist/components/calendar.d.ts +15 -0
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +15 -0
- package/dist/components/card-row.d.ts +15 -5
- package/dist/components/card-row.d.ts.map +1 -1
- package/dist/components/card-row.js +15 -5
- package/dist/components/card.d.ts +16 -0
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +16 -0
- package/dist/components/carousel.d.ts +12 -0
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/carousel.js +12 -0
- package/dist/components/catalog-drawer.d.ts +29 -0
- package/dist/components/catalog-drawer.d.ts.map +1 -0
- package/dist/components/catalog-drawer.js +31 -0
- package/dist/components/catalog-entry.d.ts +49 -26
- package/dist/components/catalog-entry.d.ts.map +1 -1
- package/dist/components/catalog-entry.js +5 -27
- package/dist/components/channel-view.d.ts +23 -0
- package/dist/components/channel-view.d.ts.map +1 -1
- package/dist/components/channel-view.js +13 -4
- package/dist/components/chart-area-stacked.d.ts +11 -1
- package/dist/components/chart-area-stacked.d.ts.map +1 -1
- package/dist/components/chart-area-stacked.js +12 -2
- package/dist/components/chart-axis.d.ts.map +1 -1
- package/dist/components/chart-axis.js +2 -0
- package/dist/components/chart-bar-horizontal.d.ts +11 -1
- package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
- package/dist/components/chart-bar-horizontal.js +15 -2
- package/dist/components/chart-bar-multiple.d.ts +9 -4
- package/dist/components/chart-bar-multiple.d.ts.map +1 -1
- package/dist/components/chart-bar-multiple.js +10 -5
- package/dist/components/chart-bar-stacked.d.ts +11 -1
- package/dist/components/chart-bar-stacked.d.ts.map +1 -1
- package/dist/components/chart-bar-stacked.js +12 -2
- package/dist/components/chart-card.d.ts +38 -24
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +21 -8
- package/dist/components/chart-date-range-control.d.ts +15 -10
- package/dist/components/chart-date-range-control.d.ts.map +1 -1
- package/dist/components/chart-date-range-control.js +16 -12
- package/dist/components/chart-date-range.d.ts +2 -1
- package/dist/components/chart-date-range.d.ts.map +1 -1
- package/dist/components/chart-date-range.js +5 -2
- package/dist/components/chart-entity-colors.d.ts +7 -0
- package/dist/components/chart-entity-colors.d.ts.map +1 -1
- package/dist/components/chart-entity-colors.js +7 -0
- package/dist/components/chart-sparkline.d.ts +10 -0
- package/dist/components/chart-sparkline.d.ts.map +1 -1
- package/dist/components/chart-sparkline.js +8 -7
- package/dist/components/chart.d.ts +10 -0
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +27 -4
- package/dist/components/checkbox.d.ts +15 -0
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +15 -0
- package/dist/components/code-block.d.ts +15 -0
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +15 -0
- package/dist/components/collapsible.d.ts +12 -0
- package/dist/components/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible.js +12 -0
- package/dist/components/collection-filters.d.ts +15 -2
- package/dist/components/collection-filters.d.ts.map +1 -1
- package/dist/components/collection-filters.js +13 -1
- package/dist/components/collection-page.d.ts +29 -115
- package/dist/components/collection-page.d.ts.map +1 -1
- package/dist/components/collection-page.js +24 -139
- package/dist/components/collection-search.d.ts +14 -0
- package/dist/components/collection-search.d.ts.map +1 -1
- package/dist/components/collection-search.js +14 -0
- package/dist/components/collection-sort.d.ts +13 -3
- package/dist/components/collection-sort.d.ts.map +1 -1
- package/dist/components/collection-sort.js +17 -4
- package/dist/components/collection-toolbar.d.ts +13 -0
- package/dist/components/collection-toolbar.d.ts.map +1 -1
- package/dist/components/collection-toolbar.js +13 -0
- package/dist/components/combobox.d.ts +17 -0
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +17 -0
- package/dist/components/command.d.ts +16 -0
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +16 -0
- package/dist/components/company-card/renderer.js +2 -2
- package/dist/components/company-card.d.ts +16 -4
- package/dist/components/company-card.d.ts.map +1 -1
- package/dist/components/company-card.js +22 -10
- package/dist/components/confirm-dialog.d.ts +24 -14
- package/dist/components/confirm-dialog.d.ts.map +1 -1
- package/dist/components/confirm-dialog.js +16 -10
- package/dist/components/context-menu.d.ts +10 -0
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu.js +10 -0
- package/dist/components/copy-button.d.ts +10 -0
- package/dist/components/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button.js +10 -0
- package/dist/components/dashboard-shell.d.ts +14 -0
- package/dist/components/dashboard-shell.d.ts.map +1 -1
- package/dist/components/dashboard-shell.js +15 -1
- package/dist/components/data-table.d.ts +23 -1
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +63 -31
- package/dist/components/desktop-shell.d.ts +15 -0
- package/dist/components/desktop-shell.d.ts.map +1 -1
- package/dist/components/desktop-shell.js +15 -0
- package/dist/components/dialog.d.ts +16 -0
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +16 -0
- package/dist/components/diff-count.d.ts +11 -0
- package/dist/components/diff-count.d.ts.map +1 -1
- package/dist/components/diff-count.js +11 -0
- package/dist/components/disclosure-row.d.ts +12 -0
- package/dist/components/disclosure-row.d.ts.map +1 -1
- package/dist/components/disclosure-row.js +12 -0
- package/dist/components/disclosure.d.ts +15 -5
- package/dist/components/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure.js +15 -5
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +13 -0
- package/dist/components/dropdown-menu.d.ts +17 -5
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +20 -7
- package/dist/components/empty-art.d.ts +1 -1
- package/dist/components/empty-art.d.ts.map +1 -1
- package/dist/components/empty-art.js +8 -0
- package/dist/components/empty-state.d.ts +24 -10
- package/dist/components/empty-state.d.ts.map +1 -1
- package/dist/components/empty-state.js +23 -1
- package/dist/components/entry-scene.d.ts +33 -20
- package/dist/components/entry-scene.d.ts.map +1 -1
- package/dist/components/entry-scene.js +40 -9
- package/dist/components/expandable-block.d.ts +10 -0
- package/dist/components/expandable-block.d.ts.map +1 -1
- package/dist/components/expandable-block.js +10 -0
- package/dist/components/field.d.ts +17 -0
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +17 -0
- package/dist/components/file-diff.d.ts +12 -0
- package/dist/components/file-diff.d.ts.map +1 -1
- package/dist/components/file-diff.js +12 -0
- package/dist/components/file-type-icon.d.ts +12 -0
- package/dist/components/file-type-icon.d.ts.map +1 -1
- package/dist/components/file-type-icon.js +46 -31
- package/dist/components/footer.d.ts +14 -0
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +14 -0
- package/dist/components/form-dialog.d.ts +10 -0
- package/dist/components/form-dialog.d.ts.map +1 -1
- package/dist/components/form-dialog.js +10 -0
- package/dist/components/form-drawer.d.ts +24 -11
- package/dist/components/form-drawer.d.ts.map +1 -1
- package/dist/components/form-drawer.js +13 -3
- package/dist/components/form.d.ts +17 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +25 -5
- package/dist/components/glass-control.d.ts +13 -0
- package/dist/components/glass-control.d.ts.map +1 -1
- package/dist/components/glass-control.js +13 -0
- package/dist/components/heatmap/calendar-heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/calendar-heatmap.js +6 -4
- package/dist/components/hive-scene.d.ts +14 -0
- package/dist/components/hive-scene.d.ts.map +1 -1
- package/dist/components/hive-scene.js +14 -0
- package/dist/components/house-icons.d.ts +15 -0
- package/dist/components/house-icons.d.ts.map +1 -1
- package/dist/components/house-icons.js +19 -1
- package/dist/components/hover-card.d.ts +15 -0
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card.js +15 -0
- package/dist/components/identity-mark.d.ts +55 -0
- package/dist/components/identity-mark.d.ts.map +1 -0
- package/dist/components/identity-mark.js +66 -0
- package/dist/components/input-group.d.ts +16 -0
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +17 -0
- package/dist/components/input-otp.d.ts +15 -0
- package/dist/components/input-otp.d.ts.map +1 -1
- package/dist/components/input-otp.js +15 -0
- package/dist/components/input.d.ts +15 -0
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +15 -0
- package/dist/components/item.d.ts +16 -0
- package/dist/components/item.d.ts.map +1 -1
- package/dist/components/item.js +16 -0
- package/dist/components/kbd.d.ts +14 -0
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +14 -0
- package/dist/components/kpi-card.d.ts +21 -13
- package/dist/components/kpi-card.d.ts.map +1 -1
- package/dist/components/kpi-card.js +14 -3
- package/dist/components/label-system.d.ts +12 -0
- package/dist/components/label-system.d.ts.map +1 -1
- package/dist/components/label-system.js +12 -0
- package/dist/components/label.d.ts +15 -0
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +15 -0
- package/dist/components/library-shelf.d.ts +35 -0
- package/dist/components/library-shelf.d.ts.map +1 -0
- package/dist/components/library-shelf.js +40 -0
- package/dist/components/memory-item.d.ts +12 -0
- package/dist/components/memory-item.d.ts.map +1 -1
- package/dist/components/memory-item.js +12 -0
- package/dist/components/menu-choice-row.d.ts +13 -5
- package/dist/components/menu-choice-row.d.ts.map +1 -1
- package/dist/components/menu-choice-row.js +12 -6
- package/dist/components/menubar.d.ts +13 -0
- package/dist/components/menubar.d.ts.map +1 -1
- package/dist/components/menubar.js +13 -0
- package/dist/components/message-notice.d.ts +16 -0
- package/dist/components/message-notice.d.ts.map +1 -1
- package/dist/components/message-notice.js +18 -2
- package/dist/components/model-identity.d.ts +16 -3
- package/dist/components/model-identity.d.ts.map +1 -1
- package/dist/components/model-identity.js +16 -3
- package/dist/components/model-mark.d.ts +15 -2
- package/dist/components/model-mark.d.ts.map +1 -1
- package/dist/components/model-mark.js +36 -23
- package/dist/components/nadia-presence.d.ts +10 -4
- package/dist/components/nadia-presence.d.ts.map +1 -1
- package/dist/components/nadia-presence.js +10 -4
- package/dist/components/native-select.d.ts +16 -0
- package/dist/components/native-select.d.ts.map +1 -1
- package/dist/components/native-select.js +21 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu.js +14 -0
- package/dist/components/notice-banner.d.ts +10 -3
- package/dist/components/notice-banner.d.ts.map +1 -1
- package/dist/components/notice-banner.js +9 -3
- package/dist/components/numbered-steps.d.ts +33 -0
- package/dist/components/numbered-steps.d.ts.map +1 -0
- package/dist/components/numbered-steps.js +23 -0
- package/dist/components/object-page.d.ts +37 -0
- package/dist/components/object-page.d.ts.map +1 -0
- package/dist/components/object-page.js +19 -0
- package/dist/components/object-workspace.d.ts +26 -36
- package/dist/components/object-workspace.d.ts.map +1 -1
- package/dist/components/object-workspace.js +27 -24
- package/dist/components/overview-page.d.ts +24 -0
- package/dist/components/overview-page.d.ts.map +1 -0
- package/dist/components/overview-page.js +26 -0
- package/dist/components/page-actions.d.ts +28 -23
- package/dist/components/page-actions.d.ts.map +1 -1
- package/dist/components/page-actions.js +20 -14
- package/dist/components/page-header.d.ts +11 -5
- package/dist/components/page-header.d.ts.map +1 -1
- package/dist/components/page-header.js +11 -5
- package/dist/components/pagination.d.ts +15 -0
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +15 -0
- package/dist/components/pairing-code.d.ts +15 -4
- package/dist/components/pairing-code.d.ts.map +1 -1
- package/dist/components/pairing-code.js +15 -4
- package/dist/components/pending-label.d.ts +12 -4
- package/dist/components/pending-label.d.ts.map +1 -1
- package/dist/components/pending-label.js +12 -4
- package/dist/components/picture-label.d.ts +15 -7
- package/dist/components/picture-label.d.ts.map +1 -1
- package/dist/components/picture-label.js +15 -7
- package/dist/components/platform-mark.d.ts +12 -3
- package/dist/components/platform-mark.d.ts.map +1 -1
- package/dist/components/platform-mark.js +12 -3
- package/dist/components/plugin-slot-boundary.d.ts +15 -0
- package/dist/components/plugin-slot-boundary.d.ts.map +1 -1
- package/dist/components/plugin-slot-boundary.js +18 -1
- package/dist/components/popover.d.ts +15 -0
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +15 -0
- package/dist/components/portal-sidebar-frame.d.ts +26 -12
- package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
- package/dist/components/portal-sidebar-frame.js +26 -0
- package/dist/components/product-message.d.ts.map +1 -1
- package/dist/components/product-message.js +1 -0
- package/dist/components/progress.d.ts +10 -8
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +17 -16
- package/dist/components/qr-code.d.ts +9 -3
- package/dist/components/qr-code.d.ts.map +1 -1
- package/dist/components/qr-code.js +9 -3
- package/dist/components/radio-group.d.ts +15 -0
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +15 -0
- package/dist/components/reading-column.d.ts +11 -0
- package/dist/components/reading-column.d.ts.map +1 -1
- package/dist/components/reading-column.js +11 -0
- package/dist/components/record-identity.d.ts +12 -7
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +12 -7
- package/dist/components/record-list.d.ts +119 -0
- package/dist/components/record-list.d.ts.map +1 -0
- package/dist/components/record-list.js +161 -0
- package/dist/components/record-sheet.d.ts +36 -0
- package/dist/components/record-sheet.d.ts.map +1 -0
- package/dist/components/record-sheet.js +19 -0
- package/dist/components/record-time.d.ts +27 -11
- package/dist/components/record-time.d.ts.map +1 -1
- package/dist/components/record-time.js +35 -14
- package/dist/components/resizable.d.ts +10 -0
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +10 -0
- package/dist/components/row-edit-form.d.ts +8 -5
- package/dist/components/row-edit-form.d.ts.map +1 -1
- package/dist/components/row-edit-form.js +8 -5
- package/dist/components/run-timeline.d.ts +24 -11
- package/dist/components/run-timeline.d.ts.map +1 -1
- package/dist/components/run-timeline.js +13 -6
- package/dist/components/scope-switcher.d.ts +11 -0
- package/dist/components/scope-switcher.d.ts.map +1 -1
- package/dist/components/scope-switcher.js +20 -9
- package/dist/components/scroll-area.d.ts +12 -0
- package/dist/components/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area.js +12 -0
- package/dist/components/select.d.ts +16 -0
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +16 -0
- package/dist/components/separator.d.ts +11 -0
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +11 -0
- package/dist/components/settings-facts.d.ts +18 -1
- package/dist/components/settings-facts.d.ts.map +1 -1
- package/dist/components/settings-facts.js +20 -1
- package/dist/components/settings-page.d.ts +20 -0
- package/dist/components/settings-page.d.ts.map +1 -0
- package/dist/components/settings-page.js +16 -0
- package/dist/components/settings-section.d.ts +38 -8
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +33 -7
- package/dist/components/sheet.d.ts +16 -0
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +16 -0
- package/dist/components/sidebar-sections.d.ts +40 -0
- package/dist/components/sidebar-sections.d.ts.map +1 -0
- package/dist/components/sidebar-sections.js +35 -0
- package/dist/components/sidebar.d.ts +14 -1
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +24 -5
- package/dist/components/skeleton.d.ts +10 -0
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton.js +11 -1
- package/dist/components/slider.d.ts +14 -0
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +14 -0
- package/dist/components/sonner.d.ts +18 -0
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +23 -2
- package/dist/components/status-badge.d.ts +13 -2
- package/dist/components/status-badge.d.ts.map +1 -1
- package/dist/components/status-badge.js +21 -9
- package/dist/components/status-dot.d.ts +12 -0
- package/dist/components/status-dot.d.ts.map +1 -1
- package/dist/components/status-dot.js +12 -0
- package/dist/components/status-row.d.ts +14 -0
- package/dist/components/status-row.d.ts.map +1 -1
- package/dist/components/status-row.js +14 -0
- package/dist/components/switch.d.ts +15 -0
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +15 -0
- package/dist/components/table-card.d.ts +16 -3
- package/dist/components/table-card.d.ts.map +1 -1
- package/dist/components/table-card.js +16 -3
- package/dist/components/table-value.d.ts +24 -2
- package/dist/components/table-value.d.ts.map +1 -1
- package/dist/components/table-value.js +25 -3
- package/dist/components/table.d.ts +16 -0
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +17 -1
- package/dist/components/tabs.d.ts +27 -0
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +27 -0
- package/dist/components/tag.d.ts +12 -2
- package/dist/components/tag.d.ts.map +1 -1
- package/dist/components/tag.js +12 -2
- package/dist/components/text-link.d.ts +17 -0
- package/dist/components/text-link.d.ts.map +1 -1
- package/dist/components/text-link.js +17 -0
- package/dist/components/textarea.d.ts +14 -0
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +14 -0
- package/dist/components/theme-mode-switcher.d.ts +21 -0
- package/dist/components/theme-mode-switcher.d.ts.map +1 -1
- package/dist/components/theme-mode-switcher.js +23 -1
- package/dist/components/toggle-group.d.ts +13 -0
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +16 -1
- package/dist/components/toggle.d.ts +14 -0
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +14 -0
- package/dist/components/tool-icon.d.ts +14 -4
- package/dist/components/tool-icon.d.ts.map +1 -1
- package/dist/components/tool-icon.js +28 -19
- package/dist/components/tooltip.d.ts +15 -0
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +15 -0
- package/dist/components/trend-badge.d.ts +16 -1
- package/dist/components/trend-badge.d.ts.map +1 -1
- package/dist/components/trend-badge.js +16 -7
- package/dist/components/update-card.d.ts +36 -0
- package/dist/components/update-card.d.ts.map +1 -0
- package/dist/components/update-card.js +28 -0
- package/dist/components/usage-meter.d.ts +15 -0
- package/dist/components/usage-meter.d.ts.map +1 -1
- package/dist/components/usage-meter.js +20 -1
- package/dist/components/waiting-line.d.ts +13 -10
- package/dist/components/waiting-line.d.ts.map +1 -1
- package/dist/components/waiting-line.js +13 -10
- package/dist/eslint/index.js +9 -0
- package/dist/eslint/rules/empty-state-owner.js +145 -0
- package/dist/eslint/rules/jsx-class-utility.js +5 -0
- package/dist/eslint/rules/menu-owner.js +75 -0
- package/dist/eslint/rules/no-choice-control-wrapper.js +2 -0
- package/dist/eslint/rules/no-decorative-icon.js +164 -0
- package/dist/eslint/rules/no-deprecated-zod-api.js +1 -0
- package/dist/eslint/rules/no-shadcn-appearance-override.js +1 -0
- package/dist/eslint/rules/no-subject-derived-expectation.js +1 -1
- package/dist/eslint/rules/no-write-in-subscription.js +1 -0
- package/dist/eslint/rules/page-composition.js +232 -0
- package/dist/eslint/rules/rendered-import.js +121 -0
- package/dist/eslint/strict-design-system.js +1 -1
- package/dist/hooks/use-hydrated.d.ts +2 -0
- package/dist/hooks/use-hydrated.d.ts.map +1 -0
- package/dist/hooks/use-hydrated.js +7 -0
- package/dist/index.d.ts +15 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -10
- package/dist/internal/agent-orb.d.ts.map +1 -1
- package/dist/internal/agent-orb.js +2 -1
- package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
- package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
- package/dist/internal/assistant-ui/reasoning.js +3 -1
- package/dist/internal/assistant-ui/thread.js +3 -1
- package/dist/internal/assistant-ui/tool-fallback.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-fallback.js +13 -13
- package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-group.js +3 -1
- package/dist/internal/catalog-list.d.ts +14 -0
- package/dist/internal/catalog-list.d.ts.map +1 -0
- package/dist/internal/catalog-list.js +53 -0
- package/dist/internal/empty.d.ts +6 -9
- package/dist/internal/empty.d.ts.map +1 -1
- package/dist/internal/empty.js +24 -22
- package/dist/internal/footer-strip.d.ts +0 -4
- package/dist/internal/footer-strip.d.ts.map +1 -1
- package/dist/internal/footer-strip.js +0 -4
- package/dist/internal/record-menu-items.d.ts +19 -0
- package/dist/internal/record-menu-items.d.ts.map +1 -0
- package/dist/internal/record-menu-items.js +20 -0
- package/dist/internal/settings-save.d.ts +43 -0
- package/dist/internal/settings-save.d.ts.map +1 -0
- package/dist/internal/settings-save.js +147 -0
- package/dist/lib/theme-mode.d.ts +1 -1
- package/dist/lib/theme-mode.js +2 -2
- package/dist/lib/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/lib/use-copy-to-clipboard.js +1 -0
- package/dist/showcase/assets.d.ts +8 -0
- package/dist/showcase/assets.d.ts.map +1 -0
- package/dist/showcase/assets.js +13 -0
- package/dist/showcase/foundations.d.ts +2 -0
- package/dist/showcase/foundations.d.ts.map +1 -0
- package/dist/showcase/foundations.js +61 -0
- package/dist/showcase/samples.d.ts +21 -0
- package/dist/showcase/samples.d.ts.map +1 -0
- package/dist/showcase/samples.js +48 -0
- package/dist/showcase/showcase.d.ts +10 -0
- package/dist/showcase/showcase.d.ts.map +1 -0
- package/dist/showcase/showcase.js +44 -0
- package/dist/showcase/specimens/actions.d.ts +7 -0
- package/dist/showcase/specimens/actions.d.ts.map +1 -0
- package/dist/showcase/specimens/actions.js +15 -0
- package/dist/showcase/specimens/charts.d.ts +17 -0
- package/dist/showcase/specimens/charts.d.ts.map +1 -0
- package/dist/showcase/specimens/charts.js +104 -0
- package/dist/showcase/specimens/choices.d.ts +21 -0
- package/dist/showcase/specimens/choices.d.ts.map +1 -0
- package/dist/showcase/specimens/choices.js +68 -0
- package/dist/showcase/specimens/compositions.d.ts +39 -0
- package/dist/showcase/specimens/compositions.d.ts.map +1 -0
- package/dist/showcase/specimens/compositions.js +270 -0
- package/dist/showcase/specimens/data.d.ts +31 -0
- package/dist/showcase/specimens/data.d.ts.map +1 -0
- package/dist/showcase/specimens/data.js +111 -0
- package/dist/showcase/specimens/feedback.d.ts +23 -0
- package/dist/showcase/specimens/feedback.d.ts.map +1 -0
- package/dist/showcase/specimens/feedback.js +64 -0
- package/dist/showcase/specimens/index.d.ts +164 -0
- package/dist/showcase/specimens/index.d.ts.map +1 -0
- package/dist/showcase/specimens/index.js +24 -0
- package/dist/showcase/specimens/inputs.d.ts +22 -0
- package/dist/showcase/specimens/inputs.d.ts.map +1 -0
- package/dist/showcase/specimens/inputs.js +60 -0
- package/dist/showcase/specimens/menus.d.ts +20 -0
- package/dist/showcase/specimens/menus.d.ts.map +1 -0
- package/dist/showcase/specimens/menus.js +65 -0
- package/dist/showcase/specimens/navigation.d.ts +22 -0
- package/dist/showcase/specimens/navigation.d.ts.map +1 -0
- package/dist/showcase/specimens/navigation.js +103 -0
- package/dist/showcase/specimens/other.d.ts +26 -0
- package/dist/showcase/specimens/other.d.ts.map +1 -0
- package/dist/showcase/specimens/other.js +73 -0
- package/dist/showcase/specimens/specimen.d.ts +5 -0
- package/dist/showcase/specimens/specimen.d.ts.map +1 -0
- package/dist/showcase/specimens/specimen.js +1 -0
- package/dist/showcase/specimens/status.d.ts +22 -0
- package/dist/showcase/specimens/status.d.ts.map +1 -0
- package/dist/showcase/specimens/status.js +44 -0
- package/dist/showcase/usage.generated.d.ts +16 -0
- package/dist/showcase/usage.generated.d.ts.map +1 -0
- package/dist/showcase/usage.generated.js +1788 -0
- package/dist/standalone/index.js +2 -2
- package/dist/standalone/orb-page.js +1 -0
- package/dist/styles/components.css +21 -0
- package/package.json +8 -3
- package/dist/components/automation-section.d.ts +0 -78
- package/dist/components/automation-section.d.ts.map +0 -1
- package/dist/components/automation-section.js +0 -75
- package/dist/components/catalog-tile.d.ts +0 -19
- package/dist/components/catalog-tile.d.ts.map +0 -1
- package/dist/components/catalog-tile.js +0 -13
- package/dist/components/feedback-state.d.ts +0 -14
- package/dist/components/feedback-state.d.ts.map +0 -1
- package/dist/components/feedback-state.js +0 -65
- package/dist/components/installer-shell.d.ts +0 -25
- package/dist/components/installer-shell.d.ts.map +0 -1
- package/dist/components/installer-shell.js +0 -32
- package/dist/components/settings-form.d.ts +0 -9
- package/dist/components/settings-form.d.ts.map +0 -1
- package/dist/components/settings-form.js +0 -85
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/reasoning.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAiB,KAAK,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAExF,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAM/F,QAAA,MAAM,iBAAiB;;8EAWrB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GACC,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,YAAY,EAAE,sBAAsB,EACpC,WAAmB,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/reasoning.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAiB,KAAK,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAExF,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAM/F,QAAA,MAAM,iBAAiB;;8EAWrB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GACC,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,YAAY,EAAE,sBAAsB,EACpC,WAAmB,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,+BAuDpB;AAkCD,iBAAS,gBAAgB,CAAC,EACxB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,+BAmCA;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,+BAmBjD;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BA6DpF;AAID,QAAA,MAAM,SAAS,EAAE,6BAAmD,CAAC;AAIrE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -49,7 +49,9 @@ function ReasoningRoot({ className, variant, open: controlledOpen, onOpenChange:
|
|
|
49
49
|
}
|
|
50
50
|
controlledOnOpenChange?.(open);
|
|
51
51
|
}, [lockScroll, isControlled, controlledOnOpenChange]);
|
|
52
|
-
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "reasoning-root", "data-variant": variant, open: isOpen, onOpenChange: handleOpenChange, className: cn("group/reasoning-root", reasoningVariants({ variant, className })),
|
|
52
|
+
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "reasoning-root", "data-variant": variant, open: isOpen, onOpenChange: handleOpenChange, className: cn("group/reasoning-root", reasoningVariants({ variant, className })),
|
|
53
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
54
|
+
style: {
|
|
53
55
|
"--animation-duration": disclosureDuration,
|
|
54
56
|
}, ...props, children: _jsx(ReasoningPreviewContext.Provider, { value: isPreview, children: children }) }));
|
|
55
57
|
}
|
|
@@ -25,7 +25,9 @@ export const Thread = ({ components = EMPTY_COMPONENTS }) => {
|
|
|
25
25
|
};
|
|
26
26
|
const ThreadRoot = ({ isEmpty }) => {
|
|
27
27
|
const { Welcome = ThreadWelcome } = useContext(ThreadComponentsContext);
|
|
28
|
-
return (_jsx(ThreadPrimitive.Root, { className: "aui-root aui-thread-root bg-background @container flex h-full flex-col",
|
|
28
|
+
return (_jsx(ThreadPrimitive.Root, { className: "aui-root aui-thread-root bg-background @container flex h-full flex-col",
|
|
29
|
+
// SAFETY: CSSProperties lists only standard properties; widening each `--` key to string lets the literal pass as a style object, and React sets each through style.setProperty.
|
|
30
|
+
style: {
|
|
29
31
|
["--thread-max-width"]: "44rem",
|
|
30
32
|
["--composer-bg"]: "var(--color-muted)",
|
|
31
33
|
["--composer-radius"]: "var(--radius-md)",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-fallback.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/tool-fallback.tsx"],"names":[],"mappings":"AAUA,OAAO,EAOL,KAAK,4BAA4B,EAClC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAA0C,MAAM,0BAA0B,CAAC;AAO/F,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GAAG;IACF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-fallback.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/tool-fallback.tsx"],"names":[],"mappings":"AAUA,OAAO,EAOL,KAAK,4BAA4B,EAClC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAA0C,MAAM,0BAA0B,CAAC;AAO/F,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GAAG;IACF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAudF,QAAA,MAAM,YAAY,EAAE,4BAAqD,CAAC;AAI1E,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -21,7 +21,9 @@ function ToolFallbackRoot({ className, open: controlledOpen, onOpenChange: contr
|
|
|
21
21
|
}
|
|
22
22
|
controlledOnOpenChange?.(open);
|
|
23
23
|
}, [lockScroll, isControlled, controlledOnOpenChange]);
|
|
24
|
-
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "tool-fallback-root", open: isOpen, onOpenChange: handleOpenChange, className: cn("aui-tool-fallback-root group/tool-fallback-root w-full", className),
|
|
24
|
+
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "tool-fallback-root", open: isOpen, onOpenChange: handleOpenChange, className: cn("aui-tool-fallback-root group/tool-fallback-root w-full", className),
|
|
25
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
26
|
+
style: {
|
|
25
27
|
"--animation-duration": disclosureDuration,
|
|
26
28
|
}, ...props, children: children }));
|
|
27
29
|
}
|
|
@@ -73,6 +75,7 @@ function ToolFallbackError({ status, className, ...props }) {
|
|
|
73
75
|
if (status?.type !== "incomplete")
|
|
74
76
|
return null;
|
|
75
77
|
const error = status.error;
|
|
78
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- assistant-ui types a tool error as unknown; a string shows as is and anything else as JSON.
|
|
76
79
|
const errorText = error ? (typeof error === "string" ? error : JSON.stringify(error)) : null;
|
|
77
80
|
if (!errorText)
|
|
78
81
|
return null;
|
|
@@ -82,18 +85,14 @@ function ToolFallbackError({ status, className, ...props }) {
|
|
|
82
85
|
}
|
|
83
86
|
const APPROVED_RESULT = "Approved by user";
|
|
84
87
|
const DENIED_RESULT = "User denied tool execution";
|
|
85
|
-
const APPROVAL_OPTION_DEFAULT_LABELS =
|
|
86
|
-
"allow-once"
|
|
87
|
-
"allow-always"
|
|
88
|
-
"reject-once"
|
|
89
|
-
"reject-always"
|
|
90
|
-
|
|
88
|
+
const APPROVAL_OPTION_DEFAULT_LABELS = new Map([
|
|
89
|
+
["allow-once", "Allow"],
|
|
90
|
+
["allow-always", "Always allow"],
|
|
91
|
+
["reject-once", "Deny"],
|
|
92
|
+
["reject-always", "Always deny"],
|
|
93
|
+
]);
|
|
91
94
|
const isAllowKind = (kind) => kind === "allow-once" || kind === "allow-always";
|
|
92
|
-
const approvalOptionLabel = (option) => option.label ??
|
|
93
|
-
(Object.hasOwn(APPROVAL_OPTION_DEFAULT_LABELS, option.kind)
|
|
94
|
-
? APPROVAL_OPTION_DEFAULT_LABELS[option.kind]
|
|
95
|
-
: undefined) ??
|
|
96
|
-
option.id;
|
|
95
|
+
const approvalOptionLabel = (option) => option.label ?? APPROVAL_OPTION_DEFAULT_LABELS.get(option.kind) ?? option.id;
|
|
97
96
|
function ToolFallbackApproval({ className, addResult, resume, interrupt, approval, respondToApproval, ...props }) {
|
|
98
97
|
const [submitted, setSubmitted] = useState(false);
|
|
99
98
|
const [confirmingId, setConfirmingId] = useState(null);
|
|
@@ -104,7 +103,7 @@ function ToolFallbackApproval({ className, addResult, resume, interrupt, approva
|
|
|
104
103
|
// a host constraint: the kit never adds an approval path beyond it, but
|
|
105
104
|
// always preserves a refusal path.
|
|
106
105
|
const declaredOptions = respondToApproval ? approval?.options : undefined;
|
|
107
|
-
const options = declaredOptions?.filter((o) =>
|
|
106
|
+
const options = declaredOptions?.filter((o) => APPROVAL_OPTION_DEFAULT_LABELS.has(o.kind));
|
|
108
107
|
const respond = (approved) => {
|
|
109
108
|
if (submitted)
|
|
110
109
|
return;
|
|
@@ -136,6 +135,7 @@ function ToolFallbackApproval({ className, addResult, resume, interrupt, approva
|
|
|
136
135
|
};
|
|
137
136
|
const confirming = confirmingId != null ? options?.find((o) => o.id === confirmingId) : undefined;
|
|
138
137
|
if (confirming) {
|
|
138
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- an approval option's confirm is a boolean or a details object; only typeof tells them apart.
|
|
139
139
|
const confirmMeta = typeof confirming.confirm === "object" ? confirming.confirm : undefined;
|
|
140
140
|
const confirmDescription = confirmMeta?.description ?? confirming.description;
|
|
141
141
|
return (_jsxs("div", { "data-slot": "tool-fallback-approval-confirm", className: cn("aui-tool-fallback-approval-confirm flex flex-col gap-2 pt-1", className), ...props, children: [_jsx("p", { className: "aui-tool-fallback-approval-confirm-title font-semibold", children: confirmMeta?.title ?? `${approvalOptionLabel(confirming)}?` }), confirmDescription && (_jsx("p", { className: "aui-tool-fallback-approval-confirm-description text-muted-foreground", children: confirmDescription })), confirming.grants && confirming.grants.length > 0 && (_jsx("ul", { className: "aui-tool-fallback-approval-confirm-grants flex flex-col gap-1", children: confirming.grants.map((grant) => (_jsx("li", { children: _jsx("code", { className: "aui-tool-fallback-approval-confirm-grant bg-muted rounded px-1.5 py-0.5 text-xs", children: grant }) }, grant))) })), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { size: "sm", className: pressable, onClick: () => respondWithOption(confirming), disabled: submitted, children: "Confirm" }), _jsx(Button, { size: "sm", variant: "outline", className: pressable, onClick: () => setConfirmingId(null), disabled: submitted, children: "Back" })] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-group.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/tool-group.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI/F,QAAA,MAAM,iBAAiB;;8EASrB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GACC,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,YAAY,EAAE,sBAAsB,EACpC,WAAmB,EACnB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"tool-group.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/tool-group.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI/F,QAAA,MAAM,iBAAiB;;8EASrB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GACC,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,YAAY,EAAE,sBAAsB,EACpC,WAAmB,EACnB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,+BAsCpB;AAED,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,MAAc,EACd,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,+BAwCA;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,+BAyBjD;AAED,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -30,7 +30,9 @@ function ToolGroupRoot({ className, variant, open: controlledOpen, onOpenChange:
|
|
|
30
30
|
}
|
|
31
31
|
controlledOnOpenChange?.(open);
|
|
32
32
|
}, [lockScroll, isControlled, controlledOnOpenChange]);
|
|
33
|
-
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "tool-group-root", "data-variant": variant ?? "outline", open: isOpen, onOpenChange: handleOpenChange, className: cn(toolGroupVariants({ variant }), "group/tool-group-root", className),
|
|
33
|
+
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "tool-group-root", "data-variant": variant ?? "outline", open: isOpen, onOpenChange: handleOpenChange, className: cn(toolGroupVariants({ variant }), "group/tool-group-root", className),
|
|
34
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
35
|
+
style: {
|
|
34
36
|
"--animation-duration": disclosureDuration,
|
|
35
37
|
}, ...props, children: children }));
|
|
36
38
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CatalogSection } from "../components/catalog-entry.js";
|
|
2
|
+
type CatalogColumns = 1 | 2;
|
|
3
|
+
export declare function CatalogList({ columns, headingLevel, sections, }: {
|
|
4
|
+
columns: CatalogColumns;
|
|
5
|
+
headingLevel?: 2 | 3;
|
|
6
|
+
sections: readonly CatalogSection[];
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function CatalogSkeleton({ columns, label }: {
|
|
9
|
+
columns: CatalogColumns;
|
|
10
|
+
label: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export declare function catalogIsEmpty(sections: readonly CatalogSection[]): boolean;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=catalog-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-list.d.ts","sourceRoot":"","sources":["../../src/internal/catalog-list.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,4BAA4B,CAAC;AASpF,KAAK,cAAc,GAAG,CAAC,GAAG,CAAC,CAAC;AAqG5B,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,YAAgB,EAChB,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,cAAc,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACrB,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC,+BAqBA;AAED,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,+BAoB7F;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,OAAO,CAE3E"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, PlusIcon } from "lucide-react";
|
|
4
|
+
import { useId } from "react";
|
|
5
|
+
import { ActionMenu } from "../components/action-menu.js";
|
|
6
|
+
import { IdentityMark } from "../components/identity-mark.js";
|
|
7
|
+
import { PageCommandButton } from "../components/page-actions.js";
|
|
8
|
+
import { Skeleton } from "../components/skeleton.js";
|
|
9
|
+
import { textLinkVariants } from "../components/text-link.js";
|
|
10
|
+
import { soleMenuButton } from "./record-menu-items.js";
|
|
11
|
+
import { RowMessageActions, RowMessageLine } from "./row-message.js";
|
|
12
|
+
import { cn } from "../lib/utils.js";
|
|
13
|
+
const ENTRY_FRAME = "flex min-w-0 items-start gap-3.5 rounded-sm bg-card p-4 nc-elevation-resting";
|
|
14
|
+
function EntryName({ link, name }) {
|
|
15
|
+
if (!link)
|
|
16
|
+
return name;
|
|
17
|
+
const anchor = {
|
|
18
|
+
href: link.href,
|
|
19
|
+
children: name,
|
|
20
|
+
className: textLinkVariants({ kind: "plain" }),
|
|
21
|
+
};
|
|
22
|
+
return link.renderLink ? link.renderLink(anchor) : _jsx("a", { ...anchor });
|
|
23
|
+
}
|
|
24
|
+
function EntryAdd({ add }) {
|
|
25
|
+
const { added, ...command } = add;
|
|
26
|
+
if (added) {
|
|
27
|
+
return (_jsxs("span", { className: "flex h-control-height items-center gap-1.5 px-1 text-sm text-muted-foreground", children: [_jsx(CheckIcon, { "aria-hidden": "true", className: "size-4" }), added.label] }));
|
|
28
|
+
}
|
|
29
|
+
return (_jsx(PageCommandButton, { command: { ...command, icon: _jsx(PlusIcon, { "aria-hidden": "true" }) }, variant: "outline" }));
|
|
30
|
+
}
|
|
31
|
+
function CatalogEntry({ add, description, fact, link, mark, menu, name, state, }) {
|
|
32
|
+
const menuButton = add || !menu ? undefined : soleMenuButton(menu.commands);
|
|
33
|
+
return (_jsxs("li", { className: ENTRY_FRAME, "data-slot": "catalog-entry", children: [_jsx(IdentityMark, { ...mark, size: 40 }), _jsxs("div", { className: "grid min-w-0 flex-1 gap-0.5", children: [_jsx("span", { className: "truncate text-sm font-medium text-foreground", children: _jsx(EntryName, { link: link, name: name }) }), _jsx("p", { className: cn("text-body-sm text-muted-foreground", !state && "line-clamp-1"), children: state ? _jsx(RowMessageLine, { state: state }) : description })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [fact, state ? _jsx(RowMessageActions, { state: state }) : null, add ? _jsx(EntryAdd, { add: add }) : null, menuButton ? _jsx(PageCommandButton, { command: menuButton, variant: "outline" }) : null, menu && !menuButton ? (_jsx(ActionMenu, { commands: menu.commands, label: menu.label, record: name })) : null] })] }));
|
|
34
|
+
}
|
|
35
|
+
function EntryList({ columns, entries, }) {
|
|
36
|
+
return (_jsx("ul", { className: cn("grid gap-3", columns === 2 && "md:grid-cols-2"), children: entries.map((entry) => (_jsx(CatalogEntry, { ...entry }, entry.id))) }));
|
|
37
|
+
}
|
|
38
|
+
function TitledSection({ columns, entries, headingLevel, title, }) {
|
|
39
|
+
const headingId = useId();
|
|
40
|
+
const Heading = headingLevel === 2 ? "h2" : "h3";
|
|
41
|
+
return (_jsxs("section", { "aria-labelledby": headingId, className: "grid min-w-0 gap-3", children: [_jsx(Heading, { className: "text-heading-sm text-foreground", id: headingId, children: title }), _jsx(EntryList, { columns: columns, entries: entries })] }));
|
|
42
|
+
}
|
|
43
|
+
export function CatalogList({ columns, headingLevel = 3, sections, }) {
|
|
44
|
+
return (_jsx("div", { className: "grid min-w-0 gap-8", children: sections
|
|
45
|
+
.filter((section) => section.entries.length > 0)
|
|
46
|
+
.map(({ id, title, entries }) => title ? (_jsx(TitledSection, { columns: columns, entries: entries, headingLevel: headingLevel, id: id, title: title }, id)) : (_jsx(EntryList, { columns: columns, entries: entries }, id))) }));
|
|
47
|
+
}
|
|
48
|
+
export function CatalogSkeleton({ columns, label }) {
|
|
49
|
+
return (_jsx("div", { "aria-busy": "true", "aria-label": label, className: cn("grid gap-3", columns === 2 && "md:grid-cols-2"), role: "status", children: Array.from({ length: columns * 3 }, (_, index) => (_jsxs("div", { "aria-hidden": "true", className: ENTRY_FRAME, children: [_jsx(Skeleton, { className: "size-10 shrink-0" }), _jsxs("div", { className: "grid flex-1 gap-1.5 pt-0.5", children: [_jsx(Skeleton, { className: "h-4 w-32" }), _jsx(Skeleton, { className: "h-3.5 w-full" })] }), _jsx(Skeleton, { className: "h-control-height w-16 shrink-0" })] }, index))) }));
|
|
50
|
+
}
|
|
51
|
+
export function catalogIsEmpty(sections) {
|
|
52
|
+
return sections.every((section) => section.entries.length === 0);
|
|
53
|
+
}
|
package/dist/internal/empty.d.ts
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { type VariantProps } from "class-variance-authority";
|
|
2
1
|
type EmptyScope = "page" | "region" | "card";
|
|
3
|
-
declare function Empty({ className, scope,
|
|
2
|
+
declare function Empty({ className, scope, ...props }: React.ComponentProps<"div"> & {
|
|
4
3
|
scope?: EmptyScope;
|
|
5
|
-
presentation?: "plain" | "illustrated";
|
|
6
4
|
}): import("react").JSX.Element;
|
|
7
5
|
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
8
|
-
declare
|
|
9
|
-
variant
|
|
10
|
-
}
|
|
11
|
-
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react").JSX.Element;
|
|
6
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & {
|
|
7
|
+
variant: "picture" | "warning";
|
|
8
|
+
}): import("react").JSX.Element;
|
|
12
9
|
type EmptyPictureSize = "page" | "card";
|
|
13
10
|
declare function EmptyPicture({ size, src }: {
|
|
14
|
-
size
|
|
11
|
+
size: EmptyPictureSize;
|
|
15
12
|
src: string;
|
|
16
13
|
}): import("react").JSX.Element;
|
|
17
14
|
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
18
|
-
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"
|
|
15
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
19
16
|
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
20
17
|
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, EmptyPicture, type EmptyPictureSize, type EmptyScope, };
|
|
21
18
|
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/internal/empty.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/internal/empty.tsx"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7C,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,KAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,+BActD;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQxE;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,OAAO,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE,+BAelE;AAED,KAAK,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,iBAAS,YAAY,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,+BA0B3E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAW7E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQzE;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,UAAU,GAChB,CAAC"}
|
package/dist/internal/empty.js
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
-
function Empty({ className, scope = "region",
|
|
5
|
-
return (_jsx("div", { "data-slot": "empty", className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center
|
|
4
|
+
function Empty({ className, scope = "region", ...props }) {
|
|
5
|
+
return (_jsx("div", { "data-slot": "empty", className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center", scope === "page" ? "px-6 pt-10 pb-11" : "px-5 py-7", scope !== "card" && "rounded-sm bg-card nc-elevation-resting", className), ...props, "data-scope": scope }));
|
|
6
6
|
}
|
|
7
7
|
function EmptyHeader({ className, ...props }) {
|
|
8
|
-
return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm flex-col items-center gap-
|
|
8
|
+
return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm min-w-0 flex-col items-center gap-4", className), ...props }));
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
default: "bg-transparent",
|
|
14
|
-
icon: "flex size-control-height shrink-0 items-center justify-center rounded-sm border border-border bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: "default",
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
function EmptyMedia({ className, variant = "default", ...props }) {
|
|
22
|
-
return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })), ...props }));
|
|
10
|
+
function EmptyMedia({ className, variant, ...props }) {
|
|
11
|
+
return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn("flex shrink-0 justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", variant === "warning" &&
|
|
12
|
+
"size-9 items-center rounded-md bg-destructive-soft text-destructive [&_svg:not([class*='size-'])]:size-4", variant === "picture" && "items-end", className), ...props }));
|
|
23
13
|
}
|
|
24
|
-
function EmptyPicture({ size
|
|
25
|
-
|
|
14
|
+
function EmptyPicture({ size, src }) {
|
|
15
|
+
const [loaded, setLoaded] = useState(false);
|
|
16
|
+
const arriveOnLoad = useCallback((img) => {
|
|
17
|
+
if (!img)
|
|
18
|
+
return;
|
|
19
|
+
if (img.complete && img.naturalWidth > 0) {
|
|
20
|
+
setLoaded(true);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const show = () => setLoaded(true);
|
|
24
|
+
img.addEventListener("load", show, { once: true });
|
|
25
|
+
return () => img.removeEventListener("load", show);
|
|
26
|
+
}, []);
|
|
27
|
+
return (_jsx(EmptyMedia, { className: size === "page" ? "h-44 w-60" : "h-36 w-50", variant: "picture", children: _jsx("img", { alt: "", className: "max-h-full max-w-full object-contain object-bottom select-none", "data-loaded": loaded ? "" : undefined, "data-size": size, "data-slot": "empty-picture", draggable: false, ref: arriveOnLoad, src: src }) }));
|
|
26
28
|
}
|
|
27
29
|
function EmptyTitle({ className, ...props }) {
|
|
28
|
-
return _jsx("div", { "data-slot": "empty-title", className: cn("text-heading-xs", className), ...props });
|
|
30
|
+
return (_jsx("div", { "data-slot": "empty-title", className: cn("text-heading-xs text-foreground", className), ...props }));
|
|
29
31
|
}
|
|
30
32
|
function EmptyDescription({ className, ...props }) {
|
|
31
|
-
return (_jsx("div", { "data-slot": "empty-description", className: cn("text-body-sm text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
|
|
33
|
+
return (_jsx("div", { "data-slot": "empty-description", className: cn("max-w-[38ch] text-body-sm text-balance text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
|
|
32
34
|
}
|
|
33
35
|
function EmptyContent({ className, ...props }) {
|
|
34
|
-
return (_jsx("div", { "data-slot": "empty-content", className: cn("flex
|
|
36
|
+
return (_jsx("div", { "data-slot": "empty-content", className: cn("flex min-w-0 flex-wrap items-center justify-center gap-2", className), ...props }));
|
|
35
37
|
}
|
|
36
38
|
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, EmptyPicture, };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* The strip a settings section and a table card close with (DESIGN.md "Settings cards"), drawn once so the two never
|
|
4
|
-
* drift apart.
|
|
5
|
-
*/
|
|
6
2
|
declare function FooterStrip({ hint, hintSlot, children, }: {
|
|
7
3
|
hint?: React.ReactNode;
|
|
8
4
|
hintSlot: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer-strip.d.ts","sourceRoot":"","sources":["../../src/internal/footer-strip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B
|
|
1
|
+
{"version":3,"file":"footer-strip.d.ts","sourceRoot":"","sources":["../../src/internal/footer-strip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,WAAW,CAAC,EACnB,IAAI,EACJ,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,4BAeA;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CardFooter } from "../components/card.js";
|
|
3
|
-
/**
|
|
4
|
-
* The strip a settings section and a table card close with (DESIGN.md "Settings cards"), drawn once so the two never
|
|
5
|
-
* drift apart.
|
|
6
|
-
*/
|
|
7
3
|
function FooterStrip({ hint, hintSlot, children, }) {
|
|
8
4
|
if (!hint && !children) {
|
|
9
5
|
return null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { MenuCommand, RecordMenu } from "../components/action-menu.js";
|
|
3
|
+
import type { PageCommandAction } from "../components/page-actions.js";
|
|
4
|
+
export declare function menuItemAction(action: PageCommandAction): {
|
|
5
|
+
render: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
6
|
+
nativeButton: boolean;
|
|
7
|
+
onClick?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
onClick: (event: import("react").MouseEvent<HTMLElement>) => void;
|
|
10
|
+
render?: undefined;
|
|
11
|
+
nativeButton?: undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare function MenuCommandRow({ command, value }: {
|
|
14
|
+
command: MenuCommand;
|
|
15
|
+
value?: ReactNode;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
export declare function soleMenuButton(commands: readonly MenuCommand[]): MenuCommand | undefined;
|
|
18
|
+
export declare function RecordMenuItems({ record, commands }: Omit<RecordMenu, "label">): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=record-menu-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-menu-items.d.ts","sourceRoot":"","sources":["../../src/internal/record-menu-items.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAQxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB;;;;;;;;EAIvD;AAED,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,+BAqB7F;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,GAAG,SAAS,CAGxF;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,+BAe9E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { DropdownMenuCommand, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, } from "../components/dropdown-menu.js";
|
|
4
|
+
export function menuItemAction(action) {
|
|
5
|
+
return action.render
|
|
6
|
+
? { render: action.render, nativeButton: action.render.type === "button" }
|
|
7
|
+
: { onClick: action.onClick };
|
|
8
|
+
}
|
|
9
|
+
export function MenuCommandRow({ command, value }) {
|
|
10
|
+
return (_jsx(DropdownMenuCommand, { "aria-label": command.accessibleName, disabled: command.disabled, icon: command.icon, detail: command.detail, reason: command.reason, variant: command.destructive ? "destructive" : "default", ...menuItemAction(command), children: value === undefined ? (command.label) : (_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "min-w-0 flex-1", children: command.label }), " ", _jsx(DropdownMenuShortcut, { children: value })] })) }));
|
|
11
|
+
}
|
|
12
|
+
export function soleMenuButton(commands) {
|
|
13
|
+
const [only] = commands;
|
|
14
|
+
return commands.length === 1 && only && !only.destructive ? only : undefined;
|
|
15
|
+
}
|
|
16
|
+
export function RecordMenuItems({ record, commands }) {
|
|
17
|
+
const kept = commands.filter((command) => !command.destructive);
|
|
18
|
+
const destructive = commands.filter((command) => command.destructive);
|
|
19
|
+
return (_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: record }), kept.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label))), kept.length > 0 && destructive.length > 0 ? _jsx(DropdownMenuSeparator, {}) : null, destructive.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label)))] }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ResolvedMessage } from "../components/product-message.js";
|
|
3
|
+
export type SettingsSaveFailure = {
|
|
4
|
+
message: ResolvedMessage;
|
|
5
|
+
/** The SettingsField id the failure is about: shown under it. Absent: above the footer. */
|
|
6
|
+
field?: string;
|
|
7
|
+
};
|
|
8
|
+
export type SettingsSave = {
|
|
9
|
+
/** Saves the section's fields; resolves to null once saved. */
|
|
10
|
+
action: (formData: FormData) => Promise<SettingsSaveFailure | null>;
|
|
11
|
+
/** "Save" */
|
|
12
|
+
label: string;
|
|
13
|
+
/** "Saving" */
|
|
14
|
+
pendingLabel: string;
|
|
15
|
+
/** "Saved" */
|
|
16
|
+
savedLabel: string;
|
|
17
|
+
/** The footer's left side until a save: "Saved for every device you sign in on." */
|
|
18
|
+
hint?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* An in-place edit of an object's section closes without saving. A cancel that runs work of its own, such as
|
|
21
|
+
* undoing a half-done setup on a server, says `pendingLabel` while `pending`.
|
|
22
|
+
*/
|
|
23
|
+
cancel?: {
|
|
24
|
+
label: string;
|
|
25
|
+
onCancel: () => void;
|
|
26
|
+
pending?: boolean;
|
|
27
|
+
pendingLabel?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Whether the fields differ from what is saved, for a section whose fields are controlled.
|
|
31
|
+
* Left out, the section compares its named, uncontrolled fields with their defaults.
|
|
32
|
+
*/
|
|
33
|
+
changed?: boolean;
|
|
34
|
+
};
|
|
35
|
+
export declare function SettingsSaveForm({ save, titleId, children, }: {
|
|
36
|
+
save: SettingsSave;
|
|
37
|
+
titleId: string;
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
40
|
+
export declare function SettingsFieldFailure({ id }: {
|
|
41
|
+
id: string;
|
|
42
|
+
}): import("react").JSX.Element | null;
|
|
43
|
+
//# sourceMappingURL=settings-save.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-save.d.ts","sourceRoot":"","sources":["../../src/internal/settings-save.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAOf,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAOtF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAC;IACzB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,+DAA+D;IAC/D,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACpE,aAAa;IACb,KAAK,EAAE,MAAM,CAAC;IACd,eAAe;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3F;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAsHF,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAO,EACP,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAoFA;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,sCA2B1D"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CircleCheck } from "lucide-react";
|
|
4
|
+
import { createContext, use, useCallback, useEffect, useRef, useState, } from "react";
|
|
5
|
+
import { useFormStatus } from "react-dom";
|
|
6
|
+
import { Button } from "../components/button.js";
|
|
7
|
+
import { FieldError } from "../components/field.js";
|
|
8
|
+
import { MessageNotice } from "../components/message-notice.js";
|
|
9
|
+
import { PendingLabel } from "../components/pending-label.js";
|
|
10
|
+
import { messageSentences } from "../components/product-message.js";
|
|
11
|
+
import { CardContent } from "../components/card.js";
|
|
12
|
+
import { WaitingLine } from "../components/waiting-line.js";
|
|
13
|
+
import { useHydrated } from "../hooks/use-hydrated.js";
|
|
14
|
+
import { FooterStrip } from "./footer-strip.js";
|
|
15
|
+
import { FormSubmitButton } from "./form-submit.js";
|
|
16
|
+
const SettingsSaveContext = createContext(null);
|
|
17
|
+
function editableControls(form) {
|
|
18
|
+
return Array.from(form.elements).filter((control) => {
|
|
19
|
+
if (control instanceof HTMLInputElement) {
|
|
20
|
+
return (Boolean(control.name) &&
|
|
21
|
+
!control.disabled &&
|
|
22
|
+
!control.readOnly &&
|
|
23
|
+
!["hidden", "submit", "reset", "button"].includes(control.type));
|
|
24
|
+
}
|
|
25
|
+
if (control instanceof HTMLTextAreaElement) {
|
|
26
|
+
return Boolean(control.name) && !control.disabled && !control.readOnly;
|
|
27
|
+
}
|
|
28
|
+
return control instanceof HTMLSelectElement && Boolean(control.name) && !control.disabled;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function hasChangedFields(form) {
|
|
32
|
+
return editableControls(form).some((control) => {
|
|
33
|
+
if (control instanceof HTMLInputElement) {
|
|
34
|
+
if (control.type === "checkbox" || control.type === "radio") {
|
|
35
|
+
return control.checked !== control.defaultChecked;
|
|
36
|
+
}
|
|
37
|
+
return control.value !== control.defaultValue;
|
|
38
|
+
}
|
|
39
|
+
if (control instanceof HTMLTextAreaElement) {
|
|
40
|
+
return control.value !== control.defaultValue;
|
|
41
|
+
}
|
|
42
|
+
const options = Array.from(control.options);
|
|
43
|
+
const hasDefault = options.some((option) => option.defaultSelected);
|
|
44
|
+
const fallback = options.findIndex((option) => !option.disabled);
|
|
45
|
+
return options.some((option, index) => option.selected !==
|
|
46
|
+
(option.defaultSelected || (!control.multiple && !hasDefault && index === fallback)));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function editableValues(form) {
|
|
50
|
+
const names = new Set(editableControls(form).map((control) => control.name));
|
|
51
|
+
return JSON.stringify(Array.from(new FormData(form))
|
|
52
|
+
.filter(([name]) => names.has(name))
|
|
53
|
+
.map(([name, value]) => value instanceof File
|
|
54
|
+
? [name, [value.name, value.size, value.type, value.lastModified]]
|
|
55
|
+
: [name, value]));
|
|
56
|
+
}
|
|
57
|
+
function SaveFooter({ save, changed, saved, }) {
|
|
58
|
+
const { pending } = useFormStatus();
|
|
59
|
+
return (_jsxs(FooterStrip, { hint: _jsx("div", { role: "status", children: saved ? (_jsxs("span", { className: "inline-flex items-center gap-1.5 text-success", children: [_jsx(CircleCheck, { "aria-hidden": "true", className: "size-4" }), save.savedLabel] })) : (save.hint) }), hintSlot: "settings-section-hint", children: [save.cancel ? (_jsx(Button, { "aria-busy": save.cancel.pending || undefined, disabled: pending || save.cancel.pending, onClick: save.cancel.onCancel, type: "button", variant: "outline", children: _jsx(PendingLabel, { pending: save.cancel.pending ?? false, pendingLabel: save.cancel.pendingLabel ?? save.cancel.label, children: save.cancel.label }) })) : null, _jsx(FormSubmitButton, { submit: {
|
|
60
|
+
label: save.label,
|
|
61
|
+
pendingLabel: save.pendingLabel,
|
|
62
|
+
pending,
|
|
63
|
+
disabled: !changed,
|
|
64
|
+
} }), pending ? _jsx(WaitingLine, { className: "basis-full", decorative: true }) : null] }));
|
|
65
|
+
}
|
|
66
|
+
export function SettingsSaveForm({ save, titleId, children, }) {
|
|
67
|
+
const [fieldsChanged, setFieldsChanged] = useState(false);
|
|
68
|
+
const [failure, setFailure] = useState(null);
|
|
69
|
+
const [saved, setSaved] = useState(false);
|
|
70
|
+
const [claimedFields, setClaimedFields] = useState(() => new Set());
|
|
71
|
+
const submittedValues = useRef(null);
|
|
72
|
+
const keepValuesOnReset = useRef(false);
|
|
73
|
+
const form = useRef(null);
|
|
74
|
+
const controlled = save.changed !== undefined;
|
|
75
|
+
const hydrated = useHydrated();
|
|
76
|
+
const claim = useCallback((field) => {
|
|
77
|
+
setClaimedFields((current) => new Set(current).add(field));
|
|
78
|
+
return () => setClaimedFields((current) => {
|
|
79
|
+
const next = new Set(current);
|
|
80
|
+
next.delete(field);
|
|
81
|
+
return next;
|
|
82
|
+
});
|
|
83
|
+
}, []);
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
const element = form.current;
|
|
86
|
+
if (!element)
|
|
87
|
+
return;
|
|
88
|
+
const onReset = (event) => {
|
|
89
|
+
const editedWhileSaving = submittedValues.current !== null && editableValues(element) !== submittedValues.current;
|
|
90
|
+
if (keepValuesOnReset.current || editedWhileSaving || controlled) {
|
|
91
|
+
event.preventDefault();
|
|
92
|
+
}
|
|
93
|
+
keepValuesOnReset.current = false;
|
|
94
|
+
submittedValues.current = null;
|
|
95
|
+
setFieldsChanged(event.defaultPrevented ? hasChangedFields(element) : false);
|
|
96
|
+
};
|
|
97
|
+
element.addEventListener("reset", onReset);
|
|
98
|
+
return () => element.removeEventListener("reset", onReset);
|
|
99
|
+
}, [controlled]);
|
|
100
|
+
const changed = save.changed ?? fieldsChanged;
|
|
101
|
+
const sectionFailure = failure && (failure.field === undefined || !claimedFields.has(failure.field)) ? failure : null;
|
|
102
|
+
return (_jsx(SettingsSaveContext, { value: { failure, claim }, children: _jsxs("form", { ref: form, "aria-labelledby": titleId, className: "contents", "data-slot": "settings-section-form", action: async (formData) => {
|
|
103
|
+
const result = await save.action(formData);
|
|
104
|
+
keepValuesOnReset.current = result !== null;
|
|
105
|
+
setFailure(result);
|
|
106
|
+
setSaved(result === null);
|
|
107
|
+
}, onChange: (event) => {
|
|
108
|
+
const edited = event.target;
|
|
109
|
+
if (edited instanceof Element &&
|
|
110
|
+
failure?.field !== undefined &&
|
|
111
|
+
edited.id === failure.field)
|
|
112
|
+
setFailure(null);
|
|
113
|
+
setSaved(false);
|
|
114
|
+
setFieldsChanged(hasChangedFields(event.currentTarget));
|
|
115
|
+
}, onSubmit: (event) => {
|
|
116
|
+
setFailure(null);
|
|
117
|
+
keepValuesOnReset.current = false;
|
|
118
|
+
submittedValues.current = editableValues(event.currentTarget);
|
|
119
|
+
}, children: [_jsx("fieldset", { className: "contents", disabled: !hydrated, children: children }), sectionFailure ? (_jsx(CardContent, { children: _jsx(MessageNotice, { message: sectionFailure.message, placement: "action" }) })) : null, _jsx(SaveFooter, { changed: changed, save: save, saved: saved && !changed })] }) }));
|
|
120
|
+
}
|
|
121
|
+
export function SettingsFieldFailure({ id }) {
|
|
122
|
+
const context = use(SettingsSaveContext);
|
|
123
|
+
const claim = context?.claim;
|
|
124
|
+
useEffect(() => claim?.(id), [claim, id]);
|
|
125
|
+
const message = context?.failure?.field === id ? context.failure.message : null;
|
|
126
|
+
const failureId = `${id}-failure`;
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
const control = message ? document.getElementById(id) : null;
|
|
129
|
+
if (!control)
|
|
130
|
+
return;
|
|
131
|
+
const describedBy = control.getAttribute("aria-describedby");
|
|
132
|
+
const invalid = control.getAttribute("aria-invalid");
|
|
133
|
+
control.setAttribute("aria-invalid", "true");
|
|
134
|
+
control.setAttribute("aria-describedby", describedBy ? `${describedBy} ${failureId}` : failureId);
|
|
135
|
+
return () => {
|
|
136
|
+
if (invalid === null)
|
|
137
|
+
control.removeAttribute("aria-invalid");
|
|
138
|
+
else
|
|
139
|
+
control.setAttribute("aria-invalid", invalid);
|
|
140
|
+
if (describedBy === null)
|
|
141
|
+
control.removeAttribute("aria-describedby");
|
|
142
|
+
else
|
|
143
|
+
control.setAttribute("aria-describedby", describedBy);
|
|
144
|
+
};
|
|
145
|
+
}, [id, failureId, message]);
|
|
146
|
+
return message ? _jsx(FieldError, { id: failureId, children: messageSentences(message) }) : null;
|
|
147
|
+
}
|
package/dist/lib/theme-mode.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const themeModes: readonly ["
|
|
1
|
+
export declare const themeModes: readonly ["system", "light", "dark"];
|
|
2
2
|
export type ThemeMode = (typeof themeModes)[number];
|
|
3
3
|
export declare function isThemeMode(value: string | undefined): value is ThemeMode;
|
|
4
4
|
//# sourceMappingURL=theme-mode.d.ts.map
|
package/dist/lib/theme-mode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const themeModes = ["
|
|
1
|
+
export const themeModes = ["system", "light", "dark"];
|
|
2
2
|
export function isThemeMode(value) {
|
|
3
|
-
return
|
|
3
|
+
return value !== undefined && themeModes.some((mode) => mode === value);
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/lib/use-copy-to-clipboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/lib/use-copy-to-clipboard.ts"],"names":[],"mappings":"AA6BA,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,OAAO,EACP,eAAuB,GACxB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;;;EAsCA"}
|
|
@@ -11,6 +11,7 @@ async function attemptCopy(input) {
|
|
|
11
11
|
return { kind: "copied" };
|
|
12
12
|
}
|
|
13
13
|
catch (error) {
|
|
14
|
+
// SAFETY: writeText is navigator.clipboard.writeText, which useCopyToClipboard, the only caller, passes bound; its promise rejects with a DOMException, which is an Error.
|
|
14
15
|
return { kind: "failed", error: error };
|
|
15
16
|
}
|
|
16
17
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { EmptyArt, EmptyArtName } from "../components/empty-art.js";
|
|
3
|
+
export declare function EmptyArtProvider({ art, children, }: {
|
|
4
|
+
art: Record<EmptyArtName, EmptyArt>;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function useEmptyArt(): Record<EmptyArtName, EmptyArt>;
|
|
8
|
+
//# sourceMappingURL=assets.d.ts.map
|