@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.
Files changed (77) hide show
  1. package/README.md +32 -32
  2. package/lib/components/appearance/AppearanceControls.js +1 -1
  3. package/lib/components/appearance/AppearanceMenu.stories.d.ts +1 -1
  4. package/lib/components/appearance/AppearanceMenu.stories.js +2 -2
  5. package/lib/components/appearance/CollaboratorPalette.stories.d.ts +1 -1
  6. package/lib/components/appearance/CollaboratorPalette.stories.js +2 -2
  7. package/lib/components/appearance/ColorModeCircle.js +1 -1
  8. package/lib/components/appearance/ThemeCircle.stories.js +1 -1
  9. package/lib/components/appearance/ThemePreviewCard.js +1 -1
  10. package/lib/components/appearance/ThemePreviewCard.stories.d.ts +1 -1
  11. package/lib/components/appearance/ThemePreviewCard.stories.js +1 -1
  12. package/lib/components/box/Box.d.ts +3 -3
  13. package/lib/components/box/Box.js +3 -3
  14. package/lib/components/box/Box.stories.d.ts +1 -1
  15. package/lib/components/box/Box.stories.js +1 -1
  16. package/lib/components/box/boxTokens.d.ts +2 -2
  17. package/lib/components/box/boxTokens.js +2 -2
  18. package/lib/components/calendar-picker/CalendarPicker.js +1 -1
  19. package/lib/components/card/Card.js +1 -1
  20. package/lib/components/color/ColorSwatch.js +1 -1
  21. package/lib/components/entity-avatar/EntityAvatar.d.ts +1 -1
  22. package/lib/components/entity-avatar/EntityAvatar.js +1 -1
  23. package/lib/components/hover-card/HoverCard.d.ts +1 -1
  24. package/lib/components/logo/DatalayerLogo.js +12 -12
  25. package/lib/components/logo/DatalayerLogo.stories.js +1 -1
  26. package/lib/components/sheet/Sheet.d.ts +1 -1
  27. package/lib/components/sheet/Sheet.js +1 -1
  28. package/lib/components/toolbar/ToolbarButton.js +1 -1
  29. package/lib/reactor/ThemePlugin.js +1 -1
  30. package/lib/reactor/index.d.ts +1 -1
  31. package/lib/reactor/index.js +1 -1
  32. package/lib/reactor/page-layout/PageLayout.d.ts +2 -2
  33. package/lib/reactor/page-layout/PageLayout.js +3 -3
  34. package/lib/reactor/page-layout/PageLayoutPlugin.js +2 -2
  35. package/lib/theme/DatalayerThemeProvider.js +1 -1
  36. package/lib/theme/{loopEyes.d.ts → agentEyes.d.ts} +3 -3
  37. package/lib/theme/{loopEyes.js → agentEyes.js} +3 -3
  38. package/lib/theme/colors/{loopColors.d.ts → agentColors.d.ts} +15 -15
  39. package/lib/theme/colors/{loopColors.js → agentColors.js} +16 -16
  40. package/lib/theme/colors/hueColors.d.ts +1 -1
  41. package/lib/theme/colors/hueColors.js +2 -2
  42. package/lib/theme/colors/index.d.ts +1 -1
  43. package/lib/theme/colors/index.js +3 -3
  44. package/lib/theme/colors/metalColors.d.ts +12 -12
  45. package/lib/theme/colors/metalColors.js +6 -6
  46. package/lib/theme/colors/themeAccents.d.ts +5 -6
  47. package/lib/theme/colors/themeAccents.js +4 -5
  48. package/lib/theme/css/createThemeCSSVars.d.ts +5 -5
  49. package/lib/theme/css/primerBaseVars.js +1 -1
  50. package/lib/theme/index.d.ts +2 -2
  51. package/lib/theme/index.js +2 -2
  52. package/lib/theme/palettes/ColorPalette.js +18 -18
  53. package/lib/theme/portable.d.ts +1 -1
  54. package/lib/theme/portable.js +1 -1
  55. package/lib/theme/themeRegistry.js +2 -2
  56. package/lib/theme/themeTokens.d.ts +1 -1
  57. package/lib/theme/themeTokens.js +38 -38
  58. package/lib/theme/themes/{loopTheme.d.ts → agentTheme.d.ts} +5 -5
  59. package/lib/theme/themes/{loopTheme.js → agentTheme.js} +11 -11
  60. package/lib/theme/themes/{loopThemeStyles.d.ts → agentThemeStyles.d.ts} +21 -21
  61. package/lib/theme/themes/{loopThemeStyles.js → agentThemeStyles.js} +175 -175
  62. package/lib/theme/themes/ivoryThemeStyles.d.ts +1 -1
  63. package/lib/theme/themes/ivoryThemeStyles.js +1 -1
  64. package/lib/theme/themes/metalThemeStyles.d.ts +1 -1
  65. package/lib/theme/themes/metalThemeStyles.js +25 -25
  66. package/lib/theme/themes/roundedShape.d.ts +2 -2
  67. package/lib/theme/themes/roundedShape.js +9 -9
  68. package/lib/theme/themes/sandThemeStyles.d.ts +1 -1
  69. package/lib/theme/themes/sandThemeStyles.js +1 -1
  70. package/lib/theme/themes/sunThemeStyles.d.ts +1 -1
  71. package/lib/theme/themes/sunThemeStyles.js +1 -1
  72. package/lib/theme/useThemeStore.d.ts +6 -0
  73. package/lib/theme/useThemeStore.js +29 -6
  74. package/lib/utils/Portals.d.ts +1 -1
  75. package/lib/utils/Portals.js +1 -1
  76. package/package.json +1 -1
  77. package/style/{loop-face.css → agent-face.css} +2 -2
