cursedbelt 5.40.0 → 5.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react/Toast.d.ts +12 -2
- package/dist/react/Toast.d.ts.map +1 -1
- package/dist/react/Toast.js +32 -3
- package/dist/react/Toast.js.map +1 -1
- package/dist/react/analytics/MetricDrilldown.js +1 -1
- package/dist/react/charts/AreaChart.d.ts.map +1 -1
- package/dist/react/charts/AreaChart.js +5 -5
- package/dist/react/charts/AreaChart.js.map +1 -1
- package/dist/react/charts/BarChart.d.ts.map +1 -1
- package/dist/react/charts/BarChart.js +3 -3
- package/dist/react/charts/BarChart.js.map +1 -1
- package/dist/react/charts/ChartCard.d.ts +53 -0
- package/dist/react/charts/ChartCard.d.ts.map +1 -0
- package/dist/react/charts/ChartCard.js +46 -0
- package/dist/react/charts/ChartCard.js.map +1 -0
- package/dist/react/charts/ChartFrame.d.ts +12 -5
- package/dist/react/charts/ChartFrame.d.ts.map +1 -1
- package/dist/react/charts/ChartFrame.js +12 -5
- package/dist/react/charts/ChartFrame.js.map +1 -1
- package/dist/react/charts/ChartLegend.js +1 -1
- package/dist/react/charts/ChartLegend.js.map +1 -1
- package/dist/react/charts/HeatmapChart.js +3 -3
- package/dist/react/charts/HeatmapChart.js.map +1 -1
- package/dist/react/charts/IntervalTimeline.js +1 -1
- package/dist/react/charts/IntervalTimeline.js.map +1 -1
- package/dist/react/charts/LineChart.d.ts.map +1 -1
- package/dist/react/charts/LineChart.js +3 -3
- package/dist/react/charts/LineChart.js.map +1 -1
- package/dist/react/charts/TimeSeriesChart.d.ts.map +1 -1
- package/dist/react/charts/TimeSeriesChart.js +6 -6
- package/dist/react/charts/TimeSeriesChart.js.map +1 -1
- package/dist/react/charts/chartBox.d.ts +46 -0
- package/dist/react/charts/chartBox.d.ts.map +1 -0
- package/dist/react/charts/chartBox.js +45 -0
- package/dist/react/charts/chartBox.js.map +1 -0
- package/dist/react/charts/index.d.ts +2 -0
- package/dist/react/charts/index.d.ts.map +1 -1
- package/dist/react/charts/index.js +2 -0
- package/dist/react/charts/index.js.map +1 -1
- package/dist/react/charts/shared.d.ts +13 -2
- package/dist/react/charts/shared.d.ts.map +1 -1
- package/dist/react/charts/shared.js +14 -3
- package/dist/react/charts/shared.js.map +1 -1
- package/dist/react/chat/Bubble.js +4 -4
- package/dist/react/chat/Bubble.js.map +1 -1
- package/dist/react/chat/MessageScroller.js +1 -1
- package/dist/react/chat/MessageScroller.js.map +1 -1
- package/dist/react/components/ActionBar.d.ts.map +1 -1
- package/dist/react/components/ActionBar.js +63 -1
- package/dist/react/components/ActionBar.js.map +1 -1
- package/dist/react/components/AddItemsMenu.js +1 -1
- package/dist/react/components/AddItemsMenu.js.map +1 -1
- package/dist/react/components/Alert.d.ts +16 -2
- package/dist/react/components/Alert.d.ts.map +1 -1
- package/dist/react/components/Alert.js +35 -2
- package/dist/react/components/Alert.js.map +1 -1
- package/dist/react/components/AppShell.d.ts +55 -33
- package/dist/react/components/AppShell.d.ts.map +1 -1
- package/dist/react/components/AppShell.js +121 -31
- package/dist/react/components/AppShell.js.map +1 -1
- package/dist/react/components/AsyncPanel.d.ts +21 -3
- package/dist/react/components/AsyncPanel.d.ts.map +1 -1
- package/dist/react/components/AsyncPanel.js +49 -5
- package/dist/react/components/AsyncPanel.js.map +1 -1
- package/dist/react/components/BannerLane.d.ts +32 -0
- package/dist/react/components/BannerLane.d.ts.map +1 -0
- package/dist/react/components/BannerLane.js +41 -0
- package/dist/react/components/BannerLane.js.map +1 -0
- package/dist/react/components/Button.d.ts.map +1 -1
- package/dist/react/components/Button.js +2 -1
- package/dist/react/components/Button.js.map +1 -1
- package/dist/react/components/ChipFilterStrip.js +1 -1
- package/dist/react/components/ChipFilterStrip.js.map +1 -1
- package/dist/react/components/ComboboxField.d.ts.map +1 -1
- package/dist/react/components/ComboboxField.js +14 -4
- package/dist/react/components/ComboboxField.js.map +1 -1
- package/dist/react/components/CommentThread.js +2 -2
- package/dist/react/components/CommentThread.js.map +1 -1
- package/dist/react/components/ConfirmDialog.js +1 -1
- package/dist/react/components/ConfirmDialog.js.map +1 -1
- package/dist/react/components/DataTable/DataTable.d.ts +18 -2
- package/dist/react/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/react/components/DataTable/DataTable.js +51 -12
- package/dist/react/components/DataTable/DataTable.js.map +1 -1
- package/dist/react/components/DataTable/Pagination.js +1 -1
- package/dist/react/components/DataTable/Pagination.js.map +1 -1
- package/dist/react/components/DataTable/RowActions.d.ts +7 -1
- package/dist/react/components/DataTable/RowActions.d.ts.map +1 -1
- package/dist/react/components/DataTable/RowActions.js +10 -3
- package/dist/react/components/DataTable/RowActions.js.map +1 -1
- package/dist/react/components/DataTable/TableFilterBuilder.js +1 -1
- package/dist/react/components/DataTable/TableFilterBuilder.js.map +1 -1
- package/dist/react/components/DataTable/cells/CodeCell.js +1 -1
- package/dist/react/components/DataTable/cells/CodeCell.js.map +1 -1
- package/dist/react/components/DataTable/cells/LinkCell.js +1 -1
- package/dist/react/components/DataTable/cells/LinkCell.js.map +1 -1
- package/dist/react/components/DataTable/index.d.ts +1 -1
- package/dist/react/components/DataTable/index.d.ts.map +1 -1
- package/dist/react/components/DataTable/index.js.map +1 -1
- package/dist/react/components/DataTable/types.d.ts +20 -0
- package/dist/react/components/DataTable/types.d.ts.map +1 -1
- package/dist/react/components/DataTable/types.js +22 -0
- package/dist/react/components/DataTable/types.js.map +1 -1
- package/dist/react/components/DateTimeField.d.ts.map +1 -1
- package/dist/react/components/DateTimeField.js +4 -1
- package/dist/react/components/DateTimeField.js.map +1 -1
- package/dist/react/components/DeleteButton.js +2 -0
- package/dist/react/components/DeleteButton.js.map +1 -1
- package/dist/react/components/Drawer.js +3 -3
- package/dist/react/components/Drawer.js.map +1 -1
- package/dist/react/components/DropdownMenu.d.ts +16 -0
- package/dist/react/components/DropdownMenu.d.ts.map +1 -1
- package/dist/react/components/DropdownMenu.js +22 -6
- package/dist/react/components/DropdownMenu.js.map +1 -1
- package/dist/react/components/EmptyState.d.ts +10 -2
- package/dist/react/components/EmptyState.d.ts.map +1 -1
- package/dist/react/components/EmptyState.js +10 -5
- package/dist/react/components/EmptyState.js.map +1 -1
- package/dist/react/components/EventTimeline.js +1 -1
- package/dist/react/components/EventTimeline.js.map +1 -1
- package/dist/react/components/FileDropZone.js +1 -1
- package/dist/react/components/FileDropZone.js.map +1 -1
- package/dist/react/components/Grid.d.ts +9 -1
- package/dist/react/components/Grid.d.ts.map +1 -1
- package/dist/react/components/Grid.js +20 -2
- package/dist/react/components/Grid.js.map +1 -1
- package/dist/react/components/Guide.d.ts +31 -0
- package/dist/react/components/Guide.d.ts.map +1 -0
- package/dist/react/components/Guide.js +18 -0
- package/dist/react/components/Guide.js.map +1 -0
- package/dist/react/components/InfoHintImpl.d.ts +0 -13
- package/dist/react/components/InfoHintImpl.d.ts.map +1 -1
- package/dist/react/components/InfoHintImpl.js +17 -1
- package/dist/react/components/InfoHintImpl.js.map +1 -1
- package/dist/react/components/InlineEditableText.js +1 -1
- package/dist/react/components/InlineEditableText.js.map +1 -1
- package/dist/react/components/IsolatedFrame.js +1 -1
- package/dist/react/components/IsolatedFrame.js.map +1 -1
- package/dist/react/components/ListToolbar.d.ts.map +1 -1
- package/dist/react/components/ListToolbar.js +2 -2
- package/dist/react/components/ListToolbar.js.map +1 -1
- package/dist/react/components/LogViewer.d.ts +26 -2
- package/dist/react/components/LogViewer.d.ts.map +1 -1
- package/dist/react/components/LogViewer.js +41 -26
- package/dist/react/components/LogViewer.js.map +1 -1
- package/dist/react/components/Modal.d.ts +5 -1
- package/dist/react/components/Modal.d.ts.map +1 -1
- package/dist/react/components/Modal.js +18 -8
- package/dist/react/components/Modal.js.map +1 -1
- package/dist/react/components/Page.d.ts +51 -7
- package/dist/react/components/Page.d.ts.map +1 -1
- package/dist/react/components/Page.js +53 -8
- package/dist/react/components/Page.js.map +1 -1
- package/dist/react/components/PageGuideButton.d.ts +11 -0
- package/dist/react/components/PageGuideButton.d.ts.map +1 -0
- package/dist/react/components/PageGuideButton.js +13 -0
- package/dist/react/components/PageGuideButton.js.map +1 -0
- package/dist/react/components/PanelSeparator.js +1 -1
- package/dist/react/components/PanelSeparator.js.map +1 -1
- package/dist/react/components/Popover.d.ts.map +1 -1
- package/dist/react/components/Popover.js +2 -1
- package/dist/react/components/Popover.js.map +1 -1
- package/dist/react/components/PromptDialog.js +1 -1
- package/dist/react/components/PromptDialog.js.map +1 -1
- package/dist/react/components/ScrollArea.d.ts +9 -1
- package/dist/react/components/ScrollArea.d.ts.map +1 -1
- package/dist/react/components/ScrollArea.js +9 -3
- package/dist/react/components/ScrollArea.js.map +1 -1
- package/dist/react/components/Section.d.ts +5 -2
- package/dist/react/components/Section.d.ts.map +1 -1
- package/dist/react/components/Section.js +5 -2
- package/dist/react/components/Section.js.map +1 -1
- package/dist/react/components/Skeleton.d.ts +19 -1
- package/dist/react/components/Skeleton.d.ts.map +1 -1
- package/dist/react/components/Skeleton.js +24 -2
- package/dist/react/components/Skeleton.js.map +1 -1
- package/dist/react/components/StatStrip.js +1 -1
- package/dist/react/components/StatStrip.js.map +1 -1
- package/dist/react/components/StatTile.d.ts +30 -3
- package/dist/react/components/StatTile.d.ts.map +1 -1
- package/dist/react/components/StatTile.js +35 -9
- package/dist/react/components/StatTile.js.map +1 -1
- package/dist/react/components/StatTileGrid.d.ts +10 -1
- package/dist/react/components/StatTileGrid.d.ts.map +1 -1
- package/dist/react/components/StatTileGrid.js +50 -33
- package/dist/react/components/StatTileGrid.js.map +1 -1
- package/dist/react/components/StatusPill.d.ts.map +1 -1
- package/dist/react/components/StatusPill.js +26 -1
- package/dist/react/components/StatusPill.js.map +1 -1
- package/dist/react/components/Surface.d.ts +1 -1
- package/dist/react/components/Surface.d.ts.map +1 -1
- package/dist/react/components/Surface.js +20 -11
- package/dist/react/components/Surface.js.map +1 -1
- package/dist/react/components/SwatchPicker.d.ts.map +1 -1
- package/dist/react/components/SwatchPicker.js +5 -1
- package/dist/react/components/SwatchPicker.js.map +1 -1
- package/dist/react/components/Switch.js +1 -1
- package/dist/react/components/Switch.js.map +1 -1
- package/dist/react/components/WidgetHeader.js +1 -1
- package/dist/react/components/WidgetHeader.js.map +1 -1
- package/dist/react/components/calendar/CalendarLegend.js +1 -1
- package/dist/react/components/calendar/CalendarLegend.js.map +1 -1
- package/dist/react/components/calendar/DayAgenda.js +1 -1
- package/dist/react/components/calendar/DayAgenda.js.map +1 -1
- package/dist/react/components/calendar/EventChip.js +1 -1
- package/dist/react/components/calendar/EventChip.js.map +1 -1
- package/dist/react/components/calendar/MonthGrid.js +1 -1
- package/dist/react/components/calendar/MonthGrid.js.map +1 -1
- package/dist/react/components/calendar/WeekView.js +2 -2
- package/dist/react/components/calendar/WeekView.js.map +1 -1
- package/dist/react/components/cardFrame.d.ts +16 -0
- package/dist/react/components/cardFrame.d.ts.map +1 -0
- package/dist/react/components/cardFrame.js +24 -0
- package/dist/react/components/cardFrame.js.map +1 -0
- package/dist/react/components/dialog.d.ts.map +1 -1
- package/dist/react/components/dialog.js +2 -1
- package/dist/react/components/dialog.js.map +1 -1
- package/dist/react/dashboard-grid/WidgetFrame.js +2 -2
- package/dist/react/dashboard-grid/WidgetFrame.js.map +1 -1
- package/dist/react/emoji/EmojiPicker.js +1 -1
- package/dist/react/emoji/EmojiPicker.js.map +1 -1
- package/dist/react/file-tree/FileTree.d.ts +8 -1
- package/dist/react/file-tree/FileTree.d.ts.map +1 -1
- package/dist/react/file-tree/FileTree.js +29 -4
- package/dist/react/file-tree/FileTree.js.map +1 -1
- package/dist/react/filter-rail/FilterRail.js +1 -1
- package/dist/react/filter-rail/FilterRail.js.map +1 -1
- package/dist/react/icons.js +1 -1
- package/dist/react/icons.js.map +1 -1
- package/dist/react/index.d.ts +8 -5
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +5 -2
- package/dist/react/index.js.map +1 -1
- package/dist/react/lib/menuSections.d.ts +8 -0
- package/dist/react/lib/menuSections.d.ts.map +1 -0
- package/dist/react/lib/menuSections.js +37 -0
- package/dist/react/lib/menuSections.js.map +1 -0
- package/dist/react/markdown/Markdown.js +2 -2
- package/dist/react/markdown/Markdown.js.map +1 -1
- package/dist/react/media/HoverScrubVideoThumb.js +1 -1
- package/dist/react/media/HoverScrubVideoThumb.js.map +1 -1
- package/dist/react/media/MaskPainter.js +1 -1
- package/dist/react/media/MediaUploadControl.js +1 -1
- package/dist/react/media/MediaUploadControl.js.map +1 -1
- package/dist/react/media/VideoTrimmer.js +1 -1
- package/dist/react/media/VideoTrimmer.js.map +1 -1
- package/dist/react/media/denseGallery.css +5 -1
- package/dist/react/namespace/NamespaceTargetCapsule.js +1 -1
- package/dist/react/namespace/NamespaceTargetCapsule.js.map +1 -1
- package/dist/react/nav/BreadcrumbTrail.js +1 -1
- package/dist/react/nav/BreadcrumbTrail.js.map +1 -1
- package/dist/react/nav/CommandBar.d.ts +7 -1
- package/dist/react/nav/CommandBar.d.ts.map +1 -1
- package/dist/react/nav/CommandBar.js +5 -3
- package/dist/react/nav/CommandBar.js.map +1 -1
- package/dist/react/nav/PlaceBar.d.ts.map +1 -1
- package/dist/react/nav/PlaceBar.js +7 -9
- package/dist/react/nav/PlaceBar.js.map +1 -1
- package/dist/react/nav/SideNav.d.ts +12 -2
- package/dist/react/nav/SideNav.d.ts.map +1 -1
- package/dist/react/nav/SideNav.js +42 -22
- package/dist/react/nav/SideNav.js.map +1 -1
- package/dist/react/nav/TopBar.d.ts +65 -31
- package/dist/react/nav/TopBar.d.ts.map +1 -1
- package/dist/react/nav/TopBar.js +59 -24
- package/dist/react/nav/TopBar.js.map +1 -1
- package/dist/react/nav/index.d.ts +1 -1
- package/dist/react/nav/index.d.ts.map +1 -1
- package/dist/react/nav/index.js +1 -1
- package/dist/react/nav/index.js.map +1 -1
- package/dist/react/nav/navShared.d.ts +10 -1
- package/dist/react/nav/navShared.d.ts.map +1 -1
- package/dist/react/nav/navShared.js +23 -0
- package/dist/react/nav/navShared.js.map +1 -1
- package/dist/react/notifications/NotificationFeed.js +2 -2
- package/dist/react/notifications/NotificationFeed.js.map +1 -1
- package/dist/react/palette/Command.d.ts.map +1 -1
- package/dist/react/palette/Command.js +1 -1
- package/dist/react/palette/Command.js.map +1 -1
- package/dist/react/palette/CommandPalette.d.ts +13 -1
- package/dist/react/palette/CommandPalette.d.ts.map +1 -1
- package/dist/react/palette/CommandPalette.js +44 -8
- package/dist/react/palette/CommandPalette.js.map +1 -1
- package/dist/react/palette/commandSources.d.ts +57 -0
- package/dist/react/palette/commandSources.d.ts.map +1 -0
- package/dist/react/palette/commandSources.js +129 -0
- package/dist/react/palette/commandSources.js.map +1 -0
- package/dist/react/palette/index.d.ts +1 -0
- package/dist/react/palette/index.d.ts.map +1 -1
- package/dist/react/palette/index.js +1 -0
- package/dist/react/palette/index.js.map +1 -1
- package/dist/react/rich-text/RichTextEditor.js +1 -1
- package/dist/react/rich-text/RichTextEditor.js.map +1 -1
- package/dist/react/rich-text/RichTextToolbar.js +1 -1
- package/dist/react/rich-text/RichTextToolbar.js.map +1 -1
- package/dist/scripts/guardrailsEnforce.d.ts.map +1 -1
- package/dist/styles-areas/analytics.css +16 -16
- package/dist/styles-areas/auth.css +3 -3
- package/dist/styles-areas/calendar.css +6 -6
- package/dist/styles-areas/chart-table.css +1 -1
- package/dist/styles-areas/charts.css +3 -3
- package/dist/styles-areas/chat.css +7 -6
- package/dist/styles-areas/companion-link.css +2 -2
- package/dist/styles-areas/core.css +98 -89
- package/dist/styles-areas/dashboard-grid.css +4 -4
- package/dist/styles-areas/data-table.css +16 -16
- package/dist/styles-areas/disk-usage.css +5 -5
- package/dist/styles-areas/emoji.css +2 -2
- package/dist/styles-areas/fields.css +13 -14
- package/dist/styles-areas/filter-rail.css +4 -4
- package/dist/styles-areas/folder-tree.css +3 -3
- package/dist/styles-areas/markdown.css +2 -1
- package/dist/styles-areas/master-detail.css +3 -3
- package/dist/styles-areas/media-gallery.css +8 -8
- package/dist/styles-areas/media.css +12 -13
- package/dist/styles-areas/nav.css +28 -14
- package/dist/styles-areas/notifications.css +4 -4
- package/dist/styles-areas/overlays.css +4 -4
- package/dist/styles-areas/palette.css +4 -3
- package/dist/styles-areas/rich-text.css +3 -3
- package/dist/styles-areas/sharing.css +4 -3
- package/dist/styles-areas/stats.css +9 -8
- package/dist/styles-areas/test-report.css +3 -3
- package/dist/styles-areas/wizard.css +6 -5
- package/dist/styles-areas/workbench.css +10 -9
- package/dist/styles-areas/workbook-viewer.css +2 -2
- package/dist/styles-utilities.css +272 -187
- package/dist/testing/designAudit.d.ts.map +1 -1
- package/dist/testing/designAudit.js +4 -0
- package/dist/testing/designAudit.js.map +1 -1
- package/dist/testing/designBaseline.d.ts.map +1 -1
- package/dist/testing/designBaseline.js +4 -0
- package/dist/testing/designBaseline.js.map +1 -1
- package/dist/theme.css +103 -2
- package/package.json +3 -2
- package/scripts/guardrails-baseline.json +2 -1
- package/scripts/guardrailsEnforce.spec.ts +64 -0
- package/scripts/guardrailsEnforce.ts +65 -8
- package/scripts/styleAreas.ts +1 -0
- package/src/nodeTypesDeclared.spec.ts +47 -0
- package/src/react/Toast.spec.tsx +43 -0
- package/src/react/Toast.tsx +45 -2
- package/src/react/analytics/MetricDrilldown.tsx +1 -1
- package/src/react/charts/AreaChart.tsx +9 -8
- package/src/react/charts/BarChart.tsx +11 -10
- package/src/react/charts/ChartCard.tsx +146 -0
- package/src/react/charts/ChartFrame.tsx +28 -10
- package/src/react/charts/ChartLegend.tsx +1 -1
- package/src/react/charts/HeatmapChart.tsx +5 -5
- package/src/react/charts/IntervalTimeline.tsx +2 -2
- package/src/react/charts/LineChart.tsx +9 -8
- package/src/react/charts/TimeSeriesChart.tsx +11 -10
- package/src/react/charts/chartBox.spec.ts +40 -0
- package/src/react/charts/chartBox.ts +75 -0
- package/src/react/charts/index.ts +2 -0
- package/src/react/charts/shared.ts +16 -3
- package/src/react/chat/Bubble.tsx +5 -5
- package/src/react/chat/MessageScroller.tsx +1 -1
- package/src/react/components/ActionBar.spec.tsx +90 -0
- package/src/react/components/ActionBar.tsx +82 -2
- package/src/react/components/AddItemsMenu.tsx +1 -1
- package/src/react/components/Alert.spec.tsx +32 -2
- package/src/react/components/Alert.tsx +47 -3
- package/src/react/components/AppShell.spec.tsx +199 -13
- package/src/react/components/AppShell.tsx +235 -92
- package/src/react/components/AsyncPanel.spec.tsx +7 -1
- package/src/react/components/AsyncPanel.tsx +85 -5
- package/src/react/components/BannerLane.tsx +128 -0
- package/src/react/components/Button.tsx +2 -0
- package/src/react/components/ChipFilterStrip.tsx +1 -1
- package/src/react/components/ComboboxField.tsx +20 -3
- package/src/react/components/CommentThread.tsx +2 -2
- package/src/react/components/ConfirmDialog.tsx +1 -1
- package/src/react/components/DataTable/DataTable.tsx +80 -8
- package/src/react/components/DataTable/Pagination.tsx +1 -1
- package/src/react/components/DataTable/RowActions.tsx +55 -2
- package/src/react/components/DataTable/TableFilterBuilder.tsx +1 -1
- package/src/react/components/DataTable/cells/CodeCell.tsx +1 -1
- package/src/react/components/DataTable/cells/LinkCell.tsx +1 -1
- package/src/react/components/DataTable/index.ts +1 -0
- package/src/react/components/DataTable/numericColumn.spec.ts +19 -0
- package/src/react/components/DataTable/types.ts +36 -0
- package/src/react/components/DateTimeField.tsx +3 -1
- package/src/react/components/DeleteButton.tsx +3 -0
- package/src/react/components/Drawer.tsx +3 -3
- package/src/react/components/DropdownMenu.spec.tsx +55 -0
- package/src/react/components/DropdownMenu.tsx +73 -20
- package/src/react/components/EmptyState.tsx +26 -7
- package/src/react/components/EventTimeline.tsx +1 -1
- package/src/react/components/Field.width.spec.tsx +11 -0
- package/src/react/components/FileDropZone.tsx +1 -1
- package/src/react/components/Grid.spec.tsx +44 -0
- package/src/react/components/Grid.tsx +41 -11
- package/src/react/components/Guide.tsx +77 -0
- package/src/react/components/InfoHint.spec.tsx +21 -0
- package/src/react/components/InfoHintImpl.tsx +22 -1
- package/src/react/components/InlineEditableText.tsx +1 -1
- package/src/react/components/IsolatedFrame.tsx +1 -1
- package/src/react/components/ListToolbar.spec.tsx +12 -0
- package/src/react/components/ListToolbar.tsx +8 -5
- package/src/react/components/LogViewer.tsx +118 -18
- package/src/react/components/Modal.spec.tsx +17 -2
- package/src/react/components/Modal.tsx +25 -10
- package/src/react/components/MultiSelectField.spec.tsx +6 -0
- package/src/react/components/Page.spec.tsx +89 -5
- package/src/react/components/Page.tsx +100 -16
- package/src/react/components/PageGuideButton.tsx +42 -0
- package/src/react/components/PanelSeparator.tsx +1 -1
- package/src/react/components/Popover.tsx +3 -1
- package/src/react/components/PromptDialog.tsx +1 -1
- package/src/react/components/ScrollArea.spec.tsx +20 -0
- package/src/react/components/ScrollArea.tsx +19 -0
- package/src/react/components/Section.spec.tsx +82 -1
- package/src/react/components/Section.tsx +10 -4
- package/src/react/components/Skeleton.tsx +50 -2
- package/src/react/components/StatStrip.tsx +1 -1
- package/src/react/components/StatTile.tsx +84 -11
- package/src/react/components/StatTileGrid.spec.tsx +6 -1
- package/src/react/components/StatTileGrid.tsx +25 -0
- package/src/react/components/StatusPill.tsx +26 -1
- package/src/react/components/Surface.tsx +22 -14
- package/src/react/components/SwatchPicker.tsx +4 -0
- package/src/react/components/Switch.tsx +1 -1
- package/src/react/components/WidgetHeader.tsx +1 -1
- package/src/react/components/calendar/CalendarLegend.tsx +1 -1
- package/src/react/components/calendar/DayAgenda.tsx +1 -1
- package/src/react/components/calendar/EventChip.tsx +1 -1
- package/src/react/components/calendar/MonthGrid.tsx +1 -1
- package/src/react/components/calendar/WeekView.tsx +2 -2
- package/src/react/components/cardFrame.ts +28 -0
- package/src/react/components/dataDisplay.spec.tsx +176 -0
- package/src/react/components/dialog.tsx +4 -1
- package/src/react/dashboard-grid/WidgetFrame.tsx +2 -2
- package/src/react/emoji/EmojiPicker.tsx +1 -1
- package/src/react/file-tree/FileTree.spec.tsx +49 -0
- package/src/react/file-tree/FileTree.tsx +37 -4
- package/src/react/filter-rail/FilterRail.tsx +1 -1
- package/src/react/icons.tsx +1 -1
- package/src/react/index.ts +28 -3
- package/src/react/lib/menuSections.ts +33 -0
- package/src/react/markdown/Markdown.tsx +2 -2
- package/src/react/media/HoverScrubVideoThumb.tsx +2 -2
- package/src/react/media/MaskPainter.tsx +1 -1
- package/src/react/media/MediaUploadControl.tsx +1 -1
- package/src/react/media/VideoTrimmer.tsx +1 -1
- package/src/react/media/denseGallery.css +5 -1
- package/src/react/namespace/NamespaceTargetCapsule.tsx +1 -1
- package/src/react/nav/BreadcrumbTrail.tsx +2 -2
- package/src/react/nav/CommandBar.tsx +14 -3
- package/src/react/nav/PlaceBar.tsx +18 -8
- package/src/react/nav/SideNav.tsx +99 -17
- package/src/react/nav/TopBar.spec.tsx +78 -21
- package/src/react/nav/TopBar.tsx +270 -98
- package/src/react/nav/index.ts +8 -1
- package/src/react/nav/nav.spec.tsx +46 -2
- package/src/react/nav/navShared.tsx +23 -2
- package/src/react/notifications/NotificationFeed.tsx +2 -2
- package/src/react/palette/Command.tsx +1 -1
- package/src/react/palette/CommandPalette.spec.tsx +31 -0
- package/src/react/palette/CommandPalette.tsx +108 -11
- package/src/react/palette/commandSources.tsx +186 -0
- package/src/react/palette/index.ts +7 -0
- package/src/react/rich-text/RichTextEditor.tsx +1 -1
- package/src/react/rich-text/RichTextToolbar.tsx +1 -1
- package/src/styles-areas/analytics.css +16 -16
- package/src/styles-areas/auth.css +3 -3
- package/src/styles-areas/calendar.css +6 -6
- package/src/styles-areas/chart-table.css +1 -1
- package/src/styles-areas/charts.css +3 -3
- package/src/styles-areas/chat.css +7 -6
- package/src/styles-areas/companion-link.css +2 -2
- package/src/styles-areas/core.css +98 -89
- package/src/styles-areas/dashboard-grid.css +4 -4
- package/src/styles-areas/data-table.css +16 -16
- package/src/styles-areas/disk-usage.css +5 -5
- package/src/styles-areas/emoji.css +2 -2
- package/src/styles-areas/fields.css +13 -14
- package/src/styles-areas/filter-rail.css +4 -4
- package/src/styles-areas/folder-tree.css +3 -3
- package/src/styles-areas/markdown.css +2 -1
- package/src/styles-areas/master-detail.css +3 -3
- package/src/styles-areas/media-gallery.css +8 -8
- package/src/styles-areas/media.css +12 -13
- package/src/styles-areas/nav.css +28 -14
- package/src/styles-areas/notifications.css +4 -4
- package/src/styles-areas/overlays.css +4 -4
- package/src/styles-areas/palette.css +4 -3
- package/src/styles-areas/rich-text.css +3 -3
- package/src/styles-areas/sharing.css +4 -3
- package/src/styles-areas/stats.css +9 -8
- package/src/styles-areas/test-report.css +3 -3
- package/src/styles-areas/wizard.css +6 -5
- package/src/styles-areas/workbench.css +10 -9
- package/src/styles-areas/workbook-viewer.css +2 -2
- package/src/styles-utilities.css +272 -187
- package/src/testing/designAudit.ts +3 -0
- package/src/testing/designBaseline.ts +4 -0
- package/src/theme.css +103 -2
- package/src/themeDarkScopeAliases.spec.ts +65 -0
|
@@ -17,6 +17,7 @@ import { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } fro
|
|
|
17
17
|
import {
|
|
18
18
|
allowAllGate,
|
|
19
19
|
deriveSearchCatalogue,
|
|
20
|
+
deriveSideNavDomains,
|
|
20
21
|
type GateFn,
|
|
21
22
|
type NavigationModel,
|
|
22
23
|
normalizeNavPath,
|
|
@@ -41,6 +42,7 @@ import {
|
|
|
41
42
|
CommandItem,
|
|
42
43
|
CommandList,
|
|
43
44
|
} from './Command.js';
|
|
45
|
+
import { type CommandSource, type CommandSourceItem, recentFirst, rememberCommandItem } from './commandSources.js';
|
|
44
46
|
import { useShortcutRegistry } from './useShortcutRegistry.js';
|
|
45
47
|
import { TAP_TARGET_HEIGHT } from '../lib/tapTarget.js';
|
|
46
48
|
|
|
@@ -91,6 +93,18 @@ export interface CommandPaletteProps {
|
|
|
91
93
|
/** Server-search debounce in ms. Default 300. */
|
|
92
94
|
searchDebounceMs?: number;
|
|
93
95
|
|
|
96
|
+
/**
|
|
97
|
+
* List every place of the model in the cold state, so ⌘K then Enter-on-a-name reaches any of
|
|
98
|
+
* them without typing (NAV-9). `AppShell` turns it on. Default `false`.
|
|
99
|
+
*/
|
|
100
|
+
places?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Records and actions pages contribute while mounted — `useCommandSources()` under a
|
|
103
|
+
* `CommandSourceProvider`, which `AppShell` wires itself. Ranked with the pages on a query;
|
|
104
|
+
* actions also show in the cold state.
|
|
105
|
+
*/
|
|
106
|
+
sources?: readonly CommandSource[];
|
|
107
|
+
|
|
94
108
|
/** Resolve model icon *names* to nodes (the app wires its icon set, e.g. lucide). */
|
|
95
109
|
resolveIcon?: IconResolver;
|
|
96
110
|
/** Max fuzzy page results. Default 30. */
|
|
@@ -135,6 +149,8 @@ export function CommandPalette({
|
|
|
135
149
|
onQueryChange,
|
|
136
150
|
searching = false,
|
|
137
151
|
searchDebounceMs = 300,
|
|
152
|
+
places = false,
|
|
153
|
+
sources,
|
|
138
154
|
resolveIcon,
|
|
139
155
|
pagesLimit = 30,
|
|
140
156
|
placeholder = 'Search pages, run a command…',
|
|
@@ -235,7 +251,35 @@ export function CommandPalette({
|
|
|
235
251
|
);
|
|
236
252
|
}, [isCold, trimmed, allShortcuts]);
|
|
237
253
|
|
|
254
|
+
const placeEntries = useMemo(
|
|
255
|
+
() =>
|
|
256
|
+
places
|
|
257
|
+
? deriveSideNavDomains(model, gate).map((d) => ({ id: d.id, path: d.path, label: d.label, icon: d.icon }))
|
|
258
|
+
: [],
|
|
259
|
+
[places, model, gate],
|
|
260
|
+
);
|
|
261
|
+
|
|
262
|
+
// Contributed sources: ranked by the same matcher as the pages, each group kept in its order.
|
|
263
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: `open` — the recents live in storage, so each opening re-reads them.
|
|
264
|
+
const sourceGroups = useMemo(() => {
|
|
265
|
+
if (!sources?.length) return [];
|
|
266
|
+
return sources
|
|
267
|
+
.map((source, index) => {
|
|
268
|
+
// Cold: what was run last comes first (OVL-8), then the page's own order.
|
|
269
|
+
if (isCold) return { key: `${index}:${source.group}`, label: source.group, items: recentFirst(source.group, source.items).slice(0, COLD_SOURCE_LIMIT) };
|
|
270
|
+
const entries = source.items.map((item) => ({ id: item.id, path: '', label: item.label, keywords: item.keywords, item }));
|
|
271
|
+
return { key: `${index}:${source.group}`, label: source.group, items: fuzzyRankItems(trimmed, entries).map((e) => e.item) };
|
|
272
|
+
})
|
|
273
|
+
.filter((group) => group.items.length > 0);
|
|
274
|
+
}, [sources, isCold, trimmed, open]);
|
|
275
|
+
|
|
238
276
|
// ── Actions ───────────────────────────────────────────────────────────────
|
|
277
|
+
const runSource = (group: string, item: CommandSourceItem) => {
|
|
278
|
+
rememberCommandItem(group, item.id);
|
|
279
|
+
if (item.onSelect) item.onSelect();
|
|
280
|
+
else if (item.path) onNavigate(item.path);
|
|
281
|
+
onOpenChange(false);
|
|
282
|
+
};
|
|
239
283
|
const go = (path: string) => {
|
|
240
284
|
onNavigate(path);
|
|
241
285
|
onOpenChange(false);
|
|
@@ -267,7 +311,7 @@ export function CommandPalette({
|
|
|
267
311
|
e.preventDefault();
|
|
268
312
|
}}
|
|
269
313
|
className={cn(
|
|
270
|
-
'fixed left-1/2 top-[
|
|
314
|
+
'fixed left-1/2 top-[var(--palette-top)] z-50 w-[calc(100%-2rem)] max-w-2xl -translate-x-1/2',
|
|
271
315
|
'data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-top-2',
|
|
272
316
|
className,
|
|
273
317
|
)}
|
|
@@ -315,14 +359,19 @@ export function CommandPalette({
|
|
|
315
359
|
|
|
316
360
|
<CommandList>
|
|
317
361
|
{isCold ? (
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
362
|
+
<>
|
|
363
|
+
<ColdState
|
|
364
|
+
recent={recentItems}
|
|
365
|
+
places={placeEntries}
|
|
366
|
+
shortcuts={matchedShortcuts}
|
|
367
|
+
resolveIcon={resolveIcon}
|
|
368
|
+
onNavigate={go}
|
|
369
|
+
onRunShortcut={runShortcut}
|
|
370
|
+
hasPins={pinnedItems.length > 0}
|
|
371
|
+
hasSources={sourceGroups.length > 0}
|
|
372
|
+
/>
|
|
373
|
+
<SourceGroups groups={sourceGroups} onRun={runSource} />
|
|
374
|
+
</>
|
|
326
375
|
) : (
|
|
327
376
|
<>
|
|
328
377
|
<CommandEmpty>{emptyContent}</CommandEmpty>
|
|
@@ -366,6 +415,8 @@ export function CommandPalette({
|
|
|
366
415
|
),
|
|
367
416
|
)}
|
|
368
417
|
|
|
418
|
+
<SourceGroups groups={sourceGroups} onRun={runSource} />
|
|
419
|
+
|
|
369
420
|
{matchedShortcuts.length > 0 && (
|
|
370
421
|
<CommandGroup heading='Shortcuts'>
|
|
371
422
|
{matchedShortcuts.map((shortcut) => (
|
|
@@ -396,20 +447,26 @@ export function CommandPalette({
|
|
|
396
447
|
/** The cold (empty-query) body: recent pages then registered shortcuts, or a hint. */
|
|
397
448
|
function ColdState({
|
|
398
449
|
recent,
|
|
450
|
+
places,
|
|
399
451
|
shortcuts,
|
|
400
452
|
resolveIcon,
|
|
401
453
|
onNavigate,
|
|
402
454
|
onRunShortcut,
|
|
403
455
|
hasPins,
|
|
456
|
+
hasSources,
|
|
404
457
|
}: {
|
|
405
458
|
recent: SearchCatalogueEntry[];
|
|
459
|
+
places: SearchCatalogueEntry[];
|
|
406
460
|
shortcuts: ShortcutEntry[];
|
|
407
461
|
resolveIcon?: IconResolver;
|
|
408
462
|
onNavigate: (path: string) => void;
|
|
409
463
|
onRunShortcut: (shortcut: ShortcutEntry) => void;
|
|
410
464
|
hasPins: boolean;
|
|
465
|
+
hasSources: boolean;
|
|
411
466
|
}) {
|
|
412
|
-
if (recent.length === 0 && shortcuts.length === 0) {
|
|
467
|
+
if (recent.length === 0 && places.length === 0 && shortcuts.length === 0) {
|
|
468
|
+
// The contributed actions below ARE the cold state then — no hint above them.
|
|
469
|
+
if (hasSources) return null;
|
|
413
470
|
return (
|
|
414
471
|
<p className='px-3 py-8 text-center text-sm text-muted-foreground'>
|
|
415
472
|
{hasPins ? 'Type to search pages and commands.' : 'Start typing to find any page.'}
|
|
@@ -435,6 +492,15 @@ function ColdState({
|
|
|
435
492
|
))}
|
|
436
493
|
</CommandGroup>
|
|
437
494
|
)}
|
|
495
|
+
{places.length > 0 && (
|
|
496
|
+
<CommandGroup heading='Places'>
|
|
497
|
+
{places.map((item) => (
|
|
498
|
+
<CommandItem key={`place:${item.id}`} value={`place:${item.id}`} onSelect={() => onNavigate(item.path)}>
|
|
499
|
+
<ItemBody icon={renderIcon(resolveIcon, item.icon)} label={item.label} />
|
|
500
|
+
</CommandItem>
|
|
501
|
+
))}
|
|
502
|
+
</CommandGroup>
|
|
503
|
+
)}
|
|
438
504
|
{shortcuts.length > 0 && (
|
|
439
505
|
<CommandGroup heading='Shortcuts'>
|
|
440
506
|
{shortcuts.map((shortcut) => (
|
|
@@ -456,6 +522,37 @@ function ColdState({
|
|
|
456
522
|
);
|
|
457
523
|
}
|
|
458
524
|
|
|
525
|
+
/** How many of each contributed source the cold state shows before the reader types. */
|
|
526
|
+
const COLD_SOURCE_LIMIT = 5;
|
|
527
|
+
|
|
528
|
+
/** The groups pages contributed through `useCommandSource`. */
|
|
529
|
+
function SourceGroups({
|
|
530
|
+
groups,
|
|
531
|
+
onRun,
|
|
532
|
+
}: {
|
|
533
|
+
groups: { key: string; label: string; items: readonly CommandSourceItem[] }[];
|
|
534
|
+
onRun: (group: string, item: CommandSourceItem) => void;
|
|
535
|
+
}) {
|
|
536
|
+
return (
|
|
537
|
+
<>
|
|
538
|
+
{groups.map((group) => (
|
|
539
|
+
<CommandGroup key={`source-${group.key}`} heading={group.label}>
|
|
540
|
+
{group.items.map((item) => (
|
|
541
|
+
<CommandItem key={`${group.key}:${item.id}`} value={`source:${group.key}:${item.id}`} onSelect={() => onRun(group.label, item)}>
|
|
542
|
+
<ItemBody
|
|
543
|
+
icon={item.icon}
|
|
544
|
+
label={item.label}
|
|
545
|
+
sub={item.sub}
|
|
546
|
+
trailing={item.shortcut ? <KeyHint keys={item.shortcut} /> : undefined}
|
|
547
|
+
/>
|
|
548
|
+
</CommandItem>
|
|
549
|
+
))}
|
|
550
|
+
</CommandGroup>
|
|
551
|
+
))}
|
|
552
|
+
</>
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
|
|
459
556
|
/** Shared row layout: optional leading icon, a label + sub stack, optional trailing node. */
|
|
460
557
|
function ItemBody({
|
|
461
558
|
icon,
|
|
@@ -629,7 +726,7 @@ function PinChip({
|
|
|
629
726
|
) : (
|
|
630
727
|
<Pin className='size-3 text-muted-foreground' aria-hidden='true' />
|
|
631
728
|
)}
|
|
632
|
-
<span className='max-w-
|
|
729
|
+
<span className='max-w-40 truncate'>{item.label}</span>
|
|
633
730
|
</Button>
|
|
634
731
|
);
|
|
635
732
|
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// What a page adds to the shell's command palette while it is mounted (NAV-9, OVL-8). The
|
|
2
|
+
// palette already knows every PLACE from the navigation model; a page knows its RECORDS (the
|
|
3
|
+
// open workbook's sheets, the station's queued tasks) and its ACTIONS ("New request"). It
|
|
4
|
+
// contributes them with one hook and they vanish when it unmounts, so the palette never
|
|
5
|
+
// offers a record from a page the reader has left.
|
|
6
|
+
//
|
|
7
|
+
// A store rather than React state on purpose: a page re-renders often and hands a new
|
|
8
|
+
// `items` array each time. Held in state, every registration would re-render the shell and
|
|
9
|
+
// re-run the page's effect — a loop. Here an entry is replaced only when what it SHOWS
|
|
10
|
+
// changes (group, ids, labels, subs), and `onSelect` always calls the page's latest callback.
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
createContext,
|
|
14
|
+
type ReactNode,
|
|
15
|
+
useContext,
|
|
16
|
+
useEffect,
|
|
17
|
+
useId,
|
|
18
|
+
useRef,
|
|
19
|
+
useState,
|
|
20
|
+
useSyncExternalStore,
|
|
21
|
+
} from 'react';
|
|
22
|
+
import { devWarnOnce } from '../lib/devWarn.js';
|
|
23
|
+
|
|
24
|
+
export interface CommandSourceItem {
|
|
25
|
+
/** Stable within its source. */
|
|
26
|
+
id: string;
|
|
27
|
+
label: string;
|
|
28
|
+
/** One short line under the label — where it lives, what it does. */
|
|
29
|
+
sub?: string;
|
|
30
|
+
icon?: ReactNode;
|
|
31
|
+
/** Extra match terms (synonyms, old names). */
|
|
32
|
+
keywords?: string[];
|
|
33
|
+
/** A shortcut hint drawn on the row's right (`'$mod+n'`), when the action has one. */
|
|
34
|
+
shortcut?: string;
|
|
35
|
+
/** Run an action. Given with `path`, this wins. */
|
|
36
|
+
onSelect?: () => void;
|
|
37
|
+
/** Or go somewhere — handed to the palette's `onNavigate`. */
|
|
38
|
+
path?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface CommandSource {
|
|
42
|
+
/** The group heading in the palette ("Requests", "Actions"). */
|
|
43
|
+
group: string;
|
|
44
|
+
items: readonly CommandSourceItem[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
type Listener = () => void;
|
|
48
|
+
|
|
49
|
+
/** The live set of contributed sources. One per `CommandSourceProvider`. */
|
|
50
|
+
export class CommandSourceStore {
|
|
51
|
+
private entries = new Map<string, CommandSource>();
|
|
52
|
+
private listeners = new Set<Listener>();
|
|
53
|
+
private snapshot: CommandSource[] = [];
|
|
54
|
+
|
|
55
|
+
set(key: string, source: CommandSource): void {
|
|
56
|
+
this.entries.set(key, source);
|
|
57
|
+
this.emit();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
delete(key: string): void {
|
|
61
|
+
if (this.entries.delete(key)) this.emit();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
subscribe = (listener: Listener): (() => void) => {
|
|
65
|
+
this.listeners.add(listener);
|
|
66
|
+
return () => this.listeners.delete(listener);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
getSnapshot = (): CommandSource[] => this.snapshot;
|
|
70
|
+
|
|
71
|
+
private emit(): void {
|
|
72
|
+
this.snapshot = Array.from(this.entries.values());
|
|
73
|
+
for (const listener of this.listeners) listener();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const SourceContext = createContext<CommandSourceStore | null>(null);
|
|
78
|
+
|
|
79
|
+
/** Holds the sources pages contribute. `AppShell` mounts one; an app without it can too. */
|
|
80
|
+
export function CommandSourceProvider({ children }: { children: ReactNode }) {
|
|
81
|
+
const [store] = useState(() => new CommandSourceStore());
|
|
82
|
+
return <SourceContext.Provider value={store}>{children}</SourceContext.Provider>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const EMPTY: CommandSource[] = [];
|
|
86
|
+
const NOOP_SUBSCRIBE = () => () => {};
|
|
87
|
+
|
|
88
|
+
/** Every source contributed under the nearest provider, in mount order. */
|
|
89
|
+
export function useCommandSources(): CommandSource[] {
|
|
90
|
+
const store = useContext(SourceContext);
|
|
91
|
+
return useSyncExternalStore(
|
|
92
|
+
store?.subscribe ?? NOOP_SUBSCRIBE,
|
|
93
|
+
store?.getSnapshot ?? (() => EMPTY),
|
|
94
|
+
store?.getSnapshot ?? (() => EMPTY),
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** What a row SHOWS — an entry is replaced only when this changes. */
|
|
99
|
+
const signature = (source: CommandSource): string =>
|
|
100
|
+
[source.group, ...source.items.map((i) => `${i.id}\u0001${i.label}\u0001${i.sub ?? ''}\u0001${i.path ?? ''}`)].join(
|
|
101
|
+
'\u0002',
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Contribute records and actions to the shell's ⌘K palette while this component is mounted.
|
|
106
|
+
*
|
|
107
|
+
* ```tsx
|
|
108
|
+
* useCommandSource({ group: 'Requests', items: requests.map((r) => ({ id: r.id, label: r.title, path: `/requests/${r.id}` })) });
|
|
109
|
+
* useCommandSource({ group: 'Actions', items: [{ id: 'new', label: 'New request', shortcut: '$mod+n', onSelect: openComposer }] });
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export function useCommandSource(source: CommandSource): void {
|
|
113
|
+
const store = useContext(SourceContext);
|
|
114
|
+
const key = useId();
|
|
115
|
+
const latest = useRef(source);
|
|
116
|
+
latest.current = source;
|
|
117
|
+
const sig = signature(source);
|
|
118
|
+
|
|
119
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: `sig` IS the trigger — the entry is replaced when what it shows changes, and the source itself is read through `latest`.
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
if (!store) {
|
|
122
|
+
devWarnOnce(
|
|
123
|
+
'useCommandSource:no-provider',
|
|
124
|
+
'cursedbelt: useCommandSource() was called outside a CommandSourceProvider — nothing will reach the palette. ' +
|
|
125
|
+
'AppShell provides one; an app without AppShell wraps its root in <CommandSourceProvider>.',
|
|
126
|
+
);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const current = latest.current;
|
|
130
|
+
store.set(key, {
|
|
131
|
+
group: current.group,
|
|
132
|
+
items: current.items.map((item) => ({
|
|
133
|
+
...item,
|
|
134
|
+
// Always the page's LATEST callback — the entry is only replaced when what it shows changes.
|
|
135
|
+
onSelect: item.onSelect
|
|
136
|
+
? () => latest.current.items.find((i) => i.id === item.id)?.onSelect?.()
|
|
137
|
+
: undefined,
|
|
138
|
+
})),
|
|
139
|
+
});
|
|
140
|
+
}, [store, key, sig]);
|
|
141
|
+
|
|
142
|
+
useEffect(() => {
|
|
143
|
+
if (!store) return;
|
|
144
|
+
return () => store.delete(key);
|
|
145
|
+
}, [store, key]);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// ── Recent items (OVL-8: "recent items first") ─────────────────────────────────────────────
|
|
149
|
+
// The palette remembers which contributed records and actions were run, newest first, on this
|
|
150
|
+
// device. Keyed by group + id, so "Requests › 2471" and "Tasks › 2471" stay distinct.
|
|
151
|
+
|
|
152
|
+
/** Where the palette keeps the items it ran. */
|
|
153
|
+
export const PALETTE_RECENT_STORAGE_KEY = 'cb:palette-recent';
|
|
154
|
+
const RECENT_LIMIT = 20;
|
|
155
|
+
|
|
156
|
+
const recentKey = (group: string, id: string) => `${group}\u0000${id}`;
|
|
157
|
+
|
|
158
|
+
function readRecents(): string[] {
|
|
159
|
+
try {
|
|
160
|
+
const raw = globalThis.localStorage?.getItem(PALETTE_RECENT_STORAGE_KEY);
|
|
161
|
+
const parsed: unknown = raw ? JSON.parse(raw) : [];
|
|
162
|
+
return Array.isArray(parsed) ? parsed.filter((k): k is string => typeof k === 'string') : [];
|
|
163
|
+
} catch {
|
|
164
|
+
return [];
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** Record that an item was run: it moves to the front of its group's cold list. */
|
|
169
|
+
export function rememberCommandItem(group: string, id: string): void {
|
|
170
|
+
const key = recentKey(group, id);
|
|
171
|
+
const next = [key, ...readRecents().filter((k) => k !== key)].slice(0, RECENT_LIMIT);
|
|
172
|
+
try {
|
|
173
|
+
globalThis.localStorage?.setItem(PALETTE_RECENT_STORAGE_KEY, JSON.stringify(next));
|
|
174
|
+
} catch {
|
|
175
|
+
// Not remembered; the palette still works in the source's own order.
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** A source's items with the ones run recently first (newest first), the rest in their order. */
|
|
180
|
+
export function recentFirst(group: string, items: readonly CommandSourceItem[]): CommandSourceItem[] {
|
|
181
|
+
const rank = new Map(readRecents().map((key, index) => [key, index]));
|
|
182
|
+
const recent = items.filter((item) => rank.has(recentKey(group, item.id)));
|
|
183
|
+
if (!recent.length) return [...items];
|
|
184
|
+
recent.sort((a, b) => (rank.get(recentKey(group, a.id)) ?? 0) - (rank.get(recentKey(group, b.id)) ?? 0));
|
|
185
|
+
return [...recent, ...items.filter((item) => !rank.has(recentKey(group, item.id)))];
|
|
186
|
+
}
|
|
@@ -14,6 +14,13 @@ export {
|
|
|
14
14
|
CommandList,
|
|
15
15
|
CommandSeparator,
|
|
16
16
|
} from './Command.js';
|
|
17
|
+
export {
|
|
18
|
+
type CommandSource,
|
|
19
|
+
type CommandSourceItem,
|
|
20
|
+
CommandSourceProvider,
|
|
21
|
+
useCommandSource,
|
|
22
|
+
useCommandSources,
|
|
23
|
+
} from './commandSources.js';
|
|
17
24
|
export {
|
|
18
25
|
CommandPalette,
|
|
19
26
|
type CommandPaletteProps,
|
|
@@ -149,7 +149,7 @@ export const RichTextEditor = forwardRef<RichTextEditorHandle, RichTextEditorPro
|
|
|
149
149
|
)}
|
|
150
150
|
>
|
|
151
151
|
{!readOnly && <RichTextToolbar editor={editor} className={toolbarClassName} />}
|
|
152
|
-
<EditorContent editor={editor} className='cb-rich-text-content min-h-
|
|
152
|
+
<EditorContent editor={editor} className='cb-rich-text-content min-h-32 flex-1' />
|
|
153
153
|
{showCount && charCount !== undefined && (
|
|
154
154
|
<div
|
|
155
155
|
className={cn(
|
|
@@ -43,7 +43,7 @@ function ToolbarButton({ icon, label, onClick, active, disabled }: ToolbarButton
|
|
|
43
43
|
onClick={onClick}
|
|
44
44
|
disabled={disabled}
|
|
45
45
|
className={cn(
|
|
46
|
-
'h-8 w-8 min-h-0 shrink-0 rounded text-muted-foreground [&_svg]:size-
|
|
46
|
+
'h-8 w-8 min-h-0 shrink-0 rounded text-muted-foreground [&_svg]:size-4',
|
|
47
47
|
active && 'bg-muted text-foreground',
|
|
48
48
|
)}
|
|
49
49
|
>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* after an app's responsive variant (task 2124). An app that imports every area gets exactly
|
|
19
19
|
* what `cursedbelt/styles-utilities.css` emits — proved rule by rule in
|
|
20
20
|
* src/stylesAreas.spec.ts, which is also what fails when this file is stale.
|
|
21
|
-
*
|
|
21
|
+
* 148 candidate(s).
|
|
22
22
|
*
|
|
23
23
|
* Written by scripts/generateAreaStyles.ts (`bun run styles:areas`), which
|
|
24
24
|
* `bun run build` runs. The map of what is in which area, and why the areas are
|
|
@@ -28,25 +28,25 @@
|
|
|
28
28
|
@source inline("@max-2xl:border-0 @max-2xl:min-w-0! @max-2xl:p-0! @max-2xl:w-0! @max-4xl:[&>*]:hidden");
|
|
29
29
|
@source inline("@max-4xl:border-0 @max-4xl:min-w-0! @max-4xl:p-0! @max-4xl:w-0! @max-6xl:[&>*]:hidden");
|
|
30
30
|
@source inline("@max-6xl:border-0 @max-6xl:min-w-0! @max-6xl:p-0! @max-6xl:w-0! @xl:block @xl:hidden");
|
|
31
|
-
@source inline("[&>*]:hidden [&_svg]:size-3 [overflow-wrap:anywhere] active:cursor-grabbing
|
|
32
|
-
@source inline("appearance-none bg-[var(--cb-frozen-bg)] bg-card/95 bg-gradient-to-t bg-muted/30
|
|
33
|
-
@source inline("bg-muted/50 border-accent-solid border-accent/60 border-field-error border-l
|
|
34
|
-
@source inline("collapse cursor-grab data-[ending-style]:opacity-0 data-[ending-style]:scale-95");
|
|
31
|
+
@source inline("[&>*]:hidden [&>*]:max-w-none [&_svg]:size-3 [overflow-wrap:anywhere] active:cursor-grabbing");
|
|
32
|
+
@source inline("appearance appearance-none bg-[var(--cb-frozen-bg)] bg-card/95 bg-gradient-to-t bg-muted/30");
|
|
33
|
+
@source inline("bg-muted/40 bg-muted/50 border-accent-solid border-accent/60 border-field-error border-l");
|
|
34
|
+
@source inline("border-r col collapse cursor-grab data-[ending-style]:opacity-0 data-[ending-style]:scale-95");
|
|
35
35
|
@source inline("data-[highlighted]:bg-accent/10 data-[highlighted]:text-accent-strong");
|
|
36
36
|
@source inline("data-[starting-style]:opacity-0 data-[starting-style]:scale-95");
|
|
37
37
|
@source inline("data-[state=closed]:slide-out-to-bottom data-[state=closed]:slide-out-to-left");
|
|
38
38
|
@source inline("data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-bottom");
|
|
39
39
|
@source inline("data-[state=open]:slide-in-from-left data-[state=open]:slide-in-from-right disabled:opacity-40");
|
|
40
|
-
@source inline("duration
|
|
41
|
-
@source inline("focus-within:ring-2 focus-within:ring-field-ring/30
|
|
40
|
+
@source inline("duration-100 fade-in focus-visible:ring-field-ring/40 focus-within:border-field-ring");
|
|
41
|
+
@source inline("focus-within:ring-2 focus-within:ring-field-ring/30 from-card h-105");
|
|
42
42
|
@source inline("has-[[aria-invalid=true]]:border-field-error hover:bg-background hover:bg-border");
|
|
43
43
|
@source inline("hover:bg-muted/40 hover:border-field-ring hover:text-warning italic justify-self-end");
|
|
44
|
-
@source inline("last:border-0 left-0 left-11 left-2.5 list-none max-h-64 max-h-
|
|
45
|
-
@source inline("max-h-[
|
|
46
|
-
@source inline("min-h-dvh min-w-0! min-w-
|
|
47
|
-
@source inline("mt-3 mt-4 not-italic ordinal p-0! pb-1.5 pl-1.5 pl-2 pr-0.5 pr-1
|
|
48
|
-
@source inline("resize-none resize-y right-3 ring-field-error/30 rounded-l-xl
|
|
49
|
-
@source inline("self-center self-stretch shadow-[1px_0_0_0_var(--color-border)]
|
|
50
|
-
@source inline("slide-in-from-top-1 table-fixed text-accent-solid-foreground
|
|
51
|
-
@source inline("text-muted-foreground/60 text-
|
|
52
|
-
@source inline("transition-[transform,opacity] w-0! w-11 w-20 w-
|
|
44
|
+
@source inline("last:border-0 left-0 left-11 left-2.5 list-none max-h-64 max-h-88 max-h-[var(--sheet-h-lg)]");
|
|
45
|
+
@source inline("max-h-[var(--sheet-h-md)] max-h-[var(--sheet-h-sm)] max-w-32 max-w-36 max-w-45 max-w-48 max-w-60");
|
|
46
|
+
@source inline("max-w-sm min-h-20 min-h-dvh min-w-0! min-w-20 min-w-24 min-w-52 min-w-[var(--anchor-width)]");
|
|
47
|
+
@source inline("min-w-max ml-1.5 mr-2 mt-1.5 mt-3 mt-4 not-italic ordinal p-0! pb-1.5 pl-1.5 pl-2 pr-0.5 pr-1");
|
|
48
|
+
@source inline("pr-10 pr-16 pr-3 pr-9 pt-1 resize-none resize-y right-3 ring-field-error/30 rounded-l-xl");
|
|
49
|
+
@source inline("rounded-r-xl rounded-t-xl self self-center self-stretch shadow-[1px_0_0_0_var(--color-border)]");
|
|
50
|
+
@source inline("shrink-[2] size-2 size-7 slide-in-from-top-1 table-fixed text-accent-solid-foreground");
|
|
51
|
+
@source inline("text-field-placeholder text-muted-foreground/60 text-success text-xl to-transparent top-3");
|
|
52
|
+
@source inline("transition-[transform,opacity] w-0! w-11 w-20 w-32 w-36 w-40 w-88");
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
* after an app's responsive variant (task 2124). An app that imports every area gets exactly
|
|
19
19
|
* what `cursedbelt/styles-utilities.css` emits — proved rule by rule in
|
|
20
20
|
* src/stylesAreas.spec.ts, which is also what fails when this file is stale.
|
|
21
|
-
*
|
|
21
|
+
* 11 candidate(s).
|
|
22
22
|
*
|
|
23
23
|
* Written by scripts/generateAreaStyles.ts (`bun run styles:areas`), which
|
|
24
24
|
* `bun run build` runs. The map of what is in which area, and why the areas are
|
|
25
25
|
* import closures rather than a hand-written list, is scripts/styleAreas.ts.
|
|
26
26
|
*/
|
|
27
27
|
@source inline("caret-transparent focus-within:border-field-ring focus-within:ring-2");
|
|
28
|
-
@source inline("focus-within:ring-field-ring/30 h-12 has-[[aria-invalid=true]]:border-field-error
|
|
29
|
-
@source inline("self-start self-stretch sm:w-11");
|
|
28
|
+
@source inline("focus-within:ring-field-ring/30 h-12 has-[[aria-invalid=true]]:border-field-error max-w-sm");
|
|
29
|
+
@source inline("min-h-dvh self-start self-stretch sm:w-11");
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* after an app's responsive variant (task 2124). An app that imports every area gets exactly
|
|
19
19
|
* what `cursedbelt/styles-utilities.css` emits — proved rule by rule in
|
|
20
20
|
* src/stylesAreas.spec.ts, which is also what fails when this file is stale.
|
|
21
|
-
*
|
|
21
|
+
* 80 candidate(s).
|
|
22
22
|
*
|
|
23
23
|
* Written by scripts/generateAreaStyles.ts (`bun run styles:areas`), which
|
|
24
24
|
* `bun run build` runs. The map of what is in which area, and why the areas are
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
@source inline("dark:text-purple-200 dark:text-rose-200 dark:text-sky-200 dark:text-slate-200 dark:text-teal-200");
|
|
35
35
|
@source inline("dark:text-violet-200 focus:opacity-100 g grid-cols-[repeat(7,minmax(0,1fr))]");
|
|
36
36
|
@source inline("group-focus-within:opacity-100 h-3.5 hover:bg-muted/30 hover:bg-muted/40 hover:border-border/80");
|
|
37
|
-
@source inline("justify-start last:border-r-0 line-through min-h-
|
|
38
|
-
@source inline("outline-
|
|
39
|
-
@source inline("sm:
|
|
40
|
-
@source inline("text-
|
|
41
|
-
@source inline("text-
|
|
37
|
+
@source inline("justify-start last:border-r-0 line-through min-h-28 min-h-40 outline-1 outline-dashed");
|
|
38
|
+
@source inline("outline-tone-amber-ink p-1.5 sm:flex-row sm:gap-1 sm:items-center sm:min-h-0 sm:min-h-24");
|
|
39
|
+
@source inline("sm:px-1.5 sm:text-xs text-amber-900 text-blue-800 text-emerald-800 text-green-800");
|
|
40
|
+
@source inline("text-purple-800 text-rose-800 text-sky-800 text-slate-800 text-teal-800 text-tone-amber-ink");
|
|
41
|
+
@source inline("text-violet-800 w-3.5");
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
* `bun run build` runs. The map of what is in which area, and why the areas are
|
|
27
27
|
* import closures rather than a hand-written list, is scripts/styleAreas.ts.
|
|
28
28
|
*/
|
|
29
|
-
@source inline("bg-muted/40 min-w-
|
|
29
|
+
@source inline("bg-muted/40 min-w-20 shrink-[2]");
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
* after an app's responsive variant (task 2124). An app that imports every area gets exactly
|
|
19
19
|
* what `cursedbelt/styles-utilities.css` emits — proved rule by rule in
|
|
20
20
|
* src/stylesAreas.spec.ts, which is also what fails when this file is stale.
|
|
21
|
-
*
|
|
21
|
+
* 15 candidate(s).
|
|
22
22
|
*
|
|
23
23
|
* Written by scripts/generateAreaStyles.ts (`bun run styles:areas`), which
|
|
24
24
|
* `bun run build` runs. The map of what is in which area, and why the areas are
|
|
25
25
|
* import closures rather than a hand-written list, is scripts/styleAreas.ts.
|
|
26
26
|
*/
|
|
27
|
-
@source inline("border-dashed collapse gap-
|
|
28
|
-
@source inline("
|
|
27
|
+
@source inline("border-dashed collapse gap-x-4 hover:opacity-80 list-none ml-2 opacity-25 pl-3 pr-2 right-1");
|
|
28
|
+
@source inline("rounded-xs size-2 top-0.5 w-2 w-3");
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* after an app's responsive variant (task 2124). An app that imports every area gets exactly
|
|
19
19
|
* what `cursedbelt/styles-utilities.css` emits — proved rule by rule in
|
|
20
20
|
* src/stylesAreas.spec.ts, which is also what fails when this file is stale.
|
|
21
|
-
*
|
|
21
|
+
* 66 candidate(s).
|
|
22
22
|
*
|
|
23
23
|
* Written by scripts/generateAreaStyles.ts (`bun run styles:areas`), which
|
|
24
24
|
* `bun run build` runs. The map of what is in which area, and why the areas are
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
@source inline("-bottom-0.5 -mx-0.5 -outline-offset-2 -right-0.5 -space-x-2 [&_svg]:size-3 animate-bounce");
|
|
28
28
|
@source inline("bg-background/30 bg-black/10 bg-gradient-to-t border-border/40 bottom-3 col collapse");
|
|
29
29
|
@source inline("dark:bg-white/10 first:mt-0 flex-row flex-row-reverse flex-shrink focus-visible:outline-2");
|
|
30
|
-
@source inline("focus-visible:outline-offset-2 focus-visible:outline-ring from-surface h-3.5
|
|
30
|
+
@source inline("focus-visible:outline-offset-2 focus-visible:outline-ring from-surface h-105 h-3.5");
|
|
31
31
|
@source inline("hover:bg-background/50 hover:border-border-strong hover:border-field-ring hover:opacity-80");
|
|
32
|
-
@source inline("italic list-decimal list-disc max-w-
|
|
33
|
-
@source inline("outline-
|
|
34
|
-
@source inline("rounded-bl-
|
|
35
|
-
@source inline("text-xl to-transparent top-1 underline-offset-2 w-1.5 w-3
|
|
32
|
+
@source inline("italic list-decimal list-disc max-w-4/5 min-h-20 min-w-16 ml-0.5 ml-1.5 outline-2 outline-accent");
|
|
33
|
+
@source inline("outline-dashed pl-5 pr-9 pt-0.5 px-0.5 px-3.5 resize-none right-1 rounded-2xl rounded-bl-md");
|
|
34
|
+
@source inline("rounded-bl-sm rounded-br-md rounded-br-sm text-[length:var(--text-code-block)]");
|
|
35
|
+
@source inline("text-[length:var(--text-code-inline)] text-xl to-transparent top-1 underline-offset-2 w-1.5 w-3");
|
|
36
|
+
@source inline("w-3.5 w-40 w-48 w-56 w-88 z-[9]");
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
* after an app's responsive variant (task 2124). An app that imports every area gets exactly
|
|
19
19
|
* what `cursedbelt/styles-utilities.css` emits — proved rule by rule in
|
|
20
20
|
* src/stylesAreas.spec.ts, which is also what fails when this file is stale.
|
|
21
|
-
*
|
|
21
|
+
* 4 candidate(s).
|
|
22
22
|
*
|
|
23
23
|
* Written by scripts/generateAreaStyles.ts (`bun run styles:areas`), which
|
|
24
24
|
* `bun run build` runs. The map of what is in which area, and why the areas are
|
|
25
25
|
* import closures rather than a hand-written list, is scripts/styleAreas.ts.
|
|
26
26
|
*/
|
|
27
|
-
@source inline("divide-y-0 gap-x-4 h-5 list-none
|
|
27
|
+
@source inline("divide-y-0 gap-x-4 h-5 list-none");
|