@silvery/examples 0.17.4 → 0.17.5

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 (62) hide show
  1. package/dist/_banner-A70_y2Vi.mjs +43 -0
  2. package/dist/{ansi-CCE2pVS0.mjs → ansi-0VXlUmNn.mjs} +7 -7
  3. package/dist/apng-B0gRaDVT.mjs +3 -0
  4. package/dist/{apng-HhhBjRGt.mjs → apng-BTRDTfDW.mjs} +2 -2
  5. package/dist/apps/aichat/index.mjs +69 -70
  6. package/dist/apps/app-todo.mjs +19 -20
  7. package/dist/apps/async-data.mjs +40 -41
  8. package/dist/apps/cli-wizard.mjs +51 -52
  9. package/dist/apps/clipboard.mjs +26 -27
  10. package/dist/apps/components.mjs +189 -190
  11. package/dist/apps/data-explorer.mjs +52 -53
  12. package/dist/apps/dev-tools.mjs +39 -40
  13. package/dist/apps/explorer.mjs +73 -74
  14. package/dist/apps/gallery.mjs +61 -62
  15. package/dist/apps/inline-bench.mjs +1 -1
  16. package/dist/apps/kanban.mjs +22 -23
  17. package/dist/apps/layout-ref.mjs +27 -28
  18. package/dist/apps/outline.mjs +35 -36
  19. package/dist/apps/paste-demo.mjs +33 -34
  20. package/dist/apps/scroll.mjs +11 -12
  21. package/dist/apps/search-filter.mjs +23 -24
  22. package/dist/apps/selection.mjs +30 -31
  23. package/dist/apps/spatial-focus-demo.mjs +32 -33
  24. package/dist/apps/task-list.mjs +25 -26
  25. package/dist/apps/terminal-caps-demo.mjs +30 -31
  26. package/dist/apps/terminal.mjs +157 -158
  27. package/dist/apps/text-selection-demo.mjs +62 -63
  28. package/dist/apps/textarea.mjs +21 -22
  29. package/dist/apps/theme.mjs +142 -143
  30. package/dist/apps/transform.mjs +25 -26
  31. package/dist/apps/virtual-10k.mjs +52 -53
  32. package/dist/{backends-Bahh9mKN.mjs → backends-Dj-11kZF.mjs} +1 -1
  33. package/dist/backends-U3QwStfO.mjs +3 -0
  34. package/dist/components/counter.mjs +6 -7
  35. package/dist/components/hello.mjs +5 -6
  36. package/dist/components/progress-bar.mjs +10 -11
  37. package/dist/components/select-list.mjs +8 -9
  38. package/dist/components/spinner.mjs +10 -11
  39. package/dist/components/text-input.mjs +8 -9
  40. package/dist/components/virtual-list.mjs +7 -8
  41. package/dist/{flexily-zero-adapter-UB-ra8fR.mjs → flexily-zero-adapter-ByVzLTFP.mjs} +1 -1
  42. package/dist/gif-B6NGH5gs.mjs +3 -0
  43. package/dist/{gif-BtnXuxLF.mjs → gif-CfkOF-iG.mjs} +2 -2
  44. package/dist/layout/dashboard.mjs +197 -198
  45. package/dist/layout/live-resize.mjs +44 -45
  46. package/dist/layout/overflow.mjs +16 -17
  47. package/dist/layout/text-layout.mjs +67 -68
  48. package/dist/{plugins-D1KtkT4a.mjs → plugins-CT0DdV_E.mjs} +12 -13
  49. package/dist/{src-BTEVGpd9.mjs → src-jO3Zuzjj.mjs} +3 -3
  50. package/dist/{yoga-adapter-BVtQ5OJR.mjs → yoga-adapter-BSQHuMV9.mjs} +1 -1
  51. package/package.json +4 -2
  52. package/dist/_banner-DLPxCqVy.mjs +0 -44
  53. package/dist/apng-mwUQbTTF.mjs +0 -3
  54. package/dist/backends-CCtCDQ94.mjs +0 -3
  55. package/dist/gif-BZaqPPVX.mjs +0 -3
  56. package/dist/jsx-runtime-dMs_8fNu.mjs +0 -241
  57. /package/dist/{UPNG-Cy7ViL8f.mjs → UPNG-ShUlaTDh.mjs} +0 -0
  58. /package/dist/{__vite-browser-external-2447137e-BML7CYau.mjs → __vite-browser-external-2447137e-Bopa5BFR.mjs} +0 -0
  59. /package/dist/{gifenc-CLRW41dk.mjs → gifenc-BI4ihP_T.mjs} +0 -0
  60. /package/dist/{node-NuJ94BWl.mjs → node-nsrAOjH4.mjs} +0 -0
  61. /package/dist/{resvg-js-C_8Wps1F.mjs → resvg-js-Cnk2o49d.mjs} +0 -0
  62. /package/dist/{src-CzfRafCQ.mjs → src-9ZhfQyzD.mjs} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { t as _usingCtx } from "../usingCtx-CsEf0xO3.mjs";
