@setsquare/ui 0.2.4 → 0.5.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +132 -0
  2. package/NOTICE +1 -1
  3. package/README.md +17 -7
  4. package/dist/index.d.ts +11 -4
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +5 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/lib/page-items.d.ts +10 -0
  9. package/dist/lib/page-items.d.ts.map +1 -0
  10. package/dist/lib/page-items.js +26 -0
  11. package/dist/lib/page-items.js.map +1 -0
  12. package/dist/lint/index.d.ts +5 -0
  13. package/dist/lint/index.d.ts.map +1 -1
  14. package/dist/lint/index.js +84 -3
  15. package/dist/lint/index.js.map +1 -1
  16. package/dist/shell/sidebar.d.ts +23 -0
  17. package/dist/shell/sidebar.d.ts.map +1 -1
  18. package/dist/shell/sidebar.js +22 -3
  19. package/dist/shell/sidebar.js.map +1 -1
  20. package/dist/styles/theme.css +550 -0
  21. package/dist/styles/tokens.css +17 -0
  22. package/dist/testing/index.d.ts +57 -2
  23. package/dist/testing/index.d.ts.map +1 -1
  24. package/dist/testing/index.js +276 -11
  25. package/dist/testing/index.js.map +1 -1
  26. package/dist/tokens.json +45 -0
  27. package/dist/ui/breadcrumbs.d.ts +9 -1
  28. package/dist/ui/breadcrumbs.d.ts.map +1 -1
  29. package/dist/ui/breadcrumbs.js +3 -3
  30. package/dist/ui/breadcrumbs.js.map +1 -1
  31. package/dist/ui/button-styles.d.ts.map +1 -1
  32. package/dist/ui/button-styles.js +16 -6
  33. package/dist/ui/button-styles.js.map +1 -1
  34. package/dist/ui/combo-box.d.ts +6 -1
  35. package/dist/ui/combo-box.d.ts.map +1 -1
  36. package/dist/ui/combo-box.js +2 -2
  37. package/dist/ui/combo-box.js.map +1 -1
  38. package/dist/ui/drop-indicator.d.ts +21 -0
  39. package/dist/ui/drop-indicator.d.ts.map +1 -0
  40. package/dist/ui/drop-indicator.js +20 -0
  41. package/dist/ui/drop-indicator.js.map +1 -0
  42. package/dist/ui/feature-card.d.ts.map +1 -1
  43. package/dist/ui/feature-card.js.map +1 -1
  44. package/dist/ui/grid-list.d.ts +10 -3
  45. package/dist/ui/grid-list.d.ts.map +1 -1
  46. package/dist/ui/grid-list.js +18 -7
  47. package/dist/ui/grid-list.js.map +1 -1
  48. package/dist/ui/pagination.d.ts +69 -14
  49. package/dist/ui/pagination.d.ts.map +1 -1
  50. package/dist/ui/pagination.js +177 -32
  51. package/dist/ui/pagination.js.map +1 -1
  52. package/dist/ui/switch.d.ts +2 -1
  53. package/dist/ui/switch.d.ts.map +1 -1
  54. package/dist/ui/switch.js +5 -2
  55. package/dist/ui/switch.js.map +1 -1
  56. package/dist/ui/tabs.d.ts +82 -15
  57. package/dist/ui/tabs.d.ts.map +1 -1
  58. package/dist/ui/tabs.js +274 -16
  59. package/dist/ui/tabs.js.map +1 -1
  60. package/dist/ui/time-of-day-icon.d.ts.map +1 -1
  61. package/dist/ui/time-of-day-icon.js.map +1 -1
  62. package/dist/ui/toolbar.d.ts +22 -0
  63. package/dist/ui/toolbar.d.ts.map +1 -0
  64. package/dist/ui/toolbar.js +22 -0
  65. package/dist/ui/toolbar.js.map +1 -0
  66. package/dist/ui/tree.d.ts +98 -0
  67. package/dist/ui/tree.d.ts.map +1 -0
  68. package/dist/ui/tree.js +75 -0
  69. package/dist/ui/tree.js.map +1 -0
  70. package/package.json +21 -25
  71. package/templates/next/page-transition.tsx +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,137 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0 — 2026-10-11
