@datalayer/primer-addons 1.0.53 → 1.0.55

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 (82) hide show
  1. package/README.md +32 -32
  2. package/lib/components/appearance/AppearanceControls.js +1 -1
  3. package/lib/components/appearance/AppearanceMenu.stories.d.ts +1 -1
  4. package/lib/components/appearance/AppearanceMenu.stories.js +2 -2
  5. package/lib/components/appearance/CollaboratorPalette.stories.d.ts +1 -1
  6. package/lib/components/appearance/CollaboratorPalette.stories.js +2 -2
  7. package/lib/components/appearance/ColorModeCircle.js +4 -2
  8. package/lib/components/appearance/ThemeCircle.stories.js +1 -1
  9. package/lib/components/appearance/ThemePreviewCard.js +1 -1
  10. package/lib/components/appearance/ThemePreviewCard.stories.d.ts +1 -1
  11. package/lib/components/appearance/ThemePreviewCard.stories.js +1 -1
  12. package/lib/components/box/Box.d.ts +3 -3
  13. package/lib/components/box/Box.js +3 -3
  14. package/lib/components/box/Box.stories.d.ts +1 -1
  15. package/lib/components/box/Box.stories.js +1 -1
  16. package/lib/components/box/boxTokens.d.ts +2 -2
  17. package/lib/components/box/boxTokens.js +2 -2
  18. package/lib/components/calendar-picker/CalendarPicker.js +1 -1
  19. package/lib/components/card/Card.js +1 -1
  20. package/lib/components/color/ColorSwatch.js +1 -1
  21. package/lib/components/entity-avatar/EntityAvatar.d.ts +1 -1
  22. package/lib/components/entity-avatar/EntityAvatar.js +1 -1
  23. package/lib/components/hover-card/HoverCard.d.ts +1 -1
  24. package/lib/components/logo/DatalayerLogo.js +12 -12
  25. package/lib/components/logo/DatalayerLogo.stories.js +1 -1
  26. package/lib/components/sheet/Sheet.d.ts +1 -1
  27. package/lib/components/sheet/Sheet.js +1 -1
  28. package/lib/components/toolbar/Toolbar.d.ts +14 -2
  29. package/lib/components/toolbar/Toolbar.js +102 -8
  30. package/lib/components/toolbar/ToolbarButton.js +1 -1
  31. package/lib/components/toolbar/ToolbarRenderer.d.ts +2 -0
  32. package/lib/components/toolbar/ToolbarRenderer.js +3 -1
  33. package/lib/components/toolbar/types.d.ts +6 -0
  34. package/lib/reactor/ThemePlugin.js +1 -1
  35. package/lib/reactor/index.d.ts +1 -1
  36. package/lib/reactor/index.js +1 -1
  37. package/lib/reactor/page-layout/PageLayout.d.ts +2 -2
  38. package/lib/reactor/page-layout/PageLayout.js +3 -3
  39. package/lib/reactor/page-layout/PageLayoutPlugin.js +2 -2
  40. package/lib/theme/DatalayerThemeProvider.js +1 -1
  41. package/lib/theme/{loopEyes.d.ts → agentEyes.d.ts} +3 -3
  42. package/lib/theme/{loopEyes.js → agentEyes.js} +3 -3
  43. package/lib/theme/colors/{loopColors.d.ts → agentColors.d.ts} +15 -15
  44. package/lib/theme/colors/{loopColors.js → agentColors.js} +16 -16
  45. package/lib/theme/colors/hueColors.d.ts +1 -1
  46. package/lib/theme/colors/hueColors.js +2 -2
  47. package/lib/theme/colors/index.d.ts +1 -1
  48. package/lib/theme/colors/index.js +3 -3
  49. package/lib/theme/colors/metalColors.d.ts +12 -12
  50. package/lib/theme/colors/metalColors.js +6 -6
  51. package/lib/theme/colors/themeAccents.d.ts +5 -6
  52. package/lib/theme/colors/themeAccents.js +4 -5
  53. package/lib/theme/css/createThemeCSSVars.d.ts +5 -5
  54. package/lib/theme/css/primerBaseVars.js +1 -1
  55. package/lib/theme/index.d.ts +2 -2
  56. package/lib/theme/index.js +2 -2
  57. package/lib/theme/palettes/ColorPalette.js +18 -18
  58. package/lib/theme/portable.d.ts +1 -1
  59. package/lib/theme/portable.js +1 -1
  60. package/lib/theme/themeRegistry.js +2 -2
  61. package/lib/theme/themeTokens.d.ts +1 -1
  62. package/lib/theme/themeTokens.js +38 -38
  63. package/lib/theme/themes/{loopTheme.d.ts → agentTheme.d.ts} +5 -5
  64. package/lib/theme/themes/{loopTheme.js → agentTheme.js} +11 -11
  65. package/lib/theme/themes/{loopThemeStyles.d.ts → agentThemeStyles.d.ts} +21 -21
  66. package/lib/theme/themes/{loopThemeStyles.js → agentThemeStyles.js} +175 -175
  67. package/lib/theme/themes/ivoryThemeStyles.d.ts +1 -1
  68. package/lib/theme/themes/ivoryThemeStyles.js +1 -1
  69. package/lib/theme/themes/metalThemeStyles.d.ts +1 -1
  70. package/lib/theme/themes/metalThemeStyles.js +25 -25
  71. package/lib/theme/themes/roundedShape.d.ts +2 -2
  72. package/lib/theme/themes/roundedShape.js +9 -9
  73. package/lib/theme/themes/sandThemeStyles.d.ts +1 -1
  74. package/lib/theme/themes/sandThemeStyles.js +1 -1
  75. package/lib/theme/themes/sunThemeStyles.d.ts +1 -1
  76. package/lib/theme/themes/sunThemeStyles.js +1 -1
  77. package/lib/theme/useThemeStore.d.ts +6 -0
  78. package/lib/theme/useThemeStore.js +29 -6
  79. package/lib/utils/Portals.d.ts +1 -1
  80. package/lib/utils/Portals.js +1 -1
  81. package/package.json +1 -1
  82. package/style/{loop-face.css → agent-face.css} +2 -2
