@zhin.js/console-ui 0.0.0-stage → 1.0.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE +21 -0
  3. package/README.md +88 -2
  4. package/dist/cn.d.ts +4 -0
  5. package/dist/cn.js +6 -0
  6. package/dist/components/InfoHint.d.ts +12 -0
  7. package/dist/components/InfoHint.js +12 -0
  8. package/dist/components/PageHeader.d.ts +11 -0
  9. package/dist/components/PageHeader.js +8 -0
  10. package/dist/components/PageShell.d.ts +11 -0
  11. package/dist/components/PageShell.js +8 -0
  12. package/dist/components/RefreshControl.d.ts +23 -0
  13. package/dist/components/RefreshControl.js +65 -0
  14. package/dist/components/StatCard.d.ts +27 -0
  15. package/dist/components/StatCard.js +27 -0
  16. package/dist/components/confirm-dialog-model.d.ts +9 -0
  17. package/dist/components/confirm-dialog-model.js +20 -0
  18. package/dist/components/confirm-dialog.d.ts +32 -0
  19. package/dist/components/confirm-dialog.js +71 -0
  20. package/dist/components/empty-state.d.ts +15 -0
  21. package/dist/components/empty-state.js +15 -0
  22. package/dist/components/error-alert.d.ts +15 -0
  23. package/dist/components/error-alert.js +22 -0
  24. package/dist/components/page-chrome.d.ts +41 -0
  25. package/dist/components/page-chrome.js +65 -0
  26. package/dist/components/refresh-control-model.d.ts +9 -0
  27. package/dist/components/refresh-control-model.js +26 -0
  28. package/dist/components/ui/accordion.d.ts +7 -0
  29. package/dist/components/ui/accordion.js +14 -0
  30. package/dist/components/ui/alert.d.ts +8 -0
  31. package/dist/components/ui/alert.js +24 -0
  32. package/dist/components/ui/badge.d.ts +9 -0
  33. package/dist/components/ui/badge.js +29 -0
  34. package/dist/components/ui/button.d.ts +11 -0
  35. package/dist/components/ui/button.js +37 -0
  36. package/dist/components/ui/card.d.ts +11 -0
  37. package/dist/components/ui/card.js +16 -0
  38. package/dist/components/ui/checkbox.d.ts +4 -0
  39. package/dist/components/ui/checkbox.js +9 -0
  40. package/dist/components/ui/dialog.d.ts +24 -0
  41. package/dist/components/ui/dialog.js +26 -0
  42. package/dist/components/ui/dropdown-menu.d.ts +19 -0
  43. package/dist/components/ui/dropdown-menu.js +25 -0
  44. package/dist/components/ui/input.d.ts +3 -0
  45. package/dist/components/ui/input.js +8 -0
  46. package/dist/components/ui/list-item-button.d.ts +10 -0
  47. package/dist/components/ui/list-item-button.js +6 -0
  48. package/dist/components/ui/popover.d.ts +6 -0
  49. package/dist/components/ui/popover.js +9 -0
  50. package/dist/components/ui/radio-group.d.ts +5 -0
  51. package/dist/components/ui/radio-group.js +10 -0
  52. package/dist/components/ui/scroll-area.d.ts +5 -0
  53. package/dist/components/ui/scroll-area.js +13 -0
  54. package/dist/components/ui/searchable-select-model.d.ts +29 -0
  55. package/dist/components/ui/searchable-select-model.js +38 -0
  56. package/dist/components/ui/searchable-select.d.ts +23 -0
  57. package/dist/components/ui/searchable-select.js +84 -0
  58. package/dist/components/ui/select.d.ts +23 -0
  59. package/dist/components/ui/select.js +37 -0
  60. package/dist/components/ui/separator.d.ts +4 -0
  61. package/dist/components/ui/separator.js +11 -0
  62. package/dist/components/ui/sheet.d.ts +27 -0
  63. package/dist/components/ui/sheet.js +26 -0
  64. package/dist/components/ui/skeleton.d.ts +3 -0
  65. package/dist/components/ui/skeleton.js +6 -0
  66. package/dist/components/ui/switch.d.ts +4 -0
  67. package/dist/components/ui/switch.js +8 -0
  68. package/dist/components/ui/table.d.ts +16 -0
  69. package/dist/components/ui/table.js +16 -0
  70. package/dist/components/ui/tabs.d.ts +7 -0
  71. package/dist/components/ui/tabs.js +13 -0
  72. package/dist/components/ui/textarea.d.ts +3 -0
  73. package/dist/components/ui/textarea.js +8 -0
  74. package/dist/components/ui/tooltip.d.ts +7 -0
  75. package/dist/components/ui/tooltip.js +11 -0
  76. package/dist/exports.json +138 -0
  77. package/dist/i18n/index.d.ts +27 -0
  78. package/dist/i18n/index.js +33 -0
  79. package/dist/i18n/messages.d.ts +36 -0
  80. package/dist/i18n/messages.js +72 -0
  81. package/dist/index.d.ts +44 -0
  82. package/dist/index.js +44 -0
  83. package/dist/shared-module.d.ts +28 -0
  84. package/dist/shared-module.js +24 -0
  85. package/dist/styles.css +2316 -0
  86. package/dist/tokens.css +341 -0
  87. package/dist/version.d.ts +6 -0
  88. package/dist/version.js +2 -0
  89. package/package.json +73 -3
