cursedbelt 5.53.0 → 5.55.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/activity-bar/ActivityBar.d.ts +39 -3
- package/dist/react/activity-bar/ActivityBar.d.ts.map +1 -1
- package/dist/react/activity-bar/ActivityBar.js +215 -6
- package/dist/react/activity-bar/ActivityBar.js.map +1 -1
- package/dist/react/activity-bar/activityBar.css +95 -10
- package/dist/react/canvas-hud/HudControls.d.ts.map +1 -1
- package/dist/react/canvas-hud/HudControls.js +1 -1
- package/dist/react/canvas-hud/HudControls.js.map +1 -1
- package/dist/react/charts/HeatmapChart.d.ts.map +1 -1
- package/dist/react/charts/HeatmapChart.js +2 -1
- package/dist/react/charts/HeatmapChart.js.map +1 -1
- package/dist/react/charts/IntervalTimeline.d.ts.map +1 -1
- package/dist/react/charts/IntervalTimeline.js +2 -1
- package/dist/react/charts/IntervalTimeline.js.map +1 -1
- package/dist/react/code-editor/CodeEditor.d.ts +14 -1
- package/dist/react/code-editor/CodeEditor.d.ts.map +1 -1
- package/dist/react/code-editor/CodeEditor.js +31 -6
- package/dist/react/code-editor/CodeEditor.js.map +1 -1
- package/dist/react/code-editor/languages.d.ts +1 -1
- package/dist/react/code-editor/languages.d.ts.map +1 -1
- package/dist/react/code-editor/languages.js +55 -0
- package/dist/react/code-editor/languages.js.map +1 -1
- package/dist/react/components/ActionBar.d.ts.map +1 -1
- package/dist/react/components/ActionBar.js +1 -1
- package/dist/react/components/ActionBar.js.map +1 -1
- package/dist/react/components/AddItemsMenu.d.ts.map +1 -1
- package/dist/react/components/AddItemsMenu.js +2 -1
- package/dist/react/components/AddItemsMenu.js.map +1 -1
- package/dist/react/components/Button.d.ts +5 -4
- package/dist/react/components/Button.d.ts.map +1 -1
- package/dist/react/components/Button.js +5 -2
- package/dist/react/components/Button.js.map +1 -1
- package/dist/react/components/ChipFilterStrip.js +3 -3
- package/dist/react/components/ChipFilterStrip.js.map +1 -1
- package/dist/react/components/Collapsible.d.ts.map +1 -1
- package/dist/react/components/Collapsible.js +2 -1
- package/dist/react/components/Collapsible.js.map +1 -1
- package/dist/react/components/ComboboxField.d.ts.map +1 -1
- package/dist/react/components/ComboboxField.js +4 -1
- package/dist/react/components/ComboboxField.js.map +1 -1
- package/dist/react/components/DataTable/CardView.js +2 -2
- package/dist/react/components/DataTable/CardView.js.map +1 -1
- package/dist/react/components/DataTable/ColumnChecklist.d.ts.map +1 -1
- package/dist/react/components/DataTable/ColumnChecklist.js +4 -3
- package/dist/react/components/DataTable/ColumnChecklist.js.map +1 -1
- package/dist/react/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/react/components/DataTable/DataTable.js +9 -4
- package/dist/react/components/DataTable/DataTable.js.map +1 -1
- package/dist/react/components/DataTable/SearchBox.d.ts.map +1 -1
- package/dist/react/components/DataTable/SearchBox.js +4 -2
- package/dist/react/components/DataTable/SearchBox.js.map +1 -1
- package/dist/react/components/DataTable/SortHeader.d.ts.map +1 -1
- package/dist/react/components/DataTable/SortHeader.js +3 -2
- package/dist/react/components/DataTable/SortHeader.js.map +1 -1
- package/dist/react/components/DataTable/SortStack.d.ts.map +1 -1
- package/dist/react/components/DataTable/SortStack.js +4 -3
- package/dist/react/components/DataTable/SortStack.js.map +1 -1
- package/dist/react/components/DataTable/TableFilterBuilder.d.ts.map +1 -1
- package/dist/react/components/DataTable/TableFilterBuilder.js +4 -3
- package/dist/react/components/DataTable/TableFilterBuilder.js.map +1 -1
- package/dist/react/components/DatePicker.d.ts.map +1 -1
- package/dist/react/components/DatePicker.js +2 -1
- package/dist/react/components/DatePicker.js.map +1 -1
- package/dist/react/components/DateRangePicker.d.ts.map +1 -1
- package/dist/react/components/DateRangePicker.js +2 -1
- package/dist/react/components/DateRangePicker.js.map +1 -1
- package/dist/react/components/DisclosureButton.d.ts.map +1 -1
- package/dist/react/components/DisclosureButton.js +2 -1
- package/dist/react/components/DisclosureButton.js.map +1 -1
- package/dist/react/components/DragHandle.d.ts.map +1 -1
- package/dist/react/components/DragHandle.js +2 -1
- package/dist/react/components/DragHandle.js.map +1 -1
- package/dist/react/components/EmojiField.d.ts.map +1 -1
- package/dist/react/components/EmojiField.js +2 -1
- package/dist/react/components/EmojiField.js.map +1 -1
- package/dist/react/components/ExpandableRow.d.ts.map +1 -1
- package/dist/react/components/ExpandableRow.js +2 -1
- package/dist/react/components/ExpandableRow.js.map +1 -1
- package/dist/react/components/FormPreviewLayout.js +1 -1
- package/dist/react/components/FormPreviewLayout.js.map +1 -1
- package/dist/react/components/InlineEditableText.d.ts.map +1 -1
- package/dist/react/components/InlineEditableText.js +2 -1
- package/dist/react/components/InlineEditableText.js.map +1 -1
- package/dist/react/components/Menu.d.ts.map +1 -1
- package/dist/react/components/Menu.js +2 -1
- package/dist/react/components/Menu.js.map +1 -1
- package/dist/react/components/NativeSelect.d.ts.map +1 -1
- package/dist/react/components/NativeSelect.js +4 -2
- package/dist/react/components/NativeSelect.js.map +1 -1
- package/dist/react/components/RatingField.d.ts.map +1 -1
- package/dist/react/components/RatingField.js +2 -1
- package/dist/react/components/RatingField.js.map +1 -1
- package/dist/react/components/ReactionBar.d.ts.map +1 -1
- package/dist/react/components/ReactionBar.js +2 -1
- package/dist/react/components/ReactionBar.js.map +1 -1
- package/dist/react/components/RevealAction.d.ts.map +1 -1
- package/dist/react/components/RevealAction.js +2 -1
- package/dist/react/components/RevealAction.js.map +1 -1
- package/dist/react/components/SearchInput.js +1 -1
- package/dist/react/components/SearchInput.js.map +1 -1
- package/dist/react/components/SectionNav.d.ts +39 -0
- package/dist/react/components/SectionNav.d.ts.map +1 -0
- package/dist/react/components/SectionNav.js +76 -0
- package/dist/react/components/SectionNav.js.map +1 -0
- package/dist/react/components/SegmentedControl.d.ts.map +1 -1
- package/dist/react/components/SegmentedControl.js +5 -2
- package/dist/react/components/SegmentedControl.js.map +1 -1
- package/dist/react/components/SelectableRow.d.ts.map +1 -1
- package/dist/react/components/SelectableRow.js +2 -1
- package/dist/react/components/SelectableRow.js.map +1 -1
- package/dist/react/components/StarRating.d.ts.map +1 -1
- package/dist/react/components/StarRating.js +2 -1
- package/dist/react/components/StarRating.js.map +1 -1
- package/dist/react/components/Tooltip.d.ts +4 -2
- package/dist/react/components/Tooltip.d.ts.map +1 -1
- package/dist/react/components/Tooltip.js.map +1 -1
- package/dist/react/components/TooltipImpl.d.ts +0 -5
- package/dist/react/components/TooltipImpl.d.ts.map +1 -1
- package/dist/react/components/TooltipImpl.js +70 -1
- package/dist/react/components/TooltipImpl.js.map +1 -1
- package/dist/react/components/TreeView.d.ts.map +1 -1
- package/dist/react/components/TreeView.js +16 -2
- package/dist/react/components/TreeView.js.map +1 -1
- package/dist/react/components/UnstyledButton.d.ts.map +1 -1
- package/dist/react/components/UnstyledButton.js +2 -1
- package/dist/react/components/UnstyledButton.js.map +1 -1
- package/dist/react/components/calendar/EventChip.d.ts.map +1 -1
- package/dist/react/components/calendar/EventChip.js +2 -1
- package/dist/react/components/calendar/EventChip.js.map +1 -1
- package/dist/react/components/searchInput.css +21 -5
- package/dist/react/components/sharing/RecipientPicker.d.ts.map +1 -1
- package/dist/react/components/sharing/RecipientPicker.js +2 -1
- package/dist/react/components/sharing/RecipientPicker.js.map +1 -1
- package/dist/react/disk-usage/DiskUsageTree.d.ts +28 -3
- package/dist/react/disk-usage/DiskUsageTree.d.ts.map +1 -1
- package/dist/react/disk-usage/DiskUsageTree.js +93 -15
- package/dist/react/disk-usage/DiskUsageTree.js.map +1 -1
- package/dist/react/emoji/EmojiAutocomplete.d.ts.map +1 -1
- package/dist/react/emoji/EmojiAutocomplete.js +2 -1
- package/dist/react/emoji/EmojiAutocomplete.js.map +1 -1
- package/dist/react/file-tree/FileTree.d.ts.map +1 -1
- package/dist/react/file-tree/FileTree.js +2 -1
- package/dist/react/file-tree/FileTree.js.map +1 -1
- package/dist/react/filter-rail/FilterRail.d.ts.map +1 -1
- package/dist/react/filter-rail/FilterRail.js +4 -3
- package/dist/react/filter-rail/FilterRail.js.map +1 -1
- package/dist/react/filter-rail/RailSection.d.ts.map +1 -1
- package/dist/react/filter-rail/RailSection.js +2 -1
- package/dist/react/filter-rail/RailSection.js.map +1 -1
- package/dist/react/folder-tree/FolderPicker.d.ts.map +1 -1
- package/dist/react/folder-tree/FolderPicker.js +4 -3
- package/dist/react/folder-tree/FolderPicker.js.map +1 -1
- package/dist/react/folder-tree/FolderTreeRail.d.ts.map +1 -1
- package/dist/react/folder-tree/FolderTreeRail.js +4 -3
- package/dist/react/folder-tree/FolderTreeRail.js.map +1 -1
- package/dist/react/icons.d.ts +2 -0
- package/dist/react/icons.d.ts.map +1 -1
- package/dist/react/icons.js +2 -0
- package/dist/react/icons.js.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +2 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/layoutEngine/NodeInspector.d.ts.map +1 -1
- package/dist/react/layoutEngine/NodeInspector.js +2 -1
- package/dist/react/layoutEngine/NodeInspector.js.map +1 -1
- package/dist/react/lib/cn.d.ts +20 -0
- package/dist/react/lib/cn.d.ts.map +1 -1
- package/dist/react/lib/cn.js +31 -1
- package/dist/react/lib/cn.js.map +1 -1
- package/dist/react/lib/daypicker.d.ts.map +1 -1
- package/dist/react/lib/daypicker.js +2 -1
- package/dist/react/lib/daypicker.js.map +1 -1
- package/dist/react/lib/field.d.ts +6 -1
- package/dist/react/lib/field.d.ts.map +1 -1
- package/dist/react/lib/field.js +8 -3
- package/dist/react/lib/field.js.map +1 -1
- package/dist/react/lib/infoHint.d.ts +6 -2
- package/dist/react/lib/infoHint.d.ts.map +1 -1
- package/dist/react/lib/infoHint.js +6 -2
- package/dist/react/lib/infoHint.js.map +1 -1
- package/dist/react/master-detail/MasterDetail.d.ts.map +1 -1
- package/dist/react/master-detail/MasterDetail.js +3 -2
- package/dist/react/master-detail/MasterDetail.js.map +1 -1
- package/dist/react/master-lock/MasterLockProvider.d.ts.map +1 -1
- package/dist/react/master-lock/MasterLockProvider.js +3 -2
- package/dist/react/master-lock/MasterLockProvider.js.map +1 -1
- package/dist/react/media/DenseGalleryShell.d.ts.map +1 -1
- package/dist/react/media/DenseGalleryShell.js +4 -3
- package/dist/react/media/DenseGalleryShell.js.map +1 -1
- package/dist/react/media/FocusViewer.d.ts.map +1 -1
- package/dist/react/media/FocusViewer.js +2 -1
- package/dist/react/media/FocusViewer.js.map +1 -1
- package/dist/react/media/FrameGrabber.d.ts.map +1 -1
- package/dist/react/media/FrameGrabber.js +4 -3
- package/dist/react/media/FrameGrabber.js.map +1 -1
- package/dist/react/media/HoverScrubVideoThumb.d.ts.map +1 -1
- package/dist/react/media/HoverScrubVideoThumb.js +2 -1
- package/dist/react/media/HoverScrubVideoThumb.js.map +1 -1
- package/dist/react/media/PictureEditor.d.ts.map +1 -1
- package/dist/react/media/PictureEditor.js +4 -3
- package/dist/react/media/PictureEditor.js.map +1 -1
- package/dist/react/media/PlayerStrip.d.ts.map +1 -1
- package/dist/react/media/PlayerStrip.js +2 -1
- package/dist/react/media/PlayerStrip.js.map +1 -1
- package/dist/react/media/VideoChapterEditor.d.ts.map +1 -1
- package/dist/react/media/VideoChapterEditor.js +3 -2
- package/dist/react/media/VideoChapterEditor.js.map +1 -1
- package/dist/react/media/VideoCutEditor.d.ts.map +1 -1
- package/dist/react/media/VideoCutEditor.js +3 -2
- package/dist/react/media/VideoCutEditor.js.map +1 -1
- package/dist/react/media/VideoTurner.d.ts.map +1 -1
- package/dist/react/media/VideoTurner.js +6 -5
- package/dist/react/media/VideoTurner.js.map +1 -1
- package/dist/react/media/controlBar.d.ts.map +1 -1
- package/dist/react/media/controlBar.js +2 -1
- package/dist/react/media/controlBar.js.map +1 -1
- package/dist/react/media-gallery/GalleryTable.d.ts.map +1 -1
- package/dist/react/media-gallery/GalleryTable.js +4 -3
- package/dist/react/media-gallery/GalleryTable.js.map +1 -1
- package/dist/react/media-gallery/MediaGallery.d.ts.map +1 -1
- package/dist/react/media-gallery/MediaGallery.js +25 -24
- package/dist/react/media-gallery/MediaGallery.js.map +1 -1
- package/dist/react/nav/BreadcrumbTrail.d.ts.map +1 -1
- package/dist/react/nav/BreadcrumbTrail.js +2 -1
- package/dist/react/nav/BreadcrumbTrail.js.map +1 -1
- package/dist/react/nav/HubTileGrid.d.ts.map +1 -1
- package/dist/react/nav/HubTileGrid.js +2 -1
- package/dist/react/nav/HubTileGrid.js.map +1 -1
- package/dist/react/nav/PlaceBar.d.ts.map +1 -1
- package/dist/react/nav/PlaceBar.js +9 -4
- package/dist/react/nav/PlaceBar.js.map +1 -1
- package/dist/react/nav/SideNavCustomize.d.ts.map +1 -1
- package/dist/react/nav/SideNavCustomize.js +2 -1
- package/dist/react/nav/SideNavCustomize.js.map +1 -1
- package/dist/react/place-bar/index.d.ts +2 -0
- package/dist/react/place-bar/index.d.ts.map +1 -0
- package/dist/react/place-bar/index.js +9 -0
- package/dist/react/place-bar/index.js.map +1 -0
- package/dist/scripts/guardrailsEnforce.d.ts.map +1 -1
- package/dist/styles-areas/analytics.css +11 -10
- package/dist/styles-areas/core.css +17 -16
- package/dist/styles-areas/data-table.css +11 -10
- package/dist/styles-areas/disk-usage.css +5 -4
- package/dist/styles-areas/fields.css +4 -3
- package/dist/styles-areas/nav.css +7 -7
- package/dist/styles-areas/place-bar.css +33 -0
- package/dist/styles-utilities.css +42 -3
- package/package.json +39 -3
- package/scripts/guardrails-baseline.json +1 -0
- package/scripts/guardrailsEnforce.spec.ts +24 -0
- package/scripts/guardrailsEnforce.ts +30 -1
- package/scripts/styleAreas.ts +7 -0
- package/src/react/activity-bar/ActivityBar.spec.tsx +106 -1
- package/src/react/activity-bar/ActivityBar.tsx +223 -17
- package/src/react/activity-bar/activityBar.css +95 -10
- package/src/react/canvas-hud/HudControls.tsx +0 -1
- package/src/react/charts/HeatmapChart.tsx +2 -1
- package/src/react/charts/IntervalTimeline.tsx +2 -1
- package/src/react/code-editor/CodeEditor.spec.tsx +46 -0
- package/src/react/code-editor/CodeEditor.tsx +42 -5
- package/src/react/code-editor/languages.ts +65 -1
- package/src/react/components/ActionBar.spec.tsx +34 -3
- package/src/react/components/ActionBar.tsx +4 -2
- package/src/react/components/AddItemsMenu.tsx +2 -1
- package/src/react/components/Button.tsx +11 -6
- package/src/react/components/ChipFilterStrip.tsx +3 -2
- package/src/react/components/Collapsible.tsx +2 -1
- package/src/react/components/ComboboxField.tsx +3 -1
- package/src/react/components/DataTable/CardView.tsx +2 -2
- package/src/react/components/DataTable/ColumnChecklist.tsx +4 -3
- package/src/react/components/DataTable/DataTable.tsx +9 -4
- package/src/react/components/DataTable/SearchBox.tsx +5 -2
- package/src/react/components/DataTable/SortHeader.tsx +3 -2
- package/src/react/components/DataTable/SortStack.tsx +4 -3
- package/src/react/components/DataTable/TableFilterBuilder.tsx +4 -3
- package/src/react/components/DatePicker.tsx +2 -1
- package/src/react/components/DateRangePicker.tsx +2 -1
- package/src/react/components/DisclosureButton.tsx +2 -1
- package/src/react/components/DragHandle.tsx +2 -1
- package/src/react/components/EmojiField.tsx +2 -1
- package/src/react/components/ExpandableRow.tsx +2 -1
- package/src/react/components/FormPreviewLayout.tsx +1 -1
- package/src/react/components/InfoHint.spec.tsx +10 -0
- package/src/react/components/InlineEditableText.tsx +2 -1
- package/src/react/components/Menu.tsx +2 -1
- package/src/react/components/NativeSelect.spec.tsx +10 -0
- package/src/react/components/NativeSelect.tsx +4 -2
- package/src/react/components/RatingField.tsx +2 -1
- package/src/react/components/ReactionBar.tsx +2 -1
- package/src/react/components/RevealAction.tsx +2 -1
- package/src/react/components/SearchInput.spec.tsx +11 -0
- package/src/react/components/SearchInput.tsx +1 -1
- package/src/react/components/SectionNav.spec.tsx +98 -0
- package/src/react/components/SectionNav.tsx +143 -0
- package/src/react/components/SegmentedControl.tsx +4 -1
- package/src/react/components/SelectableRow.tsx +2 -1
- package/src/react/components/StarRating.tsx +2 -1
- package/src/react/components/Tooltip.tsx +4 -2
- package/src/react/components/TooltipImpl.tsx +76 -2
- package/src/react/components/TreeView.spec.tsx +28 -0
- package/src/react/components/TreeView.tsx +14 -2
- package/src/react/components/UnstyledButton.tsx +2 -1
- package/src/react/components/calendar/EventChip.tsx +2 -1
- package/src/react/components/searchInput.css +21 -5
- package/src/react/components/sharing/RecipientPicker.tsx +2 -1
- package/src/react/disk-usage/DiskUsage.spec.tsx +96 -0
- package/src/react/disk-usage/DiskUsageTree.tsx +193 -29
- package/src/react/emoji/EmojiAutocomplete.tsx +2 -1
- package/src/react/file-tree/FileTree.tsx +2 -1
- package/src/react/filter-rail/FilterRail.tsx +4 -3
- package/src/react/filter-rail/RailSection.tsx +2 -1
- package/src/react/folder-tree/FolderPicker.tsx +4 -3
- package/src/react/folder-tree/FolderTreeRail.tsx +4 -3
- package/src/react/icons.tsx +2 -0
- package/src/react/index.ts +2 -0
- package/src/react/layoutEngine/NodeInspector.tsx +2 -1
- package/src/react/lib/cn.spec.ts +7 -0
- package/src/react/lib/cn.ts +32 -1
- package/src/react/lib/daypicker.tsx +2 -1
- package/src/react/lib/field.spec.ts +15 -0
- package/src/react/lib/field.ts +8 -3
- package/src/react/lib/infoHint.ts +6 -2
- package/src/react/master-detail/MasterDetail.tsx +3 -2
- package/src/react/master-lock/MasterLockProvider.tsx +3 -2
- package/src/react/media/DenseGalleryShell.tsx +4 -3
- package/src/react/media/FocusViewer.tsx +2 -1
- package/src/react/media/FrameGrabber.tsx +4 -3
- package/src/react/media/HoverScrubVideoThumb.tsx +2 -1
- package/src/react/media/PictureEditor.tsx +4 -3
- package/src/react/media/PlayerStrip.tsx +2 -1
- package/src/react/media/VideoChapterEditor.tsx +3 -2
- package/src/react/media/VideoCutEditor.tsx +3 -2
- package/src/react/media/VideoTurner.tsx +6 -5
- package/src/react/media/controlBar.tsx +2 -1
- package/src/react/media-gallery/GalleryTable.tsx +4 -3
- package/src/react/media-gallery/MediaGallery.tsx +25 -24
- package/src/react/nav/BreadcrumbTrail.tsx +2 -1
- package/src/react/nav/HubTileGrid.tsx +2 -1
- package/src/react/nav/PlaceBar.tsx +9 -5
- package/src/react/nav/SideNavCustomize.tsx +2 -1
- package/src/react/place-bar/index.ts +8 -0
- package/src/styles-areas/analytics.css +11 -10
- package/src/styles-areas/core.css +17 -16
- package/src/styles-areas/data-table.css +11 -10
- package/src/styles-areas/disk-usage.css +5 -4
- package/src/styles-areas/fields.css +4 -3
- package/src/styles-areas/nav.css +7 -7
- package/src/styles-areas/place-bar.css +33 -0
- package/src/styles-utilities.css +42 -3
|
@@ -49,6 +49,20 @@
|
|
|
49
49
|
* {@link ActivityBarItem.render} takes the consumer's own popover, and
|
|
50
50
|
* {@link ActivityBarItem.hasMenu}/{@link ActivityBarItem.menuOpen} say so to a screen reader.
|
|
51
51
|
*
|
|
52
|
+
* ── 🔴 It shows its WORDS on demand (NAV-2, forge task 2748) ───────────────────────────
|
|
53
|
+
* An icon-only rail is a row of riddles: `DESIGN.md`'s NAV-2 wants every navigation surface
|
|
54
|
+
* to be able to say what each glyph is without a hover on each one. So the column stays 48px
|
|
55
|
+
* and EXPANDS, as an overlay over whatever is beside it (nothing reflows), into icon + label
|
|
56
|
+
* rows — the hover-expand rail Gmail and the Azure portal draw, and the labelled activity
|
|
57
|
+
* bar VS Code's own users keep asking for. Three ways in, one for each kind of hand:
|
|
58
|
+
* · a mouse resting on the rail for {@link EXPAND_HOVER_MS} (the delay is what lets a pointer
|
|
59
|
+
* cross the rail on its way to the sidebar without the rail flaring at it);
|
|
60
|
+
* · keyboard focus arriving in it (`:focus-visible`), so tabbing reads the words too;
|
|
61
|
+
* · a touch-and-hold of {@link EXPAND_PRESS_MS} on any control — the hold is swallowed, so
|
|
62
|
+
* reading the labels never also presses the button under the thumb.
|
|
63
|
+
* It folds again when the mouse leaves, focus leaves, a touch lands outside it, Escape is
|
|
64
|
+
* pressed, or a control is chosen. {@link ActivityBarProps.expandable} `false` opts out.
|
|
65
|
+
*
|
|
52
66
|
* ── Plain CSS, deliberately ─────────────────────────────────────────────────────────────
|
|
53
67
|
* `activityBar.css` under the `cbab-` prefix, the same convention (and the same reason) as
|
|
54
68
|
* `fileTree.css` and `denseGallery.css`: this mounts inside apps whose Tailwind build cannot
|
|
@@ -56,7 +70,7 @@
|
|
|
56
70
|
* ships a NARROWED `@source` list and has already shipped one unstyled control from exactly
|
|
57
71
|
* that gap.
|
|
58
72
|
*/
|
|
59
|
-
import type
|
|
73
|
+
import { type JSX, type ReactNode } from 'react';
|
|
60
74
|
import './activityBar.css';
|
|
61
75
|
/**
|
|
62
76
|
* One control in the strip.
|
|
@@ -85,7 +99,12 @@ export interface ActivityBarItem {
|
|
|
85
99
|
icon?: ReactNode;
|
|
86
100
|
/** Drawn as the view you are in — a hairline, not a box. See the file header. */
|
|
87
101
|
active?: boolean;
|
|
88
|
-
|
|
102
|
+
/**
|
|
103
|
+
* The press. It is handed the button that was pressed, so a control that opens a popover can
|
|
104
|
+
* anchor it — and name it as the trigger, so a second press closes rather than re-opens —
|
|
105
|
+
* without needing a {@link render} slot of its own.
|
|
106
|
+
*/
|
|
107
|
+
onSelect?: (trigger: HTMLButtonElement) => void;
|
|
89
108
|
/**
|
|
90
109
|
* Why this cannot act right now. Present ⇒ the control is DISABLED and says why on hover,
|
|
91
110
|
* never hidden — `DESIGN.md`'s standing rule, and the reason an owner UI is one UI.
|
|
@@ -100,6 +119,13 @@ export interface ActivityBarItem {
|
|
|
100
119
|
* says *look here*; what the number is belongs to whatever the button opens.
|
|
101
120
|
*/
|
|
102
121
|
badge?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* How many — drawn at the END of the expanded row only (Gmail's expanded rail: "Inbox 3"),
|
|
124
|
+
* where there is room for a number at full size. Collapsed, the 20px glyph has none, which
|
|
125
|
+
* is why {@link badge} stays a dot; put the number in {@link title} as well so a hover
|
|
126
|
+
* reads it there. Zero or absent draws nothing.
|
|
127
|
+
*/
|
|
128
|
+
count?: number;
|
|
103
129
|
/**
|
|
104
130
|
* Render this instead of a button. For a widget the consumer already owns — an account
|
|
105
131
|
* menu, a fleet launcher — that has to keep its own behaviour and its own popover.
|
|
@@ -122,6 +148,16 @@ export interface ActivityBarProps {
|
|
|
122
148
|
/** Names the whole column for a screen reader. */
|
|
123
149
|
ariaLabel?: string;
|
|
124
150
|
className?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Expand into icon + label rows on a hover, keyboard focus or touch-and-hold — see the file
|
|
153
|
+
* header. Default `true`: NAV-2 is the design law, not a preference. `false` keeps the
|
|
154
|
+
* icon-only column (a rail whose every control is already named beside it).
|
|
155
|
+
*/
|
|
156
|
+
expandable?: boolean;
|
|
125
157
|
}
|
|
126
|
-
|
|
158
|
+
/** How long a mouse rests on the rail before it opens its words. */
|
|
159
|
+
export declare const EXPAND_HOVER_MS = 350;
|
|
160
|
+
/** How long a touch holds before the rail opens its words — Android's long-press. */
|
|
161
|
+
export declare const EXPAND_PRESS_MS = 450;
|
|
162
|
+
export declare function ActivityBar({ top, bottom, ariaLabel, className, expandable, }: ActivityBarProps): JSX.Element;
|
|
127
163
|
//# sourceMappingURL=ActivityBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityBar.d.ts","sourceRoot":"","sources":["../../../src/react/activity-bar/ActivityBar.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ActivityBar.d.ts","sourceRoot":"","sources":["../../../src/react/activity-bar/ActivityBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,OAAO,EAEL,KAAK,GAAG,EAIR,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAEf,OAAO,mBAAmB,CAAC;AAG3B;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX;;;;;;;;OAQG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,wFAAwF;IACxF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAChD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,GAAG,EAAE,SAAS,eAAe,EAAE,CAAC;IAChC,uFAAuF;IACvF,MAAM,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACpC,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,oEAAoE;AACpE,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,qFAAqF;AACrF,eAAO,MAAM,eAAe,MAAM,CAAC;AAuMnC,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,MAAW,EACX,SAAgC,EAChC,SAAS,EACT,UAAiB,GAClB,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA6BhC"}
|
|
@@ -1,22 +1,231 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The far-left icon strip — a full-height rail of icon-only controls, VSCode-shaped.
|
|
4
|
+
*
|
|
5
|
+
* ── Where it came from ──────────────────────────────────────────────────────────────────
|
|
6
|
+
* Owner, of `cursed-embeddable-spreadsheet`: *"put the light/dark mode icon, settings icon,
|
|
7
|
+
* magnifier glass search icon and other icons that would be a good fit in a far left narrow
|
|
8
|
+
* strip column like vscode does for many icons. We can use this to eliminate clutter and
|
|
9
|
+
* extra rows that hold these types of items."* — and then, of collections, 2026-09-08:
|
|
10
|
+
* *"I also want the far left thin column with the sidebar collapse and expand icon, the
|
|
11
|
+
* search icon, the menu for unique settings, the full screen icon, the dark/light icon, and
|
|
12
|
+
* the main settings cog icon. The top two rows will go away."*
|
|
13
|
+
*
|
|
14
|
+
* 🔴 **It REPLACES a header rather than joining one.** That is the whole stated reason it
|
|
15
|
+
* exists: a strip *beside* a header keeps every row it was built to remove. A consumer that
|
|
16
|
+
* mounts this and keeps its `<header>` has bought 48 pixels of width and saved nothing.
|
|
17
|
+
*
|
|
18
|
+
* ── Why the shape is this shape ─────────────────────────────────────────────────────────
|
|
19
|
+
* 48px wide — two 14px margins either side of a 20px glyph, which is what every editor of
|
|
20
|
+
* this kind settled on. Two groups: {@link ActivityBarProps.top}, the things that change
|
|
21
|
+
* what is on screen, and {@link ActivityBarProps.bottom}, the things that are true of the
|
|
22
|
+
* *application*, pinned to the floor because that is the convention and needs no explaining.
|
|
23
|
+
*
|
|
24
|
+
* It is the full height of the window and sits OUTSIDE whatever it is left of, so the column
|
|
25
|
+
* reads as one edge rather than as something that starts halfway down — and so a sidebar
|
|
26
|
+
* resizer that measures its own container's left edge does not have to subtract 48.
|
|
27
|
+
*
|
|
28
|
+
* ── 🔴 The active state is a hairline, not a box ────────────────────────────────────────
|
|
29
|
+
* Owner, 2026-09-08, looking at the strip this was ported from: *"the sidebar collapse and
|
|
30
|
+
* expand icon (although without the big border and highlight it somehow is showing in the
|
|
31
|
+
* image)"*. A focus ring drawn around a pressed icon reads as a selected form control. What
|
|
32
|
+
* says "this view is the one you are in" here is a 2px accent bar on the inside edge and a
|
|
33
|
+
* brighter glyph — the same language the file tree's selected row uses, so a person learns
|
|
34
|
+
* it once.
|
|
35
|
+
*
|
|
36
|
+
* ── 🔴 The graduation verdict, 2026-09-13: THIS one, unchanged ──────────────────────────
|
|
37
|
+
* `cursedesk` has an `ActivityBar.tsx` of its own and the pair was compared to decide which
|
|
38
|
+
* should be the shared one. Nothing moved here, and the reason is that they are not two
|
|
39
|
+
* versions of one component: this is a RAIL that takes {@link ActivityBarProps.top} and
|
|
40
|
+
* {@link ActivityBarProps.bottom} and draws whatever is in them; the app's is one particular
|
|
41
|
+
* seven-button composition — Explorer, Search, ⌘P, the command menu, full screen, theme,
|
|
42
|
+
* settings — hard-wired to that app's `primitives.tsx` and `shortcuts.ts`, with every prop
|
|
43
|
+
* (`searchOpen`, `onSwitcher`, `shortcutPrefs`, `commandUnavailable`) naming one of them.
|
|
44
|
+
*
|
|
45
|
+
* A design system cannot hold that: `onSwitcher` is a door onto a file finder and
|
|
46
|
+
* `shortcutPrefs` is a preferences table, neither of which a rail has any business knowing.
|
|
47
|
+
* So the app's copy is deleted rather than moved, and its seven buttons become seven
|
|
48
|
+
* `ActivityBarItem`s built where the app's state already lives. The one thing it has that
|
|
49
|
+
* this does not — a command menu rendered by the rail itself — is already expressible:
|
|
50
|
+
* {@link ActivityBarItem.render} takes the consumer's own popover, and
|
|
51
|
+
* {@link ActivityBarItem.hasMenu}/{@link ActivityBarItem.menuOpen} say so to a screen reader.
|
|
52
|
+
*
|
|
53
|
+
* ── 🔴 It shows its WORDS on demand (NAV-2, forge task 2748) ───────────────────────────
|
|
54
|
+
* An icon-only rail is a row of riddles: `DESIGN.md`'s NAV-2 wants every navigation surface
|
|
55
|
+
* to be able to say what each glyph is without a hover on each one. So the column stays 48px
|
|
56
|
+
* and EXPANDS, as an overlay over whatever is beside it (nothing reflows), into icon + label
|
|
57
|
+
* rows — the hover-expand rail Gmail and the Azure portal draw, and the labelled activity
|
|
58
|
+
* bar VS Code's own users keep asking for. Three ways in, one for each kind of hand:
|
|
59
|
+
* · a mouse resting on the rail for {@link EXPAND_HOVER_MS} (the delay is what lets a pointer
|
|
60
|
+
* cross the rail on its way to the sidebar without the rail flaring at it);
|
|
61
|
+
* · keyboard focus arriving in it (`:focus-visible`), so tabbing reads the words too;
|
|
62
|
+
* · a touch-and-hold of {@link EXPAND_PRESS_MS} on any control — the hold is swallowed, so
|
|
63
|
+
* reading the labels never also presses the button under the thumb.
|
|
64
|
+
* It folds again when the mouse leaves, focus leaves, a touch lands outside it, Escape is
|
|
65
|
+
* pressed, or a control is chosen. {@link ActivityBarProps.expandable} `false` opts out.
|
|
66
|
+
*
|
|
67
|
+
* ── Plain CSS, deliberately ─────────────────────────────────────────────────────────────
|
|
68
|
+
* `activityBar.css` under the `cbab-` prefix, the same convention (and the same reason) as
|
|
69
|
+
* `fileTree.css` and `denseGallery.css`: this mounts inside apps whose Tailwind build cannot
|
|
70
|
+
* see this package's classes, so the look has to travel with the component. collections
|
|
71
|
+
* ships a NARROWED `@source` list and has already shipped one unstyled control from exactly
|
|
72
|
+
* that gap.
|
|
73
|
+
*/
|
|
74
|
+
import { useCallback, useEffect, useRef, useState, } from 'react';
|
|
2
75
|
import { Tooltip } from '../components/Tooltip.js';
|
|
3
76
|
import './activityBar.css';
|
|
4
|
-
|
|
77
|
+
import { cn, RAW_BUTTON } from '../lib/cn';
|
|
78
|
+
/** How long a mouse rests on the rail before it opens its words. */
|
|
79
|
+
export const EXPAND_HOVER_MS = 350;
|
|
80
|
+
/** How long a touch holds before the rail opens its words — Android's long-press. */
|
|
81
|
+
export const EXPAND_PRESS_MS = 450;
|
|
82
|
+
/** A hold that drifts further than this is a scroll or a drag, not a press. */
|
|
83
|
+
const PRESS_SLOP_PX = 10;
|
|
84
|
+
function ActivityButton({ item, onChosen }) {
|
|
5
85
|
const disabled = item.unavailableReason !== undefined;
|
|
6
86
|
const button = (_jsxs("button", {
|
|
7
87
|
// guardrails-ignore no-raw-action-button: THE rail's own icon control, styled by this
|
|
8
88
|
// module's self-contained plain CSS. cursedbelt's `Button` runs on the Tailwind token
|
|
9
89
|
// layer, which fights `.cbab-btn`'s fixed 48px column geometry on cascade order rather
|
|
10
90
|
// than composing with it — the same split `GalleryActionButton` records.
|
|
11
|
-
type: 'button', className: 'cbab-btn', "data-active": item.active || undefined, onClick: disabled
|
|
91
|
+
type: 'button', className: cn(RAW_BUTTON, 'cbab-btn'), "data-active": item.active || undefined, onClick: disabled
|
|
92
|
+
? undefined
|
|
93
|
+
: (event) => {
|
|
94
|
+
item.onSelect?.(event.currentTarget);
|
|
95
|
+
onChosen();
|
|
96
|
+
}, "aria-disabled": disabled || undefined, ...(item.active === undefined ? {} : { 'aria-pressed': item.active }), ...(item.hasMenu ? { 'aria-haspopup': 'menu', 'aria-expanded': item.menuOpen === true } : {}), "aria-label": item.label, children: [_jsxs("span", { className: 'cbab-glyph', "aria-hidden": 'true', children: [item.icon, item.badge ? _jsx("span", { className: 'cbab-badge' }) : null] }), _jsx("span", { className: 'cbab-label', "aria-hidden": 'true', children: item.label }), item.count ? (_jsx("span", { className: 'cbab-count', "aria-hidden": 'true', children: item.count.toLocaleString() })) : null] }));
|
|
12
97
|
return (_jsx(Tooltip, { content: item.unavailableReason ?? item.title ?? item.label, side: 'right', children: button }));
|
|
13
98
|
}
|
|
14
|
-
function Group({ items }) {
|
|
99
|
+
function Group({ items, onChosen }) {
|
|
15
100
|
if (items.length === 0)
|
|
16
101
|
return null;
|
|
17
|
-
return (_jsx("div", { className: 'cbab-group', children: items.map((item) => item.render === undefined ? (_jsx(ActivityButton, { item: item }, item.id)) : (_jsx("div", { className: 'cbab-slot', children: item.render }, item.id))) }));
|
|
102
|
+
return (_jsx("div", { className: 'cbab-group', children: items.map((item) => item.render === undefined ? (_jsx(ActivityButton, { item: item, onChosen: onChosen }, item.id)) : (_jsxs("div", { className: 'cbab-slotrow', children: [_jsx("div", { className: 'cbab-slot', children: item.render }), _jsx("span", { className: 'cbab-label', "aria-hidden": 'true', children: item.label })] }, item.id))) }));
|
|
18
103
|
}
|
|
19
|
-
|
|
20
|
-
|
|
104
|
+
/** `:focus-visible` — a keyboard arrival, not a click. Old engines without it count as one. */
|
|
105
|
+
function focusVisible(node) {
|
|
106
|
+
try {
|
|
107
|
+
return node.matches(':focus-visible');
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The expand machinery, apart from the markup so the rules read in one place. Each way in
|
|
115
|
+
* remembers WHICH way it came, because each way out only undoes its own: a mouse leaving must
|
|
116
|
+
* not fold a rail the keyboard opened, and a focus leaving must not fold one the hand holds.
|
|
117
|
+
*/
|
|
118
|
+
function useExpand(enabled) {
|
|
119
|
+
const [by, setBy] = useState(null);
|
|
120
|
+
const root = useRef(null);
|
|
121
|
+
const hoverTimer = useRef(undefined);
|
|
122
|
+
const press = useRef({
|
|
123
|
+
x: 0,
|
|
124
|
+
y: 0,
|
|
125
|
+
held: false,
|
|
126
|
+
});
|
|
127
|
+
const clearHover = () => {
|
|
128
|
+
if (hoverTimer.current !== undefined)
|
|
129
|
+
clearTimeout(hoverTimer.current);
|
|
130
|
+
hoverTimer.current = undefined;
|
|
131
|
+
};
|
|
132
|
+
const clearPress = () => {
|
|
133
|
+
if (press.current.timer !== undefined)
|
|
134
|
+
clearTimeout(press.current.timer);
|
|
135
|
+
press.current.timer = undefined;
|
|
136
|
+
};
|
|
137
|
+
// Refs only, so it is stable across renders — it is handed to every control as `onChosen`.
|
|
138
|
+
const collapse = useCallback(() => {
|
|
139
|
+
clearTimeout(hoverTimer.current);
|
|
140
|
+
hoverTimer.current = undefined;
|
|
141
|
+
clearTimeout(press.current.timer);
|
|
142
|
+
press.current.timer = undefined;
|
|
143
|
+
setBy(null);
|
|
144
|
+
}, []);
|
|
145
|
+
// Timers die with the rail; a late one would set state on nothing.
|
|
146
|
+
useEffect(() => () => {
|
|
147
|
+
clearTimeout(hoverTimer.current);
|
|
148
|
+
clearTimeout(press.current.timer);
|
|
149
|
+
}, []);
|
|
150
|
+
// Opened by a hold, it folds on a touch anywhere else — there is no "pointer leaves" on glass.
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
if (by !== 'press')
|
|
153
|
+
return;
|
|
154
|
+
const outside = (event) => {
|
|
155
|
+
if (!root.current?.contains(event.target))
|
|
156
|
+
setBy(null);
|
|
157
|
+
};
|
|
158
|
+
document.addEventListener('pointerdown', outside, true);
|
|
159
|
+
return () => document.removeEventListener('pointerdown', outside, true);
|
|
160
|
+
}, [by]);
|
|
161
|
+
if (!enabled)
|
|
162
|
+
return { root, by: null, handlers: {}, collapse };
|
|
163
|
+
const handlers = {
|
|
164
|
+
onPointerEnter(event) {
|
|
165
|
+
if (event.pointerType !== 'mouse' || by !== null)
|
|
166
|
+
return;
|
|
167
|
+
clearHover();
|
|
168
|
+
hoverTimer.current = setTimeout(() => setBy((current) => current ?? 'hover'), EXPAND_HOVER_MS);
|
|
169
|
+
},
|
|
170
|
+
onPointerLeave(event) {
|
|
171
|
+
if (event.pointerType !== 'mouse')
|
|
172
|
+
return;
|
|
173
|
+
clearHover();
|
|
174
|
+
setBy((current) => (current === 'hover' ? null : current));
|
|
175
|
+
},
|
|
176
|
+
onPointerDown(event) {
|
|
177
|
+
if (event.pointerType === 'mouse')
|
|
178
|
+
return;
|
|
179
|
+
clearPress();
|
|
180
|
+
press.current = { x: event.clientX, y: event.clientY, held: false };
|
|
181
|
+
press.current.timer = setTimeout(() => {
|
|
182
|
+
press.current.held = true;
|
|
183
|
+
press.current.timer = undefined;
|
|
184
|
+
setBy('press');
|
|
185
|
+
}, EXPAND_PRESS_MS);
|
|
186
|
+
},
|
|
187
|
+
onPointerMove(event) {
|
|
188
|
+
if (press.current.timer === undefined)
|
|
189
|
+
return;
|
|
190
|
+
if (Math.hypot(event.clientX - press.current.x, event.clientY - press.current.y) > PRESS_SLOP_PX)
|
|
191
|
+
clearPress();
|
|
192
|
+
},
|
|
193
|
+
onPointerUp: clearPress,
|
|
194
|
+
onPointerCancel: clearPress,
|
|
195
|
+
/* 🔴 The hold is SWALLOWED: the click a lifted thumb fires would otherwise press the very
|
|
196
|
+
control whose label it was reading. Capture phase, so the button never sees it. */
|
|
197
|
+
onClickCapture(event) {
|
|
198
|
+
if (!press.current.held)
|
|
199
|
+
return;
|
|
200
|
+
press.current.held = false;
|
|
201
|
+
event.preventDefault();
|
|
202
|
+
event.stopPropagation();
|
|
203
|
+
},
|
|
204
|
+
// iOS/Android raise their own long-press menu on the same gesture.
|
|
205
|
+
onContextMenu(event) {
|
|
206
|
+
if (press.current.held || press.current.timer !== undefined)
|
|
207
|
+
event.preventDefault();
|
|
208
|
+
},
|
|
209
|
+
onFocus(event) {
|
|
210
|
+
if (focusVisible(event.target))
|
|
211
|
+
setBy((current) => current ?? 'focus');
|
|
212
|
+
},
|
|
213
|
+
onBlur(event) {
|
|
214
|
+
if (root.current?.contains(event.relatedTarget))
|
|
215
|
+
return;
|
|
216
|
+
setBy((current) => (current === 'focus' ? null : current));
|
|
217
|
+
},
|
|
218
|
+
onKeyDown(event) {
|
|
219
|
+
if (event.key === 'Escape' && by !== null) {
|
|
220
|
+
event.stopPropagation();
|
|
221
|
+
collapse();
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
return { root, by, handlers, collapse };
|
|
226
|
+
}
|
|
227
|
+
export function ActivityBar({ top, bottom = [], ariaLabel = 'Views and settings', className, expandable = true, }) {
|
|
228
|
+
const { root, by, handlers, collapse } = useExpand(expandable);
|
|
229
|
+
return (_jsx("fieldset", { ref: root, className: className ? `cbab ${className}` : 'cbab', "aria-label": ariaLabel, "data-expandable": expandable || undefined, "data-expanded": by ?? undefined, ...handlers, children: _jsxs("div", { className: 'cbab-panel', children: [_jsx(Group, { items: top, onChosen: collapse }), _jsx("div", { className: 'cbab-spacer' }), _jsx(Group, { items: bottom, onChosen: collapse })] }) }));
|
|
21
230
|
}
|
|
22
231
|
//# sourceMappingURL=ActivityBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityBar.js","sourceRoot":"","sources":["../../../src/react/activity-bar/ActivityBar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ActivityBar.js","sourceRoot":"","sources":["../../../src/react/activity-bar/ActivityBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,OAAO,EAOL,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAuF3C,oEAAoE;AACpE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AACnC,qFAAqF;AACrF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AACnC,+EAA+E;AAC/E,MAAM,aAAa,GAAG,EAAE,CAAC;AAIzB,SAAS,cAAc,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAmD;IACzF,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC;IACtD,MAAM,MAAM,GAAG,CACb;QACE,sFAAsF;QACtF,sFAAsF;QACtF,uFAAuF;QACvF,yEAAyE;QACzE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,iBACxB,IAAI,CAAC,MAAM,IAAI,SAAS,EACrC,OAAO,EACL,QAAQ;YACN,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,CAAC,KAAoC,EAAE,EAAE;gBACvC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;gBACrC,QAAQ,EAAE,C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AC;YACb,CAAC;QACH,CAAC;KACF,CAAC;IACF,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,GAAG,EACH,MAAM,GAAG,EAAE,EACX,SAAS,GAAG,oBAAoB,EAChC,SAAS,EACT,UAAU,GAAG,IAAI,GACA;IACjB,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/D,OAAO,CAOL,mBACE,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,SAAS,EAAE,CAAC,CAAC,CAAC,MAAM,gBACvC,SAAS,qBACJ,UAAU,IAAI,SAAS,mBACzB,EAAE,IAAI,SAAS,KAC1B,QAAQ,YAIZ,eAAK,SAAS,EAAC,YAAY,aACzB,KAAC,KAAK,IAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAIzC,cAAK,SAAS,EAAC,aAAa,GAAG,EAC/B,KAAC,KAAK,IAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAI,IACxC,GACG,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -11,15 +11,31 @@
|
|
|
11
11
|
padding by default, none of which a 48px column wants. */
|
|
12
12
|
margin: 0;
|
|
13
13
|
border: 0;
|
|
14
|
+
padding: 0;
|
|
14
15
|
min-inline-size: 0;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
align-items: center;
|
|
18
16
|
/* 48px = two 14px margins either side of a 20px glyph. See the component header. */
|
|
19
17
|
inline-size: 48px;
|
|
20
18
|
flex: 0 0 48px;
|
|
21
19
|
block-size: 100%;
|
|
22
20
|
min-block-size: 0;
|
|
21
|
+
/* The panel inside is what draws, and what widens over the page when the rail expands;
|
|
22
|
+
this box only holds the 48px track so nothing beside it ever reflows. */
|
|
23
|
+
position: relative;
|
|
24
|
+
/* How wide the expanded rail is. A fixed measure rather than max-content, so it can
|
|
25
|
+
animate and so one long label cannot push the overlay across half a phone. */
|
|
26
|
+
--cbab-expanded: 15rem;
|
|
27
|
+
/* The hold that opens the words must not also select them or raise the OS callout. */
|
|
28
|
+
-webkit-touch-callout: none;
|
|
29
|
+
user-select: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.cbab-panel {
|
|
33
|
+
position: absolute;
|
|
34
|
+
inset-block: 0;
|
|
35
|
+
inset-inline-start: 0;
|
|
36
|
+
inline-size: 100%;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
23
39
|
padding-block: 0.375rem;
|
|
24
40
|
gap: 0.25rem;
|
|
25
41
|
background: var(--surface-1, var(--background));
|
|
@@ -27,14 +43,32 @@
|
|
|
27
43
|
/* The rail is chrome: nothing in it scrolls, and a stray overflow here would put a
|
|
28
44
|
scrollbar down the 48px column rather than shrinking the glyphs. */
|
|
29
45
|
overflow: hidden;
|
|
46
|
+
transition: inline-size 120ms ease-out, box-shadow 120ms ease-out;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.cbab[data-expanded] {
|
|
50
|
+
/* Over the sidebar and the document beside it, under a dialog. */
|
|
51
|
+
z-index: var(--z-sticky, 100);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.cbab[data-expanded] .cbab-panel {
|
|
55
|
+
inline-size: var(--cbab-expanded);
|
|
56
|
+
box-shadow: var(--shadow-overlay);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (prefers-reduced-motion: reduce) {
|
|
60
|
+
.cbab-panel {
|
|
61
|
+
transition: none;
|
|
62
|
+
}
|
|
30
63
|
}
|
|
31
64
|
|
|
32
65
|
.cbab-group {
|
|
33
66
|
display: flex;
|
|
34
67
|
flex-direction: column;
|
|
35
|
-
align-items: center;
|
|
36
68
|
gap: 0.125rem;
|
|
37
|
-
|
|
69
|
+
/* 4px each side of a 40px control is the 48px column; expanded, the same inset keeps
|
|
70
|
+
every row's glyph exactly where it was, so the icons do not jump as the words arrive. */
|
|
71
|
+
padding-inline: 4px;
|
|
38
72
|
}
|
|
39
73
|
|
|
40
74
|
.cbab-spacer {
|
|
@@ -49,11 +83,16 @@
|
|
|
49
83
|
position: relative;
|
|
50
84
|
display: flex;
|
|
51
85
|
align-items: center;
|
|
52
|
-
justify-content:
|
|
86
|
+
justify-content: flex-start;
|
|
87
|
+
/* 10px puts a 20px glyph dead centre of a 40px square — and keeps it there expanded. */
|
|
88
|
+
gap: 12px;
|
|
89
|
+
padding-inline: 10px;
|
|
90
|
+
flex: 0 0 auto;
|
|
53
91
|
inline-size: 40px;
|
|
54
92
|
block-size: 40px;
|
|
55
|
-
padding: 0;
|
|
93
|
+
padding-block: 0;
|
|
56
94
|
border: 0;
|
|
95
|
+
white-space: nowrap;
|
|
57
96
|
border-radius: var(--radius-sm, 0.375rem);
|
|
58
97
|
background: transparent;
|
|
59
98
|
color: var(--muted-foreground);
|
|
@@ -107,6 +146,8 @@
|
|
|
107
146
|
}
|
|
108
147
|
|
|
109
148
|
.cbab-glyph {
|
|
149
|
+
position: relative;
|
|
150
|
+
flex: 0 0 auto;
|
|
110
151
|
display: flex;
|
|
111
152
|
align-items: center;
|
|
112
153
|
justify-content: center;
|
|
@@ -119,11 +160,12 @@
|
|
|
119
160
|
block-size: 100%;
|
|
120
161
|
}
|
|
121
162
|
|
|
122
|
-
/* A dot, and only ever a dot — see `ActivityBarItem.badge` for why it carries no number.
|
|
163
|
+
/* A dot, and only ever a dot — see `ActivityBarItem.badge` for why it carries no number.
|
|
164
|
+
On the glyph's corner rather than the button's, so it stays on the icon when the row widens. */
|
|
123
165
|
.cbab-badge {
|
|
124
166
|
position: absolute;
|
|
125
|
-
inset-block-start:
|
|
126
|
-
inset-inline-end:
|
|
167
|
+
inset-block-start: -3px;
|
|
168
|
+
inset-inline-end: -3px;
|
|
127
169
|
inline-size: 7px;
|
|
128
170
|
block-size: 7px;
|
|
129
171
|
border-radius: 999px;
|
|
@@ -133,6 +175,46 @@
|
|
|
133
175
|
box-shadow: 0 0 0 2px var(--surface-1, var(--background));
|
|
134
176
|
}
|
|
135
177
|
|
|
178
|
+
/* ── The words ──────────────────────────────────────────────────────────────────────── */
|
|
179
|
+
|
|
180
|
+
.cbab-label {
|
|
181
|
+
display: none;
|
|
182
|
+
min-inline-size: 0;
|
|
183
|
+
overflow: hidden;
|
|
184
|
+
text-overflow: ellipsis;
|
|
185
|
+
white-space: nowrap;
|
|
186
|
+
font-size: 0.875rem;
|
|
187
|
+
line-height: 1.25rem;
|
|
188
|
+
font-weight: 500;
|
|
189
|
+
color: inherit;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.cbab-count {
|
|
193
|
+
display: none;
|
|
194
|
+
margin-inline-start: auto;
|
|
195
|
+
font-size: 0.75rem;
|
|
196
|
+
line-height: 1rem;
|
|
197
|
+
font-variant-numeric: tabular-nums;
|
|
198
|
+
color: var(--muted-foreground);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.cbab[data-expanded] .cbab-label,
|
|
202
|
+
.cbab[data-expanded] .cbab-count {
|
|
203
|
+
display: block;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.cbab[data-expanded] .cbab-btn {
|
|
207
|
+
inline-size: 100%;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* A borrowed widget's row: its own 40px square, then its word beside it, not inside it. */
|
|
211
|
+
.cbab-slotrow {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
gap: 2px;
|
|
215
|
+
color: var(--muted-foreground);
|
|
216
|
+
}
|
|
217
|
+
|
|
136
218
|
/*
|
|
137
219
|
* A widget the consumer brought — an account menu, a theme toggle. It gets the column's
|
|
138
220
|
* geometry and nothing else, so whatever is inside keeps its own behaviour and its own
|
|
@@ -140,6 +222,8 @@
|
|
|
140
222
|
*/
|
|
141
223
|
.cbab-slot {
|
|
142
224
|
cursor: default;
|
|
225
|
+
justify-content: center;
|
|
226
|
+
padding-inline: 0;
|
|
143
227
|
}
|
|
144
228
|
|
|
145
229
|
.cbab-slot > * {
|
|
@@ -160,5 +244,6 @@
|
|
|
160
244
|
.cbab-slot {
|
|
161
245
|
inline-size: 44px;
|
|
162
246
|
block-size: 44px;
|
|
247
|
+
padding-inline: 12px;
|
|
163
248
|
}
|
|
164
249
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HudControls.d.ts","sourceRoot":"","sources":["../../../src/react/canvas-hud/HudControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBvC,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yFAAyF;IACzF,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4FAA4F;AAC5F,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,EAAE,cAAc,+
|
|
1
|
+
{"version":3,"file":"HudControls.d.ts","sourceRoot":"","sources":["../../../src/react/canvas-hud/HudControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBvC,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yFAAyF;IACzF,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4FAA4F;AAC5F,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,EAAE,cAAc,+BAa5G;AAED,MAAM,WAAW,oBAAoB;IACnC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,qCAAqC;IACrC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;6EACyE;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAA0B,EAC1B,WAAuC,EACvC,QAAQ,EACR,SAAS,GACV,EAAE,oBAAoB,+BAuBtB;AAED,MAAM,WAAW,mBAAmB;IAClC,qFAAqF;IACrF,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,mBAAmB,+BAetE"}
|
|
@@ -5,7 +5,7 @@ import { IconCenter, IconFit, IconZoomIn, IconZoomOut } from '../icons.js';
|
|
|
5
5
|
import { cn } from '../lib/cn.js';
|
|
6
6
|
/** One HUD control — an icon-sized belt `IconButton`, with a pressed state for a toggle. */
|
|
7
7
|
export function HudButton({ label, onClick, children, pressed, unavailableReason, className }) {
|
|
8
|
-
return (_jsx(IconButton, { label: label, size: 'sm', "aria-pressed": pressed, unavailableReason: unavailableReason ?? undefined,
|
|
8
|
+
return (_jsx(IconButton, { label: label, size: 'sm', "aria-pressed": pressed, unavailableReason: unavailableReason ?? undefined, onClick: onClick, className: cn('text-muted-foreground aria-pressed:bg-muted aria-pressed:text-foreground', className), children: children }));
|
|
9
9
|
}
|
|
10
10
|
/** CNV-3's essentials as one pill: −, the zoom %, +, Fit and Center. */
|
|
11
11
|
export function HudZoomControls({ scale, onZoomIn, onZoomOut, onFit, onCenter, fitLabel = 'Fit to screen', centerLabel = 'Center on the selection', children, className, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HudControls.js","sourceRoot":"","sources":["../../../src/react/canvas-hud/HudControls.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AA4BlC,4FAA4F;AAC5F,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAkB;IAC3G,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,IAAI,kBACK,OAAO,EACrB,iBAAiB,EAAE,iBAAiB,IAAI,SAAS,EACjD,
|
|
1
|
+
{"version":3,"file":"HudControls.js","sourceRoot":"","sources":["../../../src/react/canvas-hud/HudControls.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,C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AG,GACD,EACX,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,SAAS,IAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,YAC9C,KAAC,UAAU,KAAG,GACJ,CACb,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAC;AACJ,CAAC;AAQD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,SAAS,EAAuB;IACrE,MAAM,GAAG,GAAG,OAAO,SAAS,KAAK,WAAW,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC;IAClH,OAAO,CACL,6BACe,CAAC,IAAI,iBACN,kBAAkB,EAC9B,SAAS,EAAE,EAAE,CACX,+GAA+G,EAC/G,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,EAClC,SAAS,CACV,YAED,MAAC,OAAO,IAAC,SAAS,EAAC,qBAAqB,sBAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,gBAAmB,GAChF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatmapChart.d.ts","sourceRoot":"","sources":["../../../src/react/charts/HeatmapChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAoB,KAAK,SAAS,EAA6B,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"HeatmapChart.d.ts","sourceRoot":"","sources":["../../../src/react/charts/HeatmapChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAoB,KAAK,SAAS,EAA6B,MAAM,aAAa,CAAC;AAI1F,uFAAuF;AACvF,MAAM,MAAM,WAAW,GAAG;IACxB,kEAAkE;IAClE,GAAG,EAAE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AAI,EACJ,OAAO,EACP,SAAS,EACT,IAAe,EACf,QAAmB,EACnB,WAAsB,EACtB,SAAS,EACT,cAAiC,EACjC,GAAG,EACH,UAAe,EACf,MAAa,EACb,QAAQ,EACR,WAAW,EACX,SAAS,GACV,EAAE,iBAAiB,+BAiGnB"}
|
|
@@ -4,6 +4,7 @@ import { cn } from '../lib/cn.js';
|
|
|
4
4
|
import { sequentialStep } from './categorical.js';
|
|
5
5
|
import { toneColor, useChartTokens } from './tokens.js';
|
|
6
6
|
import { Tooltip } from '../components/Tooltip.js';
|
|
7
|
+
import { RAW_BUTTON } from '../lib/cn';
|
|
7
8
|
/** `row\x00column` — NUL cannot occur in a key that came from a label. */
|
|
8
9
|
const cellKey = (row, column) => `${row}\x00${column}`;
|
|
9
10
|
/**
|
|
@@ -84,6 +85,6 @@ function CellChrome({ label, className, style, onActivate, }) {
|
|
|
84
85
|
// guardrails-ignore no-raw-action-button: a heat CELL, not a page action — cursedbelt's
|
|
85
86
|
// Button carries a control height, padding and a label slot, none of which an 18px
|
|
86
87
|
// magnitude square can have.
|
|
87
|
-
type: 'button', "aria-label": label, className: className, style: style, onClick: onActivate }) }));
|
|
88
|
+
type: 'button', "aria-label": label, className: cn(RAW_BUTTON, className), style: style, onClick: onActivate }) }));
|
|
88
89
|
}
|
|
89
90
|
//# sourceMappingURL=HeatmapChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatmapChart.js","sourceRoot":"","sources":["../../../src/react/charts/HeatmapChart.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAsC,MAAM,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAoC,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+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AAC,UAAU,EAAE,CAAC;QAChB,OAAO,CACL,KAAC,OAAO,IAAC,OAAO,EAAE,KAAK,YACrB,cAAK,IAAI,EAAC,KAAK,gBAAa,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAI,GACjE,CACX,CAAC;IACJ,CAAC;IACD,uFAAuF;IACvF,gFAAgF;IAChF,OAAO,CACL,KAAC,OAAO,IAAC,OAAO,EAAE,KAAK,YACrB;YACE,wFAAwF;YACxF,mFAAmF;YACnF,6BAA6B;YAC7B,IAAI,EAAC,QAAQ,gBACD,KAAK,EACjB,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EACpC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,UAAU,GACnB,GACM,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntervalTimeline.d.ts","sourceRoot":"","sources":["../../../src/react/charts/IntervalTimeline.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA0B,MAAM,OAAO,CAAC;AAI/D,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"IntervalTimeline.d.ts","sourceRoot":"","sources":["../../../src/react/charts/IntervalTimeline.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA0B,MAAM,OAAO,CAAC;AAI/D,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,aAAa,CAAC;AAGxE,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E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AY,EACZ,SAAS,EACT,UAAe,EACf,QAAa,EACb,eAAsB,EACtB,UAA8F,EAC9F,cAAgC,EAChC,QAAQ,EACR,SAAS,GACV,EAAE,qBAAqB,+BAoKvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CACvB,SAAS,EAAE,SAAS,gBAAgB,EAAE,EACtC,QAAQ,EAAE,MAAM,GACf;IAAE,MAAM,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAkBtG"}
|
|
@@ -4,6 +4,7 @@ import { concurrencyProfile } from 'cursedbelt-core/analytics/schedule';
|
|
|
4
4
|
import { Tooltip } from '../components/Tooltip.js';
|
|
5
5
|
import { cn } from '../lib/cn.js';
|
|
6
6
|
import { toneColor, useChartTokens } from './tokens.js';
|
|
7
|
+
import { RAW_BUTTON } from '../lib/cn';
|
|
7
8
|
/**
|
|
8
9
|
* What ran WHEN, and what ran at the SAME TIME.
|
|
9
10
|
*
|
|
@@ -77,7 +78,7 @@ export function IntervalTimeline({ intervals, window: windowProp, bands = [], ma
|
|
|
77
78
|
// subtly wrong. A bar carries no text, so nothing is lost.
|
|
78
79
|
return (_jsx(Tooltip, { content: hint, multiline: true, maxWidth: 340, children: onSelect ? (_jsx("button", {
|
|
79
80
|
// guardrails-ignore no-raw-action-button: a chart MARK, not an action — cursedbelt's Button carries height, padding and a label slot, none of which a positioned interval bar can have. The native element is used precisely so Enter/Space, focus and disabled semantics are the browser's rather than a hand-rolled keydown handler's.
|
|
80
|
-
type: 'button', "aria-label": label, onClick: () => onSelect(interval), className: 'absolute cursor-pointer rounded-xs p-0 outline-none focus-visible:ring-2 focus-visible:ring-ring', style: style })) : (_jsx("span", { role: 'img', "aria-label": label, className: 'absolute rounded-xs', style: style })) }, interval.id));
|
|
81
|
+
type: 'button', "aria-label": label, onClick: () => onSelect(interval), className: cn(RAW_BUTTON, 'absolute cursor-pointer rounded-xs p-0 outline-none focus-visible:ring-2 focus-visible:ring-ring'), style: style })) : (_jsx("span", { role: 'img', "aria-label": label, className: 'absolute rounded-xs', style: style })) }, interval.id));
|
|
81
82
|
}), markers.map((m) => (_jsx("span", { "aria-hidden": true, className: 'absolute inset-y-0 w-px', style: { left: `${clampedPct(m.at)}%`, background: toneColor(tokens, m.tone ?? 'danger') } }, `${ref}-mark-${m.at}`)))] }), showConcurrency && peak > 0 && (_jsxs("div", {
|
|
82
83
|
// guardrails-ignore no-hand-rolled-surface: the concurrency strip's plot well — an instrument surface, not a card
|
|
83
84
|
className: 'relative h-8 w-full overflow-hidden rounded-md border border-border bg-surface-sunken', role: 'img', "aria-label": `How many ran at once, peaking at ${peak}`, children: [profile.map((p, i) => {
|