@datalayer/primer-addons 1.0.53 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -32
- package/lib/components/appearance/AppearanceControls.js +1 -1
- package/lib/components/appearance/AppearanceMenu.stories.d.ts +1 -1
- package/lib/components/appearance/AppearanceMenu.stories.js +2 -2
- package/lib/components/appearance/CollaboratorPalette.stories.d.ts +1 -1
- package/lib/components/appearance/CollaboratorPalette.stories.js +2 -2
- package/lib/components/appearance/ColorModeCircle.js +1 -1
- package/lib/components/appearance/ThemeCircle.stories.js +1 -1
- package/lib/components/appearance/ThemePreviewCard.js +1 -1
- package/lib/components/appearance/ThemePreviewCard.stories.d.ts +1 -1
- package/lib/components/appearance/ThemePreviewCard.stories.js +1 -1
- package/lib/components/box/Box.d.ts +3 -3
- package/lib/components/box/Box.js +3 -3
- package/lib/components/box/Box.stories.d.ts +1 -1
- package/lib/components/box/Box.stories.js +1 -1
- package/lib/components/box/boxTokens.d.ts +2 -2
- package/lib/components/box/boxTokens.js +2 -2
- package/lib/components/calendar-picker/CalendarPicker.js +1 -1
- package/lib/components/card/Card.js +1 -1
- package/lib/components/color/ColorSwatch.js +1 -1
- package/lib/components/entity-avatar/EntityAvatar.d.ts +1 -1
- package/lib/components/entity-avatar/EntityAvatar.js +1 -1
- package/lib/components/hover-card/HoverCard.d.ts +1 -1
- package/lib/components/logo/DatalayerLogo.js +12 -12
- package/lib/components/logo/DatalayerLogo.stories.js +1 -1
- package/lib/components/sheet/Sheet.d.ts +1 -1
- package/lib/components/sheet/Sheet.js +1 -1
- package/lib/components/toolbar/ToolbarButton.js +1 -1
- package/lib/reactor/ThemePlugin.js +1 -1
- package/lib/reactor/index.d.ts +1 -1
- package/lib/reactor/index.js +1 -1
- package/lib/reactor/page-layout/PageLayout.d.ts +2 -2
- package/lib/reactor/page-layout/PageLayout.js +3 -3
- package/lib/reactor/page-layout/PageLayoutPlugin.js +2 -2
- package/lib/theme/DatalayerThemeProvider.js +1 -1
- package/lib/theme/{loopEyes.d.ts → agentEyes.d.ts} +3 -3
- package/lib/theme/{loopEyes.js → agentEyes.js} +3 -3
- package/lib/theme/colors/{loopColors.d.ts → agentColors.d.ts} +15 -15
- package/lib/theme/colors/{loopColors.js → agentColors.js} +16 -16
- package/lib/theme/colors/hueColors.d.ts +1 -1
- package/lib/theme/colors/hueColors.js +2 -2
- package/lib/theme/colors/index.d.ts +1 -1
- package/lib/theme/colors/index.js +3 -3
- package/lib/theme/colors/metalColors.d.ts +12 -12
- package/lib/theme/colors/metalColors.js +6 -6
- package/lib/theme/colors/themeAccents.d.ts +5 -6
- package/lib/theme/colors/themeAccents.js +4 -5
- package/lib/theme/css/createThemeCSSVars.d.ts +5 -5
- package/lib/theme/css/primerBaseVars.js +1 -1
- package/lib/theme/index.d.ts +2 -2
- package/lib/theme/index.js +2 -2
- package/lib/theme/palettes/ColorPalette.js +18 -18
- package/lib/theme/portable.d.ts +1 -1
- package/lib/theme/portable.js +1 -1
- package/lib/theme/themeRegistry.js +2 -2
- package/lib/theme/themeTokens.d.ts +1 -1
- package/lib/theme/themeTokens.js +38 -38
- package/lib/theme/themes/{loopTheme.d.ts → agentTheme.d.ts} +5 -5
- package/lib/theme/themes/{loopTheme.js → agentTheme.js} +11 -11
- package/lib/theme/themes/{loopThemeStyles.d.ts → agentThemeStyles.d.ts} +21 -21
- package/lib/theme/themes/{loopThemeStyles.js → agentThemeStyles.js} +175 -175
- package/lib/theme/themes/ivoryThemeStyles.d.ts +1 -1
- package/lib/theme/themes/ivoryThemeStyles.js +1 -1
- package/lib/theme/themes/metalThemeStyles.d.ts +1 -1
- package/lib/theme/themes/metalThemeStyles.js +25 -25
- package/lib/theme/themes/roundedShape.d.ts +2 -2
- package/lib/theme/themes/roundedShape.js +9 -9
- package/lib/theme/themes/sandThemeStyles.d.ts +1 -1
- package/lib/theme/themes/sandThemeStyles.js +1 -1
- package/lib/theme/themes/sunThemeStyles.d.ts +1 -1
- package/lib/theme/themes/sunThemeStyles.js +1 -1
- package/lib/theme/useThemeStore.d.ts +6 -0
- package/lib/theme/useThemeStore.js +29 -6
- package/lib/utils/Portals.d.ts +1 -1
- package/lib/utils/Portals.js +1 -1
- package/package.json +1 -1
- package/style/{loop-face.css → agent-face.css} +2 -2
|
@@ -37,7 +37,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
37
37
|
* card over the first lines.
|
|
38
38
|
*
|
|
39
39
|
* Nothing here decides what the parts do. A host wires them; this arranges
|
|
40
|
-
* them. It grew up as the
|
|
40
|
+
* them. It grew up as the Agent workspace's page layout, where the page is a notebook or
|
|
41
41
|
* a document, the band is the composer and the panel is the conversation;
|
|
42
42
|
* the names here are the general ones.
|
|
43
43
|
*
|
|
@@ -115,7 +115,7 @@ function ActivityLine({ label }) {
|
|
|
115
115
|
/**
|
|
116
116
|
* A panel opening from its side at the theme's pace: `--theme-motion-pane`
|
|
117
117
|
* and `--theme-motion-easing`, which every theme sets — to no motion at all
|
|
118
|
-
* but in `
|
|
118
|
+
* but in `agent`. The animation starts when the panel is shown.
|
|
119
119
|
*/
|
|
120
120
|
export function panelOpening(side) {
|
|
121
121
|
const name = side === "left" ? "pagePanelOpenLeft" : "pagePanelOpenRight";
|
|
@@ -318,7 +318,7 @@ export function PageLayout({ page, hasPage = page !== undefined && page !== null
|
|
|
318
318
|
display: "flex",
|
|
319
319
|
flexDirection: "column",
|
|
320
320
|
"& > *": { flex: "1 1 auto", minHeight: 0 },
|
|
321
|
-
// A pane opening, at the theme's pace
|
|
321
|
+
// A pane opening, at the theme's pace: from its
|
|
322
322
|
// side, by the theme's motion tokens — none in a theme that
|
|
323
323
|
// sets no motion, none when motion is reduced. On the
|
|
324
324
|
// content, not the column: a transform on the column would
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* and closes the panel goes in the header — only while something fills the
|
|
14
14
|
* panel slot, so a host with no panel gets no dead button.
|
|
15
15
|
*
|
|
16
|
-
* This is the
|
|
16
|
+
* This is the Agent workspace's page layout with the workspace taken out: there the chat
|
|
17
17
|
* view hands the layout its parts directly through a contribution point of
|
|
18
|
-
* its own, and the
|
|
18
|
+
* its own, and the workspace keeps that adapter. Here the parts are slots, which
|
|
19
19
|
* is what a plain Reactor host has.
|
|
20
20
|
*
|
|
21
21
|
* @module reactor/page-layout/PageLayoutPlugin
|
|
@@ -180,7 +180,7 @@ export function DatalayerThemeProvider(props) {
|
|
|
180
180
|
// Not before the DOM has been read: the first commit's effects run before
|
|
181
181
|
// the update that says whether this provider is nested, and a nested one
|
|
182
182
|
// — an application embedded in another product's page, in its own shadow
|
|
183
|
-
// root
|
|
183
|
+
// root — wrote its theme on that page's <body> before it knew.
|
|
184
184
|
useEffect(() => {
|
|
185
185
|
if (!placed || nested) {
|
|
186
186
|
// Another provider owns the page's portal root; see above.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The eyes of
|
|
2
|
+
* The eyes of the Agent wordmark, as geometry.
|
|
3
3
|
*
|
|
4
|
-
* The
|
|
4
|
+
* The wordmark is displayed with two eyes beside its letters. They are drawn,
|
|
5
5
|
* not typed: the emoji is a different picture on every platform, is missing
|
|
6
6
|
* on some, and is read aloud as "eyes". Two ovals and two pupils, in the
|
|
7
7
|
* colour of the text around them, look the same everywhere — the web's SVG
|
|
8
8
|
* and the mobile app's native views draw this same geometry.
|
|
9
9
|
*
|
|
10
10
|
* An eye is about as wide and as tall as a capital O of the face beside it,
|
|
11
|
-
* so that the two of them read
|
|
11
|
+
* so that the two of them read at the size of the letters beside them.
|
|
12
12
|
*
|
|
13
13
|
* Pure: nothing here renders.
|
|
14
14
|
*/
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* The eyes of
|
|
6
|
+
* The eyes of the Agent wordmark, as geometry.
|
|
7
7
|
*
|
|
8
|
-
* The
|
|
8
|
+
* The wordmark is displayed with two eyes beside its letters. They are drawn,
|
|
9
9
|
* not typed: the emoji is a different picture on every platform, is missing
|
|
10
10
|
* on some, and is read aloud as "eyes". Two ovals and two pupils, in the
|
|
11
11
|
* colour of the text around them, look the same everywhere — the web's SVG
|
|
12
12
|
* and the mobile app's native views draw this same geometry.
|
|
13
13
|
*
|
|
14
14
|
* An eye is about as wide and as tall as a capital O of the face beside it,
|
|
15
|
-
* so that the two of them read
|
|
15
|
+
* so that the two of them read at the size of the letters beside them.
|
|
16
16
|
*
|
|
17
17
|
* Pure: nothing here renders.
|
|
18
18
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Agent Color System – one accent, neutral everything else.
|
|
3
3
|
*
|
|
4
|
-
* The look of an application
|
|
4
|
+
* The look of an Agent application: a white (or near-black)
|
|
5
5
|
* canvas, near-black (or near-white) text, hairlines instead of borders,
|
|
6
6
|
* and a single soft accent that dark text sits on. Nothing else carries
|
|
7
7
|
* colour, apart from the three colours of a verdict.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* application may take one of five others: the accents are the theme
|
|
12
12
|
* system's, over every theme (`themeAccents`, decided 2026-10-07).
|
|
13
13
|
*/
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const agentColors: {
|
|
15
15
|
black: string;
|
|
16
16
|
gray: string;
|
|
17
17
|
white: string;
|
|
@@ -20,18 +20,18 @@ export declare const loopColors: {
|
|
|
20
20
|
subtle: string;
|
|
21
21
|
subtleDark: string;
|
|
22
22
|
grayDark: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
agentBrand: string;
|
|
24
|
+
agentOn: string;
|
|
25
|
+
agentAccent: string;
|
|
26
|
+
agentBrandHover: string;
|
|
27
|
+
agentText: string;
|
|
28
|
+
agentRing: string;
|
|
29
|
+
agentTint: string;
|
|
30
|
+
agentStage: string;
|
|
31
|
+
agentBright: string;
|
|
32
|
+
agentHover: string;
|
|
33
|
+
agentStageDark: string;
|
|
34
|
+
agentTintDark: string;
|
|
35
35
|
successBrand: string;
|
|
36
36
|
successAccent: string;
|
|
37
37
|
successTint: string;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Agent Color System – one accent, neutral everything else.
|
|
7
7
|
*
|
|
8
|
-
* The look of an application
|
|
8
|
+
* The look of an Agent application: a white (or near-black)
|
|
9
9
|
* canvas, near-black (or near-white) text, hairlines instead of borders,
|
|
10
10
|
* and a single soft accent that dark text sits on. Nothing else carries
|
|
11
11
|
* colour, apart from the three colours of a verdict.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* application may take one of five others: the accents are the theme
|
|
16
16
|
* system's, over every theme (`themeAccents`, decided 2026-10-07).
|
|
17
17
|
*/
|
|
18
|
-
export const
|
|
18
|
+
export const agentColors = {
|
|
19
19
|
// Core neutrals
|
|
20
20
|
black: '#131314', // Near-black — primary dark background
|
|
21
21
|
gray: '#6E6E73', // Secondary text on light: a soft grey, 5.1 to 1 on white
|
|
@@ -27,20 +27,20 @@ export const loopColors = {
|
|
|
27
27
|
subtle: '#F5F5F7', // Subtle surface on light (a bubble, a chip)
|
|
28
28
|
subtleDark: '#1E1E20', // Subtle surface on dark
|
|
29
29
|
grayDark: '#A1A1A6', // Secondary text on dark
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
// Agent palette (Brand) — mint
|
|
31
|
+
agentBrand: '#7ADBB8', // The accent — a bubble, a send button, a swatch
|
|
32
|
+
agentOn: '#06281E', // Text that sits on the accent (9.5 to 1)
|
|
33
|
+
agentAccent: '#4FC79C', // Deeper accent — charts, highlights
|
|
34
|
+
agentBrandHover: '#6CCFAA', // The filled button, hovered: dark text 8.4 to 1
|
|
35
|
+
agentText: '#248462', // Accent text & links on white: the lightest mint that reads, 4.6 to 1
|
|
36
|
+
agentRing: '#0F6B4F', // The focus ring: 3 to 1 or more around every pastel
|
|
37
|
+
agentTint: '#F0FAF6', // Quiet tint — a draft, a callout
|
|
38
|
+
agentStage: '#DDF5EC', // The stage behind an application
|
|
39
|
+
agentBright: '#8FE5C6', // Accent text & links on dark
|
|
40
|
+
agentHover: '#227C5C', // Accent text hover
|
|
41
41
|
// The stage and the quiet tint, on dark
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
agentStageDark: '#10261F',
|
|
43
|
+
agentTintDark: '#17211D',
|
|
44
44
|
// Semantic roles — kept for verdicts and rules only
|
|
45
45
|
successBrand: '#1F8A5B',
|
|
46
46
|
successAccent: '#58C797',
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* a dark background. A spec names its colour by hue (an agent's `color:
|
|
9
9
|
* indigo`), and the drawing follows the theme and its mode.
|
|
10
10
|
*
|
|
11
|
-
* Every theme takes the base values; a theme with hues of its own (`
|
|
11
|
+
* Every theme takes the base values; a theme with hues of its own (`agent`'s
|
|
12
12
|
* pastels, `vscode`'s terminal colours) gives them for the hues it has.
|
|
13
13
|
*/
|
|
14
14
|
import type { ThemeVariant } from '../themeTokens';
|
|
@@ -50,8 +50,8 @@ export const baseHueColors = {
|
|
|
50
50
|
};
|
|
51
51
|
/** The hues a theme gives of its own. */
|
|
52
52
|
const themeHueColors = {
|
|
53
|
-
//
|
|
54
|
-
|
|
53
|
+
// Agent's soft accents, deep on light, the pastels on dark (`themeAccents`).
|
|
54
|
+
agent: {
|
|
55
55
|
green: { light: '#248462', dark: '#8FE5C6' },
|
|
56
56
|
rose: { light: '#B83A6B', dark: '#F6A5C1' },
|
|
57
57
|
sky: { light: '#1F6FB0', dark: '#8CCBF9' },
|
|
@@ -6,7 +6,7 @@ export { earthColors } from './earthColors';
|
|
|
6
6
|
export { sandColors } from './sandColors';
|
|
7
7
|
export { ivoryColors } from './ivoryColors';
|
|
8
8
|
export { sunColors } from './sunColors';
|
|
9
|
-
export {
|
|
9
|
+
export { agentColors } from './agentColors';
|
|
10
10
|
export { metalColors } from './metalColors';
|
|
11
11
|
export { vscodeColors, vscodeVars, vscodeVar, vscodeTint, vscodeFontFamily, vscodeMonoFontFamily, vscodeFontSize, type VSCodeColor, type VSCodeVarName, } from './vscodeColors';
|
|
12
12
|
export { themeAccents, themeAccentNames, themeAccentVars, themeAccentTints, themeStageGradient, themeTintVars, type ThemeAccent, type ThemeAccentName, } from './themeAccents';
|
|
@@ -10,7 +10,7 @@ export { earthColors } from './earthColors';
|
|
|
10
10
|
export { sandColors } from './sandColors';
|
|
11
11
|
export { ivoryColors } from './ivoryColors';
|
|
12
12
|
export { sunColors } from './sunColors';
|
|
13
|
-
export {
|
|
13
|
+
export { agentColors } from './agentColors';
|
|
14
14
|
export { metalColors } from './metalColors';
|
|
15
15
|
export { vscodeColors, vscodeVars, vscodeVar, vscodeTint, vscodeFontFamily, vscodeMonoFontFamily, vscodeFontSize, } from './vscodeColors';
|
|
16
16
|
export { themeAccents, themeAccentNames, themeAccentVars, themeAccentTints, themeStageGradient, themeTintVars, } from './themeAccents';
|
|
@@ -23,7 +23,7 @@ import { earthColors } from './earthColors';
|
|
|
23
23
|
import { sandColors } from './sandColors';
|
|
24
24
|
import { ivoryColors } from './ivoryColors';
|
|
25
25
|
import { sunColors } from './sunColors';
|
|
26
|
-
import {
|
|
26
|
+
import { agentColors } from './agentColors';
|
|
27
27
|
import { metalColors } from './metalColors';
|
|
28
28
|
import { vscodeColors } from './vscodeColors';
|
|
29
29
|
/**
|
|
@@ -45,7 +45,7 @@ export const themedColors = {
|
|
|
45
45
|
sand: sandColors,
|
|
46
46
|
ivory: ivoryColors,
|
|
47
47
|
sun: sunColors,
|
|
48
|
-
|
|
48
|
+
agent: agentColors,
|
|
49
49
|
metal: metalColors,
|
|
50
50
|
vscode: vscodeColors,
|
|
51
51
|
};
|
|
@@ -48,18 +48,18 @@ export declare const metalColors: {
|
|
|
48
48
|
brightLightFlame: string;
|
|
49
49
|
brightLightGold: string;
|
|
50
50
|
white: string;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
agentBrand: string;
|
|
52
|
+
agentOn: string;
|
|
53
|
+
agentAccent: string;
|
|
54
|
+
agentBrandHover: string;
|
|
55
|
+
agentText: string;
|
|
56
|
+
agentRing: string;
|
|
57
|
+
agentTint: string;
|
|
58
|
+
agentStage: string;
|
|
59
|
+
agentBright: string;
|
|
60
|
+
agentHover: string;
|
|
61
|
+
agentStageDark: string;
|
|
62
|
+
agentTintDark: string;
|
|
63
63
|
successBrand: string;
|
|
64
64
|
successAccent: string;
|
|
65
65
|
successTint: string;
|
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Metal Color System – cool neutrals, one steel blue, four brushed surfaces.
|
|
7
7
|
*
|
|
8
|
-
* The
|
|
8
|
+
* The Agent theme's system with the warmth taken out: a white canvas under a
|
|
9
9
|
* blue-grey wash, hairlines with a little steel in them, and a slate-blue
|
|
10
|
-
* accent. Where
|
|
10
|
+
* accent. Where Agent has no gradient, Metal has four, for a surface that
|
|
11
11
|
* carries white text and glass on top: sage, steel, mauve and clay.
|
|
12
|
-
* The verdict colours are
|
|
12
|
+
* The verdict colours are Agent's.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { agentColors } from './agentColors';
|
|
15
15
|
export const metalColors = {
|
|
16
|
-
...
|
|
16
|
+
...agentColors,
|
|
17
17
|
// Core neutrals
|
|
18
18
|
black: '#1C2A33', // The deep base under the dark mesh
|
|
19
19
|
gray: '#6B7280', // Secondary text on light: 4.8 to 1 on white
|
|
20
|
-
ink: '#2A2F37', // Text on light: softer than
|
|
20
|
+
ink: '#2A2F37', // Text on light: softer than Agent's, 13.5 to 1 on white
|
|
21
21
|
inkDark: '#EEF2F7', // Text on dark
|
|
22
22
|
subtle: '#F6F8FC', // Subtle surface on light
|
|
23
23
|
subtleDark: '#25343F', // Subtle surface on dark, and the menus
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Six soft accents, each with the dark text that sits on it (the lowest
|
|
5
5
|
* contrast of the six is 8.8 to 1), the tint of the stage behind an
|
|
6
6
|
* application, a quiet tint, and the accent as text. They were drawn for
|
|
7
|
-
* the `
|
|
7
|
+
* the `agent` theme — green, mint, is `agent`'s own — and, since 2026-10-07
|
|
8
8
|
* (decided by the user), they colour every theme: `themeAccentVars` sets
|
|
9
9
|
* Primer's own accent and primary properties, so the filled button, links,
|
|
10
10
|
* the accent tokens and a selected tab take the accent whatever theme an
|
|
@@ -38,7 +38,7 @@ export interface ThemeAccent {
|
|
|
38
38
|
dark: string;
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
/** The six accents. One per application; everything else is the theme's. Green — mint — is `
|
|
41
|
+
/** The six accents. One per application; everything else is the theme's. Green — mint — is `agent`'s own. */
|
|
42
42
|
export declare const themeAccents: Record<ThemeAccentName, ThemeAccent>;
|
|
43
43
|
/** The names of the accents, in the order a picker shows them. */
|
|
44
44
|
export declare const themeAccentNames: ThemeAccentName[];
|
|
@@ -66,14 +66,13 @@ export declare function themeAccentTints(accent: Pick<ThemeAccent, 'accent' | 'o
|
|
|
66
66
|
*/
|
|
67
67
|
export declare function themeTintVars(defs: ThemeColorDefs): Record<string, string>;
|
|
68
68
|
/**
|
|
69
|
-
* An application's accent as everything it colours, over any theme (
|
|
70
|
-
* T-05, T-30): the accent's own properties (`--theme-accent`,
|
|
69
|
+
* An application's accent as everything it colours, over any theme: the accent's own properties (`--theme-accent`,
|
|
71
70
|
* `--theme-accent-on`, `--theme-stage`, `--theme-quiet`,
|
|
72
71
|
* `--theme-stage-gradient`), and Primer's — the accent fill, text, links,
|
|
73
72
|
* muted border and tint, the filled button, a checked switch, a selected
|
|
74
73
|
* tab — so that nothing on its page keeps the theme's default accent beside
|
|
75
|
-
* its own
|
|
76
|
-
* every accent
|
|
74
|
+
* its own. The theme's focus ring is kept: it is drawn to show around
|
|
75
|
+
* every accent. Set on an application's root, it wears its own
|
|
77
76
|
* colour; the page around keeps the theme's.
|
|
78
77
|
*
|
|
79
78
|
* An unknown name is refused.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/** The six accents. One per application; everything else is the theme's. Green — mint — is `
|
|
5
|
+
/** The six accents. One per application; everything else is the theme's. Green — mint — is `agent`'s own. */
|
|
6
6
|
export const themeAccents = {
|
|
7
7
|
green: {
|
|
8
8
|
accent: '#7ADBB8',
|
|
@@ -87,14 +87,13 @@ export function themeTintVars(defs) {
|
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* An application's accent as everything it colours, over any theme (
|
|
91
|
-
* T-05, T-30): the accent's own properties (`--theme-accent`,
|
|
90
|
+
* An application's accent as everything it colours, over any theme: the accent's own properties (`--theme-accent`,
|
|
92
91
|
* `--theme-accent-on`, `--theme-stage`, `--theme-quiet`,
|
|
93
92
|
* `--theme-stage-gradient`), and Primer's — the accent fill, text, links,
|
|
94
93
|
* muted border and tint, the filled button, a checked switch, a selected
|
|
95
94
|
* tab — so that nothing on its page keeps the theme's default accent beside
|
|
96
|
-
* its own
|
|
97
|
-
* every accent
|
|
95
|
+
* its own. The theme's focus ring is kept: it is drawn to show around
|
|
96
|
+
* every accent. Set on an application's root, it wears its own
|
|
98
97
|
* colour; the page around keeps the theme's.
|
|
99
98
|
*
|
|
100
99
|
* An unknown name is refused.
|
|
@@ -157,7 +157,7 @@ export interface ThemeStyles {
|
|
|
157
157
|
dark: CSSProperties;
|
|
158
158
|
/**
|
|
159
159
|
* A stylesheet of the theme's own, for what a custom property cannot say
|
|
160
|
-
|
|
160
|
+
*: every Primer control takes its corners from one token,
|
|
161
161
|
* `--borderRadius-medium`, which cards and list items take too, so a theme
|
|
162
162
|
* that wants its controls alone in another shape has to say so with
|
|
163
163
|
* selectors.
|
|
@@ -183,16 +183,16 @@ export interface ThemeStyles {
|
|
|
183
183
|
* hard-coded system-font fallback.
|
|
184
184
|
*/
|
|
185
185
|
/**
|
|
186
|
-
* The shape of a theme
|
|
186
|
+
* The shape of a theme: the radii of a control, a card, a bubble
|
|
187
187
|
* and a frame; the hairline; at most one level of shadow. As custom
|
|
188
188
|
* properties every theme sets — `--theme-radius-control` and the rest — so
|
|
189
189
|
* that a component reads its shape the way it reads its colour.
|
|
190
190
|
*
|
|
191
|
-
* And its motion
|
|
191
|
+
* And its motion: three durations — a status changing, a message
|
|
192
192
|
* arriving, a pane opening — and one easing. Today's is no motion at all, so
|
|
193
193
|
* a component that moves by them moves only in a theme that says so.
|
|
194
194
|
*
|
|
195
|
-
* And how a link reads in a message
|
|
195
|
+
* And how a link reads in a message: in the accent, as today, or
|
|
196
196
|
* — `currentColor` — plain, the colour of the words around it, underlined in
|
|
197
197
|
* every theme.
|
|
198
198
|
*
|
|
@@ -228,7 +228,7 @@ export declare const DEFAULT_THEME_SHAPE: ThemeShape;
|
|
|
228
228
|
export declare function shapeVars(shape?: Partial<ThemeShape>): Record<string, string>;
|
|
229
229
|
export declare function buildThemeStyles(light: ThemeColorDefs, dark: ThemeColorDefs, options?: {
|
|
230
230
|
fontFamily?: string;
|
|
231
|
-
/** Its shape
|
|
231
|
+
/** Its shape; today's, for what it does not say. */
|
|
232
232
|
shape?: Partial<ThemeShape>;
|
|
233
233
|
/**
|
|
234
234
|
* More custom properties, per mode, set after everything else: what a
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* the variable alone, with no fallback (see `components/box/Box.tsx`), so
|
|
14
14
|
* the theme provider sets every variable `Box` can emit: these, under the
|
|
15
15
|
* theme's own (`themeStyles`), which win where a theme says otherwise — the
|
|
16
|
-
* `
|
|
16
|
+
* `agent` theme's radii and shadows.
|
|
17
17
|
*/
|
|
18
18
|
const radii = {
|
|
19
19
|
'--borderRadius-small': '3px',
|
package/lib/theme/index.d.ts
CHANGED
|
@@ -13,14 +13,14 @@ export * from './themes/earthTheme';
|
|
|
13
13
|
export * from './themes/sandTheme';
|
|
14
14
|
export * from './themes/ivoryTheme';
|
|
15
15
|
export * from './themes/sunTheme';
|
|
16
|
-
export * from './themes/
|
|
16
|
+
export * from './themes/agentTheme';
|
|
17
17
|
export * from './themes/metalTheme';
|
|
18
18
|
export * from './themes/vscodeTheme';
|
|
19
19
|
export * from './themes/roundedShape';
|
|
20
20
|
export * from './themeRegistry';
|
|
21
21
|
export * from './portableTheme';
|
|
22
22
|
export * from './fontStacks';
|
|
23
|
-
export * from './
|
|
23
|
+
export * from './agentEyes';
|
|
24
24
|
export * from './palettes';
|
|
25
25
|
export * from './useSystemColorMode';
|
|
26
26
|
export * from './useThemeStore';
|
package/lib/theme/index.js
CHANGED
|
@@ -17,14 +17,14 @@ export * from './themes/earthTheme';
|
|
|
17
17
|
export * from './themes/sandTheme';
|
|
18
18
|
export * from './themes/ivoryTheme';
|
|
19
19
|
export * from './themes/sunTheme';
|
|
20
|
-
export * from './themes/
|
|
20
|
+
export * from './themes/agentTheme';
|
|
21
21
|
export * from './themes/metalTheme';
|
|
22
22
|
export * from './themes/vscodeTheme';
|
|
23
23
|
export * from './themes/roundedShape';
|
|
24
24
|
export * from './themeRegistry';
|
|
25
25
|
export * from './portableTheme';
|
|
26
26
|
export * from './fontStacks';
|
|
27
|
-
export * from './
|
|
27
|
+
export * from './agentEyes';
|
|
28
28
|
export * from './palettes';
|
|
29
29
|
export * from './useSystemColorMode';
|
|
30
30
|
export * from './useThemeStore';
|
|
@@ -7,7 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
* Shared palette types, theme-aware colour resolution, and reusable
|
|
8
8
|
* gradient / grid definitions.
|
|
9
9
|
*/
|
|
10
|
-
import { datalayerColors, spatialColors, lovelyColors, matrixColors, earthColors, sandColors, ivoryColors, sunColors,
|
|
10
|
+
import { datalayerColors, spatialColors, lovelyColors, matrixColors, earthColors, sandColors, ivoryColors, sunColors, agentColors, metalColors, vscodeColors, hueColorsOf, hueNames, } from '../colors';
|
|
11
11
|
import { getBrightPalette, } from '../themeRegistry';
|
|
12
12
|
import { useCallback } from 'react';
|
|
13
13
|
import { useThemeStore } from '../useThemeStore';
|
|
@@ -61,8 +61,8 @@ const ivBrightDark = getBrightPalette('ivory');
|
|
|
61
61
|
const ivBrightLight = getBrightPalette('ivory', 'light');
|
|
62
62
|
const suBrightDark = getBrightPalette('sun');
|
|
63
63
|
const suBrightLight = getBrightPalette('sun', 'light');
|
|
64
|
-
const loBrightDark = getBrightPalette('
|
|
65
|
-
const loBrightLight = getBrightPalette('
|
|
64
|
+
const loBrightDark = getBrightPalette('agent');
|
|
65
|
+
const loBrightLight = getBrightPalette('agent', 'light');
|
|
66
66
|
const meBrightDark = getBrightPalette('metal');
|
|
67
67
|
const meBrightLight = getBrightPalette('metal', 'light');
|
|
68
68
|
const vsBrightDark = getBrightPalette('vscode');
|
|
@@ -372,14 +372,14 @@ const rolePalettes = {
|
|
|
372
372
|
isLight: false,
|
|
373
373
|
},
|
|
374
374
|
},
|
|
375
|
-
|
|
375
|
+
agent: {
|
|
376
376
|
light: {
|
|
377
|
-
bg:
|
|
377
|
+
bg: agentColors.white,
|
|
378
378
|
bgPanel: '#ffffff',
|
|
379
|
-
bgAlt:
|
|
380
|
-
primary:
|
|
381
|
-
secondary:
|
|
382
|
-
accent:
|
|
379
|
+
bgAlt: agentColors.subtle,
|
|
380
|
+
primary: agentColors.agentBrand,
|
|
381
|
+
secondary: agentColors.agentText,
|
|
382
|
+
accent: agentColors.agentAccent,
|
|
383
383
|
glow: loBrightLight.glow,
|
|
384
384
|
pop: loBrightLight.pop,
|
|
385
385
|
spark: loBrightLight.spark,
|
|
@@ -387,17 +387,17 @@ const rolePalettes = {
|
|
|
387
387
|
surge: loBrightLight.surge,
|
|
388
388
|
flame: loBrightLight.flame,
|
|
389
389
|
gold: loBrightLight.gold,
|
|
390
|
-
textLight:
|
|
391
|
-
textMuted:
|
|
390
|
+
textLight: agentColors.ink,
|
|
391
|
+
textMuted: agentColors.gray,
|
|
392
392
|
isLight: true,
|
|
393
393
|
},
|
|
394
394
|
dark: {
|
|
395
|
-
bg:
|
|
395
|
+
bg: agentColors.black,
|
|
396
396
|
bgPanel: '#19191B',
|
|
397
|
-
bgAlt:
|
|
398
|
-
primary:
|
|
399
|
-
secondary:
|
|
400
|
-
accent:
|
|
397
|
+
bgAlt: agentColors.subtleDark,
|
|
398
|
+
primary: agentColors.agentBrand,
|
|
399
|
+
secondary: agentColors.agentBright,
|
|
400
|
+
accent: agentColors.agentAccent,
|
|
401
401
|
glow: loBrightDark.glow,
|
|
402
402
|
pop: loBrightDark.pop,
|
|
403
403
|
spark: loBrightDark.spark,
|
|
@@ -405,8 +405,8 @@ const rolePalettes = {
|
|
|
405
405
|
surge: loBrightDark.surge,
|
|
406
406
|
flame: loBrightDark.flame,
|
|
407
407
|
gold: loBrightDark.gold,
|
|
408
|
-
textLight:
|
|
409
|
-
textMuted:
|
|
408
|
+
textLight: agentColors.inkDark,
|
|
409
|
+
textMuted: agentColors.grayDark,
|
|
410
410
|
isLight: false,
|
|
411
411
|
},
|
|
412
412
|
},
|
package/lib/theme/portable.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
export * from './colors';
|
|
11
11
|
export * from './indicators';
|
|
12
12
|
export * from './fontStacks';
|
|
13
|
-
export * from './
|
|
13
|
+
export * from './agentEyes';
|
|
14
14
|
export * from './portableTheme';
|
|
15
15
|
export * from './themeTokens';
|
|
16
16
|
export { type ThemeColorDefs, type ThemeStyles, type ThemeShape, DEFAULT_THEME_SHAPE, colorDefsToCSS, shapeVars, buildThemeStyles, } from './css/createThemeCSSVars';
|
package/lib/theme/portable.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
export * from './colors';
|
|
15
15
|
export * from './indicators';
|
|
16
16
|
export * from './fontStacks';
|
|
17
|
-
export * from './
|
|
17
|
+
export * from './agentEyes';
|
|
18
18
|
export * from './portableTheme';
|
|
19
19
|
export * from './themeTokens';
|
|
20
20
|
export { DEFAULT_THEME_SHAPE, colorDefsToCSS, shapeVars, buildThemeStyles, } from './css/createThemeCSSVars';
|
|
@@ -16,7 +16,7 @@ import { earthTheme } from './themes/earthTheme';
|
|
|
16
16
|
import { sandTheme } from './themes/sandTheme';
|
|
17
17
|
import { ivoryTheme } from './themes/ivoryTheme';
|
|
18
18
|
import { sunTheme } from './themes/sunTheme';
|
|
19
|
-
import {
|
|
19
|
+
import { agentTheme } from './themes/agentTheme';
|
|
20
20
|
import { metalTheme } from './themes/metalTheme';
|
|
21
21
|
import { vscodeTheme, vscodeThemeStyles } from './themes/vscodeTheme';
|
|
22
22
|
import { avatarColorsOf, brightPaletteOf, themeTokens, } from './themeTokens';
|
|
@@ -30,7 +30,7 @@ const primerThemes = {
|
|
|
30
30
|
sand: sandTheme,
|
|
31
31
|
ivory: ivoryTheme,
|
|
32
32
|
sun: sunTheme,
|
|
33
|
-
|
|
33
|
+
agent: agentTheme,
|
|
34
34
|
metal: metalTheme,
|
|
35
35
|
vscode: vscodeTheme,
|
|
36
36
|
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { type ColorMode } from './colorMode';
|
|
8
8
|
import { type ThemeStyles } from './css/createThemeCSSVars';
|
|
9
9
|
/** Available theme variants. */
|
|
10
|
-
export type ThemeVariant = 'datalayer' | 'spatial' | 'lovely' | 'matrix' | 'earth' | 'sand' | 'ivory' | 'sun' | '
|
|
10
|
+
export type ThemeVariant = 'datalayer' | 'spatial' | 'lovely' | 'matrix' | 'earth' | 'sand' | 'ivory' | 'sun' | 'agent' | 'metal' | 'vscode';
|
|
11
11
|
/** A pair of colours for a two-stop gradient. */
|
|
12
12
|
export interface GradientPair {
|
|
13
13
|
/** Start colour (brighter / brand). */
|