@datalayer/primer-addons 1.0.36 → 1.0.38

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 (60) hide show
  1. package/README.md +19 -1
  2. package/lib/components/appearance/AppearanceControls.js +5 -0
  3. package/lib/reactor/index.d.ts +1 -1
  4. package/lib/reactor/index.js +1 -1
  5. package/lib/reactor/page-layout/PageLayout.d.ts +6 -0
  6. package/lib/reactor/page-layout/PageLayout.js +26 -0
  7. package/lib/theme/DatalayerThemeProvider.js +5 -2
  8. package/lib/theme/css/createThemeCSSVars.d.ts +5 -0
  9. package/lib/theme/css/createThemeCSSVars.js +2 -0
  10. package/lib/theme/index.d.ts +1 -0
  11. package/lib/theme/index.js +1 -0
  12. package/lib/theme/loopEyes.d.ts +84 -0
  13. package/lib/theme/loopEyes.js +82 -0
  14. package/lib/theme/portable.d.ts +16 -0
  15. package/lib/theme/portable.js +20 -0
  16. package/lib/theme/portableTheme.d.ts +1 -1
  17. package/lib/theme/portableTheme.js +2 -2
  18. package/lib/theme/themeRegistry.d.ts +3 -75
  19. package/lib/theme/themeRegistry.js +38 -509
  20. package/lib/theme/themeTokens.d.ts +101 -0
  21. package/lib/theme/themeTokens.js +494 -0
  22. package/lib/theme/themes/datalayerTheme.d.ts +2 -9
  23. package/lib/theme/themes/datalayerTheme.js +8 -236
  24. package/lib/theme/themes/datalayerThemeStyles.d.ts +2 -0
  25. package/lib/theme/themes/datalayerThemeStyles.js +234 -0
  26. package/lib/theme/themes/earthTheme.d.ts +2 -9
  27. package/lib/theme/themes/earthTheme.js +8 -235
  28. package/lib/theme/themes/earthThemeStyles.d.ts +2 -0
  29. package/lib/theme/themes/earthThemeStyles.js +233 -0
  30. package/lib/theme/themes/ivoryTheme.d.ts +2 -9
  31. package/lib/theme/themes/ivoryTheme.js +8 -249
  32. package/lib/theme/themes/ivoryThemeStyles.d.ts +2 -0
  33. package/lib/theme/themes/ivoryThemeStyles.js +247 -0
  34. package/lib/theme/themes/loopTheme.d.ts +13 -144
  35. package/lib/theme/themes/loopTheme.js +20 -517
  36. package/lib/theme/themes/loopThemeStyles.d.ts +135 -0
  37. package/lib/theme/themes/loopThemeStyles.js +521 -0
  38. package/lib/theme/themes/lovelyTheme.d.ts +2 -9
  39. package/lib/theme/themes/lovelyTheme.js +8 -231
  40. package/lib/theme/themes/lovelyThemeStyles.d.ts +2 -0
  41. package/lib/theme/themes/lovelyThemeStyles.js +229 -0
  42. package/lib/theme/themes/matrixTheme.d.ts +2 -9
  43. package/lib/theme/themes/matrixTheme.js +8 -237
  44. package/lib/theme/themes/matrixThemeStyles.d.ts +2 -0
  45. package/lib/theme/themes/matrixThemeStyles.js +235 -0
  46. package/lib/theme/themes/sandTheme.d.ts +2 -9
  47. package/lib/theme/themes/sandTheme.js +8 -248
  48. package/lib/theme/themes/sandThemeStyles.d.ts +2 -0
  49. package/lib/theme/themes/sandThemeStyles.js +246 -0
  50. package/lib/theme/themes/spatialTheme.d.ts +2 -9
  51. package/lib/theme/themes/spatialTheme.js +8 -231
  52. package/lib/theme/themes/spatialThemeStyles.d.ts +2 -0
  53. package/lib/theme/themes/spatialThemeStyles.js +229 -0
  54. package/lib/theme/themes/sunTheme.d.ts +2 -9
  55. package/lib/theme/themes/sunTheme.js +8 -249
  56. package/lib/theme/themes/sunThemeStyles.d.ts +2 -0
  57. package/lib/theme/themes/sunThemeStyles.js +247 -0
  58. package/lib/utils/Portals.d.ts +7 -0
  59. package/lib/utils/Portals.js +7 -0
  60. package/package.json +1 -1
