@datalayer/primer-addons 1.0.53 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +4 -2
- 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/Toolbar.d.ts +14 -2
- package/lib/components/toolbar/Toolbar.js +102 -8
- package/lib/components/toolbar/ToolbarButton.js +1 -1
- package/lib/components/toolbar/ToolbarRenderer.d.ts +2 -0
- package/lib/components/toolbar/ToolbarRenderer.js +3 -1
- package/lib/components/toolbar/types.d.ts +6 -0
- 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
|
@@ -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). */
|
package/lib/theme/themeTokens.js
CHANGED
|
@@ -10,7 +10,7 @@ import { earthThemeStyles } from './themes/earthThemeStyles';
|
|
|
10
10
|
import { sandThemeStyles } from './themes/sandThemeStyles';
|
|
11
11
|
import { ivoryThemeStyles } from './themes/ivoryThemeStyles';
|
|
12
12
|
import { sunThemeStyles } from './themes/sunThemeStyles';
|
|
13
|
-
import {
|
|
13
|
+
import { agentThemeStyles } from './themes/agentThemeStyles';
|
|
14
14
|
import { metalThemeStyles } from './themes/metalThemeStyles';
|
|
15
15
|
import { vscodePortableThemeStyles } from './themes/vscodeThemeStyles';
|
|
16
16
|
import { datalayerColors } from './colors/datalayerColors';
|
|
@@ -21,7 +21,7 @@ import { earthColors } from './colors/earthColors';
|
|
|
21
21
|
import { sandColors } from './colors/sandColors';
|
|
22
22
|
import { ivoryColors } from './colors/ivoryColors';
|
|
23
23
|
import { sunColors } from './colors/sunColors';
|
|
24
|
-
import {
|
|
24
|
+
import { agentColors } from './colors/agentColors';
|
|
25
25
|
import { metalColors } from './colors/metalColors';
|
|
26
26
|
import { vscodeColors } from './colors/vscodeColors';
|
|
27
27
|
/* ─── Registry ────────────────────────────────────────────────────────── */
|
|
@@ -274,41 +274,41 @@ export const themeTokens = {
|
|
|
274
274
|
gold: sunColors.brightLightGold, // #8A6E00 — deep gold
|
|
275
275
|
},
|
|
276
276
|
},
|
|
277
|
-
|
|
278
|
-
label: '
|
|
279
|
-
description: 'Very clean: one soft accent, neutral everything else. The look of an application
|
|
280
|
-
brandColor:
|
|
277
|
+
agent: {
|
|
278
|
+
label: 'Agent',
|
|
279
|
+
description: 'Very clean: one soft accent, neutral everything else. The look of an Agent application.',
|
|
280
|
+
brandColor: agentColors.agentBrand,
|
|
281
281
|
defaultColorMode: 'light',
|
|
282
|
-
themeStyles:
|
|
282
|
+
themeStyles: agentThemeStyles,
|
|
283
283
|
// The theme has no gradient on a surface: both stops are the accent.
|
|
284
284
|
cardGradient: {
|
|
285
|
-
light: { from:
|
|
286
|
-
dark: { from:
|
|
285
|
+
light: { from: agentColors.agentBrand, to: agentColors.agentBrand }, // #7ADBB8, flat
|
|
286
|
+
dark: { from: agentColors.agentBrand, to: agentColors.agentBrand }, // #7ADBB8, flat
|
|
287
287
|
},
|
|
288
288
|
brightPalette: {
|
|
289
|
-
glow:
|
|
290
|
-
onGlow:
|
|
291
|
-
pop:
|
|
292
|
-
spark:
|
|
293
|
-
blaze:
|
|
294
|
-
surge:
|
|
295
|
-
flame:
|
|
296
|
-
gold:
|
|
289
|
+
glow: agentColors.brightGlow, // #7ADBB8 — green, the accent
|
|
290
|
+
onGlow: agentColors.agentOn, // dark text on the accent
|
|
291
|
+
pop: agentColors.brightPop, // #8CCBF9 — sky
|
|
292
|
+
spark: agentColors.brightSpark, // #BEDC55 — lime
|
|
293
|
+
blaze: agentColors.brightBlaze, // #F6A5C1 — rose
|
|
294
|
+
surge: agentColors.brightSurge, // #C0AEF6 — violet
|
|
295
|
+
flame: agentColors.brightFlame, // #F4A261 — soft orange
|
|
296
|
+
gold: agentColors.brightGold, // #F8D469 — sun
|
|
297
297
|
},
|
|
298
298
|
brightPaletteLight: {
|
|
299
|
-
glow:
|
|
299
|
+
glow: agentColors.brightLightGlow, // #0F6B4F — deep green
|
|
300
300
|
onGlow: '#ffffff', // white text on deep green
|
|
301
|
-
pop:
|
|
302
|
-
spark:
|
|
303
|
-
blaze:
|
|
304
|
-
surge:
|
|
305
|
-
flame:
|
|
306
|
-
gold:
|
|
301
|
+
pop: agentColors.brightLightPop, // #1F6FB0 — deep sky
|
|
302
|
+
spark: agentColors.brightLightSpark, // #5F7A00 — deep lime
|
|
303
|
+
blaze: agentColors.brightLightBlaze, // #B83A6B — deep rose
|
|
304
|
+
surge: agentColors.brightLightSurge, // #6B53C9 — deep violet
|
|
305
|
+
flame: agentColors.brightLightFlame, // #B4571A — deep orange
|
|
306
|
+
gold: agentColors.brightLightGold, // #8A6A00 — deep sun
|
|
307
307
|
},
|
|
308
308
|
},
|
|
309
309
|
metal: {
|
|
310
310
|
label: 'Metal',
|
|
311
|
-
description: '
|
|
311
|
+
description: 'Agent’s curves, on a page of its own: a dotted wash on light, a deep gradient and frosted glass on dark.',
|
|
312
312
|
brandColor: metalColors.metalBrand,
|
|
313
313
|
defaultColorMode: 'light',
|
|
314
314
|
themeStyles: metalThemeStyles,
|
|
@@ -379,7 +379,7 @@ export const themeVariants = [
|
|
|
379
379
|
'sand',
|
|
380
380
|
'ivory',
|
|
381
381
|
'sun',
|
|
382
|
-
'
|
|
382
|
+
'agent',
|
|
383
383
|
'metal',
|
|
384
384
|
'vscode',
|
|
385
385
|
];
|
|
@@ -545,20 +545,20 @@ const avatarColorPalettes = {
|
|
|
545
545
|
sunColors.brightSurge, // #4FB0C6 — sky blue
|
|
546
546
|
],
|
|
547
547
|
},
|
|
548
|
-
|
|
548
|
+
agent: {
|
|
549
549
|
light: [
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
550
|
+
agentColors.brightLightGlow, // #0F6B4F — deep green
|
|
551
|
+
agentColors.brightLightPop, // #1F6FB0 — deep sky
|
|
552
|
+
agentColors.brightLightBlaze, // #B83A6B — deep rose
|
|
553
|
+
agentColors.brightLightSurge, // #6B53C9 — deep violet
|
|
554
|
+
agentColors.gray, // #6A6A66 — neutral gray
|
|
555
555
|
],
|
|
556
556
|
dark: [
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
557
|
+
agentColors.agentBrand, // #7ADBB8 — green
|
|
558
|
+
agentColors.brightPop, // #8CCBF9 — sky
|
|
559
|
+
agentColors.brightBlaze, // #F6A5C1 — rose
|
|
560
|
+
agentColors.brightSurge, // #C0AEF6 — violet
|
|
561
|
+
agentColors.brightGold, // #F8D469 — sun
|
|
562
562
|
],
|
|
563
563
|
},
|
|
564
564
|
metal: {
|
|
@@ -570,7 +570,7 @@ const avatarColorPalettes = {
|
|
|
570
570
|
metalColors.gray,
|
|
571
571
|
],
|
|
572
572
|
dark: [
|
|
573
|
-
metalColors.
|
|
573
|
+
metalColors.agentBrand,
|
|
574
574
|
metalColors.brightPop,
|
|
575
575
|
metalColors.brightBlaze,
|
|
576
576
|
metalColors.brightSurge,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './agentThemeStyles';
|
|
2
2
|
/**
|
|
3
3
|
* The Primer theme object.
|
|
4
4
|
*
|
|
5
|
-
* Theming is done through CSS custom properties (see `
|
|
5
|
+
* Theming is done through CSS custom properties (see `agentThemeStyles`), but
|
|
6
6
|
* `sx` reads its weights from this object: Primer's `semibold` is 500 and its
|
|
7
7
|
* `light` 300, so `fontWeight: 'semibold'` drew a third weight beside the
|
|
8
|
-
* theme's two. Here the four names are the two weights
|
|
8
|
+
* theme's two. Here the four names are the two weights:
|
|
9
9
|
* `light` and `normal` the regular, `semibold` and `bold` the semibold.
|
|
10
10
|
* Everything else is Primer's default.
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const agentTheme: {
|
|
13
13
|
fontWeights: {
|
|
14
14
|
light: 400;
|
|
15
15
|
normal: 400;
|
|
@@ -1090,4 +1090,4 @@ export declare const loopTheme: {
|
|
|
1090
1090
|
}>;
|
|
1091
1091
|
}>;
|
|
1092
1092
|
};
|
|
1093
|
-
export default
|
|
1093
|
+
export default agentTheme;
|
|
@@ -3,30 +3,30 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The Agent theme for Primer React: its styles, from `./agentThemeStyles`, and
|
|
7
7
|
* the Primer theme object. Code that needs the tokens without Primer React
|
|
8
8
|
* (a native app) imports the styles module instead.
|
|
9
9
|
*/
|
|
10
10
|
import { theme as primerTheme } from '@primer/react';
|
|
11
|
-
import {
|
|
12
|
-
export * from './
|
|
11
|
+
import { agentFontWeights } from './agentThemeStyles';
|
|
12
|
+
export * from './agentThemeStyles';
|
|
13
13
|
/**
|
|
14
14
|
* The Primer theme object.
|
|
15
15
|
*
|
|
16
|
-
* Theming is done through CSS custom properties (see `
|
|
16
|
+
* Theming is done through CSS custom properties (see `agentThemeStyles`), but
|
|
17
17
|
* `sx` reads its weights from this object: Primer's `semibold` is 500 and its
|
|
18
18
|
* `light` 300, so `fontWeight: 'semibold'` drew a third weight beside the
|
|
19
|
-
* theme's two. Here the four names are the two weights
|
|
19
|
+
* theme's two. Here the four names are the two weights:
|
|
20
20
|
* `light` and `normal` the regular, `semibold` and `bold` the semibold.
|
|
21
21
|
* Everything else is Primer's default.
|
|
22
22
|
*/
|
|
23
|
-
export const
|
|
23
|
+
export const agentTheme = {
|
|
24
24
|
...primerTheme,
|
|
25
25
|
fontWeights: {
|
|
26
|
-
light:
|
|
27
|
-
normal:
|
|
28
|
-
semibold:
|
|
29
|
-
bold:
|
|
26
|
+
light: agentFontWeights.regular,
|
|
27
|
+
normal: agentFontWeights.regular,
|
|
28
|
+
semibold: agentFontWeights.semibold,
|
|
29
|
+
bold: agentFontWeights.semibold,
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
|
-
export default
|
|
32
|
+
export default agentTheme;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type ThemeColorDefs } from '../css/createThemeCSSVars';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const agentLight: ThemeColorDefs;
|
|
3
|
+
export declare const agentDark: ThemeColorDefs;
|
|
4
4
|
/**
|
|
5
|
-
* What the
|
|
5
|
+
* What the Agent theme sets beside colour, the same in both modes.
|
|
6
6
|
*
|
|
7
|
-
* Primer's own radii are made rounder; the `--
|
|
7
|
+
* Primer's own radii are made rounder; the `--agent-*` properties are what
|
|
8
8
|
* an application is drawn with. A face is an emoji at one of three sizes;
|
|
9
9
|
* motion has three durations and one easing.
|
|
10
10
|
*/
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const agentShapeVars: Record<string, string>;
|
|
12
12
|
/**
|
|
13
13
|
* Shadows, per mode: how a surface floats. Soft and low in the light —
|
|
14
14
|
* a card is told apart by its shadow more than by a line; in the dark a
|
|
@@ -16,9 +16,9 @@ export declare const loopShapeVars: Record<string, string>;
|
|
|
16
16
|
* deeper shadow. Primer's own shadow tokens take the same hand, so a menu
|
|
17
17
|
* or a dialog floats the way a frame does.
|
|
18
18
|
*/
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const agentShadows: Record<'light' | 'dark', Record<string, string>>;
|
|
20
20
|
/**
|
|
21
|
-
* Type
|
|
21
|
+
* Type: one face, two weights, five sizes, one line-height per
|
|
22
22
|
* size — each line a multiple of 4px.
|
|
23
23
|
*
|
|
24
24
|
* | Size | Line | Tokens |
|
|
@@ -35,7 +35,7 @@ export declare const loopShadows: Record<'light' | 'dark', Record<string, string
|
|
|
35
35
|
* is; the body left alone. The tracking is a token for a component to apply,
|
|
36
36
|
* since a CSS font shorthand carries none.
|
|
37
37
|
*/
|
|
38
|
-
export declare const
|
|
38
|
+
export declare const agentTypeScale: {
|
|
39
39
|
readonly display: {
|
|
40
40
|
readonly size: "2rem";
|
|
41
41
|
readonly lineHeight: "1.25";
|
|
@@ -57,30 +57,30 @@ export declare const loopTypeScale: {
|
|
|
57
57
|
readonly lineHeight: "1.3333";
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
/** The two weights of the `
|
|
61
|
-
export declare const
|
|
60
|
+
/** The two weights of the `agent` theme. */
|
|
61
|
+
export declare const agentFontWeights: {
|
|
62
62
|
readonly regular: 400;
|
|
63
63
|
readonly semibold: 600;
|
|
64
64
|
};
|
|
65
|
-
export declare const
|
|
65
|
+
export declare const agentTypeVars: (font: string) => Record<string, string>;
|
|
66
66
|
/**
|
|
67
67
|
* Inter, then its metric-matched fallback, then the system's own sans-serif
|
|
68
|
-
|
|
68
|
+
*. One face, two weights (400 and 600). The face is served by the
|
|
69
69
|
* page's own build: a page wearing the theme imports
|
|
70
|
-
* `@datalayer/primer-addons/style/
|
|
70
|
+
* `@datalayer/primer-addons/style/agent-face.css`, which declares
|
|
71
71
|
* `Inter Variable` from `@fontsource-variable/inter` and `Inter Fallback`, a
|
|
72
72
|
* local Arial drawn to Inter's measure. The text paints in the fallback first
|
|
73
73
|
* and does not move when Inter arrives; a page that has not imported the
|
|
74
74
|
* stylesheet shows the system face.
|
|
75
75
|
*/
|
|
76
|
-
export declare const
|
|
76
|
+
export declare const agentFontFamily = "\"Inter Variable\", \"Inter Fallback\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif";
|
|
77
77
|
/**
|
|
78
|
-
* Motion
|
|
78
|
+
* Motion: three durations and one easing, for three things — a
|
|
79
79
|
* status changing, a message arriving, a pane opening. Nothing else moves.
|
|
80
80
|
*/
|
|
81
|
-
export declare const
|
|
81
|
+
export declare const agentMotionVars: Record<string, string>;
|
|
82
82
|
/**
|
|
83
|
-
* The focus ring
|
|
83
|
+
* The focus ring: 3 to 1 against the page and around a pill of
|
|
84
84
|
* any accent, in both modes. In light mode the deep mint does it — darker than the text, the one place it is —
|
|
85
85
|
* a halo in the theme's colour, as a system's own focus ring is — 6.5 to 1
|
|
86
86
|
* on white and 3.28 or more around every pastel. In dark mode no
|
|
@@ -89,14 +89,14 @@ export declare const loopMotionVars: Record<string, string>;
|
|
|
89
89
|
* mid grey does, at 3.04 to 1 — and 2.77 to 1 on the subtle dark surface,
|
|
90
90
|
* the one place it falls short.
|
|
91
91
|
*/
|
|
92
|
-
export declare const
|
|
92
|
+
export declare const agentFocusRing: {
|
|
93
93
|
readonly light: string;
|
|
94
94
|
readonly dark: "#636363";
|
|
95
95
|
};
|
|
96
96
|
/** Comprehensive Primer CSS-variable overrides for light & dark mode. */
|
|
97
|
-
export declare const
|
|
97
|
+
export declare const agentThemeStyles: import("../css/createThemeCSSVars").ThemeStyles;
|
|
98
98
|
/**
|
|
99
|
-
* The
|
|
99
|
+
* The agent theme's whole stylesheet (`ThemeStyles.css`): its controls as
|
|
100
100
|
* pills and its tables rounder, drawn from its shape, then its own rules.
|
|
101
101
|
*/
|
|
102
|
-
export declare const
|
|
102
|
+
export declare const agentControlsCss: string;
|