@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
@@ -48,7 +48,7 @@ import { useCallback, useLayoutEffect, useMemo, useRef, useState, } from "react"
48
48
  import { ActionMenu, IconButton } from "@primer/react";
49
49
  import { KebabHorizontalIcon } from "@primer/octicons-react";
50
50
  import { Box } from "../box/Box";
51
- import { ToolbarRenderer } from "./ToolbarRenderer";
51
+ import { SPACER_MIN_WIDTH, ToolbarRenderer } from "./ToolbarRenderer";
52
52
  /** Space between two items, as the flex `gap` below sets it, by default. */
53
53
  const ITEM_GAP = 2;
54
54
  /** Room kept at the end of the line for the button opening the rest. */
@@ -81,11 +81,25 @@ function tidyDividers(list) {
81
81
  * line first among equals — with every priority equal, the tail of the
82
82
  * line, as a reader expects.
83
83
  */
84
- export function overflowKeys(ordered, widthOf, available, gap = ITEM_GAP, triggerWidth = OVERFLOW_TRIGGER_WIDTH) {
84
+ export function overflowKeys(ordered, widthOf, available, gap = ITEM_GAP, triggerWidth = OVERFLOW_TRIGGER_WIDTH,
85
+ /**
86
+ * Whether an item is laid out on the line: one that draws nothing yet
87
+ * (a chip waiting for its data) is 0px wide and still takes its gap.
88
+ * Unsaid, an item 0px wide takes none.
89
+ */
90
+ laidOut) {
85
91
  const hidden = new Set();
86
- const widthOfItem = (item) => item.type === "spacer" ? 0 : widthOf(item.key);
92
+ // A spacer takes what is left, and never less than its minimum: that minimum, and its gap, are on the line
93
+ // whatever the room (the chat header's leading spacer, 8px and a gap, pushed its last button past the edge).
94
+ const widthOfItem = (item) => item.type === "spacer" ? SPACER_MIN_WIDTH : widthOf(item.key);
87
95
  const used = () => {
88
- const shown = ordered.filter((item) => !hidden.has(item.key) && widthOfItem(item) > 0);
96
+ // What the line holds, as the browser lays it out: a 0px item that is
97
+ // on the line takes its gap like any other (the Accountant's two empty
98
+ // chips pushed its last button 2px past the edge, 28 November 2026).
99
+ const shown = ordered.filter((item) => !hidden.has(item.key) &&
100
+ (item.type === "spacer" ||
101
+ widthOfItem(item) > 0 ||
102
+ laidOut?.(item.key) === true));
89
103
  const total = shown.reduce((sum, item) => sum + widthOfItem(item), 0);
90
104
  return (total +
91
105
  Math.max(0, shown.length - 1) * gap +
@@ -106,7 +120,22 @@ export function overflowKeys(ordered, widthOf, available, gap = ITEM_GAP, trigge
106
120
  }
107
121
  return hidden;
108
122
  }
109
- export function Toolbar({ items, extraItems, className, disabled, ariaLabel = "Editor toolbar", overflow = true, variant = "bar", gap = ITEM_GAP, overflowAriaLabel, keyboardNavigation = true, }) {
123
+ /**
124
+ * The least room a line needs: the items that never leave it — pinned, spacers at their minimum, and those laid
125
+ * out empty, which still take their gap — and, when any item can leave, the menu's button with its gap.
126
+ * Exported for tests.
127
+ */
128
+ export function minimumWidthOf(ordered, widthOf, gap = ITEM_GAP, triggerWidth = OVERFLOW_TRIGGER_WIDTH, laidOut) {
129
+ const width = (item) => (item.type === "spacer" ? SPACER_MIN_WIDTH : widthOf(item.key));
130
+ const stays = ordered.filter((item) => item.type === "spacer" ||
131
+ (item.pinned === true && width(item) > 0) ||
132
+ (width(item) === 0 && laidOut?.(item.key) === true));
133
+ const leaves = ordered.some((item) => !item.pinned && item.type !== "spacer" && width(item) > 0);
134
+ return (stays.reduce((sum, item) => sum + width(item), 0) +
135
+ Math.max(0, stays.length - 1) * gap +
136
+ (leaves ? gap + triggerWidth : 0));
137
+ }
138
+ export function Toolbar({ items, extraItems, className, disabled, ariaLabel = "Editor toolbar", overflow = true, variant = "bar", gap = ITEM_GAP, overflowAriaLabel, keyboardNavigation = true, onMinimumWidth, }) {
110
139
  const allItems = useMemo(() => {
111
140
  if (!extraItems?.length)
112
141
  return items;
@@ -138,6 +167,8 @@ export function Toolbar({ items, extraItems, className, disabled, ariaLabel = "E
138
167
  .sort((a, b) => (a.order ?? 100) - (b.order ?? 100)), [allItems]);
139
168
  const containerRef = useRef(null);
140
169
  const rowRef = useRef(null);
170
+ /** Room the line takes that the sum of its items does not account for. */
171
+ const unseen = useRef(0);
141
172
  /*
142
173
  * The width of every item, by key, measured while it was on the line.
143
174
  *
@@ -148,6 +179,11 @@ export function Toolbar({ items, extraItems, className, disabled, ariaLabel = "E
148
179
  */
149
180
  const widths = useRef(new Map());
150
181
  const [hiddenKeys, setHiddenKeys] = useState(() => new Set());
182
+ // What is off the line now, for the measurement to compare its answer with.
183
+ const hiddenNow = useRef(hiddenKeys);
184
+ hiddenNow.current = hiddenKeys;
185
+ // The least room last told to the host.
186
+ const minimumNow = useRef(-1);
151
187
  const [menuOpen, setMenuOpen] = useState(false);
152
188
  const keys = useMemo(() => ordered.map((item) => item.key).join("\u0000"), [ordered]);
153
189
  const measure = useCallback(() => {
@@ -166,12 +202,16 @@ export function Toolbar({ items, extraItems, className, disabled, ariaLabel = "E
166
202
  */
167
203
  // Read off the wrappers' attribute rather than built into a selector: a
168
204
  // key is the host's text, and `CSS.escape` is not everywhere (jsdom).
205
+ const onTheLine = new Set();
169
206
  row
170
207
  .querySelectorAll("[data-toolbar-key]")
171
208
  .forEach((node) => {
172
209
  const key = node.getAttribute("data-toolbar-key");
173
210
  if (key !== null) {
174
211
  widths.current.set(key, node.getBoundingClientRect().width);
212
+ if (getComputedStyle(node).display !== "none") {
213
+ onTheLine.add(key);
214
+ }
175
215
  }
176
216
  });
177
217
  const style = getComputedStyle(container);
@@ -196,15 +236,40 @@ export function Toolbar({ items, extraItems, className, disabled, ariaLabel = "E
196
236
  }
197
237
  // An item never measured is assumed to fit; the next pass, once it has
198
238
  // been on the line, knows better.
199
- const next = overflowKeys(ordered, (key) => widths.current.get(key) ?? 0, available, gap);
239
+ const widthOf = (key) => widths.current.get(key) ?? 0;
240
+ const laidOut = (key) => onTheLine.has(key);
241
+ /*
242
+ * The browser has the last word. Where the sum says the line fits and
243
+ * the line runs past the edge anyway (a gap or a margin the sum does
244
+ * not know of), the excess is remembered and taken off the room — kept
245
+ * until the items change, so that moving one into the menu, which ends
246
+ * the excess, does not bring it straight back.
247
+ */
248
+ let next = overflowKeys(ordered, widthOf, available - unseen.current, gap, undefined, laidOut);
249
+ // Read on the line itself: it shrinks beside the menu's button, and what runs past it runs under that button.
250
+ // Only when the sum agrees with what is drawn: mid-change, the line can still show the items the sum moved.
251
+ const excess = row.scrollWidth - row.clientWidth;
252
+ const agrees = next.size === hiddenNow.current.size &&
253
+ [...next].every((key) => hiddenNow.current.has(key));
254
+ if (agrees && excess > 0.5) {
255
+ unseen.current += excess;
256
+ next = overflowKeys(ordered, widthOf, available - unseen.current, gap, undefined, laidOut);
257
+ }
258
+ // The least room the line needs, told to the host when it changes.
259
+ const minimum = Math.ceil(minimumWidthOf(ordered, widthOf, gap, undefined, laidOut));
260
+ if (minimum !== minimumNow.current) {
261
+ minimumNow.current = minimum;
262
+ onMinimumWidth?.(minimum);
263
+ }
200
264
  setHiddenKeys((previous) => previous.size === next.size && [...next].every((key) => previous.has(key))
201
265
  ? previous
202
266
  : next);
203
- }, [ordered, gap]);
267
+ }, [ordered, gap, onMinimumWidth]);
204
268
  useLayoutEffect(() => {
205
269
  // A new set of items is shown whole first, so each one is measured on
206
270
  // the line before anything is taken off it.
207
271
  setHiddenKeys(new Set());
272
+ unseen.current = 0;
208
273
  }, [keys, overflow]);
209
274
  useLayoutEffect(() => {
210
275
  if (!overflow) {
@@ -229,7 +294,36 @@ export function Toolbar({ items, extraItems, className, disabled, ariaLabel = "E
229
294
  row
230
295
  .querySelectorAll("[data-toolbar-key]")
231
296
  .forEach((node) => observer.observe(node));
232
- return () => observer.disconnect();
297
+ /*
298
+ * And what changes without changing size: a chip that waits for its data
299
+ * is put on the line still 0px wide, which takes a gap and resizes
300
+ * nothing — the Accountant's two empty chips pushed the agent chooser
301
+ * past the edge on first load, unheard (28 November 2026).
302
+ */
303
+ let frame = 0;
304
+ const mutations = typeof MutationObserver === "undefined"
305
+ ? null
306
+ : new MutationObserver(() => {
307
+ if (frame === 0) {
308
+ frame = requestAnimationFrame(() => {
309
+ frame = 0;
310
+ measure();
311
+ });
312
+ }
313
+ });
314
+ mutations?.observe(row, {
315
+ subtree: true,
316
+ childList: true,
317
+ attributes: true,
318
+ attributeFilter: ["style", "class", "hidden"],
319
+ });
320
+ return () => {
321
+ observer.disconnect();
322
+ mutations?.disconnect();
323
+ if (frame !== 0) {
324
+ cancelAnimationFrame(frame);
325
+ }
326
+ };
233
327
  }, [measure, overflow, hiddenKeys]);
234
328
  const onKeyDown = useCallback((event) => {
235
329
  if (!keyboardNavigation) {
@@ -83,7 +83,7 @@ export function ToolbarButton({ item, size = "medium", showLabel = false, }) {
83
83
  padding: printLabel ? "0 8px" : 0,
84
84
  margin: 0,
85
85
  border: "none",
86
- // Follow the active theme: Loop makes controls pills, while every
86
+ // Follow the active theme: Agent makes controls pills, while every
87
87
  // other theme supplies its own control radius through the same token.
88
88
  borderRadius: "var(--theme-radius-control)",
89
89
  cursor: disabled ? "not-allowed" : "pointer",
@@ -1,4 +1,6 @@
1
1
  import type { ToolbarItem } from "./types";
2
+ /** The least a spacer takes on the line: the overflow counts it, so the two never disagree. */
3
+ export declare const SPACER_MIN_WIDTH = 8;
2
4
  export interface ToolbarRendererProps {
3
5
  items: ToolbarItem[];
4
6
  disabled?: boolean;
@@ -15,6 +15,8 @@ import { Box } from "../box/Box";
15
15
  import { ToolbarButton } from "./ToolbarButton";
16
16
  import { ToolbarDropdown } from "./ToolbarDropdown";
17
17
  import { ToolbarDivider } from "./ToolbarDivider";
18
+ /** The least a spacer takes on the line: the overflow counts it, so the two never disagree. */
19
+ export const SPACER_MIN_WIDTH = 8;
18
20
  /**
19
21
  * Sort items by order, then render each one according to its type.
20
22
  */
@@ -32,7 +34,7 @@ export function ToolbarRenderer({ items, disabled, size = "medium", showLabel =
32
34
  case "divider":
33
35
  return (_jsx(Fragment, { children: _jsx(ToolbarDivider, { orientation: direction === "column" ? "horizontal" : "vertical" }) }, item.key));
34
36
  case "spacer":
35
- return (_jsx(Box, { sx: { flex: "1 1 auto", minWidth: 8 } }, item.key));
37
+ return (_jsx(Box, { sx: { flex: "1 1 auto", minWidth: SPACER_MIN_WIDTH } }, item.key));
36
38
  case "custom":
37
39
  return _jsx(Fragment, { children: item.render() }, item.key);
38
40
  default:
@@ -181,6 +181,12 @@ export interface ToolbarProps {
181
181
  * default.
182
182
  */
183
183
  keyboardNavigation?: boolean;
184
+ /**
185
+ * The least room the line needs, in pixels: what never leaves it (pinned items, spacers at their minimum, the
186
+ * gaps of items laid out empty) and, when anything can leave, the menu's button. Called when it changes, so a
187
+ * host can keep that room for the toolbar — what is beside it gives way instead of running under it.
188
+ */
189
+ onMinimumWidth?: (width: number) => void;
184
190
  }
185
191
  /**
186
192
  * Props for the extensible FloatingToolbar component.
@@ -9,7 +9,7 @@
9
9
  * a menu — needs the same two lines of glue: `setupPrimerPortals()` before
10
10
  * anything portals, and again on every theme change so the portal root's
11
11
  * `data-color-mode` follows the application. Each host wrote them for itself
12
- * (the music example at module load, the LOOP palette inside its build), and
12
+ * (the music example at module load, the Agent palette inside its build), and
13
13
  * each copy was one theme-change subscription short: a palette opened after a
14
14
  * toggle wore the mode the page started in.
15
15
  *
@@ -17,7 +17,7 @@
17
17
  * along as a dependency. `PageLayoutPlugin` arranges a host's slots as a
18
18
  * page: the work on a centred sheet, a band above it, a side panel opened
19
19
  * from the header — and the layout, its toggle and its signals are exported
20
- * on their own for a host that wires the parts itself, as the Loop does.
20
+ * on their own for a host that wires the parts itself, as the Agent workspace does.
21
21
  *
22
22
  * @module reactor
23
23
  */
@@ -21,7 +21,7 @@
21
21
  * along as a dependency. `PageLayoutPlugin` arranges a host's slots as a
22
22
  * page: the work on a centred sheet, a band above it, a side panel opened
23
23
  * from the header — and the layout, its toggle and its signals are exported
24
- * on their own for a host that wires the parts itself, as the Loop does.
24
+ * on their own for a host that wires the parts itself, as the Agent workspace does.
25
25
  *
26
26
  * @module reactor
27
27
  */
@@ -32,7 +32,7 @@
32
32
  * card over the first lines.
33
33
  *
34
34
  * Nothing here decides what the parts do. A host wires them; this arranges
35
- * them. It grew up as the Loop's page layout, where the page is a notebook or
35
+ * them. It grew up as the Agent workspace's page layout, where the page is a notebook or
36
36
  * a document, the band is the composer and the panel is the conversation;
37
37
  * the names here are the general ones.
38
38
  *
@@ -82,7 +82,7 @@ export declare function resolvePageSize(size: PageSize | undefined, sheetWidth?:
82
82
  /**
83
83
  * A panel opening from its side at the theme's pace: `--theme-motion-pane`
84
84
  * and `--theme-motion-easing`, which every theme sets — to no motion at all
85
- * but in `loop` (LOOP T-10). The animation starts when the panel is shown.
85
+ * but in `agent`. The animation starts when the panel is shown.
86
86
  */
87
87
  export declare function panelOpening(side: "left" | "right"): Record<string, unknown>;
88
88
  export type PageLayoutProps = {
@@ -37,7 +37,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
37
37
  * card over the first lines.
38
38
  *
39
39
  * Nothing here decides what the parts do. A host wires them; this arranges
40
- * them. It grew up as the Loop's page layout, where the page is a notebook or
40
+ * them. It grew up as the Agent workspace's page layout, where the page is a notebook or
41
41
  * a document, the band is the composer and the panel is the conversation;
42
42
  * the names here are the general ones.
43
43
  *
@@ -115,7 +115,7 @@ function ActivityLine({ label }) {
115
115
  /**
116
116
  * A panel opening from its side at the theme's pace: `--theme-motion-pane`
117
117
  * and `--theme-motion-easing`, which every theme sets — to no motion at all
118
- * but in `loop` (LOOP T-10). The animation starts when the panel is shown.
118
+ * but in `agent`. The animation starts when the panel is shown.
119
119
  */
120
120
  export function panelOpening(side) {
121
121
  const name = side === "left" ? "pagePanelOpenLeft" : "pagePanelOpenRight";
@@ -318,7 +318,7 @@ export function PageLayout({ page, hasPage = page !== undefined && page !== null
318
318
  display: "flex",
319
319
  flexDirection: "column",
320
320
  "& > *": { flex: "1 1 auto", minHeight: 0 },
321
- // A pane opening, at the theme's pace (LOOP T-10): from its
321
+ // A pane opening, at the theme's pace: from its
322
322
  // side, by the theme's motion tokens — none in a theme that
323
323
  // sets no motion, none when motion is reduced. On the
324
324
  // content, not the column: a transform on the column would
@@ -13,9 +13,9 @@
13
13
  * and closes the panel goes in the header — only while something fills the
14
14
  * panel slot, so a host with no panel gets no dead button.
15
15
  *
16
- * This is the Loop's page layout with the Loop taken out: there the chat
16
+ * This is the Agent workspace's page layout with the workspace taken out: there the chat
17
17
  * view hands the layout its parts directly through a contribution point of
18
- * its own, and the Loop keeps that adapter. Here the parts are slots, which
18
+ * its own, and the workspace keeps that adapter. Here the parts are slots, which
19
19
  * is what a plain Reactor host has.
20
20
  *
21
21
  * @module reactor/page-layout/PageLayoutPlugin
@@ -180,7 +180,7 @@ export function DatalayerThemeProvider(props) {
180
180
  // Not before the DOM has been read: the first commit's effects run before
181
181
  // the update that says whether this provider is nested, and a nested one
182
182
  // — an application embedded in another product's page, in its own shadow
183
- // root (LOOP T-13) — wrote its theme on that page's <body> before it knew.
183
+ // root — wrote its theme on that page's <body> before it knew.
184
184
  useEffect(() => {
185
185
  if (!placed || nested) {
186
186
  // Another provider owns the page's portal root; see above.
@@ -1,14 +1,14 @@
1
1
  /**
2
- * The eyes of L👀P, as geometry (`plans/STUDIO.md`, N-02).
2
+ * The eyes of the Agent wordmark, as geometry.
3
3
  *
4
- * The name is displayed with two eyes where its two O's are. They are drawn,
4
+ * The wordmark is displayed with two eyes beside its letters. They are drawn,
5
5
  * not typed: the emoji is a different picture on every platform, is missing
6
6
  * on some, and is read aloud as "eyes". Two ovals and two pupils, in the
7
7
  * colour of the text around them, look the same everywhere — the web's SVG
8
8
  * and the mobile app's native views draw this same geometry.
9
9
  *
10
10
  * An eye is about as wide and as tall as a capital O of the face beside it,
11
- * so that the two of them read as the O's they stand for.
11
+ * so that the two of them read at the size of the letters beside them.
12
12
  *
13
13
  * Pure: nothing here renders.
14
14
  */
@@ -3,16 +3,16 @@
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
5
  /**
6
- * The eyes of L👀P, as geometry (`plans/STUDIO.md`, N-02).
6
+ * The eyes of the Agent wordmark, as geometry.
7
7
  *
8
- * The name is displayed with two eyes where its two O's are. They are drawn,
8
+ * The wordmark is displayed with two eyes beside its letters. They are drawn,
9
9
  * not typed: the emoji is a different picture on every platform, is missing
10
10
  * on some, and is read aloud as "eyes". Two ovals and two pupils, in the
11
11
  * colour of the text around them, look the same everywhere — the web's SVG
12
12
  * and the mobile app's native views draw this same geometry.
13
13
  *
14
14
  * An eye is about as wide and as tall as a capital O of the face beside it,
15
- * so that the two of them read as the O's they stand for.
15
+ * so that the two of them read at the size of the letters beside them.
16
16
  *
17
17
  * Pure: nothing here renders.
18
18
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Loop Color System – one accent, neutral everything else.
2
+ * Agent Color System – one accent, neutral everything else.
3
3
  *
4
- * The look of an application built in LOOP: a white (or near-black)
4
+ * The look of an Agent application: a white (or near-black)
5
5
  * canvas, near-black (or near-white) text, hairlines instead of borders,
6
6
  * and a single soft accent that dark text sits on. Nothing else carries
7
7
  * colour, apart from the three colours of a verdict.
@@ -11,7 +11,7 @@
11
11
  * application may take one of five others: the accents are the theme
12
12
  * system's, over every theme (`themeAccents`, decided 2026-10-07).
13
13
  */
14
- export declare const loopColors: {
14
+ export declare const agentColors: {
15
15
  black: string;
16
16
  gray: string;
17
17
  white: string;
@@ -20,18 +20,18 @@ export declare const loopColors: {
20
20
  subtle: string;
21
21
  subtleDark: string;
22
22
  grayDark: string;
23
- loopBrand: string;
24
- loopOn: string;
25
- loopAccent: string;
26
- loopBrandHover: string;
27
- loopText: string;
28
- loopRing: string;
29
- loopTint: string;
30
- loopStage: string;
31
- loopBright: string;
32
- loopHover: string;
33
- loopStageDark: string;
34
- loopTintDark: string;
23
+ agentBrand: string;
24
+ agentOn: string;
25
+ agentAccent: string;
26
+ agentBrandHover: string;
27
+ agentText: string;
28
+ agentRing: string;
29
+ agentTint: string;
30
+ agentStage: string;
31
+ agentBright: string;
32
+ agentHover: string;
33
+ agentStageDark: string;
34
+ agentTintDark: string;
35
35
  successBrand: string;
36
36
  successAccent: string;
37
37
  successTint: string;
@@ -3,9 +3,9 @@
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
5
  /**
6
- * Loop Color System – one accent, neutral everything else.
6
+ * Agent Color System – one accent, neutral everything else.
7
7
  *
8
- * The look of an application built in LOOP: a white (or near-black)
8
+ * The look of an Agent application: a white (or near-black)
9
9
  * canvas, near-black (or near-white) text, hairlines instead of borders,
10
10
  * and a single soft accent that dark text sits on. Nothing else carries
11
11
  * colour, apart from the three colours of a verdict.
@@ -15,7 +15,7 @@
15
15
  * application may take one of five others: the accents are the theme
16
16
  * system's, over every theme (`themeAccents`, decided 2026-10-07).
17
17
  */
18
- export const loopColors = {
18
+ export const agentColors = {
19
19
  // Core neutrals
20
20
  black: '#131314', // Near-black — primary dark background
21
21
  gray: '#6E6E73', // Secondary text on light: a soft grey, 5.1 to 1 on white
@@ -27,20 +27,20 @@ export const loopColors = {
27
27
  subtle: '#F5F5F7', // Subtle surface on light (a bubble, a chip)
28
28
  subtleDark: '#1E1E20', // Subtle surface on dark
29
29
  grayDark: '#A1A1A6', // Secondary text on dark
30
- // Loop palette (Brand) — mint
31
- loopBrand: '#7ADBB8', // The accent — a bubble, a send button, a swatch
32
- loopOn: '#06281E', // Text that sits on the accent (9.5 to 1)
33
- loopAccent: '#4FC79C', // Deeper accent — charts, highlights
34
- loopBrandHover: '#6CCFAA', // The filled button, hovered: dark text 8.4 to 1
35
- loopText: '#248462', // Accent text & links on white: the lightest mint that reads, 4.6 to 1
36
- loopRing: '#0F6B4F', // The focus ring: 3 to 1 or more around every pastel
37
- loopTint: '#F0FAF6', // Quiet tint — a draft, a callout
38
- loopStage: '#DDF5EC', // The stage behind an application
39
- loopBright: '#8FE5C6', // Accent text & links on dark
40
- loopHover: '#227C5C', // Accent text hover
30
+ // Agent palette (Brand) — mint
31
+ agentBrand: '#7ADBB8', // The accent — a bubble, a send button, a swatch
32
+ agentOn: '#06281E', // Text that sits on the accent (9.5 to 1)
33
+ agentAccent: '#4FC79C', // Deeper accent — charts, highlights
34
+ agentBrandHover: '#6CCFAA', // The filled button, hovered: dark text 8.4 to 1
35
+ agentText: '#248462', // Accent text & links on white: the lightest mint that reads, 4.6 to 1
36
+ agentRing: '#0F6B4F', // The focus ring: 3 to 1 or more around every pastel
37
+ agentTint: '#F0FAF6', // Quiet tint — a draft, a callout
38
+ agentStage: '#DDF5EC', // The stage behind an application
39
+ agentBright: '#8FE5C6', // Accent text & links on dark
40
+ agentHover: '#227C5C', // Accent text hover
41
41
  // The stage and the quiet tint, on dark
42
- loopStageDark: '#10261F',
43
- loopTintDark: '#17211D',
42
+ agentStageDark: '#10261F',
43
+ agentTintDark: '#17211D',
44
44
  // Semantic roles — kept for verdicts and rules only
45
45
  successBrand: '#1F8A5B',
46
46
  successAccent: '#58C797',
@@ -8,7 +8,7 @@
8
8
  * a dark background. A spec names its colour by hue (an agent's `color:
9
9
  * indigo`), and the drawing follows the theme and its mode.
10
10
  *
11
- * Every theme takes the base values; a theme with hues of its own (`loop`'s
11
+ * Every theme takes the base values; a theme with hues of its own (`agent`'s
12
12
  * pastels, `vscode`'s terminal colours) gives them for the hues it has.
13
13
  */
14
14
  import type { ThemeVariant } from '../themeTokens';
@@ -50,8 +50,8 @@ export const baseHueColors = {
50
50
  };
51
51
  /** The hues a theme gives of its own. */
52
52
  const themeHueColors = {
53
- // Loop's soft accents, deep on light, the pastels on dark (`themeAccents`).
54
- loop: {
53
+ // Agent's soft accents, deep on light, the pastels on dark (`themeAccents`).
54
+ agent: {
55
55
  green: { light: '#248462', dark: '#8FE5C6' },
56
56
  rose: { light: '#B83A6B', dark: '#F6A5C1' },
57
57
  sky: { light: '#1F6FB0', dark: '#8CCBF9' },
@@ -6,7 +6,7 @@ export { earthColors } from './earthColors';
6
6
  export { sandColors } from './sandColors';
7
7
  export { ivoryColors } from './ivoryColors';
8
8
  export { sunColors } from './sunColors';
9
- export { loopColors } from './loopColors';
9
+ export { agentColors } from './agentColors';
10
10
  export { metalColors } from './metalColors';
11
11
  export { vscodeColors, vscodeVars, vscodeVar, vscodeTint, vscodeFontFamily, vscodeMonoFontFamily, vscodeFontSize, type VSCodeColor, type VSCodeVarName, } from './vscodeColors';
12
12
  export { themeAccents, themeAccentNames, themeAccentVars, themeAccentTints, themeStageGradient, themeTintVars, type ThemeAccent, type ThemeAccentName, } from './themeAccents';
@@ -10,7 +10,7 @@ export { earthColors } from './earthColors';
10
10
  export { sandColors } from './sandColors';
11
11
  export { ivoryColors } from './ivoryColors';
12
12
  export { sunColors } from './sunColors';
13
- export { loopColors } from './loopColors';
13
+ export { agentColors } from './agentColors';
14
14
  export { metalColors } from './metalColors';
15
15
  export { vscodeColors, vscodeVars, vscodeVar, vscodeTint, vscodeFontFamily, vscodeMonoFontFamily, vscodeFontSize, } from './vscodeColors';
16
16
  export { themeAccents, themeAccentNames, themeAccentVars, themeAccentTints, themeStageGradient, themeTintVars, } from './themeAccents';
@@ -23,7 +23,7 @@ import { earthColors } from './earthColors';
23
23
  import { sandColors } from './sandColors';
24
24
  import { ivoryColors } from './ivoryColors';
25
25
  import { sunColors } from './sunColors';
26
- import { loopColors } from './loopColors';
26
+ import { agentColors } from './agentColors';
27
27
  import { metalColors } from './metalColors';
28
28
  import { vscodeColors } from './vscodeColors';
29
29
  /**
@@ -45,7 +45,7 @@ export const themedColors = {
45
45
  sand: sandColors,
46
46
  ivory: ivoryColors,
47
47
  sun: sunColors,
48
- loop: loopColors,
48
+ agent: agentColors,
49
49
  metal: metalColors,
50
50
  vscode: vscodeColors,
51
51
  };
@@ -48,18 +48,18 @@ export declare const metalColors: {
48
48
  brightLightFlame: string;
49
49
  brightLightGold: string;
50
50
  white: string;
51
- loopBrand: string;
52
- loopOn: string;
53
- loopAccent: string;
54
- loopBrandHover: string;
55
- loopText: string;
56
- loopRing: string;
57
- loopTint: string;
58
- loopStage: string;
59
- loopBright: string;
60
- loopHover: string;
61
- loopStageDark: string;
62
- loopTintDark: string;
51
+ agentBrand: string;
52
+ agentOn: string;
53
+ agentAccent: string;
54
+ agentBrandHover: string;
55
+ agentText: string;
56
+ agentRing: string;
57
+ agentTint: string;
58
+ agentStage: string;
59
+ agentBright: string;
60
+ agentHover: string;
61
+ agentStageDark: string;
62
+ agentTintDark: string;
63
63
  successBrand: string;
64
64
  successAccent: string;
65
65
  successTint: string;
@@ -5,19 +5,19 @@
5
5
  /**
6
6
  * Metal Color System – cool neutrals, one steel blue, four brushed surfaces.
7
7
  *
8
- * The Loop theme's system with the warmth taken out: a white canvas under a
8
+ * The Agent theme's system with the warmth taken out: a white canvas under a
9
9
  * blue-grey wash, hairlines with a little steel in them, and a slate-blue
10
- * accent. Where Loop has no gradient, Metal has four, for a surface that
10
+ * accent. Where Agent has no gradient, Metal has four, for a surface that
11
11
  * carries white text and glass on top: sage, steel, mauve and clay.
12
- * The verdict colours are Loop's.
12
+ * The verdict colours are Agent's.
13
13
  */
14
- import { loopColors } from './loopColors';
14
+ import { agentColors } from './agentColors';
15
15
  export const metalColors = {
16
- ...loopColors,
16
+ ...agentColors,
17
17
  // Core neutrals
18
18
  black: '#1C2A33', // The deep base under the dark mesh
19
19
  gray: '#6B7280', // Secondary text on light: 4.8 to 1 on white
20
- ink: '#2A2F37', // Text on light: softer than Loop's, 13.5 to 1 on white
20
+ ink: '#2A2F37', // Text on light: softer than Agent's, 13.5 to 1 on white
21
21
  inkDark: '#EEF2F7', // Text on dark
22
22
  subtle: '#F6F8FC', // Subtle surface on light
23
23
  subtleDark: '#25343F', // Subtle surface on dark, and the menus
@@ -4,7 +4,7 @@
4
4
  * Six soft accents, each with the dark text that sits on it (the lowest
5
5
  * contrast of the six is 8.8 to 1), the tint of the stage behind an
6
6
  * application, a quiet tint, and the accent as text. They were drawn for
7
- * the `loop` theme — green, mint, is `loop`'s own — and, since 2026-10-07
7
+ * the `agent` theme — green, mint, is `agent`'s own — and, since 2026-10-07
8
8
  * (decided by the user), they colour every theme: `themeAccentVars` sets
9
9
  * Primer's own accent and primary properties, so the filled button, links,
10
10
  * the accent tokens and a selected tab take the accent whatever theme an
@@ -38,7 +38,7 @@ export interface ThemeAccent {
38
38
  dark: string;
39
39
  };
40
40
  }
41
- /** The six accents. One per application; everything else is the theme's. Green — mint — is `loop`'s own. */
41
+ /** The six accents. One per application; everything else is the theme's. Green — mint — is `agent`'s own. */
42
42
  export declare const themeAccents: Record<ThemeAccentName, ThemeAccent>;
43
43
  /** The names of the accents, in the order a picker shows them. */
44
44
  export declare const themeAccentNames: ThemeAccentName[];
@@ -66,14 +66,13 @@ export declare function themeAccentTints(accent: Pick<ThemeAccent, 'accent' | 'o
66
66
  */
67
67
  export declare function themeTintVars(defs: ThemeColorDefs): Record<string, string>;
68
68
  /**
69
- * An application's accent as everything it colours, over any theme (LOOP
70
- * T-05, T-30): the accent's own properties (`--theme-accent`,
69
+ * An application's accent as everything it colours, over any theme: the accent's own properties (`--theme-accent`,
71
70
  * `--theme-accent-on`, `--theme-stage`, `--theme-quiet`,
72
71
  * `--theme-stage-gradient`), and Primer's — the accent fill, text, links,
73
72
  * muted border and tint, the filled button, a checked switch, a selected
74
73
  * tab — so that nothing on its page keeps the theme's default accent beside
75
- * its own (T-18). The theme's focus ring is kept: it is drawn to show around
76
- * every accent (T-15). Set on an application's root, it wears its own
74
+ * its own. The theme's focus ring is kept: it is drawn to show around
75
+ * every accent. Set on an application's root, it wears its own
77
76
  * colour; the page around keeps the theme's.
78
77
  *
79
78
  * An unknown name is refused.