@@ -1,257 +1,16 @@
1
1
  /*
2
- * Copyright (c) 2023-2025 Datalayer, Inc.
2
+ * Copyright (c) 2023-2026 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
5
  /**
6
- * Ivory Theme for Primer React.
7
- *
8
- * Soft, warm off-white neutrals with a deep-taupe accent — a calm,
9
- * refined, and welcoming look. Uses an elegant humanist-serif type stack
10
- * (Palatino-led) for a gentle, hospitable, printed feel.
11
- * Theming is applied via **CSS custom-property overrides**.
6
+ * The ivory theme for Primer React: its styles, from `./ivoryThemeStyles`,
7
+ * and the Primer theme object. Theming is done through CSS custom
8
+ * properties, so the object is Primer's unmodified default, kept for
9
+ * `<ThemeProvider theme={…}>`. Code that needs the tokens without Primer
10
+ * React (a native app) imports the styles module instead.
12
11
  */
13
12
  import { theme as primerTheme } from '@primer/react';
14
- import { ivoryColors } from '../colors/ivoryColors';
15
- import { buildThemeStyles } from '../css/createThemeCSSVars';
16
- /* ── Light-mode colour definitions ───────────────────────────────────── */
17
- const ivoryLight = {
18
- canvas: {
19
- default: ivoryColors.white,
20
- subtle: '#F4EDDE',
21
- },
22
- fg: {
23
- default: '#2C2318',
24
- muted: ivoryColors.gray,
25
- onEmphasis: '#FBF7EF',
26
- },
27
- accent: {
28
- fg: ivoryColors.ivoryText,
29
- emphasis: ivoryColors.ivoryText,
30
- muted: ivoryColors.ivoryAccent,
31
- subtle: ivoryColors.ivoryTint,
32
- },
33
- success: {
34
- fg: '#3E6B47',
35
- emphasis: '#3E6B47',
36
- muted: '#5E8A5E',
37
- subtle: '#E1EEE0',
38
- },
39
- attention: {
40
- fg: ivoryColors.attentionBrand,
41
- emphasis: ivoryColors.attentionBrand,
42
- muted: ivoryColors.attentionAccent,
43
- subtle: ivoryColors.attentionTint,
44
- },
45
- danger: {
46
- fg: ivoryColors.dangerBrand,
47
- emphasis: ivoryColors.dangerBrand,
48
- muted: ivoryColors.dangerAccent,
49
- subtle: ivoryColors.dangerTint,
50
- },
51
- severe: {
52
- fg: ivoryColors.severeBrand,
53
- emphasis: ivoryColors.severeBrand,
54
- muted: ivoryColors.severeAccent,
55
- subtle: ivoryColors.severeTint,
56
- },
57
- done: {
58
- fg: ivoryColors.doneBrand,
59
- emphasis: ivoryColors.doneBrand,
60
- muted: ivoryColors.doneAccent,
61
- subtle: ivoryColors.doneTint,
62
- },
63
- border: {
64
- default: '#E0D3BC',
65
- muted: '#EBE1CE',
66
- },
67
- btn: {
68
- text: '#2C2318',
69
- bg: '#FDF9F1',
70
- border: '#DDCEB2',
71
- hoverBg: ivoryColors.ivoryTint,
72
- hoverBorder: ivoryColors.gray,
73
- activeBg: ivoryColors.ivoryTint,
74
- activeBorder: ivoryColors.gray,
75
- selectedBg: '#FDF9F1',
76
- counterBg: ivoryColors.gray,
77
- primary: {
78
- text: '#FBF7EF',
79
- bg: ivoryColors.ivoryText,
80
- border: ivoryColors.ivoryText,
81
- hoverBg: ivoryColors.ivoryHover,
82
- hoverBorder: ivoryColors.ivoryHover,
83
- selectedBg: ivoryColors.ivoryHover,
84
- disabledText: 'rgba(255, 255, 255, 0.8)',
85
- disabledBg: '#D8C9AE',
86
- disabledBorder: '#D8C9AE',
87
- icon: '#FBF7EF',
88
- counterBg: 'rgba(0, 0, 0, 0.2)',
89
- },
90
- outline: {
91
- text: ivoryColors.ivoryText,
92
- hoverText: '#FBF7EF',
93
- hoverBg: ivoryColors.ivoryText,
94
- hoverBorder: ivoryColors.ivoryText,
95
- hoverCounterBg: 'rgba(255, 255, 255, 0.2)',
96
- selectedText: '#FBF7EF',
97
- selectedBg: ivoryColors.ivoryHover,
98
- selectedBorder: ivoryColors.ivoryHover,
99
- disabledText: ivoryColors.gray,
100
- disabledBg: ivoryColors.ivoryTint,
101
- disabledCounterBg: 'rgba(0, 0, 0, 0.05)',
102
- counterBg: 'rgba(0, 0, 0, 0.05)',
103
- counterFg: ivoryColors.ivoryText,
104
- hoverCounterFg: '#FBF7EF',
105
- disabledCounterFg: ivoryColors.gray,
106
- },
107
- danger: {
108
- text: '#B42318',
109
- hoverText: '#FBF7EF',
110
- hoverBg: '#B42318',
111
- hoverBorder: '#B42318',
112
- hoverCounterBg: 'rgba(255, 255, 255, 0.2)',
113
- selectedText: '#FBF7EF',
114
- selectedBg: '#8E1B12',
115
- selectedBorder: '#8E1B12',
116
- disabledText: 'rgba(180, 35, 24, 0.5)',
117
- disabledBg: ivoryColors.ivoryTint,
118
- disabledCounterBg: 'rgba(180, 35, 24, 0.05)',
119
- counterBg: 'rgba(180, 35, 24, 0.1)',
120
- counterFg: '#B42318',
121
- hoverCounterFg: '#FBF7EF',
122
- disabledCounterFg: 'rgba(180, 35, 24, 0.5)',
123
- icon: '#B42318',
124
- },
125
- },
126
- };
127
- /* ── Dark-mode colour definitions ────────────────────────────────────── */
128
- const ivoryDark = {
129
- canvas: {
130
- default: ivoryColors.black,
131
- subtle: '#2A2219',
132
- },
133
- fg: {
134
- default: '#EFE6D6',
135
- muted: '#BBAC97',
136
- onEmphasis: '#FBF7EF',
137
- },
138
- accent: {
139
- fg: ivoryColors.ivoryBright,
140
- emphasis: '#836A18',
141
- muted: ivoryColors.ivoryBrand,
142
- subtle: '#332A18',
143
- },
144
- success: {
145
- fg: '#7CB07E',
146
- emphasis: '#3E6B47',
147
- muted: '#5E8A5E',
148
- subtle: '#16261A',
149
- },
150
- attention: {
151
- fg: '#E7C24E',
152
- emphasis: '#8A6D08',
153
- muted: ivoryColors.attentionAccent,
154
- subtle: '#2E2606',
155
- },
156
- danger: {
157
- fg: '#F08A70',
158
- emphasis: '#A34632',
159
- muted: ivoryColors.dangerAccent,
160
- subtle: '#2E140E',
161
- },
162
- severe: {
163
- fg: '#E6A566',
164
- emphasis: '#9C6221',
165
- muted: ivoryColors.severeAccent,
166
- subtle: '#2E1D0A',
167
- },
168
- done: {
169
- fg: '#B09AD0',
170
- emphasis: '#6A5591',
171
- muted: ivoryColors.doneAccent,
172
- subtle: '#1F1830',
173
- },
174
- btn: {
175
- text: '#EFE6D6',
176
- bg: '#2E2519',
177
- border: 'rgba(239, 230, 214, 0.12)',
178
- hoverBg: '#3A2F1F',
179
- hoverBorder: '#BBAC97',
180
- activeBg: '#2E2519',
181
- activeBorder: '#8C7C64',
182
- selectedBg: '#241D12',
183
- counterBg: '#3A2F1F',
184
- primary: {
185
- text: '#211A12',
186
- bg: ivoryColors.ivoryBright,
187
- border: 'rgba(239, 230, 214, 0.12)',
188
- hoverBg: ivoryColors.ivoryAccent,
189
- hoverBorder: 'rgba(239, 230, 214, 0.12)',
190
- selectedBg: ivoryColors.ivoryAccent,
191
- disabledText: 'rgba(33, 26, 18, 0.5)',
192
- disabledBg: 'rgba(239, 223, 194, 0.35)',
193
- disabledBorder: 'rgba(239, 223, 194, 0.2)',
194
- icon: '#211A12',
195
- counterBg: 'rgba(0, 0, 0, 0.2)',
196
- },
197
- outline: {
198
- text: ivoryColors.ivoryBright,
199
- hoverText: '#211A12',
200
- hoverBg: ivoryColors.ivoryBright,
201
- hoverBorder: ivoryColors.ivoryBright,
202
- hoverCounterBg: 'rgba(0, 0, 0, 0.2)',
203
- selectedText: '#211A12',
204
- selectedBg: ivoryColors.ivoryAccent,
205
- selectedBorder: ivoryColors.ivoryAccent,
206
- disabledText: 'rgba(239, 223, 194, 0.5)',
207
- disabledBg: 'rgba(239, 223, 194, 0.1)',
208
- disabledCounterBg: 'rgba(239, 223, 194, 0.05)',
209
- counterBg: 'rgba(239, 223, 194, 0.1)',
210
- counterFg: ivoryColors.ivoryBright,
211
- hoverCounterFg: '#211A12',
212
- disabledCounterFg: 'rgba(239, 223, 194, 0.5)',
213
- },
214
- danger: {
215
- text: '#f85149',
216
- hoverText: '#FBF7EF',
217
- hoverBg: '#da3633',
218
- hoverBorder: '#f85149',
219
- hoverCounterBg: 'rgba(255, 255, 255, 0.2)',
220
- selectedText: '#FBF7EF',
221
- selectedBg: '#b62324',
222
- selectedBorder: '#ff7b72',
223
- disabledText: 'rgba(248, 81, 73, 0.5)',
224
- disabledBg: 'rgba(248, 81, 73, 0.1)',
225
- disabledCounterBg: 'rgba(248, 81, 73, 0.05)',
226
- counterBg: 'rgba(248, 81, 73, 0.1)',
227
- counterFg: '#f85149',
228
- hoverCounterFg: '#FBF7EF',
229
- disabledCounterFg: 'rgba(248, 81, 73, 0.5)',
230
- icon: '#f85149',
231
- },
232
- },
233
- };
234
- /* ── Exports ─────────────────────────────────────────────────────────── */
235
- /**
236
- * The Primer theme object.
237
- *
238
- * Since theming is done entirely via CSS custom properties
239
- * (see `ivoryThemeStyles`), this is just the unmodified default Primer
240
- * theme kept for backward compatibility.
241
- */
13
+ export * from './ivoryThemeStyles';
14
+ /** The Primer theme object: Primer's default. */
242
15
  export const ivoryTheme = primerTheme;