4
+
5
+ Breaking: the `Tree` draws no box of its own. A tree that should stay framed goes in a `Card`.
6
+
7
+ - **`Tree`'s new look**, the one `@setsquare/ui-blocks`' page outline is designed with. No border, card ground or
8
+ row dividers: rows sit on whatever holds the tree, `--nav-item-gap` apart, rounded, at least `--nav-item-height`
9
+ tall and `--target-min` at AAA. Each level indents by the new `--tree-indent` token (16px). `TreeHeader` is a
10
+ caption above its rows. Selected rows add a bold title and a `brand` icon to the old cues.
11
+ - **`TreeItem` gains `icon`, `status`, `statusLabel`, `alwaysShowActions`, `dragLabel` and `allowsDragging`.**
12
+ - `description` moves onto the title's line, and under the title when it doesn't fit. It wraps and is never
13
+ cut short, so the text-spacing overrides lose none of it. A string description joins the row's name.
14
+ - `status` takes a `StatusBadge`, on the title's line and under it on a narrow row, never squeezing the title;
15
+ `statusLabel` puts its words in the row's name, because React Aria names a
16
+ row from its `textValue` alone.
17
+ - A row's `actions` show on the selected, focused and hovered row. Elsewhere they're faded out and take no
18
+ pointer events, but stay focusable, so focus on one shows it. `alwaysShowActions` keeps them showing.
19
+ - **Drag and drop.** With `dragAndDropHooks`, every draggable row gets a drag button first among its buttons, so a
20
+ keyboard or screen reader drag can start: Enter on it, ↑ ↓ through the drop places, Enter to drop, Esc to
21
+ cancel. Focus comes back to the drag button after a cancel. `allowsDragging={false}` leaves the button off a
22
+ row that can't move, such as a column in a page layout. The dragged row fades to 50%; a row being dropped
23
+ into gets `brand-subtle` and a 2px `brand` outline.
24
+ - Rows that only hold rows: `disabledKeys` with `disabledBehavior="selection"` keeps them focusable and
25
+ undimmed, never selected. Documented; no code change.
26
+ - **`GridListItem` gains the same drag button, `dragLabel`, and dragging and drop-target states.** A draggable
27
+ row gives its start padding to the drag button, so the button's target needs no negative margin.
28
+ - **`DropIndicator`**, new: where a dragged row will land in a Tree or a GridList, for `renderDropIndicator`. A
29
+ 4px `brand` line with a 2px `background` halo, taking no room until it's the target. `tone="canvas"` draws it in
30
+ the new `canvas-mark` and `canvas-mark-halo` tokens, for marks over a page the product doesn't style.
31
+ - **`Toolbar` and `ToolbarSeparator`**, new: React Aria's Toolbar, one tab stop with arrow keys between its
32
+ buttons, wrapping instead of overflowing. New design-system card: Toolbar.
33
+ - **Forced colours.** A selected `Tree` or `GridList` row loses its ground and inset marker to a forced palette,
34
+ so it draws its marker in `Highlight` there. The drop line turns `Highlight`. The drop-target outline now draws
35
+ in every mode: it had a width and no style, so it never showed.
36
+ - **A `Button` that can't act but keeps its focus** (`aria-disabled`, with the reason in its description) now
37
+ looks it: muted words, a muted ground for the filled variants, no hover, and the not-allowed cursor. It isn't
38
+ faded, so its words stay readable and its focus ring keeps its contrast.
39
+ - **Tokens.** `canvas-mark` (the brand at its light AAA value in every theme) and `canvas-mark-halo` (white), for
40
+ selection and drop marks over a page. The contrast check holds them at least 9:1 apart, so one of them has
41
+ 3:1 against any solid colour underneath. `tree-indent`.
42
+ - **`renderIcon`** is exported: an `IconProp` (a component or an element) drawn at a size, the way the components
43
+ draw theirs, for an add-on's own components.
44
+ - **`Breadcrumbs` takes `onAction`,** for places inside a page rather than pages, such as a block's parents in a
45
+ page builder.
46
+ - **`ComboBox` takes `emptyState`:** what its open list says when nothing is in it, such as "Searching…" while
47
+ results load. It goes inside the list because React Aria hides the rest of the page from assistive technology
48
+ while the list is open, so a status line beside the field wouldn't be heard.
49
+ - **A breadcrumb can carry its own language.** `BreadcrumbItem` takes `lang` and `dir`, for a label in another
50
+ language than the interface, such as a page's own title in a page builder (3.1.2).
51
+ - **`setsquare-ui/client-directive` knows Puck.** A module that imports `@puckeditor/core` needs `'use client'`:
52
+ Puck's main entry ships without one. Its `/rsc` entry is server-safe and needs none.
53
+ - **`setsquare-ui/no-builder-surface-override`**, a new lint rule, `warn` in `recommended`: in a file that uses
54
+ `@setsquare/ui-blocks` or Puck, a Puck `overrides` key that replaces one of the builder's tested surfaces.
55
+ - **Docs.** The `GridList` README said Tab reaches a row's buttons. It's →; Tab leaves the list.
56
+ - **Cards and tests.** The Tree card is a page outline with icons, descriptions, a status, columns and drag and
57
+ drop, beside operations in a `Card`. The GridList card adds a list put in order by dragging. A new `drag`
58
+ browser suite drives both by keyboard in all four themes, measures the drop line against `background` and
59
+ `card`, and checks forced colours. The controls suite's Tree checks follow the new card.
60
+ - **`Switch` in forced colours.** Its thumb was drawn with a background, which forced colours remove, so on and off
61
+ looked the same. The track and thumb now take the system's colours there: Canvas and CanvasText, Highlight when
62
+ on.
63
+ - **`@setsquare/ui/testing`: focus appearance and focus not obscured.**
64
+ - `findWeakFocusIndicators` and `expectFocusAppearance` (2.4.13): for every control a keyboard reaches, the pixels
65
+ whose colour changes by 3:1 or more when it takes focus, against the area of a 2 CSS px perimeter of the unfocused
66
+ component, 4h + 4w − (16 − 4π)r for corner radius r (W3C's formulas, read on 9 October 2026). The component is
67
+ the part whose outline or box shadow changes on focus, so a three-layer control is measured by its paint, not its
68
+ transparent target.
69
+ - `findObscuredFocus` and `expectFocusNotObscured` (2.4.11 at `level: 'aa'`, 2.4.12 at `'aaa'`): Tab through the
70
+ page and sample each focused control for anything on top of it, into same-origin frames. A visually hidden input
71
+ is measured by its control, and only what's in view is sampled.
72
+ - `ScreenshotPage.screenshot` takes `scale`, for screenshots at CSS pixels.
73
+
74
+ ## 0.4.0 — 2026-10-08
75
+
76
+ - **`Tree`, `TreeItem`, `TreeSection` and `TreeHeader`:** React Aria's Tree, for rows inside rows, such as a
77
+ workflow's steps and their outcomes, or operations grouped by resource. It is one tab stop. ↑ ↓ move between
78
+ rows, → opens a row and ← closes it, and typing jumps to a row by name. A row's chevron has a target at least
79
+ `--target-min` square and is out of the tab order. Selection uses the same cues as `GridList`. The
80
+ `no-raw-aria-controls` and `positioned-scroll-container` lint rules cover it. New design-system card: Tree.
81
+ - **`@setsquare/ui/testing`'s text-spacing check knows pannable panes.** `findClippedText` treats an element marked
82
+ `data-setsquare-pannable`, and anything inside one, as a scroller: text that spills inside it can be reached by
83
+ panning, the way a scroller's can by scrolling. `@setsquare/ui-flows` marks its diagrams.
84
+ - **`findInvisibleFocus` (and `expectFocusVisible`) no longer misreport on a tall page.** Moving focus away to
85
+ compare could scroll the page, as React Aria does for a focused row, and take the control out of the frame, so
86
+ its focus looked unchanged. The probe now puts every scroll position back before it compares. The positioning
87
+ suite has a page built to catch it.
88
+ - **`SidebarDisclosure`:** a sidebar row with pages under it. Expanded, it opens and closes them in place, and
89
+ starts open when one is current. Collapsed to icons, it opens them as a menu beside the rail, with the current
90
+ page selected. The Sidebar card shows both, and the controls suite checks them. The docs site uses it for
91
+ Add-ons.
92
+ - **A shell shown inside a page no longer stops that page's transitions.** The site header and the dashboard's
93
+ header, sidebar and right panel each set a view-transition name, so a page transition leaves them still. A name
94
+ may be on one element only. A page showing shells inside it, such as documentation with shell previews, had
95
+ several, and the browser abandoned every transition to or from it ("Unexpected duplicate view-transition-name").
96
+ Inside a `site-preview` box, a shell now leaves the page its names. So does anything inside a box with the new
97
+ `shell-preview` utility, the same for a dashboard shell or a part of one. The docs site's page suite fails any
98
+ page that uses a name twice, and leaves its page of site previews to check that the transition runs.
99
+ - **`edge` and `edge-selected` colour tokens,** for a diagram's connections (`@setsquare/ui-flows`). They alias
100
+ `input` and `brand`, and the contrast check measures both on `background` and `card` in every theme.
101
+
102
+ ## 0.3.0 — 2026-10-06
103
+
104
+ Tagged, but never published to npm. These changes reach npm in 0.4.0.
105
+
106
+ Breaking: React 19.2 or later, a new look and new defaults for `Tabs`, and new names for `Pagination`'s links.
107
+
108
+ - **React 19.2 or later.** The peer range was `>=18.3`; it is now `>=19.2`, for `<Activity>`. `pnpm typecheck:react18`
109
+ and the React 18 copies are gone, and the browser suites run the previews on React 19. That move showed a preview
110
+ still passing `inert=""`, which React 19 reads as false; it is now `inert`.
111
+ - **`Tabs` are icons, and the selected tab opens to show its name** (`display="expanding"`, the default). `Tab`
112
+ takes `icon`, `count` and `badge`; `display="text"` shows every name and `display="icon"` only icons, each with a
113
+ brand marker on the selected tab. A tab without an icon shows its name, so existing tabs still read, now as pills
114
+ rather than on a rule. A tab whose name isn't showing has a tooltip (hover after 500ms, keyboard focus at once,
115
+ Escape from anywhere). Badges are a count or a dot; `important` adds a ring and a pulse that stops within five
116
+ seconds; `clearOnOpen` fades them and calls `onBadgeClear`; `announceBadges` says a rise politely.
117
+ `orientation="vertical"` is a 104px rail that becomes a row below 480px. Panels come in from the side the
118
+ selection moved towards (a fade at AAA).
119
+ - **Panels you leave are kept** (`hiddenPanels="visited"`, the default), with their state and DOM, in React's
120
+ `<Activity>`, which stops their effects. `all` renders every panel from the start; `unmount` is the old
121
+ behaviour. Code that relied on a panel remounting to reset needs `hiddenPanels="unmount"`.
122
+ - **`Pagination` is a results footer.** It takes a Laravel `meta` (it never reads `meta.links`): Rows per page
123
+ (`onPerPageChange`, `perPageOptions`), the range as a status message, and the pages. Up to 20 pages it shows
124
+ numbers in at most seven slots and a row that never changes length; above 20 (`fieldAbove`), a "Page [n] of N"
125
+ GET form that keeps the query. Previous and Next are icon-only. Default names are now "Page 3 of results",
126
+ "Previous page of results" and "Next page of results" (`labels.noun`); a `labels.page` override still works.
127
+ A slow page marks the control used and says "Loading page 4…" after 400ms. `page`, `pageCount` and `href` still
128
+ work, for the pages alone. New utility `rows-arrive` fades a new page's rows in.
129
+ - New design-system cards: TabsRail, TabsDisplay, TabsPanels and PaginationFooter. The contrast check now measures
130
+ the tab badge's text, the important badge's ring on `card`, `accent` and `brand-subtle`, and a tab's count on
131
+ `brand-subtle`.
132
+ - The contact form check moves focus out of the message before sending: leaving the field clears its error, which
133
+ moves the Send button, and on React 19 that lands between the press and the release of a click.
134
+
3
135
  ## 0.2.4 — 2026-10-05
