@nocoo/basalt 3.2.0 → 3.2.1

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.
Files changed (83) hide show
  1. package/ai/DESIGN.md +20 -9
  2. package/ai/INTEGRATION.md +9 -9
  3. package/ai/USAGE.md +1 -1
  4. package/ai/registry.json +73 -73
  5. package/dist/charts/frame.js +2 -2
  6. package/dist/charts/frame.js.map +1 -1
  7. package/dist/charts/heatmap-calendar.js +4 -4
  8. package/dist/charts/heatmap-calendar.js.map +1 -1
  9. package/dist/charts/heatmap-matrix.js +3 -3
  10. package/dist/charts/heatmap-matrix.js.map +1 -1
  11. package/dist/components/app-header.js +1 -1
  12. package/dist/components/app-header.js.map +1 -1
  13. package/dist/components/app-shell.js +1 -1
  14. package/dist/components/app-shell.js.map +1 -1
  15. package/dist/components/chat-composer.js +1 -1
  16. package/dist/components/chat-composer.js.map +1 -1
  17. package/dist/components/chat-message.js +1 -1
  18. package/dist/components/chat-message.js.map +1 -1
  19. package/dist/components/code.js +1 -1
  20. package/dist/components/code.js.map +1 -1
  21. package/dist/components/command-palette.js +2 -2
  22. package/dist/components/command-palette.js.map +1 -1
  23. package/dist/components/context-cards.js +1 -1
  24. package/dist/components/context-cards.js.map +1 -1
  25. package/dist/components/context-menu.js +1 -1
  26. package/dist/components/context-menu.js.map +1 -1
  27. package/dist/components/data-table.js +127 -124
  28. package/dist/components/data-table.js.map +1 -1
  29. package/dist/components/diff-table.js +1 -1
  30. package/dist/components/diff-table.js.map +1 -1
  31. package/dist/components/dropdown-menu.js +1 -1
  32. package/dist/components/dropdown-menu.js.map +1 -1
  33. package/dist/components/editable-nav-item.js +2 -2
  34. package/dist/components/editable-nav-item.js.map +1 -1
  35. package/dist/components/file-dropzone.js +1 -1
  36. package/dist/components/file-dropzone.js.map +1 -1
  37. package/dist/components/filter-bar.js +1 -1
  38. package/dist/components/filter-bar.js.map +1 -1
  39. package/dist/components/icon-picker.js +3 -3
  40. package/dist/components/icon-picker.js.map +1 -1
  41. package/dist/components/inline-editable.js +1 -1
  42. package/dist/components/inline-editable.js.map +1 -1
  43. package/dist/components/input-group.js +2 -2
  44. package/dist/components/input-group.js.map +1 -1
  45. package/dist/components/layer-card.js +2 -1
  46. package/dist/components/layer-card.js.map +1 -1
  47. package/dist/components/link.js +1 -1
  48. package/dist/components/link.js.map +1 -1
  49. package/dist/components/menu-bar.js +2 -2
  50. package/dist/components/menu-bar.js.map +1 -1
  51. package/dist/components/multi-select.js +1 -1
  52. package/dist/components/multi-select.js.map +1 -1
  53. package/dist/components/overlay.d.ts +3 -6
  54. package/dist/components/overlay.js +3 -3
  55. package/dist/components/overlay.js.map +1 -1
  56. package/dist/components/responsive-master-detail.js +2 -2
  57. package/dist/components/responsive-master-detail.js.map +1 -1
  58. package/dist/components/scroll-area.js +1 -1
  59. package/dist/components/scroll-area.js.map +1 -1
  60. package/dist/components/segment-control.js +1 -1
  61. package/dist/components/segment-control.js.map +1 -1
  62. package/dist/components/select.js +1 -1
  63. package/dist/components/select.js.map +1 -1
  64. package/dist/components/sensitive-input.js +1 -1
  65. package/dist/components/sensitive-input.js.map +1 -1
  66. package/dist/components/sidebar.js +1 -1
  67. package/dist/components/sidebar.js.map +1 -1
  68. package/dist/components/table.js +1 -1
  69. package/dist/components/table.js.map +1 -1
  70. package/dist/components/tabs.js +1 -1
  71. package/dist/components/tabs.js.map +1 -1
  72. package/dist/components/tag-color-picker.js +2 -2
  73. package/dist/components/tag-color-picker.js.map +1 -1
  74. package/dist/components/toast.js +1 -1
  75. package/dist/components/toast.js.map +1 -1
  76. package/dist/components/toolbar.js +8 -8
  77. package/dist/components/toolbar.js.map +1 -1
  78. package/dist/styles/base.css +71 -0
  79. package/dist/styles/standalone.css +72 -87
  80. package/dist/styles/tailwind.css +8 -2
  81. package/dist/styles/tokens.css +4 -1
  82. package/dist/utils/navigation.d.ts +1 -1
  83. package/package.json +1 -1
