@datalayer/primer-addons 1.0.52 → 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 (88) 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/ThemePalettePreview.d.ts +1 -1
  10. package/lib/components/appearance/ThemePreviewCard.js +1 -1
  11. package/lib/components/appearance/ThemePreviewCard.stories.d.ts +1 -1
  12. package/lib/components/appearance/ThemePreviewCard.stories.js +1 -1
  13. package/lib/components/box/Box.d.ts +3 -3
  14. package/lib/components/box/Box.js +3 -3
  15. package/lib/components/box/Box.stories.d.ts +1 -1
  16. package/lib/components/box/Box.stories.js +1 -1
  17. package/lib/components/box/boxTokens.d.ts +2 -2
  18. package/lib/components/box/boxTokens.js +2 -2
  19. package/lib/components/calendar-picker/CalendarPicker.js +1 -1
  20. package/lib/components/card/Card.js +1 -1
  21. package/lib/components/color/ColorSwatch.js +1 -1
  22. package/lib/components/entity-avatar/EntityAvatar.d.ts +1 -1
  23. package/lib/components/entity-avatar/EntityAvatar.js +1 -1
  24. package/lib/components/hover-card/HoverCard.d.ts +1 -1
  25. package/lib/components/logo/DatalayerLogo.js +12 -12
  26. package/lib/components/logo/DatalayerLogo.stories.js +1 -1
  27. package/lib/components/sheet/Sheet.d.ts +1 -1
  28. package/lib/components/sheet/Sheet.js +1 -1
  29. package/lib/components/toolbar/ToolbarButton.js +1 -1
  30. package/lib/reactor/ThemePlugin.js +1 -1
  31. package/lib/reactor/index.d.ts +1 -1
  32. package/lib/reactor/index.js +1 -1
  33. package/lib/reactor/page-layout/PageLayout.d.ts +2 -2
  34. package/lib/reactor/page-layout/PageLayout.js +3 -3
  35. package/lib/reactor/page-layout/PageLayoutPlugin.js +2 -2
  36. package/lib/theme/DatalayerThemeProvider.js +1 -1
  37. package/lib/theme/{loopEyes.d.ts → agentEyes.d.ts} +3 -3
  38. package/lib/theme/{loopEyes.js → agentEyes.js} +3 -3
  39. package/lib/theme/colorMode.d.ts +6 -0
  40. package/lib/theme/{themes-brand/index.js → colorMode.js} +1 -1
  41. package/lib/theme/colors/{loopColors.d.ts → agentColors.d.ts} +15 -15
  42. package/lib/theme/colors/{loopColors.js → agentColors.js} +16 -16
  43. package/lib/theme/colors/hueColors.d.ts +1 -1
  44. package/lib/theme/colors/hueColors.js +2 -2
  45. package/lib/theme/colors/index.d.ts +1 -1
  46. package/lib/theme/colors/index.js +3 -3
  47. package/lib/theme/colors/metalColors.d.ts +12 -12
  48. package/lib/theme/colors/metalColors.js +6 -6
  49. package/lib/theme/colors/themeAccents.d.ts +5 -6
  50. package/lib/theme/colors/themeAccents.js +4 -5
  51. package/lib/theme/css/createThemeCSSVars.d.ts +5 -5
  52. package/lib/theme/css/primerBaseVars.js +1 -1
  53. package/lib/theme/index.d.ts +4 -4
  54. package/lib/theme/index.js +4 -4
  55. package/lib/theme/palettes/ColorPalette.js +18 -18
  56. package/lib/theme/portable.d.ts +1 -1
  57. package/lib/theme/portable.js +1 -1
  58. package/lib/theme/portableTheme.d.ts +1 -1
  59. package/lib/theme/themeRegistry.js +2 -2
  60. package/lib/theme/themeTokens.d.ts +2 -2
  61. package/lib/theme/themeTokens.js +38 -38
  62. package/lib/theme/themes/{loopTheme.d.ts → agentTheme.d.ts} +5 -5
  63. package/lib/theme/themes/{loopTheme.js → agentTheme.js} +11 -11
  64. package/lib/theme/themes/{loopThemeStyles.d.ts → agentThemeStyles.d.ts} +21 -21
  65. package/lib/theme/themes/{loopThemeStyles.js → agentThemeStyles.js} +179 -189
  66. package/lib/theme/themes/ivoryThemeStyles.d.ts +4 -1
  67. package/lib/theme/themes/ivoryThemeStyles.js +7 -1
  68. package/lib/theme/themes/metalThemeStyles.d.ts +1 -1
  69. package/lib/theme/themes/metalThemeStyles.js +27 -31
  70. package/lib/theme/themes/roundedShape.d.ts +18 -0
  71. package/lib/theme/themes/roundedShape.js +24 -0
  72. package/lib/theme/themes/sandThemeStyles.d.ts +4 -1
  73. package/lib/theme/themes/sandThemeStyles.js +7 -1
  74. package/lib/theme/themes/sunThemeStyles.d.ts +4 -1
  75. package/lib/theme/themes/sunThemeStyles.js +7 -1
  76. package/lib/theme/useThemeStore.d.ts +7 -1
  77. package/lib/theme/useThemeStore.js +29 -6
  78. package/lib/utils/Helper.d.ts +1 -16
  79. package/lib/utils/Helper.js +4 -20
  80. package/lib/utils/Portals.d.ts +1 -1
  81. package/lib/utils/Portals.js +1 -1
  82. package/package.json +1 -2
  83. package/style/{loop-face.css → agent-face.css} +2 -2
  84. package/lib/theme/DatalayerBrandThemeProvider.d.ts +0 -41
  85. package/lib/theme/DatalayerBrandThemeProvider.js +0 -32
  86. package/lib/theme/themes-brand/index.d.ts +0 -1
  87. package/lib/theme/themes-brand/spatialBrandTheme.d.ts +0 -16
  88. package/lib/theme/themes-brand/spatialBrandTheme.js +0 -157
