From 656029b28b32acef642b99e5b5eec90ba58ca014 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Sun, 22 Nov 2026 11:30:10 +0100 Subject: [PATCH 1/4] The loop theme is the agent theme The theme id 'loop' is 'agent', with no alias. loopTheme, loopThemeStyles, loopColors and loopEyes are agentTheme, agentThemeStyles, agentColors and agentEyes, and the other loop* exports follow. The theme's custom properties are --agent-*, and style/loop-face.css is style/agent-face.css. The tests, stories, gallery, README and changelog follow, and the comments no longer carry planning ids. --- .github/workflows/build.yaml | 4 +- CHANGELOG.md | 6 +- README.md | 64 ++-- examples/gallery/src/components/BoxDemo.tsx | 6 +- examples/gallery/src/components/CardDemo.tsx | 4 +- .../src/components/EntityAvatarDemo.tsx | 2 +- .../gallery/src/components/HoverCardDemo.tsx | 2 +- .../gallery/src/components/PrimerDemo.tsx | 2 +- examples/gallery/src/gallery/GalleryPage.tsx | 2 +- .../appearance/AppearanceControls.tsx | 2 +- .../appearance/AppearanceMenu.stories.tsx | 4 +- .../CollaboratorPalette.stories.tsx | 4 +- src/components/appearance/ColorModeCircle.tsx | 2 +- .../appearance/ThemeCircle.stories.tsx | 2 +- .../appearance/ThemePreviewCard.stories.tsx | 2 +- .../appearance/ThemePreviewCard.tsx | 2 +- .../AppearanceColorModeOnly.test.tsx | 6 +- src/components/box/Box.stories.tsx | 2 +- src/components/box/Box.tsx | 6 +- src/components/box/__tests__/boxCss.test.ts | 8 +- src/components/box/boxTokens.ts | 4 +- .../calendar-picker/CalendarPicker.tsx | 2 +- src/components/card/Card.tsx | 2 +- src/components/color/ColorSwatch.tsx | 2 +- src/components/entity-avatar/EntityAvatar.tsx | 2 +- src/components/hover-card/HoverCard.tsx | 2 +- src/components/logo/DatalayerLogo.stories.tsx | 2 +- src/components/logo/DatalayerLogo.tsx | 24 +- src/components/sheet/Sheet.tsx | 2 +- src/components/toolbar/ToolbarButton.tsx | 2 +- src/reactor/ThemePlugin.ts | 2 +- src/reactor/__tests__/pagePanelMotion.test.ts | 4 +- src/reactor/index.ts | 2 +- src/reactor/page-layout/PageLayout.tsx | 6 +- src/reactor/page-layout/PageLayoutPlugin.ts | 4 +- src/theme/DatalayerThemeProvider.tsx | 2 +- .../{loopClean.test.ts => agentClean.test.ts} | 22 +- ...Contrast.test.ts => agentContrast.test.ts} | 88 ++--- .../{loopType.test.ts => agentType.test.ts} | 18 +- src/theme/__tests__/metalTheme.test.ts | 12 +- src/theme/__tests__/paletteColors.test.ts | 2 +- src/theme/__tests__/portable.test.ts | 4 +- src/theme/__tests__/themeShape.test.ts | 36 +- src/theme/__tests__/themeStylesheet.test.tsx | 38 +- src/theme/{loopEyes.ts => agentEyes.ts} | 6 +- .../colors/{loopColors.ts => agentColors.ts} | 32 +- src/theme/colors/hueColors.ts | 6 +- src/theme/colors/index.ts | 6 +- src/theme/colors/metalColors.ts | 12 +- src/theme/colors/themeAccents.ts | 11 +- src/theme/css/createThemeCSSVars.ts | 10 +- src/theme/css/primerBaseVars.ts | 2 +- src/theme/index.ts | 4 +- src/theme/palettes/ColorPalette.tsx | 36 +- src/theme/portable.ts | 2 +- src/theme/themeRegistry.ts | 4 +- src/theme/themeTokens.ts | 78 ++-- .../themes/{loopTheme.ts => agentTheme.ts} | 22 +- ...loopThemeStyles.ts => agentThemeStyles.ts} | 350 +++++++++--------- src/theme/themes/ivoryThemeStyles.ts | 2 +- src/theme/themes/metalThemeStyles.ts | 62 ++-- src/theme/themes/roundedShape.ts | 22 +- src/theme/themes/sandThemeStyles.ts | 2 +- src/theme/themes/sunThemeStyles.ts | 2 +- src/utils/Portals.tsx | 2 +- style/{loop-face.css => agent-face.css} | 4 +- 66 files changed, 548 insertions(+), 545 deletions(-) rename src/theme/__tests__/{loopClean.test.ts => agentClean.test.ts} (67%) rename src/theme/__tests__/{loopContrast.test.ts => agentContrast.test.ts} (65%) rename src/theme/__tests__/{loopType.test.ts => agentType.test.ts} (86%) rename src/theme/{loopEyes.ts => agentEyes.ts} (94%) rename src/theme/colors/{loopColors.ts => agentColors.ts} (71%) rename src/theme/themes/{loopTheme.ts => agentTheme.ts} (55%) rename src/theme/themes/{loopThemeStyles.ts => agentThemeStyles.ts} (64%) rename style/{loop-face.css => agent-face.css} (94%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dea0139..363fede 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,7 +36,7 @@ jobs: - name: Build run: npm run build - # The themes' contrast and shape (LOOP T-03, T-15): a failure fails the build. + # The themes' contrast and shape: a failure fails the build. - name: Test run: npm test @@ -56,7 +56,7 @@ jobs: path: dist-npm/*.tgz # The gallery (examples/gallery) built from the package's source: a page - # that does not type-check or bundle fails CI (LOOP G-10). It installs its + # that does not type-check or bundle fails CI. It installs its # own dependencies (its package.json, no lockfile) beside the package's. gallery: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index c7b5da4..d6c6f21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ # Changelog -Each version names the LOOP boxes it carries — the plan's ids, as its commits say them — and links the section of the README that documents them. The `loop` theme is documented in [The `loop` theme](https://github.com/datalayer/primer-addons/blob/main/README.md#the-loop-theme), and shown, with the accents, in the gallery's *Theme Accents* page when the gallery wears it. +Each version links the section of the README that documents it. The `agent` theme is documented in [The `agent` theme](https://github.com/datalayer/primer-addons/blob/main/README.md#the-agent-theme), and shown, with the accents, in the gallery's *Theme Accents* page when the gallery wears it. + +## Unreleased + +- **Breaking.** The `loop` theme is the `agent` theme, with no alias: the theme id `'loop'` is `'agent'` (`ThemeVariant`, `themeConfigs.agent`, `themeTokens.agent`, the hue and palette tables, the logo's variant), and every name follows. `loopTheme` is `agentTheme`, `loopThemeStyles` is `agentThemeStyles`, `loopColors` is `agentColors` (its `loopBrand`, `loopAccent`, `loopOn`… are `agentBrand`, `agentAccent`, `agentOn`…), `loopEyes` is `agentEyes`, and the other `loop*` exports (`loopShapeVars`, `loopShadows`, `loopMotionVars`, `loopTypeVars`, `loopFontFamily`, `loopFontWeights`, `loopControlsCss`, `loopFocusRing`…) are `agent*`. The theme's custom properties are `--agent-*` (`--agent-radius-card`, `--agent-shadow-frame`, `--agent-hairline`, `--agent-motion-*`, `--agent-face-*`…). `style/loop-face.css` is `style/agent-face.css`. The tests, the stories, the gallery and the README follow; the comments no longer carry planning ids. ## 1.0.53 diff --git a/README.md b/README.md index 3fa0646..f150ac7 100755 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ This project has been [shared in a discussion](https://github.com/primer/react/d The components use the active theme's semantic tokens rather than fixed visual values. For example, toolbar icon buttons and dropdown triggers read `--theme-radius-control`: they retain the regular Primer corner in the default -themes and become fully rounded controls in `loop`. +themes and become fully rounded controls in `agent`. ### Toolbar overflow @@ -82,7 +82,7 @@ import { AppearancePlugin, PageLayoutPlugin, ThemePlugin } from '@datalayer/prim - `ThemePlugin` keeps Primer's portals in the application's color mode and toggles that mode by command (`Mod+Alt+C`). - `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. -- `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. +- `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. The [gallery example](examples/gallery) is a Reactor app built on the three: `npm run gallery` locally, live at https://primer-addons.datalayer.tech. @@ -105,7 +105,7 @@ import { Box } from '@datalayer/primer-addons'; ``` -- **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(--…))`. +- **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(--…))`. - **Responsive values** are one per breakpoint, Primer's (544, 768, 1012, 1280px), `null` to skip one. - **States** take a style of their own: `hover`, `focus`, `focusVisible`, `focusWithin`, `active`, and `reducedMotion`. - **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 ## Theme accents -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. +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. | Name | Accent | Text on it | Stage (light / dark) | Quiet (light / dark) | As text (light / dark) | |---|---|---|---|---|---| @@ -128,7 +128,7 @@ Six soft accents, and an application takes one — **over any theme**: `datalaye `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: -- 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; +- 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; - Primer's accent: `--bgColor-accent-emphasis`, `--borderColor-accent-emphasis`, `--fgColor-accent`, `--fgColor-link`, `--borderColor-accent-muted`, `--bgColor-accent-muted`, and `--datalayer-icon-fg`; - 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`; - 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 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. -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). +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). ```tsx import { getThemeConfig, themeAccentVars } from '@datalayer/primer-addons'; @@ -184,25 +184,25 @@ isHexColor('#abc'); // true The source: `src/theme/palettes/ColorPalette.tsx` and `src/theme/colors/hueColors.ts`. -## The `loop` theme +## The `agent` theme -`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). +`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). ```tsx -import { DatalayerThemeProvider, loopTheme, loopThemeStyles } from '@datalayer/primer-addons'; +import { DatalayerThemeProvider, agentTheme, agentThemeStyles } from '@datalayer/primer-addons'; - + {app} ``` -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). +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). ### Shape, shadow, type and motion **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. -| Token | Default (every other theme) | `loop` | +| Token | Default (every other theme) | `agent` | |---|---|---| | `--theme-radius-control` | `var(--borderRadius-medium, 6px)` | `999px` | | `--theme-radius-card` | `var(--borderRadius-medium, 6px)` | `20px` | @@ -216,25 +216,25 @@ The sources: `src/theme/colors/loopColors.ts` (colours), `src/theme/themes/loopT | `--theme-motion-easing` | `ease` | `cubic-bezier(0.2, 0, 0, 1)` | | `--theme-message-link` | `var(--fgColor-accent, #0969da)` | `currentColor`: a link in a message is plain, the colour of its words, and underlined | -**The `loop` theme's own**, beside them (`loopShapeVars`, `loopShadows`, `loopMotionVars`, `loopTypeVars`): +**The `agent` theme's own**, beside them (`agentShapeVars`, `agentShadows`, `agentMotionVars`, `agentTypeVars`): -- **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). -- **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). -- **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). -- **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. -- **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). -- **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. +- **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). +- **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). +- **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). +- **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. +- **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). +- **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. - **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. -- **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)). +- **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)). - **The focus ring**: `--focus-outlineColor`, the deep mint `#0F6B4F` in light mode and a mid grey `#636363` in dark mode. ### The reference screens -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. +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. ### The controls, as pills -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. +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. How `DatalayerThemeProvider` applies it: @@ -246,24 +246,24 @@ How `DatalayerThemeProvider` applies it: ### The rules of clean -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: +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: 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. 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`). -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. -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. -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. +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. +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. +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. 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. 7. **A control is a line icon.** Octicons, at one weight, in the ink: no colour on a control, no emoji on a button. -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. +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. 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. -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). +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. ### Contrast, as tested -`src/theme/__tests__/loopContrast.test.ts` fails the build when, for any of the six accents, in either mode: +`src/theme/__tests__/agentContrast.test.ts` fails the build when, for any of the six accents, in either mode: - 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); - 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. ### What a host may override -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. +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. -**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. +**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. ## Develop @@ -324,4 +324,4 @@ npm dev Primer Addons is released in [Npm.js](https://www.npmjs.com/package/@datalayer/primer-addons). -What each version brought, with the LOOP boxes it carries, is in the [changelog](CHANGELOG.md). +What each version brought is in the [changelog](CHANGELOG.md). diff --git a/examples/gallery/src/components/BoxDemo.tsx b/examples/gallery/src/components/BoxDemo.tsx index b2e319e..2ae517f 100644 --- a/examples/gallery/src/components/BoxDemo.tsx +++ b/examples/gallery/src/components/BoxDemo.tsx @@ -7,7 +7,7 @@ * The gallery's Box: one example per family of props, each with a line * saying what it shows and the code that draws it. No `sx` anywhere: every * value is a prop, on the theme's tokens, so switching the theme (try - * `loop`) redraws them all — its hairline, its corners, its weights. + * `agent`) redraws them all — its hairline, its corners, its weights. */ import type { ReactNode } from 'react'; @@ -106,7 +106,7 @@ const EXAMPLES: Example[] = [ { title: 'A card', caption: - "The Studio Home's card: the theme's hairline, its large corner (20px in loop), padded so the corner does not crowd the words.", + "The Studio Home's card: the theme's hairline, its large corner (20px in agent), padded so the corner does not crowd the words.", code: ` Build @@ -202,7 +202,7 @@ const EXAMPLES: Example[] = [ { title: 'Type', caption: - "Sizes on Primer's scale (0 is 12px, 1 is 14px, 3 is 20px), weights by name (the theme's: loop has two), alignment, and text that does not wrap.", + "Sizes on Primer's scale (0 is 12px, 1 is 14px, 3 is 20px), weights by name (the theme's: agent has two), alignment, and text that does not wrap.", code: `fontSize={3} semibold centred, muted …`, diff --git a/examples/gallery/src/components/CardDemo.tsx b/examples/gallery/src/components/CardDemo.tsx index a540d52..9c2c9e1 100644 --- a/examples/gallery/src/components/CardDemo.tsx +++ b/examples/gallery/src/components/CardDemo.tsx @@ -6,7 +6,7 @@ /** * The gallery's Card: one example per prop and flavour, each with a line * saying what it shows and the code that draws it. Every colour, shadow and - * corner is the theme's, so switching the theme (try `loop`) or the colour + * corner is the theme's, so switching the theme (try `agent`) or the colour * mode redraws them all. */ @@ -347,7 +347,7 @@ const EXAMPLES: Example[] = [ { title: 'An attached panel', caption: - "rounded=\"overlay\" is the theme's corner for a panel floating over the page — a menu, a header's mega-menu (Primer's overlay corner unless the theme sets --theme-radius-overlay; loop's is its card corner). With the top corners squared it reads as hanging from what opened it.", + "rounded=\"overlay\" is the theme's corner for a panel floating over the page — a menu, a header's mega-menu (Primer's overlay corner unless the theme sets --theme-radius-overlay; agent's is its card corner). With the top corners squared it reads as hanging from what opened it.", code: `…`, render: () => ( diff --git a/examples/gallery/src/components/EntityAvatarDemo.tsx b/examples/gallery/src/components/EntityAvatarDemo.tsx index 3596d19..5afb497 100644 --- a/examples/gallery/src/components/EntityAvatarDemo.tsx +++ b/examples/gallery/src/components/EntityAvatarDemo.tsx @@ -6,7 +6,7 @@ /** * EntityAvatar in each flavour, under the selected theme: an image, an emoji, * an icon, initials; its sizes; a circle for a person and the theme's corner - * for the rest (rounder in `loop`); its grounds and an entity's own colour. + * for the rest (rounder in `agent`); its grounds and an entity's own colour. */ import type { ReactNode } from 'react'; diff --git a/examples/gallery/src/components/HoverCardDemo.tsx b/examples/gallery/src/components/HoverCardDemo.tsx index 89e55f2..f3aa0e1 100644 --- a/examples/gallery/src/components/HoverCardDemo.tsx +++ b/examples/gallery/src/components/HoverCardDemo.tsx @@ -6,7 +6,7 @@ /** * The hover card in its three sizes: a shelf of small cards that grow on * hover, the grown card on its own, and the large card its chevron opens. - * All of it is drawn by the theme — switch to `loop` for its rounder corner. + * All of it is drawn by the theme — switch to `agent` for its rounder corner. */ import { useState } from 'react'; diff --git a/examples/gallery/src/components/PrimerDemo.tsx b/examples/gallery/src/components/PrimerDemo.tsx index a523a2d..0dc5717 100644 --- a/examples/gallery/src/components/PrimerDemo.tsx +++ b/examples/gallery/src/components/PrimerDemo.tsx @@ -7,7 +7,7 @@ * Primer's own components, drawn by the selected theme. A theme's shape says * how a control's corners and a data table's corners, header and hairline * look (`primerComponentsCss`); its colours do the rest. Switch the theme - * (try `loop`: pills and a rounder table) and every one of them follows. + * (try `agent`: pills and a rounder table) and every one of them follows. */ import { useState, type ReactNode } from 'react'; diff --git a/examples/gallery/src/gallery/GalleryPage.tsx b/examples/gallery/src/gallery/GalleryPage.tsx index a0b15c6..8df347b 100644 --- a/examples/gallery/src/gallery/GalleryPage.tsx +++ b/examples/gallery/src/gallery/GalleryPage.tsx @@ -82,7 +82,7 @@ export function GalleryPage() { {activeDemo.description} - {/* The theme's card: its hairline and its corner (20px in loop), padded to match. */} + {/* The theme's card: its hairline and its corner (20px in agent), padded to match. */} {activeDemo.render()} diff --git a/src/components/appearance/AppearanceControls.tsx b/src/components/appearance/AppearanceControls.tsx index 462ead1..ec6f940 100644 --- a/src/components/appearance/AppearanceControls.tsx +++ b/src/components/appearance/AppearanceControls.tsx @@ -308,7 +308,7 @@ export function AppearanceControls({ size="small" onClick={() => setIsPreviewOpen((open) => !open)} aria-expanded={isPreviewOpen} - // The theme's control corner (Loop's pill), wherever the menu is drawn. + // The theme's control corner (Agent's pill), wherever the menu is drawn. sx={{ borderRadius: "var(--theme-radius-control, 6px)" }} > {isPreviewOpen ? "Hide preview" : "Show preview"} diff --git a/src/components/appearance/AppearanceMenu.stories.tsx b/src/components/appearance/AppearanceMenu.stories.tsx index 44859e2..f3d7b9e 100644 --- a/src/components/appearance/AppearanceMenu.stories.tsx +++ b/src/components/appearance/AppearanceMenu.stories.tsx @@ -121,11 +121,11 @@ export const CircleWithoutPreviews: Story = { /** * The colour mode alone: light, dark and auto, no theme swatches — the menu - * of a site that wears one theme (the Datalayer landing, on loop). + * of a site that wears one theme (the Datalayer landing, on agent). */ export const ColorModeOnly: Story = { args: { - themeVariant: "loop", + themeVariant: "agent", colorMode: "dark", showThemeChooser: false, }, diff --git a/src/components/appearance/CollaboratorPalette.stories.tsx b/src/components/appearance/CollaboratorPalette.stories.tsx index c2c2ca8..454aca2 100644 --- a/src/components/appearance/CollaboratorPalette.stories.tsx +++ b/src/components/appearance/CollaboratorPalette.stories.tsx @@ -61,9 +61,9 @@ export const ARoomOfFive: Story = { }; /** One theme in one mode, whatever the page wears. */ -export const LoopDark: Story = { +export const AgentDark: Story = { args: { - variant: "loop", + variant: "agent", colorMode: "dark", people: ROOM, }, diff --git a/src/components/appearance/ColorModeCircle.tsx b/src/components/appearance/ColorModeCircle.tsx index 9218b31..c50b97f 100644 --- a/src/components/appearance/ColorModeCircle.tsx +++ b/src/components/appearance/ColorModeCircle.tsx @@ -175,7 +175,7 @@ export function ColorModeCircle({ minWidth: size, width: size, height: size, - // A control like the theme's others: round on Loop, square on VS Code. + // A control like the theme's others: round on Agent, square on VS Code. borderRadius: shape === 'circle' ? '50%' : 'var(--theme-radius-control, 6px)', display: 'inline-flex', alignItems: 'center', diff --git a/src/components/appearance/ThemeCircle.stories.tsx b/src/components/appearance/ThemeCircle.stories.tsx index c751e53..86d576b 100644 --- a/src/components/appearance/ThemeCircle.stories.tsx +++ b/src/components/appearance/ThemeCircle.stories.tsx @@ -88,7 +88,7 @@ export const Default: Story = { /** Cycling through a chosen few. */ export const AFewThemes: Story = { args: { - themes: ["datalayer", "loop", "earth", "matrix"], + themes: ["datalayer", "agent", "earth", "matrix"], size: 36, }, render: (args) => , diff --git a/src/components/appearance/ThemePreviewCard.stories.tsx b/src/components/appearance/ThemePreviewCard.stories.tsx index b006c6b..3f9fa12 100644 --- a/src/components/appearance/ThemePreviewCard.stories.tsx +++ b/src/components/appearance/ThemePreviewCard.stories.tsx @@ -31,7 +31,7 @@ const meta = { }, }, args: { - variant: "loop", + variant: "agent", colorMode: "light", selected: false, compact: false, diff --git a/src/components/appearance/ThemePreviewCard.tsx b/src/components/appearance/ThemePreviewCard.tsx index dd4100a..27e91ef 100644 --- a/src/components/appearance/ThemePreviewCard.tsx +++ b/src/components/appearance/ThemePreviewCard.tsx @@ -68,7 +68,7 @@ export function ThemePreviewCard({ display: 'flex', alignItems: 'center', gap: 1, - // Clear of the card's corner, however round the theme draws it (Loop's). + // Clear of the card's corner, however round the theme draws it (Agent's). px: `calc(var(--theme-radius-card, 6px) / 2 + ${compact ? 6 : 8}px)`, py: compact ? '6px' : '8px', bg: 'canvas.default', diff --git a/src/components/appearance/__tests__/AppearanceColorModeOnly.test.tsx b/src/components/appearance/__tests__/AppearanceColorModeOnly.test.tsx index 424ffed..ebc394a 100644 --- a/src/components/appearance/__tests__/AppearanceColorModeOnly.test.tsx +++ b/src/components/appearance/__tests__/AppearanceColorModeOnly.test.tsx @@ -66,7 +66,7 @@ describe('the appearance controls without the theme chooser', () => { withStore={false} layout={layout} colorMode="dark" - themeVariant="loop" + themeVariant="agent" onColorModeChange={() => undefined} showThemeChooser={false} showThemePreviews @@ -89,7 +89,7 @@ describe('the appearance controls without the theme chooser', () => { undefined} onThemeChange={() => undefined} />, @@ -104,7 +104,7 @@ describe('the appearance controls without the theme chooser', () => { undefined} />, ), diff --git a/src/components/box/Box.stories.tsx b/src/components/box/Box.stories.tsx index 4d325d5..23d1f40 100644 --- a/src/components/box/Box.stories.tsx +++ b/src/components/box/Box.stories.tsx @@ -127,7 +127,7 @@ export const Colours: Story = { ), }; -/** Corners by name: Primer's four, then the theme's shapes (rounder in `loop`). */ +/** Corners by name: Primer's four, then the theme's shapes (rounder in `agent`). */ export const Corners: Story = { render: () => ( diff --git a/src/components/box/Box.tsx b/src/components/box/Box.tsx index e30a932..06c8506 100644 --- a/src/components/box/Box.tsx +++ b/src/components/box/Box.tsx @@ -47,7 +47,7 @@ * `boxShadow="shadow.medium"` is `var(--shadow-resting-medium)` — the table * is generated from Primer's color schemes (`boxTokens.ts`). A radius by * name is Primer's (`small`, `medium`, `large`, `full`) or the theme's shape - * (`control`, `card`, `bubble`, `frame`, LOOP T-03); a font weight by name + * (`control`, `card`, `bubble`, `frame`); a font weight by name * is the theme's weight variable. Space, font sizes, radii by index and * sizes are Primer's theme scales, written as pixels: they are the same in * every theme and need no variable. @@ -55,9 +55,9 @@ * No fallback: a page is drawn by its theme, and the theme provider sets * every variable `Box` emits (`BOX_EMITTED_VARS`, proven by a test against * every theme). A theme that wants a different hairline or corner sets it - * on Primer's variable — the `loop` theme's hairline *is* its + * on Primer's variable — the `agent` theme's hairline *is* its * `--borderColor-default` — never a call site with a - * `var(--loop-…, var(--…))` chain. + * `var(--agent-…, var(--…))` chain. * * ## The implementation: one class per style, no styled-components * diff --git a/src/components/box/__tests__/boxCss.test.ts b/src/components/box/__tests__/boxCss.test.ts index 08b7652..8b489c5 100644 --- a/src/components/box/__tests__/boxCss.test.ts +++ b/src/components/box/__tests__/boxCss.test.ts @@ -153,10 +153,10 @@ describe('the variables Box emits', () => { } } - it('give the loop theme its hairline on Primer\'s default border', () => { - const light = themeConfigs.loop.themeStyles.light as Record; - expect(light['--borderColor-default']).toBe(light['--loop-hairline']); - expect(light['--borderRadius-large']).toBe(light['--loop-radius-card']); + it('give the agent theme its hairline on Primer\'s default border', () => { + const light = themeConfigs.agent.themeStyles.light as Record; + expect(light['--borderColor-default']).toBe(light['--agent-hairline']); + expect(light['--borderRadius-large']).toBe(light['--agent-radius-card']); }); }); diff --git a/src/components/box/boxTokens.ts b/src/components/box/boxTokens.ts index 246fe7d..5a21345 100644 --- a/src/components/box/boxTokens.ts +++ b/src/components/box/boxTokens.ts @@ -92,7 +92,7 @@ export const BOX_FONT_SIZES = ['12px', '14px', '16px', '20px', '24px', '32px', ' /** Primer's radii by index (`borderRadius={2}` is 6px). */ export const BOX_RADII = ['0', '3px', '6px', '100px'] as const; -/** Radii by name: Primer's, and the theme's shapes (LOOP T-03), an overlay's among them. */ +/** Radii by name: Primer's, and the theme's shapes, an overlay's among them. */ export const BOX_RADIUS_VARS = { small: '--borderRadius-small', medium: '--borderRadius-medium', @@ -118,7 +118,7 @@ export const BOX_SIZES = { small: '544px', medium: '768px', large: '1012px', xla * names its weights 300, 400, 500, 600 — `light`, `normal`, `semibold`, * `bold` — which are the primitives' `light`, `normal`, `medium` and * `semibold`: so `semibold` is `--base-text-weight-medium` (500, and 600 in - * the `loop` theme, which has two weights), as it reads today. + * the `agent` theme, which has two weights), as it reads today. */ export const BOX_FONT_WEIGHT_VARS = { light: '--base-text-weight-light', diff --git a/src/components/calendar-picker/CalendarPicker.tsx b/src/components/calendar-picker/CalendarPicker.tsx index c998bd6..866ec85 100644 --- a/src/components/calendar-picker/CalendarPicker.tsx +++ b/src/components/calendar-picker/CalendarPicker.tsx @@ -232,7 +232,7 @@ export function CalendarPicker({ : isToday ? "var(--borderColor-default)" : "transparent", - // The theme's control corner: a pill in loop, Primer's medium elsewhere. + // The theme's control corner: a pill in agent, Primer's medium elsewhere. borderRadius: "var(--theme-radius-control)", height: 30, cursor: disabled ? "not-allowed" : "pointer", diff --git a/src/components/card/Card.tsx b/src/components/card/Card.tsx index e06c98a..afed97b 100644 --- a/src/components/card/Card.tsx +++ b/src/components/card/Card.tsx @@ -253,7 +253,7 @@ export type CardActionsProps = { } /** - * The corners, read from the theme: each theme sets Primer's radii (loop's + * The corners, read from the theme: each theme sets Primer's radii (agent's * are rounder), and a card left unsaid takes the theme's card corner. */ const CARD_RADIUS = 'card'; diff --git a/src/components/color/ColorSwatch.tsx b/src/components/color/ColorSwatch.tsx index 521b40a..295026b 100644 --- a/src/components/color/ColorSwatch.tsx +++ b/src/components/color/ColorSwatch.tsx @@ -75,7 +75,7 @@ export function ColorSwatch({ gridTemplateRows: `${height}px auto`, border: "1px solid", borderColor: "var(--borderColor-default)", - // The theme's card corner: 20px in loop, Primer's medium elsewhere. + // The theme's card corner: 20px in agent, Primer's medium elsewhere. borderRadius: "var(--theme-radius-card)", overflow: "hidden", minWidth: 0, diff --git a/src/components/entity-avatar/EntityAvatar.tsx b/src/components/entity-avatar/EntityAvatar.tsx index eec6511..2ba38ec 100644 --- a/src/components/entity-avatar/EntityAvatar.tsx +++ b/src/components/entity-avatar/EntityAvatar.tsx @@ -22,7 +22,7 @@ * profile's cards give one, with `fg.onEmphasis`. * * Its shape is the theme's too: a `circle` for a person, `rounded` for - * anything else — the theme's medium corner (rounder in `loop`), never more + * anything else — the theme's medium corner (rounder in `agent`), never more * than a little over a quarter of the avatar, so a small one stays a square * with soft corners rather than turning into a circle. * diff --git a/src/components/hover-card/HoverCard.tsx b/src/components/hover-card/HoverCard.tsx index 909035e..6326824 100644 --- a/src/components/hover-card/HoverCard.tsx +++ b/src/components/hover-card/HoverCard.tsx @@ -17,7 +17,7 @@ * - its **chevron** opens the large one, `HoverCardDetails`, over the page. * * Drawn by the theme: it is a `Card`, so its corner is the theme's card - * corner (rounder in `loop`, with nothing said here), its ground the + * corner (rounder in `agent`, with nothing said here), its ground the * overlay's, its hairline and shadow the theme's. * * @module components/hover-card/HoverCard diff --git a/src/components/logo/DatalayerLogo.stories.tsx b/src/components/logo/DatalayerLogo.stories.tsx index 8dfa461..d3d908f 100644 --- a/src/components/logo/DatalayerLogo.stories.tsx +++ b/src/components/logo/DatalayerLogo.stories.tsx @@ -56,7 +56,7 @@ export const Logo: Story = { export const Gradient: Story = { args: { gradient: true, - variant: "loop", + variant: "agent", }, render: (args) => ( diff --git a/src/components/logo/DatalayerLogo.tsx b/src/components/logo/DatalayerLogo.tsx index ab698e0..fd41be4 100644 --- a/src/components/logo/DatalayerLogo.tsx +++ b/src/components/logo/DatalayerLogo.tsx @@ -13,7 +13,7 @@ import { sandColors, ivoryColors, sunColors, - loopColors, + agentColors, metalColors, vscodeColors, type ThemeVariant, @@ -169,21 +169,21 @@ export const THEME_LOGO_COLORS: Record< secondaryGradient: [sunColors.sunHover, sunColors.sunAccent], }, }, - loop: { + agent: { // Flat: the theme has no gradient on a surface. light: { - primary: loopColors.loopAccent, - secondary: loopColors.ink, - textColor: loopColors.gray, - primaryGradient: [loopColors.loopAccent, loopColors.loopAccent], - secondaryGradient: [loopColors.ink, loopColors.ink], + primary: agentColors.agentAccent, + secondary: agentColors.ink, + textColor: agentColors.gray, + primaryGradient: [agentColors.agentAccent, agentColors.agentAccent], + secondaryGradient: [agentColors.ink, agentColors.ink], }, dark: { - primary: loopColors.loopBrand, - secondary: loopColors.inkDark, - textColor: loopColors.grayDark, - primaryGradient: [loopColors.loopBrand, loopColors.loopBrand], - secondaryGradient: [loopColors.inkDark, loopColors.inkDark], + primary: agentColors.agentBrand, + secondary: agentColors.inkDark, + textColor: agentColors.grayDark, + primaryGradient: [agentColors.agentBrand, agentColors.agentBrand], + secondaryGradient: [agentColors.inkDark, agentColors.inkDark], }, }, metal: { diff --git a/src/components/sheet/Sheet.tsx b/src/components/sheet/Sheet.tsx index bde70e3..b638744 100644 --- a/src/components/sheet/Sheet.tsx +++ b/src/components/sheet/Sheet.tsx @@ -5,7 +5,7 @@ /** * `Sheet`: a page on a canvas — the canvas colour, its hairline, the theme's - * card corner (20px in loop) and the shadow a sheet of paper has, lifted off + * card corner (20px in agent) and the shadow a sheet of paper has, lifted off * what is under it. The page layout draws its page with it; anything that * shows a page of its own (a document, a gallery entry, a preview) can too. * diff --git a/src/components/toolbar/ToolbarButton.tsx b/src/components/toolbar/ToolbarButton.tsx index fb5568d..72de9a1 100644 --- a/src/components/toolbar/ToolbarButton.tsx +++ b/src/components/toolbar/ToolbarButton.tsx @@ -110,7 +110,7 @@ export function ToolbarButton({ padding: printLabel ? "0 8px" : 0, margin: 0, border: "none", - // Follow the active theme: Loop makes controls pills, while every + // Follow the active theme: Agent makes controls pills, while every // other theme supplies its own control radius through the same token. borderRadius: "var(--theme-radius-control)", cursor: disabled ? "not-allowed" : "pointer", diff --git a/src/reactor/ThemePlugin.ts b/src/reactor/ThemePlugin.ts index 7df3566..c041f0a 100644 --- a/src/reactor/ThemePlugin.ts +++ b/src/reactor/ThemePlugin.ts @@ -10,7 +10,7 @@ * a menu — needs the same two lines of glue: `setupPrimerPortals()` before * anything portals, and again on every theme change so the portal root's * `data-color-mode` follows the application. Each host wrote them for itself - * (the music example at module load, the LOOP palette inside its build), and + * (the music example at module load, the Agent palette inside its build), and * each copy was one theme-change subscription short: a palette opened after a * toggle wore the mode the page started in. * diff --git a/src/reactor/__tests__/pagePanelMotion.test.ts b/src/reactor/__tests__/pagePanelMotion.test.ts index 6faf524..5c77615 100644 --- a/src/reactor/__tests__/pagePanelMotion.test.ts +++ b/src/reactor/__tests__/pagePanelMotion.test.ts @@ -4,7 +4,7 @@ */ /** - * The page layout's panel opening at the theme's pace (LOOP T-10): from its + * The page layout's panel opening at the theme's pace: from its * side, by `--theme-motion-pane` and `--theme-motion-easing` — no motion in * a theme that sets none, none when motion is reduced. */ @@ -38,7 +38,7 @@ describe('a panel opening', () => { it('moves only in a theme that sets a pane duration', () => { const pane = (name: keyof typeof themeConfigs) => (themeConfigs[name].themeStyles.light as Record)['--theme-motion-pane']; - expect(pane('loop')).toBe('320ms'); + expect(pane('agent')).toBe('320ms'); expect(pane('datalayer')).toBe('0ms'); }); }); diff --git a/src/reactor/index.ts b/src/reactor/index.ts index 96b293a..640d899 100644 --- a/src/reactor/index.ts +++ b/src/reactor/index.ts @@ -22,7 +22,7 @@ * along as a dependency. `PageLayoutPlugin` arranges a host's slots as a * page: the work on a centred sheet, a band above it, a side panel opened * from the header — and the layout, its toggle and its signals are exported - * on their own for a host that wires the parts itself, as the Loop does. + * on their own for a host that wires the parts itself, as the Agent workspace does. * * @module reactor */ diff --git a/src/reactor/page-layout/PageLayout.tsx b/src/reactor/page-layout/PageLayout.tsx index 4814482..4c39324 100644 --- a/src/reactor/page-layout/PageLayout.tsx +++ b/src/reactor/page-layout/PageLayout.tsx @@ -37,7 +37,7 @@ * card over the first lines. * * Nothing here decides what the parts do. A host wires them; this arranges - * them. It grew up as the Loop's page layout, where the page is a notebook or + * them. It grew up as the Agent workspace's page layout, where the page is a notebook or * a document, the band is the composer and the panel is the conversation; * the names here are the general ones. * @@ -169,7 +169,7 @@ function ActivityLine({ label }: { label: string }): JSX.Element { /** * A panel opening from its side at the theme's pace: `--theme-motion-pane` * and `--theme-motion-easing`, which every theme sets — to no motion at all - * but in `loop` (LOOP T-10). The animation starts when the panel is shown. + * but in `agent`. The animation starts when the panel is shown. */ export function panelOpening(side: "left" | "right"): Record { const name = side === "left" ? "pagePanelOpenLeft" : "pagePanelOpenRight"; @@ -555,7 +555,7 @@ export function PageLayout({ display: "flex", flexDirection: "column", "& > *": { flex: "1 1 auto", minHeight: 0 }, - // A pane opening, at the theme's pace (LOOP T-10): from its + // A pane opening, at the theme's pace: from its // side, by the theme's motion tokens — none in a theme that // sets no motion, none when motion is reduced. On the // content, not the column: a transform on the column would diff --git a/src/reactor/page-layout/PageLayoutPlugin.ts b/src/reactor/page-layout/PageLayoutPlugin.ts index c3a3bef..137703f 100644 --- a/src/reactor/page-layout/PageLayoutPlugin.ts +++ b/src/reactor/page-layout/PageLayoutPlugin.ts @@ -14,9 +14,9 @@ * and closes the panel goes in the header — only while something fills the * panel slot, so a host with no panel gets no dead button. * - * This is the Loop's page layout with the Loop taken out: there the chat + * This is the Agent workspace's page layout with the workspace taken out: there the chat * view hands the layout its parts directly through a contribution point of - * its own, and the Loop keeps that adapter. Here the parts are slots, which + * its own, and the workspace keeps that adapter. Here the parts are slots, which * is what a plain Reactor host has. * * @module reactor/page-layout/PageLayoutPlugin diff --git a/src/theme/DatalayerThemeProvider.tsx b/src/theme/DatalayerThemeProvider.tsx index 4e36826..93352e8 100644 --- a/src/theme/DatalayerThemeProvider.tsx +++ b/src/theme/DatalayerThemeProvider.tsx @@ -260,7 +260,7 @@ export function DatalayerThemeProvider( // Not before the DOM has been read: the first commit's effects run before // the update that says whether this provider is nested, and a nested one // — an application embedded in another product's page, in its own shadow - // root (LOOP T-13) — wrote its theme on that page's before it knew. + // root — wrote its theme on that page's before it knew. useEffect(() => { if (!placed || nested) { // Another provider owns the page's portal root; see above. diff --git a/src/theme/__tests__/loopClean.test.ts b/src/theme/__tests__/agentClean.test.ts similarity index 67% rename from src/theme/__tests__/loopClean.test.ts rename to src/theme/__tests__/agentClean.test.ts index e909d91..fa14334 100644 --- a/src/theme/__tests__/loopClean.test.ts +++ b/src/theme/__tests__/agentClean.test.ts @@ -4,21 +4,21 @@ */ /** - * The rules of clean (LOOP T-17), where the theme itself can be held to + * The rules of clean, where the theme itself can be held to * them: no gradient but the stage's, the one shadow a component draws, two - * weights, links plain in a message. The rest is for review (Q-09), and is + * weights, links plain in a message. The rest is for review, and is * written in the README's *The rules of clean*. */ import { describe, expect, it } from 'vitest'; import { themeConfigs } from '../themeRegistry'; -import { loopControlsCss, loopFontWeights, loopTheme } from '../themes/loopTheme'; +import { agentControlsCss, agentFontWeights, agentTheme } from '../themes/agentTheme'; const modes = ['light', 'dark'] as const; const styles = (mode: (typeof modes)[number]) => - themeConfigs.loop.themeStyles[mode] as Record; + themeConfigs.agent.themeStyles[mode] as Record; -describe('the loop theme, by the rules of clean', () => { +describe('the agent theme, by the rules of clean', () => { it('has no gradient but the stage', () => { for (const mode of modes) { const gradients = Object.entries(styles(mode)) @@ -26,18 +26,18 @@ describe('the loop theme, by the rules of clean', () => { .map(([key]) => key); expect(gradients, mode).toEqual(['--theme-stage-gradient']); } - expect(loopControlsCss).not.toMatch(/gradient\(/); + expect(agentControlsCss).not.toMatch(/gradient\(/); }); it("draws one shadow, the frame's, wherever a component asks the theme for one", () => { for (const mode of modes) { - expect(styles(mode)['--theme-shadow'], mode).toBe(styles(mode)['--loop-shadow-frame']); + expect(styles(mode)['--theme-shadow'], mode).toBe(styles(mode)['--agent-shadow-frame']); } - expect(loopControlsCss).not.toMatch(/box-shadow/); + expect(agentControlsCss).not.toMatch(/box-shadow/); }); it('has two weights', () => { - expect(Object.values(loopFontWeights)).toEqual([400, 600]); + expect(Object.values(agentFontWeights)).toEqual([400, 600]); const weights = new Set( Object.entries(styles('light')) .filter(([key]) => /^--text-.*-shorthand/.test(key)) @@ -45,8 +45,8 @@ describe('the loop theme, by the rules of clean', () => { ); expect([...weights].sort()).toEqual([400, 600]); // And what `sx` reads by name: Primer's semibold is 500, its light 300. - expect(loopTheme.fontWeights).toEqual({ light: 400, normal: 400, semibold: 600, bold: 600 }); - expect(themeConfigs.loop.primerTheme.fontWeights).toEqual(loopTheme.fontWeights); + expect(agentTheme.fontWeights).toEqual({ light: 400, normal: 400, semibold: 600, bold: 600 }); + expect(themeConfigs.agent.primerTheme.fontWeights).toEqual(agentTheme.fontWeights); }); it('writes a link in a message plain: the colour of its words', () => { diff --git a/src/theme/__tests__/loopContrast.test.ts b/src/theme/__tests__/agentContrast.test.ts similarity index 65% rename from src/theme/__tests__/loopContrast.test.ts rename to src/theme/__tests__/agentContrast.test.ts index 7fc2207..53f1f1b 100644 --- a/src/theme/__tests__/loopContrast.test.ts +++ b/src/theme/__tests__/agentContrast.test.ts @@ -4,16 +4,16 @@ */ /** - * Contrast, tested (LOOP T-15): every accent of the theme system, in both + * Contrast, tested: every accent of the theme system, in both * modes, for text on a bubble, on a pill and on the stage — 4.5 to 1, WCAG * AA for body text. A failure fails the build. */ import { describe, expect, it } from 'vitest'; -import { loopColors } from '../colors/loopColors'; +import { agentColors } from '../colors/agentColors'; import { themeAccentNames, themeAccentVars, themeAccents } from '../colors/themeAccents'; import { themeConfigs } from '../themeRegistry'; -import { loopDark, loopFocusRing, loopLight, loopMotionVars } from '../themes/loopTheme'; +import { agentDark, agentFocusRing, agentLight, agentMotionVars } from '../themes/agentTheme'; /** The relative luminance of an sRGB colour, as WCAG 2.x defines it. */ export function luminance(hex: string): number { @@ -31,7 +31,7 @@ export function contrast(a: string, b: string): number { const AA = 4.5; -describe('the loop theme’s contrast', () => { +describe('the agent theme’s contrast', () => { it('measures as WCAG does', () => { expect(contrast('#000000', '#FFFFFF')).toBeCloseTo(21, 5); expect(contrast('#777777', '#FFFFFF')).toBeCloseTo(4.48, 2); @@ -44,60 +44,60 @@ describe('the loop theme’s contrast', () => { expect(contrast(accent.on, accent.accent)).toBeGreaterThanOrEqual(AA); }); it(`${name}: the text on the stage, light and dark`, () => { - expect(contrast(loopColors.ink, accent.stage.light)).toBeGreaterThanOrEqual(AA); - expect(contrast(loopColors.inkDark, accent.stage.dark)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.ink, accent.stage.light)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.inkDark, accent.stage.dark)).toBeGreaterThanOrEqual(AA); // And on the quiet tint, where a reply sits. - expect(contrast(loopColors.ink, accent.quiet.light)).toBeGreaterThanOrEqual(AA); - expect(contrast(loopColors.inkDark, accent.quiet.dark)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.ink, accent.quiet.light)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.inkDark, accent.quiet.dark)).toBeGreaterThanOrEqual(AA); }); } it('shows its focus ring on the surface and around every pill (3 to 1)', () => { - expect(contrast(loopFocusRing.light, loopColors.white)).toBeGreaterThanOrEqual(3); - expect(contrast(loopFocusRing.dark, loopColors.black)).toBeGreaterThanOrEqual(3); + expect(contrast(agentFocusRing.light, agentColors.white)).toBeGreaterThanOrEqual(3); + expect(contrast(agentFocusRing.dark, agentColors.black)).toBeGreaterThanOrEqual(3); for (const name of themeAccentNames) { - expect(contrast(loopFocusRing.light, themeAccents[name].accent)).toBeGreaterThanOrEqual(3); - expect(contrast(loopFocusRing.dark, themeAccents[name].accent)).toBeGreaterThanOrEqual(3); + expect(contrast(agentFocusRing.light, themeAccents[name].accent)).toBeGreaterThanOrEqual(3); + expect(contrast(agentFocusRing.dark, themeAccents[name].accent)).toBeGreaterThanOrEqual(3); } // The subtle dark surface is the one place the dark ring falls short. - expect(contrast(loopFocusRing.dark, loopColors.subtleDark)).toBeGreaterThanOrEqual(2.7); + expect(contrast(agentFocusRing.dark, agentColors.subtleDark)).toBeGreaterThanOrEqual(2.7); }); - it('moves at three durations and one easing (T-10)', () => { - const durations = Object.entries(loopMotionVars).filter(([, value]) => value.endsWith('ms')); + it('moves at three durations and one easing', () => { + const durations = Object.entries(agentMotionVars).filter(([, value]) => value.endsWith('ms')); expect(durations.map(([key]) => key).sort()).toEqual([ - '--loop-motion-message', - '--loop-motion-pane', - '--loop-motion-status', + '--agent-motion-message', + '--agent-motion-pane', + '--agent-motion-status', ]); - expect(Object.keys(loopMotionVars)).toContain('--loop-motion-easing'); + expect(Object.keys(agentMotionVars)).toContain('--agent-motion-easing'); }); it('fills the one button of a screen in the accent, readable in both modes', () => { // Both modes: the mint pastel, with its dark text — rest, hovered, pressed. - expect(loopColors.loopBrand).toBe(themeAccents.green.accent); - expect(contrast(loopColors.loopOn, loopColors.loopBrand)).toBeGreaterThanOrEqual(AA); - expect(contrast(loopColors.loopOn, loopColors.loopBrandHover)).toBeGreaterThanOrEqual(AA); - expect(contrast(loopColors.loopOn, loopColors.loopAccent)).toBeGreaterThanOrEqual(AA); + expect(agentColors.agentBrand).toBe(themeAccents.green.accent); + expect(contrast(agentColors.agentOn, agentColors.agentBrand)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.agentOn, agentColors.agentBrandHover)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.agentOn, agentColors.agentAccent)).toBeGreaterThanOrEqual(AA); // The accent's fill is the button's, in both modes, and the button's text // reads on it: the chat draws the person's bubble from that pair. - for (const mode of [loopLight, loopDark]) { + for (const mode of [agentLight, agentDark]) { expect(mode.accent.emphasis).toBe(mode.btn.primary.bg); expect(contrast(mode.btn.primary.text, mode.accent.emphasis)).toBeGreaterThanOrEqual(AA); } // The accent's text on white. - expect(contrast(loopColors.loopText, loopColors.white)).toBeGreaterThanOrEqual(AA); - expect(contrast(loopColors.loopHover, loopColors.white)).toBeGreaterThanOrEqual(AA); - expect(contrast(loopColors.loopOn, loopColors.loopBright)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.agentText, agentColors.white)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.agentHover, agentColors.white)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.agentOn, agentColors.agentBright)).toBeGreaterThanOrEqual(AA); }); it('keeps the secondary text readable on the surfaces', () => { - expect(contrast(loopColors.gray, loopColors.white)).toBeGreaterThanOrEqual(AA); - expect(contrast(loopColors.grayDark, loopColors.black)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.gray, agentColors.white)).toBeGreaterThanOrEqual(AA); + expect(contrast(agentColors.grayDark, agentColors.black)).toBeGreaterThanOrEqual(AA); }); }); -describe("an application's accent, everything it colours (T-05)", () => { +describe("an application's accent, everything it colours", () => { it('fills the bubble and the button with the accent, its own text on it', () => { for (const name of themeAccentNames) { for (const mode of ['light', 'dark'] as const) { @@ -109,13 +109,13 @@ describe("an application's accent, everything it colours (T-05)", () => { contrast(styles['--button-primary-fgColor-rest'], styles['--button-primary-bgColor-rest']), ).toBeGreaterThanOrEqual(AA); expect(styles['--theme-stage']).toBe(themeAccents[name].stage[mode]); - // The selected tab, underlined in the accent rather than Primer's coral (T-14). + // The selected tab, underlined in the accent rather than Primer's coral. expect(styles['--underlineNav-borderColor-active']).toBe(themeAccents[name].accent); } } }); - it('writes its text in its own hue, readable in both modes (T-18)', () => { + it('writes its text in its own hue, readable in both modes', () => { for (const name of themeAccentNames) { const light = themeAccentVars(name, 'light'); const dark = themeAccentVars(name, 'dark'); @@ -123,8 +123,8 @@ describe("an application's accent, everything it colours (T-05)", () => { expect(light['--fgColor-accent']).toBe(themeAccents[name].text.light); expect(light['--fgColor-link']).toBe(themeAccents[name].text.light); expect(dark['--fgColor-accent']).toBe(themeAccents[name].text.dark); - expect(contrast(light['--fgColor-accent'], loopColors.white)).toBeGreaterThanOrEqual(AA); - expect(contrast(dark['--fgColor-accent'], loopColors.black)).toBeGreaterThanOrEqual(AA); + expect(contrast(light['--fgColor-accent'], agentColors.white)).toBeGreaterThanOrEqual(AA); + expect(contrast(dark['--fgColor-accent'], agentColors.black)).toBeGreaterThanOrEqual(AA); expect(contrast(dark['--fgColor-accent'], themeAccents[name].quiet.dark)).toBeGreaterThanOrEqual(AA); if (name !== 'green') { expect(contrast(light['--fgColor-accent'], themeAccents[name].quiet.light)).toBeGreaterThanOrEqual(AA); @@ -135,13 +135,13 @@ describe("an application's accent, everything it colours (T-05)", () => { }); it('leaves mint, the default, as the theme has it', () => { - expect(themeAccents.green.text).toEqual({ light: loopColors.loopText, dark: loopColors.loopBright }); - expect(themeAccents.green.quiet).toEqual({ light: loopColors.loopTint, dark: loopColors.loopTintDark }); - expect(loopLight.accent.fg).toBe(themeAccents.green.text.light); - expect(loopDark.accent.fg).toBe(themeAccents.green.text.dark); + expect(themeAccents.green.text).toEqual({ light: agentColors.agentText, dark: agentColors.agentBright }); + expect(themeAccents.green.quiet).toEqual({ light: agentColors.agentTint, dark: agentColors.agentTintDark }); + expect(agentLight.accent.fg).toBe(themeAccents.green.text.light); + expect(agentDark.accent.fg).toBe(themeAccents.green.text.dark); }); - it('colours every theme, not loop alone (decided 2026-10-07)', () => { + it('colours every theme, not agent alone (decided 2026-10-07)', () => { for (const [variant, config] of Object.entries(themeConfigs)) { for (const mode of ['light', 'dark'] as const) { const worn = { ...(config.themeStyles[mode] as Record), ...themeAccentVars('rose', mode) }; @@ -162,11 +162,11 @@ describe("an application's accent, everything it colours (T-05)", () => { } } } - // Loop's own is mint, its stage and quiet tint included. - const loop = themeConfigs.loop.themeStyles.light as Record; - expect(loop['--theme-accent']).toBe(themeAccents.green.accent); - expect(loop['--theme-stage']).toBe(themeAccents.green.stage.light); - expect(loop['--theme-quiet']).toBe(themeAccents.green.quiet.light); + // Agent's own is mint, its stage and quiet tint included. + const agent = themeConfigs.agent.themeStyles.light as Record; + expect(agent['--theme-accent']).toBe(themeAccents.green.accent); + expect(agent['--theme-stage']).toBe(themeAccents.green.stage.light); + expect(agent['--theme-quiet']).toBe(themeAccents.green.quiet.light); }); it('refuses an accent that is not one of the six', () => { diff --git a/src/theme/__tests__/loopType.test.ts b/src/theme/__tests__/agentType.test.ts similarity index 86% rename from src/theme/__tests__/loopType.test.ts rename to src/theme/__tests__/agentType.test.ts index 892a74b..cdc9a1a 100644 --- a/src/theme/__tests__/loopType.test.ts +++ b/src/theme/__tests__/agentType.test.ts @@ -4,7 +4,7 @@ */ /** - * The `loop` theme's type (LOOP T-04): one face, served from the page's own + * The `agent` theme's type: one face, served from the page's own * build with a metric-matched fallback; two weights; five sizes, one * line-height per size. */ @@ -13,10 +13,10 @@ import { readFileSync } from 'fs'; import { join } from 'path'; import { describe, expect, it } from 'vitest'; import { themeConfigs } from '../themeRegistry'; -import { loopFontFamily } from '../themes/loopTheme'; +import { agentFontFamily } from '../themes/agentTheme'; -const styles = themeConfigs.loop.themeStyles; -const face = readFileSync(join(__dirname, '..', '..', '..', 'style', 'loop-face.css'), 'utf8'); +const styles = themeConfigs.agent.themeStyles; +const face = readFileSync(join(__dirname, '..', '..', '..', 'style', 'agent-face.css'), 'utf8'); /** Every `--text-*-shorthand` of a mode, as weight, size and line-height. */ const shorthands = (mode: Record) => @@ -28,11 +28,11 @@ const shorthands = (mode: Record) => return { name, weight: match[1], size: match[2], lineHeight: match[3], family: match[4] }; }); -describe('the loop theme type', () => { +describe('the agent theme type', () => { it('names Inter, then its fallback, then the system face', () => { - expect(loopFontFamily.startsWith('"Inter Variable", "Inter Fallback", ')).toBe(true); - expect(loopFontFamily).toMatch(/system-ui/); - expect(loopFontFamily.trim().endsWith('sans-serif')).toBe(true); + expect(agentFontFamily.startsWith('"Inter Variable", "Inter Fallback", ')).toBe(true); + expect(agentFontFamily).toMatch(/system-ui/); + expect(agentFontFamily.trim().endsWith('sans-serif')).toBe(true); }); for (const mode of ['light', 'dark'] as const) { @@ -40,7 +40,7 @@ describe('the loop theme type', () => { const mine = styles[mode] as Record; const all = shorthands(mine); expect(all.length).toBeGreaterThanOrEqual(9); - for (const one of all) expect(one.family).toBe(loopFontFamily); + for (const one of all) expect(one.family).toBe(agentFontFamily); expect(new Set(all.map(one => one.size)).size).toBe(5); const lineOf = new Map(); for (const one of all) { diff --git a/src/theme/__tests__/metalTheme.test.ts b/src/theme/__tests__/metalTheme.test.ts index 6397680..fdbc281 100644 --- a/src/theme/__tests__/metalTheme.test.ts +++ b/src/theme/__tests__/metalTheme.test.ts @@ -6,7 +6,7 @@ import { describe, expect, it } from 'vitest'; import { metalColors } from '../colors/metalColors'; import { themeConfigs, themeVariants } from '../themeRegistry'; -import { loopThemeStyles } from '../themes/loopThemeStyles'; +import { agentThemeStyles } from '../themes/agentThemeStyles'; import { metalDark, metalLight, metalThemeStyles } from '../themes/metalThemeStyles'; const channel = (value: number): number => { @@ -23,18 +23,18 @@ const contrast = (a: string, b: string): number => { }; describe('the metal theme', () => { - it('is in the list of themes, between Loop and VS Code', () => { + it('is in the list of themes, between Agent and VS Code', () => { const at = themeVariants.indexOf('metal'); - expect(themeVariants[at - 1]).toBe('loop'); + expect(themeVariants[at - 1]).toBe('agent'); expect(themeVariants[at + 1]).toBe('vscode'); expect(themeConfigs.metal.label).toBe('Metal'); }); - it('keeps every curve of Loop', () => { - const curves = (styles: typeof loopThemeStyles, mode: 'light' | 'dark') => + it('keeps every curve of Agent', () => { + const curves = (styles: typeof agentThemeStyles, mode: 'light' | 'dark') => Object.entries(styles[mode] as Record).filter(([name]) => /radius/i.test(name)); for (const mode of ['light', 'dark'] as const) { - expect(curves(metalThemeStyles, mode)).toEqual(curves(loopThemeStyles, mode)); + expect(curves(metalThemeStyles, mode)).toEqual(curves(agentThemeStyles, mode)); } }); diff --git a/src/theme/__tests__/paletteColors.test.ts b/src/theme/__tests__/paletteColors.test.ts index 92fc907..d9599a2 100644 --- a/src/theme/__tests__/paletteColors.test.ts +++ b/src/theme/__tests__/paletteColors.test.ts @@ -73,7 +73,7 @@ describe('the palette names', () => { it('change a hue with the mode, and a role with the theme', () => { expect(getColorPalette('datalayer', 'light').indigo).not.toBe(getColorPalette('datalayer', 'dark').indigo); - expect(getColorPalette('loop', 'dark').violet).toBe('#C0AEF6'); + expect(getColorPalette('agent', 'dark').violet).toBe('#C0AEF6'); expect(getColorPalette('earth', 'dark').surge).not.toBe(getColorPalette('sand', 'dark').surge); }); }); diff --git a/src/theme/__tests__/portable.test.ts b/src/theme/__tests__/portable.test.ts index b807b3a..9bb032d 100644 --- a/src/theme/__tests__/portable.test.ts +++ b/src/theme/__tests__/portable.test.ts @@ -35,8 +35,8 @@ describe('the portable theme entry', () => { it('carries each theme\'s own tokens', async () => { const { themeTokens } = await import('../themeTokens'); - expect(themeTokens.loop.themeStyles.light).toHaveProperty('--loop-radius-control'); + expect(themeTokens.agent.themeStyles.light).toHaveProperty('--agent-radius-control'); expect(themeTokens.datalayer.defaultColorMode).toBe('auto'); - expect(Object.keys(themeTokens.loop)).not.toContain('primerTheme'); + expect(Object.keys(themeTokens.agent)).not.toContain('primerTheme'); }); }); diff --git a/src/theme/__tests__/themeShape.test.ts b/src/theme/__tests__/themeShape.test.ts index 2570ab4..1621d07 100644 --- a/src/theme/__tests__/themeShape.test.ts +++ b/src/theme/__tests__/themeShape.test.ts @@ -4,7 +4,7 @@ */ /** - * Shape as theme tokens (LOOP T-03): what a theme may set besides colour and + * Shape as theme tokens: what a theme may set besides colour and * type — radii, the hairline, one shadow. The eight themes that existed * before keep every value they had: proven against a snapshot of each, * taken before the shape tokens existed. @@ -15,7 +15,7 @@ import { themeConfigs } from '../themeRegistry'; import { DEFAULT_THEME_SHAPE } from '../css/createThemeCSSVars'; import { roundedRadiusVars } from '../themes/roundedShape'; -/** The themes, beside loop and metal, rounded since 21 November 2026. */ +/** The themes, beside agent and metal, rounded since 21 November 2026. */ const ROUNDED = ['sand', 'ivory', 'sun']; /** A theme's styles, without the tokens added since the snapshot was taken. */ @@ -53,23 +53,23 @@ describe('the shape of a theme', () => { expect((themeConfigs.datalayer.themeStyles.light as Record)['--theme-radius-control']).toBe( DEFAULT_THEME_SHAPE.radiusControl, ); - // The loop theme's own: a pill. - expect((themeConfigs.loop.themeStyles.light as Record)['--theme-radius-control']).toBe('999px'); - // Nothing moves but in a theme that says so (T-10). + // The agent theme's own: a pill. + expect((themeConfigs.agent.themeStyles.light as Record)['--theme-radius-control']).toBe('999px'); + // Nothing moves but in a theme that says so. expect((themeConfigs.datalayer.themeStyles.light as Record)['--theme-motion-message']).toBe('0ms'); - expect((themeConfigs.loop.themeStyles.dark as Record)['--theme-motion-message']).toBe('200ms'); - // A link in a message: the accent, but plain in loop (T-06). + expect((themeConfigs.agent.themeStyles.dark as Record)['--theme-motion-message']).toBe('200ms'); + // A link in a message: the accent, but plain in agent. expect((themeConfigs.datalayer.themeStyles.light as Record)['--theme-message-link']).toBe( DEFAULT_THEME_SHAPE.messageLink, ); - expect((themeConfigs.loop.themeStyles.light as Record)['--theme-message-link']).toBe('currentColor'); - expect((themeConfigs.loop.themeStyles.dark as Record)['--theme-message-link']).toBe('currentColor'); + expect((themeConfigs.agent.themeStyles.light as Record)['--theme-message-link']).toBe('currentColor'); + expect((themeConfigs.agent.themeStyles.dark as Record)['--theme-message-link']).toBe('currentColor'); }); }); describe('the themes that existed before the shape tokens', () => { const names = Object.keys(themeConfigs) - .filter(name => !['loop', 'metal', 'vscode', ...ROUNDED].includes(name)) + .filter(name => !['agent', 'metal', 'vscode', ...ROUNDED].includes(name)) .sort(); it('are five that keep their shape, and the three made rounded', () => { @@ -105,9 +105,9 @@ describe('the themes that existed before the shape tokens', () => { expect(datalayer['--theme-table-header-bg']).toBe('var(--bgColor-muted)'); expect(datalayer['--theme-table-border']).toBe('var(--borderColor-default)'); expect(datalayer['--theme-radius-overlay']).toBe('var(--borderRadius-large, 12px)'); - expect((themeConfigs.loop.themeStyles.light as Record)['--theme-radius-overlay']).toBe('20px'); - // The loop theme's tables have the corners of its list items. - expect((themeConfigs.loop.themeStyles.dark as Record)['--theme-radius-table']).toBe('14px'); + expect((themeConfigs.agent.themeStyles.light as Record)['--theme-radius-overlay']).toBe('20px'); + // The agent theme's tables have the corners of its list items. + expect((themeConfigs.agent.themeStyles.dark as Record)['--theme-radius-table']).toBe('14px'); }); }); @@ -121,19 +121,19 @@ describe('the rounded shape', () => { '--theme-radius-overlay', ]; - it('is the same in loop, metal, sand, ivory and sun, in both modes', () => { - const loop = themeConfigs.loop.themeStyles.light as Record; + it('is the same in agent, metal, sand, ivory and sun, in both modes', () => { + const agent = themeConfigs.agent.themeStyles.light as Record; for (const name of ['metal', ...ROUNDED] as (keyof typeof themeConfigs)[]) { for (const mode of ['light', 'dark'] as const) { const styles = themeConfigs[name].themeStyles[mode] as Record; for (const key of [...RADII, ...Object.keys(roundedRadiusVars)]) { - expect(styles[key], `${name} ${mode} ${key}`).toBe(loop[key]); + expect(styles[key], `${name} ${mode} ${key}`).toBe(agent[key]); } } // Its pill controls drawn by the stylesheet. expect(themeConfigs[name].themeStyles.css, name).toContain('var(--theme-radius-control)'); } - expect(loop['--theme-radius-control']).toBe('999px'); - expect(loop['--borderRadius-medium']).toBe('14px'); + expect(agent['--theme-radius-control']).toBe('999px'); + expect(agent['--borderRadius-medium']).toBe('14px'); }); }); diff --git a/src/theme/__tests__/themeStylesheet.test.tsx b/src/theme/__tests__/themeStylesheet.test.tsx index 01df1de..966a12c 100644 --- a/src/theme/__tests__/themeStylesheet.test.tsx +++ b/src/theme/__tests__/themeStylesheet.test.tsx @@ -6,9 +6,9 @@ // @vitest-environment jsdom /** - * A theme's own stylesheet (LOOP T-09): injected by the theme provider for + * A theme's own stylesheet: injected by the theme provider for * its element and for the portal root, removed when the theme changes; none - * for a theme that has none. And the `loop` theme's: its controls as pills, + * for a theme that has none. And the `agent` theme's: its controls as pills, * through selectors that still match the installed Primer. */ @@ -20,7 +20,7 @@ import { createRoot, type Root } from 'react-dom/client'; import { afterEach, beforeAll, describe, expect, it, vi } from 'vitest'; import { DatalayerThemeProvider } from '../DatalayerThemeProvider'; import { themeConfigs, type ThemeVariant } from '../themeRegistry'; -import { loopControlsCss } from '../themes/loopTheme'; +import { agentControlsCss } from '../themes/agentTheme'; import { primerComponentSelectors, primerComponentsCss } from '../css/primerComponentsCss'; import { PRIMER_PORTAL_ROOT_ID, @@ -83,10 +83,10 @@ const themed = (variant: ThemeVariant, children?: React.ReactNode) => ( ); // Sand, ivory and sun draw their pill controls from the rounded shape. -const WITH_STYLESHEET = ['loop', 'metal', 'vscode', 'sand', 'ivory', 'sun']; +const WITH_STYLESHEET = ['agent', 'metal', 'vscode', 'sand', 'ivory', 'sun']; describe('a theme without a stylesheet', () => { - it('is every theme but loop, metal, vscode, sand, ivory and sun', () => { + it('is every theme but agent, metal, vscode, sand, ivory and sun', () => { for (const [name, config] of Object.entries(themeConfigs)) { expect(config.themeStyles.css !== undefined, name).toBe(WITH_STYLESHEET.includes(name)); } @@ -102,7 +102,7 @@ describe('a theme without a stylesheet', () => { describe('a theme with a stylesheet', () => { it('is injected once, for its element and for the portal root', () => { - render(themed('loop')); + render(themed('agent')); const sheets = stylesheets(); expect(sheets).toHaveLength(1); const scope = sheets[0].getAttribute(THEME_STYLESHEET_ATTRIBUTE)!; @@ -112,15 +112,15 @@ describe('a theme with a stylesheet', () => { expect(text).toContain(`@scope (#${PRIMER_PORTAL_ROOT_ID})`); // Stopping at any provider nested inside. expect(text).toContain(`to ([${THEME_SCOPE_ATTRIBUTE}]:not(`); - expect(text).toContain(loopControlsCss); + expect(text).toContain(agentControlsCss); }); it('is removed when the theme changes, and when the provider goes', () => { - render(themed('loop')); + render(themed('agent')); expect(stylesheets()).toHaveLength(1); render(themed('datalayer')); expect(stylesheets()).toHaveLength(0); - render(themed('loop')); + render(themed('agent')); expect(stylesheets()).toHaveLength(1); act(() => root?.unmount()); root = null; @@ -128,12 +128,12 @@ describe('a theme with a stylesheet', () => { }); it('is not written on the page by a provider inside a themed element, not even once', () => { - // An application embedded in another product's page (LOOP T-13): the + // An application embedded in another product's page: the // page's and its portal root are the page's. document.body.removeAttribute('style'); document.body.removeAttribute('data-color-mode'); document.getElementById(PRIMER_PORTAL_ROOT_ID)?.remove(); - render(
{themed('loop')}
); + render(
{themed('agent')}
); expect(document.body.getAttribute('style') ?? '').toBe(''); expect(document.body.getAttribute('data-color-mode')).toBeNull(); expect(document.getElementById(PRIMER_PORTAL_ROOT_ID)).toBeNull(); @@ -147,7 +147,7 @@ describe('a theme with a stylesheet', () => { document.getElementById(PRIMER_PORTAL_ROOT_ID)?.remove(); render(
- {themed('loop')} + {themed('agent')}
, ); expect(document.getElementById(PRIMER_PORTAL_ROOT_ID)).not.toBeNull(); @@ -157,14 +157,14 @@ describe('a theme with a stylesheet', () => { }); it('is not injected for the portal root by a nested provider', () => { - render(themed('datalayer', themed('loop'))); + render(themed('datalayer', themed('agent'))); const sheets = stylesheets(); expect(sheets).toHaveLength(1); expect(sheets[0].textContent).not.toContain(PRIMER_PORTAL_ROOT_ID); }); }); -/* ─── The loop theme's selectors, against the installed Primer ─────── */ +/* ─── The agent theme's selectors, against the installed Primer ─────── */ const primerLib = dirname(createRequire(import.meta.url).resolve('@primer/react')); @@ -229,10 +229,10 @@ describe("the theme's drawing of Primer's components", () => { expect(header).toContain(`:scope ${s.tableHeader},\n:scope ${s.tableCell} {\n border-color: var(--theme-table-border);\n}`); }); - it("is the loop theme's, from its shape: pills and rounder tables, then its own rules", () => { - expect(loopControlsCss).toContain('border-radius: var(--theme-radius-control);'); - expect(loopControlsCss).toContain('--table-border-radius: var(--theme-radius-table);'); - expect(loopControlsCss).toContain(':scope strong'); - expect(loopControlsCss).not.toMatch(/--loop-radius-control/); + it("is the agent theme's, from its shape: pills and rounder tables, then its own rules", () => { + expect(agentControlsCss).toContain('border-radius: var(--theme-radius-control);'); + expect(agentControlsCss).toContain('--table-border-radius: var(--theme-radius-table);'); + expect(agentControlsCss).toContain(':scope strong'); + expect(agentControlsCss).not.toMatch(/--agent-radius-control/); }); }); diff --git a/src/theme/loopEyes.ts b/src/theme/agentEyes.ts similarity index 94% rename from src/theme/loopEyes.ts rename to src/theme/agentEyes.ts index 33d4917..b2e0f9a 100644 --- a/src/theme/loopEyes.ts +++ b/src/theme/agentEyes.ts @@ -4,16 +4,16 @@ */ /** - * The eyes of L👀P, as geometry (`plans/STUDIO.md`, N-02). + * The eyes of the Agent wordmark, as geometry. * - * The name is displayed with two eyes where its two O's are. They are drawn, + * The wordmark is displayed with two eyes beside its letters. They are drawn, * not typed: the emoji is a different picture on every platform, is missing * on some, and is read aloud as "eyes". Two ovals and two pupils, in the * colour of the text around them, look the same everywhere — the web's SVG * and the mobile app's native views draw this same geometry. * * An eye is about as wide and as tall as a capital O of the face beside it, - * so that the two of them read as the O's they stand for. + * so that the two of them read at the size of the letters beside them. * * Pure: nothing here renders. */ diff --git a/src/theme/colors/loopColors.ts b/src/theme/colors/agentColors.ts similarity index 71% rename from src/theme/colors/loopColors.ts rename to src/theme/colors/agentColors.ts index 3c30594..346350e 100644 --- a/src/theme/colors/loopColors.ts +++ b/src/theme/colors/agentColors.ts @@ -4,9 +4,9 @@ */ /** - * Loop Color System – one accent, neutral everything else. + * Agent Color System – one accent, neutral everything else. * - * The look of an application built in LOOP: a white (or near-black) + * The look of an Agent application: a white (or near-black) * canvas, near-black (or near-white) text, hairlines instead of borders, * and a single soft accent that dark text sits on. Nothing else carries * colour, apart from the three colours of a verdict. @@ -16,7 +16,7 @@ * application may take one of five others: the accents are the theme * system's, over every theme (`themeAccents`, decided 2026-10-07). */ -export const loopColors = { +export const agentColors = { // Core neutrals black: '#131314', // Near-black — primary dark background gray: '#6E6E73', // Secondary text on light: a soft grey, 5.1 to 1 on white @@ -30,21 +30,21 @@ export const loopColors = { subtleDark: '#1E1E20', // Subtle surface on dark grayDark: '#A1A1A6', // Secondary text on dark - // Loop palette (Brand) — mint - loopBrand: '#7ADBB8', // The accent — a bubble, a send button, a swatch - loopOn: '#06281E', // Text that sits on the accent (9.5 to 1) - loopAccent: '#4FC79C', // Deeper accent — charts, highlights - loopBrandHover: '#6CCFAA', // The filled button, hovered: dark text 8.4 to 1 - loopText: '#248462', // Accent text & links on white: the lightest mint that reads, 4.6 to 1 - loopRing: '#0F6B4F', // The focus ring: 3 to 1 or more around every pastel - loopTint: '#F0FAF6', // Quiet tint — a draft, a callout - loopStage: '#DDF5EC', // The stage behind an application - loopBright: '#8FE5C6', // Accent text & links on dark - loopHover: '#227C5C', // Accent text hover + // Agent palette (Brand) — mint + agentBrand: '#7ADBB8', // The accent — a bubble, a send button, a swatch + agentOn: '#06281E', // Text that sits on the accent (9.5 to 1) + agentAccent: '#4FC79C', // Deeper accent — charts, highlights + agentBrandHover: '#6CCFAA', // The filled button, hovered: dark text 8.4 to 1 + agentText: '#248462', // Accent text & links on white: the lightest mint that reads, 4.6 to 1 + agentRing: '#0F6B4F', // The focus ring: 3 to 1 or more around every pastel + agentTint: '#F0FAF6', // Quiet tint — a draft, a callout + agentStage: '#DDF5EC', // The stage behind an application + agentBright: '#8FE5C6', // Accent text & links on dark + agentHover: '#227C5C', // Accent text hover // The stage and the quiet tint, on dark - loopStageDark: '#10261F', - loopTintDark: '#17211D', + agentStageDark: '#10261F', + agentTintDark: '#17211D', // Semantic roles — kept for verdicts and rules only successBrand: '#1F8A5B', diff --git a/src/theme/colors/hueColors.ts b/src/theme/colors/hueColors.ts index 869986b..f37d5d0 100644 --- a/src/theme/colors/hueColors.ts +++ b/src/theme/colors/hueColors.ts @@ -13,7 +13,7 @@ * a dark background. A spec names its colour by hue (an agent's `color: * indigo`), and the drawing follows the theme and its mode. * - * Every theme takes the base values; a theme with hues of its own (`loop`'s + * Every theme takes the base values; a theme with hues of its own (`agent`'s * pastels, `vscode`'s terminal colours) gives them for the hues it has. */ @@ -80,8 +80,8 @@ export const baseHueColors: Record = { /** The hues a theme gives of its own. */ const themeHueColors: Partial>>> = { - // Loop's soft accents, deep on light, the pastels on dark (`themeAccents`). - loop: { + // Agent's soft accents, deep on light, the pastels on dark (`themeAccents`). + agent: { green: { light: '#248462', dark: '#8FE5C6' }, rose: { light: '#B83A6B', dark: '#F6A5C1' }, sky: { light: '#1F6FB0', dark: '#8CCBF9' }, diff --git a/src/theme/colors/index.ts b/src/theme/colors/index.ts index 7d08a8e..2262d28 100644 --- a/src/theme/colors/index.ts +++ b/src/theme/colors/index.ts @@ -11,7 +11,7 @@ export { earthColors } from './earthColors'; export { sandColors } from './sandColors'; export { ivoryColors } from './ivoryColors'; export { sunColors } from './sunColors'; -export { loopColors } from './loopColors'; +export { agentColors } from './agentColors'; export { metalColors } from './metalColors'; export { vscodeColors, @@ -51,7 +51,7 @@ import { earthColors } from './earthColors'; import { sandColors } from './sandColors'; import { ivoryColors } from './ivoryColors'; import { sunColors } from './sunColors'; -import { loopColors } from './loopColors'; +import { agentColors } from './agentColors'; import { metalColors } from './metalColors'; import { vscodeColors } from './vscodeColors'; @@ -74,7 +74,7 @@ export const themedColors: Record> = { sand: sandColors, ivory: ivoryColors, sun: sunColors, - loop: loopColors, + agent: agentColors, metal: metalColors, vscode: vscodeColors, }; diff --git a/src/theme/colors/metalColors.ts b/src/theme/colors/metalColors.ts index c910c3a..ae1a504 100644 --- a/src/theme/colors/metalColors.ts +++ b/src/theme/colors/metalColors.ts @@ -6,22 +6,22 @@ /** * Metal Color System – cool neutrals, one steel blue, four brushed surfaces. * - * The Loop theme's system with the warmth taken out: a white canvas under a + * The Agent theme's system with the warmth taken out: a white canvas under a * blue-grey wash, hairlines with a little steel in them, and a slate-blue - * accent. Where Loop has no gradient, Metal has four, for a surface that + * accent. Where Agent has no gradient, Metal has four, for a surface that * carries white text and glass on top: sage, steel, mauve and clay. - * The verdict colours are Loop's. + * The verdict colours are Agent's. */ -import { loopColors } from './loopColors'; +import { agentColors } from './agentColors'; export const metalColors = { - ...loopColors, + ...agentColors, // Core neutrals black: '#1C2A33', // The deep base under the dark mesh gray: '#6B7280', // Secondary text on light: 4.8 to 1 on white - ink: '#2A2F37', // Text on light: softer than Loop's, 13.5 to 1 on white + ink: '#2A2F37', // Text on light: softer than Agent's, 13.5 to 1 on white inkDark: '#EEF2F7', // Text on dark subtle: '#F6F8FC', // Subtle surface on light subtleDark: '#25343F', // Subtle surface on dark, and the menus diff --git a/src/theme/colors/themeAccents.ts b/src/theme/colors/themeAccents.ts index 392e034..ea97063 100644 --- a/src/theme/colors/themeAccents.ts +++ b/src/theme/colors/themeAccents.ts @@ -9,7 +9,7 @@ * Six soft accents, each with the dark text that sits on it (the lowest * contrast of the six is 8.8 to 1), the tint of the stage behind an * application, a quiet tint, and the accent as text. They were drawn for - * the `loop` theme — green, mint, is `loop`'s own — and, since 2026-10-07 + * the `agent` theme — green, mint, is `agent`'s own — and, since 2026-10-07 * (decided by the user), they colour every theme: `themeAccentVars` sets * Primer's own accent and primary properties, so the filled button, links, * the accent tokens and a selected tab take the accent whatever theme an @@ -38,7 +38,7 @@ export interface ThemeAccent { text: { light: string; dark: string }; } -/** The six accents. One per application; everything else is the theme's. Green — mint — is `loop`'s own. */ +/** The six accents. One per application; everything else is the theme's. Green — mint — is `agent`'s own. */ export const themeAccents: Record = { green: { accent: '#7ADBB8', @@ -130,14 +130,13 @@ export function themeTintVars(defs: ThemeColorDefs): Record { } /** - * An application's accent as everything it colours, over any theme (LOOP - * T-05, T-30): the accent's own properties (`--theme-accent`, + * An application's accent as everything it colours, over any theme: the accent's own properties (`--theme-accent`, * `--theme-accent-on`, `--theme-stage`, `--theme-quiet`, * `--theme-stage-gradient`), and Primer's — the accent fill, text, links, * muted border and tint, the filled button, a checked switch, a selected * tab — so that nothing on its page keeps the theme's default accent beside - * its own (T-18). The theme's focus ring is kept: it is drawn to show around - * every accent (T-15). Set on an application's root, it wears its own + * its own. The theme's focus ring is kept: it is drawn to show around + * every accent. Set on an application's root, it wears its own * colour; the page around keeps the theme's. * * An unknown name is refused. diff --git a/src/theme/css/createThemeCSSVars.ts b/src/theme/css/createThemeCSSVars.ts index 4af3372..428a71a 100644 --- a/src/theme/css/createThemeCSSVars.ts +++ b/src/theme/css/createThemeCSSVars.ts @@ -445,7 +445,7 @@ export interface ThemeStyles { dark: CSSProperties; /** * A stylesheet of the theme's own, for what a custom property cannot say - * (LOOP T-09): every Primer control takes its corners from one token, + *: every Primer control takes its corners from one token, * `--borderRadius-medium`, which cards and list items take too, so a theme * that wants its controls alone in another shape has to say so with * selectors. @@ -472,16 +472,16 @@ export interface ThemeStyles { * hard-coded system-font fallback. */ /** - * The shape of a theme (LOOP T-03): the radii of a control, a card, a bubble + * The shape of a theme: the radii of a control, a card, a bubble * and a frame; the hairline; at most one level of shadow. As custom * properties every theme sets — `--theme-radius-control` and the rest — so * that a component reads its shape the way it reads its colour. * - * And its motion (LOOP T-10): three durations — a status changing, a message + * And its motion: three durations — a status changing, a message * arriving, a pane opening — and one easing. Today's is no motion at all, so * a component that moves by them moves only in a theme that says so. * - * And how a link reads in a message (LOOP T-06): in the accent, as today, or + * And how a link reads in a message: in the accent, as today, or * — `currentColor` — plain, the colour of the words around it, underlined in * every theme. * @@ -563,7 +563,7 @@ export function buildThemeStyles( dark: ThemeColorDefs, options?: { fontFamily?: string; - /** Its shape (T-03); today's, for what it does not say. */ + /** Its shape; today's, for what it does not say. */ shape?: Partial; /** * More custom properties, per mode, set after everything else: what a diff --git a/src/theme/css/primerBaseVars.ts b/src/theme/css/primerBaseVars.ts index 9c959eb..43a18ee 100644 --- a/src/theme/css/primerBaseVars.ts +++ b/src/theme/css/primerBaseVars.ts @@ -14,7 +14,7 @@ * the variable alone, with no fallback (see `components/box/Box.tsx`), so * the theme provider sets every variable `Box` can emit: these, under the * theme's own (`themeStyles`), which win where a theme says otherwise — the - * `loop` theme's radii and shadows. + * `agent` theme's radii and shadows. */ const radii: Record = { diff --git a/src/theme/index.ts b/src/theme/index.ts index 2514e72..2a63ec8 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -18,14 +18,14 @@ export * from './themes/earthTheme'; export * from './themes/sandTheme'; export * from './themes/ivoryTheme'; export * from './themes/sunTheme'; -export * from './themes/loopTheme'; +export * from './themes/agentTheme'; export * from './themes/metalTheme'; export * from './themes/vscodeTheme'; export * from './themes/roundedShape'; export * from './themeRegistry'; export * from './portableTheme'; export * from './fontStacks'; -export * from './loopEyes'; +export * from './agentEyes'; export * from './palettes'; export * from './useSystemColorMode'; export * from './useThemeStore'; diff --git a/src/theme/palettes/ColorPalette.tsx b/src/theme/palettes/ColorPalette.tsx index 7b7643c..5a6d8d5 100644 --- a/src/theme/palettes/ColorPalette.tsx +++ b/src/theme/palettes/ColorPalette.tsx @@ -17,7 +17,7 @@ import { sandColors, ivoryColors, sunColors, - loopColors, + agentColors, metalColors, vscodeColors, hueColorsOf, @@ -112,8 +112,8 @@ const ivBrightDark = getBrightPalette('ivory'); const ivBrightLight = getBrightPalette('ivory', 'light'); const suBrightDark = getBrightPalette('sun'); const suBrightLight = getBrightPalette('sun', 'light'); -const loBrightDark = getBrightPalette('loop'); -const loBrightLight = getBrightPalette('loop', 'light'); +const loBrightDark = getBrightPalette('agent'); +const loBrightLight = getBrightPalette('agent', 'light'); const meBrightDark = getBrightPalette('metal'); const meBrightLight = getBrightPalette('metal', 'light'); const vsBrightDark = getBrightPalette('vscode'); @@ -424,14 +424,14 @@ const rolePalettes: Record> = { sand: sandTheme, ivory: ivoryTheme, sun: sunTheme, - loop: loopTheme, + agent: agentTheme, metal: metalTheme, vscode: vscodeTheme, }; diff --git a/src/theme/themeTokens.ts b/src/theme/themeTokens.ts index 2ee5f72..e69cf5f 100644 --- a/src/theme/themeTokens.ts +++ b/src/theme/themeTokens.ts @@ -21,7 +21,7 @@ import { earthThemeStyles } from './themes/earthThemeStyles'; import { sandThemeStyles } from './themes/sandThemeStyles'; import { ivoryThemeStyles } from './themes/ivoryThemeStyles'; import { sunThemeStyles } from './themes/sunThemeStyles'; -import { loopThemeStyles } from './themes/loopThemeStyles'; +import { agentThemeStyles } from './themes/agentThemeStyles'; import { metalThemeStyles } from './themes/metalThemeStyles'; import { vscodePortableThemeStyles } from './themes/vscodeThemeStyles'; import { datalayerColors } from './colors/datalayerColors'; @@ -32,7 +32,7 @@ import { earthColors } from './colors/earthColors'; import { sandColors } from './colors/sandColors'; import { ivoryColors } from './colors/ivoryColors'; import { sunColors } from './colors/sunColors'; -import { loopColors } from './colors/loopColors'; +import { agentColors } from './colors/agentColors'; import { metalColors } from './colors/metalColors'; import { vscodeColors } from './colors/vscodeColors'; @@ -48,7 +48,7 @@ export type ThemeVariant = | 'sand' | 'ivory' | 'sun' - | 'loop' + | 'agent' | 'metal' | 'vscode'; @@ -375,41 +375,41 @@ export const themeTokens: Record = { gold: sunColors.brightLightGold, // #8A6E00 — deep gold }, }, - loop: { - label: 'Loop', - description: 'Very clean: one soft accent, neutral everything else. The look of an application built in LOOP.', - brandColor: loopColors.loopBrand, + agent: { + label: 'Agent', + description: 'Very clean: one soft accent, neutral everything else. The look of an Agent application.', + brandColor: agentColors.agentBrand, defaultColorMode: 'light', - themeStyles: loopThemeStyles, + themeStyles: agentThemeStyles, // The theme has no gradient on a surface: both stops are the accent. cardGradient: { - light: { from: loopColors.loopBrand, to: loopColors.loopBrand }, // #7ADBB8, flat - dark: { from: loopColors.loopBrand, to: loopColors.loopBrand }, // #7ADBB8, flat + light: { from: agentColors.agentBrand, to: agentColors.agentBrand }, // #7ADBB8, flat + dark: { from: agentColors.agentBrand, to: agentColors.agentBrand }, // #7ADBB8, flat }, brightPalette: { - glow: loopColors.brightGlow, // #7ADBB8 — green, the accent - onGlow: loopColors.loopOn, // dark text on the accent - pop: loopColors.brightPop, // #8CCBF9 — sky - spark: loopColors.brightSpark, // #BEDC55 — lime - blaze: loopColors.brightBlaze, // #F6A5C1 — rose - surge: loopColors.brightSurge, // #C0AEF6 — violet - flame: loopColors.brightFlame, // #F4A261 — soft orange - gold: loopColors.brightGold, // #F8D469 — sun + glow: agentColors.brightGlow, // #7ADBB8 — green, the accent + onGlow: agentColors.agentOn, // dark text on the accent + pop: agentColors.brightPop, // #8CCBF9 — sky + spark: agentColors.brightSpark, // #BEDC55 — lime + blaze: agentColors.brightBlaze, // #F6A5C1 — rose + surge: agentColors.brightSurge, // #C0AEF6 — violet + flame: agentColors.brightFlame, // #F4A261 — soft orange + gold: agentColors.brightGold, // #F8D469 — sun }, brightPaletteLight: { - glow: loopColors.brightLightGlow, // #0F6B4F — deep green + glow: agentColors.brightLightGlow, // #0F6B4F — deep green onGlow: '#ffffff', // white text on deep green - pop: loopColors.brightLightPop, // #1F6FB0 — deep sky - spark: loopColors.brightLightSpark, // #5F7A00 — deep lime - blaze: loopColors.brightLightBlaze, // #B83A6B — deep rose - surge: loopColors.brightLightSurge, // #6B53C9 — deep violet - flame: loopColors.brightLightFlame, // #B4571A — deep orange - gold: loopColors.brightLightGold, // #8A6A00 — deep sun + pop: agentColors.brightLightPop, // #1F6FB0 — deep sky + spark: agentColors.brightLightSpark, // #5F7A00 — deep lime + blaze: agentColors.brightLightBlaze, // #B83A6B — deep rose + surge: agentColors.brightLightSurge, // #6B53C9 — deep violet + flame: agentColors.brightLightFlame, // #B4571A — deep orange + gold: agentColors.brightLightGold, // #8A6A00 — deep sun }, }, metal: { label: 'Metal', - description: 'Loop’s curves, on a page of its own: a dotted wash on light, a deep gradient and frosted glass on dark.', + description: 'Agent’s curves, on a page of its own: a dotted wash on light, a deep gradient and frosted glass on dark.', brandColor: metalColors.metalBrand, defaultColorMode: 'light', themeStyles: metalThemeStyles, @@ -482,7 +482,7 @@ export const themeVariants: ThemeVariant[] = [ 'sand', 'ivory', 'sun', - 'loop', + 'agent', 'metal', 'vscode', ]; @@ -655,20 +655,20 @@ const avatarColorPalettes: Record = { +export const agentShapeVars: Record = { // The rounded shape's radii, shared with Metal, Sand, Ivory and Sun. ...roundedRadiusVars, - // Light mode's; `loopShadows` says dark mode's. - '--loop-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)', - '--loop-face-large': '72px', - '--loop-face-medium': '40px', - '--loop-face-small': '20px', - '--loop-motion-fast': '120ms', - '--loop-motion-medium': '200ms', - '--loop-motion-slow': '320ms', - '--loop-motion-easing': 'cubic-bezier(0.2, 0.8, 0.2, 1)', + // Light mode's; `agentShadows` says dark mode's. + '--agent-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)', + '--agent-face-large': '72px', + '--agent-face-medium': '40px', + '--agent-face-small': '20px', + '--agent-motion-fast': '120ms', + '--agent-motion-medium': '200ms', + '--agent-motion-slow': '320ms', + '--agent-motion-easing': 'cubic-bezier(0.2, 0.8, 0.2, 1)', }; /** The hairline between two surfaces, per mode. */ -const loopHairline = { +const agentHairline = { light: 'rgba(29, 29, 31, 0.07)', dark: 'rgba(255, 255, 255, 0.10)', }; @@ -298,9 +298,9 @@ const loopHairline = { * deeper shadow. Primer's own shadow tokens take the same hand, so a menu * or a dialog floats the way a frame does. */ -export const loopShadows: Record<'light' | 'dark', Record> = { +export const agentShadows: Record<'light' | 'dark', Record> = { light: { - '--loop-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)', + '--agent-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)', '--theme-shadow': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)', '--shadow-resting-xsmall': '0 1px 1px rgba(0, 0, 0, 0.03)', '--shadow-resting-small': '0 1px 2px rgba(0, 0, 0, 0.04)', @@ -311,7 +311,7 @@ export const loopShadows: Record<'light' | 'dark', Record> = { '--shadow-floating-xlarge': '0 0 0 1px rgba(29, 29, 31, 0.04), 0 24px 64px rgba(0, 0, 0, 0.18)', }, dark: { - '--loop-shadow-frame': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.45)', + '--agent-shadow-frame': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.45)', '--theme-shadow': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.45)', '--shadow-resting-xsmall': '0 0 0 1px rgba(255, 255, 255, 0.05)', '--shadow-resting-small': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.3)', @@ -324,7 +324,7 @@ export const loopShadows: Record<'light' | 'dark', Record> = { }; /** - * Type (LOOP T-04): one face, two weights, five sizes, one line-height per + * Type: one face, two weights, five sizes, one line-height per * size — each line a multiple of 4px. * * | Size | Line | Tokens | @@ -341,7 +341,7 @@ export const loopShadows: Record<'light' | 'dark', Record> = { * is; the body left alone. The tracking is a token for a component to apply, * since a CSS font shorthand carries none. */ -export const loopTypeScale = { +export const agentTypeScale = { display: { size: '2rem', lineHeight: '1.25' }, title: { size: '1.25rem', lineHeight: '1.4' }, heading: { size: '1rem', lineHeight: '1.5' }, @@ -349,12 +349,12 @@ export const loopTypeScale = { small: { size: '0.75rem', lineHeight: '1.3333' }, } as const; -/** The two weights of the `loop` theme. */ -export const loopFontWeights = { regular: 400, semibold: 600 } as const; +/** The two weights of the `agent` theme. */ +export const agentFontWeights = { regular: 400, semibold: 600 } as const; -export const loopTypeVars = (font: string): Record => { - const { display, title, heading, body, small } = loopTypeScale; - const { regular, semibold } = loopFontWeights; +export const agentTypeVars = (font: string): Record => { + const { display, title, heading, body, small } = agentTypeScale; + const { regular, semibold } = agentFontWeights; const shorthand = (weight: number, step: { size: string; lineHeight: string }) => `${weight} ${step.size}/${step.lineHeight} ${font}`; return { @@ -391,9 +391,9 @@ export const loopTypeVars = (font: string): Record => { '--text-body-shorthand-medium': shorthand(regular, body), '--text-body-shorthand-small': shorthand(regular, small), '--text-caption-shorthand': shorthand(regular, small), - '--loop-tracking-display': '-0.02em', - '--loop-tracking-title': '-0.012em', - '--loop-tracking-body': '0', + '--agent-tracking-display': '-0.02em', + '--agent-tracking-title': '-0.012em', + '--agent-tracking-body': '0', }; }; @@ -401,7 +401,7 @@ export const loopTypeVars = (font: string): Record => { * The accent's properties in a mode, mint's (`themeAccents.green`): the * stage and the quiet tint are mint's own, not derived from the colours. */ -const loopTints = (mode: 'light' | 'dark') => +const agentTints = (mode: 'light' | 'dark') => themeAccentTints({ accent: themeAccents.green.accent, on: themeAccents.green.on, @@ -413,30 +413,30 @@ const loopTints = (mode: 'light' | 'dark') => /** * Inter, then its metric-matched fallback, then the system's own sans-serif - * (LOOP T-04). One face, two weights (400 and 600). The face is served by the + *. One face, two weights (400 and 600). The face is served by the * page's own build: a page wearing the theme imports - * `@datalayer/primer-addons/style/loop-face.css`, which declares + * `@datalayer/primer-addons/style/agent-face.css`, which declares * `Inter Variable` from `@fontsource-variable/inter` and `Inter Fallback`, a * local Arial drawn to Inter's measure. The text paints in the fallback first * and does not move when Inter arrives; a page that has not imported the * stylesheet shows the system face. */ -export const loopFontFamily = +export const agentFontFamily = '"Inter Variable", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'; /** - * Motion (LOOP T-10): three durations and one easing, for three things — a + * Motion: three durations and one easing, for three things — a * status changing, a message arriving, a pane opening. Nothing else moves. */ -export const loopMotionVars: Record = { - '--loop-motion-status': '120ms', - '--loop-motion-message': '200ms', - '--loop-motion-pane': '320ms', - '--loop-motion-easing': 'cubic-bezier(0.2, 0, 0, 1)', +export const agentMotionVars: Record = { + '--agent-motion-status': '120ms', + '--agent-motion-message': '200ms', + '--agent-motion-pane': '320ms', + '--agent-motion-easing': 'cubic-bezier(0.2, 0, 0, 1)', }; /** - * The focus ring (LOOP T-15): 3 to 1 against the page and around a pill of + * The focus ring: 3 to 1 against the page and around a pill of * any accent, in both modes. In light mode the deep mint does it — darker than the text, the one place it is — * a halo in the theme's colour, as a system's own focus ring is — 6.5 to 1 * on white and 3.28 or more around every pastel. In dark mode no @@ -445,10 +445,10 @@ export const loopMotionVars: Record = { * mid grey does, at 3.04 to 1 — and 2.77 to 1 on the subtle dark surface, * the one place it falls short. */ -export const loopFocusRing = { light: loopColors.loopRing, dark: '#636363' } as const; +export const agentFocusRing = { light: agentColors.agentRing, dark: '#636363' } as const; /** - * The loop theme's own stylesheet, beside what its shape draws: bold is the + * The agent theme's own stylesheet, beside what its shape draws: bold is the * theme's semibold, its second and last weight. * * Its controls are pills and its tables rounder by its shape @@ -456,7 +456,7 @@ export const loopFocusRing = { light: loopColors.loopRing, dark: '#636363' } as * any theme that sets them: menus and overlays keep the card's radius, * `--borderRadius-large`, which the theme already sets. */ -const loopOwnCss = ` +const agentOwnCss = ` :scope b, :scope strong { font-weight: var(--base-text-weight-semibold); @@ -464,55 +464,55 @@ const loopOwnCss = ` `; /** Comprehensive Primer CSS-variable overrides for light & dark mode. */ -export const loopThemeStyles = buildThemeStyles(loopLight, loopDark, { - fontFamily: loopFontFamily, - css: loopOwnCss, - // Rounder than the others: a pill for a control (LOOP T-09), soft cards, +export const agentThemeStyles = buildThemeStyles(agentLight, agentDark, { + fontFamily: agentFontFamily, + css: agentOwnCss, + // Rounder than the others: a pill for a control, soft cards, // round bubbles, a table with the corners of a list item. shape: { ...roundedShape, - shadow: loopShapeVars['--loop-shadow-frame'], - motionStatus: loopMotionVars['--loop-motion-status'], - motionMessage: loopMotionVars['--loop-motion-message'], - motionPane: loopMotionVars['--loop-motion-pane'], - motionEasing: loopMotionVars['--loop-motion-easing'], - // Links plain in a message: the words' own colour, underlined (T-06). + shadow: agentShapeVars['--agent-shadow-frame'], + motionStatus: agentMotionVars['--agent-motion-status'], + motionMessage: agentMotionVars['--agent-motion-message'], + motionPane: agentMotionVars['--agent-motion-pane'], + motionEasing: agentMotionVars['--agent-motion-easing'], + // Links plain in a message: the words' own colour, underlined. messageLink: 'currentColor', }, variables: { light: { - ...loopShapeVars, - ...loopTints('light'), - ...loopMotionVars, - ...loopShadows.light, - ...loopTypeVars(loopFontFamily), - '--loop-hairline': loopHairline.light, + ...agentShapeVars, + ...agentTints('light'), + ...agentMotionVars, + ...agentShadows.light, + ...agentTypeVars(agentFontFamily), + '--agent-hairline': agentHairline.light, // The hairline is Primer's default border: a card drawn with // `borderColor="border.default"` gets it, no fallback chain at the call site. - '--borderColor-default': loopHairline.light, - '--focus-outlineColor': loopFocusRing.light, - // The selected tab underlined in the accent, not Primer's coral (LOOP T-14). + '--borderColor-default': agentHairline.light, + '--focus-outlineColor': agentFocusRing.light, + // The selected tab underlined in the accent, not Primer's coral. '--underlineNav-borderColor-active': themeAccents.green.accent, }, dark: { - ...loopShapeVars, - ...loopTints('dark'), - ...loopMotionVars, - ...loopShadows.dark, - ...loopTypeVars(loopFontFamily), - '--loop-hairline': loopHairline.dark, + ...agentShapeVars, + ...agentTints('dark'), + ...agentMotionVars, + ...agentShadows.dark, + ...agentTypeVars(agentFontFamily), + '--agent-hairline': agentHairline.dark, // The hairline is Primer's default border: a card drawn with // `borderColor="border.default"` gets it, no fallback chain at the call site. - '--borderColor-default': loopHairline.dark, - '--focus-outlineColor': loopFocusRing.dark, - // The selected tab underlined in the accent, not Primer's coral (LOOP T-14). + '--borderColor-default': agentHairline.dark, + '--focus-outlineColor': agentFocusRing.dark, + // The selected tab underlined in the accent, not Primer's coral. '--underlineNav-borderColor-active': themeAccents.green.accent, }, }, }); /** - * The loop theme's whole stylesheet (`ThemeStyles.css`): its controls as + * The agent theme's whole stylesheet (`ThemeStyles.css`): its controls as * pills and its tables rounder, drawn from its shape, then its own rules. */ -export const loopControlsCss: string = loopThemeStyles.css ?? ''; +export const agentControlsCss: string = agentThemeStyles.css ?? ''; diff --git a/src/theme/themes/ivoryThemeStyles.ts b/src/theme/themes/ivoryThemeStyles.ts index bdeac8c..88bb9e0 100644 --- a/src/theme/themes/ivoryThemeStyles.ts +++ b/src/theme/themes/ivoryThemeStyles.ts @@ -254,7 +254,7 @@ const ivoryFontFamily = /** * Comprehensive Primer CSS-variable overrides for light & dark mode, with - * the rounded shape: Loop's and Metal's corners, pill controls (`roundedShape`). + * the rounded shape: Agent's and Metal's corners, pill controls (`roundedShape`). */ export const ivoryThemeStyles = buildThemeStyles(ivoryLight, ivoryDark, { fontFamily: ivoryFontFamily, diff --git a/src/theme/themes/metalThemeStyles.ts b/src/theme/themes/metalThemeStyles.ts index 127a458..179de53 100644 --- a/src/theme/themes/metalThemeStyles.ts +++ b/src/theme/themes/metalThemeStyles.ts @@ -6,7 +6,7 @@ /** * Metal Theme for Primer React. * - * Loop's curves and motion, with a look of its own. On light, a page that is + * Agent's curves and motion, with a look of its own. On light, a page that is * not white: a blue-grey wash and a dot grid, panels drawn by a pale steel * line rather than floated on a shadow, outlined controls, a brushed filled * button. On dark, the page is the surface: a deep mesh of sage, steel, mauve @@ -19,19 +19,19 @@ import { metalColors } from '../colors/metalColors'; import { themeAccentTints } from '../colors/themeAccents'; import { type ThemeColorDefs, buildThemeStyles } from '../css/createThemeCSSVars'; import { - loopDark, - loopLight, - loopMotionVars, - loopShapeVars, - loopTypeScale, - loopTypeVars, -} from './loopThemeStyles'; + agentDark, + agentLight, + agentMotionVars, + agentShapeVars, + agentTypeScale, + agentTypeVars, +} from './agentThemeStyles'; import { roundedShape } from './roundedShape'; /* ── Colour definitions ────────────────────────────────────────── */ export const metalLight: ThemeColorDefs = { - ...loopLight, + ...agentLight, canvas: { default: metalColors.white, subtle: metalColors.subtle, @@ -52,7 +52,7 @@ export const metalLight: ThemeColorDefs = { muted: metalColors.lineMuted, }, btn: { - ...loopLight.btn, + ...agentLight.btn, text: metalColors.ink, // Outlined, not filled: a control is drawn as a panel is. bg: '#FFFFFF', @@ -63,7 +63,7 @@ export const metalLight: ThemeColorDefs = { selectedBg: '#E3E9F2', counterBg: 'rgba(34, 38, 43, 0.08)', primary: { - ...loopLight.btn.primary, + ...agentLight.btn.primary, text: metalColors.metalOn, bg: metalColors.metalBrand, border: metalColors.metalBrand, @@ -77,7 +77,7 @@ export const metalLight: ThemeColorDefs = { counterBg: 'rgba(255, 255, 255, 0.2)', }, outline: { - ...loopLight.btn.outline, + ...agentLight.btn.outline, text: metalColors.metalText, hoverText: metalColors.metalOn, hoverBg: metalColors.metalBrand, @@ -96,7 +96,7 @@ export const metalLight: ThemeColorDefs = { }; export const metalDark: ThemeColorDefs = { - ...loopDark, + ...agentDark, // Solid stand-ins for the page behind the glass, which the checks read; // what is painted is `metalVariables` and the mesh. canvas: { @@ -120,7 +120,7 @@ export const metalDark: ThemeColorDefs = { muted: metalColors.lineMutedDark, }, btn: { - ...loopDark.btn, + ...agentDark.btn, text: metalColors.inkDark, bg: 'rgba(255, 255, 255, 0.10)', border: 'rgba(255, 255, 255, 0.22)', @@ -131,7 +131,7 @@ export const metalDark: ThemeColorDefs = { counterBg: 'rgba(238, 242, 247, 0.12)', // White on the mesh, the brightest thing on the page. primary: { - ...loopDark.btn.primary, + ...agentDark.btn.primary, text: metalColors.metalOnDark, bg: metalColors.white, border: metalColors.white, @@ -145,7 +145,7 @@ export const metalDark: ThemeColorDefs = { counterBg: 'rgba(11, 26, 48, 0.12)', }, outline: { - ...loopDark.btn.outline, + ...agentDark.btn.outline, text: metalColors.metalBright, hoverText: metalColors.metalOnDark, hoverBg: metalColors.metalBright, @@ -175,12 +175,12 @@ export const metalMonoFamily = /** The two weights: titles stay regular, what must stand out is 500. */ export const metalFontWeights = { regular: 400, medium: 500 } as const; -/** Loop's sizes, in Metal's weights: a title is large and light, never bold. */ +/** Agent's sizes, in Metal's weights: a title is large and light, never bold. */ const metalTypeVars = (): Record => { const { regular, medium } = metalFontWeights; - const { display, title, heading } = loopTypeScale; + const { display, title, heading } = agentTypeScale; return { - ...loopTypeVars(metalFontFamily), + ...agentTypeVars(metalFontFamily), '--base-text-weight-medium': String(medium), '--base-text-weight-semibold': String(medium), '--text-display-weight': String(regular), @@ -188,8 +188,8 @@ const metalTypeVars = (): Record => { '--text-title-shorthand-large': `${regular} ${display.size}/${display.lineHeight} ${metalFontFamily}`, '--text-title-shorthand-medium': `${regular} ${title.size}/${title.lineHeight} ${metalFontFamily}`, '--text-title-shorthand-small': `${medium} ${heading.size}/${heading.lineHeight} ${metalFontFamily}`, - '--loop-tracking-display': '-0.03em', - '--loop-tracking-title': '-0.02em', + '--agent-tracking-display': '-0.03em', + '--agent-tracking-title': '-0.02em', '--fontStack-monospace': metalMonoFamily, }; }; @@ -260,7 +260,7 @@ const metalPainted: Record<'light' | 'dark', Record> = { /** A panel lies on the page: a line and nothing under it, a menu alone floats. */ export const metalShadows: Record<'light' | 'dark', Record> = { light: { - '--loop-shadow-frame': 'none', + '--agent-shadow-frame': 'none', '--theme-shadow': 'none', '--shadow-resting-xsmall': 'none', '--shadow-resting-small': 'none', @@ -271,7 +271,7 @@ export const metalShadows: Record<'light' | 'dark', Record> = { '--shadow-floating-xlarge': '0 0 0 1px rgba(76, 118, 186, 0.16), 0 24px 64px rgba(34, 52, 84, 0.14)', }, dark: { - '--loop-shadow-frame': 'none', + '--agent-shadow-frame': 'none', '--theme-shadow': 'none', '--shadow-resting-xsmall': 'none', '--shadow-resting-small': 'none', @@ -294,15 +294,15 @@ const metalTints = (mode: 'light' | 'dark') => }); const metalVariables = (mode: 'light' | 'dark'): Record => ({ - ...loopShapeVars, + ...agentShapeVars, ...metalTints(mode), - ...loopMotionVars, + ...agentMotionVars, ...metalShadows[mode], ...metalTypeVars(), ...metalSurfaceVars, ...metalPainted[mode], '--metal-page': metalPage[mode], - '--loop-hairline': metalHairline[mode], + '--agent-hairline': metalHairline[mode], '--borderColor-default': metalHairline[mode], '--borderColor-muted': metalHairline[mode], '--focus-outlineColor': metalFocusRing[mode], @@ -351,17 +351,17 @@ const metalOwnCss = ` /* ── Exports ───────────────────────────────────────────────────── */ -/** Comprehensive Primer CSS-variable overrides for light & dark mode: Loop's curves, Metal's look. */ +/** Comprehensive Primer CSS-variable overrides for light & dark mode: Agent's curves, Metal's look. */ export const metalThemeStyles = buildThemeStyles(metalLight, metalDark, { fontFamily: metalFontFamily, css: metalOwnCss, shape: { ...roundedShape, shadow: 'none', - motionStatus: loopMotionVars['--loop-motion-status'], - motionMessage: loopMotionVars['--loop-motion-message'], - motionPane: loopMotionVars['--loop-motion-pane'], - motionEasing: loopMotionVars['--loop-motion-easing'], + motionStatus: agentMotionVars['--agent-motion-status'], + motionMessage: agentMotionVars['--agent-motion-message'], + motionPane: agentMotionVars['--agent-motion-pane'], + motionEasing: agentMotionVars['--agent-motion-easing'], messageLink: 'currentColor', }, variables: { diff --git a/src/theme/themes/roundedShape.ts b/src/theme/themes/roundedShape.ts index 1e583e3..ed52e53 100644 --- a/src/theme/themes/roundedShape.ts +++ b/src/theme/themes/roundedShape.ts @@ -4,10 +4,10 @@ */ /** - * The rounded shape: Loop's corners, which Metal, Sand, Ivory and Sun share. + * The rounded shape: Agent's corners, which Metal, Sand, Ivory and Sun share. * * Primer's own radii made rounder (a list item, a card, a menu take them), - * the `--loop-radius-*` properties an application is drawn with, and the + * the `--agent-radius-*` properties an application is drawn with, and the * theme shape that says so: a pill for every single-line control (a button, * an icon button, a text input, a select, a segmented control), soft cards * and overlays, round bubbles, a table with the corners of a list item. @@ -25,10 +25,10 @@ export const roundedRadiusVars: Record = { '--borderRadius-medium': '14px', '--borderRadius-large': '20px', '--borderRadius-default': '14px', - '--loop-radius-control': '999px', - '--loop-radius-card': '20px', - '--loop-radius-bubble': '22px', - '--loop-radius-frame': '28px', + '--agent-radius-control': '999px', + '--agent-radius-card': '20px', + '--agent-radius-bubble': '22px', + '--agent-radius-frame': '28px', }; /** The radii of the theme shape (`--theme-radius-*`). */ @@ -36,10 +36,10 @@ export const roundedShape: Pick< ThemeShape, 'radiusControl' | 'radiusTable' | 'radiusOverlay' | 'radiusCard' | 'radiusBubble' | 'radiusFrame' > = { - radiusControl: roundedRadiusVars['--loop-radius-control'], + radiusControl: roundedRadiusVars['--agent-radius-control'], radiusTable: roundedRadiusVars['--borderRadius-medium'], - radiusOverlay: roundedRadiusVars['--loop-radius-card'], - radiusCard: roundedRadiusVars['--loop-radius-card'], - radiusBubble: roundedRadiusVars['--loop-radius-bubble'], - radiusFrame: roundedRadiusVars['--loop-radius-frame'], + radiusOverlay: roundedRadiusVars['--agent-radius-card'], + radiusCard: roundedRadiusVars['--agent-radius-card'], + radiusBubble: roundedRadiusVars['--agent-radius-bubble'], + radiusFrame: roundedRadiusVars['--agent-radius-frame'], }; diff --git a/src/theme/themes/sandThemeStyles.ts b/src/theme/themes/sandThemeStyles.ts index 3b41ca5..c51735c 100644 --- a/src/theme/themes/sandThemeStyles.ts +++ b/src/theme/themes/sandThemeStyles.ts @@ -253,7 +253,7 @@ const sandFontFamily = /** * Comprehensive Primer CSS-variable overrides for light & dark mode, with - * the rounded shape: Loop's and Metal's corners, pill controls (`roundedShape`). + * the rounded shape: Agent's and Metal's corners, pill controls (`roundedShape`). */ export const sandThemeStyles = buildThemeStyles(sandLight, sandDark, { fontFamily: sandFontFamily, diff --git a/src/theme/themes/sunThemeStyles.ts b/src/theme/themes/sunThemeStyles.ts index a6e0aed..50b450d 100644 --- a/src/theme/themes/sunThemeStyles.ts +++ b/src/theme/themes/sunThemeStyles.ts @@ -254,7 +254,7 @@ const sunFontFamily = /** * Comprehensive Primer CSS-variable overrides for light & dark mode, with - * the rounded shape: Loop's and Metal's corners, pill controls (`roundedShape`). + * the rounded shape: Agent's and Metal's corners, pill controls (`roundedShape`). */ export const sunThemeStyles = buildThemeStyles(sunLight, sunDark, { fontFamily: sunFontFamily, diff --git a/src/utils/Portals.tsx b/src/utils/Portals.tsx index 52ca11d..4a879c6 100644 --- a/src/utils/Portals.tsx +++ b/src/utils/Portals.tsx @@ -251,7 +251,7 @@ export const THEME_SCOPE_ATTRIBUTE = 'data-datalayer-theme-scope'; /** * The attribute an application puts on its own outer Primer `BaseStyles` * when it wraps everything in Primer's provider above a Datalayer one: that - * element is the application's, not a host page's (LOOP T-13), so the + * element is the application's, not a host page's, so the * provider inside it still themes the page's portal root. */ export const APP_ROOT_ATTRIBUTE = 'data-datalayer-app-root'; diff --git a/style/loop-face.css b/style/agent-face.css similarity index 94% rename from style/loop-face.css rename to style/agent-face.css index 4c385a0..d3d4d32 100644 --- a/style/loop-face.css +++ b/style/agent-face.css @@ -4,14 +4,14 @@ */ /* - * The `loop` theme's face (LOOP T-04): Inter, open licence (SIL OFL 1.1) and + * The `agent` theme's face: Inter, open licence (SIL OFL 1.1) and * variable, served by the page's own build from `@fontsource-variable/inter` * — the woff2 is bundled as an asset of the importing application, so it is * fetched from that application's origin and never from a third party. * * Import it once where the theme can be worn: * - * import '@datalayer/primer-addons/style/loop-face.css'; + * import '@datalayer/primer-addons/style/agent-face.css'; * * Only the upright variable axis (weights 100 to 900 in one file; the theme * uses 400 and 600) and only two subsets, latin and latin-ext: a browser From d8a58e6065ffc608ad3fd42070a2152494f50f70 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Sun, 22 Nov 2026 11:32:34 +0100 Subject: [PATCH 2/4] Theme store: a stored theme the registry no longer has is dropped on hydration, the default standing (a page that remembered 'loop' broke reading an undefined theme) --- .../__tests__/unknownStoredTheme.test.ts | 51 +++++++++++++++++++ src/theme/useThemeStore.ts | 15 +++++- 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 src/theme/__tests__/unknownStoredTheme.test.ts diff --git a/src/theme/__tests__/unknownStoredTheme.test.ts b/src/theme/__tests__/unknownStoredTheme.test.ts new file mode 100644 index 0000000..d4db7f0 --- /dev/null +++ b/src/theme/__tests__/unknownStoredTheme.test.ts @@ -0,0 +1,51 @@ +// @vitest-environment jsdom +/* + * Copyright (c) 2023-2026 Datalayer, Inc. + * Distributed under the terms of the Modified BSD License. + */ + +/** + * A stored theme the registry no longer has (the user, 22 November 2026: + * 'loop' became 'agent', and a page that had remembered 'loop' read an + * undefined theme and broke) is dropped on hydration: the store's default + * stands, a known stored theme still wins. + */ + +import { beforeEach, describe, expect, it } from 'vitest'; +import { createThemeStore } from '../useThemeStore'; + +const KEY = 'unknown-stored-theme-test'; + +const store = (theme: string, variants?: Record) => + localStorage.setItem( + KEY, + JSON.stringify({ state: { theme, colorMode: 'dark', activeVariant: null, variants: variants ?? {} }, version: 3 }), + ); + +describe('a stored theme the registry no longer has', () => { + beforeEach(() => localStorage.clear()); + + it('is dropped: the default theme stands', async () => { + store('loop'); + const useStore = createThemeStore(KEY, { theme: 'datalayer', colorMode: 'light' }); + await useStore.persist.rehydrate(); + expect(useStore.getState().theme).toBe('datalayer'); + }); + + it('is dropped from a variant too, the code default kept', async () => { + store('agent', { signedIn: { theme: 'loop', colorMode: 'dark', version: 1 } }); + const useStore = createThemeStore(KEY, { + theme: 'datalayer', + variants: { signedIn: { theme: 'metal', colorMode: 'auto' } }, + }); + await useStore.persist.rehydrate(); + expect(useStore.getState().variants.signedIn.theme).toBe('metal'); + }); + + it('a known stored theme still wins', async () => { + store('agent'); + const useStore = createThemeStore(KEY, { theme: 'datalayer' }); + await useStore.persist.rehydrate(); + expect(useStore.getState().theme).toBe('agent'); + }); +}); diff --git a/src/theme/useThemeStore.ts b/src/theme/useThemeStore.ts index 31bf2e1..2e36e94 100644 --- a/src/theme/useThemeStore.ts +++ b/src/theme/useThemeStore.ts @@ -64,6 +64,15 @@ function normalizeVariants(variants?: VariantDefaults): VariantDefaults { return normalized; } +/** + * A stored theme the registry no longer has (a renamed theme: 'loop' became + * 'agent' on 22 November 2026) is not drawn: it would leave the page without + * a theme. The stored choice is dropped and the store's own default stands. + */ +function isKnownTheme(theme: unknown): theme is ThemeVariant { + return typeof theme === 'string' && Object.prototype.hasOwnProperty.call(themeConfigs, theme); +} + function hasMissingVariantVersion(variants?: VariantDefaults): boolean { if (!variants || Object.keys(variants).length === 0) { return false; @@ -289,14 +298,16 @@ export function createThemeStore( const mergedVariants = normalizeVariants(current.variants); if (p.variants) { for (const [key, val] of Object.entries(p.variants)) { - if (val && typeof val === 'object' && 'theme' in val) { + if (val && typeof val === 'object' && 'theme' in val && isKnownTheme(val.theme)) { mergedVariants[key] = normalizeVariantPreference(val); } } } + const { theme: storedTheme, ...rest } = p; return { ...current, - ...p, + ...rest, + ...(isKnownTheme(storedTheme) ? { theme: storedTheme } : {}), variants: mergedVariants, }; }, From 4199d79c570608b6744cc9837c9f6f3662d34fcf Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Sun, 22 Nov 2026 11:52:09 +0100 Subject: [PATCH 3/4] Theme store: a stored 'loop' is read as 'agent' on hydration (RENAMED_THEMES), a person's choice following the renamed theme; the legacy upgrade's anonymous variant is site-anonymous --- .../__tests__/unknownStoredTheme.test.ts | 19 +++++++++++-- src/theme/useThemeStore.ts | 27 ++++++++++++++----- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/theme/__tests__/unknownStoredTheme.test.ts b/src/theme/__tests__/unknownStoredTheme.test.ts index d4db7f0..3b2c36f 100644 --- a/src/theme/__tests__/unknownStoredTheme.test.ts +++ b/src/theme/__tests__/unknownStoredTheme.test.ts @@ -26,14 +26,14 @@ describe('a stored theme the registry no longer has', () => { beforeEach(() => localStorage.clear()); it('is dropped: the default theme stands', async () => { - store('loop'); + store('no-such-theme'); const useStore = createThemeStore(KEY, { theme: 'datalayer', colorMode: 'light' }); await useStore.persist.rehydrate(); expect(useStore.getState().theme).toBe('datalayer'); }); it('is dropped from a variant too, the code default kept', async () => { - store('agent', { signedIn: { theme: 'loop', colorMode: 'dark', version: 1 } }); + store('agent', { signedIn: { theme: 'no-such-theme', colorMode: 'dark', version: 1 } }); const useStore = createThemeStore(KEY, { theme: 'datalayer', variants: { signedIn: { theme: 'metal', colorMode: 'auto' } }, @@ -49,3 +49,18 @@ describe('a stored theme the registry no longer has', () => { expect(useStore.getState().theme).toBe('agent'); }); }); + +describe('a stored theme renamed here', () => { + beforeEach(() => localStorage.clear()); + + it("'loop' is read as 'agent', as the current theme and in a variant, each mode kept", async () => { + store('loop', { signedIn: { theme: 'loop', colorMode: 'light', version: 1 } }); + const useStore = createThemeStore(KEY, { + theme: 'datalayer', + variants: { signedIn: { theme: 'metal', colorMode: 'auto' } }, + }); + await useStore.persist.rehydrate(); + expect(useStore.getState().theme).toBe('agent'); + expect(useStore.getState().variants.signedIn).toMatchObject({ theme: 'agent', colorMode: 'light' }); + }); +}); diff --git a/src/theme/useThemeStore.ts b/src/theme/useThemeStore.ts index 2e36e94..0df5864 100644 --- a/src/theme/useThemeStore.ts +++ b/src/theme/useThemeStore.ts @@ -73,6 +73,19 @@ function isKnownTheme(theme: unknown): theme is ThemeVariant { return typeof theme === 'string' && Object.prototype.hasOwnProperty.call(themeConfigs, theme); } +/** + * Themes renamed here, read under their new id when a store hydrates (the + * user, 22 November 2026: the 'loop' theme is the 'agent' theme): a person's + * choice follows the theme it named rather than falling back to the default. + */ +export const RENAMED_THEMES: Readonly> = { + loop: 'agent' as ThemeVariant, +}; + +function renamedTheme(theme: unknown): unknown { + return typeof theme === 'string' && theme in RENAMED_THEMES ? RENAMED_THEMES[theme] : theme; +} + function hasMissingVariantVersion(variants?: VariantDefaults): boolean { if (!variants || Object.keys(variants).length === 0) { return false; @@ -266,7 +279,7 @@ export function createThemeStore( // Legacy snapshots without per-variant versions are upgraded to v1. // Anonymous defaults are forced to matrix/dark during this upgrade. if (missingVariantVersion) { - variants['agent-anonymous'] = { + variants['site-anonymous'] = { theme: 'matrix', colorMode: 'dark', version: VARIANT_SCHEMA_VERSION, @@ -278,8 +291,8 @@ export function createThemeStore( variants, ...(missingVariantVersion ? { - theme: p.activeVariant === 'agent-anonymous' ? 'matrix' : p.theme, - colorMode: p.activeVariant === 'agent-anonymous' ? 'dark' : p.colorMode, + theme: p.activeVariant === 'site-anonymous' ? 'matrix' : p.theme, + colorMode: p.activeVariant === 'site-anonymous' ? 'dark' : p.colorMode, } : {}), }; @@ -298,12 +311,14 @@ export function createThemeStore( const mergedVariants = normalizeVariants(current.variants); if (p.variants) { for (const [key, val] of Object.entries(p.variants)) { - if (val && typeof val === 'object' && 'theme' in val && isKnownTheme(val.theme)) { - mergedVariants[key] = normalizeVariantPreference(val); + const theme = val && typeof val === 'object' ? renamedTheme(val.theme) : undefined; + if (val && typeof val === 'object' && isKnownTheme(theme)) { + mergedVariants[key] = normalizeVariantPreference({ ...val, theme }); } } } - const { theme: storedTheme, ...rest } = p; + const { theme: stored, ...rest } = p; + const storedTheme = renamedTheme(stored); return { ...current, ...rest, From 7ad91340834a5d6472e95bcd7c368c21f18485b9 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Sun, 22 Nov 2026 13:01:26 +0100 Subject: [PATCH 4/4] 1.0.54: the loop theme is the agent theme; a stored theme the registry no longer has is dropped, a stored loop read as agent --- CHANGELOG.md | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6c6f21..1ee845f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,9 @@ Each version links the section of the README that documents it. The `agent` theme is documented in [The `agent` theme](https://github.com/datalayer/primer-addons/blob/main/README.md#the-agent-theme), and shown, with the accents, in the gallery's *Theme Accents* page when the gallery wears it. -## Unreleased +## 1.0.54 +- A stored theme the registry no longer has is dropped when a theme store hydrates, the store's default standing, and a stored `loop` is read as `agent` (`RENAMED_THEMES`), so a person's choice follows the renamed theme; the legacy upgrade's anonymous variant is `site-anonymous`. - **Breaking.** The `loop` theme is the `agent` theme, with no alias: the theme id `'loop'` is `'agent'` (`ThemeVariant`, `themeConfigs.agent`, `themeTokens.agent`, the hue and palette tables, the logo's variant), and every name follows. `loopTheme` is `agentTheme`, `loopThemeStyles` is `agentThemeStyles`, `loopColors` is `agentColors` (its `loopBrand`, `loopAccent`, `loopOn`… are `agentBrand`, `agentAccent`, `agentOn`…), `loopEyes` is `agentEyes`, and the other `loop*` exports (`loopShapeVars`, `loopShadows`, `loopMotionVars`, `loopTypeVars`, `loopFontFamily`, `loopFontWeights`, `loopControlsCss`, `loopFocusRing`…) are `agent*`. The theme's custom properties are `--agent-*` (`--agent-radius-card`, `--agent-shadow-frame`, `--agent-hairline`, `--agent-motion-*`, `--agent-face-*`…). `style/loop-face.css` is `style/agent-face.css`. The tests, the stories, the gallery and the README follow; the comments no longer carry planning ids. ## 1.0.53 diff --git a/package.json b/package.json index 7d98fe3..a766630 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@datalayer/primer-addons", - "version": "1.0.53", + "version": "1.0.54", "license": "BSD-3-Clause", "scripts": { "build": "npm run build:lib",