4
136
 
5
137
  - **`FeatureCard`**, for the top of an overview: a title (a greeting, often) beside an icon, and a panel of
package/NOTICE CHANGED
@@ -46,4 +46,4 @@ conventions (colour token names, file layout); no shadcn/ui code is copied.
46
46
 
47
47
  The design-system artifact built by scripts/build-docs.mjs is not part of the
48
48
  package. Its bundle.js does include React Aria Components, @internationalized/date,
49
- lucide-react, clsx and tailwind-merge, and its previews load React 18 (MIT).
49
+ lucide-react, clsx and tailwind-merge, and its previews load React 19 (MIT).
package/README.md CHANGED
@@ -18,7 +18,7 @@ Controls are built in three layers, so the switch changes targets without changi
18
18
  pnpm add @setsquare/ui react-aria-components @internationalized/date
19
19
  ```
20
20
 
21
- It needs React 18.3 or later (Next.js 16 uses React 19), React Aria Components 1.21 or later, and Tailwind CSS 4 in the app. A module is a client component (`'use client'`) only when it needs to be: React Aria, a hook, a context or an event handler. The rest — `StatusBadge`, `Avatar`, `ProductMark`, `Kbd`, `EmptyState`, `IconButton`, `PageHeader`, `PageContent`, the site shell's `SiteShell`, `SiteMain`, `SiteHeader`, `SiteNav`, `SiteFooter` and `SiteFooterGroup`, the content components `Section`, `SectionHeader`, `Container`, `Eyebrow`, `Hero`, `HeroHighlight`, `Card`, `CardGrid`, `Prose`, `Steps`, `Step`, `Split`, `Tag`, `StatList` and `Stat`, `CodeBlock`, `ThemeScript`, `buttonTargetStyles()` and `buttonVisualStyles()` — have no directive, so a server component uses them without shipping them to the browser. Server components can render either kind. A server component that gives a client component an icon (`Alert`, `MenuItem`, `SidebarItem`, a search item) passes the element, `icon={<Folder />}`: a component can't cross into a client component.
21
+ It needs React 19.2 or later, React Aria Components 1.21 or later, and Tailwind CSS 4 in the app. A module is a client component (`'use client'`) only when it needs to be: React Aria, a hook, a context or an event handler. The rest — `StatusBadge`, `Avatar`, `ProductMark`, `Kbd`, `EmptyState`, `IconButton`, `PageHeader`, `PageContent`, the site shell's `SiteShell`, `SiteMain`, `SiteHeader`, `SiteNav`, `SiteFooter` and `SiteFooterGroup`, the content components `Section`, `SectionHeader`, `Container`, `Eyebrow`, `Hero`, `HeroHighlight`, `Card`, `CardGrid`, `Prose`, `Steps`, `Step`, `Split`, `Tag`, `StatList` and `Stat`, `CodeBlock`, `ThemeScript`, `buttonTargetStyles()` and `buttonVisualStyles()` — have no directive, so a server component uses them without shipping them to the browser. Server components can render either kind. A server component that gives a client component an icon (`Alert`, `MenuItem`, `SidebarItem`, a search item) passes the element, `icon={<Folder />}`: a component can't cross into a client component.
22
22
 
23
23
  In the app's global stylesheet, after Tailwind:
24
24
 
@@ -70,6 +70,12 @@ const mono = localFont({
70
70
  import { Button, DashboardShell, ShellMain, TextField } from '@setsquare/ui';
71
71
  ```