package/ai/DESIGN.md CHANGED
@@ -64,10 +64,12 @@ Wrapping and enlarged text may grow the header; do not impose a fixed height.
64
64
 
65
65
  Layout grids default to medium (16px). ContentIsland owns 16px insets on mobile,
66
66
  24px on tablets and 24px vertical / 32px horizontal from 1024px. The catalog shell
67
- keeps 8px outside the island on mobile and 12px from 768px. Ordinary application
68
- sections use 24px gaps, including catalog documentation. SectionRule
69
- uses 12px content separation for compact labels and 16px for reading headings. `Grid gap="sm|md|lg|xl"`
70
- and semantic utilities such as `gap-basalt-layout-xl` select these tiers.
67
+ keeps 8px outside the island on mobile and 12px from 768px; AppHeader uses the
68
+ same 8px / 12px horizontal inset to align with that outer island boundary, not its
69
+ inner content edge. Ordinary application sections use 24px gaps, including catalog
70
+ documentation. SectionRule uses 12px content separation for compact labels and
71
+ 16px for reading headings. `Grid gap="sm|md|lg|xl"` and semantic utilities such as
72
+ `gap-basalt-layout-xl` select these tiers.
71
73
  There is no universal height for either category.
72
74
 
73
75
  Dialog and AlertDialog panels use 16px outer insets on mobile and 24px from
@@ -100,8 +102,9 @@ TagBadge uses 6px horizontal padding at `sm` and 8px at `md`.
100
102
  All nonzero padding, margin and gaps use the appropriate category scale or aliases.
101
103
  Zero, auto margins and hairline seams are structural exceptions, not new density
102
104
  levels. Negative margins may cancel an owned boundary, not invent a new gap.
103
- Use `p-basalt-card`, `gap-basalt-layout`, `gap-basalt-space-sm`, etc. Default nav
104
- insets and field gaps remain 8px. Selectable rows use 8px horizontal / 6px vertical
105
+ Container spacing uses 4px multiples (4/8/12/16/24/32px); 2px and 6px
106
+ control-internal spacing remains unchanged. Use `p-basalt-card`, `gap-basalt-layout`,
107
+ `gap-basalt-space-sm`, etc. Default nav insets and field gaps remain 8px. Selectable rows use 8px horizontal / 6px vertical
105
108
  insets and an 8px icon gap. Sidebar destinations alone use 8px vertical padding;
106
109
  menus, editable navigation and chat rows retain their compact role. One component
107
110
  owns each boundary: nested sections must not accidentally double the same inset.
@@ -158,7 +161,9 @@ The shared classes calculate natural size as follows:
158
161
  - Action rows: 22px text line (`--basalt-line-row`) + 6px vertical padding each
159
162
  side = 34px. Body prose/code retain the 20px line box. Compound inputs own one
160
163
  outer border; inset children do not add another. Segmented tracks keep 14px text
161
- on a 20px line box: 30px items + 2px track inset per side = 34px.
164
+ on a 20px line box: 30px items + 2px track inset per side = 34px. A horizontally
165
+ scrolling SegmentControl viewport adds 4px clearance on all four edges and uses
166
+ matching scroll-padding; this does not enlarge the ToggleGroup track.
162
167
  - Sidebar destination and disclosure rows use the same 22px line box with 8px
163
168
  vertical padding, yielding 38px reference rows without changing shared controls.
164
169
  - Cards, dialogs and layout containers have no mandatory height. Textareas and
@@ -235,8 +240,14 @@ interaction contracts; do not change their containment as a global workaround.
235
240
  expose that state instead of switching to a gray secondary variant alone.
236
241
  Checkbox/radio/switch glyphs, primary/destructive actions and semantic diff
237
242
  colors keep their semantic fills. Color swatches retain their actual palette.