@@ -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 { loopThemeStyles } from './themes/loopThemeStyles';
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 { loopColors } from './colors/loopColors';
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
- loop: {
278
- label: 'Loop',
279
- description: 'Very clean: one soft accent, neutral everything else. The look of an application built in LOOP.',
280
- brandColor: loopColors.loopBrand,
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: loopThemeStyles,
282
+ themeStyles: agentThemeStyles,
283
283
  // The theme has no gradient on a surface: both stops are the accent.
284
284
  cardGradient: {
285
- light: { from: loopColors.loopBrand, to: loopColors.loopBrand }, // #7ADBB8, flat
286
- dark: { from: loopColors.loopBrand, to: loopColors.loopBrand }, // #7ADBB8, flat
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: loopColors.brightGlow, // #7ADBB8 — green, the accent
290
- onGlow: loopColors.loopOn, // dark text on the accent
291
- pop: loopColors.brightPop, // #8CCBF9 — sky
292
- spark: loopColors.brightSpark, // #BEDC55 — lime
293
- blaze: loopColors.brightBlaze, // #F6A5C1 — rose
294
- surge: loopColors.brightSurge, // #C0AEF6 — violet
295
- flame: loopColors.brightFlame, // #F4A261 — soft orange
296
- gold: loopColors.brightGold, // #F8D469 — sun
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: loopColors.brightLightGlow, // #0F6B4F — deep green
299
+ glow: agentColors.brightLightGlow, // #0F6B4F — deep green
300
300
  onGlow: '#ffffff', // white text on deep green
301
- pop: loopColors.brightLightPop, // #1F6FB0 — deep sky
302
- spark: loopColors.brightLightSpark, // #5F7A00 — deep lime
303
- blaze: loopColors.brightLightBlaze, // #B83A6B — deep rose
304
- surge: loopColors.brightLightSurge, // #6B53C9 — deep violet
305
- flame: loopColors.brightLightFlame, // #B4571A — deep orange
306
- gold: loopColors.brightLightGold, // #8A6A00 — deep sun
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: 'Loop’s curves, on a page of its own: a dotted wash on light, a deep gradient and frosted glass on dark.',
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
- 'loop',
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
- loop: {
548
+ agent: {
549
549
  light: [
550
- loopColors.brightLightGlow, // #0F6B4F — deep green
551
- loopColors.brightLightPop, // #1F6FB0 — deep sky
552
- loopColors.brightLightBlaze, // #B83A6B — deep rose
553
- loopColors.brightLightSurge, // #6B53C9 — deep violet
554
- loopColors.gray, // #6A6A66 — neutral gray
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
- loopColors.loopBrand, // #7ADBB8 — green
558
- loopColors.brightPop, // #8CCBF9 — sky
559
- loopColors.brightBlaze, // #F6A5C1 — rose
560
- loopColors.brightSurge, // #C0AEF6 — violet
561
- loopColors.brightGold, // #F8D469 — sun
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.loopBrand,
573
+ metalColors.agentBrand,
574
574
  metalColors.brightPop,
575
575
  metalColors.brightBlaze,
576
576
  metalColors.brightSurge,
@@ -1,15 +1,15 @@
1
- export * from './loopThemeStyles';
1
+ export * from './agentThemeStyles';
2
2
  /**
3
3
  * The Primer theme object.
4
4
  *
5
- * Theming is done through CSS custom properties (see `loopThemeStyles`), but
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 (LOOP T-04, T-17):
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 loopTheme: {
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 loopTheme;
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 Loop theme for Primer React: its styles, from `./loopThemeStyles`, and
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 { loopFontWeights } from './loopThemeStyles';
12
- export * from './loopThemeStyles';
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 `loopThemeStyles`), but
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 (LOOP T-04, T-17):
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 loopTheme = {
23
+ export const agentTheme = {
24
24
  ...primerTheme,
25
25
  fontWeights: {
26
- light: loopFontWeights.regular,
27
- normal: loopFontWeights.regular,
28
- semibold: loopFontWeights.semibold,
29
- bold: loopFontWeights.semibold,
26
+ light: agentFontWeights.regular,
27
+ normal: agentFontWeights.regular,
28
+ semibold: agentFontWeights.semibold,
29
+ bold: agentFontWeights.semibold,
30
30
  },
31
31
  };
32
- export default loopTheme;
32
+ export default agentTheme;
@@ -1,14 +1,14 @@
1
1
  import { type ThemeColorDefs } from '../css/createThemeCSSVars';
2
- export declare const loopLight: ThemeColorDefs;
3
- export declare const loopDark: ThemeColorDefs;
2
+ export declare const agentLight: ThemeColorDefs;
3
+ export declare const agentDark: ThemeColorDefs;
4
4
  /**
5
- * What the Loop theme sets beside colour, the same in both modes.
5
+ * What the Agent theme sets beside colour, the same in both modes.
6
6
  *
7
- * Primer's own radii are made rounder; the `--loop-*` properties are what
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 loopShapeVars: Record<string, string>;
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 loopShadows: Record<'light' | 'dark', Record<string, string>>;
19
+ export declare const agentShadows: Record<'light' | 'dark', Record<string, string>>;
20
20
  /**
21
- * Type (LOOP T-04): one face, two weights, five sizes, one line-height per
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 loopTypeScale: {
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 `loop` theme. */
61
- export declare const loopFontWeights: {
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 loopTypeVars: (font: string) => Record<string, string>;
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
- * (LOOP T-04). One face, two weights (400 and 600). The face is served by the
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/loop-face.css`, which declares
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 loopFontFamily = "\"Inter Variable\", \"Inter Fallback\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif";
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 (LOOP T-10): three durations and one easing, for three things — a
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 loopMotionVars: Record<string, string>;
81
+ export declare const agentMotionVars: Record<string, string>;
82
82
  /**
83
- * The focus ring (LOOP T-15): 3 to 1 against the page and around a pill of
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 loopFocusRing: {
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 loopThemeStyles: import("../css/createThemeCSSVars").ThemeStyles;
97
+ export declare const agentThemeStyles: import("../css/createThemeCSSVars").ThemeStyles;
98
98
  /**
99
- * The loop theme's whole stylesheet (`ThemeStyles.css`): its controls as
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 loopControlsCss: string;
102
+ export declare const agentControlsCss: string;