72
72
 
73
+ ### Add-ons
74
+
75
+ Diagrams of workflows and resource maps are in an add-on, [`@setsquare/ui-flows`](packages/ui-flows/README.md). It's installed on its own, so a product that doesn't draw diagrams carries none of React Flow.
76
+
77
+ A page builder is in another, [`@setsquare/ui-blocks`](packages/ui-blocks/README.md), on Puck. A product that doesn't build pages carries none of Puck.
78
+
73
79
  ## Themes and levels
74
80
 
75
81
  - `<html data-conformance="aa|aaa" class="dark?">` picks one of four themes: Light · AA, Dark · AA, Light · AAA, Dark · AAA.
@@ -145,7 +151,7 @@ For a public page — a marketing site, a privacy notice — the stylesheet also
145
151
  ```
146
152
 
147
153
  - Layout: `site-container`, `site-container-narrow`, `section-band`, `section-band-tight`, `section-band-raised`, `section-head` and `split`.
148
- - Previews: `site-preview` on a box shows a site shell at the box's width instead of the window's, with no iframe. The shell's breakpoints are `site-md`, `site-lg` and `site-xl`, media queries on a real page and container queries in the box.
154
+ - Previews: `site-preview` on a box shows a site shell at the box's width instead of the window's, with no iframe. The shell's breakpoints are `site-md`, `site-lg` and `site-xl`, media queries on a real page and container queries in the box. A shell inside a `site-preview` box, or inside one with `shell-preview` for a dashboard shell, leaves the page its view-transition names, so the page's own transitions still run.
149
155
  - Content: `eyebrow`, `site-prose`, `card-surface`, `card-grid`, `steps`, `stat-list` and `tag`.
150
156
  - Type: `text-display`, `text-display-page`, `text-display-section` and `text-lead`, fluid from a 320px viewport to 1280px. Each size has a `rem` part, so it still grows as the page zooms in.
151
157
  - Tokens: `--site-max`, `--site-max-narrow`, `--site-gutter`, `--section-y` and `--section-y-tight`, with `max-w-site` and `max-w-site-narrow`.
@@ -221,12 +227,13 @@ The components avoid it: every scroll container and every control that hides an
221
227
 
222
228
  | Rule | Reports |
223
229
  | --- | --- |
224
- | `setsquare-ui/no-raw-aria-controls` | Importing React Aria's `Checkbox`, `Radio`, `Switch`, `Slider`, date fields, `Calendar`, `DropZone` or `GridList` instead of the Setsquare version (and `ColorArea`, `ColorSlider`, `ColorWheel`, which have none yet). |
230
+ | `setsquare-ui/no-raw-aria-controls` | Importing React Aria's `Checkbox`, `Radio`, `Switch`, `Slider`, date fields, `Calendar`, `DropZone`, `GridList` or `Tree` instead of the Setsquare version (and `ColorArea`, `ColorSlider`, `ColorWheel`, which have none yet). |
225
231
  | `setsquare-ui/positioned-scroll-container` | A class list with `overflow-auto` or `overflow-scroll` (any axis or variant) and no `relative`, `absolute`, `fixed` or `sticky`, in `className`, `cn()`, `clsx()`, `cva()` and similar; and inline `overflow` styles without a `position`. Fixes itself by adding `relative`. |
226
232
  | `setsquare-ui/no-static-control-root` | `static` passed in `className` to a Setsquare component whose root has to stay positioned. |
227
233
  | `setsquare-ui/no-target-shrink` | `min-h-*` or `min-w-*` in the `className` of `Button`, `LinkButton`, `IconButton` or `Segment`. `className` is the target, and these replace its `--target-min` floor. |
228
234
  | `setsquare-ui/no-visual-only-target` | `buttonVisualStyles()` in the `className` of a link or button: the paint on its own, which makes the painted box the pointer target. |
229
- | `setsquare-ui/client-directive` | A module without `'use client'` that needs it (it imports React Aria, calls a hook other than `use`, `useCallback`, `useDebugValue`, `useId` or `useMemo`, calls `createContext`, or passes an event handler or a function as a prop or child), and one with it that needs none of those. Not in `recommended`: turn it on for the modules of a component library, where server components import them. |
235
+ | `setsquare-ui/no-builder-surface-override` | In a file that uses `@setsquare/ui-blocks` or Puck, a Puck `overrides` key (`actionBar`, `iframe`, `outline`, `fieldTypes` and the rest) that replaces one of the builder's own surfaces, whose tests then don't reach it. A warning in `recommended`. |
236
+ | `setsquare-ui/client-directive` | A module without `'use client'` that needs it (it imports React Aria or Puck's editor entry, `@puckeditor/core`, calls a hook other than `use`, `useCallback`, `useDebugValue`, `useId` or `useMemo`, calls `createContext`, or passes an event handler or a function as a prop or child), and one with it that needs none of those. Not in `recommended`: turn it on for the modules of a component library, where server components import them. |
230
237
 
231
238
  ESLint (flat config, with a parser that reads TSX, such as typescript-eslint's):
232
239
 
@@ -302,10 +309,11 @@ The positioning, target, link, reflow, text-spacing and motion scans run in the
302
309
 
303
310
  `pnpm ci:local` runs all of it; each line says what it does and doesn't cover.
304
311
 
305
- - **Types:** `tsc` on React 19 (the build) and React 18 (`pnpm typecheck:react18`).
312
+ - **Types:** `tsc` on React 19.
306
313
  - **Lint rules:** ESLint's `RuleTester`, and oxlint loading the built plugin through `jsPlugins`.
314
+ - **Unit:** the pagination window: seven slots on every page of an 8-, 20- and 239-page list, and a gap only where two or more pages are left out.
307
315
  - **Contrast:** `scripts/check-contrast.mjs` computes every token pair the usage notes promise, in all four themes. It doesn't check colours a product adds.
308
- - **Browser (Chromium only):** the design-system previews on React 18, loaded as the design-system artifact loads them:
316
+ - **Browser (Chromium only):** the design-system previews on React 19, loaded as the design-system artifact loads them:
309
317
  - axe-core on every preview in all four themes;
310
318
  - keyboard and focus behaviour for the dashboard shell, forms, feedback states, and the slider, date, file and selection controls;
311
319
  - the site shell: the phone menu opening, pushing the page down and closing on Escape from the panel or the button; the current page's weight and marker; one order for the header, the phone menu and the footer; a sticky header covering no focused control; and the header fitting at seven widths from 320px to 1280px, either side of `lg` among them;
@@ -318,6 +326,8 @@ The positioning, target, link, reflow, text-spacing and motion scans run in the
318
326
  - every control a keyboard reaches visibly changing when it takes focus, in two themes;
319
327
  - every link in running text underlined, and every target showing the cursor the rule gives it, across its whole area;
320
328
  - toasts measured against the focused control;
329
+ - tabs: the arrow keys in a row and a rail, Home and End, names with counts and badges, tooltips on hover (after 500ms, hoverable, closed by Escape and by a press) and on keyboard focus, the rail becoming a row below 480px, the three `hiddenPanels` modes (a draft surviving, a hidden panel's effects stopping, a Suspense read loading while pre-rendered), an important badge's pulse ending inside five seconds and replaying when its count rises, clear-on-open calling `onBadgeClear`, only opacity and colour changing at AAA, nothing animating under reduced motion, and no badge, ring or halo over any text in all three displays at full width and 360px;
330
+ - pagination: the tiers at 1, 4, 7, 8, 20, 21 and 239 pages, a row that never changes length, the names of page links and arrows, hrefs that keep the query and never use `meta.links`, rows per page keeping the first row in view, focus after paging, the page field's validation and alert, the pending mark and its message after 400ms (and the mark stopping inside five seconds), and motion at AA, AAA and under reduced motion;
321
331
  - nothing on any preview running off its width, no text cut off or spilling with WCAG 1.4.12's spacing applied, and nothing but a loading indicator moving past five seconds, at AA and AAA;
322
332
  - the page checks above, each also run on a page built to fail.
323
333
  - **Packaging:** `pnpm package:verify` packs the tarball and installs it into a new Next.js app. It builds the app, loads it in both levels, and runs the page checks and the lint plugin from the installed package. It also follows a sidebar link on the freshly started app, to check the templates' page transition runs with its `nav-forward` type. The root layout's `ThemeScript` is checked to put a stored dark theme on `<html>` before any of the page's own JavaScript runs, and the footer's `ThemeSwitcher` to change it for the next page load. A route on the site templates is checked too: the current page, reflow at 320px, the Menu as a link to the footer's navigation with JavaScript off, and the swap to the Menu button when the page hydrates, in the same place and keeping focus.
@@ -329,7 +339,7 @@ The positioning, target, link, reflow, text-spacing and motion scans run in the
329
339
  ```sh
