@stealthscale/component-screen 0.2.1 → 0.2.3

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 (44) hide show
  1. package/dist/cyclonedx/bom.json +1 -1
  2. package/dist/index.d.ts +3 -3
  3. package/dist/index.js +1 -8216
  4. package/dist/pages/action-bar/action-bar.js +471 -0
  5. package/dist/pages/action-bar/action-bar.props.js +3 -0
  6. package/dist/pages/app-shell/app-shell.js +4899 -0
  7. package/dist/pages/app-shell/app-shell.props.js +3 -0
  8. package/dist/pages/floating-panel/floating-panel.js +995 -0
  9. package/dist/pages/floating-panel/floating-panel.props.js +3 -0
  10. package/dist/pages/locale-switcher/locale-switcher.js +180 -0
  11. package/dist/pages/locale-switcher/locale-switcher.props.js +3 -0
  12. package/dist/pages/page/page.js +2308 -0
  13. package/dist/pages/page/page.props.js +3 -0
  14. package/dist/pages/pages.json +123 -0
  15. package/dist/pages/section/section.js +1241 -0
  16. package/dist/pages/section/section.props.js +3 -0
  17. package/dist/pages/sidebar/sidebar.js +1743 -0
  18. package/dist/pages/sidebar/sidebar.props.js +3 -0
  19. package/dist/pages/splitter/splitter.js +1563 -0
  20. package/dist/pages/splitter/splitter.props.js +3 -0
  21. package/dist/pages/switcher/switcher.js +900 -0
  22. package/dist/pages/switcher/switcher.props.js +3 -0
  23. package/dist/pages/theme-switcher/theme-switcher.js +180 -0
  24. package/dist/pages/theme-switcher/theme-switcher.props.js +3 -0
  25. package/dist/pages/toolbar/toolbar.js +1045 -0
  26. package/dist/pages/toolbar/toolbar.props.js +3 -0
  27. package/dist/{recipe-sZAQY6Kq.js → recipes-Cmy1leBm.js} +312 -30
  28. package/dist/shared-DxlFabHA.js +9547 -0
  29. package/dist/shell.js +1 -165
  30. package/dist/theme.js +3 -4
  31. package/locales/en/specimen/action-bar.json +46 -0
  32. package/locales/en/specimen/app-shell.json +288 -0
  33. package/locales/en/specimen/floating-panel.json +70 -0
  34. package/locales/en/specimen/locale-switcher.json +15 -0
  35. package/locales/en/specimen/page.json +198 -0
  36. package/locales/en/specimen/section.json +91 -0
  37. package/locales/en/specimen/sidebar.json +87 -0
  38. package/locales/en/specimen/splitter.json +93 -0
  39. package/locales/en/specimen/switcher.json +61 -0
  40. package/locales/en/specimen/theme-switcher.json +15 -0
  41. package/locales/en/specimen/toolbar.json +80 -0
  42. package/package.json +25 -24
  43. package/dist/recipe-DRMsitrw.js +0 -283
  44. package/dist/root-qEh4u7y5.js +0 -1182