243
- /**
244
- * Elegant humanist-serif font stack for the Ivory aesthetic.
245
- *
246
- * Leads with Palatino — a soft, calligraphic, welcoming transitional
247
- * serif — with metric-compatible fallbacks across macOS / Windows /
248
- * Linux (URW Palladio L / P052) so the refined, hospitable feel renders
249
- * consistently everywhere without web-font loading (same no-download
250
- * approach as the Matrix monospace stack).
251
- */
252
- const ivoryFontFamily = '"Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif';
253
- /** Comprehensive Primer CSS-variable overrides for light & dark mode. */
254
- export const ivoryThemeStyles = buildThemeStyles(ivoryLight, ivoryDark, {
255
- fontFamily: ivoryFontFamily,
256
- });
257
16
  export default ivoryTheme;
@@ -0,0 +1,2 @@
1
+ /** Comprehensive Primer CSS-variable overrides for light & dark mode. */
2
+ export declare const ivoryThemeStyles: import("../css/createThemeCSSVars").ThemeStyles;
@@ -0,0 +1,247 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ /**
6
+ * Ivory Theme for Primer React.
7
+ *
8
+ * Soft, warm off-white neutrals with a deep-taupe accent — a calm,
9
+ * refined, and welcoming look. Uses an elegant humanist-serif type stack
10
+ * (Palatino-led) for a gentle, hospitable, printed feel.
11
+ * Theming is applied via **CSS custom-property overrides**.
12
+ */
13
+ import { ivoryColors } from '../colors/ivoryColors';
14
+ import { buildThemeStyles } from '../css/createThemeCSSVars';
15
+ /* ── Light-mode colour definitions ───────────────────────────────────── */
16
+ const ivoryLight = {
17
+ canvas: {
18
+ default: ivoryColors.white,
19
+ subtle: '#F4EDDE',
20
+ },
21
+ fg: {
22
+ default: '#2C2318',
23
+ muted: ivoryColors.gray,
24
+ onEmphasis: '#FBF7EF',
25
+ },
26
+ accent: {
27
+ fg: ivoryColors.ivoryText,
28
+ emphasis: ivoryColors.ivoryText,
29
+ muted: ivoryColors.ivoryAccent,
30
+ subtle: ivoryColors.ivoryTint,
31
+ },
32
+ success: {
33
+ fg: '#3E6B47',
34
+ emphasis: '#3E6B47',
35
+ muted: '#5E8A5E',
36
+ subtle: '#E1EEE0',
37
+ },
38
+ attention: {
39
+ fg: ivoryColors.attentionBrand,
40
+ emphasis: ivoryColors.attentionBrand,
41
+ muted: ivoryColors.attentionAccent,
42
+ subtle: ivoryColors.attentionTint,
43
+ },
44
+ danger: {
45
+ fg: ivoryColors.dangerBrand,
46
+ emphasis: ivoryColors.dangerBrand,
47
+ muted: ivoryColors.dangerAccent,
48
+ subtle: ivoryColors.dangerTint,
49
+ },
50
+ severe: {
51
+ fg: ivoryColors.severeBrand,
52
+ emphasis: ivoryColors.severeBrand,
53
+ muted: ivoryColors.severeAccent,
54
+ subtle: ivoryColors.severeTint,
55
+ },
56
+ done: {
57
+ fg: ivoryColors.doneBrand,
58
+ emphasis: ivoryColors.doneBrand,
59
+ muted: ivoryColors.doneAccent,
60
+ subtle: ivoryColors.doneTint,
61
+ },
62
+ border: {
63
+ default: '#E0D3BC',
64
+ muted: '#EBE1CE',
65
+ },
66
+ btn: {
67
+ text: '#2C2318',
68
+ bg: '#FDF9F1',
69
+ border: '#DDCEB2',
70
+ hoverBg: ivoryColors.ivoryTint,
71
+ hoverBorder: ivoryColors.gray,
72
+ activeBg: ivoryColors.ivoryTint,
73
+ activeBorder: ivoryColors.gray,
74
+ selectedBg: '#FDF9F1',
75
+ counterBg: ivoryColors.gray,
76
+ primary: {
77
+ text: '#FBF7EF',
78
+ bg: ivoryColors.ivoryText,
79
+ border: ivoryColors.ivoryText,
80
+ hoverBg: ivoryColors.ivoryHover,
81
+ hoverBorder: ivoryColors.ivoryHover,
82
+ selectedBg: ivoryColors.ivoryHover,
83
+ disabledText: 'rgba(255, 255, 255, 0.8)',
84
+ disabledBg: '#D8C9AE',
85
+ disabledBorder: '#D8C9AE',
86
+ icon: '#FBF7EF',
87
+ counterBg: 'rgba(0, 0, 0, 0.2)',
88
+ },
89
+ outline: {
90
+ text: ivoryColors.ivoryText,
91
+ hoverText: '#FBF7EF',
92
+ hoverBg: ivoryColors.ivoryText,
93
+ hoverBorder: ivoryColors.ivoryText,
94
+ hoverCounterBg: 'rgba(255, 255, 255, 0.2)',
95
+ selectedText: '#FBF7EF',
96
+ selectedBg: ivoryColors.ivoryHover,
97
+ selectedBorder: ivoryColors.ivoryHover,
98
+ disabledText: ivoryColors.gray,
99
+ disabledBg: ivoryColors.ivoryTint,
100
+ disabledCounterBg: 'rgba(0, 0, 0, 0.05)',
101
+ counterBg: 'rgba(0, 0, 0, 0.05)',
102
+ counterFg: ivoryColors.ivoryText,
103
+ hoverCounterFg: '#FBF7EF',
104
+ disabledCounterFg: ivoryColors.gray,
105
+ },
106
+ danger: {
107
+ text: '#B42318',
108
+ hoverText: '#FBF7EF',
109
+ hoverBg: '#B42318',
110
+ hoverBorder: '#B42318',
111
+ hoverCounterBg: 'rgba(255, 255, 255, 0.2)',
112
+ selectedText: '#FBF7EF',
113
+ selectedBg: '#8E1B12',
114
+ selectedBorder: '#8E1B12',
115
+ disabledText: 'rgba(180, 35, 24, 0.5)',
116
+ disabledBg: ivoryColors.ivoryTint,
117
+ disabledCounterBg: 'rgba(180, 35, 24, 0.05)',
118
+ counterBg: 'rgba(180, 35, 24, 0.1)',
119
+ counterFg: '#B42318',
120
+ hoverCounterFg: '#FBF7EF',
121
+ disabledCounterFg: 'rgba(180, 35, 24, 0.5)',
122
+ icon: '#B42318',
123
+ },
124
+ },
125
+ };
126
+ /* ── Dark-mode colour definitions ────────────────────────────────────── */
127
+ const ivoryDark = {
128
+ canvas: {
129
+ default: ivoryColors.black,
130
+ subtle: '#2A2219',
131
+ },
132
+ fg: {
133
+ default: '#EFE6D6',
134
+ muted: '#BBAC97',
135
+ onEmphasis: '#FBF7EF',
136
+ },
137
+ accent: {
138
+ fg: ivoryColors.ivoryBright,
139
+ emphasis: '#836A18',
140
+ muted: ivoryColors.ivoryBrand,
141
+ subtle: '#332A18',
142
+ },
143
+ success: {
144
+ fg: '#7CB07E',
145
+ emphasis: '#3E6B47',
146
+ muted: '#5E8A5E',
147
+ subtle: '#16261A',
148
+ },
149
+ attention: {
150
+ fg: '#E7C24E',
151
+ emphasis: '#8A6D08',
152
+ muted: ivoryColors.attentionAccent,
153
+ subtle: '#2E2606',
154
+ },
155
+ danger: {
156
+ fg: '#F08A70',
157
+ emphasis: '#A34632',
158
+ muted: ivoryColors.dangerAccent,
159
+ subtle: '#2E140E',
160
+ },
161
+ severe: {
162
+ fg: '#E6A566',
163
+ emphasis: '#9C6221',
164
+ muted: ivoryColors.severeAccent,
165
+ subtle: '#2E1D0A',
166
+ },
167
+ done: {
168
+ fg: '#B09AD0',
169
+ emphasis: '#6A5591',
170
+ muted: ivoryColors.doneAccent,
171
+ subtle: '#1F1830',
172
+ },
173
+ btn: {
174
+ text: '#EFE6D6',
175
+ bg: '#2E2519',
176
+ border: 'rgba(239, 230, 214, 0.12)',
177
+ hoverBg: '#3A2F1F',
178
+ hoverBorder: '#BBAC97',
179
+ activeBg: '#2E2519',
180
+ activeBorder: '#8C7C64',
181
+ selectedBg: '#241D12',
182
+ counterBg: '#3A2F1F',
183
+ primary: {
184
+ text: '#211A12',
185
+ bg: ivoryColors.ivoryBright,
186
+ border: 'rgba(239, 230, 214, 0.12)',
187
+ hoverBg: ivoryColors.ivoryAccent,
188
+ hoverBorder: 'rgba(239, 230, 214, 0.12)',
189
+ selectedBg: ivoryColors.ivoryAccent,
190
+ disabledText: 'rgba(33, 26, 18, 0.5)',
191
+ disabledBg: 'rgba(239, 223, 194, 0.35)',
192
+ disabledBorder: 'rgba(239, 223, 194, 0.2)',
193
+ icon: '#211A12',
194
+ counterBg: 'rgba(0, 0, 0, 0.2)',
195
+ },
196
+ outline: {
197
+ text: ivoryColors.ivoryBright,
198
+ hoverText: '#211A12',
199
+ hoverBg: ivoryColors.ivoryBright,
200
+ hoverBorder: ivoryColors.ivoryBright,
201
+ hoverCounterBg: 'rgba(0, 0, 0, 0.2)',
202
+ selectedText: '#211A12',
203
+ selectedBg: ivoryColors.ivoryAccent,
204
+ selectedBorder: ivoryColors.ivoryAccent,
205
+ disabledText: 'rgba(239, 223, 194, 0.5)',
206
+ disabledBg: 'rgba(239, 223, 194, 0.1)',
207
+ disabledCounterBg: 'rgba(239, 223, 194, 0.05)',
208
+ counterBg: 'rgba(239, 223, 194, 0.1)',
209
+ counterFg: ivoryColors.ivoryBright,
210
+ hoverCounterFg: '#211A12',
211
+ disabledCounterFg: 'rgba(239, 223, 194, 0.5)',
212
+ },
213
+ danger: {
214
+ text: '#f85149',
215
+ hoverText: '#FBF7EF',
216
+ hoverBg: '#da3633',
217
+ hoverBorder: '#f85149',
218
+ hoverCounterBg: 'rgba(255, 255, 255, 0.2)',
219
+ selectedText: '#FBF7EF',
220
+ selectedBg: '#b62324',
221
+ selectedBorder: '#ff7b72',
222
+ disabledText: 'rgba(248, 81, 73, 0.5)',
223
+ disabledBg: 'rgba(248, 81, 73, 0.1)',
224
+ disabledCounterBg: 'rgba(248, 81, 73, 0.05)',
225
+ counterBg: 'rgba(248, 81, 73, 0.1)',
226
+ counterFg: '#f85149',
227
+ hoverCounterFg: '#FBF7EF',
228
+ disabledCounterFg: 'rgba(248, 81, 73, 0.5)',
229
+ icon: '#f85149',
230
+ },
231
+ },
232
+ };
233
+ /* ── Exports ─────────────────────────────────────────────────────────── */
234
+ /**
235
+ * Elegant humanist-serif font stack for the Ivory aesthetic.
236
+ *
237
+ * Leads with Palatino — a soft, calligraphic, welcoming transitional
238
+ * serif — with metric-compatible fallbacks across macOS / Windows /
239
+ * Linux (URW Palladio L / P052) so the refined, hospitable feel renders
240
+ * consistently everywhere without web-font loading (same no-download
241
+ * approach as the Matrix monospace stack).
242
+ */
243
+ const ivoryFontFamily = '"Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif';
244
+ /** Comprehensive Primer CSS-variable overrides for light & dark mode. */
245
+ export const ivoryThemeStyles = buildThemeStyles(ivoryLight, ivoryDark, {
246
+ fontFamily: ivoryFontFamily,
247
+ });
@@ -1,82 +1,21 @@
1
- import { type ThemeColorDefs } from '../css/createThemeCSSVars';
2
- export declare const loopLight: ThemeColorDefs;
3
- export declare const loopDark: ThemeColorDefs;
4
- /**
5
- * What the Loop theme sets beside colour, the same in both modes.
6
- *
7
- * Primer's own radii are made rounder; the `--loop-*` properties are what
8
- * an application is drawn with. A face is an emoji at one of three sizes;
9
- * motion has three durations and one easing.
10
- */
11
- export declare const loopShapeVars: Record<string, string>;
12
- /**
13
- * Shadows, per mode: how a surface floats. Soft and low in the light —
14
- * a card is told apart by its shadow more than by a line; in the dark a
15
- * shadow shows little, so a surface gets a hairline of light and a
16
- * deeper shadow. Primer's own shadow tokens take the same hand, so a menu
17
- * or a dialog floats the way a frame does.
18
- */
19
- export declare const loopShadows: Record<'light' | 'dark', Record<string, string>>;
20
- /**
21
- * Type (LOOP T-04): one face, two weights, five sizes, one line-height per
22
- * size — each line a multiple of 4px.
23
- *
24
- * | Size | Line | Tokens |
25
- * |-----------------|---------------|--------------------------------------|
26
- * | 2rem (32px) | 1.25 (40px) | display, title large |
27
- * | 1.25rem (20px) | 1.4 (28px) | title medium, subtitle |
28
- * | 1rem (16px) | 1.5 (24px) | title small, body large |
29
- * | 0.875rem (14px) | 1.4286 (20px) | body medium — the body of the theme |
30
- * | 0.75rem (12px) | 1.3333 (16px) | body small, caption |
31
- *
32
- * The weights are 400 (body, subtitle) and 600 (titles, display, and what
33
- * Primer sets in its medium weight — a button's label); Primer's light weight
34
- * is 400. The titles are set tight and a little closer, as a good display face
35
- * is; the body left alone. The tracking is a token for a component to apply,
36
- * since a CSS font shorthand carries none.
37
- */
38
- export declare const loopTypeScale: {
39
- readonly display: {
40
- readonly size: "2rem";
41
- readonly lineHeight: "1.25";
42
- };
43
- readonly title: {
44
- readonly size: "1.25rem";
45
- readonly lineHeight: "1.4";
46
- };
47
- readonly heading: {
48
- readonly size: "1rem";
49
- readonly lineHeight: "1.5";
50
- };
51
- readonly body: {
52
- readonly size: "0.875rem";
53
- readonly lineHeight: "1.4286";
54
- };
55
- readonly small: {
56
- readonly size: "0.75rem";
57
- readonly lineHeight: "1.3333";
58
- };
59
- };
60
- /** The two weights of the `loop` theme. */
61
- export declare const loopFontWeights: {
62
- readonly regular: 400;
63
- readonly semibold: 600;
64
- };
65
- export declare const loopTypeVars: (font: string) => Record<string, string>;
66
- /**
67
- * The stage, lit: a soft fall from the stage tint at the top to the quiet
68
- * tint at the bottom, for the page an application sits on. Both tints are
69
- * the accent's, so an application's own colour lights its stage.
70
- */
71
- export declare const loopStageGradient = "radial-gradient(140% 100% at 50% 0%, var(--loop-stage) 0%, var(--loop-quiet) 100%)";
1
+ export * from './loopThemeStyles';
72
2
  /**
73
3
  * The Primer theme object.
74
4
  *
75
- * Since theming is done entirely via CSS custom properties
76
- * (see `loopThemeStyles`), this is just the unmodified default Primer
77
- * theme kept for backward compatibility.
5
+ * Theming is done through CSS custom properties (see `loopThemeStyles`), but
6
+ * `sx` reads its weights from this object: Primer's `semibold` is 500 and its
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):
9
+ * `light` and `normal` the regular, `semibold` and `bold` the semibold.
10
+ * Everything else is Primer's default.
78
11
  */