330
340
  pnpm install
331
341
  pnpm build # CSS from tokens/tokens.json, then tsc into dist/
332
- pnpm test # lint-rule tests (vitest)
342
+ pnpm test # lint-rule and unit tests (vitest)
333
343
  pnpm docs:build # the design-system artifact, into docs/.artifact/
334
344
  pnpm test:browser # browser suites (after docs:build); pnpm test:axe for axe on every card
335
345
  pnpm docs:site # the docs site (apps/docs) in development
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export { TextLink } from './ui/text-link.js';
15
15
  export type { TextLinkProps } from './ui/text-link.js';
16
16
  export { IconButton } from './ui/icon-button.js';
17
17
  export type { IconButtonProps } from './ui/icon-button.js';
18
+ export { renderIcon } from './ui/icon.js';
18
19
  export type { IconComponent, IconProp } from './ui/icon.js';
19
20
  export { Tooltip, TooltipTrigger } from './ui/tooltip.js';
20
21
  export { Kbd } from './ui/kbd.js';
@@ -24,9 +25,9 @@ export { Avatar, ProductMark } from './ui/avatar.js';
24
25
  export { Breadcrumbs } from './ui/breadcrumbs.js';
25
26
  export type { BreadcrumbItem, BreadcrumbsProps } from './ui/breadcrumbs.js';