@@ -0,0 +1,2308 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { u as recipe } from "../../recipes-Cmy1leBm.js";
3
+ import { $ as Sidebar, J as When, Q as TabList, X as Title, Y as Toolbar, Z as Tab, at as Leading, c as Root$1, ct as Description, dt as Body, et as Root, ft as Banner, ht as Action, it as Meta, lt as Breadcrumbs, mt as Actions, nt as Palette, ot as Header, pt as Aside, qt as Item, rt as Nav, st as Footer, tt as Picker, u as Group$1, ut as Trail } from "../../shared-DxlFabHA.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import { Button, IconButton } from "@stealthscale/component-actions";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { useId, useState } from "react";
8
+ import { Portal } from "@stealthscale/component-primitives";
9
+ import { Menu } from "@stealthscale/component-disclosure";
10
+ import { Link, NavList } from "@stealthscale/component-navigation";
11
+ import { Badge, Status } from "@stealthscale/component-data";
12
+ import { Switch } from "@stealthscale/component-forms";
13
+ import { Stack } from "@stealthscale/component-layout";
14
+ import { Room, Screen, scenesOf, specimen, useWords } from "@stealthscale/specimen";
15
+ import { ArrowLeftIcon, ChevronDownIcon, ChevronRightIcon, ChevronsUpDownIcon, CreditCardIcon, EllipsisIcon, FilterIcon, GitBranchIcon, LayoutGridIcon, ListIcon, PaletteIcon, PlusIcon, RocketIcon, RotateCcwIcon, RotateCwIcon, ServerCrashIcon, SettingsIcon, UsersIcon } from "lucide-react";
16
+ import { Heading, Icon, Text } from "@stealthscale/component-typography";
17
+ import { EmptyState, Skeleton, SkeletonText } from "@stealthscale/component-feedback";
18
+ import { DataList } from "@stealthscale/component-collections";
19
+ //#region src/page/examples/deployment.example.tsx
20
+ var deployment_example_exports = /* @__PURE__ */ __exportAll({
21
+ Deployment: () => Deployment,
22
+ source: () => source$10
23
+ });
24
+ function Deployment() {
25
+ const $ = c(66);
26
+ const { t } = useWords("page");
27
+ let t0;
28
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
29
+ t0 = /* @__PURE__ */ jsx(ArrowLeftIcon, { size: "1em" });
30
+ $[0] = t0;
31
+ } else t0 = $[0];
32
+ let t1;
33
+ if ($[1] !== t) {
34
+ t1 = t("deployment.parent");
35
+ $[1] = t;
36
+ $[2] = t1;
37
+ } else t1 = $[2];
38
+ let t2;
39
+ if ($[3] !== t1) {
40
+ t2 = /* @__PURE__ */ jsxs(Trail, {
41
+ href: "#deployments",
42
+ children: [t0, t1]
43
+ });
44
+ $[3] = t1;
45
+ $[4] = t2;
46
+ } else t2 = $[4];
47
+ let t3;
48
+ if ($[5] !== t) {
49
+ t3 = t("deployment.title");
50
+ $[5] = t;
51
+ $[6] = t3;
52
+ } else t3 = $[6];
53
+ let t4;
54
+ if ($[7] !== t3) {
55
+ t4 = /* @__PURE__ */ jsx(Title, {
56
+ as: "h3",
57
+ children: t3
58
+ });
59
+ $[7] = t3;
60
+ $[8] = t4;
61
+ } else t4 = $[8];
62
+ let t5;
63
+ if ($[9] !== t) {
64
+ t5 = t("deployment.public");
65
+ $[9] = t;
66
+ $[10] = t5;
67
+ } else t5 = $[10];
68
+ let t6;
69
+ if ($[11] !== t5) {
70
+ t6 = /* @__PURE__ */ jsx(Badge, {
71
+ palette: "neutral",
72
+ size: "sm",
73
+ children: t5
74
+ });
75
+ $[11] = t5;
76
+ $[12] = t6;
77
+ } else t6 = $[12];
78
+ let t7;
79
+ if ($[13] !== t) {
80
+ t7 = t("deployment.template");
81
+ $[13] = t;
82
+ $[14] = t7;
83
+ } else t7 = $[14];
84
+ let t8;
85
+ if ($[15] !== t7) {
86
+ t8 = /* @__PURE__ */ jsx(Badge, {
87
+ palette: "neutral",
88
+ size: "sm",
89
+ variant: "outline",
90
+ children: t7
91
+ });
92
+ $[15] = t7;
93
+ $[16] = t8;
94
+ } else t8 = $[16];
95
+ let t9;
96
+ if ($[17] !== t6 || $[18] !== t8) {
97
+ t9 = /* @__PURE__ */ jsxs(Meta, { children: [t6, t8] });
98
+ $[17] = t6;
99
+ $[18] = t8;
100
+ $[19] = t9;
101
+ } else t9 = $[19];
102
+ let t10;
103
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
104
+ t10 = /* @__PURE__ */ jsx(GitBranchIcon, { size: "1em" });
105
+ $[20] = t10;
106
+ } else t10 = $[20];
107
+ let t11;
108
+ if ($[21] !== t) {
109
+ t11 = t("deployment.branch");
110
+ $[21] = t;
111
+ $[22] = t11;
112
+ } else t11 = $[22];
113
+ let t12;
114
+ if ($[23] !== t11) {
115
+ t12 = /* @__PURE__ */ jsxs(Stack, {
116
+ as: "span",
117
+ direction: "row",
118
+ gap: "xs",
119
+ children: [t10, t11]
120
+ });
121
+ $[23] = t11;
122
+ $[24] = t12;
123
+ } else t12 = $[24];
124
+ let t13;
125
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
126
+ t13 = /* @__PURE__ */ jsx("span", {
127
+ "aria-hidden": true,
128
+ children: "•"
129
+ });
130
+ $[25] = t13;
131
+ } else t13 = $[25];
132
+ let t14;
133
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
134
+ t14 = /* @__PURE__ */ jsx(Status.Indicator, {});
135
+ $[26] = t14;
136
+ } else t14 = $[26];
137
+ let t15;
138
+ if ($[27] !== t) {
139
+ t15 = t("deployment.ready");
140
+ $[27] = t;
141
+ $[28] = t15;
142
+ } else t15 = $[28];
143
+ let t16;
144
+ if ($[29] !== t15) {
145
+ t16 = /* @__PURE__ */ jsxs(Status.Root, {
146
+ palette: "success",
147
+ size: "inherit",
148
+ children: [t14, t15]
149
+ });
150
+ $[29] = t15;
151
+ $[30] = t16;
152
+ } else t16 = $[30];
153
+ let t17;
154
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
155
+ t17 = /* @__PURE__ */ jsx("span", {
156
+ "aria-hidden": true,
157
+ children: "•"
158
+ });
159
+ $[31] = t17;
160
+ } else t17 = $[31];
161
+ let t18;
162
+ if ($[32] !== t) {
163
+ t18 = t("deployment.deployed");
164
+ $[32] = t;
165
+ $[33] = t18;
166
+ } else t18 = $[33];
167
+ let t19;
168
+ if ($[34] !== t18) {
169
+ t19 = /* @__PURE__ */ jsx("span", { children: t18 });
170
+ $[34] = t18;
171
+ $[35] = t19;
172
+ } else t19 = $[35];
173
+ let t20;
174
+ if ($[36] !== t12 || $[37] !== t16 || $[38] !== t19) {
175
+ t20 = /* @__PURE__ */ jsx(Description, { children: /* @__PURE__ */ jsxs(Stack, {
176
+ as: "span",
177
+ direction: "row",
178
+ gap: "md",
179
+ wrap: true,
180
+ children: [
181
+ t12,
182
+ t13,
183
+ t16,
184
+ t17,
185
+ t19
186
+ ]
187
+ }) });
188
+ $[36] = t12;
189
+ $[37] = t16;
190
+ $[38] = t19;
191
+ $[39] = t20;
192
+ } else t20 = $[39];
193
+ let t21;
194
+ if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
195
+ t21 = /* @__PURE__ */ jsx(RotateCcwIcon, { size: "1em" });
196
+ $[40] = t21;
197
+ } else t21 = $[40];
198
+ let t22;
199
+ if ($[41] !== t) {
200
+ t22 = t("deployment.rollBack");
201
+ $[41] = t;
202
+ $[42] = t22;
203
+ } else t22 = $[42];
204
+ let t23;
205
+ if ($[43] !== t22) {
206
+ t23 = /* @__PURE__ */ jsx(Action, {
207
+ icon: t21,
208
+ children: t22
209
+ });
210
+ $[43] = t22;
211
+ $[44] = t23;
212
+ } else t23 = $[44];
213
+ let t24;
214
+ if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
215
+ t24 = /* @__PURE__ */ jsx(RocketIcon, { size: "1em" });
216
+ $[45] = t24;
217
+ } else t24 = $[45];
218
+ let t25;
219
+ if ($[46] !== t) {
220
+ t25 = t("deployment.deploy");
221
+ $[46] = t;
222
+ $[47] = t25;
223
+ } else t25 = $[47];
224
+ let t26;
225
+ if ($[48] !== t25) {
226
+ t26 = /* @__PURE__ */ jsx(Action, {
227
+ icon: t24,
228
+ primary: true,
229
+ children: t25
230
+ });
231
+ $[48] = t25;
232
+ $[49] = t26;
233
+ } else t26 = $[49];
234
+ let t27;
235
+ if ($[50] !== t23 || $[51] !== t26) {
236
+ t27 = /* @__PURE__ */ jsxs(Actions, { children: [t23, t26] });
237
+ $[50] = t23;
238
+ $[51] = t26;
239
+ $[52] = t27;
240
+ } else t27 = $[52];
241
+ let t28;
242
+ if ($[53] !== t2 || $[54] !== t20 || $[55] !== t27 || $[56] !== t4 || $[57] !== t9) {
243
+ t28 = /* @__PURE__ */ jsxs(Header, { children: [
244
+ t2,
245
+ t4,
246
+ t9,
247
+ t20,
248
+ t27
249
+ ] });
250
+ $[53] = t2;
251
+ $[54] = t20;
252
+ $[55] = t27;
253
+ $[56] = t4;
254
+ $[57] = t9;
255
+ $[58] = t28;
256
+ } else t28 = $[58];
257
+ let t29;
258
+ if ($[59] !== t) {
259
+ t29 = t("deployment.body");
260
+ $[59] = t;
261
+ $[60] = t29;
262
+ } else t29 = $[60];
263
+ let t30;
264
+ if ($[61] !== t29) {
265
+ t30 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Text, {
266
+ size: "sm",
267
+ tone: "muted",
268
+ children: t29
269
+ }) });
270
+ $[61] = t29;
271
+ $[62] = t30;
272
+ } else t30 = $[62];
273
+ let t31;
274
+ if ($[63] !== t28 || $[64] !== t30) {
275
+ t31 = /* @__PURE__ */ jsxs(Root, { children: [t28, t30] });
276
+ $[63] = t28;
277
+ $[64] = t30;
278
+ $[65] = t31;
279
+ } else t31 = $[65];
280
+ return t31;
281
+ }
282
+ const source$10 = "import { type ReactElement } from \"react\";\n\nimport { ArrowLeftIcon, GitBranchIcon, RocketIcon, RotateCcwIcon } from \"lucide-react\";\n\nimport { Badge, Status } from \"@stealthscale/component-data\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nexport function Deployment(): ReactElement {\n const { t } = useWords(\"page\");\n\n return (\n <Page.Root>\n <Page.Header>\n <Page.Trail href=\"#deployments\">\n <ArrowLeftIcon size=\"1em\" />\n {t(\"deployment.parent\")}\n </Page.Trail>\n <Page.Title as=\"h3\">{t(\"deployment.title\")}</Page.Title>\n <Page.Meta>\n <Badge palette=\"neutral\" size=\"sm\">\n {t(\"deployment.public\")}\n </Badge>\n <Badge palette=\"neutral\" size=\"sm\" variant=\"outline\">\n {t(\"deployment.template\")}\n </Badge>\n </Page.Meta>\n <Page.Description>\n <Stack as=\"span\" direction=\"row\" gap=\"md\" wrap>\n <Stack as=\"span\" direction=\"row\" gap=\"xs\">\n <GitBranchIcon size=\"1em\" />\n {t(\"deployment.branch\")}\n </Stack>\n <span aria-hidden>•</span>\n <Status.Root palette=\"success\" size=\"inherit\">\n <Status.Indicator />\n {t(\"deployment.ready\")}\n </Status.Root>\n <span aria-hidden>•</span>\n <span>{t(\"deployment.deployed\")}</span>\n </Stack>\n </Page.Description>\n <Page.Actions>\n <Page.Action icon={<RotateCcwIcon size=\"1em\" />}>{t(\"deployment.rollBack\")}</Page.Action>\n <Page.Action icon={<RocketIcon size=\"1em\" />} primary>\n {t(\"deployment.deploy\")}\n </Page.Action>\n </Page.Actions>\n </Page.Header>\n <Page.Body>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"deployment.body\")}\n </Text>\n </Page.Body>\n </Page.Root>\n );\n}\n";
283
+ //#endregion
284
+ //#region src/page/examples/failed.example.tsx
285
+ var failed_example_exports = /* @__PURE__ */ __exportAll({
286
+ Failed: () => Failed,
287
+ source: () => source$9
288
+ });
289
+ function Failed() {
290
+ const $ = c(25);
291
+ const { t } = useWords("page");
292
+ let t0;
293
+ if ($[0] !== t) {
294
+ t0 = t("approvals.title");
295
+ $[0] = t;
296
+ $[1] = t0;
297
+ } else t0 = $[1];
298
+ let t1;
299
+ if ($[2] !== t0) {
300
+ t1 = /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(Title, {
301
+ as: "h3",
302
+ children: t0
303
+ }) });
304
+ $[2] = t0;
305
+ $[3] = t1;
306
+ } else t1 = $[3];
307
+ let t2;
308
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
309
+ t2 = /* @__PURE__ */ jsx(EmptyState.Indicator, { children: /* @__PURE__ */ jsx(ServerCrashIcon, {}) });
310
+ $[4] = t2;
311
+ } else t2 = $[4];
312
+ let t3;
313
+ if ($[5] !== t) {
314
+ t3 = t("approvals.heading");
315
+ $[5] = t;
316
+ $[6] = t3;
317
+ } else t3 = $[6];
318
+ let t4;
319
+ if ($[7] !== t3) {
320
+ t4 = /* @__PURE__ */ jsx(EmptyState.Title, {
321
+ as: "h4",
322
+ children: t3
323
+ });
324
+ $[7] = t3;
325
+ $[8] = t4;
326
+ } else t4 = $[8];
327
+ let t5;
328
+ if ($[9] !== t) {
329
+ t5 = t("approvals.about");
330
+ $[9] = t;
331
+ $[10] = t5;
332
+ } else t5 = $[10];
333
+ let t6;
334
+ if ($[11] !== t5) {
335
+ t6 = /* @__PURE__ */ jsx(EmptyState.Description, { children: t5 });
336
+ $[11] = t5;
337
+ $[12] = t6;
338
+ } else t6 = $[12];
339
+ let t7;
340
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
341
+ t7 = /* @__PURE__ */ jsx(RotateCwIcon, { size: "1em" });
342
+ $[13] = t7;
343
+ } else t7 = $[13];
344
+ let t8;
345
+ if ($[14] !== t) {
346
+ t8 = t("approvals.retry");
347
+ $[14] = t;
348
+ $[15] = t8;
349
+ } else t8 = $[15];
350
+ let t9;
351
+ if ($[16] !== t8) {
352
+ t9 = /* @__PURE__ */ jsxs(Button, {
353
+ size: "sm",
354
+ variant: "outline",
355
+ children: [t7, t8]
356
+ });
357
+ $[16] = t8;
358
+ $[17] = t9;
359
+ } else t9 = $[17];
360
+ let t10;
361
+ if ($[18] !== t4 || $[19] !== t6 || $[20] !== t9) {
362
+ t10 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(EmptyState.Root, { children: /* @__PURE__ */ jsxs(EmptyState.Content, { children: [
363
+ t2,
364
+ t4,
365
+ t6,
366
+ t9
367
+ ] }) }) });
368
+ $[18] = t4;
369
+ $[19] = t6;
370
+ $[20] = t9;
371
+ $[21] = t10;
372
+ } else t10 = $[21];
373
+ let t11;
374
+ if ($[22] !== t1 || $[23] !== t10) {
375
+ t11 = /* @__PURE__ */ jsxs(Root, {
376
+ size: "sm",
377
+ children: [t1, t10]
378
+ });
379
+ $[22] = t1;
380
+ $[23] = t10;
381
+ $[24] = t11;
382
+ } else t11 = $[24];
383
+ return t11;
384
+ }
385
+ const source$9 = "import { type ReactElement } from \"react\";\n\nimport { RotateCwIcon, ServerCrashIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { EmptyState } from \"@stealthscale/component-feedback\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nexport function Failed(): ReactElement {\n const { t } = useWords(\"page\");\n\n return (\n <Page.Root size=\"sm\">\n <Page.Header>\n <Page.Title as=\"h3\">{t(\"approvals.title\")}</Page.Title>\n </Page.Header>\n <Page.Body>\n <EmptyState.Root>\n <EmptyState.Content>\n <EmptyState.Indicator>\n <ServerCrashIcon />\n </EmptyState.Indicator>\n <EmptyState.Title as=\"h4\">{t(\"approvals.heading\")}</EmptyState.Title>\n <EmptyState.Description>{t(\"approvals.about\")}</EmptyState.Description>\n <Button size=\"sm\" variant=\"outline\">\n <RotateCwIcon size=\"1em\" />\n {t(\"approvals.retry\")}\n </Button>\n </EmptyState.Content>\n </EmptyState.Root>\n </Page.Body>\n </Page.Root>\n );\n}\n";
386
+ //#endregion
387
+ //#region src/page/examples/incident.example.tsx
388
+ var incident_example_exports = /* @__PURE__ */ __exportAll({
389
+ Incident: () => Incident,
390
+ source: () => source$8
391
+ });
392
+ const EVENTS$1 = [
393
+ "detected",
394
+ "paged",
395
+ "scoped",
396
+ "queued",
397
+ "posted",
398
+ "slowed",
399
+ "asked",
400
+ "moved",
401
+ "recovered",
402
+ "drained",
403
+ "closed",
404
+ "reviewed",
405
+ "shared"
406
+ ];
407
+ const FACTS = [
408
+ "severity",
409
+ "owner",
410
+ "started",
411
+ "duration"
412
+ ];
413
+ function Incident(props) {
414
+ const $ = c(53);
415
+ const { t } = useWords("page");
416
+ const details = useId();
417
+ let t0;
418
+ if ($[0] !== t) {
419
+ t0 = t("incident.title");
420
+ $[0] = t;
421
+ $[1] = t0;
422
+ } else t0 = $[1];
423
+ let t1;
424
+ if ($[2] !== t0) {
425
+ t1 = /* @__PURE__ */ jsx(Title, {
426
+ as: "h3",
427
+ children: t0
428
+ });
429
+ $[2] = t0;
430
+ $[3] = t1;
431
+ } else t1 = $[3];
432
+ let t2;
433
+ if ($[4] !== t) {
434
+ t2 = t("incident.about");
435
+ $[4] = t;
436
+ $[5] = t2;
437
+ } else t2 = $[5];
438
+ let t3;
439
+ if ($[6] !== t2) {
440
+ t3 = /* @__PURE__ */ jsx(Description, { children: t2 });
441
+ $[6] = t2;
442
+ $[7] = t3;
443
+ } else t3 = $[7];
444
+ let t4;
445
+ if ($[8] !== t1 || $[9] !== t3) {
446
+ t4 = /* @__PURE__ */ jsxs(Header, { children: [t1, t3] });
447
+ $[8] = t1;
448
+ $[9] = t3;
449
+ $[10] = t4;
450
+ } else t4 = $[10];
451
+ let t5;
452
+ if ($[11] !== t) {
453
+ t5 = EVENTS$1.map((event) => /* @__PURE__ */ jsx(Text, {
454
+ size: "sm",
455
+ children: t(`incident.events.${event}`)
456
+ }, event));
457
+ $[11] = t;
458
+ $[12] = t5;
459
+ } else t5 = $[12];
460
+ let t6;
461
+ if ($[13] !== t) {
462
+ t6 = t("incident.runbook");
463
+ $[13] = t;
464
+ $[14] = t6;
465
+ } else t6 = $[14];
466
+ let t7;
467
+ if ($[15] !== t6) {
468
+ t7 = /* @__PURE__ */ jsx(Link, {
469
+ href: "#runbook",
470
+ children: t6
471
+ });
472
+ $[15] = t6;
473
+ $[16] = t7;
474
+ } else t7 = $[16];
475
+ let t8;
476
+ if ($[17] !== t5 || $[18] !== t7) {
477
+ t8 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsxs(Stack, {
478
+ gap: "sm",
479
+ children: [t5, t7]
480
+ }) });
481
+ $[17] = t5;
482
+ $[18] = t7;
483
+ $[19] = t8;
484
+ } else t8 = $[19];
485
+ let t9;
486
+ if ($[20] !== t) {
487
+ t9 = t("incident.details");
488
+ $[20] = t;
489
+ $[21] = t9;
490
+ } else t9 = $[21];
491
+ let t10;
492
+ if ($[22] !== details || $[23] !== t9) {
493
+ t10 = /* @__PURE__ */ jsx(Heading, {
494
+ as: "h4",
495
+ id: details,
496
+ size: "xs",
497
+ children: t9
498
+ });
499
+ $[22] = details;
500
+ $[23] = t9;
501
+ $[24] = t10;
502
+ } else t10 = $[24];
503
+ let t11;
504
+ if ($[25] !== t) {
505
+ t11 = t("incident.status");
506
+ $[25] = t;
507
+ $[26] = t11;
508
+ } else t11 = $[26];
509
+ let t12;
510
+ if ($[27] !== t11) {
511
+ t12 = /* @__PURE__ */ jsx(DataList.ItemLabel, { children: t11 });
512
+ $[27] = t11;
513
+ $[28] = t12;
514
+ } else t12 = $[28];
515
+ let t13;
516
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
517
+ t13 = /* @__PURE__ */ jsx(Status.Indicator, {});
518
+ $[29] = t13;
519
+ } else t13 = $[29];
520
+ let t14;
521
+ if ($[30] !== t) {
522
+ t14 = t("incident.resolved");
523
+ $[30] = t;
524
+ $[31] = t14;
525
+ } else t14 = $[31];
526
+ let t15;
527
+ if ($[32] !== t14) {
528
+ t15 = /* @__PURE__ */ jsx(DataList.ItemValue, { children: /* @__PURE__ */ jsxs(Status.Root, {
529
+ palette: "success",
530
+ size: "inherit",
531
+ children: [t13, t14]
532
+ }) });
533
+ $[32] = t14;
534
+ $[33] = t15;
535
+ } else t15 = $[33];
536
+ let t16;
537
+ if ($[34] !== t12 || $[35] !== t15) {
538
+ t16 = /* @__PURE__ */ jsxs(DataList.Item, { children: [t12, t15] });
539
+ $[34] = t12;
540
+ $[35] = t15;
541
+ $[36] = t16;
542
+ } else t16 = $[36];
543
+ let t17;
544
+ if ($[37] !== t) {
545
+ t17 = FACTS.map((fact) => /* @__PURE__ */ jsxs(DataList.Item, { children: [/* @__PURE__ */ jsx(DataList.ItemLabel, { children: t(`incident.facts.${fact}.label`) }), /* @__PURE__ */ jsx(DataList.ItemValue, { children: t(`incident.facts.${fact}.value`) })] }, fact));
546
+ $[37] = t;
547
+ $[38] = t17;
548
+ } else t17 = $[38];
549
+ let t18;
550
+ if ($[39] !== t16 || $[40] !== t17) {
551
+ t18 = /* @__PURE__ */ jsxs(DataList.Root, {
552
+ orientation: "horizontal",
553
+ size: "sm",
554
+ children: [t16, t17]
555
+ });
556
+ $[39] = t16;
557
+ $[40] = t17;
558
+ $[41] = t18;
559
+ } else t18 = $[41];
560
+ let t19;
561
+ if ($[42] !== t10 || $[43] !== t18) {
562
+ t19 = /* @__PURE__ */ jsxs(Stack, {
563
+ gap: "sm",
564
+ children: [t10, t18]
565
+ });
566
+ $[42] = t10;
567
+ $[43] = t18;
568
+ $[44] = t19;
569
+ } else t19 = $[44];
570
+ let t20;
571
+ if ($[45] !== details || $[46] !== t19) {
572
+ t20 = /* @__PURE__ */ jsx(Aside, {
573
+ "aria-labelledby": details,
574
+ sticky: true,
575
+ children: t19
576
+ });
577
+ $[45] = details;
578
+ $[46] = t19;
579
+ $[47] = t20;
580
+ } else t20 = $[47];
581
+ let t21;
582
+ if ($[48] !== props || $[49] !== t20 || $[50] !== t4 || $[51] !== t8) {
583
+ t21 = /* @__PURE__ */ jsxs(Root, {
584
+ ...props,
585
+ children: [
586
+ t4,
587
+ t8,
588
+ t20
589
+ ]
590
+ });
591
+ $[48] = props;
592
+ $[49] = t20;
593
+ $[50] = t4;
594
+ $[51] = t8;
595
+ $[52] = t21;
596
+ } else t21 = $[52];
597
+ return t21;
598
+ }
599
+ const source$8 = "import { type ReactElement, useId } from \"react\";\n\nimport { DataList } from \"@stealthscale/component-collections\";\nimport { Status } from \"@stealthscale/component-data\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { Link } from \"@stealthscale/component-navigation\";\nimport { Heading, Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nconst EVENTS = [\n \"detected\",\n \"paged\",\n \"scoped\",\n \"queued\",\n \"posted\",\n \"slowed\",\n \"asked\",\n \"moved\",\n \"recovered\",\n \"drained\",\n \"closed\",\n \"reviewed\",\n \"shared\",\n] as const;\n\nconst FACTS = [\"severity\", \"owner\", \"started\", \"duration\"] as const;\n\nexport function Incident(props: Page.RootProps): ReactElement {\n const { t } = useWords(\"page\");\n const details = useId();\n\n return (\n <Page.Root {...props}>\n <Page.Header>\n <Page.Title as=\"h3\">{t(\"incident.title\")}</Page.Title>\n <Page.Description>{t(\"incident.about\")}</Page.Description>\n </Page.Header>\n <Page.Body>\n <Stack gap=\"sm\">\n {EVENTS.map((event) => (\n <Text key={event} size=\"sm\">\n {t(`incident.events.${event}`)}\n </Text>\n ))}\n <Link href=\"#runbook\">{t(\"incident.runbook\")}</Link>\n </Stack>\n </Page.Body>\n <Page.Aside aria-labelledby={details} sticky>\n <Stack gap=\"sm\">\n <Heading as=\"h4\" id={details} size=\"xs\">\n {t(\"incident.details\")}\n </Heading>\n <DataList.Root orientation=\"horizontal\" size=\"sm\">\n <DataList.Item>\n <DataList.ItemLabel>{t(\"incident.status\")}</DataList.ItemLabel>\n <DataList.ItemValue>\n <Status.Root palette=\"success\" size=\"inherit\">\n <Status.Indicator />\n {t(\"incident.resolved\")}\n </Status.Root>\n </DataList.ItemValue>\n </DataList.Item>\n {FACTS.map((fact) => (\n <DataList.Item key={fact}>\n <DataList.ItemLabel>{t(`incident.facts.${fact}.label`)}</DataList.ItemLabel>\n <DataList.ItemValue>{t(`incident.facts.${fact}.value`)}</DataList.ItemValue>\n </DataList.Item>\n ))}\n </DataList.Root>\n </Stack>\n </Page.Aside>\n </Page.Root>\n );\n}\n";
600
+ //#endregion
601
+ //#region src/page/examples/loading.example.tsx
602
+ var loading_example_exports = /* @__PURE__ */ __exportAll({
603
+ Loading: () => Loading,
604
+ source: () => source$7
605
+ });
606
+ function Loading() {
607
+ const $ = c(19);
608
+ const { t } = useWords("page");
609
+ let t0;
610
+ if ($[0] !== t) {
611
+ t0 = t("pending.label");
612
+ $[0] = t;
613
+ $[1] = t0;
614
+ } else t0 = $[1];
615
+ let t1;
616
+ if ($[2] !== t) {
617
+ t1 = t("pending.title");
618
+ $[2] = t;
619
+ $[3] = t1;
620
+ } else t1 = $[3];
621
+ let t2;
622
+ if ($[4] !== t1) {
623
+ t2 = /* @__PURE__ */ jsx(Skeleton, {
624
+ as: "span",
625
+ children: /* @__PURE__ */ jsx("span", { children: t1 })
626
+ });
627
+ $[4] = t1;
628
+ $[5] = t2;
629
+ } else t2 = $[5];
630
+ let t3;
631
+ if ($[6] !== t0 || $[7] !== t2) {
632
+ t3 = /* @__PURE__ */ jsx(Title, {
633
+ "aria-label": t0,
634
+ as: "h3",
635
+ children: t2
636
+ });
637
+ $[6] = t0;
638
+ $[7] = t2;
639
+ $[8] = t3;
640
+ } else t3 = $[8];
641
+ let t4;
642
+ if ($[9] !== t) {
643
+ t4 = t("pending.about");
644
+ $[9] = t;
645
+ $[10] = t4;
646
+ } else t4 = $[10];
647
+ let t5;
648
+ if ($[11] !== t4) {
649
+ t5 = /* @__PURE__ */ jsx(Description, { children: /* @__PURE__ */ jsx(Skeleton, {
650
+ as: "span",
651
+ children: /* @__PURE__ */ jsx("span", { children: t4 })
652
+ }) });
653
+ $[11] = t4;
654
+ $[12] = t5;
655
+ } else t5 = $[12];
656
+ let t6;
657
+ if ($[13] !== t3 || $[14] !== t5) {
658
+ t6 = /* @__PURE__ */ jsxs(Header, { children: [t3, t5] });
659
+ $[13] = t3;
660
+ $[14] = t5;
661
+ $[15] = t6;
662
+ } else t6 = $[15];
663
+ let t7;
664
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
665
+ t7 = /* @__PURE__ */ jsx(Body, {
666
+ "aria-busy": "true",
667
+ children: /* @__PURE__ */ jsx(SkeletonText, { lines: 4 })
668
+ });
669
+ $[16] = t7;
670
+ } else t7 = $[16];
671
+ let t8;
672
+ if ($[17] !== t6) {
673
+ t8 = /* @__PURE__ */ jsxs(Root, {
674
+ size: "sm",
675
+ children: [t6, t7]
676
+ });
677
+ $[17] = t6;
678
+ $[18] = t8;
679
+ } else t8 = $[18];
680
+ return t8;
681
+ }
682
+ const source$7 = "import { type ReactElement } from \"react\";\n\nimport { Skeleton, SkeletonText } from \"@stealthscale/component-feedback\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nexport function Loading(): ReactElement {\n const { t } = useWords(\"page\");\n\n return (\n <Page.Root size=\"sm\">\n <Page.Header>\n <Page.Title aria-label={t(\"pending.label\")} as=\"h3\">\n <Skeleton as=\"span\">\n <span>{t(\"pending.title\")}</span>\n </Skeleton>\n </Page.Title>\n <Page.Description>\n <Skeleton as=\"span\">\n <span>{t(\"pending.about\")}</span>\n </Skeleton>\n </Page.Description>\n </Page.Header>\n <Page.Body aria-busy=\"true\">\n <SkeletonText lines={4} />\n </Page.Body>\n </Page.Root>\n );\n}\n";
683
+ //#endregion
684
+ //#region src/page/examples/measured.example.tsx
685
+ var measured_example_exports = /* @__PURE__ */ __exportAll({
686
+ Measured: () => Measured,
687
+ source: () => source$6
688
+ });
689
+ function Measured(props) {
690
+ const $ = c(24);
691
+ const { t } = useWords("page");
692
+ let t0;
693
+ if ($[0] !== t) {
694
+ t0 = t("measured.title");
695
+ $[0] = t;
696
+ $[1] = t0;
697
+ } else t0 = $[1];
698
+ let t1;
699
+ if ($[2] !== t0) {
700
+ t1 = /* @__PURE__ */ jsx(Title, {
701
+ as: "h3",
702
+ children: t0
703
+ });
704
+ $[2] = t0;
705
+ $[3] = t1;
706
+ } else t1 = $[3];
707
+ let t2;
708
+ if ($[4] !== t) {
709
+ t2 = t("measured.about");
710
+ $[4] = t;
711
+ $[5] = t2;
712
+ } else t2 = $[5];
713
+ let t3;
714
+ if ($[6] !== t2) {
715
+ t3 = /* @__PURE__ */ jsx(Description, { children: t2 });
716
+ $[6] = t2;
717
+ $[7] = t3;
718
+ } else t3 = $[7];
719
+ let t4;
720
+ if ($[8] !== t1 || $[9] !== t3) {
721
+ t4 = /* @__PURE__ */ jsxs(Header, { children: [t1, t3] });
722
+ $[8] = t1;
723
+ $[9] = t3;
724
+ $[10] = t4;
725
+ } else t4 = $[10];
726
+ let t5;
727
+ if ($[11] !== t) {
728
+ t5 = t("measured.body");
729
+ $[11] = t;
730
+ $[12] = t5;
731
+ } else t5 = $[12];
732
+ let t6;
733
+ if ($[13] !== t5) {
734
+ t6 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Text, {
735
+ size: "sm",
736
+ tone: "muted",
737
+ children: t5
738
+ }) });
739
+ $[13] = t5;
740
+ $[14] = t6;
741
+ } else t6 = $[14];
742
+ let t7;
743
+ if ($[15] !== t) {
744
+ t7 = t("measured.updated");
745
+ $[15] = t;
746
+ $[16] = t7;
747
+ } else t7 = $[16];
748
+ let t8;
749
+ if ($[17] !== t7) {
750
+ t8 = /* @__PURE__ */ jsx(Footer, { children: /* @__PURE__ */ jsx(Text, {
751
+ size: "sm",
752
+ tone: "muted",
753
+ children: t7
754
+ }) });
755
+ $[17] = t7;
756
+ $[18] = t8;
757
+ } else t8 = $[18];
758
+ let t9;
759
+ if ($[19] !== props || $[20] !== t4 || $[21] !== t6 || $[22] !== t8) {
760
+ t9 = /* @__PURE__ */ jsxs(Root, {
761
+ measure: "narrow",
762
+ size: "sm",
763
+ ...props,
764
+ children: [
765
+ t4,
766
+ t6,
767
+ t8
768
+ ]
769
+ });
770
+ $[19] = props;
771
+ $[20] = t4;
772
+ $[21] = t6;
773
+ $[22] = t8;
774
+ $[23] = t9;
775
+ } else t9 = $[23];
776
+ return t9;
777
+ }
778
+ const source$6 = "import { type ReactElement } from \"react\";\n\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nexport function Measured(props: Page.RootProps): ReactElement {\n const { t } = useWords(\"page\");\n\n return (\n <Page.Root measure=\"narrow\" size=\"sm\" {...props}>\n <Page.Header>\n <Page.Title as=\"h3\">{t(\"measured.title\")}</Page.Title>\n <Page.Description>{t(\"measured.about\")}</Page.Description>\n </Page.Header>\n <Page.Body>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"measured.body\")}\n </Text>\n </Page.Body>\n <Page.Footer>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"measured.updated\")}\n </Text>\n </Page.Footer>\n </Page.Root>\n );\n}\n";
779
+ //#endregion
780
+ //#region src/page/examples/notifications.example.tsx
781
+ var notifications_example_exports = /* @__PURE__ */ __exportAll({
782
+ Notifications: () => Notifications,
783
+ source: () => source$5
784
+ });
785
+ const EVENTS = [
786
+ "deployed",
787
+ "failed",
788
+ "invited",
789
+ "joined",
790
+ "renewed",
791
+ "billed",
792
+ "limited",
793
+ "expired"
794
+ ];
795
+ const CHANNELS = [
796
+ {
797
+ count: 8,
798
+ value: "email"
799
+ },
800
+ {
801
+ count: 3,
802
+ value: "push"
803
+ },
804
+ {
805
+ count: 2,
806
+ value: "digest"
807
+ }
808
+ ];
809
+ function Notifications() {
810
+ const $ = c(66);
811
+ const { t } = useWords("page");
812
+ const [channel, setChannel] = useState("email");
813
+ let T0;
814
+ let T1;
815
+ let T2;
816
+ let t0;
817
+ let t1;
818
+ let t2;
819
+ let t3;
820
+ let t4;
821
+ if ($[0] !== channel || $[1] !== t) {
822
+ const shown = CHANNELS.find((t5) => {
823
+ const { value } = t5;
824
+ return value === channel;
825
+ })?.count ?? 0;
826
+ T2 = Root;
827
+ t2 = "sm";
828
+ let t6;
829
+ if ($[10] !== t) {
830
+ t6 = t("notifications.title");
831
+ $[10] = t;
832
+ $[11] = t6;
833
+ } else t6 = $[11];
834
+ let t7;
835
+ if ($[12] !== t6) {
836
+ t7 = /* @__PURE__ */ jsx(Title, {
837
+ as: "h3",
838
+ children: t6
839
+ });
840
+ $[12] = t6;
841
+ $[13] = t7;
842
+ } else t7 = $[13];
843
+ let t8;
844
+ if ($[14] !== t) {
845
+ t8 = t("notifications.about");
846
+ $[14] = t;
847
+ $[15] = t8;
848
+ } else t8 = $[15];
849
+ let t9;
850
+ if ($[16] !== t8) {
851
+ t9 = /* @__PURE__ */ jsx(Description, { children: t8 });
852
+ $[16] = t8;
853
+ $[17] = t9;
854
+ } else t9 = $[17];
855
+ let t10;
856
+ if ($[18] !== t) {
857
+ t10 = t("notifications.reset");
858
+ $[18] = t;
859
+ $[19] = t10;
860
+ } else t10 = $[19];
861
+ let t11;
862
+ if ($[20] !== t10) {
863
+ t11 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Action, { children: t10 }) });
864
+ $[20] = t10;
865
+ $[21] = t11;
866
+ } else t11 = $[21];
867
+ if ($[22] !== t11 || $[23] !== t7 || $[24] !== t9) {
868
+ t3 = /* @__PURE__ */ jsxs(Header, {
869
+ sticky: true,
870
+ children: [
871
+ t7,
872
+ t9,
873
+ t11
874
+ ]
875
+ });
876
+ $[22] = t11;
877
+ $[23] = t7;
878
+ $[24] = t9;
879
+ $[25] = t3;
880
+ } else t3 = $[25];
881
+ let t12;
882
+ if ($[26] !== t) {
883
+ t12 = t("notifications.channels");
884
+ $[26] = t;
885
+ $[27] = t12;
886
+ } else t12 = $[27];
887
+ let t13;
888
+ if ($[28] !== t) {
889
+ t13 = t("notifications.channels");
890
+ $[28] = t;
891
+ $[29] = t13;
892
+ } else t13 = $[29];
893
+ let t14;
894
+ if ($[30] !== t) {
895
+ t14 = CHANNELS.map((t15) => {
896
+ const { value: value_0 } = t15;
897
+ return /* @__PURE__ */ jsx(Tab, {
898
+ value: value_0,
899
+ children: t(`notifications.${value_0}`)
900
+ }, value_0);
901
+ });
902
+ $[30] = t;
903
+ $[31] = t14;
904
+ } else t14 = $[31];
905
+ let t15;
906
+ if ($[32] !== channel || $[33] !== t13 || $[34] !== t14) {
907
+ t15 = /* @__PURE__ */ jsx(TabList, {
908
+ "aria-label": t13,
909
+ onValueChange: setChannel,
910
+ value: channel,
911
+ children: t14
912
+ });
913
+ $[32] = channel;
914
+ $[33] = t13;
915
+ $[34] = t14;
916
+ $[35] = t15;
917
+ } else t15 = $[35];
918
+ if ($[36] !== t12 || $[37] !== t15) {
919
+ t4 = /* @__PURE__ */ jsx(Nav, {
920
+ "aria-label": t12,
921
+ sticky: true,
922
+ children: t15
923
+ });
924
+ $[36] = t12;
925
+ $[37] = t15;
926
+ $[38] = t4;
927
+ } else t4 = $[38];
928
+ T1 = Body;
929
+ T0 = Stack;
930
+ t0 = "md";
931
+ let t16;
932
+ if ($[39] !== t) {
933
+ t16 = (event, at) => /* @__PURE__ */ jsxs(Switch.Root, {
934
+ defaultChecked: at % 3 !== 2,
935
+ size: "sm",
936
+ spread: true,
937
+ children: [/* @__PURE__ */ jsx(Switch.Label, { children: t(`notifications.events.${event}`) }), /* @__PURE__ */ jsx(Switch.Control, { children: /* @__PURE__ */ jsx(Switch.Thumb, {}) })]
938
+ }, event);
939
+ $[39] = t;
940
+ $[40] = t16;
941
+ } else t16 = $[40];
942
+ t1 = EVENTS.slice(0, shown).map(t16);
943
+ $[0] = channel;
944
+ $[1] = t;
945
+ $[2] = T0;
946
+ $[3] = T1;
947
+ $[4] = T2;
948
+ $[5] = t0;
949
+ $[6] = t1;
950
+ $[7] = t2;
951
+ $[8] = t3;
952
+ $[9] = t4;
953
+ } else {
954
+ T0 = $[2];
955
+ T1 = $[3];
956
+ T2 = $[4];
957
+ t0 = $[5];
958
+ t1 = $[6];
959
+ t2 = $[7];
960
+ t3 = $[8];
961
+ t4 = $[9];
962
+ }
963
+ let t5;
964
+ if ($[41] !== T0 || $[42] !== t0 || $[43] !== t1) {
965
+ t5 = /* @__PURE__ */ jsx(T0, {
966
+ gap: t0,
967
+ children: t1
968
+ });
969
+ $[41] = T0;
970
+ $[42] = t0;
971
+ $[43] = t1;
972
+ $[44] = t5;
973
+ } else t5 = $[44];
974
+ let t6;
975
+ if ($[45] !== T1 || $[46] !== t5) {
976
+ t6 = /* @__PURE__ */ jsx(T1, { children: t5 });
977
+ $[45] = T1;
978
+ $[46] = t5;
979
+ $[47] = t6;
980
+ } else t6 = $[47];
981
+ let t7;
982
+ if ($[48] !== t) {
983
+ t7 = t("notifications.save");
984
+ $[48] = t;
985
+ $[49] = t7;
986
+ } else t7 = $[49];
987
+ let t8;
988
+ if ($[50] !== t7) {
989
+ t8 = /* @__PURE__ */ jsx(Button, {
990
+ size: "sm",
991
+ children: t7
992
+ });
993
+ $[50] = t7;
994
+ $[51] = t8;
995
+ } else t8 = $[51];
996
+ let t9;
997
+ if ($[52] !== t) {
998
+ t9 = t("notifications.cancel");
999
+ $[52] = t;
1000
+ $[53] = t9;
1001
+ } else t9 = $[53];
1002
+ let t10;
1003
+ if ($[54] !== t9) {
1004
+ t10 = /* @__PURE__ */ jsx(Button, {
1005
+ size: "sm",
1006
+ variant: "ghost",
1007
+ children: t9
1008
+ });
1009
+ $[54] = t9;
1010
+ $[55] = t10;
1011
+ } else t10 = $[55];
1012
+ let t11;
1013
+ if ($[56] !== t10 || $[57] !== t8) {
1014
+ t11 = /* @__PURE__ */ jsxs(Footer, {
1015
+ sticky: true,
1016
+ children: [t8, t10]
1017
+ });
1018
+ $[56] = t10;
1019
+ $[57] = t8;
1020
+ $[58] = t11;
1021
+ } else t11 = $[58];
1022
+ let t12;
1023
+ if ($[59] !== T2 || $[60] !== t11 || $[61] !== t2 || $[62] !== t3 || $[63] !== t4 || $[64] !== t6) {
1024
+ t12 = /* @__PURE__ */ jsxs(T2, {
1025
+ size: t2,
1026
+ children: [
1027
+ t3,
1028
+ t4,
1029
+ t6,
1030
+ t11
1031
+ ]
1032
+ });
1033
+ $[59] = T2;
1034
+ $[60] = t11;
1035
+ $[61] = t2;
1036
+ $[62] = t3;
1037
+ $[63] = t4;
1038
+ $[64] = t6;
1039
+ $[65] = t12;
1040
+ } else t12 = $[65];
1041
+ return t12;
1042
+ }
1043
+ const source$5 = "import { type ReactElement, useState } from \"react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Switch } from \"@stealthscale/component-forms\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nconst EVENTS = [\n \"deployed\",\n \"failed\",\n \"invited\",\n \"joined\",\n \"renewed\",\n \"billed\",\n \"limited\",\n \"expired\",\n];\n\nconst CHANNELS = [\n { count: 8, value: \"email\" },\n { count: 3, value: \"push\" },\n { count: 2, value: \"digest\" },\n] as const;\n\nexport function Notifications(): ReactElement {\n const { t } = useWords(\"page\");\n const [channel, setChannel] = useState(\"email\");\n const shown = CHANNELS.find(({ value }) => value === channel)?.count ?? 0;\n\n return (\n <Page.Root size=\"sm\">\n <Page.Header sticky>\n <Page.Title as=\"h3\">{t(\"notifications.title\")}</Page.Title>\n <Page.Description>{t(\"notifications.about\")}</Page.Description>\n <Page.Actions>\n <Page.Action>{t(\"notifications.reset\")}</Page.Action>\n </Page.Actions>\n </Page.Header>\n <Page.Nav aria-label={t(\"notifications.channels\")} sticky>\n <Page.TabList\n aria-label={t(\"notifications.channels\")}\n onValueChange={setChannel}\n value={channel}\n >\n {CHANNELS.map(({ value }) => (\n <Page.Tab key={value} value={value}>\n {t(`notifications.${value}`)}\n </Page.Tab>\n ))}\n </Page.TabList>\n </Page.Nav>\n <Page.Body>\n <Stack gap=\"md\">\n {EVENTS.slice(0, shown).map((event, at) => (\n <Switch.Root defaultChecked={at % 3 !== 2} key={event} size=\"sm\" spread>\n <Switch.Label>{t(`notifications.events.${event}`)}</Switch.Label>\n <Switch.Control>\n <Switch.Thumb />\n </Switch.Control>\n </Switch.Root>\n ))}\n </Stack>\n </Page.Body>\n <Page.Footer sticky>\n <Button size=\"sm\">{t(\"notifications.save\")}</Button>\n <Button size=\"sm\" variant=\"ghost\">\n {t(\"notifications.cancel\")}\n </Button>\n </Page.Footer>\n </Page.Root>\n );\n}\n";
1044
+ //#endregion
1045
+ //#region src/page/examples/sections.example.tsx
1046
+ var sections_example_exports = /* @__PURE__ */ __exportAll({
1047
+ Sections: () => Sections,
1048
+ source: () => source$4
1049
+ });
1050
+ const SECTIONS$1 = [
1051
+ ["general", SettingsIcon],
1052
+ ["members", UsersIcon],
1053
+ ["billing", CreditCardIcon]
1054
+ ];
1055
+ function Sections() {
1056
+ const $ = c(36);
1057
+ const { t } = useWords("page");
1058
+ const [current, setCurrent] = useState("general");
1059
+ let t0;
1060
+ if ($[0] !== t) {
1061
+ t0 = t("settings");
1062
+ $[0] = t;
1063
+ $[1] = t0;
1064
+ } else t0 = $[1];
1065
+ let t1;
1066
+ if ($[2] !== t0) {
1067
+ t1 = /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(Title, {
1068
+ as: "h3",
1069
+ children: t0
1070
+ }) });
1071
+ $[2] = t0;
1072
+ $[3] = t1;
1073
+ } else t1 = $[3];
1074
+ let t2;
1075
+ if ($[4] !== current || $[5] !== t) {
1076
+ t2 = t(current);
1077
+ $[4] = current;
1078
+ $[5] = t;
1079
+ $[6] = t2;
1080
+ } else t2 = $[6];
1081
+ let t3;
1082
+ if ($[7] !== t) {
1083
+ t3 = t("sections");
1084
+ $[7] = t;
1085
+ $[8] = t3;
1086
+ } else t3 = $[8];
1087
+ let t4;
1088
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
1089
+ t4 = /* @__PURE__ */ jsx(ChevronDownIcon, { size: "1em" });
1090
+ $[9] = t4;
1091
+ } else t4 = $[9];
1092
+ let t5;
1093
+ if ($[10] !== t) {
1094
+ t5 = t("resizeSections");
1095
+ $[10] = t;
1096
+ $[11] = t5;
1097
+ } else t5 = $[11];
1098
+ let t6;
1099
+ if ($[12] !== t) {
1100
+ t6 = t("sections");
1101
+ $[12] = t;
1102
+ $[13] = t6;
1103
+ } else t6 = $[13];
1104
+ let t7;
1105
+ if ($[14] !== current || $[15] !== t) {
1106
+ t7 = SECTIONS$1.map((t8) => {
1107
+ const [section, Glyph] = t8;
1108
+ return /* @__PURE__ */ jsx(NavList.Item, { children: /* @__PURE__ */ jsxs(NavList.Link, {
1109
+ "aria-current": section === current ? "page" : void 0,
1110
+ href: `#${section}`,
1111
+ onClick: () => {
1112
+ setCurrent(section);
1113
+ },
1114
+ children: [/* @__PURE__ */ jsx(Glyph, {}), /* @__PURE__ */ jsx("span", { children: t(section) })]
1115
+ }) }, section);
1116
+ });
1117
+ $[14] = current;
1118
+ $[15] = t;
1119
+ $[16] = t7;
1120
+ } else t7 = $[16];
1121
+ let t8;
1122
+ if ($[17] !== t7) {
1123
+ t8 = /* @__PURE__ */ jsx(NavList.Root, { children: t7 });
1124
+ $[17] = t7;
1125
+ $[18] = t8;
1126
+ } else t8 = $[18];
1127
+ let t9;
1128
+ if ($[19] !== t6 || $[20] !== t8) {
1129
+ t9 = /* @__PURE__ */ jsx("nav", {
1130
+ "aria-label": t6,
1131
+ children: t8
1132
+ });
1133
+ $[19] = t6;
1134
+ $[20] = t8;
1135
+ $[21] = t9;
1136
+ } else t9 = $[21];
1137
+ let t10;
1138
+ if ($[22] !== t2 || $[23] !== t3 || $[24] !== t5 || $[25] !== t9) {
1139
+ t10 = /* @__PURE__ */ jsx(Sidebar, {
1140
+ current: t2,
1141
+ label: t3,
1142
+ pickerIcon: t4,
1143
+ resizable: true,
1144
+ resizeLabel: t5,
1145
+ children: t9
1146
+ });
1147
+ $[22] = t2;
1148
+ $[23] = t3;
1149
+ $[24] = t5;
1150
+ $[25] = t9;
1151
+ $[26] = t10;
1152
+ } else t10 = $[26];
1153
+ const t11 = `${current}Body`;
1154
+ let t12;
1155
+ if ($[27] !== t || $[28] !== t11) {
1156
+ t12 = t(t11);
1157
+ $[27] = t;
1158
+ $[28] = t11;
1159
+ $[29] = t12;
1160
+ } else t12 = $[29];
1161
+ let t13;
1162
+ if ($[30] !== t12) {
1163
+ t13 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Text, {
1164
+ size: "sm",
1165
+ tone: "muted",
1166
+ children: t12
1167
+ }) });
1168
+ $[30] = t12;
1169
+ $[31] = t13;
1170
+ } else t13 = $[31];
1171
+ let t14;
1172
+ if ($[32] !== t1 || $[33] !== t10 || $[34] !== t13) {
1173
+ t14 = /* @__PURE__ */ jsxs(Root, { children: [
1174
+ t1,
1175
+ t10,
1176
+ t13
1177
+ ] });
1178
+ $[32] = t1;
1179
+ $[33] = t10;
1180
+ $[34] = t13;
1181
+ $[35] = t14;
1182
+ } else t14 = $[35];
1183
+ return t14;
1184
+ }
1185
+ const source$4 = "import { type ReactElement, useState } from \"react\";\n\nimport { ChevronDownIcon, CreditCardIcon, SettingsIcon, UsersIcon } from \"lucide-react\";\n\nimport { NavList } from \"@stealthscale/component-navigation\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nconst SECTIONS = [\n [\"general\", SettingsIcon],\n [\"members\", UsersIcon],\n [\"billing\", CreditCardIcon],\n] as const;\n\ntype Section = (typeof SECTIONS)[number][0];\n\nexport function Sections(): ReactElement {\n const { t } = useWords(\"page\");\n const [current, setCurrent] = useState<Section>(\"general\");\n\n return (\n <Page.Root>\n <Page.Header>\n <Page.Title as=\"h3\">{t(\"settings\")}</Page.Title>\n </Page.Header>\n <Page.Sidebar\n current={t(current)}\n label={t(\"sections\")}\n pickerIcon={<ChevronDownIcon size=\"1em\" />}\n resizable\n resizeLabel={t(\"resizeSections\")}\n >\n <nav aria-label={t(\"sections\")}>\n <NavList.Root>\n {SECTIONS.map(([section, Glyph]) => (\n <NavList.Item key={section}>\n <NavList.Link\n aria-current={section === current ? \"page\" : undefined}\n href={`#${section}`}\n onClick={() => {\n setCurrent(section);\n }}\n >\n <Glyph />\n <span>{t(section)}</span>\n </NavList.Link>\n </NavList.Item>\n ))}\n </NavList.Root>\n </nav>\n </Page.Sidebar>\n <Page.Body>\n <Text size=\"sm\" tone=\"muted\">\n {t(`${current}Body`)}\n </Text>\n </Page.Body>\n </Page.Root>\n );\n}\n";
1186
+ //#endregion
1187
+ //#region src/page/examples/settings.example.tsx
1188
+ var settings_example_exports = /* @__PURE__ */ __exportAll({
1189
+ Settings: () => Settings,
1190
+ source: () => source$3
1191
+ });
1192
+ const SECTIONS = [
1193
+ "general",
1194
+ "members",
1195
+ "billing"
1196
+ ];
1197
+ function Settings(props) {
1198
+ const $ = c(41);
1199
+ const { t } = useWords("page");
1200
+ const [current, setCurrent] = useState("general");
1201
+ let t0;
1202
+ if ($[0] !== t) {
1203
+ t0 = t("settings");
1204
+ $[0] = t;
1205
+ $[1] = t0;
1206
+ } else t0 = $[1];
1207
+ let t1;
1208
+ if ($[2] !== t0) {
1209
+ t1 = /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(Title, {
1210
+ as: "h3",
1211
+ children: t0
1212
+ }) });
1213
+ $[2] = t0;
1214
+ $[3] = t1;
1215
+ } else t1 = $[3];
1216
+ let t2;
1217
+ if ($[4] !== t) {
1218
+ t2 = t("sections");
1219
+ $[4] = t;
1220
+ $[5] = t2;
1221
+ } else t2 = $[5];
1222
+ let t3;
1223
+ if ($[6] !== current || $[7] !== t) {
1224
+ t3 = SECTIONS.map((section) => /* @__PURE__ */ jsx(Link, {
1225
+ "aria-current": section === current ? "page" : void 0,
1226
+ href: `#${section}`,
1227
+ inherit: section !== current,
1228
+ onClick: () => {
1229
+ setCurrent(section);
1230
+ },
1231
+ variant: "plain",
1232
+ children: t(section)
1233
+ }, section));
1234
+ $[6] = current;
1235
+ $[7] = t;
1236
+ $[8] = t3;
1237
+ } else t3 = $[8];
1238
+ let t4;
1239
+ if ($[9] !== t3) {
1240
+ t4 = /* @__PURE__ */ jsx(When, {
1241
+ when: "wide",
1242
+ children: /* @__PURE__ */ jsx(Stack, {
1243
+ direction: "row",
1244
+ gap: "xl",
1245
+ children: t3
1246
+ })
1247
+ });
1248
+ $[9] = t3;
1249
+ $[10] = t4;
1250
+ } else t4 = $[10];
1251
+ let t5;
1252
+ if ($[11] !== current) {
1253
+ t5 = (t6) => {
1254
+ const { value } = t6;
1255
+ setCurrent(SECTIONS.find((section_0) => section_0 === value) ?? current);
1256
+ };
1257
+ $[11] = current;
1258
+ $[12] = t5;
1259
+ } else t5 = $[12];
1260
+ let t6;
1261
+ if ($[13] !== current || $[14] !== t) {
1262
+ t6 = t(current);
1263
+ $[13] = current;
1264
+ $[14] = t;
1265
+ $[15] = t6;
1266
+ } else t6 = $[15];
1267
+ let t7;
1268
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
1269
+ t7 = /* @__PURE__ */ jsx(ChevronDownIcon, { size: "1em" });
1270
+ $[16] = t7;
1271
+ } else t7 = $[16];
1272
+ let t8;
1273
+ if ($[17] !== t6) {
1274
+ t8 = /* @__PURE__ */ jsxs(Menu.Trigger, {
1275
+ as: Picker,
1276
+ children: [t6, t7]
1277
+ });
1278
+ $[17] = t6;
1279
+ $[18] = t8;
1280
+ } else t8 = $[18];
1281
+ let t9;
1282
+ if ($[19] !== t) {
1283
+ t9 = SECTIONS.map((section_1) => /* @__PURE__ */ jsx(Menu.Item, {
1284
+ value: section_1,
1285
+ children: t(section_1)
1286
+ }, section_1));
1287
+ $[19] = t;
1288
+ $[20] = t9;
1289
+ } else t9 = $[20];
1290
+ let t10;
1291
+ if ($[21] !== t9) {
1292
+ t10 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsx(Menu.Content, {
1293
+ as: Palette,
1294
+ children: t9
1295
+ }) }) });
1296
+ $[21] = t9;
1297
+ $[22] = t10;
1298
+ } else t10 = $[22];
1299
+ let t11;
1300
+ if ($[23] !== t10 || $[24] !== t5 || $[25] !== t8) {
1301
+ t11 = /* @__PURE__ */ jsx(When, {
1302
+ when: "narrow",
1303
+ children: /* @__PURE__ */ jsxs(Menu.Root, {
1304
+ onSelect: t5,
1305
+ children: [t8, t10]
1306
+ })
1307
+ });
1308
+ $[23] = t10;
1309
+ $[24] = t5;
1310
+ $[25] = t8;
1311
+ $[26] = t11;
1312
+ } else t11 = $[26];
1313
+ let t12;
1314
+ if ($[27] !== props || $[28] !== t11 || $[29] !== t2 || $[30] !== t4) {
1315
+ t12 = /* @__PURE__ */ jsxs(Nav, {
1316
+ "aria-label": t2,
1317
+ ...props,
1318
+ children: [t4, t11]
1319
+ });
1320
+ $[27] = props;
1321
+ $[28] = t11;
1322
+ $[29] = t2;
1323
+ $[30] = t4;
1324
+ $[31] = t12;
1325
+ } else t12 = $[31];
1326
+ const t13 = `${current}Body`;
1327
+ let t14;
1328
+ if ($[32] !== t || $[33] !== t13) {
1329
+ t14 = t(t13);
1330
+ $[32] = t;
1331
+ $[33] = t13;
1332
+ $[34] = t14;
1333
+ } else t14 = $[34];
1334
+ let t15;
1335
+ if ($[35] !== t14) {
1336
+ t15 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Text, {
1337
+ size: "sm",
1338
+ tone: "muted",
1339
+ children: t14
1340
+ }) });
1341
+ $[35] = t14;
1342
+ $[36] = t15;
1343
+ } else t15 = $[36];
1344
+ let t16;
1345
+ if ($[37] !== t1 || $[38] !== t12 || $[39] !== t15) {
1346
+ t16 = /* @__PURE__ */ jsxs(Root, { children: [
1347
+ t1,
1348
+ t12,
1349
+ t15
1350
+ ] });
1351
+ $[37] = t1;
1352
+ $[38] = t12;
1353
+ $[39] = t15;
1354
+ $[40] = t16;
1355
+ } else t16 = $[40];
1356
+ return t16;
1357
+ }
1358
+ const source$3 = "import { type ReactElement, useState } from \"react\";\n\nimport { ChevronDownIcon } from \"lucide-react\";\n\nimport { Menu } from \"@stealthscale/component-disclosure\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { Link } from \"@stealthscale/component-navigation\";\nimport { Portal } from \"@stealthscale/component-primitives\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nconst SECTIONS = [\"general\", \"members\", \"billing\"] as const;\n\ntype Section = (typeof SECTIONS)[number];\n\nexport function Settings(props: Page.NavProps): ReactElement {\n const { t } = useWords(\"page\");\n const [current, setCurrent] = useState<Section>(\"general\");\n\n return (\n <Page.Root>\n <Page.Header>\n <Page.Title as=\"h3\">{t(\"settings\")}</Page.Title>\n </Page.Header>\n <Page.Nav aria-label={t(\"sections\")} {...props}>\n <Page.When when=\"wide\">\n <Stack direction=\"row\" gap=\"xl\">\n {SECTIONS.map((section) => (\n <Link\n aria-current={section === current ? \"page\" : undefined}\n href={`#${section}`}\n inherit={section !== current}\n key={section}\n onClick={() => {\n setCurrent(section);\n }}\n variant=\"plain\"\n >\n {t(section)}\n </Link>\n ))}\n </Stack>\n </Page.When>\n <Page.When when=\"narrow\">\n <Menu.Root\n onSelect={({ value }) => {\n setCurrent(SECTIONS.find((section) => section === value) ?? current);\n }}\n >\n <Menu.Trigger as={Page.Picker}>\n {t(current)}\n <ChevronDownIcon size=\"1em\" />\n </Menu.Trigger>\n <Portal>\n <Menu.Positioner>\n <Menu.Content as={Page.Palette}>\n {SECTIONS.map((section) => (\n <Menu.Item key={section} value={section}>\n {t(section)}\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n </Page.When>\n </Page.Nav>\n <Page.Body>\n <Text size=\"sm\" tone=\"muted\">\n {t(`${current}Body`)}\n </Text>\n </Page.Body>\n </Page.Root>\n );\n}\n";
1359
+ //#endregion
1360
+ //#region src/page/examples/tokens.example.tsx
1361
+ var tokens_example_exports = /* @__PURE__ */ __exportAll({
1362
+ Tokens: () => Tokens,
1363
+ source: () => source$2
1364
+ });
1365
+ const VIEWS$1 = [{
1366
+ count: 4,
1367
+ value: "tokens"
1368
+ }, {
1369
+ count: 1,
1370
+ value: "automations"
1371
+ }];
1372
+ const LAYOUTS = [{
1373
+ Mark: ListIcon,
1374
+ name: "list"
1375
+ }, {
1376
+ Mark: LayoutGridIcon,
1377
+ name: "tiles"
1378
+ }];
1379
+ function Tokens() {
1380
+ const $ = c(53);
1381
+ const { t } = useWords("page");
1382
+ const [view, setView] = useState("tokens");
1383
+ const [layout, setLayout] = useState("list");
1384
+ let t0;
1385
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1386
+ t0 = /* @__PURE__ */ jsx(Leading, {
1387
+ when: "wide",
1388
+ children: /* @__PURE__ */ jsx(Icon, {
1389
+ as: PaletteIcon,
1390
+ size: "lg",
1391
+ tone: "muted"
1392
+ })
1393
+ });
1394
+ $[0] = t0;
1395
+ } else t0 = $[0];
1396
+ let t1;
1397
+ if ($[1] !== t) {
1398
+ t1 = t("tokens.title");
1399
+ $[1] = t;
1400
+ $[2] = t1;
1401
+ } else t1 = $[2];
1402
+ let t2;
1403
+ if ($[3] !== t1) {
1404
+ t2 = /* @__PURE__ */ jsx(Title, {
1405
+ as: "h3",
1406
+ children: t1
1407
+ });
1408
+ $[3] = t1;
1409
+ $[4] = t2;
1410
+ } else t2 = $[4];
1411
+ let t3;
1412
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
1413
+ t3 = /* @__PURE__ */ jsx(PlusIcon, { size: "1em" });
1414
+ $[5] = t3;
1415
+ } else t3 = $[5];
1416
+ let t4;
1417
+ if ($[6] !== t) {
1418
+ t4 = t("tokens.add");
1419
+ $[6] = t;
1420
+ $[7] = t4;
1421
+ } else t4 = $[7];
1422
+ let t5;
1423
+ if ($[8] !== t4) {
1424
+ t5 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Action, {
1425
+ icon: t3,
1426
+ primary: true,
1427
+ children: t4
1428
+ }) });
1429
+ $[8] = t4;
1430
+ $[9] = t5;
1431
+ } else t5 = $[9];
1432
+ let t6;
1433
+ if ($[10] !== t2 || $[11] !== t5) {
1434
+ t6 = /* @__PURE__ */ jsxs(Header, { children: [
1435
+ t0,
1436
+ t2,
1437
+ t5
1438
+ ] });
1439
+ $[10] = t2;
1440
+ $[11] = t5;
1441
+ $[12] = t6;
1442
+ } else t6 = $[12];
1443
+ let t7;
1444
+ if ($[13] !== t) {
1445
+ t7 = t("tokens.lists");
1446
+ $[13] = t;
1447
+ $[14] = t7;
1448
+ } else t7 = $[14];
1449
+ let t8;
1450
+ if ($[15] !== t) {
1451
+ t8 = t("views");
1452
+ $[15] = t;
1453
+ $[16] = t8;
1454
+ } else t8 = $[16];
1455
+ let t9;
1456
+ if ($[17] !== t) {
1457
+ t9 = t("noView");
1458
+ $[17] = t;
1459
+ $[18] = t9;
1460
+ } else t9 = $[18];
1461
+ let t10;
1462
+ if ($[19] !== t) {
1463
+ t10 = t("filterViews");
1464
+ $[19] = t;
1465
+ $[20] = t10;
1466
+ } else t10 = $[20];
1467
+ let t11;
1468
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
1469
+ t11 = /* @__PURE__ */ jsx(ChevronsUpDownIcon, { size: "1em" });
1470
+ $[21] = t11;
1471
+ } else t11 = $[21];
1472
+ let t12;
1473
+ if ($[22] !== t) {
1474
+ t12 = VIEWS$1.map((t13) => {
1475
+ const { count, value } = t13;
1476
+ return /* @__PURE__ */ jsx(Tab, {
1477
+ count,
1478
+ value,
1479
+ children: t(`tokens.${value}`)
1480
+ }, value);
1481
+ });
1482
+ $[22] = t;
1483
+ $[23] = t12;
1484
+ } else t12 = $[23];
1485
+ let t13;
1486
+ if ($[24] !== t10 || $[25] !== t12 || $[26] !== t8 || $[27] !== t9 || $[28] !== view) {
1487
+ t13 = /* @__PURE__ */ jsx(TabList, {
1488
+ "aria-label": t8,
1489
+ emptyLabel: t9,
1490
+ filterLabel: t10,
1491
+ onValueChange: setView,
1492
+ pickerIcon: t11,
1493
+ value: view,
1494
+ children: t12
1495
+ });
1496
+ $[24] = t10;
1497
+ $[25] = t12;
1498
+ $[26] = t8;
1499
+ $[27] = t9;
1500
+ $[28] = view;
1501
+ $[29] = t13;
1502
+ } else t13 = $[29];
1503
+ let t14;
1504
+ if ($[30] !== t) {
1505
+ t14 = t("tokens.layout");
1506
+ $[30] = t;
1507
+ $[31] = t14;
1508
+ } else t14 = $[31];
1509
+ let t15;
1510
+ if ($[32] !== layout || $[33] !== t) {
1511
+ t15 = LAYOUTS.map((t16) => {
1512
+ const { Mark, name } = t16;
1513
+ return /* @__PURE__ */ jsx(Item, {
1514
+ "aria-label": t(`tokens.${name}`),
1515
+ "aria-pressed": layout === name,
1516
+ as: IconButton,
1517
+ onClick: () => {
1518
+ setLayout(name);
1519
+ },
1520
+ variant: "outline",
1521
+ children: /* @__PURE__ */ jsx(Mark, { size: "1em" })
1522
+ }, name);
1523
+ });
1524
+ $[32] = layout;
1525
+ $[33] = t;
1526
+ $[34] = t15;
1527
+ } else t15 = $[34];
1528
+ let t16;
1529
+ if ($[35] !== t15) {
1530
+ t16 = /* @__PURE__ */ jsx(Group$1, { children: t15 });
1531
+ $[35] = t15;
1532
+ $[36] = t16;
1533
+ } else t16 = $[36];
1534
+ let t17;
1535
+ if ($[37] !== t14 || $[38] !== t16) {
1536
+ t17 = /* @__PURE__ */ jsx(Root$1, {
1537
+ "aria-label": t14,
1538
+ size: "xs",
1539
+ children: t16
1540
+ });
1541
+ $[37] = t14;
1542
+ $[38] = t16;
1543
+ $[39] = t17;
1544
+ } else t17 = $[39];
1545
+ let t18;
1546
+ if ($[40] !== t13 || $[41] !== t17 || $[42] !== t7) {
1547
+ t18 = /* @__PURE__ */ jsxs(Nav, {
1548
+ "aria-label": t7,
1549
+ children: [t13, t17]
1550
+ });
1551
+ $[40] = t13;
1552
+ $[41] = t17;
1553
+ $[42] = t7;
1554
+ $[43] = t18;
1555
+ } else t18 = $[43];
1556
+ const t19 = `tokens.bodies.${view}`;
1557
+ let t20;
1558
+ if ($[44] !== t || $[45] !== t19) {
1559
+ t20 = t(t19);
1560
+ $[44] = t;
1561
+ $[45] = t19;
1562
+ $[46] = t20;
1563
+ } else t20 = $[46];
1564
+ let t21;
1565
+ if ($[47] !== t20) {
1566
+ t21 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Text, {
1567
+ size: "sm",
1568
+ tone: "muted",
1569
+ children: t20
1570
+ }) });
1571
+ $[47] = t20;
1572
+ $[48] = t21;
1573
+ } else t21 = $[48];
1574
+ let t22;
1575
+ if ($[49] !== t18 || $[50] !== t21 || $[51] !== t6) {
1576
+ t22 = /* @__PURE__ */ jsxs(Root, { children: [
1577
+ t6,
1578
+ t18,
1579
+ t21
1580
+ ] });
1581
+ $[49] = t18;
1582
+ $[50] = t21;
1583
+ $[51] = t6;
1584
+ $[52] = t22;
1585
+ } else t22 = $[52];
1586
+ return t22;
1587
+ }
1588
+ const source$2 = "import { type ReactElement, useState } from \"react\";\n\nimport { ChevronsUpDownIcon, LayoutGridIcon, ListIcon, PaletteIcon, PlusIcon } from \"lucide-react\";\n\nimport { IconButton } from \"@stealthscale/component-actions\";\nimport { Icon, Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page, Toolbar } from \"@stealthscale/component-screen\";\n\nconst VIEWS = [\n { count: 4, value: \"tokens\" },\n { count: 1, value: \"automations\" },\n] as const;\n\nconst LAYOUTS = [\n { Mark: ListIcon, name: \"list\" },\n { Mark: LayoutGridIcon, name: \"tiles\" },\n] as const;\n\nexport function Tokens(): ReactElement {\n const { t } = useWords(\"page\");\n const [view, setView] = useState(\"tokens\");\n const [layout, setLayout] = useState(\"list\");\n\n return (\n <Page.Root>\n <Page.Header>\n <Page.Leading when=\"wide\">\n <Icon as={PaletteIcon} size=\"lg\" tone=\"muted\" />\n </Page.Leading>\n <Page.Title as=\"h3\">{t(\"tokens.title\")}</Page.Title>\n <Page.Actions>\n <Page.Action icon={<PlusIcon size=\"1em\" />} primary>\n {t(\"tokens.add\")}\n </Page.Action>\n </Page.Actions>\n </Page.Header>\n <Page.Nav aria-label={t(\"tokens.lists\")}>\n <Page.TabList\n aria-label={t(\"views\")}\n emptyLabel={t(\"noView\")}\n filterLabel={t(\"filterViews\")}\n onValueChange={setView}\n pickerIcon={<ChevronsUpDownIcon size=\"1em\" />}\n value={view}\n >\n {VIEWS.map(({ count, value }) => (\n <Page.Tab count={count} key={value} value={value}>\n {t(`tokens.${value}`)}\n </Page.Tab>\n ))}\n </Page.TabList>\n <Toolbar.Root aria-label={t(\"tokens.layout\")} size=\"xs\">\n <Toolbar.Group>\n {LAYOUTS.map(({ Mark, name }) => (\n <Toolbar.Item\n aria-label={t(`tokens.${name}`)}\n aria-pressed={layout === name}\n as={IconButton}\n key={name}\n onClick={() => {\n setLayout(name);\n }}\n variant=\"outline\"\n >\n <Mark size=\"1em\" />\n </Toolbar.Item>\n ))}\n </Toolbar.Group>\n </Toolbar.Root>\n </Page.Nav>\n <Page.Body>\n <Text size=\"sm\" tone=\"muted\">\n {t(`tokens.bodies.${view}`)}\n </Text>\n </Page.Body>\n </Page.Root>\n );\n}\n";
1589
+ //#endregion
1590
+ //#region src/page/examples/users.example.tsx
1591
+ var users_example_exports = /* @__PURE__ */ __exportAll({
1592
+ Users: () => Users,
1593
+ source: () => source$1
1594
+ });
1595
+ const VIEWS = [
1596
+ {
1597
+ count: 412,
1598
+ value: "all"
1599
+ },
1600
+ {
1601
+ count: 9,
1602
+ value: "invited"
1603
+ },
1604
+ { value: "suspended" }
1605
+ ];
1606
+ function Users(props) {
1607
+ const $ = c(81);
1608
+ const { t } = useWords("page");
1609
+ const [view, setView] = useState("all");
1610
+ let t0;
1611
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1612
+ t0 = /* @__PURE__ */ jsx(ArrowLeftIcon, { size: "1em" });
1613
+ $[0] = t0;
1614
+ } else t0 = $[0];
1615
+ let t1;
1616
+ if ($[1] !== t) {
1617
+ t1 = t("ledger");
1618
+ $[1] = t;
1619
+ $[2] = t1;
1620
+ } else t1 = $[2];
1621
+ let t2;
1622
+ if ($[3] !== t1) {
1623
+ t2 = {
1624
+ href: "#ledger",
1625
+ label: t1
1626
+ };
1627
+ $[3] = t1;
1628
+ $[4] = t2;
1629
+ } else t2 = $[4];
1630
+ let t3;
1631
+ if ($[5] !== t) {
1632
+ t3 = t("users.parent");
1633
+ $[5] = t;
1634
+ $[6] = t3;
1635
+ } else t3 = $[6];
1636
+ let t4;
1637
+ if ($[7] !== t3) {
1638
+ t4 = {
1639
+ href: "#collections",
1640
+ label: t3
1641
+ };
1642
+ $[7] = t3;
1643
+ $[8] = t4;
1644
+ } else t4 = $[8];
1645
+ let t5;
1646
+ if ($[9] !== t2 || $[10] !== t4) {
1647
+ t5 = [t2, t4];
1648
+ $[9] = t2;
1649
+ $[10] = t4;
1650
+ $[11] = t5;
1651
+ } else t5 = $[11];
1652
+ let t6;
1653
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
1654
+ t6 = /* @__PURE__ */ jsx(ChevronRightIcon, { size: "1em" });
1655
+ $[12] = t6;
1656
+ } else t6 = $[12];
1657
+ let t7;
1658
+ if ($[13] !== t5) {
1659
+ t7 = /* @__PURE__ */ jsx(Breadcrumbs, {
1660
+ backIcon: t0,
1661
+ items: t5,
1662
+ separator: t6
1663
+ });
1664
+ $[13] = t5;
1665
+ $[14] = t7;
1666
+ } else t7 = $[14];
1667
+ let t8;
1668
+ if ($[15] !== t) {
1669
+ t8 = t("users.title");
1670
+ $[15] = t;
1671
+ $[16] = t8;
1672
+ } else t8 = $[16];
1673
+ let t9;
1674
+ if ($[17] !== t8) {
1675
+ t9 = /* @__PURE__ */ jsx(Title, {
1676
+ as: "h3",
1677
+ children: t8
1678
+ });
1679
+ $[17] = t8;
1680
+ $[18] = t9;
1681
+ } else t9 = $[18];
1682
+ let t10;
1683
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
1684
+ t10 = /* @__PURE__ */ jsx(Meta, {
1685
+ when: "wide",
1686
+ children: /* @__PURE__ */ jsx(Badge, {
1687
+ palette: "neutral",
1688
+ size: "sm",
1689
+ children: "412"
1690
+ })
1691
+ });
1692
+ $[19] = t10;
1693
+ } else t10 = $[19];
1694
+ let t11;
1695
+ if ($[20] !== t) {
1696
+ t11 = t("users.about");
1697
+ $[20] = t;
1698
+ $[21] = t11;
1699
+ } else t11 = $[21];
1700
+ let t12;
1701
+ if ($[22] !== t11) {
1702
+ t12 = /* @__PURE__ */ jsx(Description, { children: t11 });
1703
+ $[22] = t11;
1704
+ $[23] = t12;
1705
+ } else t12 = $[23];
1706
+ let t13;
1707
+ if ($[24] !== t) {
1708
+ t13 = t("users.more");
1709
+ $[24] = t;
1710
+ $[25] = t13;
1711
+ } else t13 = $[25];
1712
+ let t14;
1713
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
1714
+ t14 = /* @__PURE__ */ jsx(EllipsisIcon, { size: "1em" });
1715
+ $[26] = t14;
1716
+ } else t14 = $[26];
1717
+ let t15;
1718
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
1719
+ t15 = /* @__PURE__ */ jsx(SettingsIcon, { size: "1em" });
1720
+ $[27] = t15;
1721
+ } else t15 = $[27];
1722
+ let t16;
1723
+ if ($[28] !== t) {
1724
+ t16 = t("users.settings");
1725
+ $[28] = t;
1726
+ $[29] = t16;
1727
+ } else t16 = $[29];
1728
+ let t17;
1729
+ if ($[30] !== t16) {
1730
+ t17 = /* @__PURE__ */ jsx(Action, {
1731
+ icon: t15,
1732
+ children: t16
1733
+ });
1734
+ $[30] = t16;
1735
+ $[31] = t17;
1736
+ } else t17 = $[31];
1737
+ let t18;
1738
+ if ($[32] !== t) {
1739
+ t18 = t("users.preview");
1740
+ $[32] = t;
1741
+ $[33] = t18;
1742
+ } else t18 = $[33];
1743
+ let t19;
1744
+ if ($[34] !== t18) {
1745
+ t19 = /* @__PURE__ */ jsx(Action, { children: t18 });
1746
+ $[34] = t18;
1747
+ $[35] = t19;
1748
+ } else t19 = $[35];
1749
+ let t20;
1750
+ if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
1751
+ t20 = /* @__PURE__ */ jsx(PlusIcon, { size: "1em" });
1752
+ $[36] = t20;
1753
+ } else t20 = $[36];
1754
+ let t21;
1755
+ if ($[37] !== t) {
1756
+ t21 = t("users.add");
1757
+ $[37] = t;
1758
+ $[38] = t21;
1759
+ } else t21 = $[38];
1760
+ let t22;
1761
+ if ($[39] !== t21) {
1762
+ t22 = /* @__PURE__ */ jsx(Action, {
1763
+ icon: t20,
1764
+ primary: true,
1765
+ children: t21
1766
+ });
1767
+ $[39] = t21;
1768
+ $[40] = t22;
1769
+ } else t22 = $[40];
1770
+ let t23;
1771
+ if ($[41] !== t13 || $[42] !== t17 || $[43] !== t19 || $[44] !== t22) {
1772
+ t23 = /* @__PURE__ */ jsxs(Actions, {
1773
+ more: t13,
1774
+ moreIcon: t14,
1775
+ children: [
1776
+ t17,
1777
+ t19,
1778
+ t22
1779
+ ]
1780
+ });
1781
+ $[41] = t13;
1782
+ $[42] = t17;
1783
+ $[43] = t19;
1784
+ $[44] = t22;
1785
+ $[45] = t23;
1786
+ } else t23 = $[45];
1787
+ let t24;
1788
+ if ($[46] !== t12 || $[47] !== t23 || $[48] !== t7 || $[49] !== t9) {
1789
+ t24 = /* @__PURE__ */ jsxs(Header, { children: [
1790
+ t7,
1791
+ t9,
1792
+ t10,
1793
+ t12,
1794
+ t23
1795
+ ] });
1796
+ $[46] = t12;
1797
+ $[47] = t23;
1798
+ $[48] = t7;
1799
+ $[49] = t9;
1800
+ $[50] = t24;
1801
+ } else t24 = $[50];
1802
+ let t25;
1803
+ if ($[51] !== t) {
1804
+ t25 = t("users.lists");
1805
+ $[51] = t;
1806
+ $[52] = t25;
1807
+ } else t25 = $[52];
1808
+ let t26;
1809
+ if ($[53] !== t) {
1810
+ t26 = t("views");
1811
+ $[53] = t;
1812
+ $[54] = t26;
1813
+ } else t26 = $[54];
1814
+ let t27;
1815
+ if ($[55] !== t) {
1816
+ t27 = t("noView");
1817
+ $[55] = t;
1818
+ $[56] = t27;
1819
+ } else t27 = $[56];
1820
+ let t28;
1821
+ if ($[57] !== t) {
1822
+ t28 = t("filterViews");
1823
+ $[57] = t;
1824
+ $[58] = t28;
1825
+ } else t28 = $[58];
1826
+ let t29;
1827
+ if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
1828
+ t29 = /* @__PURE__ */ jsx(ChevronsUpDownIcon, { size: "1em" });
1829
+ $[59] = t29;
1830
+ } else t29 = $[59];
1831
+ let t30;
1832
+ if ($[60] !== t) {
1833
+ t30 = VIEWS.map((t31) => {
1834
+ const { count, value } = t31;
1835
+ return /* @__PURE__ */ jsx(Tab, {
1836
+ count,
1837
+ value,
1838
+ children: t(`users.${value}`)
1839
+ }, value);
1840
+ });
1841
+ $[60] = t;
1842
+ $[61] = t30;
1843
+ } else t30 = $[61];
1844
+ let t31;
1845
+ if ($[62] !== t26 || $[63] !== t27 || $[64] !== t28 || $[65] !== t30 || $[66] !== view) {
1846
+ t31 = /* @__PURE__ */ jsx(TabList, {
1847
+ "aria-label": t26,
1848
+ emptyLabel: t27,
1849
+ filterLabel: t28,
1850
+ onValueChange: setView,
1851
+ pickerIcon: t29,
1852
+ value: view,
1853
+ children: t30
1854
+ });
1855
+ $[62] = t26;
1856
+ $[63] = t27;
1857
+ $[64] = t28;
1858
+ $[65] = t30;
1859
+ $[66] = view;
1860
+ $[67] = t31;
1861
+ } else t31 = $[67];
1862
+ let t32;
1863
+ if ($[68] !== t25 || $[69] !== t31) {
1864
+ t32 = /* @__PURE__ */ jsx(Nav, {
1865
+ "aria-label": t25,
1866
+ children: t31
1867
+ });
1868
+ $[68] = t25;
1869
+ $[69] = t31;
1870
+ $[70] = t32;
1871
+ } else t32 = $[70];
1872
+ const t33 = `users.bodies.${view}`;
1873
+ let t34;
1874
+ if ($[71] !== t || $[72] !== t33) {
1875
+ t34 = t(t33);
1876
+ $[71] = t;
1877
+ $[72] = t33;
1878
+ $[73] = t34;
1879
+ } else t34 = $[73];
1880
+ let t35;
1881
+ if ($[74] !== t34) {
1882
+ t35 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Text, {
1883
+ size: "sm",
1884
+ tone: "muted",
1885
+ children: t34
1886
+ }) });
1887
+ $[74] = t34;
1888
+ $[75] = t35;
1889
+ } else t35 = $[75];
1890
+ let t36;
1891
+ if ($[76] !== props || $[77] !== t24 || $[78] !== t32 || $[79] !== t35) {
1892
+ t36 = /* @__PURE__ */ jsxs(Root, {
1893
+ ...props,
1894
+ children: [
1895
+ t24,
1896
+ t32,
1897
+ t35
1898
+ ]
1899
+ });
1900
+ $[76] = props;
1901
+ $[77] = t24;
1902
+ $[78] = t32;
1903
+ $[79] = t35;
1904
+ $[80] = t36;
1905
+ } else t36 = $[80];
1906
+ return t36;
1907
+ }
1908
+ const source$1 = "import { type ReactElement, useState } from \"react\";\n\nimport {\n ArrowLeftIcon,\n ChevronRightIcon,\n ChevronsUpDownIcon,\n EllipsisIcon,\n PlusIcon,\n SettingsIcon,\n} from \"lucide-react\";\n\nimport { Badge } from \"@stealthscale/component-data\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nconst VIEWS: ReadonlyArray<{ readonly count?: number; readonly value: string }> = [\n { count: 412, value: \"all\" },\n { count: 9, value: \"invited\" },\n { value: \"suspended\" },\n];\n\nexport function Users(props: Page.RootProps): ReactElement {\n const { t } = useWords(\"page\");\n const [view, setView] = useState(\"all\");\n\n return (\n <Page.Root {...props}>\n <Page.Header>\n <Page.Breadcrumbs\n backIcon={<ArrowLeftIcon size=\"1em\" />}\n items={[\n { href: \"#ledger\", label: t(\"ledger\") },\n { href: \"#collections\", label: t(\"users.parent\") },\n ]}\n separator={<ChevronRightIcon size=\"1em\" />}\n />\n <Page.Title as=\"h3\">{t(\"users.title\")}</Page.Title>\n <Page.Meta when=\"wide\">\n <Badge palette=\"neutral\" size=\"sm\">\n 412\n </Badge>\n </Page.Meta>\n <Page.Description>{t(\"users.about\")}</Page.Description>\n <Page.Actions more={t(\"users.more\")} moreIcon={<EllipsisIcon size=\"1em\" />}>\n <Page.Action icon={<SettingsIcon size=\"1em\" />}>{t(\"users.settings\")}</Page.Action>\n <Page.Action>{t(\"users.preview\")}</Page.Action>\n <Page.Action icon={<PlusIcon size=\"1em\" />} primary>\n {t(\"users.add\")}\n </Page.Action>\n </Page.Actions>\n </Page.Header>\n <Page.Nav aria-label={t(\"users.lists\")}>\n <Page.TabList\n aria-label={t(\"views\")}\n emptyLabel={t(\"noView\")}\n filterLabel={t(\"filterViews\")}\n onValueChange={setView}\n pickerIcon={<ChevronsUpDownIcon size=\"1em\" />}\n value={view}\n >\n {VIEWS.map(({ count, value }) => (\n <Page.Tab count={count} key={value} value={value}>\n {t(`users.${value}`)}\n </Page.Tab>\n ))}\n </Page.TabList>\n </Page.Nav>\n <Page.Body>\n <Text size=\"sm\" tone=\"muted\">\n {t(`users.bodies.${view}`)}\n </Text>\n </Page.Body>\n </Page.Root>\n );\n}\n";
1909
+ //#endregion
1910
+ //#region src/page/examples/workspace.example.tsx
1911
+ var workspace_example_exports = /* @__PURE__ */ __exportAll({
1912
+ Workspace: () => Workspace,
1913
+ source: () => source
1914
+ });
1915
+ const HEADINGS = [
1916
+ "usage",
1917
+ "seats",
1918
+ "limits"
1919
+ ];
1920
+ function Workspace(props) {
1921
+ const $ = c(45);
1922
+ const { t } = useWords("page");
1923
+ let t0;
1924
+ if ($[0] !== t) {
1925
+ t0 = t("trial");
1926
+ $[0] = t;
1927
+ $[1] = t0;
1928
+ } else t0 = $[1];
1929
+ let t1;
1930
+ if ($[2] !== t0) {
1931
+ t1 = /* @__PURE__ */ jsx(Banner, { children: /* @__PURE__ */ jsx(Text, {
1932
+ size: "sm",
1933
+ children: t0
1934
+ }) });
1935
+ $[2] = t0;
1936
+ $[3] = t1;
1937
+ } else t1 = $[3];
1938
+ let t2;
1939
+ if ($[4] !== t) {
1940
+ t2 = t("workspace");
1941
+ $[4] = t;
1942
+ $[5] = t2;
1943
+ } else t2 = $[5];
1944
+ let t3;
1945
+ if ($[6] !== t2) {
1946
+ t3 = /* @__PURE__ */ jsx(Title, {
1947
+ as: "h3",
1948
+ children: t2
1949
+ });
1950
+ $[6] = t2;
1951
+ $[7] = t3;
1952
+ } else t3 = $[7];
1953
+ let t4;
1954
+ if ($[8] !== t) {
1955
+ t4 = t("workspaceAbout");
1956
+ $[8] = t;
1957
+ $[9] = t4;
1958
+ } else t4 = $[9];
1959
+ let t5;
1960
+ if ($[10] !== t4) {
1961
+ t5 = /* @__PURE__ */ jsx(Description, { children: t4 });
1962
+ $[10] = t4;
1963
+ $[11] = t5;
1964
+ } else t5 = $[11];
1965
+ let t6;
1966
+ if ($[12] !== t3 || $[13] !== t5) {
1967
+ t6 = /* @__PURE__ */ jsxs(Header, { children: [t3, t5] });
1968
+ $[12] = t3;
1969
+ $[13] = t5;
1970
+ $[14] = t6;
1971
+ } else t6 = $[14];
1972
+ let t7;
1973
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1974
+ t7 = /* @__PURE__ */ jsx(FilterIcon, { size: "1em" });
1975
+ $[15] = t7;
1976
+ } else t7 = $[15];
1977
+ let t8;
1978
+ if ($[16] !== t) {
1979
+ t8 = t("filter");
1980
+ $[16] = t;
1981
+ $[17] = t8;
1982
+ } else t8 = $[17];
1983
+ let t9;
1984
+ if ($[18] !== t8) {
1985
+ t9 = /* @__PURE__ */ jsx(Toolbar, {
1986
+ sticky: true,
1987
+ children: /* @__PURE__ */ jsxs(Button, {
1988
+ size: "sm",
1989
+ variant: "outline",
1990
+ children: [t7, t8]
1991
+ })
1992
+ });
1993
+ $[18] = t8;
1994
+ $[19] = t9;
1995
+ } else t9 = $[19];
1996
+ let t10;
1997
+ if ($[20] !== t) {
1998
+ t10 = t("workspaceBody");
1999
+ $[20] = t;
2000
+ $[21] = t10;
2001
+ } else t10 = $[21];
2002
+ let t11;
2003
+ if ($[22] !== t10) {
2004
+ t11 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Text, {
2005
+ size: "sm",
2006
+ tone: "muted",
2007
+ children: t10
2008
+ }) });
2009
+ $[22] = t10;
2010
+ $[23] = t11;
2011
+ } else t11 = $[23];
2012
+ let t12;
2013
+ if ($[24] !== t) {
2014
+ t12 = t("contents");
2015
+ $[24] = t;
2016
+ $[25] = t12;
2017
+ } else t12 = $[25];
2018
+ let t13;
2019
+ if ($[26] !== t) {
2020
+ t13 = HEADINGS.map((heading) => /* @__PURE__ */ jsx(Link, {
2021
+ href: `#${heading}`,
2022
+ children: t(heading)
2023
+ }, heading));
2024
+ $[26] = t;
2025
+ $[27] = t13;
2026
+ } else t13 = $[27];
2027
+ let t14;
2028
+ if ($[28] !== t13) {
2029
+ t14 = /* @__PURE__ */ jsx(Stack, {
2030
+ gap: "xs",
2031
+ children: t13
2032
+ });
2033
+ $[28] = t13;
2034
+ $[29] = t14;
2035
+ } else t14 = $[29];
2036
+ let t15;
2037
+ if ($[30] !== t12 || $[31] !== t14) {
2038
+ t15 = /* @__PURE__ */ jsx(Aside, {
2039
+ "aria-label": t12,
2040
+ folds: "hide",
2041
+ sticky: true,
2042
+ children: t14
2043
+ });
2044
+ $[30] = t12;
2045
+ $[31] = t14;
2046
+ $[32] = t15;
2047
+ } else t15 = $[32];
2048
+ let t16;
2049
+ if ($[33] !== t) {
2050
+ t16 = t("updated");
2051
+ $[33] = t;
2052
+ $[34] = t16;
2053
+ } else t16 = $[34];
2054
+ let t17;
2055
+ if ($[35] !== t16) {
2056
+ t17 = /* @__PURE__ */ jsx(Footer, { children: /* @__PURE__ */ jsx(Text, {
2057
+ size: "sm",
2058
+ tone: "muted",
2059
+ children: t16
2060
+ }) });
2061
+ $[35] = t16;
2062
+ $[36] = t17;
2063
+ } else t17 = $[36];
2064
+ let t18;
2065
+ if ($[37] !== props || $[38] !== t1 || $[39] !== t11 || $[40] !== t15 || $[41] !== t17 || $[42] !== t6 || $[43] !== t9) {
2066
+ t18 = /* @__PURE__ */ jsxs(Root, {
2067
+ ...props,
2068
+ children: [
2069
+ t1,
2070
+ t6,
2071
+ t9,
2072
+ t11,
2073
+ t15,
2074
+ t17
2075
+ ]
2076
+ });
2077
+ $[37] = props;
2078
+ $[38] = t1;
2079
+ $[39] = t11;
2080
+ $[40] = t15;
2081
+ $[41] = t17;
2082
+ $[42] = t6;
2083
+ $[43] = t9;
2084
+ $[44] = t18;
2085
+ } else t18 = $[44];
2086
+ return t18;
2087
+ }
2088
+ const source = "import { type ReactElement } from \"react\";\n\nimport { FilterIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { Link } from \"@stealthscale/component-navigation\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page } from \"@stealthscale/component-screen\";\n\nconst HEADINGS = [\"usage\", \"seats\", \"limits\"] as const;\n\nexport function Workspace(props: Page.RootProps): ReactElement {\n const { t } = useWords(\"page\");\n\n return (\n <Page.Root {...props}>\n <Page.Banner>\n <Text size=\"sm\">{t(\"trial\")}</Text>\n </Page.Banner>\n <Page.Header>\n <Page.Title as=\"h3\">{t(\"workspace\")}</Page.Title>\n <Page.Description>{t(\"workspaceAbout\")}</Page.Description>\n </Page.Header>\n <Page.Toolbar sticky>\n <Button size=\"sm\" variant=\"outline\">\n <FilterIcon size=\"1em\" />\n {t(\"filter\")}\n </Button>\n </Page.Toolbar>\n <Page.Body>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"workspaceBody\")}\n </Text>\n </Page.Body>\n <Page.Aside aria-label={t(\"contents\")} folds=\"hide\" sticky>\n <Stack gap=\"xs\">\n {HEADINGS.map((heading) => (\n <Link href={`#${heading}`} key={heading}>\n {t(heading)}\n </Link>\n ))}\n </Stack>\n </Page.Aside>\n <Page.Footer>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"updated\")}\n </Text>\n </Page.Footer>\n </Page.Root>\n );\n}\n";
2089
+ //#endregion
2090
+ //#region src/page/page.specimen.tsx
2091
+ /**
2092
+ * Renders an example in a screen box at the scene's width and in a room a phone's width.
2093
+ */
2094
+ function Both(t0) {
2095
+ const $ = c(7);
2096
+ const { page: Shown } = t0;
2097
+ let t1;
2098
+ if ($[0] !== Shown) {
2099
+ t1 = /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Shown, {}) });
2100
+ $[0] = Shown;
2101
+ $[1] = t1;
2102
+ } else t1 = $[1];
2103
+ let t2;
2104
+ if ($[2] !== Shown) {
2105
+ t2 = /* @__PURE__ */ jsx(Room, {
2106
+ size: "sm",
2107
+ children: /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Shown, {}) })
2108
+ });
2109
+ $[2] = Shown;
2110
+ $[3] = t2;
2111
+ } else t2 = $[3];
2112
+ let t3;
2113
+ if ($[4] !== t1 || $[5] !== t2) {
2114
+ t3 = /* @__PURE__ */ jsxs(Stack, {
2115
+ gap: "xl",
2116
+ children: [t1, t2]
2117
+ });
2118
+ $[4] = t1;
2119
+ $[5] = t2;
2120
+ $[6] = t3;
2121
+ } else t3 = $[6];
2122
+ return t3;
2123
+ }
2124
+ /**
2125
+ * Hand-written scene for a header and each of its parts.
2126
+ */
2127
+ const header = {
2128
+ about: "page.header.about",
2129
+ draw: () => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Deployment, {}) }),
2130
+ example: deployment_example_exports,
2131
+ title: "page.header.title"
2132
+ };
2133
+ /**
2134
+ * Hand-written scene for a page wide and folded at a phone's width.
2135
+ */
2136
+ const folding = {
2137
+ about: "page.folding.about",
2138
+ axes: ["folded"],
2139
+ draw: () => /* @__PURE__ */ jsx(Both, { page: Users }),
2140
+ example: users_example_exports,
2141
+ title: "page.folding.title"
2142
+ };
2143
+ /**
2144
+ * Hand-written scene for tabs and a toolbar on the navigation band.
2145
+ */
2146
+ const tabbed = {
2147
+ about: "page.tabbed.about",
2148
+ draw: () => /* @__PURE__ */ jsx(Both, { page: Tokens }),
2149
+ example: tokens_example_exports,
2150
+ title: "page.tabbed.title"
2151
+ };
2152
+ /**
2153
+ * Hand-written scene for the bands that stick while the page scrolls.
2154
+ */
2155
+ const sticking = {
2156
+ about: "page.sticking.about",
2157
+ draw: () => /* @__PURE__ */ jsx(Screen, {
2158
+ scrolls: true,
2159
+ size: "xs",
2160
+ children: /* @__PURE__ */ jsx(Notifications, {})
2161
+ }),
2162
+ example: notifications_example_exports,
2163
+ title: "page.sticking.title"
2164
+ };
2165
+ /**
2166
+ * Hand-written scene for links in the navigation band and the menu that replaces them.
2167
+ */
2168
+ const navigation = {
2169
+ about: "page.navigation.about",
2170
+ draw: () => /* @__PURE__ */ jsx(Both, { page: Settings }),
2171
+ example: settings_example_exports,
2172
+ title: "page.navigation.title"
2173
+ };
2174
+ /**
2175
+ * Hand-written scene for a sidebar of the page's own sections, beside the body and folded.
2176
+ */
2177
+ const sidebar = {
2178
+ about: "page.sidebar.about",
2179
+ draw: () => /* @__PURE__ */ jsx(Both, { page: Sections }),
2180
+ example: sections_example_exports,
2181
+ title: "page.sidebar.title"
2182
+ };
2183
+ /**
2184
+ * Hand-written scene for an aside of details beside a body that scrolls.
2185
+ */
2186
+ const aside = {
2187
+ about: "page.aside.about",
2188
+ draw: () => /* @__PURE__ */ jsx(Screen, {
2189
+ scrolls: true,
2190
+ size: "xs",
2191
+ children: /* @__PURE__ */ jsx(Incident, {})
2192
+ }),
2193
+ example: incident_example_exports,
2194
+ title: "page.aside.title"
2195
+ };
2196
+ /**
2197
+ * Hand-written scene for the banner, the toolbar band, the aside and the footer.
2198
+ */
2199
+ const bands = {
2200
+ about: "page.bands.about",
2201
+ draw: () => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Workspace, {}) }),
2202
+ example: workspace_example_exports,
2203
+ title: "page.bands.title"
2204
+ };
2205
+ /**
2206
+ * Measures the measures scene renders, from the narrowest.
2207
+ */
2208
+ const MEASURES = [
2209
+ "narrow",
2210
+ "wide",
2211
+ "full"
2212
+ ];
2213
+ /**
2214
+ * Hand-written scene for the three measures.
2215
+ */
2216
+ const measures = {
2217
+ about: "page.measure.about",
2218
+ axes: ["measure"],
2219
+ draw: () => /* @__PURE__ */ jsx(Stack, {
2220
+ gap: "xl",
2221
+ children: MEASURES.map((measure) => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Measured, { measure }) }, measure))
2222
+ }),
2223
+ example: measured_example_exports,
2224
+ props: { measure: "narrow" },
2225
+ title: "page.measure.title"
2226
+ };
2227
+ /**
2228
+ * Sizes the sizes scene renders, from the smallest.
2229
+ */
2230
+ const SIZES = [
2231
+ "sm",
2232
+ "md",
2233
+ "lg"
2234
+ ];
2235
+ /**
2236
+ * Hand-written scene for the three sizes.
2237
+ */
2238
+ const sizes = {
2239
+ about: "page.size.about",
2240
+ axes: ["size"],
2241
+ draw: () => /* @__PURE__ */ jsx(Stack, {
2242
+ gap: "xl",
2243
+ children: SIZES.map((size) => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Users, { size }) }, size))
2244
+ }),
2245
+ example: users_example_exports,
2246
+ props: { size: "sm" },
2247
+ title: "page.size.title"
2248
+ };
2249
+ /**
2250
+ * Hand-written scene for a page whose content is loading.
2251
+ */
2252
+ const loading = {
2253
+ about: "page.loading.about",
2254
+ draw: () => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Loading, {}) }),
2255
+ example: loading_example_exports,
2256
+ title: "page.loading.title"
2257
+ };
2258
+ /**
2259
+ * Hand-written scene for a page whose content failed to load.
2260
+ */
2261
+ const failed = {
2262
+ about: "page.failure.about",
2263
+ draw: () => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Failed, {}) }),
2264
+ example: failed_example_exports,
2265
+ title: "page.failure.title"
2266
+ };
2267
+ var page_specimen_default = specimen({
2268
+ about: "page.about",
2269
+ id: "components/screen/page",
2270
+ imports: "import { Page } from \"@stealthscale/component-screen\";",
2271
+ scenes: [
2272
+ header,
2273
+ folding,
2274
+ tabbed,
2275
+ sticking,
2276
+ measures,
2277
+ sizes,
2278
+ loading,
2279
+ failed,
2280
+ navigation,
2281
+ sidebar,
2282
+ aside,
2283
+ bands,
2284
+ ...scenesOf(recipe, {
2285
+ axes: {
2286
+ align: { direction: "column" },
2287
+ divided: { direction: "column" },
2288
+ gutter: { direction: "column" }
2289
+ },
2290
+ draw: (props) => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Measured, { ...props }) }),
2291
+ example: measured_example_exports,
2292
+ namespace: "page",
2293
+ order: [
2294
+ "gutter",
2295
+ "align",
2296
+ "divided"
2297
+ ],
2298
+ skip: {
2299
+ folded: "The page sets folded from its own width, and the folding scene renders it.",
2300
+ measure: "The measures scene renders every measure in a box wider than the narrow one.",
2301
+ size: "The sizes scene renders every size with its tabs and actions."
2302
+ }
2303
+ })
2304
+ ],
2305
+ title: "page.title"
2306
+ });
2307
+ //#endregion
2308
+ export { aside, bands, page_specimen_default as default, failed, folding, header, loading, measures, navigation, sidebar, sizes, sticking, tabbed };