package/README.md CHANGED
@@ -38,7 +38,7 @@ This project has been [shared in a discussion](https://github.com/primer/react/d
38
38
  The components use the active theme's semantic tokens rather than fixed
39
39
  visual values. For example, toolbar icon buttons and dropdown triggers read
40
40
  `--theme-radius-control`: they retain the regular Primer corner in the default
41
- themes and become fully rounded controls in `loop`.
41
+ themes and become fully rounded controls in `agent`.
42
42
 
43
43
  ### Toolbar overflow
44
44
 
@@ -82,7 +82,7 @@ import { AppearancePlugin, PageLayoutPlugin, ThemePlugin } from '@datalayer/prim
82
82
 
83
83
  - `ThemePlugin` keeps Primer's portals in the application's color mode and toggles that mode by command (`Mod+Alt+C`).
84
84
  - `AppearancePlugin` puts the appearance menu — color mode, theme, the theme's description and a preview of it, the control the Datalayer header wears — in a slot, `header` by default, and brings `ThemePlugin` along as a dependency.
85
- - `PageLayoutPlugin` arranges a host's slots as a page: what plugins put in `page` lies on a centred sheet over a quiet canvas, `page-band` is docked above it at the sheet's width (or floats over it as a card), `page-chips` sit under the band, and `page-panel` is a side panel opened from a toggle in the header. The layout (`PageLayout`), its toggle and its signals (`pageLayoutPanelOpen`, `openPagePanel()`…) are exported too, for a host that wires the parts itself — the Loop of `@datalayer/agent-runtimes` does, with the notebook as the page and the conversation as the panel.
85
+ - `PageLayoutPlugin` arranges a host's slots as a page: what plugins put in `page` lies on a centred sheet over a quiet canvas, `page-band` is docked above it at the sheet's width (or floats over it as a card), `page-chips` sit under the band, and `page-panel` is a side panel opened from a toggle in the header. The layout (`PageLayout`), its toggle and its signals (`pageLayoutPanelOpen`, `openPagePanel()`…) are exported too, for a host that wires the parts itself — the Agent of `@datalayer/agent-runtimes` does, with the notebook as the page and the conversation as the panel.
86
86
 
87
87
  The [gallery example](examples/gallery) is a Reactor app built on the three: `npm run gallery` locally, live at https://primer-addons.datalayer.tech.
88
88
 
@@ -105,7 +105,7 @@ import { Box } from '@datalayer/primer-addons';
105
105
  </Box>
106
106
  ```
107
107
 
108
- - **Tokens are Primer's CSS variables, with no fallback.** A colour path is the variable Primer's own theme reads first for it (`bg="canvas.subtle"` is `var(--bgColor-muted)`, `borderColor="border.default"` is `var(--borderColor-default)`, `boxShadow="shadow.medium"` is `var(--shadow-resting-medium)`); a radius by name is Primer's (`small`, `medium`, `large`, `full`) or the theme's shape (`control`, `card`, `bubble`, `frame`); a weight by name is the theme's weight variable. Space, font sizes, radii by index and sizes are Primer's theme scales in pixels (`p={3}` is 16px). The theme provider sets every variable `Box` emits, in every theme — a test holds it — so a theme that wants another hairline or corner sets it on Primer's variable (the `loop` theme's hairline is its `--borderColor-default`, its card corner its `--borderRadius-large`), never a call site with `var(--loop-…, var(--…))`.
108
+ - **Tokens are Primer's CSS variables, with no fallback.** A colour path is the variable Primer's own theme reads first for it (`bg="canvas.subtle"` is `var(--bgColor-muted)`, `borderColor="border.default"` is `var(--borderColor-default)`, `boxShadow="shadow.medium"` is `var(--shadow-resting-medium)`); a radius by name is Primer's (`small`, `medium`, `large`, `full`) or the theme's shape (`control`, `card`, `bubble`, `frame`); a weight by name is the theme's weight variable. Space, font sizes, radii by index and sizes are Primer's theme scales in pixels (`p={3}` is 16px). The theme provider sets every variable `Box` emits, in every theme — a test holds it — so a theme that wants another hairline or corner sets it on Primer's variable (the `agent` theme's hairline is its `--borderColor-default`, its card corner its `--borderRadius-large`), never a call site with `var(--agent-…, var(--…))`.
109
109
  - **Responsive values** are one per breakpoint, Primer's (544, 768, 1012, 1280px), `null` to skip one.
110
110
  - **States** take a style of their own: `hover`, `focus`, `focusVisible`, `focusWithin`, `active`, and `reducedMotion`.
111
111
  - **One class per style.** The props are resolved and hashed into one class whose rules are inserted once into a stylesheet of the document, or of the shadow root the element is in. No styled-components: this package's own copy once shipped beside Primer's and, wherever a bundler did not dedupe them, `Box` rendered with no theme.
@@ -115,7 +115,7 @@ The sources: `src/components/box/Box.tsx` (the design), `boxCss.ts` (the props a
115
115
 
116
116
  ## Theme accents
117
117
 
118
- Six soft accents, and an application takes one — **over any theme**: `datalayer`, `spatial`, `lovely`, `matrix`, `earth`, `sand`, `ivory`, `sun` and `loop` alike (decided 2026-10-07; they coloured `loop` alone before). The [gallery](examples/gallery)'s *Theme Accents* page shows the six in whatever theme and colour mode the gallery wears, beside the theme's own, with its tokens read back. Each is five values — the accent, the text that sits on it, the **stage** (the tint behind a hosted application), a **quiet** tint (the agent's bubble, a draft) and the accent **as text** (a link, a suggested question) — the last three each with a light and a dark value.
118
+ Six soft accents, and an application takes one — **over any theme**: `datalayer`, `spatial`, `lovely`, `matrix`, `earth`, `sand`, `ivory`, `sun` and `agent` alike (decided 2026-10-07; they coloured `agent` alone before). The [gallery](examples/gallery)'s *Theme Accents* page shows the six in whatever theme and colour mode the gallery wears, beside the theme's own, with its tokens read back. Each is five values — the accent, the text that sits on it, the **stage** (the tint behind a hosted application), a **quiet** tint (the agent's bubble, a draft) and the accent **as text** (a link, a suggested question) — the last three each with a light and a dark value.
119
119
 
120
120
  | Name | Accent | Text on it | Stage (light / dark) | Quiet (light / dark) | As text (light / dark) |
121
121
  |---|---|---|---|---|---|
@@ -128,7 +128,7 @@ Six soft accents, and an application takes one — **over any theme**: `datalaye
128
128
 
129
129
  `themeAccents` holds them, `themeAccentNames` lists them in the order a picker shows them (type `ThemeAccentName`), and `themeAccentVars(name, mode)` turns one into everything it colours, as custom properties an application sets on its root:
130
130
 
131
- - the accent's own, which **every theme sets** (its default from its own colours — its accent fill, the text of its filled button, its subtle accent tint as the stage, its subtle canvas as the quiet tint; `loop`'s are mint's): `--theme-accent`, `--theme-accent-on`, `--theme-stage`, `--theme-quiet`, and `--theme-stage-gradient`, the stage lit from the stage tint at the top to the quiet tint at the bottom;
131
+ - the accent's own, which **every theme sets** (its default from its own colours — its accent fill, the text of its filled button, its subtle accent tint as the stage, its subtle canvas as the quiet tint; `agent`'s are mint's): `--theme-accent`, `--theme-accent-on`, `--theme-stage`, `--theme-quiet`, and `--theme-stage-gradient`, the stage lit from the stage tint at the top to the quiet tint at the bottom;
132
132
  - Primer's accent: `--bgColor-accent-emphasis`, `--borderColor-accent-emphasis`, `--fgColor-accent`, `--fgColor-link`, `--borderColor-accent-muted`, `--bgColor-accent-muted`, and `--datalayer-icon-fg`;
133
133
  - the filled button: `--button-primary-bgColor-rest`, `-hover`, `-active`, their borders, `--button-primary-fgColor-rest`, `--button-primary-iconColor-rest`, `--buttonCounter-primary-fgColor-rest`, and the legacy `--color-btn-primary-bg`, `--color-btn-primary-hover-bg`;
134
134
  - a checked switch: `--control-checked-bgColor-rest`, `-hover`, `-active`, `--control-checked-fgColor-rest`, `--controlKnob-borderColor-checked`;
@@ -136,7 +136,7 @@ Six soft accents, and an application takes one — **over any theme**: `datalaye
136
136
 
137
137
  So nothing on an application's page keeps the theme's default accent beside its own. The theme's focus ring (`--focus-outlineColor`) is kept: it is drawn to show around every accent. An unknown name is refused.
138
138
 
139
- An application names its accent in its Appspec, as `interface.accent` (one of the six names), and its host applies it, whatever theme the application wears. An application that names none is not recoloured: it wears its theme's own colours — mint in `loop` (decided 2026-10-07).
139
+ An application names its accent in its Appspec, as `interface.accent` (one of the six names), and its host applies it, whatever theme the application wears. An application that names none is not recoloured: it wears its theme's own colours — mint in `agent` (decided 2026-10-07).
140
140
 
141
141
  ```tsx
142
142
  import { getThemeConfig, themeAccentVars } from '@datalayer/primer-addons';
@@ -184,25 +184,25 @@ isHexColor('#abc'); // true
184
184
 
185
185
  The source: `src/theme/palettes/ColorPalette.tsx` and `src/theme/colors/hueColors.ts`.
186
186
 
187
- ## The `loop` theme
187
+ ## The `agent` theme
188
188
 
189
- `loop` is one of the variants of the theme registry (`ThemeVariant`, `themeConfigs`), beside `datalayer`, `spatial`, `lovely`, `matrix`, `earth`, `sand`, `ivory` and `sun`: the look of an application built in LOOP — **one accent, neutral everything else**. A white (near-black in dark mode) canvas, a deep-grey ink, hairlines, soft shadows, round corners and one filled button in the accent. Success, attention and danger are kept for verdicts and rules only. The [gallery](examples/gallery) shows it on the *Theme Accents* page when the gallery wears it. Its accent is mint, `green` of the [theme accents](#theme-accents).
189
+ `agent` is one of the variants of the theme registry (`ThemeVariant`, `themeConfigs`), beside `datalayer`, `spatial`, `lovely`, `matrix`, `earth`, `sand`, `ivory` and `sun`: the look of an Agent application — **one accent, neutral everything else**. A white (near-black in dark mode) canvas, a deep-grey ink, hairlines, soft shadows, round corners and one filled button in the accent. Success, attention and danger are kept for verdicts and rules only. The [gallery](examples/gallery) shows it on the *Theme Accents* page when the gallery wears it. Its accent is mint, `green` of the [theme accents](#theme-accents).
190
190
 
191
191
  ```tsx
192
- import { DatalayerThemeProvider, loopTheme, loopThemeStyles } from '@datalayer/primer-addons';
192
+ import { DatalayerThemeProvider, agentTheme, agentThemeStyles } from '@datalayer/primer-addons';
193
193
 
194
- <DatalayerThemeProvider theme={loopTheme} themeStyles={loopThemeStyles} colorMode="auto">
194
+ <DatalayerThemeProvider theme={agentTheme} themeStyles={agentThemeStyles} colorMode="auto">
195
195
  {app}
196
196
  </DatalayerThemeProvider>
197
197
  ```
198
198
 
199
- The sources: `src/theme/colors/loopColors.ts` (colours), `src/theme/themes/loopTheme.ts` (the theme), `src/theme/css/createThemeCSSVars.ts` (what every theme sets), `src/theme/DatalayerThemeProvider.tsx` and `src/utils/Portals.tsx` (how a theme's stylesheet is applied).
199
+ The sources: `src/theme/colors/agentColors.ts` (colours), `src/theme/themes/agentTheme.ts` (the theme), `src/theme/css/createThemeCSSVars.ts` (what every theme sets), `src/theme/DatalayerThemeProvider.tsx` and `src/utils/Portals.tsx` (how a theme's stylesheet is applied).
200
200
 
201
201
  ### Shape, shadow, type and motion
202
202
 
203
203
  **Every theme** sets these, so that a component reads its shape — and how a link reads in a message — the way it reads its colour (`shapeVars`, `DEFAULT_THEME_SHAPE`). The eight other themes take the defaults — today's corners and no motion at all — and keep every other value they had, which `themeShape.test.ts` holds by a snapshot of each.
204
204
 
205
- | Token | Default (every other theme) | `loop` |
205
+ | Token | Default (every other theme) | `agent` |
206
206
  |---|---|---|
207
207
  | `--theme-radius-control` | `var(--borderRadius-medium, 6px)` | `999px` |
208
208
  | `--theme-radius-card` | `var(--borderRadius-medium, 6px)` | `20px` |
@@ -216,25 +216,25 @@ The sources: `src/theme/colors/loopColors.ts` (colours), `src/theme/themes/loopT
216
216
  | `--theme-motion-easing` | `ease` | `cubic-bezier(0.2, 0, 0, 1)` |
217
217
  | `--theme-message-link` | `var(--fgColor-accent, #0969da)` | `currentColor`: a link in a message is plain, the colour of its words, and underlined |
218
218
 
219
- **The `loop` theme's own**, beside them (`loopShapeVars`, `loopShadows`, `loopMotionVars`, `loopTypeVars`):
219
+ **The `agent` theme's own**, beside them (`agentShapeVars`, `agentShadows`, `agentMotionVars`, `agentTypeVars`):
220
220
 
221
- - **Radii**: `--loop-radius-control` (999px), `--loop-radius-card` (20px), `--loop-radius-bubble` (22px), `--loop-radius-frame` (28px); Primer's own `--borderRadius-small`, `-medium`, `-large` are made rounder (10, 14, 20px).
222
- - **The face** of an application, at three sizes and no other: `--loop-face-large` (72px, a page), `--loop-face-medium` (40px, a header or a card), `--loop-face-small` (20px, a line of a list).
223
- - **Shadow**: one level, `--loop-shadow-frame`. In light mode a surface floats on a soft, low shadow; in dark mode, where a shadow shows little, on a hairline of light and a deeper shadow. Primer's `--shadow-resting-*` and `--shadow-floating-*` take the same hand, so a menu or a dialog floats as a frame does. `--loop-hairline` is the line between two surfaces (7% of the ink in light, 10% of white in dark).
224
- - **Motion**: three durations for three things — `--loop-motion-status` (a status changing), `--loop-motion-message` (a message arriving), `--loop-motion-pane` (a pane opening) — and one easing, `--loop-motion-easing`. Nothing else moves; a component honours `prefers-reduced-motion` itself.
225
- - **Type**: one face, Inter — open licence (SIL OFL 1.1) and variable — then a metric-matched fallback, then the system sans-serif (`loopFontFamily`: `"Inter Variable", "Inter Fallback", ui-sans-serif, system-ui, …`). Two weights, 400 and 600 (`loopFontWeights`; Primer's light weight is 400 and its medium 600), and five sizes, one line-height for each (`loopTypeScale`, every line a multiple of 4px): 2rem/1.25 (display, title large), 1.25rem/1.4 (title medium, subtitle), 1rem/1.5 (title small, body large), 0.875rem/1.4286 (body medium, the theme's body), 0.75rem/1.3333 (body small, caption) — set on Primer's shorthands and on its size and line-height tokens alike, and held by `loopType.test.ts`. The titles are set tighter and the tracking is a token a component applies: `--loop-tracking-display` (-0.02em), `--loop-tracking-title` (-0.012em), `--loop-tracking-body` (0).
226
- - **The face, from the page's own origin**: a page wearing the theme imports `@datalayer/primer-addons/style/loop-face.css` once. It declares `Inter Variable` from `@fontsource-variable/inter` — the upright variable file, latin and latin-ext only, `font-display: swap` — which the page's bundler emits as its own asset, so the face is fetched from the page's origin and never from a third party; and `Inter Fallback`, a local Arial (or Liberation Sans or Arimo, metric-compatible with it) drawn to Inter's measure — `size-adjust: 107.4%`, `ascent-override: 90.2%`, `descent-override: 22.48%`, `line-gap-override: 0%`, next/font's values for Inter, computed by Capsize — so the text paints in the fallback first and does not move when Inter arrives. A page that does not import it shows the system face.
221
+ - **Radii**: `--agent-radius-control` (999px), `--agent-radius-card` (20px), `--agent-radius-bubble` (22px), `--agent-radius-frame` (28px); Primer's own `--borderRadius-small`, `-medium`, `-large` are made rounder (10, 14, 20px).
222
+ - **The face** of an application, at three sizes and no other: `--agent-face-large` (72px, a page), `--agent-face-medium` (40px, a header or a card), `--agent-face-small` (20px, a line of a list).
223
+ - **Shadow**: one level, `--agent-shadow-frame`. In light mode a surface floats on a soft, low shadow; in dark mode, where a shadow shows little, on a hairline of light and a deeper shadow. Primer's `--shadow-resting-*` and `--shadow-floating-*` take the same hand, so a menu or a dialog floats as a frame does. `--agent-hairline` is the line between two surfaces (7% of the ink in light, 10% of white in dark).
224
+ - **Motion**: three durations for three things — `--agent-motion-status` (a status changing), `--agent-motion-message` (a message arriving), `--agent-motion-pane` (a pane opening) — and one easing, `--agent-motion-easing`. Nothing else moves; a component honours `prefers-reduced-motion` itself.
225
+ - **Type**: one face, Inter — open licence (SIL OFL 1.1) and variable — then a metric-matched fallback, then the system sans-serif (`agentFontFamily`: `"Inter Variable", "Inter Fallback", ui-sans-serif, system-ui, …`). Two weights, 400 and 600 (`agentFontWeights`; Primer's light weight is 400 and its medium 600), and five sizes, one line-height for each (`agentTypeScale`, every line a multiple of 4px): 2rem/1.25 (display, title large), 1.25rem/1.4 (title medium, subtitle), 1rem/1.5 (title small, body large), 0.875rem/1.4286 (body medium, the theme's body), 0.75rem/1.3333 (body small, caption) — set on Primer's shorthands and on its size and line-height tokens alike, and held by `agentType.test.ts`. The titles are set tighter and the tracking is a token a component applies: `--agent-tracking-display` (-0.02em), `--agent-tracking-title` (-0.012em), `--agent-tracking-body` (0).
226
+ - **The face, from the page's own origin**: a page wearing the theme imports `@datalayer/primer-addons/style/agent-face.css` once. It declares `Inter Variable` from `@fontsource-variable/inter` — the upright variable file, latin and latin-ext only, `font-display: swap` — which the page's bundler emits as its own asset, so the face is fetched from the page's origin and never from a third party; and `Inter Fallback`, a local Arial (or Liberation Sans or Arimo, metric-compatible with it) drawn to Inter's measure — `size-adjust: 107.4%`, `ascent-override: 90.2%`, `descent-override: 22.48%`, `line-gap-override: 0%`, next/font's values for Inter, computed by Capsize — so the text paints in the fallback first and does not move when Inter arrives. A page that does not import it shows the system face.
227
227
  - **Space**: no scale of its own — Primer's, in steps of 4 and 8 (`sx` 1 to 6 are 4, 8, 16, 24, 32, 40px), and the air of the look comes from where it is spent: a frame 24px from the edge of its stage, 16px inside a conversation (the header, the messages, the composer), 24px around a pane of work, 8px between two pills, and one hairline (`--theme-hairline`) where two surfaces meet instead of a gap and a border.
228
- - **The stage, lit**: `--theme-stage-gradient`, from the stage tint at the top to the quiet tint at the bottom, both the accent's — mint's in `loop` (every theme sets it, see [Theme accents](#theme-accents)).
228
+ - **The stage, lit**: `--theme-stage-gradient`, from the stage tint at the top to the quiet tint at the bottom, both the accent's — mint's in `agent` (every theme sets it, see [Theme accents](#theme-accents)).
229
229
  - **The focus ring**: `--focus-outlineColor`, the deep mint `#0F6B4F` in light mode and a mid grey `#636363` in dark mode.
230
230
 
231
231
  ### The reference screens
232
232
 
233
- The tokens above are drawn together on four reference screens (LOOP T-01) — **a conversation**, **a conversation beside its work**, **the activity of a worker** and **an approval** — each in the nine themes of the registry and in both modes. They are built from the real chat components of `@datalayer/agent-runtimes`, which depends on this package, so they live there: as stories (`src/stories/loop/LoopReference.stories.tsx`, *Loop/Reference screens*) and as pictures that a test compares in Chrome (`npm run test:pictures` in agent-runtimes, T-16; `TESTING.md` there says how to run it and how to accept a change). A change of token here shows there as a picture that differs: accept it, or fix it.
233
+ The tokens above are drawn together on four reference screens — **a conversation**, **a conversation beside its work**, **the activity of a worker** and **an approval** — each in the nine themes of the registry and in both modes. They are built from the real chat components of `@datalayer/agent-runtimes`, which depends on this package, so they live there: as stories (`src/stories/agent/AgentReference.stories.tsx`, *Agent/Reference screens*) and as pictures that a test compares in Chrome (`npm run test:pictures` in agent-runtimes; `TESTING.md` there says how to run it and how to accept a change). A change of token here shows there as a picture that differs: accept it, or fix it.
234
234
 
235
235
  ### The controls, as pills
236
236
 
237
- Every Primer control takes its corners from one token, `--borderRadius-medium`, which cards and list items take too — so "the controls alone are pills" cannot be said with a custom property. A theme may therefore carry **a stylesheet of its own**, `ThemeStyles.css`, written relative to `:scope` (`buildThemeStyles(light, dark, { css })`). `loop` is the only theme that has one (`loopControlsCss`): buttons, text inputs, selects, segmented controls, button groups (their two ends), toggle switches and underline tabs are pills; a multi-line text area keeps `--borderRadius-medium`, and menus and overlays keep the card's radius. The selectors match the stable prefixes of Primer's class names (`loopControlsSelectors`), and a test reads each back from the installed `@primer/react`, so an upgrade that renames one fails the build.
237
+ Every Primer control takes its corners from one token, `--borderRadius-medium`, which cards and list items take too — so "the controls alone are pills" cannot be said with a custom property. A theme may therefore carry **a stylesheet of its own**, `ThemeStyles.css`, written relative to `:scope` (`buildThemeStyles(light, dark, { css })`). `agent` is the only theme that has one (`agentControlsCss`): buttons, text inputs, selects, segmented controls, button groups (their two ends), toggle switches and underline tabs are pills; a multi-line text area keeps `--borderRadius-medium`, and menus and overlays keep the card's radius. The selectors match the stable prefixes of Primer's class names (`agentControlsSelectors`), and a test reads each back from the installed `@primer/react`, so an upgrade that renames one fails the build.
238
238
 
239
239
  How `DatalayerThemeProvider` applies it:
240
240
 
@@ -246,24 +246,24 @@ How `DatalayerThemeProvider` applies it:
246
246
 
247
247
  ### The rules of clean
248
248
 
249
- The look is kept by eight rules, written here once and applied to every screen in review (LOOP T-17, Q-09) — a screen that breaks one is changed, or the rule is, never let through as an exception:
249
+ The look is kept by eight rules, written here once and applied to every screen in review — a screen that breaks one is changed, or the rule is, never let through as an exception:
250
250
 
251
251
  1. **One accent per application.** Its own (`interface.accent`), on everything the accent colours (`themeAccentVars`); never a second hue beside it. Success, attention and danger are a verdict's colours, and only a verdict's.
252
252
  2. **No gradient on a surface.** A frame, a card, a bubble, a pill, a button and a menu are flat. The one gradient is the stage behind the frame, lit by the accent's own two tints (`--theme-stage-gradient`), and a stage may as well be flat (`--theme-stage`).
253
- 3. **No border where space separates.** Air first; where two surfaces meet, one hairline (`--theme-hairline`, `--loop-hairline`), never a gap and a border both, never a box drawn round a group that space already groups.
254
- 4. **No shadow beyond the one level.** `--loop-shadow-frame` (`--theme-shadow`): a frame, a menu and a dialog float on it; nothing else has a shadow of its own.
255
- 5. **Two weights.** 400 and 600 (`loopFontWeights`), in the five sizes of `loopTypeScale` — by name in `sx` too, where `loopTheme.fontWeights` makes Primer's `light` and `normal` the 400, `semibold` and `bold` the 600.
253
+ 3. **No border where space separates.** Air first; where two surfaces meet, one hairline (`--theme-hairline`, `--agent-hairline`), never a gap and a border both, never a box drawn round a group that space already groups.
254
+ 4. **No shadow beyond the one level.** `--agent-shadow-frame` (`--theme-shadow`): a frame, a menu and a dialog float on it; nothing else has a shadow of its own.
255
+ 5. **Two weights.** 400 and 600 (`agentFontWeights`), in the five sizes of `agentTypeScale` — by name in `sx` too, where `agentTheme.fontWeights` makes Primer's `light` and `normal` the 400, `semibold` and `bold` the 600.
256
256
  6. **One filled button per screen.** The action that matters is the filled pill in the accent; every other is quiet — outlined, or invisible until hovered.
257
257
  7. **A control is a line icon.** Octicons, at one weight, in the ink: no colour on a control, no emoji on a button.
258
- 8. **An identity is an emoji.** An application, an agent and a character are shown by their face (the emoji or the drawing of T-19), never by a line icon.
258
+ 8. **An identity is an emoji.** An application, an agent and a character are shown by their face (the emoji or its drawing), never by a line icon.
259
259
 
260
260
  Motion obeys the same spirit: three things move — a message arriving, a status changing, a pane opening — at `--theme-motion-message`, `-status` and `-pane`, and nothing else does.
261
261
 
262
- What a test can hold, a test holds: no gradient but the stage's, the one shadow a component asks the theme for, two weights (the tokens and `sx`'s names) and a link plain in a message (`loopClean.test.ts`); the sizes (`loopType.test.ts`); the three durations (`loopContrast.test.ts`); the pills (`themeStylesheet.test.tsx`); in the products that wear the theme, the screens' colours are scanned against these rules too (the landing's `studioVerdictColors.spec.ts`). The rest — space against borders, one filled button — is the reviewer's, against the reference screens (T-16).
262
+ What a test can hold, a test holds: no gradient but the stage's, the one shadow a component asks the theme for, two weights (the tokens and `sx`'s names) and a link plain in a message (`agentClean.test.ts`); the sizes (`agentType.test.ts`); the three durations (`agentContrast.test.ts`); the pills (`themeStylesheet.test.tsx`); in the products that wear the theme, the screens' colours are scanned against these rules too (the landing's `studioVerdictColors.spec.ts`). The rest — space against borders, one filled button — is the reviewer's, against the reference screens.
263
263
 
264
264
  ### Contrast, as tested
265
265
 
266
- `src/theme/__tests__/loopContrast.test.ts` fails the build when, for any of the six accents, in either mode:
266
+ `src/theme/__tests__/agentContrast.test.ts` fails the build when, for any of the six accents, in either mode:
267
267
 
268
268
  - the text on a bubble and on a filled pill (the accent's `on` on the accent) is under **4.5 to 1** (WCAG AA for body text);
269
269
  - the ink on the stage or on the quiet tint, light and dark, is under 4.5 to 1;
@@ -276,9 +276,9 @@ The same test holds the motion to three durations and one easing.
276
276
 
277
277
  ### What a host may override
278
278
 
279
- Today a host overrides through the provider: `baseStyles` is merged on top of the theme's properties, so it may set an accent (`themeAccentVars`), or any `--loop-*` or `--theme-*` property, for the element and — for the outermost provider — the portal root; and it may pass a theme of its own to `themeStyles`, built with `buildThemeStyles`. A person's choice in an appearance menu (`useThemeStore`) is the host's to honour.
279
+ Today a host overrides through the provider: `baseStyles` is merged on top of the theme's properties, so it may set an accent (`themeAccentVars`), or any `--agent-*` or `--theme-*` property, for the element and — for the outermost provider — the portal root; and it may pass a theme of its own to `themeStyles`, built with `buildThemeStyles`. A person's choice in an appearance menu (`useThemeStore`) is the host's to honour.
280
280
 
281
- **Not built yet** (LOOP T-13): the theme travelling inside an embedded application's web component as CSS variables isolated from the host page's styles, with the accent, the face and the mode as the only things the host overrides. Until then an embedded application is themed as any React tree under `DatalayerThemeProvider` is, and the host page's own CSS is not kept out.
281
+ **Not built yet**: the theme travelling inside an embedded application's web component as CSS variables isolated from the host page's styles, with the accent, the face and the mode as the only things the host overrides. Until then an embedded application is themed as any React tree under `DatalayerThemeProvider` is, and the host page's own CSS is not kept out.
282
282
 
283
283
  ## Develop
284
284
 
@@ -324,4 +324,4 @@ npm dev
324
324
 
325
325
  Primer Addons is released in [Npm.js](https://www.npmjs.com/package/@datalayer/primer-addons).
326
326
 
327
- What each version brought, with the LOOP boxes it carries, is in the [changelog](CHANGELOG.md).
327
+ What each version brought is in the [changelog](CHANGELOG.md).
@@ -118,7 +118,7 @@ export function AppearanceControls({ withStore = true, useStore = useThemeStore,
118
118
  display: "grid",
119
119
  gap: 1,
120
120
  }, children: [_jsx(Box, { sx: { fontSize: 1, fontWeight: "semibold", color: "fg.default" }, children: selectedTheme.label }), _jsx(Box, { sx: { fontSize: 0, color: "fg.muted", lineHeight: 1.5 }, children: selectedTheme.description }), _jsx(Box, { sx: { mt: 1 }, children: _jsx(Button, { size: "small", onClick: () => setIsPreviewOpen((open) => !open), "aria-expanded": isPreviewOpen,
121
- // The theme's control corner (Loop's pill), wherever the menu is drawn.
121
+ // The theme's control corner (Agent's pill), wherever the menu is drawn.
122
122
  sx: { borderRadius: "var(--theme-radius-control, 6px)" }, children: isPreviewOpen ? "Hide preview" : "Show preview" }) })] }), isPreviewOpen ? (_jsxs(_Fragment, { children: [_jsx(ThemePreviewCard, { variant: themeVariant, colorMode: colorMode, compact: true, showDescription: true }), _jsx(ThemePalettePreview, { variant: themeVariant, colorMode: colorMode })] })) : null] })) : (_jsx(Box, { sx: {
123
123
  px: 2,
124
124
  // First in the controls when the colour mode is hidden.
@@ -52,7 +52,7 @@ export declare const Default: Story;
52
52
  export declare const CircleWithoutPreviews: Story;
53
53
  /**
54
54
  * The colour mode alone: light, dark and auto, no theme swatches — the menu
55
- * of a site that wears one theme (the Datalayer landing, on loop).
55
+ * of a site that wears one theme (the Datalayer landing, on agent).
56
56
  */
57
57
  export declare const ColorModeOnly: Story;
58
58
  /**
@@ -77,11 +77,11 @@ export const CircleWithoutPreviews = {
77
77
  };
78
78
  /**
79
79
  * The colour mode alone: light, dark and auto, no theme swatches — the menu
80
- * of a site that wears one theme (the Datalayer landing, on loop).
80
+ * of a site that wears one theme (the Datalayer landing, on agent).
81
81
  */
82
82
  export const ColorModeOnly = {
83
83
  args: {
84
- themeVariant: "loop",
84
+ themeVariant: "agent",
85
85
  colorMode: "dark",
86
86
  showThemeChooser: false,
87
87
  },
@@ -29,6 +29,6 @@ export declare const ActiveTheme: Story;
29
29
  /** A room of five: each person's colour is a stable hash of who they are. */
30
30
  export declare const ARoomOfFive: Story;
31
31
  /** One theme in one mode, whatever the page wears. */
32
- export declare const LoopDark: Story;
32
+ export declare const AgentDark: Story;
33
33
  /** What a caret and its name tag look like in a shared document. */
34
34
  export declare const Cursors: Story;
@@ -38,9 +38,9 @@ export const ARoomOfFive = {
38
38
  render: (args) => _jsx(ThemedCollaboratorPalette, { ...args }),
39
39
  };
40
40
  /** One theme in one mode, whatever the page wears. */
41
- export const LoopDark = {
41
+ export const AgentDark = {
42
42
  args: {
43
- variant: "loop",
43
+ variant: "agent",
44
44
  colorMode: "dark",
45
45
  people: ROOM,
46
46
  },
@@ -112,7 +112,7 @@ export function ColorModeCircle({ colorMode, onColorModeChange, size = 28, hover
112
112
  minWidth: size,
113
113
  width: size,
114
114
  height: size,
115
- // A control like the theme's others: round on Loop, square on VS Code.
115
+ // A control like the theme's others: round on Agent, square on VS Code.
116
116
  borderRadius: shape === 'circle' ? '50%' : 'var(--theme-radius-control, 6px)',
117
117
  display: 'inline-flex',
118
118
  alignItems: 'center',
@@ -154,7 +154,9 @@ export function ColorModeCircle({ colorMode, onColorModeChange, size = 28, hover
154
154
  bg: 'canvas.overlay',
155
155
  border: '1px solid',
156
156
  borderColor: 'border.default',
157
- borderRadius: 2,
157
+ // The panel is an overlay, so its shape belongs to the active
158
+ // theme (Metal and Agent are deliberately rounder than VS Code).
159
+ borderRadius: 'var(--theme-radius-overlay, 12px)',
158
160
  boxShadow: 'shadow.large',
159
161
  opacity: isHoverOpen ? 1 : 0,
160
162
  transform: isHoverOpen ? 'none' : isRight ? 'translateX(-6px)' : 'translateY(-6px)',
@@ -47,7 +47,7 @@ export const Default = {
47
47
  /** Cycling through a chosen few. */
48
48
  export const AFewThemes = {
49
49
  args: {
50
- themes: ["datalayer", "loop", "earth", "matrix"],
50
+ themes: ["datalayer", "agent", "earth", "matrix"],
51
51
  size: 36,
52
52
  },
53
53
  render: (args) => _jsx(ThemedThemeCircle, { ...args }),
@@ -20,7 +20,7 @@ export function ThemePreviewCard({ variant, colorMode, selected = false, onSelec
20
20
  display: 'flex',
21
21
  alignItems: 'center',
22
22
  gap: 1,
23
- // Clear of the card's corner, however round the theme draws it (Loop's).
23
+ // Clear of the card's corner, however round the theme draws it (Agent's).
24
24
  px: `calc(var(--theme-radius-card, 6px) / 2 + ${compact ? 6 : 8}px)`,
25
25
  py: compact ? '6px' : '8px',
26
26
  bg: 'canvas.default',
@@ -18,7 +18,7 @@ declare const meta: {
18
18
  };
19
19
  };
20
20
  args: {
21
- variant: "loop";
21
+ variant: "agent";
22
22
  colorMode: "light";
23
23
  selected: false;
24
24
  compact: false;
@@ -24,7 +24,7 @@ const meta = {
24
24
  },
25
25
  },
26
26
  args: {
27
- variant: "loop",
27
+ variant: "agent",
28
28
  colorMode: "light",
29
29
  selected: false,
30
30
  compact: false,
@@ -42,7 +42,7 @@
42
42
  * `boxShadow="shadow.medium"` is `var(--shadow-resting-medium)` — the table
43
43
  * is generated from Primer's color schemes (`boxTokens.ts`). A radius by
44
44
  * name is Primer's (`small`, `medium`, `large`, `full`) or the theme's shape
45
- * (`control`, `card`, `bubble`, `frame`, LOOP T-03); a font weight by name
45
+ * (`control`, `card`, `bubble`, `frame`); a font weight by name
46
46
  * is the theme's weight variable. Space, font sizes, radii by index and
47
47
  * sizes are Primer's theme scales, written as pixels: they are the same in
48
48
  * every theme and need no variable.
@@ -50,9 +50,9 @@
50
50
  * No fallback: a page is drawn by its theme, and the theme provider sets
51
51
  * every variable `Box` emits (`BOX_EMITTED_VARS`, proven by a test against
52
52
  * every theme). A theme that wants a different hairline or corner sets it
53
- * on Primer's variable — the `loop` theme's hairline *is* its
53
+ * on Primer's variable — the `agent` theme's hairline *is* its
54
54
  * `--borderColor-default` — never a call site with a
55
- * `var(--loop-…, var(--…))` chain.
55
+ * `var(--agent-…, var(--…))` chain.
56
56
  *
57
57
  * ## The implementation: one class per style, no styled-components
58
58
  *
@@ -47,7 +47,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
47
47
  * `boxShadow="shadow.medium"` is `var(--shadow-resting-medium)` — the table
48
48
  * is generated from Primer's color schemes (`boxTokens.ts`). A radius by
49
49
  * name is Primer's (`small`, `medium`, `large`, `full`) or the theme's shape
50
- * (`control`, `card`, `bubble`, `frame`, LOOP T-03); a font weight by name
50
+ * (`control`, `card`, `bubble`, `frame`); a font weight by name
51
51
  * is the theme's weight variable. Space, font sizes, radii by index and
52
52
  * sizes are Primer's theme scales, written as pixels: they are the same in
53
53
  * every theme and need no variable.
@@ -55,9 +55,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
55
55
  * No fallback: a page is drawn by its theme, and the theme provider sets
56
56
  * every variable `Box` emits (`BOX_EMITTED_VARS`, proven by a test against
57
57
  * every theme). A theme that wants a different hairline or corner sets it
58
- * on Primer's variable — the `loop` theme's hairline *is* its
58
+ * on Primer's variable — the `agent` theme's hairline *is* its
59
59
  * `--borderColor-default` — never a call site with a
60
- * `var(--loop-…, var(--…))` chain.
60
+ * `var(--agent-…, var(--…))` chain.
61
61
  *
62
62
  * ## The implementation: one class per style, no styled-components
63
63
  *
@@ -53,7 +53,7 @@ export declare const Default: Story;
53
53
  export declare const ACard: Story;
54
54
  /** Colour names are the theme's: `bg="canvas.subtle"` is `var(--bgColor-muted)`, `color="fg.muted"` is `var(--fgColor-muted)`. */
55
55
  export declare const Colours: Story;
56
- /** Corners by name: Primer's four, then the theme's shapes (rounder in `loop`). */
56
+ /** Corners by name: Primer's four, then the theme's shapes (rounder in `agent`). */
57
57
  export declare const Corners: Story;
58
58
  /** One value per breakpoint: one column on a phone, three on a desktop. */
59
59
  export declare const Responsive: Story;
@@ -77,7 +77,7 @@ export const Colours = {
77
77
  ["neutral.emphasis", "fg.onEmphasis"],
78
78
  ].map(([bg, color]) => (_jsx(Box, { p: 2, bg: bg, color: color, borderRadius: "medium", fontSize: 0, children: bg }, bg))) })),
79
79
  };
80
- /** Corners by name: Primer's four, then the theme's shapes (rounder in `loop`). */
80
+ /** Corners by name: Primer's four, then the theme's shapes (rounder in `agent`). */
81
81
  export const Corners = {
82
82
  render: () => (_jsx(Box, { p: 3, bg: "canvas.default", display: "flex", flexWrap: "wrap", gap: 3, children: [
83
83
  "small",
@@ -79,7 +79,7 @@ export declare const BOX_SPACE: readonly ["0", "4px", "8px", "16px", "24px", "32
79
79
  export declare const BOX_FONT_SIZES: readonly ["12px", "14px", "16px", "20px", "24px", "32px", "40px", "48px", "56px"];
80
80
  /** Primer's radii by index (`borderRadius={2}` is 6px). */
81
81
  export declare const BOX_RADII: readonly ["0", "3px", "6px", "100px"];
82
- /** Radii by name: Primer's, and the theme's shapes (LOOP T-03), an overlay's among them. */
82
+ /** Radii by name: Primer's, and the theme's shapes, an overlay's among them. */
83
83
  export declare const BOX_RADIUS_VARS: {
84
84
  readonly small: "--borderRadius-small";
85
85
  readonly medium: "--borderRadius-medium";
@@ -106,7 +106,7 @@ export declare const BOX_SIZES: {
106
106
  * names its weights 300, 400, 500, 600 — `light`, `normal`, `semibold`,
107
107
  * `bold` — which are the primitives' `light`, `normal`, `medium` and
108
108
  * `semibold`: so `semibold` is `--base-text-weight-medium` (500, and 600 in
109
- * the `loop` theme, which has two weights), as it reads today.
109
+ * the `agent` theme, which has two weights), as it reads today.
110
110
  */
111
111
  export declare const BOX_FONT_WEIGHT_VARS: {
112
112
  readonly light: "--base-text-weight-light";
@@ -81,7 +81,7 @@ export const BOX_SPACE = ['0', '4px', '8px', '16px', '24px', '32px', '40px', '48
81
81
  export const BOX_FONT_SIZES = ['12px', '14px', '16px', '20px', '24px', '32px', '40px', '48px', '56px'];
82
82
  /** Primer's radii by index (`borderRadius={2}` is 6px). */
83
83
  export const BOX_RADII = ['0', '3px', '6px', '100px'];
84
- /** Radii by name: Primer's, and the theme's shapes (LOOP T-03), an overlay's among them. */
84
+ /** Radii by name: Primer's, and the theme's shapes, an overlay's among them. */
85
85
  export const BOX_RADIUS_VARS = {
86
86
  small: '--borderRadius-small',
87
87
  medium: '--borderRadius-medium',
@@ -102,7 +102,7 @@ export const BOX_SIZES = { small: '544px', medium: '768px', large: '1012px', xla
102
102
  * names its weights 300, 400, 500, 600 — `light`, `normal`, `semibold`,
103
103
  * `bold` — which are the primitives' `light`, `normal`, `medium` and
104
104
  * `semibold`: so `semibold` is `--base-text-weight-medium` (500, and 600 in
105
- * the `loop` theme, which has two weights), as it reads today.
105
+ * the `agent` theme, which has two weights), as it reads today.
106
106
  */
107
107
  export const BOX_FONT_WEIGHT_VARS = {
108
108
  light: '--base-text-weight-light',
@@ -117,7 +117,7 @@ export function CalendarPicker({ value, defaultMonth, onChange, min, max, isDisa
117
117
  : isToday
118
118
  ? "var(--borderColor-default)"
119
119
  : "transparent",
120
- // The theme's control corner: a pill in loop, Primer's medium elsewhere.
120
+ // The theme's control corner: a pill in agent, Primer's medium elsewhere.
121
121
  borderRadius: "var(--theme-radius-control)",
122
122
  height: 30,
123
123
  cursor: disabled ? "not-allowed" : "pointer",
@@ -31,7 +31,7 @@ const surfaceStyle = (surface) => ({
31
31
  '--fgColor-muted': 'rgba(255, 255, 255, 0.85)',
32
32
  });
33
33
  /**
34
- * The corners, read from the theme: each theme sets Primer's radii (loop's
34
+ * The corners, read from the theme: each theme sets Primer's radii (agent's
35
35
  * are rounder), and a card left unsaid takes the theme's card corner.
36
36
  */
37
37
  const CARD_RADIUS = 'card';
@@ -48,7 +48,7 @@ export function ColorSwatch({ color, label, showValue = true, height = 54, }) {
48
48
  gridTemplateRows: `${height}px auto`,
49
49
  border: "1px solid",
50
50
  borderColor: "var(--borderColor-default)",
51
- // The theme's card corner: 20px in loop, Primer's medium elsewhere.
51
+ // The theme's card corner: 20px in agent, Primer's medium elsewhere.
52
52
  borderRadius: "var(--theme-radius-card)",
53
53
  overflow: "hidden",
54
54
  minWidth: 0,
@@ -17,7 +17,7 @@
17
17
  * profile's cards give one, with `fg.onEmphasis`.
18
18
  *
19
19
  * Its shape is the theme's too: a `circle` for a person, `rounded` for
20
- * anything else — the theme's medium corner (rounder in `loop`), never more
20
+ * anything else — the theme's medium corner (rounder in `agent`), never more
21
21
  * than a little over a quarter of the avatar, so a small one stays a square
22
22
  * with soft corners rather than turning into a circle.
23
23
  *
@@ -22,7 +22,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
22
22
  * profile's cards give one, with `fg.onEmphasis`.
23
23
  *
24
24
  * Its shape is the theme's too: a `circle` for a person, `rounded` for
25
- * anything else — the theme's medium corner (rounder in `loop`), never more
25
+ * anything else — the theme's medium corner (rounder in `agent`), never more
26
26
  * than a little over a quarter of the avatar, so a small one stays a square
27
27
  * with soft corners rather than turning into a circle.
28
28
  *
@@ -12,7 +12,7 @@
12
12
  * - its **chevron** opens the large one, `HoverCardDetails`, over the page.
13
13
  *
14
14
  * Drawn by the theme: it is a `Card`, so its corner is the theme's card
15
- * corner (rounder in `loop`, with nothing said here), its ground the
15
+ * corner (rounder in `agent`, with nothing said here), its ground the
16
16
  * overlay's, its hairline and shadow the theme's.
17
17
  *
18
18
  * @module components/hover-card/HoverCard
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  * Distributed under the terms of the Modified BSD License.
5
5
  */
6
6
  import { forwardRef, useId } from 'react';
7
- import { datalayerColors, spatialColors, lovelyColors, matrixColors, earthColors, sandColors, ivoryColors, sunColors, loopColors, metalColors, vscodeColors, } from '../../theme';
7
+ import { datalayerColors, spatialColors, lovelyColors, matrixColors, earthColors, sandColors, ivoryColors, sunColors, agentColors, metalColors, vscodeColors, } from '../../theme';
8
8
  /**
9
9
  * Gradient pattern derived from the original brand logo SVG:
10
10
  * - Left bars: accent → brand (bright → mid)
@@ -141,21 +141,21 @@ export const THEME_LOGO_COLORS = {
141
141
  secondaryGradient: [sunColors.sunHover, sunColors.sunAccent],
142
142
  },
143
143
  },
144
- loop: {
144
+ agent: {
145
145
  // Flat: the theme has no gradient on a surface.
146
146
  light: {
147
- primary: loopColors.loopAccent,
148
- secondary: loopColors.ink,
149
- textColor: loopColors.gray,
150
- primaryGradient: [loopColors.loopAccent, loopColors.loopAccent],
151
- secondaryGradient: [loopColors.ink, loopColors.ink],
147
+ primary: agentColors.agentAccent,
148
+ secondary: agentColors.ink,
149
+ textColor: agentColors.gray,
150
+ primaryGradient: [agentColors.agentAccent, agentColors.agentAccent],
151
+ secondaryGradient: [agentColors.ink, agentColors.ink],
152
152
  },
153
153
  dark: {
154
- primary: loopColors.loopBrand,
155
- secondary: loopColors.inkDark,
156
- textColor: loopColors.grayDark,
157
- primaryGradient: [loopColors.loopBrand, loopColors.loopBrand],
158
- secondaryGradient: [loopColors.inkDark, loopColors.inkDark],
154
+ primary: agentColors.agentBrand,
155
+ secondary: agentColors.inkDark,
156
+ textColor: agentColors.grayDark,
157
+ primaryGradient: [agentColors.agentBrand, agentColors.agentBrand],
158
+ secondaryGradient: [agentColors.inkDark, agentColors.inkDark],
159
159
  },
160
160
  },
161
161
  metal: {
@@ -34,7 +34,7 @@ export const Logo = {
34
34
  export const Gradient = {
35
35
  args: {
36
36
  gradient: true,
37
- variant: "loop",
37
+ variant: "agent",
38
38
  },
39
39
  render: (args) => (_jsx(Box, { p: 3, bg: "canvas.default", children: _jsx(DatalayerLogo, { ...args }) })),
40
40
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * `Sheet`: a page on a canvas — the canvas colour, its hairline, the theme's
3
- * card corner (20px in loop) and the shadow a sheet of paper has, lifted off
3
+ * card corner (20px in agent) and the shadow a sheet of paper has, lifted off
4
4
  * what is under it. The page layout draws its page with it; anything that
5
5
  * shows a page of its own (a document, a gallery entry, a preview) can too.
6
6
  *
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  */
6
6
  /**
7
7
  * `Sheet`: a page on a canvas — the canvas colour, its hairline, the theme's
8
- * card corner (20px in loop) and the shadow a sheet of paper has, lifted off
8
+ * card corner (20px in agent) and the shadow a sheet of paper has, lifted off
9
9
  * what is under it. The page layout draws its page with it; anything that
10
10
  * shows a page of its own (a document, a gallery entry, a preview) can too.
11
11
  *
@@ -7,6 +7,18 @@ import type { ToolbarProps, ToolbarItem } from "./types";
7
7
  * line first among equals — with every priority equal, the tail of the
8
8
  * line, as a reader expects.
9
9
  */
10
- export declare function overflowKeys(ordered: ToolbarItem[], widthOf: (key: string) => number, available: number, gap?: number, triggerWidth?: number): Set<string>;
11
- export declare function Toolbar({ items, extraItems, className, disabled, ariaLabel, overflow, variant, gap, overflowAriaLabel, keyboardNavigation, }: ToolbarProps): import("react").JSX.Element;
10
+ export declare function overflowKeys(ordered: ToolbarItem[], widthOf: (key: string) => number, available: number, gap?: number, triggerWidth?: number,
11
+ /**
12
+ * Whether an item is laid out on the line: one that draws nothing yet
13
+ * (a chip waiting for its data) is 0px wide and still takes its gap.
14
+ * Unsaid, an item 0px wide takes none.
15
+ */
16
+ laidOut?: (key: string) => boolean): Set<string>;
17
+ /**
18
+ * The least room a line needs: the items that never leave it — pinned, spacers at their minimum, and those laid
19
+ * out empty, which still take their gap — and, when any item can leave, the menu's button with its gap.
20
+ * Exported for tests.
21
+ */
22
+ export declare function minimumWidthOf(ordered: ToolbarItem[], widthOf: (key: string) => number, gap?: number, triggerWidth?: number, laidOut?: (key: string) => boolean): number;
23
+ export declare function Toolbar({ items, extraItems, className, disabled, ariaLabel, overflow, variant, gap, overflowAriaLabel, keyboardNavigation, onMinimumWidth, }: ToolbarProps): import("react").JSX.Element;
12
24
  export default Toolbar;