@@ -0,0 +1,341 @@
1
+ /*
2
+ * @zhin.js/console-ui — design tokens (ADR 0063 决策 1 第 2 条).
3
+ *
4
+ * One copy of the Console tokens: color tokens (light / dark / palettes) and the base tier
5
+ * (type, radii, control heights, spacing, shadows, motion, --console-content-max).
6
+ * Values are moved verbatim from the Console's theme-tokens.css and the token part of
7
+ * design-system.css (P1a: no value changes, D21). Dark mode follows the `.dark` class on an
8
+ * ancestor (the Console puts it on <html>); palettes follow `data-palette` on <html>.
9
+ * The deprecated `--zk-*` variables of @zhin.js/client are aliases of these tokens.
10
+ */
11
+ @layer base {
12
+ :root {
13
+ /* ── Palette inputs (overridden per palette below) ── */
14
+ --palette-hue: 214;
15
+ /* Neutral surfaces: just enough hue to feel related, not colored. */
16
+ --palette-surface-chroma: 14%;
17
+ --palette-dark-surface-chroma: 12%;
18
+ --palette-ink-chroma: 34%;
19
+ --palette-brand-saturation: 88%;
20
+ --palette-brand-lightness: 44%;
21
+ --palette-dark-brand-saturation: 96%;
22
+ --palette-dark-brand-lightness: 66%;
23
+ /* Soft tints used for primary actions, selection and the outgoing chat bubble. */
24
+ --palette-tint-saturation: 100%;
25
+ --palette-tint-lightness: 95.5%;
26
+ --palette-dark-tint-saturation: 42%;
27
+ --palette-dark-tint-lightness: 17%;
28
+ --surface-chroma: var(--palette-surface-chroma);
29
+
30
+ --background: var(--palette-hue) var(--surface-chroma) 95.4%;
31
+ --foreground: var(--palette-hue) var(--palette-ink-chroma) 12%;
32
+ --card: 0 0% 100%;
33
+ --card-foreground: var(--foreground);
34
+ --popover: var(--card);
35
+ --popover-foreground: var(--foreground);
36
+ --primary: var(--palette-hue) var(--palette-brand-saturation) var(--palette-brand-lightness);
37
+ --primary-foreground: 0 0% 100%;
38
+ --primary-action: var(--palette-hue) var(--palette-tint-saturation) var(--palette-tint-lightness);
39
+ --primary-action-foreground: var(--primary);
40
+ --primary-action-border: var(--palette-hue) var(--palette-brand-saturation) 78%;
41
+ --secondary: var(--palette-hue) var(--surface-chroma) 97.2%;
42
+ --secondary-foreground: var(--foreground);
43
+ --muted: var(--secondary);
44
+ --muted-foreground: var(--palette-hue) var(--surface-chroma) 39%;
45
+ --accent: var(--palette-hue) var(--surface-chroma) 93.2%;
46
+ --accent-foreground: var(--foreground);
47
+ --selected: var(--primary-action);
48
+ --selected-foreground: var(--primary);
49
+ --border: var(--palette-hue) var(--surface-chroma) 90.5%;
50
+ --border-strong: var(--palette-hue) var(--surface-chroma) 84%;
51
+ --input: var(--palette-hue) var(--surface-chroma) 51%;
52
+ --ring: var(--primary);
53
+ --sidebar: var(--card);
54
+ --sidebar-foreground: var(--palette-hue) var(--surface-chroma) 30%;
55
+ --sidebar-primary: var(--primary);
56
+ --sidebar-primary-foreground: var(--primary-foreground);
57
+ --sidebar-accent: var(--accent);
58
+ --sidebar-accent-foreground: var(--accent-foreground);
59
+ --sidebar-border: var(--border);
60
+ --sidebar-ring: var(--ring);
61
+ --im-shell-bg: var(--card);
62
+ --im-list-bg: var(--card);
63
+ --im-list-surface: var(--card);
64
+ --im-chat-bg: var(--secondary);
65
+ --im-chat-wash: var(--accent);
66
+ --im-line: var(--border);
67
+ --im-shadow: 222 30% 12%;
68
+ --im-bubble-in: var(--card);
69
+ --im-bubble-out: var(--primary-action);
70
+ --im-bubble-out-fg: var(--foreground);
71
+ --im-date-bg: var(--card);
72
+ --im-date-fg: var(--muted-foreground);
73
+ --im-at: var(--primary);
74
+ --im-row-hover: var(--palette-hue) var(--surface-chroma) 96%;
75
+ --im-row-active: var(--primary-action);
76
+ --im-row-active-fg: var(--foreground);
77
+ --im-row-active-muted: var(--muted-foreground);
78
+ --im-unread: var(--primary);
79
+ --destructive: 0 68% 42%;
80
+ --destructive-foreground: 0 0% 100%;
81
+ --success: 145 52% 28%;
82
+ --success-foreground: 0 0% 100%;
83
+ --info: 222 62% 50%;
84
+ --info-foreground: 0 0% 100%;
85
+ --warning: 32 80% 30%;
86
+ --warning-foreground: 0 0% 100%;
87
+ --radius: var(--console-radius-md);
88
+ --status-info: var(--info);
89
+ --status-success: var(--success);
90
+ --status-warning: var(--warning);
91
+ --status-danger: var(--destructive);
92
+ --chart-1: 222 62% 50%;
93
+ --chart-2: 35 85% 38%;
94
+ --chart-3: 160 70% 30%;
95
+ --chart-4: 330 60% 46%;
96
+ --chart-5: 262 50% 52%;
97
+ --chart-6: 12 60% 46%;
98
+ --chart-7: 188 75% 34%;
99
+ --chart-8: 220 8% 46%;
100
+ --chart-other: 220 6% 58%;
101
+ color-scheme: light;
102
+ }
103
+ /* Fresh palettes: brighter hues; their tints are slightly warmer so selection still reads. */
104
+ :root[data-palette="sky"] {
105
+ --palette-hue: 200;
106
+ --palette-brand-saturation: 92%;
107
+ --palette-brand-lightness: 34%;
108
+ --palette-dark-brand-saturation: 70%;
109
+ --palette-dark-brand-lightness: 68%;
110
+ }
111
+ :root[data-palette="peach"] {
112
+ --palette-hue: 12;
113
+ --palette-brand-saturation: 78%;
114
+ --palette-brand-lightness: 40%;
115
+ --palette-tint-saturation: 90%;
116
+ --palette-dark-brand-saturation: 76%;
117
+ --palette-dark-brand-lightness: 72%;
118
+ }
119
+ :root[data-palette="sunny"] {
120
+ --palette-hue: 38;
121
+ --palette-brand-saturation: 92%;
122
+ --palette-brand-lightness: 30%;
123
+ --palette-tint-saturation: 92%;
124
+ --palette-tint-lightness: 93.5%;
125
+ --palette-dark-brand-saturation: 82%;
126
+ --palette-dark-brand-lightness: 64%;
127
+ }
128
+ :root[data-palette="mint"] {
129
+ --palette-hue: 162;
130
+ --palette-brand-saturation: 76%;
131
+ --palette-brand-lightness: 27%;
132
+ --palette-tint-saturation: 64%;
133
+ --palette-tint-lightness: 94%;
134
+ --palette-dark-brand-saturation: 56%;
135
+ --palette-dark-brand-lightness: 62%;
136
+ }
137
+ /* Calm palettes. */
138
+ :root[data-palette="forest"] {
139
+ --palette-hue: 158;
140
+ --palette-brand-saturation: 44%;
141
+ --palette-brand-lightness: 32%;
142
+ --palette-tint-saturation: 38%;
143
+ --palette-tint-lightness: 94.5%;
144
+ --palette-dark-brand-saturation: 40%;
145
+ --palette-dark-brand-lightness: 66%;
146
+ --palette-dark-tint-saturation: 24%;
147
+ }
148
+ :root[data-palette="ocean"] {
149
+ --palette-hue: 214;
150
+ }
151
+ :root[data-palette="plum"] {
152
+ --palette-hue: 274;
153
+ --palette-brand-saturation: 36%;
154
+ --palette-brand-lightness: 44%;
155
+ --palette-tint-saturation: 48%;
156
+ --palette-dark-brand-saturation: 44%;
157
+ --palette-dark-brand-lightness: 76%;
158
+ --palette-dark-tint-saturation: 24%;
159
+ }
160
+ :root[data-palette="graphite"] {
161
+ --palette-hue: 0;
162
+ --palette-surface-chroma: 0%;
163
+ --palette-dark-surface-chroma: 0%;
164
+ --palette-ink-chroma: 0%;
165
+ --palette-brand-saturation: 0%;
166
+ --palette-brand-lightness: 24%;
167
+ --palette-tint-saturation: 0%;
168
+ --palette-tint-lightness: 93%;
169
+ --palette-dark-brand-saturation: 0%;
170
+ --palette-dark-brand-lightness: 86%;
171
+ --palette-dark-tint-saturation: 0%;
172
+ --palette-dark-tint-lightness: 20%;
173
+ }
174
+ .dark {
175
+ --surface-chroma: var(--palette-dark-surface-chroma);
176
+ --background: var(--palette-hue) var(--surface-chroma) 5%;
177
+ --foreground: var(--palette-hue) var(--surface-chroma) 94.5%;
178
+ --card: var(--palette-hue) var(--surface-chroma) 8.6%;
179
+ --popover: var(--palette-hue) var(--surface-chroma) 10.5%;
180
+ --primary: var(--palette-hue) var(--palette-dark-brand-saturation) var(--palette-dark-brand-lightness);
181
+ --primary-foreground: var(--palette-hue) 40% 9%;
182
+ --primary-action: var(--palette-hue) var(--palette-dark-tint-saturation) var(--palette-dark-tint-lightness);
183
+ --primary-action-foreground: var(--primary);
184
+ --primary-action-border: var(--palette-hue) var(--palette-dark-tint-saturation) 34%;
185
+ --secondary: var(--palette-hue) var(--surface-chroma) 12.2%;
186
+ --secondary-foreground: var(--foreground);
187
+ --muted-foreground: var(--palette-hue) var(--surface-chroma) 64%;
188
+ --accent: var(--palette-hue) var(--surface-chroma) 15.5%;
189
+ --accent-foreground: var(--foreground);
190
+ --border: var(--palette-hue) var(--surface-chroma) 16%;
191
+ --border-strong: var(--palette-hue) var(--surface-chroma) 22%;
192
+ --input: var(--palette-hue) var(--surface-chroma) 44%;
193
+ --sidebar: var(--card);
194
+ --sidebar-foreground: var(--palette-hue) var(--surface-chroma) 76%;
195
+ --im-chat-bg: var(--palette-hue) var(--surface-chroma) 6.6%;
196
+ --im-line: var(--border);
197
+ --im-shadow: 0 0% 0%;
198
+ --im-bubble-in: var(--secondary);
199
+ --im-bubble-out: var(--primary-action);
200
+ --im-row-hover: var(--palette-hue) var(--surface-chroma) 12%;
201
+ --destructive: 0 62% 65%;
202
+ --destructive-foreground: 0 0% 10%;
203
+ --success: 145 52% 64%;
204
+ --success-foreground: 0 0% 10%;
205
+ --info: 217 90% 70%;
206
+ --info-foreground: 0 0% 10%;
207
+ --warning: 38 80% 65%;
208
+ --warning-foreground: 0 0% 10%;
209
+ --chart-1: 217 80% 68%;
210
+ --chart-2: 38 80% 62%;
211
+ --chart-3: 160 55% 56%;
212
+ --chart-4: 330 65% 68%;
213
+ --chart-5: 262 70% 76%;
214
+ --chart-6: 12 70% 68%;
215
+ --chart-7: 188 65% 58%;
216
+ --chart-8: 220 10% 68%;
217
+ --chart-other: 220 6% 50%;
218
+ color-scheme: dark;
219
+ }
220
+ }
221
+
222
+ /* Base tier: type, radii, control sizes, spacing, shadows, motion. */
223
+ @layer base {
224
+ /*
225
+ * Base tier (light and dark alike): type, radii, control sizes, spacing.
226
+ * Radii 6 / 10 / 14 / 18 / 22 px; every button, input and select uses one of three heights
227
+ * (32 / 36 / 40 px) on pointer screens, and at least 44 px on touch-sized layouts.
228
+ */
229
+ :root {
230
+ --console-font-sans: 'Inter', 'MiSans', 'SF Pro Text', -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
231
+ --console-font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', ui-monospace, Menlo, Consolas, 'Noto Sans Mono CJK SC', monospace;
232
+ --console-text-label: 0.8125rem;
233
+ --console-text-caption: var(--console-text-label);
234
+ --console-text-code: 0.8125rem;
235
+ --console-text-body-sm: 0.8125rem;
236
+ --console-text-title-compact: 1.25rem;
237
+ --console-text-section-sm: 0.9375rem;
238
+ --console-line-code: 1.25rem;
239
+ --console-leading-title: 1.25;
240
+ --console-leading-section: 1.4;
241
+ --console-leading-body: 1.6;
242
+ --console-leading-label: 1.45;
243
+ --console-leading-code: 1.6;
244
+ --console-border-width: 1px;
245
+ --console-focus-width: 2px;
246
+ --console-text-body: 0.875rem;
247
+ --console-text-section: 1rem;
248
+ --console-text-title: 1.375rem;
249
+ --console-control-height-sm: 2rem;
250
+ --console-control-height: 2.25rem;
251
+ --console-control-height-lg: 2.5rem;
252
+ --console-touch-target: 2.75rem;
253
+ --console-radius-sm: 0.375rem;
254
+ --console-radius-md: 0.625rem;
255
+ --console-radius-lg: 0.875rem;
256
+ --console-radius-xl: 1.125rem;
257
+ --console-radius-2xl: 1.375rem;
258
+ --console-control-radius: var(--console-radius-md);
259
+ --console-space-page-x: 1.5rem;
260
+ --console-space-page-y: 2rem;
261
+ --console-space-section: 1.25rem;
262
+ --console-space-stack: 0.75rem;
263
+ --console-space-card: 1.25rem;
264
+ --console-space-card-sm: 1rem;
265
+ /* Content column: 1440px wide at most, centered on the canvas. */
266
+ --console-content-max: 90rem;
267
+
268
+ /* Semantic surfaces derived from the color tokens (theme-tokens.css). */
269
+ --console-surface-raised: hsl(var(--card));
270
+ --console-surface-muted: hsl(var(--secondary));
271
+ --console-surface-inset: hsl(var(--secondary));
272
+ --console-surface-hover: hsl(var(--foreground) / 0.045);
273
+ --console-surface-active: hsl(var(--foreground) / 0.08);
274
+ --console-border-subtle: hsl(var(--border) / 0.7);
275
+ --console-border-default: hsl(var(--border));
276
+ --console-border-strong: hsl(var(--border-strong));
277
+
278
+ /* Shadows: a hairline ring plus a short, soft drop. Cards carry no border of their own. */
279
+ --console-shadow-color: 222 30% 12%;
280
+ --console-shadow-ring: 0 0 0 1px hsl(var(--console-shadow-color) / 0.045);
281
+ --console-shadow-xs: 0 1px 2px hsl(var(--console-shadow-color) / 0.05);
282
+ --console-shadow-sm: 0 1px 2px hsl(var(--console-shadow-color) / 0.06), var(--console-shadow-ring);
283
+ --console-shadow-md: 0 6px 16px -4px hsl(var(--console-shadow-color) / 0.1), 0 0 0 1px hsl(var(--console-shadow-color) / 0.05);
284
+ --console-shadow-lg: 0 24px 48px -12px hsl(var(--console-shadow-color) / 0.18), 0 0 0 1px hsl(var(--console-shadow-color) / 0.06);
285
+ --console-shadow-xl: var(--console-shadow-lg);
286
+ --console-shadow-hover: var(--console-shadow-md);
287
+ --console-shadow-button: none;
288
+ --console-shadow-panel: 0 1px 2px hsl(var(--console-shadow-color) / 0.04), 0 8px 24px -12px hsl(var(--console-shadow-color) / 0.08);
289
+
290
+ /* Motion: page enter 200ms; the curve settles quickly without overshoot. */
291
+ --console-ease-out: cubic-bezier(0.25, 1, 0.5, 1);
292
+ --console-duration-page: 200ms;
293
+ --console-duration-fast: 150ms;
294
+ }
295
+
296
+ .dark {
297
+ --console-surface-hover: hsl(0 0% 100% / 0.05);
298
+ --console-surface-active: hsl(0 0% 100% / 0.09);
299
+ --console-shadow-color: 0 0% 0%;
300
+ --console-shadow-ring: 0 0 0 1px hsl(0 0% 100% / 0.05);
301
+ --console-shadow-xs: 0 1px 2px hsl(0 0% 0% / 0.4);
302
+ --console-shadow-sm: 0 1px 2px hsl(0 0% 0% / 0.4), var(--console-shadow-ring);
303
+ --console-shadow-md: 0 6px 16px -4px hsl(0 0% 0% / 0.5), 0 0 0 1px hsl(0 0% 100% / 0.06);
304
+ --console-shadow-lg: 0 24px 48px -12px hsl(0 0% 0% / 0.7), 0 0 0 1px hsl(0 0% 100% / 0.08);
305
+ --console-shadow-panel: 0 0 0 1px hsl(0 0% 100% / 0.06);
306
+ }
307
+
308
+ @media (max-width: 767px) {
309
+ :root {
310
+ --console-space-page-x: 1rem;
311
+ --console-space-page-y: 1.25rem;
312
+ --console-space-section: 0.875rem;
313
+ --console-space-card: 1rem;
314
+ /* Touch-sized controls on phones. */
315
+ --console-control-height-sm: 2.75rem;
316
+ --console-control-height: 2.75rem;
317
+ --console-control-height-lg: 2.75rem;
318
+ }
319
+ }
320
+
321
+ @media (min-width: 768px) {
322
+ :root {
323
+ --console-text-label: 0.8125rem; --console-text-code: 0.8125rem;
324
+ --console-text-title: 1.375rem; --console-text-title-compact: 1.25rem;
325
+ }
326
+ }
327
+ @media (min-width: 768px) and (max-width: 1199px) {
328
+ :root {
329
+ --console-space-page-x: 1.25rem;
330
+ --console-space-page-y: 1.5rem;
331
+ }
332
+ }
333
+
334
+ @media (min-width: 1600px) {
335
+ :root {
336
+ --console-space-page-x: 1.5rem;
337
+ --console-space-page-y: 2rem;
338
+ --console-space-section: 1.5rem;
339
+ }
340
+ }
341
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Published version of `@zhin.js/console-ui`. The build (`scripts/build.mjs`) rewrites the emitted
3
+ * `dist/version.js` with the `version` from package.json; this source value is only seen when the
4
+ * package is consumed from source (the `development` export condition).
5
+ */
6
+ export declare const CONSOLE_UI_VERSION: string;
@@ -0,0 +1,2 @@
1
+ /** Published version of @zhin.js/console-ui (written by scripts/build.mjs). */
2
+ export const CONSOLE_UI_VERSION = "1.0.0";
package/package.json CHANGED
@@ -1,6 +1,76 @@
1
1
  {
2
2
  "name": "@zhin.js/console-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "Zhin Console component library: shared React components, page shell and design tokens for the Console and plugin pages, with precompiled CSS (ADR 0063)",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "sideEffects": [
9
+ "*.css"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ },
16
+ "./cn": {
17
+ "types": "./dist/cn.d.ts",
18
+ "import": "./dist/cn.js"
19
+ },
20
+ "./styles.css": "./dist/styles.css",
21
+ "./tokens.css": "./dist/tokens.css",
22
+ "./exports.json": "./dist/exports.json",
23
+ "./package.json": "./package.json"
24
+ },
25
+ "dependencies": {
26
+ "class-variance-authority": "^0.7.1",
27
+ "clsx": "^2.1.1",
28
+ "lucide-react": "^1.16.0",
29
+ "radix-ui": "^1.4.3",
30
+ "tailwind-merge": "^3.6.0"
31
+ },
32
+ "peerDependencies": {
33
+ "react": ">=18",
34
+ "react-dom": ">=18"
35
+ },
36
+ "devDependencies": {
37
+ "@playwright/test": "1.62.1",
38
+ "@types/react": "^19.2.18",
39
+ "@types/react-dom": "^19.2.4",
40
+ "esbuild": "^0.28.1",
41
+ "react": "^19.2.8",
42
+ "react-dom": "^19.2.8",
43
+ "rimraf": "^6.1.4",
44
+ "tailwindcss": "4.3.3",
45
+ "typescript": "^6.0.3"
46
+ },
47
+ "files": [
48
+ "dist",
49
+ "README.md",
50
+ "CHANGELOG.md"
51
+ ],
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://github.com/zhinjs/zhin.git",
55
+ "directory": "packages/console/ui"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public",
59
+ "registry": "https://registry.npmjs.org"
60
+ },
61
+ "license": "MIT",
62
+ "author": {
63
+ "name": "lc-cn",
64
+ "email": "admin@liucl.cn",
65
+ "url": "https://github.com/lc-cn"
66
+ },
67
+ "engines": {
68
+ "node": ">=22.19.0"
69
+ },
70
+ "scripts": {
71
+ "build": "node scripts/build.mjs",
72
+ "clean": "rimraf dist",
73
+ "test": "vitest run --root ../../.. packages/console/ui/tests",
74
+ "test:visual": "playwright test --config visual/playwright.config.ts"
75
+ }
6
76
  }