@@ -3,7 +3,7 @@
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
5
  /**
6
- * Loop Theme for Primer React.
6
+ * Agent Theme for Primer React.
7
7
  *
8
8
  * Soft and clear, for somebody who is not here for the software: one accent,
9
9
  * neutral everything else. A white (or near-black) canvas, a deep-grey ink
@@ -14,62 +14,63 @@
14
14
  * Theming is applied via **CSS custom-property overrides**.
15
15
  *
16
16
  * Unlike the other themes it also sets **shape**: rounder corners, and
17
- * its own `--loop-*` properties for what an application is drawn with —
17
+ * its own `--agent-*` properties for what an application is drawn with —
18
18
  * a bubble, a frame, a face. Its accent and stage are the theme system's
19
19
  * (`--theme-accent`, `--theme-stage` and the rest, `themeAccents`): mint.
20
20
  */
21
- import { loopColors } from '../colors/loopColors';
21
+ import { agentColors } from '../colors/agentColors';
22
22
  import { themeAccentTints, themeAccents } from '../colors/themeAccents';
23
23
  import { buildThemeStyles } from '../css/createThemeCSSVars';
24
+ import { roundedRadiusVars, roundedShape } from './roundedShape';
24
25
  /* ── Light-mode colour definitions ───────────────────────────────────── */