26
27
  export { Pagination } from './ui/pagination.js';
27
- export type { PaginationProps, PaginationLabels } from './ui/pagination.js';
28
+ export type { PaginationProps, PaginationLabels, PaginationMeta } from './ui/pagination.js';
28
29
  export { Tabs, TabList, Tab, TabPanel } from './ui/tabs.js';
29
- export type { TabsProps, TabListProps, TabProps, TabPanelProps } from './ui/tabs.js';
30
+ export type { TabsProps, TabListProps, TabProps, TabPanelProps, TabsLabels, TabsDisplay, TabsHiddenPanels, TabBadge, } from './ui/tabs.js';
30
31
  export { Menu, MenuItem, MenuSection, MenuSeparator, MenuTrigger, Popover, rowTarget, itemVisual, } from './ui/menu.js';
31
32
  export { SegmentedControl, Segment } from './ui/segmented-control.js';
32
33
  export { Table, TableHeader, Column, TableBody, Row, Cell } from './ui/table.js';
@@ -38,8 +39,8 @@ export { AppSearch, CommandSearch, SearchTrigger } from './ui/search.js';
38
39
  export type { SearchItem, SearchSection, SearchLabels } from './ui/search.js';
39
40
  export { DashboardShell, ShellInset, ShellBody, ShellMain, useShell, useOptionalShell, } from './shell/dashboard-shell.js';
40
41
  export type { ShellSize, PanelMode, DashboardShellProps } from './shell/dashboard-shell.js';
41
- export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarList, SidebarItem, SidebarSwitcher, SidebarTrigger, useSidebarCollapsed, } from './shell/sidebar.js';
42
- export type { SidebarLabels, SidebarTriggerLabels } from './shell/sidebar.js';
42
+ export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarList, SidebarItem, SidebarDisclosure, SidebarSwitcher, SidebarTrigger, useSidebarCollapsed, } from './shell/sidebar.js';
43
+ export type { SidebarLabels, SidebarTriggerLabels, SidebarDisclosureProps, SidebarSubItem, } from './shell/sidebar.js';
43
44
  export { AppHeader } from './shell/app-header.js';
44
45
  export { SiteShell, SiteMain } from './shell/site-shell.js';
45
46
  export type { SiteShellProps, SiteMainProps } from './shell/site-shell.js';
@@ -137,6 +138,12 @@ export { FileUpload, formatBytes } from './ui/file-upload.js';
137
138
  export type { FileUploadProps, FileUploadItem, FileUploadStatus, FileRejection, FileUploadLabels, } from './ui/file-upload.js';
138
139
  export { GridList, GridListItem } from './ui/grid-list.js';
139
140
  export type { GridListProps, GridListItemProps } from './ui/grid-list.js';
141
+ export { Tree, TreeItem, TreeSection, TreeHeader } from './ui/tree.js';
142
+ export type { TreeProps, TreeItemProps, TreeSectionProps } from './ui/tree.js';
143
+ export { DropIndicator } from './ui/drop-indicator.js';
144
+ export type { DropIndicatorProps } from './ui/drop-indicator.js';
145
+ export { Toolbar, ToolbarSeparator } from './ui/toolbar.js';
146
+ export type { ToolbarProps } from './ui/toolbar.js';
140
147
  export { SelectionBar } from './ui/selection-bar.js';
141
148
  export type { SelectionBarProps, SelectionBarLabels } from './ui/selection-bar.js';
142
149
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE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,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ export { Button, LinkButton } from './ui/button.js';
12
12
  export { buttonTargetStyles, buttonVisualStyles } from './ui/button-styles.js';
13
13
  export { TextLink } from './ui/text-link.js';
14
14
  export { IconButton } from './ui/icon-button.js';
15
+ export { renderIcon } from './ui/icon.js';
15
16
  export { Tooltip, TooltipTrigger } from './ui/tooltip.js';
16
17
  export { Kbd } from './ui/kbd.js';
17
18
  export { StatusBadge } from './ui/badge.js';
@@ -26,7 +27,7 @@ export { ScrollRegion } from './ui/scroll-region.js';
26
27
  export { Sheet } from './ui/sheet.js';
27
28
  export { AppSearch, CommandSearch, SearchTrigger } from './ui/search.js';
28
29
  export { DashboardShell, ShellInset, ShellBody, ShellMain, useShell, useOptionalShell, } from './shell/dashboard-shell.js';
29
- export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarList, SidebarItem, SidebarSwitcher, SidebarTrigger, useSidebarCollapsed, } from './shell/sidebar.js';
30
+ export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarList, SidebarItem, SidebarDisclosure, SidebarSwitcher, SidebarTrigger, useSidebarCollapsed, } from './shell/sidebar.js';
30
31
  export { AppHeader } from './shell/app-header.js';
31
32
  // The site shell, for public pages. SiteShell, SiteMain, SiteHeader, SiteNav, SiteFooter and SiteFooterGroup
32
33
  // have no 'use client'; SiteMenu and SiteNavLink do.
@@ -79,5 +80,8 @@ export { Calendar, RangeCalendar } from './ui/calendar.js';
79
80
  export { DateField, TimeField, DatePicker, DateRangePicker } from './ui/date-field.js';
80
81
  export { FileUpload, formatBytes } from './ui/file-upload.js';
81
82
  export { GridList, GridListItem } from './ui/grid-list.js';
83
+ export { Tree, TreeItem, TreeSection, TreeHeader } from './ui/tree.js';
84
+ export { DropIndicator } from './ui/drop-indicator.js';
85
+ export { Toolbar, ToolbarSeparator } from './ui/toolbar.js';
82
86
  export { SelectionBar } from './ui/selection-bar.js';
