@zhin.js/console-ui 0.0.0-stage → 1.1.0
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/CHANGELOG.md +54 -0
- package/LICENSE +21 -0
- package/README.md +195 -2
- package/audit/index.mjs +21 -0
- package/audit/layout-audit.mjs +492 -0
- package/audit/mount-page.jsx +90 -0
- package/audit/plugin-pages.mjs +186 -0
- package/dist/cn.d.ts +4 -0
- package/dist/cn.js +6 -0
- package/dist/components/BrandMark.d.ts +16 -0
- package/dist/components/BrandMark.js +21 -0
- package/dist/components/InfoHint.d.ts +12 -0
- package/dist/components/InfoHint.js +13 -0
- package/dist/components/PageHeader.d.ts +18 -0
- package/dist/components/PageHeader.js +11 -0
- package/dist/components/PageShell.d.ts +26 -0
- package/dist/components/PageShell.js +10 -0
- package/dist/components/RefreshControl.d.ts +28 -0
- package/dist/components/RefreshControl.js +68 -0
- package/dist/components/StatCard.d.ts +41 -0
- package/dist/components/StatCard.js +53 -0
- package/dist/components/StatusBadge.d.ts +14 -0
- package/dist/components/StatusBadge.js +19 -0
- package/dist/components/actions.d.ts +53 -0
- package/dist/components/actions.js +50 -0
- package/dist/components/code.d.ts +11 -0
- package/dist/components/code.js +10 -0
- package/dist/components/confirm-dialog-model.d.ts +9 -0
- package/dist/components/confirm-dialog-model.js +20 -0
- package/dist/components/confirm-dialog.d.ts +32 -0
- package/dist/components/confirm-dialog.js +72 -0
- package/dist/components/content-blocks.d.ts +141 -0
- package/dist/components/content-blocks.js +77 -0
- package/dist/components/empty-illustrations.d.ts +15 -0
- package/dist/components/empty-illustrations.js +36 -0
- package/dist/components/empty-state.d.ts +35 -0
- package/dist/components/empty-state.js +43 -0
- package/dist/components/error-alert.d.ts +15 -0
- package/dist/components/error-alert.js +23 -0
- package/dist/components/icon.d.ts +11 -0
- package/dist/components/icon.js +8 -0
- package/dist/components/layout.d.ts +38 -0
- package/dist/components/layout.js +28 -0
- package/dist/components/page-chrome.d.ts +53 -0
- package/dist/components/page-chrome.js +66 -0
- package/dist/components/refresh-control-model.d.ts +9 -0
- package/dist/components/refresh-control-model.js +26 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +15 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/alert.js +24 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +30 -0
- package/dist/components/ui/button.d.ts +20 -0
- package/dist/components/ui/button.js +52 -0
- package/dist/components/ui/card.d.ts +17 -0
- package/dist/components/ui/card.js +17 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +10 -0
- package/dist/components/ui/control-variant.d.ts +10 -0
- package/dist/components/ui/control-variant.js +6 -0
- package/dist/components/ui/date-field-model.d.ts +39 -0
- package/dist/components/ui/date-field-model.js +105 -0
- package/dist/components/ui/date-field.d.ts +33 -0
- package/dist/components/ui/date-field.js +161 -0
- package/dist/components/ui/dialog.d.ts +24 -0
- package/dist/components/ui/dialog.js +27 -0
- package/dist/components/ui/dropdown-menu.d.ts +19 -0
- package/dist/components/ui/dropdown-menu.js +26 -0
- package/dist/components/ui/input.d.ts +8 -0
- package/dist/components/ui/input.js +9 -0
- package/dist/components/ui/list-item-button.d.ts +10 -0
- package/dist/components/ui/list-item-button.js +6 -0
- package/dist/components/ui/popover.d.ts +6 -0
- package/dist/components/ui/popover.js +9 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +10 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +13 -0
- package/dist/components/ui/searchable-select-model.d.ts +29 -0
- package/dist/components/ui/searchable-select-model.js +38 -0
- package/dist/components/ui/searchable-select.d.ts +26 -0
- package/dist/components/ui/searchable-select.js +85 -0
- package/dist/components/ui/select.d.ts +29 -0
- package/dist/components/ui/select.js +39 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +11 -0
- package/dist/components/ui/sheet.d.ts +27 -0
- package/dist/components/ui/sheet.js +27 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.js +6 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +8 -0
- package/dist/components/ui/table.d.ts +27 -0
- package/dist/components/ui/table.js +47 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/tabs.js +13 -0
- package/dist/components/ui/textarea.d.ts +8 -0
- package/dist/components/ui/textarea.js +9 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +11 -0
- package/dist/components/use-container-width.d.ts +13 -0
- package/dist/components/use-container-width.js +30 -0
- package/dist/custom-media.css +13 -0
- package/dist/exports.json +178 -0
- package/dist/i18n/index.d.ts +27 -0
- package/dist/i18n/index.js +33 -0
- package/dist/i18n/messages.d.ts +55 -0
- package/dist/i18n/messages.js +110 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.js +55 -0
- package/dist/scale.json +643 -0
- package/dist/shared-module.d.ts +28 -0
- package/dist/shared-module.js +24 -0
- package/dist/styles.css +3399 -0
- package/dist/theme.css +469 -0
- package/dist/tokens.css +652 -0
- package/dist/version.d.ts +6 -0
- package/dist/version.js +2 -0
- package/lint/eslint-plugin.mjs +128 -0
- package/lint/stylelint-config.mjs +43 -0
- package/lint/stylelint-plugin.mjs +195 -0
- package/lint/tailwind-classes.mjs +121 -0
- package/package.json +103 -3
- package/tokens/color.mjs +104 -0
- package/tokens/colors.css +220 -0
- package/tokens/generate.mjs +288 -0
- package/tokens/scale.mjs +137 -0
- package/tokens/tokens.mjs +362 -0
package/dist/scale.json
ADDED
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Generated from @zhin.js/console-ui tokens/tokens.mjs by tokens/generate.mjs (ADR 0063 D17). Do not edit.",
|
|
3
|
+
"breakpoints": {
|
|
4
|
+
"sm": "40rem",
|
|
5
|
+
"md": "48rem",
|
|
6
|
+
"lg": "64rem",
|
|
7
|
+
"xl": "90rem"
|
|
8
|
+
},
|
|
9
|
+
"text": {
|
|
10
|
+
"label": "0.8125rem",
|
|
11
|
+
"body": "0.875rem",
|
|
12
|
+
"section": "1rem",
|
|
13
|
+
"title": "1.375rem",
|
|
14
|
+
"display": "1.75rem"
|
|
15
|
+
},
|
|
16
|
+
"weight": {
|
|
17
|
+
"regular": "400",
|
|
18
|
+
"medium": "500",
|
|
19
|
+
"strong": "600"
|
|
20
|
+
},
|
|
21
|
+
"space": {
|
|
22
|
+
"space-1": {
|
|
23
|
+
"value": "0.25rem",
|
|
24
|
+
"tailwind": "1"
|
|
25
|
+
},
|
|
26
|
+
"space-2": {
|
|
27
|
+
"value": "0.5rem",
|
|
28
|
+
"tailwind": "2"
|
|
29
|
+
},
|
|
30
|
+
"space-3": {
|
|
31
|
+
"value": "0.75rem",
|
|
32
|
+
"tailwind": "3"
|
|
33
|
+
},
|
|
34
|
+
"space-4": {
|
|
35
|
+
"value": "1rem",
|
|
36
|
+
"tailwind": "4"
|
|
37
|
+
},
|
|
38
|
+
"space-5": {
|
|
39
|
+
"value": "1.5rem",
|
|
40
|
+
"tailwind": "6"
|
|
41
|
+
},
|
|
42
|
+
"space-6": {
|
|
43
|
+
"value": "2rem",
|
|
44
|
+
"tailwind": "8"
|
|
45
|
+
},
|
|
46
|
+
"space-7": {
|
|
47
|
+
"value": "3rem",
|
|
48
|
+
"tailwind": "12"
|
|
49
|
+
},
|
|
50
|
+
"space-8": {
|
|
51
|
+
"value": "4rem",
|
|
52
|
+
"tailwind": "16"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"radius": {
|
|
56
|
+
"r-0": "0rem",
|
|
57
|
+
"r-1": "0.375rem",
|
|
58
|
+
"r-2": "0.625rem",
|
|
59
|
+
"r-3": "0.875rem",
|
|
60
|
+
"r-4": "1.125rem",
|
|
61
|
+
"r-full": "9999px"
|
|
62
|
+
},
|
|
63
|
+
"border": {
|
|
64
|
+
"hairline": "1px",
|
|
65
|
+
"focus": "2px"
|
|
66
|
+
},
|
|
67
|
+
"elevation": [
|
|
68
|
+
"e-0",
|
|
69
|
+
"e-1",
|
|
70
|
+
"e-2",
|
|
71
|
+
"e-3"
|
|
72
|
+
],
|
|
73
|
+
"contentWidth": {
|
|
74
|
+
"reading": "60rem",
|
|
75
|
+
"data": "120rem"
|
|
76
|
+
},
|
|
77
|
+
"touchTarget": "2.75rem",
|
|
78
|
+
"semantic": {
|
|
79
|
+
"page-padding-inline": {
|
|
80
|
+
"kind": "space",
|
|
81
|
+
"scope": "viewport",
|
|
82
|
+
"base": "space-3",
|
|
83
|
+
"sm": "space-4",
|
|
84
|
+
"lg": "clamp(space-4, 2.5vw, space-6)"
|
|
85
|
+
},
|
|
86
|
+
"page-padding-block": {
|
|
87
|
+
"kind": "space",
|
|
88
|
+
"scope": "viewport",
|
|
89
|
+
"base": "space-4",
|
|
90
|
+
"sm": "space-5",
|
|
91
|
+
"lg": "space-6"
|
|
92
|
+
},
|
|
93
|
+
"section-gap": {
|
|
94
|
+
"kind": "space",
|
|
95
|
+
"scope": "viewport",
|
|
96
|
+
"base": "space-4",
|
|
97
|
+
"sm": "space-5",
|
|
98
|
+
"lg": "space-6"
|
|
99
|
+
},
|
|
100
|
+
"stack-gap": {
|
|
101
|
+
"kind": "space",
|
|
102
|
+
"base": "space-2",
|
|
103
|
+
"sm": "space-3",
|
|
104
|
+
"lg": "space-3"
|
|
105
|
+
},
|
|
106
|
+
"inline-gap": {
|
|
107
|
+
"kind": "space",
|
|
108
|
+
"base": "space-2",
|
|
109
|
+
"sm": "space-2",
|
|
110
|
+
"lg": "space-2"
|
|
111
|
+
},
|
|
112
|
+
"heading-gap": {
|
|
113
|
+
"kind": "space",
|
|
114
|
+
"base": "space-1",
|
|
115
|
+
"sm": "space-1",
|
|
116
|
+
"lg": "space-1"
|
|
117
|
+
},
|
|
118
|
+
"card-padding": {
|
|
119
|
+
"kind": "space",
|
|
120
|
+
"base": "space-3",
|
|
121
|
+
"sm": "space-4",
|
|
122
|
+
"lg": "space-4"
|
|
123
|
+
},
|
|
124
|
+
"card-padding-wide": {
|
|
125
|
+
"kind": "space",
|
|
126
|
+
"base": "space-3",
|
|
127
|
+
"sm": "space-4",
|
|
128
|
+
"lg": "space-5"
|
|
129
|
+
},
|
|
130
|
+
"card-radius": {
|
|
131
|
+
"kind": "radius",
|
|
132
|
+
"base": "r-2",
|
|
133
|
+
"sm": "r-3",
|
|
134
|
+
"lg": "r-3"
|
|
135
|
+
},
|
|
136
|
+
"card-edge-radius": {
|
|
137
|
+
"kind": "radius",
|
|
138
|
+
"base": "r-0",
|
|
139
|
+
"sm": "r-3",
|
|
140
|
+
"lg": "r-3"
|
|
141
|
+
},
|
|
142
|
+
"card-border": {
|
|
143
|
+
"kind": "border",
|
|
144
|
+
"base": "hairline",
|
|
145
|
+
"sm": "hairline",
|
|
146
|
+
"lg": "hairline"
|
|
147
|
+
},
|
|
148
|
+
"card-elevation": {
|
|
149
|
+
"kind": "elevation",
|
|
150
|
+
"base": "e-0",
|
|
151
|
+
"sm": "e-0",
|
|
152
|
+
"lg": "e-0"
|
|
153
|
+
},
|
|
154
|
+
"card-hover-elevation": {
|
|
155
|
+
"kind": "elevation",
|
|
156
|
+
"base": "e-0",
|
|
157
|
+
"sm": "e-0",
|
|
158
|
+
"lg": "e-1"
|
|
159
|
+
},
|
|
160
|
+
"grid-gap": {
|
|
161
|
+
"kind": "space",
|
|
162
|
+
"base": "space-2",
|
|
163
|
+
"sm": "space-3",
|
|
164
|
+
"lg": "space-4"
|
|
165
|
+
},
|
|
166
|
+
"list-row-padding": {
|
|
167
|
+
"kind": "space",
|
|
168
|
+
"base": "space-3",
|
|
169
|
+
"sm": "space-2",
|
|
170
|
+
"lg": "space-2"
|
|
171
|
+
},
|
|
172
|
+
"list-row-padding-inline": {
|
|
173
|
+
"kind": "space",
|
|
174
|
+
"base": "space-3",
|
|
175
|
+
"sm": "space-3",
|
|
176
|
+
"lg": "space-3"
|
|
177
|
+
},
|
|
178
|
+
"control-height": {
|
|
179
|
+
"kind": "size",
|
|
180
|
+
"base": "2.75rem",
|
|
181
|
+
"sm": "2.25rem",
|
|
182
|
+
"lg": "2.25rem"
|
|
183
|
+
},
|
|
184
|
+
"control-height-compact": {
|
|
185
|
+
"kind": "size",
|
|
186
|
+
"base": "2.75rem",
|
|
187
|
+
"sm": "2.25rem",
|
|
188
|
+
"lg": "2rem"
|
|
189
|
+
},
|
|
190
|
+
"control-radius": {
|
|
191
|
+
"kind": "radius",
|
|
192
|
+
"base": "r-2",
|
|
193
|
+
"sm": "r-2",
|
|
194
|
+
"lg": "r-2"
|
|
195
|
+
},
|
|
196
|
+
"check-radius": {
|
|
197
|
+
"kind": "radius",
|
|
198
|
+
"base": "r-1",
|
|
199
|
+
"sm": "r-1",
|
|
200
|
+
"lg": "r-1"
|
|
201
|
+
},
|
|
202
|
+
"segment-radius": {
|
|
203
|
+
"kind": "radius",
|
|
204
|
+
"base": "r-1",
|
|
205
|
+
"sm": "r-1",
|
|
206
|
+
"lg": "r-1"
|
|
207
|
+
},
|
|
208
|
+
"control-padding-inline": {
|
|
209
|
+
"kind": "space",
|
|
210
|
+
"base": "space-3",
|
|
211
|
+
"sm": "space-3",
|
|
212
|
+
"lg": "space-3"
|
|
213
|
+
},
|
|
214
|
+
"control-gap": {
|
|
215
|
+
"kind": "space",
|
|
216
|
+
"base": "space-2",
|
|
217
|
+
"sm": "space-2",
|
|
218
|
+
"lg": "space-2"
|
|
219
|
+
},
|
|
220
|
+
"control-border": {
|
|
221
|
+
"kind": "border",
|
|
222
|
+
"base": "hairline",
|
|
223
|
+
"sm": "hairline",
|
|
224
|
+
"lg": "hairline"
|
|
225
|
+
},
|
|
226
|
+
"touch-min": {
|
|
227
|
+
"kind": "size",
|
|
228
|
+
"base": "2.75rem",
|
|
229
|
+
"sm": "0rem",
|
|
230
|
+
"lg": "0rem"
|
|
231
|
+
},
|
|
232
|
+
"badge-height": {
|
|
233
|
+
"kind": "size",
|
|
234
|
+
"base": "1.25rem",
|
|
235
|
+
"sm": "1.25rem",
|
|
236
|
+
"lg": "1.25rem"
|
|
237
|
+
},
|
|
238
|
+
"badge-radius": {
|
|
239
|
+
"kind": "radius",
|
|
240
|
+
"base": "r-full",
|
|
241
|
+
"sm": "r-full",
|
|
242
|
+
"lg": "r-full"
|
|
243
|
+
},
|
|
244
|
+
"badge-padding-inline": {
|
|
245
|
+
"kind": "space",
|
|
246
|
+
"base": "space-2",
|
|
247
|
+
"sm": "space-2",
|
|
248
|
+
"lg": "space-2"
|
|
249
|
+
},
|
|
250
|
+
"popover-radius": {
|
|
251
|
+
"kind": "radius",
|
|
252
|
+
"scope": "viewport",
|
|
253
|
+
"base": "r-4 r-4 r-0 r-0",
|
|
254
|
+
"sm": "r-3",
|
|
255
|
+
"lg": "r-3"
|
|
256
|
+
},
|
|
257
|
+
"popover-item-radius": {
|
|
258
|
+
"kind": "radius",
|
|
259
|
+
"scope": "viewport",
|
|
260
|
+
"base": "r-3",
|
|
261
|
+
"sm": "r-2",
|
|
262
|
+
"lg": "r-2"
|
|
263
|
+
},
|
|
264
|
+
"popover-padding": {
|
|
265
|
+
"kind": "space",
|
|
266
|
+
"scope": "viewport",
|
|
267
|
+
"base": "space-1",
|
|
268
|
+
"sm": "space-1",
|
|
269
|
+
"lg": "space-1"
|
|
270
|
+
},
|
|
271
|
+
"popover-elevation": {
|
|
272
|
+
"kind": "elevation",
|
|
273
|
+
"scope": "viewport",
|
|
274
|
+
"base": "e-3",
|
|
275
|
+
"sm": "e-2",
|
|
276
|
+
"lg": "e-2"
|
|
277
|
+
},
|
|
278
|
+
"dialog-radius": {
|
|
279
|
+
"kind": "radius",
|
|
280
|
+
"scope": "viewport",
|
|
281
|
+
"base": "r-4 r-4 r-0 r-0",
|
|
282
|
+
"sm": "r-4",
|
|
283
|
+
"lg": "r-4"
|
|
284
|
+
},
|
|
285
|
+
"dialog-padding": {
|
|
286
|
+
"kind": "space",
|
|
287
|
+
"scope": "viewport",
|
|
288
|
+
"base": "space-4",
|
|
289
|
+
"sm": "space-5",
|
|
290
|
+
"lg": "space-5"
|
|
291
|
+
},
|
|
292
|
+
"dialog-elevation": {
|
|
293
|
+
"kind": "elevation",
|
|
294
|
+
"scope": "viewport",
|
|
295
|
+
"base": "e-3",
|
|
296
|
+
"sm": "e-3",
|
|
297
|
+
"lg": "e-3"
|
|
298
|
+
},
|
|
299
|
+
"dialog-close-clearance": {
|
|
300
|
+
"kind": "space",
|
|
301
|
+
"scope": "viewport",
|
|
302
|
+
"base": "space-7",
|
|
303
|
+
"sm": "space-7",
|
|
304
|
+
"lg": "space-7"
|
|
305
|
+
},
|
|
306
|
+
"sheet-radius": {
|
|
307
|
+
"kind": "radius",
|
|
308
|
+
"scope": "viewport",
|
|
309
|
+
"base": "r-4",
|
|
310
|
+
"sm": "r-4",
|
|
311
|
+
"lg": "r-4"
|
|
312
|
+
},
|
|
313
|
+
"focus-ring-width": {
|
|
314
|
+
"kind": "border",
|
|
315
|
+
"scope": "viewport",
|
|
316
|
+
"base": "focus",
|
|
317
|
+
"sm": "focus",
|
|
318
|
+
"lg": "focus"
|
|
319
|
+
},
|
|
320
|
+
"focus-ring-offset": {
|
|
321
|
+
"kind": "space",
|
|
322
|
+
"scope": "viewport",
|
|
323
|
+
"base": "2px",
|
|
324
|
+
"sm": "2px",
|
|
325
|
+
"lg": "2px"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"tailwind": {
|
|
329
|
+
"spacingKeys": [
|
|
330
|
+
"0",
|
|
331
|
+
"px",
|
|
332
|
+
"1",
|
|
333
|
+
"2",
|
|
334
|
+
"3",
|
|
335
|
+
"4",
|
|
336
|
+
"6",
|
|
337
|
+
"8",
|
|
338
|
+
"12",
|
|
339
|
+
"16"
|
|
340
|
+
],
|
|
341
|
+
"sizingKeys": [
|
|
342
|
+
"0",
|
|
343
|
+
"0.5",
|
|
344
|
+
"1",
|
|
345
|
+
"1.5",
|
|
346
|
+
"2",
|
|
347
|
+
"2.5",
|
|
348
|
+
"3",
|
|
349
|
+
"3.5",
|
|
350
|
+
"4",
|
|
351
|
+
"5",
|
|
352
|
+
"6",
|
|
353
|
+
"7",
|
|
354
|
+
"8",
|
|
355
|
+
"9",
|
|
356
|
+
"10",
|
|
357
|
+
"11",
|
|
358
|
+
"12",
|
|
359
|
+
"14",
|
|
360
|
+
"16",
|
|
361
|
+
"20",
|
|
362
|
+
"24",
|
|
363
|
+
"28",
|
|
364
|
+
"32",
|
|
365
|
+
"36",
|
|
366
|
+
"40",
|
|
367
|
+
"44",
|
|
368
|
+
"48",
|
|
369
|
+
"52",
|
|
370
|
+
"56",
|
|
371
|
+
"60",
|
|
372
|
+
"64",
|
|
373
|
+
"72",
|
|
374
|
+
"80",
|
|
375
|
+
"96",
|
|
376
|
+
"control",
|
|
377
|
+
"control-compact",
|
|
378
|
+
"touch",
|
|
379
|
+
"touch-min",
|
|
380
|
+
"badge"
|
|
381
|
+
],
|
|
382
|
+
"radiusKeys": [
|
|
383
|
+
"none",
|
|
384
|
+
"0",
|
|
385
|
+
"1",
|
|
386
|
+
"2",
|
|
387
|
+
"3",
|
|
388
|
+
"4",
|
|
389
|
+
"full",
|
|
390
|
+
"card",
|
|
391
|
+
"card-edge",
|
|
392
|
+
"control",
|
|
393
|
+
"check",
|
|
394
|
+
"segment",
|
|
395
|
+
"badge",
|
|
396
|
+
"popover",
|
|
397
|
+
"popover-item",
|
|
398
|
+
"dialog",
|
|
399
|
+
"sheet"
|
|
400
|
+
],
|
|
401
|
+
"shadowKeys": [
|
|
402
|
+
"none",
|
|
403
|
+
"e1",
|
|
404
|
+
"e2",
|
|
405
|
+
"e3",
|
|
406
|
+
"card",
|
|
407
|
+
"card-hover",
|
|
408
|
+
"popover",
|
|
409
|
+
"dialog"
|
|
410
|
+
],
|
|
411
|
+
"textKeys": [
|
|
412
|
+
"label",
|
|
413
|
+
"body",
|
|
414
|
+
"section",
|
|
415
|
+
"title",
|
|
416
|
+
"display"
|
|
417
|
+
],
|
|
418
|
+
"fontWeightKeys": [
|
|
419
|
+
"regular",
|
|
420
|
+
"medium",
|
|
421
|
+
"strong"
|
|
422
|
+
],
|
|
423
|
+
"breakpointKeys": [
|
|
424
|
+
"sm",
|
|
425
|
+
"md",
|
|
426
|
+
"lg",
|
|
427
|
+
"xl"
|
|
428
|
+
],
|
|
429
|
+
"borderWidthKeys": [
|
|
430
|
+
"0",
|
|
431
|
+
"px",
|
|
432
|
+
"hairline",
|
|
433
|
+
"focus"
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
"css": {
|
|
437
|
+
"baseTokens": [
|
|
438
|
+
"--console-text-label",
|
|
439
|
+
"--console-leading-label",
|
|
440
|
+
"--console-text-body",
|
|
441
|
+
"--console-leading-body",
|
|
442
|
+
"--console-text-section",
|
|
443
|
+
"--console-leading-section",
|
|
444
|
+
"--console-text-title",
|
|
445
|
+
"--console-leading-title",
|
|
446
|
+
"--console-text-display",
|
|
447
|
+
"--console-leading-display",
|
|
448
|
+
"--console-weight-regular",
|
|
449
|
+
"--console-weight-medium",
|
|
450
|
+
"--console-weight-strong",
|
|
451
|
+
"--console-space-1",
|
|
452
|
+
"--console-space-2",
|
|
453
|
+
"--console-space-3",
|
|
454
|
+
"--console-space-4",
|
|
455
|
+
"--console-space-5",
|
|
456
|
+
"--console-space-6",
|
|
457
|
+
"--console-space-7",
|
|
458
|
+
"--console-space-8",
|
|
459
|
+
"--console-radius-0",
|
|
460
|
+
"--console-radius-1",
|
|
461
|
+
"--console-radius-2",
|
|
462
|
+
"--console-radius-3",
|
|
463
|
+
"--console-radius-4",
|
|
464
|
+
"--console-radius-full",
|
|
465
|
+
"--console-border-hairline",
|
|
466
|
+
"--console-border-focus",
|
|
467
|
+
"--console-elevation-0",
|
|
468
|
+
"--console-elevation-1",
|
|
469
|
+
"--console-elevation-2",
|
|
470
|
+
"--console-elevation-3",
|
|
471
|
+
"--console-bp-sm",
|
|
472
|
+
"--console-bp-md",
|
|
473
|
+
"--console-bp-lg",
|
|
474
|
+
"--console-bp-xl",
|
|
475
|
+
"--console-content-reading",
|
|
476
|
+
"--console-content-data",
|
|
477
|
+
"--console-touch-target",
|
|
478
|
+
"--console-font-sans",
|
|
479
|
+
"--console-font-mono",
|
|
480
|
+
"--console-line-code",
|
|
481
|
+
"--console-leading-code",
|
|
482
|
+
"--console-shadow-color",
|
|
483
|
+
"--console-ease-out",
|
|
484
|
+
"--console-surface-raised",
|
|
485
|
+
"--console-surface-muted",
|
|
486
|
+
"--console-surface-inset",
|
|
487
|
+
"--console-surface-hover",
|
|
488
|
+
"--console-surface-active",
|
|
489
|
+
"--console-border-subtle",
|
|
490
|
+
"--console-border-default",
|
|
491
|
+
"--console-border-strong",
|
|
492
|
+
"--console-motion-fast",
|
|
493
|
+
"--console-motion-base",
|
|
494
|
+
"--console-motion-slow",
|
|
495
|
+
"--console-brand",
|
|
496
|
+
"--console-brand-foreground",
|
|
497
|
+
"--console-brand-text",
|
|
498
|
+
"--console-brand-tint",
|
|
499
|
+
"--console-signal-danger-fill",
|
|
500
|
+
"--console-signal-danger-text",
|
|
501
|
+
"--console-signal-warning-fill",
|
|
502
|
+
"--console-signal-warning-text",
|
|
503
|
+
"--console-signal-success-fill",
|
|
504
|
+
"--console-signal-success-text",
|
|
505
|
+
"--console-signal-info-fill",
|
|
506
|
+
"--console-signal-info-text",
|
|
507
|
+
"--console-chart-1",
|
|
508
|
+
"--console-chart-2",
|
|
509
|
+
"--console-chart-3",
|
|
510
|
+
"--console-chart-4",
|
|
511
|
+
"--console-chart-5",
|
|
512
|
+
"--console-chart-6",
|
|
513
|
+
"--console-chart-7",
|
|
514
|
+
"--console-chart-8",
|
|
515
|
+
"--console-chart-other",
|
|
516
|
+
"--console-shadow-ring"
|
|
517
|
+
],
|
|
518
|
+
"semanticTokens": [
|
|
519
|
+
"--console-page-padding-inline",
|
|
520
|
+
"--console-page-padding-block",
|
|
521
|
+
"--console-section-gap",
|
|
522
|
+
"--console-stack-gap",
|
|
523
|
+
"--console-inline-gap",
|
|
524
|
+
"--console-heading-gap",
|
|
525
|
+
"--console-card-padding",
|
|
526
|
+
"--console-card-padding-wide",
|
|
527
|
+
"--console-card-radius",
|
|
528
|
+
"--console-card-edge-radius",
|
|
529
|
+
"--console-card-border",
|
|
530
|
+
"--console-card-elevation",
|
|
531
|
+
"--console-card-hover-elevation",
|
|
532
|
+
"--console-grid-gap",
|
|
533
|
+
"--console-list-row-padding",
|
|
534
|
+
"--console-list-row-padding-inline",
|
|
535
|
+
"--console-control-height",
|
|
536
|
+
"--console-control-height-compact",
|
|
537
|
+
"--console-control-radius",
|
|
538
|
+
"--console-check-radius",
|
|
539
|
+
"--console-segment-radius",
|
|
540
|
+
"--console-control-padding-inline",
|
|
541
|
+
"--console-control-gap",
|
|
542
|
+
"--console-control-border",
|
|
543
|
+
"--console-touch-min",
|
|
544
|
+
"--console-badge-height",
|
|
545
|
+
"--console-badge-radius",
|
|
546
|
+
"--console-badge-padding-inline",
|
|
547
|
+
"--console-popover-radius",
|
|
548
|
+
"--console-popover-item-radius",
|
|
549
|
+
"--console-popover-padding",
|
|
550
|
+
"--console-popover-elevation",
|
|
551
|
+
"--console-dialog-radius",
|
|
552
|
+
"--console-dialog-padding",
|
|
553
|
+
"--console-dialog-elevation",
|
|
554
|
+
"--console-dialog-close-clearance",
|
|
555
|
+
"--console-sheet-radius",
|
|
556
|
+
"--console-focus-ring-width",
|
|
557
|
+
"--console-focus-ring-offset",
|
|
558
|
+
"--console-focus-ring",
|
|
559
|
+
"--console-content-max"
|
|
560
|
+
],
|
|
561
|
+
"aliasTokens": [
|
|
562
|
+
"--console-radius-sm",
|
|
563
|
+
"--console-radius-md",
|
|
564
|
+
"--console-radius-lg",
|
|
565
|
+
"--console-radius-xl",
|
|
566
|
+
"--console-radius-2xl",
|
|
567
|
+
"--console-shadow-xs",
|
|
568
|
+
"--console-shadow-sm",
|
|
569
|
+
"--console-shadow-md",
|
|
570
|
+
"--console-shadow-lg",
|
|
571
|
+
"--console-shadow-xl",
|
|
572
|
+
"--console-shadow-panel",
|
|
573
|
+
"--console-shadow-hover",
|
|
574
|
+
"--console-shadow-button",
|
|
575
|
+
"--console-space-page-x",
|
|
576
|
+
"--console-space-page-y",
|
|
577
|
+
"--console-space-section",
|
|
578
|
+
"--console-space-stack",
|
|
579
|
+
"--console-space-card",
|
|
580
|
+
"--console-space-card-sm",
|
|
581
|
+
"--console-control-height-sm",
|
|
582
|
+
"--console-control-height-lg",
|
|
583
|
+
"--console-border-width",
|
|
584
|
+
"--console-focus-width",
|
|
585
|
+
"--console-duration-fast",
|
|
586
|
+
"--console-duration-page",
|
|
587
|
+
"--console-text-caption",
|
|
588
|
+
"--console-text-code",
|
|
589
|
+
"--console-text-body-sm",
|
|
590
|
+
"--console-text-section-sm",
|
|
591
|
+
"--console-text-title-compact",
|
|
592
|
+
"--radius"
|
|
593
|
+
],
|
|
594
|
+
"customMedia": {
|
|
595
|
+
"--console-sm": "(min-width: 40rem)",
|
|
596
|
+
"--console-below-sm": "(width < 40rem)",
|
|
597
|
+
"--console-md": "(min-width: 48rem)",
|
|
598
|
+
"--console-below-md": "(width < 48rem)",
|
|
599
|
+
"--console-lg": "(min-width: 64rem)",
|
|
600
|
+
"--console-below-lg": "(width < 64rem)",
|
|
601
|
+
"--console-xl": "(min-width: 90rem)",
|
|
602
|
+
"--console-below-xl": "(width < 90rem)"
|
|
603
|
+
},
|
|
604
|
+
"mediaParams": [
|
|
605
|
+
"(min-width: 40rem)",
|
|
606
|
+
"(width >= 40rem)",
|
|
607
|
+
"(width < 40rem)",
|
|
608
|
+
"(min-width: 48rem)",
|
|
609
|
+
"(width >= 48rem)",
|
|
610
|
+
"(width < 48rem)",
|
|
611
|
+
"(min-width: 64rem)",
|
|
612
|
+
"(width >= 64rem)",
|
|
613
|
+
"(width < 64rem)",
|
|
614
|
+
"(min-width: 90rem)",
|
|
615
|
+
"(width >= 90rem)",
|
|
616
|
+
"(width < 90rem)",
|
|
617
|
+
"(prefers-reduced-motion: reduce)",
|
|
618
|
+
"(prefers-reduced-motion: no-preference)",
|
|
619
|
+
"(prefers-color-scheme: dark)",
|
|
620
|
+
"(prefers-color-scheme: light)",
|
|
621
|
+
"(prefers-contrast: more)",
|
|
622
|
+
"(forced-colors: active)",
|
|
623
|
+
"(hover: hover)",
|
|
624
|
+
"(pointer: coarse)",
|
|
625
|
+
"print"
|
|
626
|
+
],
|
|
627
|
+
"containerParams": [
|
|
628
|
+
"(width < 40rem)",
|
|
629
|
+
"(40rem <= width < 64rem)",
|
|
630
|
+
"(width >= 64rem)",
|
|
631
|
+
"(min-width: 40rem)",
|
|
632
|
+
"(width >= 40rem)",
|
|
633
|
+
"(min-width: 48rem)",
|
|
634
|
+
"(width >= 48rem)",
|
|
635
|
+
"(width < 48rem)",
|
|
636
|
+
"(min-width: 64rem)",
|
|
637
|
+
"(width < 64rem)",
|
|
638
|
+
"(min-width: 90rem)",
|
|
639
|
+
"(width >= 90rem)",
|
|
640
|
+
"(width < 90rem)"
|
|
641
|
+
]
|
|
642
|
+
}
|
|
643
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Module id under which the Console shares this package with plugin pages (ADR 0063 D3). */
|
|
2
|
+
export declare const CONSOLE_UI_MODULE_ID = "@zhin.js/console-ui";
|
|
3
|
+
/**
|
|
4
|
+
* Global the Console fills with the versions of the modules it shares
|
|
5
|
+
* (`Map<moduleId, version>`), next to `__ZHIN_CONSOLE_SHARED_MODULES__`.
|
|
6
|
+
* `@zhin.js/pagemanager` reads the same key in its generated proxy modules.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CONSOLE_SHARED_MODULE_VERSIONS_KEY = "__ZHIN_CONSOLE_SHARED_MODULE_VERSIONS__";
|
|
9
|
+
/** Event the proxy modules dispatch on `globalThis` when a plugin page's peer range is not met. */
|
|
10
|
+
export declare const CONSOLE_SHARED_MODULE_ISSUE_EVENT = "zhin:console-shared-module-issue";
|
|
11
|
+
/** Global array the proxy modules append those issues to (for a page or the shell to show). */
|
|
12
|
+
export declare const CONSOLE_SHARED_MODULE_ISSUES_KEY = "__ZHIN_CONSOLE_SHARED_MODULE_ISSUES__";
|
|
13
|
+
export interface ConsoleSharedModuleIssue {
|
|
14
|
+
/** `major`: incompatible (the page does not load); `minor`: older than the range asks for; `range`: outside the range otherwise; `export`: named exports missing; `unversioned`: the Console did not register a version. */
|
|
15
|
+
readonly kind: 'major' | 'minor' | 'range' | 'export' | 'unversioned';
|
|
16
|
+
readonly module: string;
|
|
17
|
+
readonly hostVersion?: string;
|
|
18
|
+
readonly range?: string;
|
|
19
|
+
/** Package that declared the range (the plugin). */
|
|
20
|
+
readonly consumer?: string;
|
|
21
|
+
readonly missingExports?: readonly string[];
|
|
22
|
+
readonly message: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Registers this package (module namespace and version) in the Console's shared-module tables.
|
|
26
|
+
* Call it once in the Console entry before plugin entries load.
|
|
27
|
+
*/
|
|
28
|
+
export declare function registerConsoleUiSharedModule(moduleNamespace: unknown, sharedModules: Map<string, unknown>, target?: Record<string, unknown>): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CONSOLE_UI_VERSION } from './version.js';
|
|
2
|
+
/** Module id under which the Console shares this package with plugin pages (ADR 0063 D3). */
|
|
3
|
+
export const CONSOLE_UI_MODULE_ID = '@zhin.js/console-ui';
|
|
4
|
+
/**
|
|
5
|
+
* Global the Console fills with the versions of the modules it shares
|
|
6
|
+
* (`Map<moduleId, version>`), next to `__ZHIN_CONSOLE_SHARED_MODULES__`.
|
|
7
|
+
* `@zhin.js/pagemanager` reads the same key in its generated proxy modules.
|
|
8
|
+
*/
|
|
9
|
+
export const CONSOLE_SHARED_MODULE_VERSIONS_KEY = '__ZHIN_CONSOLE_SHARED_MODULE_VERSIONS__';
|
|
10
|
+
/** Event the proxy modules dispatch on `globalThis` when a plugin page's peer range is not met. */
|
|
11
|
+
export const CONSOLE_SHARED_MODULE_ISSUE_EVENT = 'zhin:console-shared-module-issue';
|
|
12
|
+
/** Global array the proxy modules append those issues to (for a page or the shell to show). */
|
|
13
|
+
export const CONSOLE_SHARED_MODULE_ISSUES_KEY = '__ZHIN_CONSOLE_SHARED_MODULE_ISSUES__';
|
|
14
|
+
/**
|
|
15
|
+
* Registers this package (module namespace and version) in the Console's shared-module tables.
|
|
16
|
+
* Call it once in the Console entry before plugin entries load.
|
|
17
|
+
*/
|
|
18
|
+
export function registerConsoleUiSharedModule(moduleNamespace, sharedModules, target = globalThis) {
|
|
19
|
+
sharedModules.set(CONSOLE_UI_MODULE_ID, moduleNamespace);
|
|
20
|
+
const existing = target[CONSOLE_SHARED_MODULE_VERSIONS_KEY];
|
|
21
|
+
const versions = existing instanceof Map ? existing : new Map();
|
|
22
|
+
versions.set(CONSOLE_UI_MODULE_ID, CONSOLE_UI_VERSION);
|
|
23
|
+
target[CONSOLE_SHARED_MODULE_VERSIONS_KEY] = versions;
|
|
24
|
+
}
|