2
- import { t as require_jsx_runtime } from "../jsx-runtime-dMs_8fNu.mjs";
3
2
  import { useCallback, useState } from "react";
4
3
  import { Box, Text } from "silvery";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { run, useInput as useInput$1 } from "silvery/runtime";
6
6
  //#region apps/selection.tsx
7
7
  /**
@@ -16,7 +16,6 @@ import { run, useInput as useInput$1 } from "silvery/runtime";
16
16
  *
17
17
  * Run: bun examples/apps/selection.tsx
18
18
  */
19
- var import_jsx_runtime = require_jsx_runtime();
20
19
  const S = {
21
20
  cursor: (sel) => sel.nodes[0],
22
21
  anchor: (sel) => sel.nodes.at(-1),
@@ -115,34 +114,34 @@ function ItemRow({ item, sel, onSelect }) {
115
114
  const isEditing = isCursor && sel ? S.isEditing(sel) : false;
116
115
  const marker = isCursor ? "►" : isSelected ? "●" : " ";
117
116
  const anchorMark = isAnchor && !isCursor ? " ⚓" : "";
118
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
117
+ return /* @__PURE__ */ jsxs(Box, {
119
118
  onClick: (e) => onSelect(item.id, e.metaKey, e.shiftKey),
120
119
  onDoubleClick: () => onSelect(item.id, false, false),
121
120
  children: [
122
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
121
+ /* @__PURE__ */ jsxs(Text, {
123
122
  color: isSelected ? "$primary" : "$muted",
124
123
  children: [marker, " "]
125
124
  }),
126
- isEditing ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
125
+ isEditing ? /* @__PURE__ */ jsxs(Text, {
127
126
  backgroundColor: "$surface",
128
127
  color: "$text",
129
128
  bold: true,
130
129
  children: [
131
130
  " ",
132
131
  item.label,
133
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
132
+ /* @__PURE__ */ jsx(Text, {
134
133
  color: "$primary",
135
134
  children: "│"
136
135
  }),
137
136
  " "
138
137
  ]
139
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
138
+ }) : /* @__PURE__ */ jsx(Text, {
140
139
  bold: isCursor,
141
140
  color: isCursor ? "$primary" : isSelected ? "$primary" : "$text",
142
141
  dim: !isSelected && !isCursor,
143
142
  children: item.label
144
143
  }),
145
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
144
+ /* @__PURE__ */ jsx(Text, {
146
145
  color: "$muted",
147
146
  dim: true,
148
147
  children: anchorMark
@@ -152,48 +151,48 @@ function ItemRow({ item, sel, onSelect }) {
152
151
  }
153
152
  function StatusBar({ sel }) {
154
153
  const mode = S.inputMode(sel);
155
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
154
+ return /* @__PURE__ */ jsxs(Box, {
156
155
  flexDirection: "column",
157
156
  borderStyle: "single",
158
157
  borderColor: "$border",
159
158
  paddingX: 1,
160
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
159
+ children: [/* @__PURE__ */ jsxs(Box, {
161
160
  gap: 2,
162
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
161
+ children: [/* @__PURE__ */ jsx(Text, {
163
162
  color: mode === "text" ? "$success" : mode === "node" ? "$primary" : "$muted",
164
163
  bold: true,
165
164
  children: mode.toUpperCase()
166
- }), sel && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
167
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
165
+ }), sel && /* @__PURE__ */ jsxs(Fragment, { children: [
166
+ /* @__PURE__ */ jsxs(Text, {
168
167
  color: "$muted",
169
- children: ["cursor=", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
168
+ children: ["cursor=", /* @__PURE__ */ jsx(Text, {
170
169
  color: "$primary",
171
170
  children: S.cursor(sel)
172
171
  })]
173
172
  }),
174
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
173
+ /* @__PURE__ */ jsxs(Text, {
175
174
  color: "$muted",
176
- children: ["anchor=", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
175
+ children: ["anchor=", /* @__PURE__ */ jsx(Text, {
177
176
  color: "$text",
178
177
  children: S.anchor(sel)
179
178
  })]
180
179
  }),
181
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
180
+ /* @__PURE__ */ jsxs(Text, {
182
181
  color: "$muted",
183
- children: ["selected=", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
182
+ children: ["selected=", /* @__PURE__ */ jsx(Text, {
184
183
  color: "$text",
185
184
  children: sel.nodes.length
186
185
  })]
187
186
  }),
188
- sel.text && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
187
+ sel.text && /* @__PURE__ */ jsxs(Text, {
189
188
  color: "$muted",
190
- children: ["text=", /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
189
+ children: ["text=", /* @__PURE__ */ jsxs(Text, {
191
190
  color: "$success",
192
191
  children: ["offset ", sel.text[0].offset]
193
192
  })]
194
193
  })
195
194
  ] })]
196
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
195
+ }), /* @__PURE__ */ jsx(Text, {
197
196
  color: "$muted",
198
197
  dim: true,
199
198
  children: "j/k nav · Enter edit · Esc back · Shift+j/k extend · Cmd+click toggle · q quit"
@@ -284,39 +283,39 @@ function SelectionDemo() {
284
283
  ...item,
285
284
  label: editTexts[item.id] ?? item.label
286
285
  }));
287
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
286
+ return /* @__PURE__ */ jsxs(Box, {
288
287
  flexDirection: "column",
289
288
  padding: 1,
290
289
  height: "100%",
291
290
  children: [
292
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
291
+ /* @__PURE__ */ jsxs(Box, {
293
292
  marginBottom: 1,
294
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
293
+ children: [/* @__PURE__ */ jsx(Text, {
295
294
  bold: true,
296
295
  color: "$primary",
297
296
  children: "Selection Model Demo"
298
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
297
+ }), /* @__PURE__ */ jsx(Text, {
299
298
  color: "$muted",
300
299
  children: " — silvery reactive selection"
301
300
  })]
302
301
  }),
303
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
302
+ /* @__PURE__ */ jsx(Box, {
304
303
  flexDirection: "column",
305
304
  flexGrow: 1,
306
305
  borderStyle: "round",
307
306
  borderColor: "$border",
308
307
  overflow: "hidden",
309
- children: displayItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemRow, {
308
+ children: displayItems.map((item) => /* @__PURE__ */ jsx(ItemRow, {
310
309
  item,
311
310
  sel,
312
311
  onSelect: handleSelect
313
312
  }, item.id))
314
313
  }),
315
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusBar, { sel }),
316
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
314
+ /* @__PURE__ */ jsx(StatusBar, { sel }),
315
+ /* @__PURE__ */ jsx(Box, {
317
316
  marginTop: 1,
318
317
  flexDirection: "column",
319
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
318
+ children: /* @__PURE__ */ jsxs(Text, {
320
319
  color: "$muted",
321
320
  dim: true,
322
321
  children: [
@@ -343,7 +342,7 @@ const meta = {
343
342
  async function main() {
344
343
  try {
345
344
  var _usingCtx$1 = _usingCtx();
346
- await _usingCtx$1.u(await run(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectionDemo, {}), { mode: "fullscreen" })).waitUntilExit();
345
+ await _usingCtx$1.u(await run(/* @__PURE__ */ jsx(SelectionDemo, {}), { mode: "fullscreen" })).waitUntilExit();
347
346
  } catch (_) {
348
347
  _usingCtx$1.e = _;
349
348
  } finally {
@@ -1,7 +1,7 @@
1
1
  import { t as _usingCtx } from "../usingCtx-CsEf0xO3.mjs";
2
- import { t as require_jsx_runtime } from "../jsx-runtime-dMs_8fNu.mjs";
3
2
  import { useMemo, useState } from "react";
4
3
  import { Box, Text } from "silvery";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { run, useInput as useInput$1 } from "silvery/runtime";
6
6
  //#region apps/spatial-focus-demo.tsx
7
7
  /**
@@ -15,7 +15,6 @@ import { run, useInput as useInput$1 } from "silvery/runtime";
15
15
  *
16
16
  * Run: bun vendor/silvery/examples/apps/spatial-focus-demo.tsx
17
17
  */
18
- var import_jsx_runtime = require_jsx_runtime();
19
18
  const columns = [
20
19
  {
21
20
  id: "backlog",
@@ -200,7 +199,7 @@ const prioritySymbols = {
200
199
  }
201
200
  };
202
201
  function Tag({ name }) {
203
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
202
+ return /* @__PURE__ */ jsxs(Text, {
204
203
  color: tagColors[name] ?? "$muted",
205
204
  dim: true,
206
205
  children: ["#", name]
@@ -208,58 +207,58 @@ function Tag({ name }) {
208
207
  }
209
208
  function CardView({ card, focused }) {
210
209
  const priority = card.priority ? prioritySymbols[card.priority] : null;
211
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
210
+ return /* @__PURE__ */ jsxs(Box, {
212
211
  testID: card.id,
213
212
  flexDirection: "column",
214
213
  borderStyle: "round",
215
214
  borderColor: focused ? "$warning" : "$border",
216
215
  children: [
217
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
216
+ /* @__PURE__ */ jsxs(Box, {
218
217
  paddingX: 1,
219
218
  gap: 1,
220
- children: [priority && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
219
+ children: [priority && /* @__PURE__ */ jsx(Text, {
221
220
  color: priority.color,
222
221
  children: priority.symbol
223
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
222
+ }), /* @__PURE__ */ jsx(Text, {
224
223
  bold: focused,
225
224
  color: focused ? "$warning" : void 0,
226
225
  wrap: "truncate",
227
226
  children: card.title
228
227
  })]
229
228
  }),
230
- card.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
229
+ card.description && /* @__PURE__ */ jsx(Box, {
231
230
  paddingX: 1,
232
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
231
+ children: /* @__PURE__ */ jsx(Text, {
233
232
  color: "$muted",
234
233
  dim: true,
235
234
  wrap: "truncate",
236
235
  children: card.description
237
236
  })
238
237
  }),
239
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
238
+ /* @__PURE__ */ jsx(Box, {
240
239
  gap: 1,
241
240
  paddingX: 1,
242
- children: card.tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { name: tag }, tag))
241
+ children: card.tags.map((tag) => /* @__PURE__ */ jsx(Tag, { name: tag }, tag))
243
242
  })
244
243
  ]
245
244
  });
246
245
  }
247
246
  function ColumnView({ column, focusedCardId }) {
248
247
  const hasFocus = column.cards.some((c) => c.id === focusedCardId);
249
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
248
+ return /* @__PURE__ */ jsxs(Box, {
250
249
  flexDirection: "column",
251
250
  flexGrow: 1,
252
251
  flexBasis: 0,
253
252
  borderStyle: "single",
254
253
  borderColor: hasFocus ? "$warning" : "$border",
255
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
254
+ children: [/* @__PURE__ */ jsxs(Box, {
256
255
  backgroundColor: hasFocus ? "$warning" : void 0,
257
256
  paddingX: 1,
258
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
257
+ children: [/* @__PURE__ */ jsx(Text, {
259
258
  bold: true,
260
259
  color: hasFocus ? "$warning-fg" : void 0,
261
260
  children: column.title
262
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
261
+ }), /* @__PURE__ */ jsxs(Text, {
263
262
  color: hasFocus ? "$warning-fg" : "$muted",
264
263
  children: [
265
264
  " (",
@@ -267,11 +266,11 @@ function ColumnView({ column, focusedCardId }) {
267
266
  ")"
268
267
  ]
269
268
  })]
270
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
269
+ }), /* @__PURE__ */ jsx(Box, {
271
270
  flexDirection: "column",
272
271
  paddingX: 1,
273
272
  flexGrow: 1,
274
- children: column.cards.map((card) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardView, {
273
+ children: column.cards.map((card) => /* @__PURE__ */ jsx(CardView, {
275
274
  card,
276
275
  focused: card.id === focusedCardId
277
276
  }, card.id))
@@ -289,34 +288,34 @@ function StatusBar({ focusedId }) {
289
288
  break;
290
289
  }
291
290
  }
292
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
291
+ return /* @__PURE__ */ jsxs(Box, {
293
292
  paddingX: 1,
294
293
  gap: 2,
295
294
  children: [
296
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
295
+ /* @__PURE__ */ jsx(Text, {
297
296
  color: "$muted",
298
297
  dim: true,
299
298
  children: "←↑↓→/hjkl navigate"
300
299
  }),
301
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
300
+ /* @__PURE__ */ jsx(Text, {
302
301
  color: "$muted",
303
302
  dim: true,
304
303
  children: "q quit"
305
304
  }),
306
- focusedCard && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
307
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
305
+ focusedCard && /* @__PURE__ */ jsxs(Fragment, { children: [
306
+ /* @__PURE__ */ jsx(Text, {
308
307
  color: "$border",
309
308
  children: "│"
310
309
  }),
311
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
310
+ /* @__PURE__ */ jsx(Text, {
312
311
  color: "$warning",
313
312
  children: focusedColumn
314
313
  }),
315
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
314
+ /* @__PURE__ */ jsx(Text, {
316
315
  color: "$muted",
317
316
  children: "→"
318
317
  }),
319
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: focusedCard.title })
318
+ /* @__PURE__ */ jsx(Text, { children: focusedCard.title })
320
319
  ] })
321
320
  ]
322
321
  });
@@ -330,35 +329,35 @@ function SpatialFocusBoard() {
330
329
  const dir = key.upArrow ? "up" : key.downArrow ? "down" : key.leftArrow ? "left" : key.rightArrow ? "right" : !hasArrow && input === "k" ? "up" : !hasArrow && input === "j" ? "down" : !hasArrow && input === "h" ? "left" : !hasArrow && input === "l" ? "right" : null;
331
330
  if (dir) setFocusedId((id) => navigate(id, dir, index));
332
331
  });
333
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
332
+ return /* @__PURE__ */ jsxs(Box, {
334
333
  flexDirection: "column",
335
334
  padding: 1,
336
335
  height: "100%",
337
336
  children: [
338
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
337
+ /* @__PURE__ */ jsxs(Box, {
339
338
  marginBottom: 1,
340
339
  paddingX: 1,
341
340
  gap: 1,
342
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
341
+ children: [/* @__PURE__ */ jsx(Text, {
343
342
  bold: true,
344
343
  color: "$warning",
345
344
  children: "Spatial Focus"
346
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
345
+ }), /* @__PURE__ */ jsx(Text, {
347
346
  color: "$muted",
348
347
  children: "— arrow keys / hjkl navigate between cards across columns"
349
348
  })]
350
349
  }),
351
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
350
+ /* @__PURE__ */ jsx(Box, {
352
351
  flexGrow: 1,
353
352
  flexDirection: "row",
354
353
  gap: 1,
355
354
  overflow: "hidden",
356
- children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ColumnView, {
355
+ children: columns.map((column) => /* @__PURE__ */ jsx(ColumnView, {
357
356
  column,
358
357
  focusedCardId: focusedId
359
358
  }, column.id))
360
359
  }),
361
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusBar, { focusedId })
360
+ /* @__PURE__ */ jsx(StatusBar, { focusedId })
362
361
  ]
363
362
  });
364
363
  }
@@ -376,7 +375,7 @@ const meta = {
376
375
  async function main() {
377
376
  try {
378
377
  var _usingCtx$1 = _usingCtx();
379
- await _usingCtx$1.u(await run(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpatialFocusBoard, {}), { mode: "fullscreen" })).waitUntilExit();
378
+ await _usingCtx$1.u(await run(/* @__PURE__ */ jsx(SpatialFocusBoard, {}), { mode: "fullscreen" })).waitUntilExit();
380
379
  } catch (_) {
381
380
  _usingCtx$1.e = _;
382
381
  } finally {
@@ -1,8 +1,8 @@
1
1
  import { t as _usingCtx } from "../usingCtx-CsEf0xO3.mjs";
2
- import { t as require_jsx_runtime } from "../jsx-runtime-dMs_8fNu.mjs";
3
- import { t as ExampleBanner } from "../_banner-DLPxCqVy.mjs";
2
+ import { t as ExampleBanner } from "../_banner-A70_y2Vi.mjs";
4
3
  import { useMemo, useState } from "react";
5
4
  import { Box, Kbd, Muted, Text, createTerm, render, useApp, useInput } from "silvery";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region apps/task-list.tsx
7
7
  /**
8
8
  * Task List Example
@@ -13,7 +13,6 @@ import { Box, Kbd, Muted, Text, createTerm, render, useApp, useInput } from "sil
13
13
  * - Toggle task completion with space
14
14
  * - Variable height items (some with subtasks)
15
15
  */
16
- var import_jsx_runtime = require_jsx_runtime();
17
16
  const meta = {
18
17
  name: "Task List",
19
18
  description: "Scrollable list with priority badges, toggles, and expandable subtasks",
@@ -69,7 +68,7 @@ function generateTasks(count) {
69
68
  }));
70
69
  }
71
70
  function PriorityBadge({ priority }) {
72
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
71
+ return /* @__PURE__ */ jsxs(Text, {
73
72
  color: {
74
73
  high: "$error",
75
74
  medium: "$warning",
@@ -90,10 +89,10 @@ function PriorityBadge({ priority }) {
90
89
  function TaskItem({ task, isSelected, isExpanded }) {
91
90
  const checkbox = task.completed ? "[x]" : "[ ]";
92
91
  const hasSubtasks = task.subtasks && task.subtasks.length > 0;
93
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
92
+ return /* @__PURE__ */ jsxs(Box, {
94
93
  flexDirection: "column",
95
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, { children: [
96
- isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
94
+ children: [/* @__PURE__ */ jsxs(Box, { children: [
95
+ isSelected ? /* @__PURE__ */ jsxs(Text, {
97
96
  backgroundColor: "$primary",
98
97
  color: "$primary-fg",
99
98
  children: [
@@ -103,7 +102,7 @@ function TaskItem({ task, isSelected, isExpanded }) {
103
102
  task.title,
104
103
  " "
105
104
  ]
106
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
105
+ }) : /* @__PURE__ */ jsxs(Text, {
107
106
  strikethrough: task.completed,
108
107
  dim: task.completed,
109
108
  children: [
@@ -113,8 +112,8 @@ function TaskItem({ task, isSelected, isExpanded }) {
113
112
  ]
114
113
  }),
115
114
  " ",
116
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PriorityBadge, { priority: task.priority }),
117
- hasSubtasks && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
115
+ /* @__PURE__ */ jsx(PriorityBadge, { priority: task.priority }),
116
+ hasSubtasks && /* @__PURE__ */ jsxs(Text, {
118
117
  dim: true,
119
118
  children: [
120
119
  " (",
@@ -122,10 +121,10 @@ function TaskItem({ task, isSelected, isExpanded }) {
122
121
  " subtasks)"
123
122
  ]
124
123
  })
125
- ] }), hasSubtasks && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
124
+ ] }), hasSubtasks && isExpanded && /* @__PURE__ */ jsx(Box, {
126
125
  flexDirection: "column",
127
126
  marginLeft: 4,
128
- children: task.subtasks.map((subtask, idx) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
127
+ children: task.subtasks.map((subtask, idx) => /* @__PURE__ */ jsxs(Text, {
129
128
  dim: true,
130
129
  children: ["- ", subtask]
131
130
  }, idx))
@@ -136,21 +135,21 @@ function StatusBar({ tasks, cursor, scrollOffset, visibleCount }) {
136
135
  const completed = tasks.filter((t) => t.completed).length;
137
136
  const total = tasks.length;
138
137
  const percent = Math.round(completed / total * 100);
139
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
138
+ return /* @__PURE__ */ jsxs(Box, {
140
139
  justifyContent: "space-between",
141
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Muted, { children: [
140
+ children: [/* @__PURE__ */ jsxs(Muted, { children: [
142
141
  " ",
143
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: "j/k" }),
142
+ /* @__PURE__ */ jsx(Kbd, { children: "j/k" }),
144
143
  " navigate ",
145
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: "space" }),
144
+ /* @__PURE__ */ jsx(Kbd, { children: "space" }),
146
145
  " toggle ",
147
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: "enter" }),
146
+ /* @__PURE__ */ jsx(Kbd, { children: "enter" }),
148
147
  " expand ",
149
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: "Esc/q" }),
148
+ /* @__PURE__ */ jsx(Kbd, { children: "Esc/q" }),
150
149
  " quit"
151
- ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Muted, { children: [
150
+ ] }), /* @__PURE__ */ jsxs(Muted, { children: [
152
151
  " ",
153
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
152
+ /* @__PURE__ */ jsx(Text, {
154
153
  bold: true,
155
154
  children: completed
156
155
  }),
@@ -212,10 +211,10 @@ function TaskList() {
212
211
  });
213
212
  }
214
213
  });
215
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
214
+ return /* @__PURE__ */ jsxs(Box, {
216
215
  flexDirection: "column",
217
216
  padding: 1,
218
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
217
+ children: [/* @__PURE__ */ jsx(Box, {
219
218
  flexGrow: 1,
220
219
  flexDirection: "column",
221
220
  borderStyle: "round",
@@ -223,13 +222,13 @@ function TaskList() {
223
222
  overflow: "hidden",
224
223
  height: visibleCount + 2,
225
224
  children: visibleTasks.map((task, visibleIndex) => {
226
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TaskItem, {
225
+ return /* @__PURE__ */ jsx(TaskItem, {
227
226
  task,
228
227
  isSelected: scrollOffset + visibleIndex === cursor,
229
228
  isExpanded: expandedTasks.has(task.id)
230
229
  }, task.id);
231
230
  })
232
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusBar, {
231
+ }), /* @__PURE__ */ jsx(StatusBar, {
233
232
  tasks,
234
233
  cursor,
235
234
  scrollOffset,
@@ -241,10 +240,10 @@ async function main() {
241
240
  try {
242
241
  var _usingCtx$1 = _usingCtx();
243
242
  const term = _usingCtx$1.u(createTerm());
244
- const { waitUntilExit } = await render(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExampleBanner, {
243
+ const { waitUntilExit } = await render(/* @__PURE__ */ jsx(ExampleBanner, {
245
244
  meta,
246
245
  controls: "j/k navigate space toggle enter expand Esc/q quit",
247
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TaskList, {})
246
+ children: /* @__PURE__ */ jsx(TaskList, {})
248
247
  }), term);
249
248
  await waitUntilExit();
250
249
  } catch (_) {