83
87
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEpD,yFAAyF;AACzF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,aAAa,EACb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AAW,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASvF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAQ9D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /** A slot in a pagination row: a page number, or a gap where pages are left out. */
2
+ export type PageItem = number | 'gap-start' | 'gap-end';
3
+ /**
4
+ * The pages to show around `page` of `count`: MUI's algorithm, with `boundary` pages at each end and `sibling`
5
+ * pages either side of the current one. Once there are more than `2 × boundary + 2 × sibling + 3` pages (7 with
6
+ * the defaults) the row always has that many slots: a gap stands for two or more pages left out, and where it would
7
+ * stand for one page, that page is shown instead. So the row never changes length as you page through.
8
+ */
9
+ export declare function pageItems(page: number, count: number, boundary?: number, sibling?: number): PageItem[];
10
+ //# sourceMappingURL=page-items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-items.d.ts","sourceRoot":"","sources":["../../src/lib/page-items.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAI,EAAE,OAAO,SAAI,GAAG,QAAQ,EAAE,CAqB5F"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The pages to show around `page` of `count`: MUI's algorithm, with `boundary` pages at each end and `sibling`
3
+ * pages either side of the current one. Once there are more than `2 × boundary + 2 × sibling + 3` pages (7 with
4
+ * the defaults) the row always has that many slots: a gap stands for two or more pages left out, and where it would
5
+ * stand for one page, that page is shown instead. So the row never changes length as you page through.
6
+ */
7
+ export function pageItems(page, count, boundary = 1, sibling = 1) {
8
+ const range = (a, b) => b < a ? [] : Array.from({ length: b - a + 1 }, (_, i) => a + i);
9
+ const startPages = range(1, Math.min(boundary, count));
10
+ const endPages = range(Math.max(count - boundary + 1, boundary + 1), count);
11
+ const siblingsStart = Math.max(Math.min(page - sibling, count - boundary - sibling * 2 - 1), boundary + 2);
12
+ const siblingsEnd = Math.min(Math.max(page + sibling, boundary + sibling * 2 + 2), endPages.length > 0 ? endPages[0] - 2 : count - 1);
13
+ const items = [...startPages];
14
+ if (siblingsStart > boundary + 2)
15
+ items.push('gap-start');
16
+ else if (boundary + 1 < count - boundary)
17
+ items.push(boundary + 1);
18
+ items.push(...range(siblingsStart, siblingsEnd));
19
+ if (siblingsEnd < count - boundary - 1)
20
+ items.push('gap-end');
21
+ else if (count - boundary > boundary)
22
+ items.push(count - boundary);
23
+ items.push(...endPages);
24
+ return items;
25
+ }
26
+ //# sourceMappingURL=page-items.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-items.js","sourceRoot":"","sources":["../../src/lib/page-items.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,KAAa,EAAE,QAAQ,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC;IAC9E,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CACrC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAA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AI,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACzD,IAAI,KAAK,GAAG,QAAQ,GAAG,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC;IACnE,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;IACxB,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -12,6 +12,9 @@
12
12
  * there can shrink the target below 44px at AAA; and the painted classes on their own (Layer 2) make the paint
13
13
  * the target.
14
14
  *
15
+ * One more is for products that use @setsquare/ui-blocks: Puck's `overrides` can replace the builder's own
16
+ * surfaces, and the builder's tests don't reach what replaces them.
17
+ *
15
18
  * Static analysis can only see some of it. `@setsquare/ui/testing` checks the rendered page, and finds the rest.
16
19
  */
17
20
  import type { Rule } from 'eslint';
@@ -22,6 +25,7 @@ export declare const rules: {
22
25
  'no-target-shrink': Rule.RuleModule;
23
26
  'no-visual-only-target': Rule.RuleModule;
24
27
  'client-directive': Rule.RuleModule;
28
+ 'no-builder-surface-override': Rule.RuleModule;
25
29
  };