238
- - Keyboard focus is separate from selection. Navigation uses an inset focus ring
239
- so overflow and collapsed groups cannot clip it. Disabled controls retain
243
+ - Keyboard focus is separate from selection. Ordinary focus uses a 1px theme
244
+ `--basalt-ring` stroke with a 2px outer offset; flush structural targets use the
245
+ same stroke inset with a 2px negative offset (`basalt-focus-inset`). External
246
+ focus targets need 4px clearance inside their nearest clipping container;
247
+ existing padding of at least 4px counts and is not stacked. Forced-colors mode
248
+ may use a 2px system outline. Focus causes no layout shift, and error indicators
249
+ remain independent. Navigation uses inset focus so overflow and collapsed groups
250
+ cannot clip it. Disabled controls retain
240
251
  subdued opacity and cannot become moving-hover targets; selection never lowers
241
252
  opacity or mutes its primary label.
242
253
  - SidebarPartition is a major section label (12px / `text-basalt-sm`, semibold,
package/ai/INTEGRATION.md CHANGED
@@ -45,7 +45,7 @@ AppShell ← dashboard and catalog routes
45
45
  ├── Sidebar ← product title + version + nav
46
46
  └── AppMain ← id="main-content"
47
47
  ├── AppHeader ← crumbs + current page | top-right
48
- └── island wrap ← px-basalt-space-lg pb-basalt-space-lg md:px-basalt-space-lg md:pb-basalt-space-lg
48
+ └── island wrap ← px-basalt-space-lg pb-basalt-space-lg md:px-basalt-layout-sm md:pb-basalt-layout-sm
49
49
  └── ContentIsland
50
50
  ├── PageHeader ← title + subtitle | create / short filters
51
51
  │ ← optional own-row complex filters
@@ -390,7 +390,7 @@ Bounded shells use border-box `height/max-height: 100dvh`. Document shells use `
390
390
  <AppSkipLink>Skip to content</AppSkipLink>
391
391
  <AppMain>
392
392
  <AppHeader title="Field notes" actions={actions} />
393
- <div className="flex min-h-0 min-w-0 flex-1 flex-col md:px-basalt-space-lg md:pb-basalt-space-lg">
393
+ <div className="flex min-h-0 min-w-0 flex-1 flex-col md:px-basalt-layout-sm md:pb-basalt-layout-sm">
394
394
  <ContentIsland mobileSurface="edge-to-edge">
395
395
  <div className="mx-auto max-w-prose px-basalt-space-lg py-basalt-space-lg md:p-0">{content}</div>
396
396
  </ContentIsland>
@@ -428,11 +428,11 @@ Do not wrap those regions in another full-viewport column. Do not set `h-screen`
428
428
 
429
429
  ### Shared navigation geometry
430
430
 
431
- `SidebarNav` and `NavigationMenuList` own one `--basalt-space-nav-inset` (8px) boundary and `--basalt-space-nav-gap` (2px) between rows. Sidebar groups do not add another horizontal inset. Sidebar destinations and search use 8px horizontal/vertical padding, an 8px icon gap and a 22px line box for a 38px reference row. This is local to Sidebar: editable/folder rows, horizontal navigation links and menus retain 6px vertical padding and 34px rows. Header, search wrapper and footer share the same navigation inset. Do not add caller-owned `px-basalt-space-lg`, `pt-basalt-space-sm` or item-stack padding to compensate for missing package geometry.
431
+ `SidebarNav` and `NavigationMenuList` own one `--basalt-space-nav-inset` (8px) boundary and `--basalt-space-nav-gap` (4px) between rows. Sidebar groups do not add another horizontal inset. Sidebar destinations and search use 8px horizontal/vertical padding, an 8px icon gap and a 22px line box for a 38px reference row. This is local to Sidebar: editable/folder rows, horizontal navigation links and menus retain 6px vertical padding and 34px rows. Header and search wrapper use the navigation inset. SidebarFooter instead owns 16px horizontal and bottom padding plus 8px top padding; keep the same 68px rail centering and expanded layout without duplicating that inset. Do not add caller-owned padding to compensate for missing package geometry.
432
432
 
433
433
  Use `SidebarNav` for vertical lists, including standalone lists of `EditableNavItem` / `FolderNavItem`; `NavigationMenuList` owns horizontal/vertical Radix navigation. Both compose the existing list-local hover adapter. One background moves with transform between enabled rows. Sidebar hover appears at the actual pointer row and disappears there on leave or over a gap/disclosure label; it never launches from or returns to the active route or stale pointer focus. Only continuous row-to-row hover animates. Keyboard focus remains independent. NavigationMenuList retains its focus/selection-following behavior. Nested lists own separate highlights. Hidden, disabled and actively renamed rows are excluded. Geometry reads are batched per animation frame, same-row pointer motion causes no updates, and reduced motion disables transitions. Navigation state, routes and rename operations remain application-owned; the adapter is View-only.
434
434
 
435
- `SidebarHeader` and `SidebarFooter` already pad horizontally. Brand, version pill, and collapse control go directly in the header. The version string is read from the app `package.json` at build time. Never hardcode it. `SidebarPartition` aligns with row text. `SidebarGroup` adds only section spacing, never a second item gutter.
435
+ `SidebarHeader` pads horizontally by the navigation inset; `SidebarFooter` owns its larger footer boundary. Brand, version pill, and collapse control go directly in the header. The version string is read from the app `package.json` at build time. Never hardcode it. `SidebarPartition` aligns with row text. `SidebarGroup` adds only section spacing, never a second item gutter.
436
436
 
437
437
  ```tsx excerpt:sidebar-expanded-structure
438
438
  <Sidebar collapsed={collapsed}>
@@ -662,7 +662,7 @@ export function AppFrame() {
662
662
  title={title}
663
663
  actions={<ThemeToggle aria-label={`Toggle theme (now ${theme})`} />}
664
664
  />
665
- <div className="flex min-h-0 flex-1 flex-col px-basalt-space-lg pb-basalt-space-lg md:px-basalt-space-lg md:pb-basalt-space-lg">
665
+ <div className="flex min-h-0 flex-1 flex-col px-basalt-space-lg pb-basalt-space-lg md:px-basalt-layout-sm md:pb-basalt-layout-sm">
666
666
  <ContentIsland>
667
667
  <Outlet />
668
668
  </ContentIsland>
@@ -675,7 +675,7 @@ export function AppFrame() {
675
675
 
676
676
  <a id="appheader-and-breadcrumbs"></a>
677
677
 
678
- `AppHeader` defaults to `h-14`, matching `SidebarHeader`; `density="compact"` uses a 52px row with 44px minimum targets. `sticky` keeps it visible within the current scroll owner; see §6 for safe-area positioning.
678
+ `AppHeader` defaults to `h-14`, matching `SidebarHeader`; `density="compact"` uses a 52px row with 44px minimum targets. Its horizontal inset is 8px on mobile and 12px from 768px, aligning with the outer ContentIsland wrapper rather than the island's inner card edge. `sticky` keeps it visible within the current scroll owner; see §6 for safe-area positioning.
679
679
 
680
680
  ### AppHeader API & Contracts
681
681
 
@@ -759,7 +759,7 @@ The catalog's app-local `RouteScrollReset` wraps each leaf page inside its Suspe
759
759
 
760
760
  The `/forms`, `/settings`, `/data`, and `/chat` examples demonstrate local state and simulated requests, including failure/retry and cancellation. Their viewmodels own data and timers; Views own native FormData, focus, and responsive layout. Replace the local service adapter when integrating a backend. Theme selection uses the shared provider; local profile, uploads, and chat changes do not update a real account.
761
761
 
762
- `PageHeader` is flush on `ContentIsland`. The island owns 16px mobile insets, 24px tablet insets, and 32px horizontal / 24px vertical desktop insets. Do not wrap the header in another card or add page padding. `PageHeader.size` is `"md" | "lg" | "xl"` (default `"md"`); larger headings use 16/24px descriptions, all title/description pairs use an 8px gap. `SectionRule variant="heading"` gives reading sections a 20px sentence-case title without the compact dashed rule. Controls and card slots keep their compact geometry.
762
+ `PageHeader` is flush on `ContentIsland`. The island owns 16px mobile insets, 24px tablet insets, and 32px horizontal / 24px vertical desktop insets. `AppHeader` remains aligned to the outer island boundary (8px mobile, 12px from 768px), not this inner content edge. Do not wrap the header in another card or add page padding. `PageHeader.size` is `"md" | "lg" | "xl"` (default `"md"`); larger headings use 16/24px descriptions, all title/description pairs use an 8px gap. `SectionRule variant="heading"` gives reading sections a 20px sentence-case title without the compact dashed rule. Controls and card slots keep their compact geometry.
763
763
 
764
764
  ### Create and filters
765
765
 
@@ -930,7 +930,7 @@ Input, Select, secondary / outline Button use `bg-basalt-control` (`--basalt-con
930
930
 
931
931
  `Table` sets `data-basalt-table`. Zebra, hover, and selected paint on `td`, from `--basalt-zebra-fill`, `--basalt-hover` and `--basalt-selected`. Selection adds no decorative side bar or frame; semantic add/remove diff tints are preserved.
932
932
 
933
- Neutral selected states use the brighter `--basalt-selected` surface, readable `--basalt-selected-foreground` and navigation font weight, without decorative side bars or selected borders. Never use `accent` or `muted` to signal selection. Existing semantic checkmarks and tab underlines remain; do not add a decorative frame at the white ceiling. A moving hover layer must not erase the selected row. Sidebar, navigation menus, editable navigation and ChatInbox share this behavior and inset keyboard focus; neutral Button variants also honor `aria-pressed` and `aria-current`. Segments and tabs retain their existing measured indicator motion. Primary/destructive actions, check/radio/switch glyphs and semantic diffs keep their semantic colors. See [DESIGN.md](DESIGN.md#selection-and-navigation-hierarchy).
933
+ Neutral selected states use the brighter `--basalt-selected` surface, readable `--basalt-selected-foreground` and navigation font weight, without decorative side bars or selected borders. Never use `accent` or `muted` to signal selection. Existing semantic checkmarks and tab underlines remain; do not add a decorative frame at the white ceiling. A moving hover layer must not erase the selected row. Sidebar, navigation menus, editable navigation and ChatInbox share this behavior and inset keyboard focus; neutral Button variants also honor `aria-pressed` and `aria-current`. Focus is separate from selection: ordinary targets use the 1px theme `--basalt-ring` stroke with a 2px outer offset; flush targets use the same stroke inset with a 2px negative offset. External focus targets need at least 4px clearance inside their nearest clipping container; existing 4px padding counts and is not stacked. Focus does not shift layout, error indicators stay independent, and forced-colors mode may use a 2px system outline. Segments and tabs retain their existing measured indicator motion. Primary/destructive actions, check/radio/switch glyphs and semantic diffs keep their semantic colors. See [DESIGN.md](DESIGN.md#selection-and-navigation-hierarchy).
934
934
 
935
935
  `DescriptionList` is layout and type only. It is not a surface.
936
936
 
@@ -1925,7 +1925,7 @@ Thinking and ToolChips share row padding; disclosures rotate only their own chev
1925
1925
 
1926
1926
  The standalone build generates every Tailwind utility once in canonical order. Do not append handwritten copies of `.p-0`, `.bg-transparent` or other native utilities after generated axis/state rules: a later shorthand can silently erase semantic padding. Browser acceptance measures actual computed insets in both CSS entrypoints, under foreign host spacing and semantic overrides.
1927
1927
 
1928
- Public Radio, Checkbox, Switch and SegmentControl group roots establish the scoped `.basalt-ui` reset. Fieldsets and legends have no browser-default padding/margin inside that boundary; standalone and Tailwind consumers must have identical group insets. Host form groups outside Basalt remain untouched.
1928
+ Public Radio, Checkbox, Switch and SegmentControl group roots establish the scoped `.basalt-ui` reset. Fieldsets and legends have no browser-default padding/margin inside that boundary; standalone and Tailwind consumers must have identical group insets. SegmentControl's horizontal scrolling viewport has 4px focus clearance on every edge and matching scroll-padding so keyboard navigation can reveal end items; the ToggleGroup track retains its 2px compact inset and 34px item geometry. Host form groups outside Basalt remain untouched.
1929
1929
 
1930
1930
  Native form legends do not participate in a fieldset's flex gap. Radio, Checkbox and Switch legends therefore own `margin-bottom: var(--basalt-space-field-gap)` (8px) independently of the group's row layout. Do not replace the semantic legend or add wrapper divs to simulate this spacing. Override the existing field-gap token when a different group density is required.
1931
1931
 
package/ai/USAGE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Basalt AI & Machine Usage Guide
2
2
 
3
- This document describes how AI code assistants, automated agents, and developers can consume `@nocoo/basalt` (v3.2.0).
3
+ This document describes how AI code assistants, automated agents, and developers can consume `@nocoo/basalt` (v3.2.1).
4
4
 
5
5
  ---
6
6