25
- export const loopLight = {
26
+ export const agentLight = {
26
27
  canvas: {
27
- default: loopColors.white,
28
- subtle: loopColors.subtle,
28
+ default: agentColors.white,
29
+ subtle: agentColors.subtle,
29
30
  },
30
31
  fg: {
31
- default: loopColors.ink,
32
- muted: loopColors.gray,
32
+ default: agentColors.ink,
33
+ muted: agentColors.gray,
33
34
  onEmphasis: '#FFFFFF',
34
35
  },
35
36
  accent: {
36
- fg: loopColors.loopText,
37
+ fg: agentColors.agentText,
37
38
  // The accent itself, as on dark: the soft mint that dark text sits on —
38
39
  // the filled button, the person's bubble, the assistant's avatar. The
39
40
  // chat pairs it with the button's text, so the two stay one colour.
40
- emphasis: loopColors.loopBrand,
41
- muted: loopColors.loopBrand,
42
- subtle: loopColors.loopTint,
41
+ emphasis: agentColors.agentBrand,
42
+ muted: agentColors.agentBrand,
43
+ subtle: agentColors.agentTint,
43
44
  },
44
45
  success: {
45
- fg: loopColors.successBrand,
46
- emphasis: loopColors.successBrand,
47
- muted: loopColors.successAccent,
48
- subtle: loopColors.successTint,
46
+ fg: agentColors.successBrand,
47
+ emphasis: agentColors.successBrand,
48
+ muted: agentColors.successAccent,
49
+ subtle: agentColors.successTint,
49
50
  },
50
51
  attention: {
51
- fg: loopColors.attentionBrand,
52
- emphasis: loopColors.attentionBrand,
53
- muted: loopColors.attentionAccent,
54
- subtle: loopColors.attentionTint,
52
+ fg: agentColors.attentionBrand,
53
+ emphasis: agentColors.attentionBrand,
54
+ muted: agentColors.attentionAccent,
55
+ subtle: agentColors.attentionTint,
55
56
  },
56
57
  danger: {
57
- fg: loopColors.dangerBrand,
58
- emphasis: loopColors.dangerBrand,
59
- muted: loopColors.dangerAccent,
60
- subtle: loopColors.dangerTint,
58
+ fg: agentColors.dangerBrand,
59
+ emphasis: agentColors.dangerBrand,
60
+ muted: agentColors.dangerAccent,
61
+ subtle: agentColors.dangerTint,
61
62
  },
62
63
  severe: {
63
- fg: loopColors.severeBrand,
64
- emphasis: loopColors.severeBrand,
65
- muted: loopColors.severeAccent,
66
- subtle: loopColors.severeTint,
64
+ fg: agentColors.severeBrand,
65
+ emphasis: agentColors.severeBrand,
66
+ muted: agentColors.severeAccent,
67
+ subtle: agentColors.severeTint,
67
68
  },
68
69
  done: {
69
- fg: loopColors.doneBrand,
70
- emphasis: loopColors.doneBrand,
71
- muted: loopColors.doneAccent,
72
- subtle: loopColors.doneTint,
70
+ fg: agentColors.doneBrand,
71
+ emphasis: agentColors.doneBrand,
72
+ muted: agentColors.doneAccent,
73
+ subtle: agentColors.doneTint,
73
74
  },
74
75
  border: {
75
76
  // Hairlines: 7% of the ink, as solid colours on white — a surface is
@@ -78,8 +79,8 @@ export const loopLight = {
78
79
  muted: '#F2F2F4',
79
80
  },
80
81
  btn: {
81
- text: loopColors.ink,
82
- bg: loopColors.subtle,
82
+ text: agentColors.ink,
83
+ bg: agentColors.subtle,
83
84
  border: 'transparent',
84
85
  hoverBg: '#ECECEF',
85
86
  hoverBorder: 'transparent',
@@ -90,101 +91,101 @@ export const loopLight = {
90
91
  // The one filled button of a screen, in the accent: the soft mint, with
91
92
  // its dark text — the same pastel as on dark, never the platform's deep green.
92
93
  primary: {
93
- text: loopColors.loopOn,
94
- bg: loopColors.loopBrand,
95
- border: loopColors.loopBrand,
96
- hoverBg: loopColors.loopBrandHover,
97
- hoverBorder: loopColors.loopBrandHover,
98
- selectedBg: loopColors.loopAccent,
94
+ text: agentColors.agentOn,
95
+ bg: agentColors.agentBrand,
96
+ border: agentColors.agentBrand,
97
+ hoverBg: agentColors.agentBrandHover,
98
+ hoverBorder: agentColors.agentBrandHover,
99
+ selectedBg: agentColors.agentAccent,
99
100
  disabledText: 'rgba(6, 40, 30, 0.5)',
100
101
  disabledBg: '#CDEFE2',
101
102
  disabledBorder: '#CDEFE2',
102
- icon: loopColors.loopOn,
103
+ icon: agentColors.agentOn,
103
104
  counterBg: 'rgba(6, 40, 30, 0.12)',
104
105
  },
105
106
  outline: {
106
- text: loopColors.loopText,
107
- hoverText: loopColors.loopOn,
108
- hoverBg: loopColors.loopBrand,
109
- hoverBorder: loopColors.loopBrand,
107
+ text: agentColors.agentText,
108
+ hoverText: agentColors.agentOn,
109
+ hoverBg: agentColors.agentBrand,
110
+ hoverBorder: agentColors.agentBrand,
110
111
  hoverCounterBg: 'rgba(6, 40, 30, 0.12)',
111
- selectedText: loopColors.loopOn,
112
- selectedBg: loopColors.loopAccent,
113
- selectedBorder: loopColors.loopAccent,
114
- disabledText: loopColors.gray,
115
- disabledBg: loopColors.subtle,
112
+ selectedText: agentColors.agentOn,
113
+ selectedBg: agentColors.agentAccent,
114
+ selectedBorder: agentColors.agentAccent,
115
+ disabledText: agentColors.gray,
116
+ disabledBg: agentColors.subtle,
116
117
  disabledCounterBg: 'rgba(0, 0, 0, 0.05)',
117
118
  counterBg: 'rgba(0, 0, 0, 0.05)',
118
- counterFg: loopColors.loopText,
119
- hoverCounterFg: loopColors.loopOn,
120
- disabledCounterFg: loopColors.gray,
119
+ counterFg: agentColors.agentText,
120
+ hoverCounterFg: agentColors.agentOn,
121
+ disabledCounterFg: agentColors.gray,
121
122
  },
122
123
  danger: {
123
- text: loopColors.dangerBrand,
124
+ text: agentColors.dangerBrand,
124
125
  hoverText: '#FFFFFF',
125
- hoverBg: loopColors.dangerBrand,
126
- hoverBorder: loopColors.dangerBrand,
126
+ hoverBg: agentColors.dangerBrand,
127
+ hoverBorder: agentColors.dangerBrand,
127
128
  hoverCounterBg: 'rgba(255, 255, 255, 0.2)',
128
129
  selectedText: '#FFFFFF',
129
130
  selectedBg: '#9C302A',
130
131
  selectedBorder: '#9C302A',
131
132
  disabledText: 'rgba(191, 63, 56, 0.5)',
132
- disabledBg: loopColors.subtle,
133
+ disabledBg: agentColors.subtle,
133
134
  disabledCounterBg: 'rgba(191, 63, 56, 0.05)',
134
135
  counterBg: 'rgba(191, 63, 56, 0.1)',
135
- counterFg: loopColors.dangerBrand,
136
+ counterFg: agentColors.dangerBrand,
136
137
  hoverCounterFg: '#FFFFFF',
137
138
  disabledCounterFg: 'rgba(191, 63, 56, 0.5)',
138
- icon: loopColors.dangerBrand,
139
+ icon: agentColors.dangerBrand,
139
140
  },
140
141
  },
141
142
  };
142
143
  /* ── Dark-mode colour definitions ────────────────────────────────────── */
143
- export const loopDark = {
144
+ export const agentDark = {
144
145
  canvas: {
145
- default: loopColors.black,
146
- subtle: loopColors.subtleDark,
146
+ default: agentColors.black,
147
+ subtle: agentColors.subtleDark,
147
148
  },
148
149
  fg: {
149
- default: loopColors.inkDark,
150
- muted: loopColors.grayDark,
150
+ default: agentColors.inkDark,
151
+ muted: agentColors.grayDark,
151
152
  onEmphasis: '#FFFFFF',
152
153
  },
153
154
  accent: {
154
- fg: loopColors.loopBright,
155
+ fg: agentColors.agentBright,
155
156
  // The accent itself, on dark: a pastel that dark text sits on.
156
- emphasis: loopColors.loopBrand,
157
- muted: loopColors.loopBrand,
158
- subtle: loopColors.loopTintDark,
157
+ emphasis: agentColors.agentBrand,
158
+ muted: agentColors.agentBrand,
159
+ subtle: agentColors.agentTintDark,
159
160
  },
160
161
  success: {
161
- fg: loopColors.successAccent,
162
- emphasis: loopColors.successBrand,
163
- muted: loopColors.successAccent,
162
+ fg: agentColors.successAccent,
163
+ emphasis: agentColors.successBrand,
164
+ muted: agentColors.successAccent,
164
165
  subtle: '#12241B',
165
166
  },
166
167
  attention: {
167
- fg: loopColors.attentionAccent,
168
+ fg: agentColors.attentionAccent,
168
169
  emphasis: '#8A5710',
169
- muted: loopColors.attentionAccent,
170
+ muted: agentColors.attentionAccent,
170
171
  subtle: '#2A2010',
171
172
  },
172
173
  danger: {
173
- fg: loopColors.dangerAccent,
174
- emphasis: loopColors.dangerBrand,
175
- muted: loopColors.dangerAccent,
174
+ fg: agentColors.dangerAccent,
175
+ emphasis: agentColors.dangerBrand,
176
+ muted: agentColors.dangerAccent,
176
177
  subtle: '#2C1615',
177
178
  },
178
179
  severe: {
179
- fg: loopColors.severeAccent,
180
- emphasis: loopColors.severeBrand,
181
- muted: loopColors.severeAccent,
180
+ fg: agentColors.severeAccent,
181
+ emphasis: agentColors.severeBrand,
182
+ muted: agentColors.severeAccent,
182
183
  subtle: '#2B1B10',
183
184
  },
184
185
  done: {
185
- fg: loopColors.doneAccent,
186
- emphasis: loopColors.doneBrand,
187
- muted: loopColors.doneAccent,
186
+ fg: agentColors.doneAccent,
187
+ emphasis: agentColors.doneBrand,
188
+ muted: agentColors.doneAccent,
188
189
  subtle: '#1C1A27',
189
190
  },
190
191
  border: {
@@ -193,8 +194,8 @@ export const loopDark = {
193
194
  muted: '#222224',
194
195
  },
195
196
  btn: {
196
- text: loopColors.inkDark,
197
- bg: loopColors.subtleDark,
197
+ text: agentColors.inkDark,
198
+ bg: agentColors.subtleDark,
198
199
  border: 'transparent',
199
200
  hoverBg: '#28282B',
200
201
  hoverBorder: 'transparent',
@@ -205,84 +206,78 @@ export const loopDark = {
205
206
  // The one filled button of a screen, in the accent: the pastel, with
206
207
  // its dark text, the brightest thing on a dark page.
207
208
  primary: {
208
- text: loopColors.loopOn,
209
- bg: loopColors.loopBrand,
210
- border: loopColors.loopBrand,
211
- hoverBg: loopColors.loopBright,
212
- hoverBorder: loopColors.loopBright,
209
+ text: agentColors.agentOn,
210
+ bg: agentColors.agentBrand,
211
+ border: agentColors.agentBrand,
212
+ hoverBg: agentColors.agentBright,
213
+ hoverBorder: agentColors.agentBright,
213
214
  selectedBg: '#6CCFAA',
214
215
  disabledText: 'rgba(6, 40, 30, 0.6)',
215
216
  disabledBg: 'rgba(122, 219, 184, 0.35)',
216
217
  disabledBorder: 'transparent',
217
- icon: loopColors.loopOn,
218
+ icon: agentColors.agentOn,
218
219
  counterBg: 'rgba(6, 40, 30, 0.15)',
219
220
  },
220
221
  outline: {
221
- text: loopColors.loopBright,
222
- hoverText: loopColors.loopOn,
223
- hoverBg: loopColors.loopBright,
224
- hoverBorder: loopColors.loopBright,
222
+ text: agentColors.agentBright,
223
+ hoverText: agentColors.agentOn,
224
+ hoverBg: agentColors.agentBright,
225
+ hoverBorder: agentColors.agentBright,
225
226
  hoverCounterBg: 'rgba(0, 0, 0, 0.2)',
226
- selectedText: loopColors.loopOn,
227
- selectedBg: loopColors.loopBrand,
228
- selectedBorder: loopColors.loopBrand,
227
+ selectedText: agentColors.agentOn,
228
+ selectedBg: agentColors.agentBrand,
229
+ selectedBorder: agentColors.agentBrand,
229
230
  disabledText: 'rgba(143, 229, 198, 0.5)',
230
231
  disabledBg: 'rgba(143, 229, 198, 0.1)',
231
232
  disabledCounterBg: 'rgba(143, 229, 198, 0.05)',
232
233
  counterBg: 'rgba(143, 229, 198, 0.1)',
233
- counterFg: loopColors.loopBright,
234
- hoverCounterFg: loopColors.loopOn,
234
+ counterFg: agentColors.agentBright,
235
+ hoverCounterFg: agentColors.agentOn,
235
236
  disabledCounterFg: 'rgba(143, 229, 198, 0.5)',
236
237
  },
237
238
  danger: {
238
- text: loopColors.dangerAccent,
239
+ text: agentColors.dangerAccent,
239
240
  hoverText: '#FFFFFF',
240
- hoverBg: loopColors.dangerBrand,
241
- hoverBorder: loopColors.dangerAccent,
241
+ hoverBg: agentColors.dangerBrand,
242
+ hoverBorder: agentColors.dangerAccent,
242
243
  hoverCounterBg: 'rgba(255, 255, 255, 0.2)',
243
244
  selectedText: '#FFFFFF',
244
245
  selectedBg: '#9C302A',
245
- selectedBorder: loopColors.dangerAccent,
246
+ selectedBorder: agentColors.dangerAccent,
246
247
  disabledText: 'rgba(240, 138, 131, 0.5)',
247
248
  disabledBg: 'rgba(240, 138, 131, 0.1)',
248
249
  disabledCounterBg: 'rgba(240, 138, 131, 0.05)',
249
250
  counterBg: 'rgba(240, 138, 131, 0.1)',
250
- counterFg: loopColors.dangerAccent,
251
+ counterFg: agentColors.dangerAccent,
251
252
  hoverCounterFg: '#FFFFFF',
252
253
  disabledCounterFg: 'rgba(240, 138, 131, 0.5)',
253
- icon: loopColors.dangerAccent,
254
+ icon: agentColors.dangerAccent,
254
255
  },
255
256
  },
256
257
  };
257
258
  /* ── Shape, type and motion ──────────────────────────────────────────── */
258
259
  /**
259
- * What the Loop theme sets beside colour, the same in both modes.
260
+ * What the Agent theme sets beside colour, the same in both modes.
260
261
  *
261
- * Primer's own radii are made rounder; the `--loop-*` properties are what
262
+ * Primer's own radii are made rounder; the `--agent-*` properties are what
262
263
  * an application is drawn with. A face is an emoji at one of three sizes;
263
264
  * motion has three durations and one easing.
264
265
  */
265
- export const loopShapeVars = {
266
- '--borderRadius-small': '10px',
267
- '--borderRadius-medium': '14px',
268
- '--borderRadius-large': '20px',
269
- '--borderRadius-default': '14px',
270
- '--loop-radius-control': '999px',
271
- '--loop-radius-card': '20px',
272
- '--loop-radius-bubble': '22px',
273
- '--loop-radius-frame': '28px',
274
- // Light mode's; `loopShadows` says dark mode's.
275
- '--loop-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)',
276
- '--loop-face-large': '72px',
277
- '--loop-face-medium': '40px',
278
- '--loop-face-small': '20px',
279
- '--loop-motion-fast': '120ms',
280
- '--loop-motion-medium': '200ms',
281
- '--loop-motion-slow': '320ms',
282
- '--loop-motion-easing': 'cubic-bezier(0.2, 0.8, 0.2, 1)',
266
+ export const agentShapeVars = {
267
+ // The rounded shape's radii, shared with Metal, Sand, Ivory and Sun.
268
+ ...roundedRadiusVars,
269
+ // Light mode's; `agentShadows` says dark mode's.
270
+ '--agent-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)',
271
+ '--agent-face-large': '72px',
272
+ '--agent-face-medium': '40px',
273
+ '--agent-face-small': '20px',
274
+ '--agent-motion-fast': '120ms',
275
+ '--agent-motion-medium': '200ms',
276
+ '--agent-motion-slow': '320ms',
277
+ '--agent-motion-easing': 'cubic-bezier(0.2, 0.8, 0.2, 1)',
283
278
  };
284
279
  /** The hairline between two surfaces, per mode. */
285
- const loopHairline = {
280
+ const agentHairline = {
286
281
  light: 'rgba(29, 29, 31, 0.07)',
287
282
  dark: 'rgba(255, 255, 255, 0.10)',
288
283
  };
@@ -293,9 +288,9 @@ const loopHairline = {
293
288
  * deeper shadow. Primer's own shadow tokens take the same hand, so a menu
294
289
  * or a dialog floats the way a frame does.
295
290
  */
296
- export const loopShadows = {
291
+ export const agentShadows = {
297
292
  light: {
298
- '--loop-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)',
293
+ '--agent-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)',
299
294
  '--theme-shadow': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)',
300
295
  '--shadow-resting-xsmall': '0 1px 1px rgba(0, 0, 0, 0.03)',
301
296
  '--shadow-resting-small': '0 1px 2px rgba(0, 0, 0, 0.04)',
@@ -306,7 +301,7 @@ export const loopShadows = {
306
301
  '--shadow-floating-xlarge': '0 0 0 1px rgba(29, 29, 31, 0.04), 0 24px 64px rgba(0, 0, 0, 0.18)',
307
302
  },
308
303
  dark: {
309
- '--loop-shadow-frame': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.45)',
304
+ '--agent-shadow-frame': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.45)',
310
305
  '--theme-shadow': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.45)',
311
306
  '--shadow-resting-xsmall': '0 0 0 1px rgba(255, 255, 255, 0.05)',
312
307
  '--shadow-resting-small': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.3)',
@@ -318,7 +313,7 @@ export const loopShadows = {
318
313
  },
319
314
  };
320
315
  /**
321
- * Type (LOOP T-04): one face, two weights, five sizes, one line-height per
316
+ * Type: one face, two weights, five sizes, one line-height per
322
317
  * size — each line a multiple of 4px.
323
318
  *
324
319
  * | Size | Line | Tokens |
@@ -335,18 +330,18 @@ export const loopShadows = {
335
330
  * is; the body left alone. The tracking is a token for a component to apply,
336
331
  * since a CSS font shorthand carries none.
337
332
  */
338
- export const loopTypeScale = {
333
+ export const agentTypeScale = {
339
334
  display: { size: '2rem', lineHeight: '1.25' },
340
335
  title: { size: '1.25rem', lineHeight: '1.4' },
341
336
  heading: { size: '1rem', lineHeight: '1.5' },
342
337
  body: { size: '0.875rem', lineHeight: '1.4286' },
343
338
  small: { size: '0.75rem', lineHeight: '1.3333' },
344
339
  };
345
- /** The two weights of the `loop` theme. */
346
- export const loopFontWeights = { regular: 400, semibold: 600 };
347
- export const loopTypeVars = (font) => {
348
- const { display, title, heading, body, small } = loopTypeScale;
349
- const { regular, semibold } = loopFontWeights;
340
+ /** The two weights of the `agent` theme. */
341
+ export const agentFontWeights = { regular: 400, semibold: 600 };
342
+ export const agentTypeVars = (font) => {
343
+ const { display, title, heading, body, small } = agentTypeScale;
344
+ const { regular, semibold } = agentFontWeights;
350
345
  const shorthand = (weight, step) => `${weight} ${step.size}/${step.lineHeight} ${font}`;
351
346
  return {
352
347
  '--base-text-weight-light': String(regular),
@@ -382,16 +377,16 @@ export const loopTypeVars = (font) => {
382
377
  '--text-body-shorthand-medium': shorthand(regular, body),
383
378
  '--text-body-shorthand-small': shorthand(regular, small),
384
379
  '--text-caption-shorthand': shorthand(regular, small),
385
- '--loop-tracking-display': '-0.02em',
386
- '--loop-tracking-title': '-0.012em',
387
- '--loop-tracking-body': '0',
380
+ '--agent-tracking-display': '-0.02em',
381
+ '--agent-tracking-title': '-0.012em',
382
+ '--agent-tracking-body': '0',
388
383
  };
389
384
  };
390
385
  /**
391
386
  * The accent's properties in a mode, mint's (`themeAccents.green`): the
392
387
  * stage and the quiet tint are mint's own, not derived from the colours.
393
388
  */
394
- const loopTints = (mode) => themeAccentTints({
389
+ const agentTints = (mode) => themeAccentTints({
395
390
  accent: themeAccents.green.accent,
396
391
  on: themeAccents.green.on,
397
392
  stage: themeAccents.green.stage[mode],
@@ -400,27 +395,27 @@ const loopTints = (mode) => themeAccentTints({
400
395
  /* ── Exports ─────────────────────────────────────────────────────────── */
401
396
  /**
402
397
  * Inter, then its metric-matched fallback, then the system's own sans-serif
403
- * (LOOP T-04). One face, two weights (400 and 600). The face is served by the
398
+ *. One face, two weights (400 and 600). The face is served by the
404
399
  * page's own build: a page wearing the theme imports
405
- * `@datalayer/primer-addons/style/loop-face.css`, which declares
400
+ * `@datalayer/primer-addons/style/agent-face.css`, which declares
406
401
  * `Inter Variable` from `@fontsource-variable/inter` and `Inter Fallback`, a
407
402
  * local Arial drawn to Inter's measure. The text paints in the fallback first
408
403
  * and does not move when Inter arrives; a page that has not imported the
409
404
  * stylesheet shows the system face.
410
405
  */
411
- export const loopFontFamily = '"Inter Variable", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
406
+ export const agentFontFamily = '"Inter Variable", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
412
407
  /**
413
- * Motion (LOOP T-10): three durations and one easing, for three things — a
408
+ * Motion: three durations and one easing, for three things — a
414
409
  * status changing, a message arriving, a pane opening. Nothing else moves.
415
410
  */
416
- export const loopMotionVars = {
417
- '--loop-motion-status': '120ms',
418
- '--loop-motion-message': '200ms',
419
- '--loop-motion-pane': '320ms',
420
- '--loop-motion-easing': 'cubic-bezier(0.2, 0, 0, 1)',
411
+ export const agentMotionVars = {
412
+ '--agent-motion-status': '120ms',
413
+ '--agent-motion-message': '200ms',
414
+ '--agent-motion-pane': '320ms',
415
+ '--agent-motion-easing': 'cubic-bezier(0.2, 0, 0, 1)',
421
416
  };
422
417
  /**
423
- * The focus ring (LOOP T-15): 3 to 1 against the page and around a pill of
418
+ * The focus ring: 3 to 1 against the page and around a pill of
424
419
  * any accent, in both modes. In light mode the deep mint does it — darker than the text, the one place it is —
425
420
  * a halo in the theme's colour, as a system's own focus ring is — 6.5 to 1
426
421
  * on white and 3.28 or more around every pastel. In dark mode no
@@ -429,9 +424,9 @@ export const loopMotionVars = {
429
424
  * mid grey does, at 3.04 to 1 — and 2.77 to 1 on the subtle dark surface,
430
425
  * the one place it falls short.
431
426
  */
432
- export const loopFocusRing = { light: loopColors.loopRing, dark: '#636363' };
427
+ export const agentFocusRing = { light: agentColors.agentRing, dark: '#636363' };
433
428
  /**
434
- * The loop theme's own stylesheet, beside what its shape draws: bold is the
429
+ * The agent theme's own stylesheet, beside what its shape draws: bold is the
435
430
  * theme's semibold, its second and last weight.
436
431
  *
437
432
  * Its controls are pills and its tables rounder by its shape
@@ -439,66 +434,61 @@ export const loopFocusRing = { light: loopColors.loopRing, dark: '#636363' };
439
434
  * any theme that sets them: menus and overlays keep the card's radius,
440
435
  * `--borderRadius-large`, which the theme already sets.
441
436
  */
442
- const loopOwnCss = `
437
+ const agentOwnCss = `
443
438
  :scope b,
444
439
  :scope strong {
445
440
  font-weight: var(--base-text-weight-semibold);
446
441
  }
447
442
  `;
448
443
  /** Comprehensive Primer CSS-variable overrides for light & dark mode. */
449
- export const loopThemeStyles = buildThemeStyles(loopLight, loopDark, {
450
- fontFamily: loopFontFamily,
451
- css: loopOwnCss,
452
- // Rounder than the others: a pill for a control (LOOP T-09), soft cards,
444
+ export const agentThemeStyles = buildThemeStyles(agentLight, agentDark, {
445
+ fontFamily: agentFontFamily,
446
+ css: agentOwnCss,
447
+ // Rounder than the others: a pill for a control, soft cards,
453
448
  // round bubbles, a table with the corners of a list item.
454
449
  shape: {
455
- radiusControl: loopShapeVars['--loop-radius-control'],
456
- radiusTable: loopShapeVars['--borderRadius-medium'],
457
- radiusOverlay: loopShapeVars['--loop-radius-card'],
458
- radiusCard: loopShapeVars['--loop-radius-card'],
459
- radiusBubble: loopShapeVars['--loop-radius-bubble'],
460
- radiusFrame: loopShapeVars['--loop-radius-frame'],
461
- shadow: loopShapeVars['--loop-shadow-frame'],
462
- motionStatus: loopMotionVars['--loop-motion-status'],
463
- motionMessage: loopMotionVars['--loop-motion-message'],
464
- motionPane: loopMotionVars['--loop-motion-pane'],
465
- motionEasing: loopMotionVars['--loop-motion-easing'],
466
- // Links plain in a message: the words' own colour, underlined (T-06).
450
+ ...roundedShape,
451
+ shadow: agentShapeVars['--agent-shadow-frame'],
452
+ motionStatus: agentMotionVars['--agent-motion-status'],
453
+ motionMessage: agentMotionVars['--agent-motion-message'],
454
+ motionPane: agentMotionVars['--agent-motion-pane'],
455
+ motionEasing: agentMotionVars['--agent-motion-easing'],
456
+ // Links plain in a message: the words' own colour, underlined.
467
457
  messageLink: 'currentColor',
468
458
  },
469
459
  variables: {
470
460
  light: {
471
- ...loopShapeVars,
472
- ...loopTints('light'),
473
- ...loopMotionVars,
474
- ...loopShadows.light,
475
- ...loopTypeVars(loopFontFamily),
476
- '--loop-hairline': loopHairline.light,
461
+ ...agentShapeVars,
462
+ ...agentTints('light'),
463
+ ...agentMotionVars,
464
+ ...agentShadows.light,
465
+ ...agentTypeVars(agentFontFamily),
466
+ '--agent-hairline': agentHairline.light,
477
467
  // The hairline is Primer's default border: a card drawn with
478
468
  // `borderColor="border.default"` gets it, no fallback chain at the call site.
479
- '--borderColor-default': loopHairline.light,
480
- '--focus-outlineColor': loopFocusRing.light,
481
- // The selected tab underlined in the accent, not Primer's coral (LOOP T-14).
469
+ '--borderColor-default': agentHairline.light,
470
+ '--focus-outlineColor': agentFocusRing.light,
471
+ // The selected tab underlined in the accent, not Primer's coral.
482
472
  '--underlineNav-borderColor-active': themeAccents.green.accent,
483
473
  },
484
474
  dark: {
485
- ...loopShapeVars,
486
- ...loopTints('dark'),
487
- ...loopMotionVars,
488
- ...loopShadows.dark,
489
- ...loopTypeVars(loopFontFamily),
490
- '--loop-hairline': loopHairline.dark,
475
+ ...agentShapeVars,
476
+ ...agentTints('dark'),
477
+ ...agentMotionVars,
478
+ ...agentShadows.dark,
479
+ ...agentTypeVars(agentFontFamily),
480
+ '--agent-hairline': agentHairline.dark,
491
481
  // The hairline is Primer's default border: a card drawn with
492
482
  // `borderColor="border.default"` gets it, no fallback chain at the call site.
493
- '--borderColor-default': loopHairline.dark,
494
- '--focus-outlineColor': loopFocusRing.dark,
495
- // The selected tab underlined in the accent, not Primer's coral (LOOP T-14).
483
+ '--borderColor-default': agentHairline.dark,
484
+ '--focus-outlineColor': agentFocusRing.dark,
485
+ // The selected tab underlined in the accent, not Primer's coral.
496
486
  '--underlineNav-borderColor-active': themeAccents.green.accent,
497
487
  },
498
488
  },
499
489
  });
500
490
  /**
501
- * The loop theme's whole stylesheet (`ThemeStyles.css`): its controls as
491
+ * The agent theme's whole stylesheet (`ThemeStyles.css`): its controls as
502
492
  * pills and its tables rounder, drawn from its shape, then its own rules.
503
493
  */
504
- export const loopControlsCss = loopThemeStyles.css ?? '';
494
+ export const agentControlsCss = agentThemeStyles.css ?? '';
@@ -1,2 +1,5 @@
1
- /** Comprehensive Primer CSS-variable overrides for light & dark mode. */
1
+ /**
2
+ * Comprehensive Primer CSS-variable overrides for light & dark mode, with
3
+ * the rounded shape: Agent's and Metal's corners, pill controls (`roundedShape`).
4
+ */
2
5
  export declare const ivoryThemeStyles: import("../css/createThemeCSSVars").ThemeStyles;
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import { ivoryColors } from '../colors/ivoryColors';
14
14
  import { buildThemeStyles } from '../css/createThemeCSSVars';
15
+ import { roundedRadiusVars, roundedShape } from './roundedShape';
15
16
  /* ── Light-mode colour definitions ───────────────────────────────────── */
16
17
  const ivoryLight = {
17
18
  canvas: {
@@ -241,7 +242,12 @@ const ivoryDark = {
241
242
  * approach as the Matrix monospace stack).
242
243
  */
243
244
  const ivoryFontFamily = '"Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif';
244
- /** Comprehensive Primer CSS-variable overrides for light & dark mode. */
245
+ /**
246
+ * Comprehensive Primer CSS-variable overrides for light & dark mode, with
247
+ * the rounded shape: Agent's and Metal's corners, pill controls (`roundedShape`).
248
+ */
245
249
  export const ivoryThemeStyles = buildThemeStyles(ivoryLight, ivoryDark, {
246
250
  fontFamily: ivoryFontFamily,
251
+ shape: roundedShape,
252
+ variables: { light: roundedRadiusVars, dark: roundedRadiusVars },
247
253
  });