79
12
  export declare const loopTheme: {
13
+ fontWeights: {
14
+ light: 400;
15
+ normal: 400;
16
+ semibold: 600;
17
+ bold: 600;
18
+ };
80
19
  animation: {
81
20
  easeOutCubic: string;
82
21
  };
@@ -87,12 +26,6 @@ export declare const loopTheme: {
87
26
  mono: string;
88
27
  };
89
28
  fontSizes: string[];
90
- fontWeights: {
91
- light: number;
92
- normal: number;
93
- semibold: number;
94
- bold: number;
95
- };
96
29
  lineHeights: {
97
30
  condensedUltra: number;
98
31
  condensed: number;
@@ -1157,68 +1090,4 @@ export declare const loopTheme: {
1157
1090
  }>;
1158
1091
  }>;
1159
1092
  };
1160
- /**
1161
- * Inter, then its metric-matched fallback, then the system's own sans-serif
1162
- * (LOOP T-04). One face, two weights (400 and 600). The face is served by the
1163
- * page's own build: a page wearing the theme imports
1164
- * `@datalayer/primer-addons/style/loop-face.css`, which declares
1165
- * `Inter Variable` from `@fontsource-variable/inter` and `Inter Fallback`, a
1166
- * local Arial drawn to Inter's measure. The text paints in the fallback first
1167
- * and does not move when Inter arrives; a page that has not imported the
1168
- * stylesheet shows the system face.
1169
- */
1170
- export declare const loopFontFamily = "\"Inter Variable\", \"Inter Fallback\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif";
1171
- /**
1172
- * Motion (LOOP T-10): three durations and one easing, for three things — a
1173
- * status changing, a message arriving, a pane opening. Nothing else moves.
1174
- */
1175
- export declare const loopMotionVars: Record<string, string>;
1176
- /**
1177
- * The focus ring (LOOP T-15): 3 to 1 against the page and around a pill of
1178
- * any accent, in both modes. In light mode the deep mint does it — darker than the text, the one place it is —
1179
- * a halo in the theme's colour, as a system's own focus ring is — 6.5 to 1
1180
- * on white and 3.28 or more around every pastel. In dark mode no
1181
- * colour clears 3 to 1 against both the near-black page and the six
1182
- * pastels, the light ink least of all (under 1.8 to 1 on the pastels): a
1183
- * mid grey does, at 3.04 to 1 — and 2.77 to 1 on the subtle dark surface,
1184
- * the one place it falls short.
1185
- */
1186
- export declare const loopFocusRing: {
1187
- readonly light: string;
1188
- readonly dark: "#636363";
1189
- };
1190
- /**
1191
- * The controls, as one family (LOOP T-09): every single-line control is a
1192
- * pill — a button, a text input, a select, a segmented control (outside and
1193
- * each segment), a button group's two ends, a toggle switch, an underline
1194
- * tab's hover. A multi-line text area keeps `--borderRadius-medium`: a pill
1195
- * of many lines is a lozenge. Menus and overlays keep the card's radius,
1196
- * `--borderRadius-large`, which the theme already sets.
1197
- *
1198
- * Primer takes every control's corners from `--borderRadius-medium`, which
1199
- * cards and list items take too, so this cannot be a token: it is a
1200
- * stylesheet, scoped by the theme provider (`ThemeStyles.css`). Primer's
1201
- * class names are CSS-module hashes (`prc-Button-ButtonBase-c50BI`), so the
1202
- * selectors match their stable prefix; the toggle switch is a
1203
- * styled-component, matched by its display name, which styled-components
1204
- * puts in its class (`ToggleSwitch__SwitchButton-sc-e6gszy-0`). A test reads each of them
1205
- * back from the installed `@primer/react`.
1206
- *
1207
- * Where a control draws more than one element from the token — a segmented
1208
- * control's track and segments, a button group's ends — the token itself is
1209
- * set on the control, and Primer's own rules draw the pill.
1210
- */
1211
- export declare const loopControlsSelectors: {
1212
- readonly button: "[class*=\"prc-Button-ButtonBase\"]";
1213
- readonly textInput: "[class*=\"prc-components-TextInputBaseWrapper\"]";
1214
- readonly textArea: "[class*=\"prc-Textarea-TextArea\"]";
1215
- readonly segmentedControl: "[class*=\"prc-SegmentedControl-SegmentedControl\"]";
1216
- readonly buttonGroup: "[class*=\"prc-ButtonGroup-ButtonGroup\"]";
1217
- readonly underlineTab: "[class*=\"prc-components-UnderlineItem\"]";
1218
- readonly toggleTrack: "[class*=\"ToggleSwitch__SwitchButton-\"]";
1219
- readonly toggleKnob: "[class*=\"ToggleSwitch__ToggleKnob-\"]";
1220
- };
1221
- export declare const loopControlsCss: string;
1222
- /** Comprehensive Primer CSS-variable overrides for light & dark mode. */
1223
- export declare const loopThemeStyles: import("../css/createThemeCSSVars").ThemeStyles;
1224
1093
  export default loopTheme;