26
30
  declare const plugin: {
27
31
  meta: {
@@ -34,6 +38,7 @@ declare const plugin: {
34
38
  'no-target-shrink': Rule.RuleModule;
35
39
  'no-visual-only-target': Rule.RuleModule;
36
40
  'client-directive': Rule.RuleModule;
41
+ 'no-builder-surface-override': Rule.RuleModule;
37
42
  };
38
43
  configs: Record<string, unknown>;
39
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAwoBnC,eAAO,MAAM,KAAK;IAChB,sBAAsB;IACtB,6BAA6B;IAC7B,wBAAwB;IACxB,kBAAkB;IAClB,uBAAuB;IACvB,kBAAkB;CACnB,CAAC;AAEF,QAAA,MAAM,MAAM;;QACF,IAAI;;;;;;;;;;aAEG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CACvC,CAAC;eAea,MAAM"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAstBnC,eAAO,MAAM,KAAK;IAChB,sBAAsB;IACtB,6BAA6B;IAC7B,wBAAwB;IACxB,kBAAkB;IAClB,uBAAuB;IACvB,kBAAkB;IAClB,6BAA6B;CAC9B,CAAC;AAEF,QAAA,MAAM,MAAM;;QACF,IAAI;;;;;;;;;;;aAEG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CACvC,CAAC;eAgBa,MAAM"}
@@ -19,6 +19,8 @@ const WRAPPED = {
19
19
  DropZone: 'FileUpload',
20
20
  GridList: 'GridList',
21
21
  GridListItem: 'GridListItem',
22
+ Tree: 'Tree',
23
+ TreeItem: 'TreeItem',
22
24
  };
23
25
  /** Also render hidden inputs, but have no Setsquare version yet. */
24
26
  const UNWRAPPED = ['ColorArea', 'ColorSlider', 'ColorWheel'];
@@ -41,6 +43,8 @@ const POSITIONED_ROOTS = new Set([
41
43
  'FileUpload',
42
44
  'GridList',
43
45
  'GridListItem',
46
+ 'Tree',
47
+ 'TreeItem',
44
48
  'Table',
45
49
  'ShellMain',
46
50
  'SidebarContent',
@@ -534,17 +538,19 @@ const noVisualOnlyTarget = {
534
538
  /** Hooks React's server build exports (react.react-server in React 19): a server component may call these. */
535
539
  const SERVER_HOOKS = new Set(['use', 'useCallback', 'useDebugValue', 'useId', 'useMemo']);
536
540
  /** Packages that only work in the client graph: React Aria's entry imports `client-only`. */
537
- const CLIENT_PACKAGES = /^(react-aria-components|react-aria|react-stately|@react-aria\/|@react-stately\/)/;
541
+ // Puck's main entry ships no 'use client' of its own, so a module importing it has to carry one. Its /rsc entry
542
+ // is the server-safe one.
543
+ const CLIENT_PACKAGES = /^(react-aria-components|react-aria|react-stately|@react-aria\/|@react-stately\/|@puckeditor\/core$)/;
538
544
  const clientDirective = {
539
545
  meta: {
540
546
  type: 'problem',
541
547
  docs: {
542
- description: "Require 'use client' exactly when a module needs it: React Aria, a hook, a context, an event handler or a function passed as a prop",
548
+ description: "Require 'use client' exactly when a module needs it: React Aria or Puck's editor, a hook, a context, an event handler or a function passed as a prop",
543
549
  },
544
550
  schema: [],
545
551
  messages: {
546
552
  missing: "This module {{reason}}, which only a client module can do. Add 'use client' as its first line.",
547
- unneeded: "'use client' isn't needed here: nothing in this module needs the client (React Aria, a hook other than use, useCallback, useDebugValue, useId or useMemo, createContext, an event handler, or a function passed as a prop or child). Remove it, so server components can use this module without shipping it to the browser.",
553
+ unneeded: "'use client' isn't needed here: nothing in this module needs the client (React Aria, Puck's editor, a hook other than use, useCallback, useDebugValue, useId or useMemo, createContext, an event handler, or a function passed as a prop or child). Remove it, so server components can use this module without shipping it to the browser.",
548
554
  },
549
555
  },
550
556
  create(context) {
@@ -619,6 +625,79 @@ const clientDirective = {
619
625
  };
620
626
  },
621
627
  };
628
+ /**
629
+ * The parts of Puck's editor that @setsquare/ui-blocks draws itself, as Puck's `overrides` keys. Replacing one
630
+ * swaps a surface the builder's tests cover for one they don't see.
631
+ */
632
+ const BUILDER_SURFACES = new Set([
633
+ 'header',
634
+ 'headerActions',
635
+ 'actionBar',
636
+ 'componentOverlay',
637
+ 'componentItem',
638
+ 'components',
639
+ 'drawer',
640
+ 'drawerItem',
641
+ 'outline',
642
+ 'fields',
643
+ 'fieldLabel',
644
+ 'fieldTypes',
645
+ 'iframe',
646
+ 'preview',
647
+ 'puck',
648
+ ]);
649
+ const BUILDER_PACKAGES = /^(?:@setsquare\/ui-blocks|@puckeditor\/core)(?:\/|$)/;
650
+ const noBuilderSurfaceOverride = {
651
+ meta: {
652
+ type: 'suggestion',
653
+ docs: {
654
+ description: "Warn when Puck's `overrides` replace a surface @setsquare/ui-blocks draws and tests: the header, library, outline, fields, canvas and their overlays",
655
+ },
656
+ schema: [],
657
+ messages: {
658
+ override: "overrides.{{key}} replaces the builder's own {{key}}, and that surface's tests (keyboard routes, focus after each change, announcements, target size) stop applying to it. Add behaviour through useBuilder() or the builder's props instead, or ask for an option.",
659
+ },
660
+ },
661
+ create(context) {
662
+ // Only files that use the builder or Puck: elsewhere an `overrides` object is someone else's.
663
+ let builder = false;
664
+ const report = (obj) => {
665
+ if (!builder || !obj || obj.type !== 'ObjectExpression')
666
+ return;
667
+ for (const p of obj.properties) {
668
+ if (p.type !== 'Property' || p.computed)
669
+ continue;
670
+ const k = p.key;
671
+ const key = String(k.type === 'Identifier' ? k.name : k.value);
672
+ if (BUILDER_SURFACES.has(key))
673
+ context.report({ node: p, messageId: 'override', data: { key } });
674
+ }
675
+ };
676
+ return {
677
+ ImportDeclaration(node) {
678
+ const n = node;
679
+ if (BUILDER_PACKAGES.test(String(n.source.value)))
680
+ builder = true;
681
+ },
682
+ // A plugin, or any object, with `overrides: { … }`.
683
+ Property(node) {
684
+ const n = node;
685
+ const k = n.key;
686
+ if (!n.computed && (k.name === 'overrides' || k.value === 'overrides'))
687
+ report(n.value);
688
+ },
689
+ // <Puck overrides={{ … }}>
690
+ JSXAttribute(node) {
691
+ const n = node;
692
+ if (n.name.name !== 'overrides')
693
+ return;
694
+ const v = n.value;
695
+ if (v?.type === 'JSXExpressionContainer')
696
+ report(v.expression);
697
+ },
698
+ };
699
+ },
700
+ };
622
701
  export const rules = {
623
702
  'no-raw-aria-controls': noRawAriaControls,
624
703
  'positioned-scroll-container': positionedScrollContainer,
@@ -626,6 +705,7 @@ export const rules = {
626
705
  'no-target-shrink': noTargetShrink,
627
706
  'no-visual-only-target': noVisualOnlyTarget,
628
707
  'client-directive': clientDirective,
708
+ 'no-builder-surface-override': noBuilderSurfaceOverride,
629
709
  };
630
710
  const plugin = {
631
711
  meta: { name: '@setsquare/ui/lint' },
@@ -642,6 +722,7 @@ plugin.configs.recommended = {
642
722
  'setsquare-ui/no-static-control-root': 'error',
643
723
  'setsquare-ui/no-target-shrink': 'error',
644
724
  'setsquare-ui/no-visual-only-target': 'error',
725
+ 'setsquare-ui/no-builder-surface-override': 'warn',
645
726
  },
646
727
  };
647
728
  export default plugin;