@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,1563 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { r as recipe } from "../../recipes-Cmy1leBm.js";
3
+ import { C as ResizeTrigger, S as Root, T as useSplitter, w as Panel } 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 { useState } from "react";
8
+ import { ScrollArea } from "@stealthscale/component-primitives";
9
+ import { NavList } from "@stealthscale/component-navigation";
10
+ import { Switch } from "@stealthscale/component-forms";
11
+ import { Group, Stack } from "@stealthscale/component-layout";
12
+ import { Focused, Screen, scenesOf, specimen, useWords } from "@stealthscale/specimen";
13
+ import { FileTextIcon, PanelLeftIcon, RotateCcwIcon } from "lucide-react";
14
+ import { Code, Heading, Text } from "@stealthscale/component-typography";
15
+ //#region src/splitter/examples/basic.example.tsx
16
+ var basic_example_exports = /* @__PURE__ */ __exportAll({
17
+ Basic: () => Basic,
18
+ source: () => source$6
19
+ });
20
+ function pane$2(title, text) {
21
+ return /* @__PURE__ */ jsxs(ScrollArea.Root, {
22
+ inset: "md",
23
+ children: [/* @__PURE__ */ jsx(ScrollArea.Viewport, {
24
+ "aria-label": title,
25
+ children: /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsxs(Stack, {
26
+ gap: "xs",
27
+ children: [/* @__PURE__ */ jsx(Text, {
28
+ weight: "semibold",
29
+ children: title
30
+ }), /* @__PURE__ */ jsx(Text, {
31
+ size: "sm",
32
+ tone: "muted",
33
+ children: text
34
+ })]
35
+ }) })
36
+ }), /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {})]
37
+ });
38
+ }
39
+ function Basic(props) {
40
+ const $ = c(19);
41
+ const { t } = useWords("splitter");
42
+ let t0;
43
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
44
+ t0 = {
45
+ defaultSize: [40, 60],
46
+ panels: [{
47
+ id: "offers",
48
+ minSize: 25
49
+ }, {
50
+ id: "detail",
51
+ minSize: 30
52
+ }]
53
+ };
54
+ $[0] = t0;
55
+ } else t0 = $[0];
56
+ const splitter = useSplitter(t0);
57
+ let t1;
58
+ if ($[1] !== t) {
59
+ t1 = pane$2(t("basic.offers"), t("basic.waiting"));
60
+ $[1] = t;
61
+ $[2] = t1;
62
+ } else t1 = $[2];
63
+ let t2;
64
+ if ($[3] !== t1) {
65
+ t2 = /* @__PURE__ */ jsx(Panel, {
66
+ id: "offers",
67
+ children: t1
68
+ });
69
+ $[3] = t1;
70
+ $[4] = t2;
71
+ } else t2 = $[4];
72
+ let t3;
73
+ if ($[5] !== t) {
74
+ t3 = t("basic.resize");
75
+ $[5] = t;
76
+ $[6] = t3;
77
+ } else t3 = $[6];
78
+ let t4;
79
+ if ($[7] !== t3) {
80
+ t4 = /* @__PURE__ */ jsx(ResizeTrigger, {
81
+ id: "offers:detail",
82
+ label: t3
83
+ });
84
+ $[7] = t3;
85
+ $[8] = t4;
86
+ } else t4 = $[8];
87
+ let t5;
88
+ if ($[9] !== t) {
89
+ t5 = pane$2(t("basic.detail"), t("basic.empty"));
90
+ $[9] = t;
91
+ $[10] = t5;
92
+ } else t5 = $[10];
93
+ let t6;
94
+ if ($[11] !== t5) {
95
+ t6 = /* @__PURE__ */ jsx(Panel, {
96
+ id: "detail",
97
+ children: t5
98
+ });
99
+ $[11] = t5;
100
+ $[12] = t6;
101
+ } else t6 = $[12];
102
+ let t7;
103
+ if ($[13] !== props || $[14] !== splitter || $[15] !== t2 || $[16] !== t4 || $[17] !== t6) {
104
+ t7 = /* @__PURE__ */ jsxs(Root, {
105
+ splitter,
106
+ ...props,
107
+ children: [
108
+ t2,
109
+ t4,
110
+ t6
111
+ ]
112
+ });
113
+ $[13] = props;
114
+ $[14] = splitter;
115
+ $[15] = t2;
116
+ $[16] = t4;
117
+ $[17] = t6;
118
+ $[18] = t7;
119
+ } else t7 = $[18];
120
+ return t7;
121
+ }
122
+ const source$6 = "import { type ReactElement } from \"react\";\n\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { ScrollArea } from \"@stealthscale/component-primitives\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Splitter } from \"@stealthscale/component-screen\";\n\nfunction pane(title: string, text: string): ReactElement {\n return (\n <ScrollArea.Root inset=\"md\">\n <ScrollArea.Viewport aria-label={title}>\n <ScrollArea.Content>\n <Stack gap=\"xs\">\n <Text weight=\"semibold\">{title}</Text>\n <Text size=\"sm\" tone=\"muted\">\n {text}\n </Text>\n </Stack>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n );\n}\n\nexport function Basic(props: Omit<Splitter.RootProps, \"splitter\">): ReactElement {\n const { t } = useWords(\"splitter\");\n const splitter = Splitter.useSplitter({\n defaultSize: [40, 60],\n panels: [\n { id: \"offers\", minSize: 25 },\n { id: \"detail\", minSize: 30 },\n ],\n });\n\n return (\n <Splitter.Root splitter={splitter} {...props}>\n <Splitter.Panel id=\"offers\">{pane(t(\"basic.offers\"), t(\"basic.waiting\"))}</Splitter.Panel>\n <Splitter.ResizeTrigger id=\"offers:detail\" label={t(\"basic.resize\")} />\n <Splitter.Panel id=\"detail\">{pane(t(\"basic.detail\"), t(\"basic.empty\"))}</Splitter.Panel>\n </Splitter.Root>\n );\n}\n";
123
+ //#endregion
124
+ //#region src/splitter/examples/controlled.example.tsx
125
+ var controlled_example_exports = /* @__PURE__ */ __exportAll({
126
+ Controlled: () => Controlled,
127
+ source: () => source$5
128
+ });
129
+ const FIRST = [50, 50];
130
+ function Controlled() {
131
+ const $ = c(77);
132
+ const { t } = useWords("splitter");
133
+ const [size, setSize] = useState(FIRST);
134
+ let t0;
135
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
136
+ t0 = () => {
137
+ setSize(FIRST);
138
+ };
139
+ $[0] = t0;
140
+ } else t0 = $[0];
141
+ const reset = t0;
142
+ let t1;
143
+ let t2;
144
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
145
+ t1 = (details) => {
146
+ setSize(details.size);
147
+ };
148
+ t2 = [{
149
+ id: "chart",
150
+ minSize: 20
151
+ }, {
152
+ id: "table",
153
+ minSize: 20
154
+ }];
155
+ $[1] = t1;
156
+ $[2] = t2;
157
+ } else {
158
+ t1 = $[1];
159
+ t2 = $[2];
160
+ }
161
+ let t3;
162
+ if ($[3] !== size) {
163
+ t3 = {
164
+ onResize: t1,
165
+ panels: t2,
166
+ size
167
+ };
168
+ $[3] = size;
169
+ $[4] = t3;
170
+ } else t3 = $[4];
171
+ const splitter = useSplitter(t3);
172
+ let T0;
173
+ let T1;
174
+ let T2;
175
+ let T3;
176
+ let T4;
177
+ let T5;
178
+ let T6;
179
+ let t10;
180
+ let t11;
181
+ let t4;
182
+ let t5;
183
+ let t6;
184
+ let t7;
185
+ let t8;
186
+ let t9;
187
+ if ($[5] !== splitter || $[6] !== t) {
188
+ const [t12, t13] = splitter.getSizes();
189
+ const chart = t12 === void 0 ? 0 : t12;
190
+ const table = t13 === void 0 ? 0 : t13;
191
+ T6 = Root;
192
+ t11 = splitter;
193
+ T5 = Panel;
194
+ t10 = "chart";
195
+ T4 = ScrollArea.Root;
196
+ t9 = "md";
197
+ T3 = ScrollArea.Viewport;
198
+ if ($[22] !== t) {
199
+ t8 = t("controlled.chart");
200
+ $[22] = t;
201
+ $[23] = t8;
202
+ } else t8 = $[23];
203
+ T2 = ScrollArea.Content;
204
+ T1 = Stack;
205
+ t6 = "flex-start";
206
+ t7 = "sm";
207
+ T0 = Text;
208
+ t4 = "output";
209
+ t5 = t("controlled.sizes", {
210
+ chart: Math.round(chart),
211
+ table: Math.round(table)
212
+ });
213
+ $[5] = splitter;
214
+ $[6] = t;
215
+ $[7] = T0;
216
+ $[8] = T1;
217
+ $[9] = T2;
218
+ $[10] = T3;
219
+ $[11] = T4;
220
+ $[12] = T5;
221
+ $[13] = T6;
222
+ $[14] = t10;
223
+ $[15] = t11;
224
+ $[16] = t4;
225
+ $[17] = t5;
226
+ $[18] = t6;
227
+ $[19] = t7;
228
+ $[20] = t8;
229
+ $[21] = t9;
230
+ } else {
231
+ T0 = $[7];
232
+ T1 = $[8];
233
+ T2 = $[9];
234
+ T3 = $[10];
235
+ T4 = $[11];
236
+ T5 = $[12];
237
+ T6 = $[13];
238
+ t10 = $[14];
239
+ t11 = $[15];
240
+ t4 = $[16];
241
+ t5 = $[17];
242
+ t6 = $[18];
243
+ t7 = $[19];
244
+ t8 = $[20];
245
+ t9 = $[21];
246
+ }
247
+ let t12;
248
+ if ($[24] !== T0 || $[25] !== t4 || $[26] !== t5) {
249
+ t12 = /* @__PURE__ */ jsx(T0, {
250
+ as: t4,
251
+ children: t5
252
+ });
253
+ $[24] = T0;
254
+ $[25] = t4;
255
+ $[26] = t5;
256
+ $[27] = t12;
257
+ } else t12 = $[27];
258
+ let t13;
259
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
260
+ t13 = /* @__PURE__ */ jsx(RotateCcwIcon, {});
261
+ $[28] = t13;
262
+ } else t13 = $[28];
263
+ let t14;
264
+ if ($[29] !== t) {
265
+ t14 = t("controlled.reset");
266
+ $[29] = t;
267
+ $[30] = t14;
268
+ } else t14 = $[30];
269
+ let t15;
270
+ if ($[31] !== t14) {
271
+ t15 = /* @__PURE__ */ jsxs(Button, {
272
+ onClick: reset,
273
+ size: "sm",
274
+ variant: "outline",
275
+ children: [t13, t14]
276
+ });
277
+ $[31] = t14;
278
+ $[32] = t15;
279
+ } else t15 = $[32];
280
+ let t16;
281
+ if ($[33] !== T1 || $[34] !== t12 || $[35] !== t15 || $[36] !== t6 || $[37] !== t7) {
282
+ t16 = /* @__PURE__ */ jsxs(T1, {
283
+ align: t6,
284
+ gap: t7,
285
+ children: [t12, t15]
286
+ });
287
+ $[33] = T1;
288
+ $[34] = t12;
289
+ $[35] = t15;
290
+ $[36] = t6;
291
+ $[37] = t7;
292
+ $[38] = t16;
293
+ } else t16 = $[38];
294
+ let t17;
295
+ if ($[39] !== T2 || $[40] !== t16) {
296
+ t17 = /* @__PURE__ */ jsx(T2, { children: t16 });
297
+ $[39] = T2;
298
+ $[40] = t16;
299
+ $[41] = t17;
300
+ } else t17 = $[41];
301
+ let t18;
302
+ if ($[42] !== T3 || $[43] !== t17 || $[44] !== t8) {
303
+ t18 = /* @__PURE__ */ jsx(T3, {
304
+ "aria-label": t8,
305
+ children: t17
306
+ });
307
+ $[42] = T3;
308
+ $[43] = t17;
309
+ $[44] = t8;
310
+ $[45] = t18;
311
+ } else t18 = $[45];
312
+ let t19;
313
+ if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
314
+ t19 = /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {});
315
+ $[46] = t19;
316
+ } else t19 = $[46];
317
+ let t20;
318
+ if ($[47] !== T4 || $[48] !== t18 || $[49] !== t9) {
319
+ t20 = /* @__PURE__ */ jsxs(T4, {
320
+ inset: t9,
321
+ children: [t18, t19]
322
+ });
323
+ $[47] = T4;
324
+ $[48] = t18;
325
+ $[49] = t9;
326
+ $[50] = t20;
327
+ } else t20 = $[50];
328
+ let t21;
329
+ if ($[51] !== T5 || $[52] !== t10 || $[53] !== t20) {
330
+ t21 = /* @__PURE__ */ jsx(T5, {
331
+ id: t10,
332
+ children: t20
333
+ });
334
+ $[51] = T5;
335
+ $[52] = t10;
336
+ $[53] = t20;
337
+ $[54] = t21;
338
+ } else t21 = $[54];
339
+ let t22;
340
+ if ($[55] !== t) {
341
+ t22 = t("controlled.resize");
342
+ $[55] = t;
343
+ $[56] = t22;
344
+ } else t22 = $[56];
345
+ let t23;
346
+ if ($[57] !== t22) {
347
+ t23 = /* @__PURE__ */ jsx(ResizeTrigger, {
348
+ id: "chart:table",
349
+ label: t22,
350
+ onDoubleClick: reset
351
+ });
352
+ $[57] = t22;
353
+ $[58] = t23;
354
+ } else t23 = $[58];
355
+ let t24;
356
+ if ($[59] !== t) {
357
+ t24 = t("controlled.table");
358
+ $[59] = t;
359
+ $[60] = t24;
360
+ } else t24 = $[60];
361
+ let t25;
362
+ if ($[61] !== t) {
363
+ t25 = t("controlled.hint");
364
+ $[61] = t;
365
+ $[62] = t25;
366
+ } else t25 = $[62];
367
+ let t26;
368
+ if ($[63] !== t25) {
369
+ t26 = /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsx(Text, {
370
+ size: "sm",
371
+ tone: "muted",
372
+ children: t25
373
+ }) });
374
+ $[63] = t25;
375
+ $[64] = t26;
376
+ } else t26 = $[64];
377
+ let t27;
378
+ if ($[65] !== t24 || $[66] !== t26) {
379
+ t27 = /* @__PURE__ */ jsx(ScrollArea.Viewport, {
380
+ "aria-label": t24,
381
+ children: t26
382
+ });
383
+ $[65] = t24;
384
+ $[66] = t26;
385
+ $[67] = t27;
386
+ } else t27 = $[67];
387
+ let t28;
388
+ if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
389
+ t28 = /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {});
390
+ $[68] = t28;
391
+ } else t28 = $[68];
392
+ let t29;
393
+ if ($[69] !== t27) {
394
+ t29 = /* @__PURE__ */ jsx(Panel, {
395
+ id: "table",
396
+ children: /* @__PURE__ */ jsxs(ScrollArea.Root, {
397
+ inset: "md",
398
+ children: [t27, t28]
399
+ })
400
+ });
401
+ $[69] = t27;
402
+ $[70] = t29;
403
+ } else t29 = $[70];
404
+ let t30;
405
+ if ($[71] !== T6 || $[72] !== t11 || $[73] !== t21 || $[74] !== t23 || $[75] !== t29) {
406
+ t30 = /* @__PURE__ */ jsxs(T6, {
407
+ splitter: t11,
408
+ children: [
409
+ t21,
410
+ t23,
411
+ t29
412
+ ]
413
+ });
414
+ $[71] = T6;
415
+ $[72] = t11;
416
+ $[73] = t21;
417
+ $[74] = t23;
418
+ $[75] = t29;
419
+ $[76] = t30;
420
+ } else t30 = $[76];
421
+ return t30;
422
+ }
423
+ const source$5 = "import { type ReactElement, useState } from \"react\";\n\nimport { RotateCcwIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { ScrollArea } from \"@stealthscale/component-primitives\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Splitter } from \"@stealthscale/component-screen\";\n\nconst FIRST: Splitter.PanelSize[] = [50, 50];\n\nexport function Controlled(): ReactElement {\n const { t } = useWords(\"splitter\");\n const [size, setSize] = useState(FIRST);\n const reset = (): void => {\n setSize(FIRST);\n };\n const splitter = Splitter.useSplitter({\n onResize: (details) => {\n setSize(details.size);\n },\n panels: [\n { id: \"chart\", minSize: 20 },\n { id: \"table\", minSize: 20 },\n ],\n size,\n });\n const [chart = 0, table = 0] = splitter.getSizes();\n\n return (\n <Splitter.Root splitter={splitter}>\n <Splitter.Panel id=\"chart\">\n <ScrollArea.Root inset=\"md\">\n <ScrollArea.Viewport aria-label={t(\"controlled.chart\")}>\n <ScrollArea.Content>\n <Stack align=\"flex-start\" gap=\"sm\">\n <Text as=\"output\">\n {t(\"controlled.sizes\", { chart: Math.round(chart), table: Math.round(table) })}\n </Text>\n <Button onClick={reset} size=\"sm\" variant=\"outline\">\n <RotateCcwIcon />\n {t(\"controlled.reset\")}\n </Button>\n </Stack>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n </Splitter.Panel>\n <Splitter.ResizeTrigger\n id=\"chart:table\"\n label={t(\"controlled.resize\")}\n onDoubleClick={reset}\n />\n <Splitter.Panel id=\"table\">\n <ScrollArea.Root inset=\"md\">\n <ScrollArea.Viewport aria-label={t(\"controlled.table\")}>\n <ScrollArea.Content>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"controlled.hint\")}\n </Text>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n </Splitter.Panel>\n </Splitter.Root>\n );\n}\n";
424
+ //#endregion
425
+ //#region src/splitter/examples/locked.example.tsx
426
+ var locked_example_exports = /* @__PURE__ */ __exportAll({
427
+ Locked: () => Locked,
428
+ source: () => source$4
429
+ });
430
+ function Locked() {
431
+ const $ = c(47);
432
+ const { t } = useWords("splitter");
433
+ const [editing, setEditing] = useState(false);
434
+ let t0;
435
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
436
+ t0 = {
437
+ defaultSize: [60, 40],
438
+ panels: [{
439
+ id: "revenue",
440
+ minSize: 30
441
+ }, {
442
+ id: "activity",
443
+ minSize: 25
444
+ }]
445
+ };
446
+ $[0] = t0;
447
+ } else t0 = $[0];
448
+ const splitter = useSplitter(t0);
449
+ let t1;
450
+ if ($[1] !== t) {
451
+ t1 = t("locked.revenue");
452
+ $[1] = t;
453
+ $[2] = t1;
454
+ } else t1 = $[2];
455
+ let t2;
456
+ if ($[3] !== t) {
457
+ t2 = t("locked.revenue");
458
+ $[3] = t;
459
+ $[4] = t2;
460
+ } else t2 = $[4];
461
+ let t3;
462
+ if ($[5] !== t2) {
463
+ t3 = /* @__PURE__ */ jsx(Text, {
464
+ weight: "semibold",
465
+ children: t2
466
+ });
467
+ $[5] = t2;
468
+ $[6] = t3;
469
+ } else t3 = $[6];
470
+ let t4;
471
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
472
+ t4 = (details) => {
473
+ setEditing(details.checked);
474
+ };
475
+ $[7] = t4;
476
+ } else t4 = $[7];
477
+ let t5;
478
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
479
+ t5 = /* @__PURE__ */ jsx(Switch.Control, { children: /* @__PURE__ */ jsx(Switch.Thumb, {}) });
480
+ $[8] = t5;
481
+ } else t5 = $[8];
482
+ let t6;
483
+ if ($[9] !== t) {
484
+ t6 = t("locked.edit");
485
+ $[9] = t;
486
+ $[10] = t6;
487
+ } else t6 = $[10];
488
+ let t7;
489
+ if ($[11] !== t6) {
490
+ t7 = /* @__PURE__ */ jsx(Switch.Label, { children: t6 });
491
+ $[11] = t6;
492
+ $[12] = t7;
493
+ } else t7 = $[12];
494
+ let t8;
495
+ if ($[13] !== editing || $[14] !== t7) {
496
+ t8 = /* @__PURE__ */ jsxs(Switch.Root, {
497
+ checked: editing,
498
+ onCheckedChange: t4,
499
+ children: [t5, t7]
500
+ });
501
+ $[13] = editing;
502
+ $[14] = t7;
503
+ $[15] = t8;
504
+ } else t8 = $[15];
505
+ let t9;
506
+ if ($[16] !== t3 || $[17] !== t8) {
507
+ t9 = /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsxs(Stack, {
508
+ align: "flex-start",
509
+ gap: "sm",
510
+ children: [t3, t8]
511
+ }) });
512
+ $[16] = t3;
513
+ $[17] = t8;
514
+ $[18] = t9;
515
+ } else t9 = $[18];
516
+ let t10;
517
+ if ($[19] !== t1 || $[20] !== t9) {
518
+ t10 = /* @__PURE__ */ jsx(ScrollArea.Viewport, {
519
+ "aria-label": t1,
520
+ children: t9
521
+ });
522
+ $[19] = t1;
523
+ $[20] = t9;
524
+ $[21] = t10;
525
+ } else t10 = $[21];
526
+ let t11;
527
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
528
+ t11 = /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {});
529
+ $[22] = t11;
530
+ } else t11 = $[22];
531
+ let t12;
532
+ if ($[23] !== t10) {
533
+ t12 = /* @__PURE__ */ jsx(Panel, {
534
+ id: "revenue",
535
+ children: /* @__PURE__ */ jsxs(ScrollArea.Root, {
536
+ inset: "md",
537
+ children: [t10, t11]
538
+ })
539
+ });
540
+ $[23] = t10;
541
+ $[24] = t12;
542
+ } else t12 = $[24];
543
+ const t13 = !editing;
544
+ let t14;
545
+ if ($[25] !== t) {
546
+ t14 = t("locked.resize");
547
+ $[25] = t;
548
+ $[26] = t14;
549
+ } else t14 = $[26];
550
+ let t15;
551
+ if ($[27] !== t13 || $[28] !== t14) {
552
+ t15 = /* @__PURE__ */ jsx(ResizeTrigger, {
553
+ disabled: t13,
554
+ id: "revenue:activity",
555
+ label: t14
556
+ });
557
+ $[27] = t13;
558
+ $[28] = t14;
559
+ $[29] = t15;
560
+ } else t15 = $[29];
561
+ let t16;
562
+ if ($[30] !== t) {
563
+ t16 = t("locked.activity");
564
+ $[30] = t;
565
+ $[31] = t16;
566
+ } else t16 = $[31];
567
+ let t17;
568
+ if ($[32] !== t) {
569
+ t17 = t("locked.activityText");
570
+ $[32] = t;
571
+ $[33] = t17;
572
+ } else t17 = $[33];
573
+ let t18;
574
+ if ($[34] !== t17) {
575
+ t18 = /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsx(Text, {
576
+ size: "sm",
577
+ tone: "muted",
578
+ children: t17
579
+ }) });
580
+ $[34] = t17;
581
+ $[35] = t18;
582
+ } else t18 = $[35];
583
+ let t19;
584
+ if ($[36] !== t16 || $[37] !== t18) {
585
+ t19 = /* @__PURE__ */ jsx(ScrollArea.Viewport, {
586
+ "aria-label": t16,
587
+ children: t18
588
+ });
589
+ $[36] = t16;
590
+ $[37] = t18;
591
+ $[38] = t19;
592
+ } else t19 = $[38];
593
+ let t20;
594
+ if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
595
+ t20 = /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {});
596
+ $[39] = t20;
597
+ } else t20 = $[39];
598
+ let t21;
599
+ if ($[40] !== t19) {
600
+ t21 = /* @__PURE__ */ jsx(Panel, {
601
+ id: "activity",
602
+ children: /* @__PURE__ */ jsxs(ScrollArea.Root, {
603
+ inset: "md",
604
+ children: [t19, t20]
605
+ })
606
+ });
607
+ $[40] = t19;
608
+ $[41] = t21;
609
+ } else t21 = $[41];
610
+ let t22;
611
+ if ($[42] !== splitter || $[43] !== t12 || $[44] !== t15 || $[45] !== t21) {
612
+ t22 = /* @__PURE__ */ jsxs(Root, {
613
+ splitter,
614
+ children: [
615
+ t12,
616
+ t15,
617
+ t21
618
+ ]
619
+ });
620
+ $[42] = splitter;
621
+ $[43] = t12;
622
+ $[44] = t15;
623
+ $[45] = t21;
624
+ $[46] = t22;
625
+ } else t22 = $[46];
626
+ return t22;
627
+ }
628
+ const source$4 = "import { type ReactElement, useState } from \"react\";\n\nimport { Switch } from \"@stealthscale/component-forms\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { ScrollArea } from \"@stealthscale/component-primitives\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Splitter } from \"@stealthscale/component-screen\";\n\nexport function Locked(): ReactElement {\n const { t } = useWords(\"splitter\");\n const [editing, setEditing] = useState(false);\n const splitter = Splitter.useSplitter({\n defaultSize: [60, 40],\n panels: [\n { id: \"revenue\", minSize: 30 },\n { id: \"activity\", minSize: 25 },\n ],\n });\n\n return (\n <Splitter.Root splitter={splitter}>\n <Splitter.Panel id=\"revenue\">\n <ScrollArea.Root inset=\"md\">\n <ScrollArea.Viewport aria-label={t(\"locked.revenue\")}>\n <ScrollArea.Content>\n <Stack align=\"flex-start\" gap=\"sm\">\n <Text weight=\"semibold\">{t(\"locked.revenue\")}</Text>\n <Switch.Root\n checked={editing}\n onCheckedChange={(details) => {\n setEditing(details.checked);\n }}\n >\n <Switch.Control>\n <Switch.Thumb />\n </Switch.Control>\n <Switch.Label>{t(\"locked.edit\")}</Switch.Label>\n </Switch.Root>\n </Stack>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n </Splitter.Panel>\n <Splitter.ResizeTrigger\n disabled={!editing}\n id=\"revenue:activity\"\n label={t(\"locked.resize\")}\n />\n <Splitter.Panel id=\"activity\">\n <ScrollArea.Root inset=\"md\">\n <ScrollArea.Viewport aria-label={t(\"locked.activity\")}>\n <ScrollArea.Content>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"locked.activityText\")}\n </Text>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n </Splitter.Panel>\n </Splitter.Root>\n );\n}\n";
629
+ //#endregion
630
+ //#region src/splitter/examples/mail.example.tsx
631
+ var mail_example_exports = /* @__PURE__ */ __exportAll({
632
+ Mail: () => Mail,
633
+ source: () => source$3
634
+ });
635
+ const FOLDERS = [
636
+ "inbox",
637
+ "sent",
638
+ "archive"
639
+ ];
640
+ const MESSAGES = [
641
+ "invoice",
642
+ "standup",
643
+ "offsite"
644
+ ];
645
+ function pane$1(title, lines) {
646
+ return /* @__PURE__ */ jsxs(ScrollArea.Root, {
647
+ inset: "md",
648
+ children: [/* @__PURE__ */ jsx(ScrollArea.Viewport, {
649
+ "aria-label": title,
650
+ children: /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsxs(Stack, {
651
+ gap: "xs",
652
+ children: [/* @__PURE__ */ jsx(Text, {
653
+ weight: "semibold",
654
+ children: title
655
+ }), lines.map((line) => /* @__PURE__ */ jsx(Text, {
656
+ size: "sm",
657
+ tone: "muted",
658
+ children: line
659
+ }, line))]
660
+ }) })
661
+ }), /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {})]
662
+ });
663
+ }
664
+ function Mail() {
665
+ const $ = c(40);
666
+ const { t } = useWords("splitter");
667
+ let t0;
668
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
669
+ t0 = {
670
+ defaultSize: ["160px", 35],
671
+ panels: [
672
+ {
673
+ id: "folders",
674
+ maxSize: "280px",
675
+ minSize: "112px",
676
+ resizeBehavior: "preserve-pixel-size"
677
+ },
678
+ {
679
+ id: "messages",
680
+ minSize: 25
681
+ },
682
+ {
683
+ id: "message",
684
+ minSize: 30
685
+ }
686
+ ]
687
+ };
688
+ $[0] = t0;
689
+ } else t0 = $[0];
690
+ const splitter = useSplitter(t0);
691
+ let T0;
692
+ let T1;
693
+ let t1;
694
+ let t2;
695
+ let t3;
696
+ let t4;
697
+ let t5;
698
+ if ($[1] !== splitter || $[2] !== t) {
699
+ let t6;
700
+ if ($[10] !== t) {
701
+ t6 = (folder) => t(`mail.folders.${folder}`);
702
+ $[10] = t;
703
+ $[11] = t6;
704
+ } else t6 = $[11];
705
+ const folders = FOLDERS.map(t6);
706
+ let t7;
707
+ if ($[12] !== t) {
708
+ t7 = (message) => t(`mail.messages.${message}`);
709
+ $[12] = t;
710
+ $[13] = t7;
711
+ } else t7 = $[13];
712
+ const messages = MESSAGES.map(t7);
713
+ T1 = Root;
714
+ t3 = splitter;
715
+ const t8 = pane$1(t("mail.folder"), folders);
716
+ if ($[14] !== t8) {
717
+ t4 = /* @__PURE__ */ jsx(Panel, {
718
+ id: "folders",
719
+ children: t8
720
+ });
721
+ $[14] = t8;
722
+ $[15] = t4;
723
+ } else t4 = $[15];
724
+ let t9;
725
+ if ($[16] !== t) {
726
+ t9 = t("mail.resizeFolders");
727
+ $[16] = t;
728
+ $[17] = t9;
729
+ } else t9 = $[17];
730
+ if ($[18] !== t9) {
731
+ t5 = /* @__PURE__ */ jsx(ResizeTrigger, {
732
+ id: "folders:messages",
733
+ label: t9
734
+ });
735
+ $[18] = t9;
736
+ $[19] = t5;
737
+ } else t5 = $[19];
738
+ T0 = Panel;
739
+ t1 = "messages";
740
+ t2 = pane$1(t("mail.inbox"), messages);
741
+ $[1] = splitter;
742
+ $[2] = t;
743
+ $[3] = T0;
744
+ $[4] = T1;
745
+ $[5] = t1;
746
+ $[6] = t2;
747
+ $[7] = t3;
748
+ $[8] = t4;
749
+ $[9] = t5;
750
+ } else {
751
+ T0 = $[3];
752
+ T1 = $[4];
753
+ t1 = $[5];
754
+ t2 = $[6];
755
+ t3 = $[7];
756
+ t4 = $[8];
757
+ t5 = $[9];
758
+ }
759
+ let t6;
760
+ if ($[20] !== T0 || $[21] !== t1 || $[22] !== t2) {
761
+ t6 = /* @__PURE__ */ jsx(T0, {
762
+ id: t1,
763
+ children: t2
764
+ });
765
+ $[20] = T0;
766
+ $[21] = t1;
767
+ $[22] = t2;
768
+ $[23] = t6;
769
+ } else t6 = $[23];
770
+ let t7;
771
+ if ($[24] !== t) {
772
+ t7 = t("mail.resizeMessages");
773
+ $[24] = t;
774
+ $[25] = t7;
775
+ } else t7 = $[25];
776
+ let t8;
777
+ if ($[26] !== t7) {
778
+ t8 = /* @__PURE__ */ jsx(ResizeTrigger, {
779
+ id: "messages:message",
780
+ label: t7
781
+ });
782
+ $[26] = t7;
783
+ $[27] = t8;
784
+ } else t8 = $[27];
785
+ let t9;
786
+ if ($[28] !== t) {
787
+ t9 = pane$1(t("mail.subject"), [t("mail.body")]);
788
+ $[28] = t;
789
+ $[29] = t9;
790
+ } else t9 = $[29];
791
+ let t10;
792
+ if ($[30] !== t9) {
793
+ t10 = /* @__PURE__ */ jsx(Panel, {
794
+ id: "message",
795
+ children: t9
796
+ });
797
+ $[30] = t9;
798
+ $[31] = t10;
799
+ } else t10 = $[31];
800
+ let t11;
801
+ if ($[32] !== T1 || $[33] !== t10 || $[34] !== t3 || $[35] !== t4 || $[36] !== t5 || $[37] !== t6 || $[38] !== t8) {
802
+ t11 = /* @__PURE__ */ jsxs(T1, {
803
+ splitter: t3,
804
+ children: [
805
+ t4,
806
+ t5,
807
+ t6,
808
+ t8,
809
+ t10
810
+ ]
811
+ });
812
+ $[32] = T1;
813
+ $[33] = t10;
814
+ $[34] = t3;
815
+ $[35] = t4;
816
+ $[36] = t5;
817
+ $[37] = t6;
818
+ $[38] = t8;
819
+ $[39] = t11;
820
+ } else t11 = $[39];
821
+ return t11;
822
+ }
823
+ const source$3 = "import { type ReactElement } from \"react\";\n\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { ScrollArea } from \"@stealthscale/component-primitives\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Splitter } from \"@stealthscale/component-screen\";\n\nconst FOLDERS = [\"inbox\", \"sent\", \"archive\"] as const;\n\nconst MESSAGES = [\"invoice\", \"standup\", \"offsite\"] as const;\n\nfunction pane(title: string, lines: readonly string[]): ReactElement {\n return (\n <ScrollArea.Root inset=\"md\">\n <ScrollArea.Viewport aria-label={title}>\n <ScrollArea.Content>\n <Stack gap=\"xs\">\n <Text weight=\"semibold\">{title}</Text>\n {lines.map((line) => (\n <Text key={line} size=\"sm\" tone=\"muted\">\n {line}\n </Text>\n ))}\n </Stack>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n );\n}\n\nexport function Mail(): ReactElement {\n const { t } = useWords(\"splitter\");\n const splitter = Splitter.useSplitter({\n defaultSize: [\"160px\", 35],\n panels: [\n { id: \"folders\", maxSize: \"280px\", minSize: \"112px\", resizeBehavior: \"preserve-pixel-size\" },\n { id: \"messages\", minSize: 25 },\n { id: \"message\", minSize: 30 },\n ],\n });\n const folders = FOLDERS.map((folder) => t(`mail.folders.${folder}`));\n const messages = MESSAGES.map((message) => t(`mail.messages.${message}`));\n\n return (\n <Splitter.Root splitter={splitter}>\n <Splitter.Panel id=\"folders\">{pane(t(\"mail.folder\"), folders)}</Splitter.Panel>\n <Splitter.ResizeTrigger id=\"folders:messages\" label={t(\"mail.resizeFolders\")} />\n <Splitter.Panel id=\"messages\">{pane(t(\"mail.inbox\"), messages)}</Splitter.Panel>\n <Splitter.ResizeTrigger id=\"messages:message\" label={t(\"mail.resizeMessages\")} />\n <Splitter.Panel id=\"message\">{pane(t(\"mail.subject\"), [t(\"mail.body\")])}</Splitter.Panel>\n </Splitter.Root>\n );\n}\n";
824
+ //#endregion
825
+ //#region src/splitter/examples/nested.example.tsx
826
+ var nested_example_exports = /* @__PURE__ */ __exportAll({
827
+ Nested: () => Nested,
828
+ source: () => source$2
829
+ });
830
+ function pane(title, text) {
831
+ return /* @__PURE__ */ jsxs(ScrollArea.Root, {
832
+ inset: "md",
833
+ children: [/* @__PURE__ */ jsx(ScrollArea.Viewport, {
834
+ "aria-label": title,
835
+ children: /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsxs(Stack, {
836
+ gap: "xs",
837
+ children: [/* @__PURE__ */ jsx(Text, {
838
+ weight: "semibold",
839
+ children: title
840
+ }), /* @__PURE__ */ jsx(Text, {
841
+ size: "sm",
842
+ tone: "muted",
843
+ children: text
844
+ })]
845
+ }) })
846
+ }), /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {})]
847
+ });
848
+ }
849
+ function Nested() {
850
+ const $ = c(33);
851
+ const { t } = useWords("splitter");
852
+ let t0;
853
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
854
+ t0 = {
855
+ defaultSize: [25, 75],
856
+ panels: [{
857
+ id: "project",
858
+ minSize: 15
859
+ }, { id: "work" }]
860
+ };
861
+ $[0] = t0;
862
+ } else t0 = $[0];
863
+ const outer = useSplitter(t0);
864
+ let t1;
865
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
866
+ t1 = [65, 35];
867
+ $[1] = t1;
868
+ } else t1 = $[1];
869
+ let t2;
870
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
871
+ t2 = {
872
+ defaultSize: t1,
873
+ orientation: "vertical",
874
+ panels: [{ id: "editor" }, {
875
+ id: "output",
876
+ minSize: 20
877
+ }]
878
+ };
879
+ $[2] = t2;
880
+ } else t2 = $[2];
881
+ const inner = useSplitter(t2);
882
+ let t3;
883
+ if ($[3] !== t) {
884
+ t3 = pane(t("nested.project"), t("nested.projectText"));
885
+ $[3] = t;
886
+ $[4] = t3;
887
+ } else t3 = $[4];
888
+ let t4;
889
+ if ($[5] !== t3) {
890
+ t4 = /* @__PURE__ */ jsx(Panel, {
891
+ id: "project",
892
+ children: t3
893
+ });
894
+ $[5] = t3;
895
+ $[6] = t4;
896
+ } else t4 = $[6];
897
+ let t5;
898
+ if ($[7] !== t) {
899
+ t5 = t("nested.resizeProject");
900
+ $[7] = t;
901
+ $[8] = t5;
902
+ } else t5 = $[8];
903
+ let t6;
904
+ if ($[9] !== t5) {
905
+ t6 = /* @__PURE__ */ jsx(ResizeTrigger, {
906
+ id: "project:work",
907
+ label: t5
908
+ });
909
+ $[9] = t5;
910
+ $[10] = t6;
911
+ } else t6 = $[10];
912
+ let t7;
913
+ if ($[11] !== t) {
914
+ t7 = pane(t("nested.editor"), t("nested.editorText"));
915
+ $[11] = t;
916
+ $[12] = t7;
917
+ } else t7 = $[12];
918
+ let t8;
919
+ if ($[13] !== t7) {
920
+ t8 = /* @__PURE__ */ jsx(Panel, {
921
+ id: "editor",
922
+ children: t7
923
+ });
924
+ $[13] = t7;
925
+ $[14] = t8;
926
+ } else t8 = $[14];
927
+ let t9;
928
+ if ($[15] !== t) {
929
+ t9 = t("nested.resizeOutput");
930
+ $[15] = t;
931
+ $[16] = t9;
932
+ } else t9 = $[16];
933
+ let t10;
934
+ if ($[17] !== t9) {
935
+ t10 = /* @__PURE__ */ jsx(ResizeTrigger, {
936
+ id: "editor:output",
937
+ label: t9
938
+ });
939
+ $[17] = t9;
940
+ $[18] = t10;
941
+ } else t10 = $[18];
942
+ let t11;
943
+ if ($[19] !== t) {
944
+ t11 = pane(t("nested.output"), t("nested.outputText"));
945
+ $[19] = t;
946
+ $[20] = t11;
947
+ } else t11 = $[20];
948
+ let t12;
949
+ if ($[21] !== t11) {
950
+ t12 = /* @__PURE__ */ jsx(Panel, {
951
+ id: "output",
952
+ children: t11
953
+ });
954
+ $[21] = t11;
955
+ $[22] = t12;
956
+ } else t12 = $[22];
957
+ let t13;
958
+ if ($[23] !== inner || $[24] !== t10 || $[25] !== t12 || $[26] !== t8) {
959
+ t13 = /* @__PURE__ */ jsx(Panel, {
960
+ id: "work",
961
+ children: /* @__PURE__ */ jsxs(Root, {
962
+ splitter: inner,
963
+ children: [
964
+ t8,
965
+ t10,
966
+ t12
967
+ ]
968
+ })
969
+ });
970
+ $[23] = inner;
971
+ $[24] = t10;
972
+ $[25] = t12;
973
+ $[26] = t8;
974
+ $[27] = t13;
975
+ } else t13 = $[27];
976
+ let t14;
977
+ if ($[28] !== outer || $[29] !== t13 || $[30] !== t4 || $[31] !== t6) {
978
+ t14 = /* @__PURE__ */ jsxs(Root, {
979
+ splitter: outer,
980
+ children: [
981
+ t4,
982
+ t6,
983
+ t13
984
+ ]
985
+ });
986
+ $[28] = outer;
987
+ $[29] = t13;
988
+ $[30] = t4;
989
+ $[31] = t6;
990
+ $[32] = t14;
991
+ } else t14 = $[32];
992
+ return t14;
993
+ }
994
+ const source$2 = "import { type ReactElement } from \"react\";\n\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { ScrollArea } from \"@stealthscale/component-primitives\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Splitter } from \"@stealthscale/component-screen\";\n\nfunction pane(title: string, text: string): ReactElement {\n return (\n <ScrollArea.Root inset=\"md\">\n <ScrollArea.Viewport aria-label={title}>\n <ScrollArea.Content>\n <Stack gap=\"xs\">\n <Text weight=\"semibold\">{title}</Text>\n <Text size=\"sm\" tone=\"muted\">\n {text}\n </Text>\n </Stack>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n );\n}\n\nexport function Nested(): ReactElement {\n const { t } = useWords(\"splitter\");\n const outer = Splitter.useSplitter({\n defaultSize: [25, 75],\n panels: [{ id: \"project\", minSize: 15 }, { id: \"work\" }],\n });\n const inner = Splitter.useSplitter({\n defaultSize: [65, 35],\n orientation: \"vertical\",\n panels: [{ id: \"editor\" }, { id: \"output\", minSize: 20 }],\n });\n\n return (\n <Splitter.Root splitter={outer}>\n <Splitter.Panel id=\"project\">\n {pane(t(\"nested.project\"), t(\"nested.projectText\"))}\n </Splitter.Panel>\n <Splitter.ResizeTrigger id=\"project:work\" label={t(\"nested.resizeProject\")} />\n <Splitter.Panel id=\"work\">\n <Splitter.Root splitter={inner}>\n <Splitter.Panel id=\"editor\">\n {pane(t(\"nested.editor\"), t(\"nested.editorText\"))}\n </Splitter.Panel>\n <Splitter.ResizeTrigger id=\"editor:output\" label={t(\"nested.resizeOutput\")} />\n <Splitter.Panel id=\"output\">\n {pane(t(\"nested.output\"), t(\"nested.outputText\"))}\n </Splitter.Panel>\n </Splitter.Root>\n </Splitter.Panel>\n </Splitter.Root>\n );\n}\n";
995
+ //#endregion
996
+ //#region src/splitter/examples/notes.example.tsx
997
+ var notes_example_exports = /* @__PURE__ */ __exportAll({
998
+ Notes: () => Notes,
999
+ source: () => source$1
1000
+ });
1001
+ const NOTES = [
1002
+ "launch",
1003
+ "hiring",
1004
+ "budget",
1005
+ "offsite"
1006
+ ];
1007
+ function Notes() {
1008
+ const $ = c(51);
1009
+ const { t } = useWords("splitter");
1010
+ let t0;
1011
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1012
+ t0 = {
1013
+ defaultSize: [30, 70],
1014
+ panels: [{
1015
+ collapsedSize: 0,
1016
+ collapsible: true,
1017
+ id: "notes",
1018
+ maxSize: 50,
1019
+ minSize: 20
1020
+ }, {
1021
+ id: "note",
1022
+ minSize: 40
1023
+ }]
1024
+ };
1025
+ $[0] = t0;
1026
+ } else t0 = $[0];
1027
+ const splitter = useSplitter(t0);
1028
+ let t1;
1029
+ if ($[1] !== splitter) {
1030
+ t1 = splitter.isPanelExpanded("notes");
1031
+ $[1] = splitter;
1032
+ $[2] = t1;
1033
+ } else t1 = $[2];
1034
+ const shown = t1;
1035
+ let t2;
1036
+ if ($[3] !== t) {
1037
+ t2 = NOTES.map((note) => /* @__PURE__ */ jsx(NavList.Item, { children: /* @__PURE__ */ jsxs(NavList.Link, {
1038
+ "aria-current": note === "launch" ? "page" : void 0,
1039
+ href: "#note",
1040
+ children: [/* @__PURE__ */ jsx(FileTextIcon, { "aria-hidden": true }), /* @__PURE__ */ jsx("span", { children: t(`notes.titles.${note}`) })]
1041
+ }) }, note));
1042
+ $[3] = t;
1043
+ $[4] = t2;
1044
+ } else t2 = $[4];
1045
+ let t3;
1046
+ if ($[5] !== t2) {
1047
+ t3 = /* @__PURE__ */ jsx(ScrollArea.Viewport, {
1048
+ focusable: false,
1049
+ children: /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsx(NavList.Root, {
1050
+ size: "sm",
1051
+ children: t2
1052
+ }) })
1053
+ });
1054
+ $[5] = t2;
1055
+ $[6] = t3;
1056
+ } else t3 = $[6];
1057
+ let t4;
1058
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
1059
+ t4 = /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {});
1060
+ $[7] = t4;
1061
+ } else t4 = $[7];
1062
+ let t5;
1063
+ if ($[8] !== t3) {
1064
+ t5 = /* @__PURE__ */ jsx(Panel, {
1065
+ id: "notes",
1066
+ children: /* @__PURE__ */ jsxs(ScrollArea.Root, {
1067
+ inset: "xs",
1068
+ children: [t3, t4]
1069
+ })
1070
+ });
1071
+ $[8] = t3;
1072
+ $[9] = t5;
1073
+ } else t5 = $[9];
1074
+ let t6;
1075
+ if ($[10] !== t) {
1076
+ t6 = t("notes.resize");
1077
+ $[10] = t;
1078
+ $[11] = t6;
1079
+ } else t6 = $[11];
1080
+ let t7;
1081
+ if ($[12] !== t6) {
1082
+ t7 = /* @__PURE__ */ jsx(ResizeTrigger, {
1083
+ id: "notes:note",
1084
+ label: t6
1085
+ });
1086
+ $[12] = t6;
1087
+ $[13] = t7;
1088
+ } else t7 = $[13];
1089
+ let t8;
1090
+ if ($[14] !== t) {
1091
+ t8 = t("notes.titles.launch");
1092
+ $[14] = t;
1093
+ $[15] = t8;
1094
+ } else t8 = $[15];
1095
+ let t9;
1096
+ if ($[16] !== t) {
1097
+ t9 = t("notes.list");
1098
+ $[16] = t;
1099
+ $[17] = t9;
1100
+ } else t9 = $[17];
1101
+ let t10;
1102
+ if ($[18] !== shown || $[19] !== splitter) {
1103
+ t10 = () => {
1104
+ if (shown) splitter.collapsePanel("notes");
1105
+ else splitter.expandPanel("notes");
1106
+ };
1107
+ $[18] = shown;
1108
+ $[19] = splitter;
1109
+ $[20] = t10;
1110
+ } else t10 = $[20];
1111
+ let t11;
1112
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
1113
+ t11 = /* @__PURE__ */ jsx(PanelLeftIcon, {});
1114
+ $[21] = t11;
1115
+ } else t11 = $[21];
1116
+ let t12;
1117
+ if ($[22] !== shown || $[23] !== t10 || $[24] !== t9) {
1118
+ t12 = /* @__PURE__ */ jsx(IconButton, {
1119
+ "aria-expanded": shown,
1120
+ "aria-label": t9,
1121
+ onClick: t10,
1122
+ size: "sm",
1123
+ variant: "ghost",
1124
+ children: t11
1125
+ });
1126
+ $[22] = shown;
1127
+ $[23] = t10;
1128
+ $[24] = t9;
1129
+ $[25] = t12;
1130
+ } else t12 = $[25];
1131
+ let t13;
1132
+ if ($[26] !== t) {
1133
+ t13 = t("notes.titles.launch");
1134
+ $[26] = t;
1135
+ $[27] = t13;
1136
+ } else t13 = $[27];
1137
+ let t14;
1138
+ if ($[28] !== t13) {
1139
+ t14 = /* @__PURE__ */ jsx(Heading, {
1140
+ as: "h3",
1141
+ size: "sm",
1142
+ children: t13
1143
+ });
1144
+ $[28] = t13;
1145
+ $[29] = t14;
1146
+ } else t14 = $[29];
1147
+ let t15;
1148
+ if ($[30] !== t12 || $[31] !== t14) {
1149
+ t15 = /* @__PURE__ */ jsxs(Group, {
1150
+ gap: "sm",
1151
+ children: [t12, t14]
1152
+ });
1153
+ $[30] = t12;
1154
+ $[31] = t14;
1155
+ $[32] = t15;
1156
+ } else t15 = $[32];
1157
+ let t16;
1158
+ if ($[33] !== t) {
1159
+ t16 = t("notes.body");
1160
+ $[33] = t;
1161
+ $[34] = t16;
1162
+ } else t16 = $[34];
1163
+ let t17;
1164
+ if ($[35] !== t16) {
1165
+ t17 = /* @__PURE__ */ jsx(Text, {
1166
+ size: "sm",
1167
+ children: t16
1168
+ });
1169
+ $[35] = t16;
1170
+ $[36] = t17;
1171
+ } else t17 = $[36];
1172
+ let t18;
1173
+ if ($[37] !== t15 || $[38] !== t17) {
1174
+ t18 = /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsxs(Stack, {
1175
+ gap: "sm",
1176
+ children: [t15, t17]
1177
+ }) });
1178
+ $[37] = t15;
1179
+ $[38] = t17;
1180
+ $[39] = t18;
1181
+ } else t18 = $[39];
1182
+ let t19;
1183
+ if ($[40] !== t18 || $[41] !== t8) {
1184
+ t19 = /* @__PURE__ */ jsx(ScrollArea.Viewport, {
1185
+ "aria-label": t8,
1186
+ children: t18
1187
+ });
1188
+ $[40] = t18;
1189
+ $[41] = t8;
1190
+ $[42] = t19;
1191
+ } else t19 = $[42];
1192
+ let t20;
1193
+ if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
1194
+ t20 = /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {});
1195
+ $[43] = t20;
1196
+ } else t20 = $[43];
1197
+ let t21;
1198
+ if ($[44] !== t19) {
1199
+ t21 = /* @__PURE__ */ jsx(Panel, {
1200
+ id: "note",
1201
+ children: /* @__PURE__ */ jsxs(ScrollArea.Root, {
1202
+ inset: "md",
1203
+ children: [t19, t20]
1204
+ })
1205
+ });
1206
+ $[44] = t19;
1207
+ $[45] = t21;
1208
+ } else t21 = $[45];
1209
+ let t22;
1210
+ if ($[46] !== splitter || $[47] !== t21 || $[48] !== t5 || $[49] !== t7) {
1211
+ t22 = /* @__PURE__ */ jsxs(Root, {
1212
+ splitter,
1213
+ children: [
1214
+ t5,
1215
+ t7,
1216
+ t21
1217
+ ]
1218
+ });
1219
+ $[46] = splitter;
1220
+ $[47] = t21;
1221
+ $[48] = t5;
1222
+ $[49] = t7;
1223
+ $[50] = t22;
1224
+ } else t22 = $[50];
1225
+ return t22;
1226
+ }
1227
+ const source$1 = "import { type ReactElement } from \"react\";\n\nimport { FileTextIcon, PanelLeftIcon } from \"lucide-react\";\n\nimport { IconButton } from \"@stealthscale/component-actions\";\nimport { Group, Stack } from \"@stealthscale/component-layout\";\nimport { NavList } from \"@stealthscale/component-navigation\";\nimport { ScrollArea } from \"@stealthscale/component-primitives\";\nimport { Heading, Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Splitter } from \"@stealthscale/component-screen\";\n\nconst NOTES = [\"launch\", \"hiring\", \"budget\", \"offsite\"] as const;\n\nexport function Notes(): ReactElement {\n const { t } = useWords(\"splitter\");\n const splitter = Splitter.useSplitter({\n defaultSize: [30, 70],\n panels: [\n { collapsedSize: 0, collapsible: true, id: \"notes\", maxSize: 50, minSize: 20 },\n { id: \"note\", minSize: 40 },\n ],\n });\n const shown = splitter.isPanelExpanded(\"notes\");\n\n return (\n <Splitter.Root splitter={splitter}>\n <Splitter.Panel id=\"notes\">\n <ScrollArea.Root inset=\"xs\">\n <ScrollArea.Viewport focusable={false}>\n <ScrollArea.Content>\n <NavList.Root size=\"sm\">\n {NOTES.map((note) => (\n <NavList.Item key={note}>\n <NavList.Link\n aria-current={note === \"launch\" ? \"page\" : undefined}\n href=\"#note\"\n >\n <FileTextIcon aria-hidden />\n <span>{t(`notes.titles.${note}`)}</span>\n </NavList.Link>\n </NavList.Item>\n ))}\n </NavList.Root>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n </Splitter.Panel>\n <Splitter.ResizeTrigger id=\"notes:note\" label={t(\"notes.resize\")} />\n <Splitter.Panel id=\"note\">\n <ScrollArea.Root inset=\"md\">\n <ScrollArea.Viewport aria-label={t(\"notes.titles.launch\")}>\n <ScrollArea.Content>\n <Stack gap=\"sm\">\n <Group gap=\"sm\">\n <IconButton\n aria-expanded={shown}\n aria-label={t(\"notes.list\")}\n onClick={() => {\n if (shown) splitter.collapsePanel(\"notes\");\n else splitter.expandPanel(\"notes\");\n }}\n size=\"sm\"\n variant=\"ghost\"\n >\n <PanelLeftIcon />\n </IconButton>\n <Heading as=\"h3\" size=\"sm\">\n {t(\"notes.titles.launch\")}\n </Heading>\n </Group>\n <Text size=\"sm\">{t(\"notes.body\")}</Text>\n </Stack>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n </Splitter.Panel>\n </Splitter.Root>\n );\n}\n";
1228
+ //#endregion
1229
+ //#region src/splitter/examples/query.example.tsx
1230
+ var query_example_exports = /* @__PURE__ */ __exportAll({
1231
+ Query: () => Query,
1232
+ source: () => source
1233
+ });
1234
+ const ROWS = [
1235
+ "ada",
1236
+ "grace",
1237
+ "katherine",
1238
+ "margaret"
1239
+ ];
1240
+ function Query() {
1241
+ const $ = c(49);
1242
+ const { t } = useWords("splitter");
1243
+ let t0;
1244
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1245
+ t0 = [40, 60];
1246
+ $[0] = t0;
1247
+ } else t0 = $[0];
1248
+ let t1;
1249
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
1250
+ t1 = {
1251
+ defaultSize: t0,
1252
+ keyboardResizeBy: 5,
1253
+ orientation: "vertical",
1254
+ panels: [{
1255
+ collapsedSize: 0,
1256
+ collapsible: true,
1257
+ id: "query",
1258
+ minSize: 20
1259
+ }, {
1260
+ id: "results",
1261
+ minSize: 30
1262
+ }]
1263
+ };
1264
+ $[1] = t1;
1265
+ } else t1 = $[1];
1266
+ const splitter = useSplitter(t1);
1267
+ let t2;
1268
+ if ($[2] !== t) {
1269
+ t2 = t("query.editor");
1270
+ $[2] = t;
1271
+ $[3] = t2;
1272
+ } else t2 = $[3];
1273
+ let t3;
1274
+ if ($[4] !== t) {
1275
+ t3 = t("query.editor");
1276
+ $[4] = t;
1277
+ $[5] = t3;
1278
+ } else t3 = $[5];
1279
+ let t4;
1280
+ if ($[6] !== t3) {
1281
+ t4 = /* @__PURE__ */ jsx(Text, {
1282
+ weight: "semibold",
1283
+ children: t3
1284
+ });
1285
+ $[6] = t3;
1286
+ $[7] = t4;
1287
+ } else t4 = $[7];
1288
+ let t5;
1289
+ if ($[8] !== t) {
1290
+ t5 = t("query.statement");
1291
+ $[8] = t;
1292
+ $[9] = t5;
1293
+ } else t5 = $[9];
1294
+ let t6;
1295
+ if ($[10] !== t5) {
1296
+ t6 = /* @__PURE__ */ jsx(Code, { children: t5 });
1297
+ $[10] = t5;
1298
+ $[11] = t6;
1299
+ } else t6 = $[11];
1300
+ let t7;
1301
+ if ($[12] !== t4 || $[13] !== t6) {
1302
+ t7 = /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsxs(Stack, {
1303
+ gap: "xs",
1304
+ children: [t4, t6]
1305
+ }) });
1306
+ $[12] = t4;
1307
+ $[13] = t6;
1308
+ $[14] = t7;
1309
+ } else t7 = $[14];
1310
+ let t8;
1311
+ if ($[15] !== t2 || $[16] !== t7) {
1312
+ t8 = /* @__PURE__ */ jsx(ScrollArea.Viewport, {
1313
+ "aria-label": t2,
1314
+ children: t7
1315
+ });
1316
+ $[15] = t2;
1317
+ $[16] = t7;
1318
+ $[17] = t8;
1319
+ } else t8 = $[17];
1320
+ let t10;
1321
+ let t11;
1322
+ let t9;
1323
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
1324
+ t9 = /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {});
1325
+ t10 = /* @__PURE__ */ jsx(ScrollArea.Scrollbar, { orientation: "horizontal" });
1326
+ t11 = /* @__PURE__ */ jsx(ScrollArea.Corner, {});
1327
+ $[18] = t10;
1328
+ $[19] = t11;
1329
+ $[20] = t9;
1330
+ } else {
1331
+ t10 = $[18];
1332
+ t11 = $[19];
1333
+ t9 = $[20];
1334
+ }
1335
+ let t12;
1336
+ if ($[21] !== t8) {
1337
+ t12 = /* @__PURE__ */ jsx(Panel, {
1338
+ id: "query",
1339
+ children: /* @__PURE__ */ jsxs(ScrollArea.Root, {
1340
+ inset: "md",
1341
+ scrolls: "both",
1342
+ children: [
1343
+ t8,
1344
+ t9,
1345
+ t10,
1346
+ t11
1347
+ ]
1348
+ })
1349
+ });
1350
+ $[21] = t8;
1351
+ $[22] = t12;
1352
+ } else t12 = $[22];
1353
+ let t13;
1354
+ if ($[23] !== t) {
1355
+ t13 = t("query.resize");
1356
+ $[23] = t;
1357
+ $[24] = t13;
1358
+ } else t13 = $[24];
1359
+ let t14;
1360
+ if ($[25] !== t13) {
1361
+ t14 = /* @__PURE__ */ jsx(ResizeTrigger, {
1362
+ id: "query:results",
1363
+ label: t13
1364
+ });
1365
+ $[25] = t13;
1366
+ $[26] = t14;
1367
+ } else t14 = $[26];
1368
+ let t15;
1369
+ if ($[27] !== t) {
1370
+ t15 = t("query.results");
1371
+ $[27] = t;
1372
+ $[28] = t15;
1373
+ } else t15 = $[28];
1374
+ let t16;
1375
+ if ($[29] !== t) {
1376
+ t16 = t("query.results");
1377
+ $[29] = t;
1378
+ $[30] = t16;
1379
+ } else t16 = $[30];
1380
+ let t17;
1381
+ if ($[31] !== t16) {
1382
+ t17 = /* @__PURE__ */ jsx(Text, {
1383
+ weight: "semibold",
1384
+ children: t16
1385
+ });
1386
+ $[31] = t16;
1387
+ $[32] = t17;
1388
+ } else t17 = $[32];
1389
+ let t18;
1390
+ if ($[33] !== t) {
1391
+ t18 = ROWS.map((row) => /* @__PURE__ */ jsx(Text, {
1392
+ size: "sm",
1393
+ children: t(`query.rows.${row}`)
1394
+ }, row));
1395
+ $[33] = t;
1396
+ $[34] = t18;
1397
+ } else t18 = $[34];
1398
+ let t19;
1399
+ if ($[35] !== t17 || $[36] !== t18) {
1400
+ t19 = /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsxs(Stack, {
1401
+ gap: "xs",
1402
+ children: [t17, t18]
1403
+ }) });
1404
+ $[35] = t17;
1405
+ $[36] = t18;
1406
+ $[37] = t19;
1407
+ } else t19 = $[37];
1408
+ let t20;
1409
+ if ($[38] !== t15 || $[39] !== t19) {
1410
+ t20 = /* @__PURE__ */ jsx(ScrollArea.Viewport, {
1411
+ "aria-label": t15,
1412
+ children: t19
1413
+ });
1414
+ $[38] = t15;
1415
+ $[39] = t19;
1416
+ $[40] = t20;
1417
+ } else t20 = $[40];
1418
+ let t21;
1419
+ if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
1420
+ t21 = /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {});
1421
+ $[41] = t21;
1422
+ } else t21 = $[41];
1423
+ let t22;
1424
+ if ($[42] !== t20) {
1425
+ t22 = /* @__PURE__ */ jsx(Panel, {
1426
+ id: "results",
1427
+ children: /* @__PURE__ */ jsxs(ScrollArea.Root, {
1428
+ inset: "md",
1429
+ children: [t20, t21]
1430
+ })
1431
+ });
1432
+ $[42] = t20;
1433
+ $[43] = t22;
1434
+ } else t22 = $[43];
1435
+ let t23;
1436
+ if ($[44] !== splitter || $[45] !== t12 || $[46] !== t14 || $[47] !== t22) {
1437
+ t23 = /* @__PURE__ */ jsxs(Root, {
1438
+ splitter,
1439
+ children: [
1440
+ t12,
1441
+ t14,
1442
+ t22
1443
+ ]
1444
+ });
1445
+ $[44] = splitter;
1446
+ $[45] = t12;
1447
+ $[46] = t14;
1448
+ $[47] = t22;
1449
+ $[48] = t23;
1450
+ } else t23 = $[48];
1451
+ return t23;
1452
+ }
1453
+ const source = "import { type ReactElement } from \"react\";\n\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { ScrollArea } from \"@stealthscale/component-primitives\";\nimport { Code, Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Splitter } from \"@stealthscale/component-screen\";\n\nconst ROWS = [\"ada\", \"grace\", \"katherine\", \"margaret\"] as const;\n\nexport function Query(): ReactElement {\n const { t } = useWords(\"splitter\");\n const splitter = Splitter.useSplitter({\n defaultSize: [40, 60],\n keyboardResizeBy: 5,\n orientation: \"vertical\",\n panels: [\n { collapsedSize: 0, collapsible: true, id: \"query\", minSize: 20 },\n { id: \"results\", minSize: 30 },\n ],\n });\n\n return (\n <Splitter.Root splitter={splitter}>\n <Splitter.Panel id=\"query\">\n <ScrollArea.Root inset=\"md\" scrolls=\"both\">\n <ScrollArea.Viewport aria-label={t(\"query.editor\")}>\n <ScrollArea.Content>\n <Stack gap=\"xs\">\n <Text weight=\"semibold\">{t(\"query.editor\")}</Text>\n <Code>{t(\"query.statement\")}</Code>\n </Stack>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n <ScrollArea.Scrollbar orientation=\"horizontal\" />\n <ScrollArea.Corner />\n </ScrollArea.Root>\n </Splitter.Panel>\n <Splitter.ResizeTrigger id=\"query:results\" label={t(\"query.resize\")} />\n <Splitter.Panel id=\"results\">\n <ScrollArea.Root inset=\"md\">\n <ScrollArea.Viewport aria-label={t(\"query.results\")}>\n <ScrollArea.Content>\n <Stack gap=\"xs\">\n <Text weight=\"semibold\">{t(\"query.results\")}</Text>\n {ROWS.map((row) => (\n <Text key={row} size=\"sm\">\n {t(`query.rows.${row}`)}\n </Text>\n ))}\n </Stack>\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar />\n </ScrollArea.Root>\n </Splitter.Panel>\n </Splitter.Root>\n );\n}\n";
1454
+ //#endregion
1455
+ //#region src/splitter/splitter.specimen.tsx
1456
+ /**
1457
+ * Catalogue page for the splitter.
1458
+ *
1459
+ * @remarks
1460
+ * `scenesOf` generates the palette scene from the basic example. Each cell stages focus on the
1461
+ * trigger through the kit's `Focused`, because the palette colours a trigger only while the
1462
+ * pointer is over it, while it has focus and while it drags. `Focused` targets the trigger,
1463
+ * because a panel's scroll area takes a tab stop until it has measured its content, and would
1464
+ * otherwise take the staged focus. The other scenes are hand-written
1465
+ * and draw their example in a kit `Screen` 20rem tall, because a splitter fills its container.
1466
+ * The words are keys under `splitter` in `locales/en/specimen/splitter.json`.
1467
+ */
1468
+ /**
1469
+ * Hand-written scene for a list of notes that collapses beside the open note.
1470
+ */
1471
+ const notes = {
1472
+ about: "splitter.notes.about",
1473
+ draw: () => /* @__PURE__ */ jsx(Screen, {
1474
+ size: "xs",
1475
+ children: /* @__PURE__ */ jsx(Notes, {})
1476
+ }),
1477
+ example: notes_example_exports,
1478
+ title: "splitter.notes.title"
1479
+ };
1480
+ /**
1481
+ * Hand-written scene for a query over its results, in a column.
1482
+ */
1483
+ const query = {
1484
+ about: "splitter.query.about",
1485
+ draw: () => /* @__PURE__ */ jsx(Screen, {
1486
+ size: "xs",
1487
+ children: /* @__PURE__ */ jsx(Query, {})
1488
+ }),
1489
+ example: query_example_exports,
1490
+ title: "splitter.query.title"
1491
+ };
1492
+ /**
1493
+ * Hand-written scene for three panels with a trigger between each two.
1494
+ */
1495
+ const mail = {
1496
+ about: "splitter.mail.about",
1497
+ draw: () => /* @__PURE__ */ jsx(Screen, {
1498
+ size: "xs",
1499
+ children: /* @__PURE__ */ jsx(Mail, {})
1500
+ }),
1501
+ example: mail_example_exports,
1502
+ title: "splitter.mail.title"
1503
+ };
1504
+ /**
1505
+ * Hand-written scene for a splitter in a column inside a panel of a splitter in a row.
1506
+ */
1507
+ const nested = {
1508
+ about: "splitter.nested.about",
1509
+ draw: () => /* @__PURE__ */ jsx(Screen, {
1510
+ size: "xs",
1511
+ children: /* @__PURE__ */ jsx(Nested, {})
1512
+ }),
1513
+ example: nested_example_exports,
1514
+ title: "splitter.nested.title"
1515
+ };
1516
+ /**
1517
+ * Hand-written scene for sizes an application holds, with a reset.
1518
+ */
1519
+ const controlled = {
1520
+ about: "splitter.controlled.about",
1521
+ draw: () => /* @__PURE__ */ jsx(Screen, {
1522
+ size: "xs",
1523
+ children: /* @__PURE__ */ jsx(Controlled, {})
1524
+ }),
1525
+ example: controlled_example_exports,
1526
+ title: "splitter.controlled.title"
1527
+ };
1528
+ /**
1529
+ * Hand-written scene for a trigger disabled until a switch turns editing on.
1530
+ */
1531
+ const locked = {
1532
+ about: "splitter.locked.about",
1533
+ draw: () => /* @__PURE__ */ jsx(Screen, {
1534
+ size: "xs",
1535
+ children: /* @__PURE__ */ jsx(Locked, {})
1536
+ }),
1537
+ example: locked_example_exports,
1538
+ title: "splitter.locked.title"
1539
+ };
1540
+ var splitter_specimen_default = specimen({
1541
+ about: "splitter.about",
1542
+ id: "components/screen/splitter",
1543
+ imports: "import { Splitter } from \"@stealthscale/component-screen\";",
1544
+ scenes: [
1545
+ notes,
1546
+ query,
1547
+ mail,
1548
+ nested,
1549
+ controlled,
1550
+ locked,
1551
+ ...scenesOf(recipe, {
1552
+ draw: (props) => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Focused, {
1553
+ target: "[role=separator]",
1554
+ children: /* @__PURE__ */ jsx(Basic, { ...props })
1555
+ }) }),
1556
+ example: basic_example_exports,
1557
+ namespace: "splitter"
1558
+ })
1559
+ ],
1560
+ title: "splitter.title"
1561
+ });
1562
+ //#endregion
1563
+ export { controlled, splitter_specimen_default as default, locked, mail, nested, notes, query };