@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,10 +1,10 @@
1
- import "../ansi-CCE2pVS0.mjs";
1
+ import "../ansi-0VXlUmNn.mjs";
2
2
  import { k as detectTerminalCaps, m as createColorSchemeDetector } from "../src-CUUOuRH6.mjs";
3
- import { _ as detectKittyFromStdio$1, g as createWidthDetector } from "../src-BTEVGpd9.mjs";
4
- import { t as require_jsx_runtime } from "../jsx-runtime-dMs_8fNu.mjs";
5
- import { t as ExampleBanner } from "../_banner-DLPxCqVy.mjs";
3
+ import { _ as detectKittyFromStdio$1, g as createWidthDetector } from "../src-jO3Zuzjj.mjs";
4
+ import { t as ExampleBanner } from "../_banner-A70_y2Vi.mjs";
6
5
  import { useState } from "react";
7
6
  import { Box, H3, Kbd, Muted, Text, render, useApp, useInput } from "silvery";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region apps/terminal-caps-demo.tsx
9
9
  /**
10
10
  * Terminal Capabilities Demo
@@ -29,7 +29,6 @@ import { Box, H3, Kbd, Muted, Text, render, useApp, useInput } from "silvery";
29
29
  *
30
30
  * Run: bun vendor/silvery/examples/apps/terminal-caps-demo.tsx
31
31
  */
32
- var import_jsx_runtime = require_jsx_runtime();
33
32
  const meta = {
34
33
  name: "Terminal Capabilities",
35
34
  description: "Probe and display all supported terminal protocols",
@@ -46,19 +45,19 @@ const meta = {
46
45
  };
47
46
  function StatusIcon({ status }) {
48
47
  switch (status) {
49
- case "supported": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
48
+ case "supported": return /* @__PURE__ */ jsx(Text, {
50
49
  color: "$success",
51
50
  children: "✓"
52
51
  });
53
- case "not-supported": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
52
+ case "not-supported": return /* @__PURE__ */ jsx(Text, {
54
53
  color: "$error",
55
54
  children: "✗"
56
55
  });
57
- case "probing": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
56
+ case "probing": return /* @__PURE__ */ jsx(Text, {
58
57
  color: "$warning",
59
58
  children: "?"
60
59
  });
61
- case "detected": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
60
+ case "detected": return /* @__PURE__ */ jsx(Text, {
62
61
  color: "$warning",
63
62
  children: "?"
64
63
  });
@@ -67,10 +66,10 @@ function StatusIcon({ status }) {
67
66
  function CapRow({ entry, width }) {
68
67
  const label = entry.detail ? `${entry.name}: ${entry.detail}` : entry.name;
69
68
  const padded = label.length < width ? label + " ".repeat(width - label.length) : label;
70
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, { children: [
71
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusIcon, { status: entry.status }),
72
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: " " }),
73
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
69
+ return /* @__PURE__ */ jsxs(Box, { children: [
70
+ /* @__PURE__ */ jsx(StatusIcon, { status: entry.status }),
71
+ /* @__PURE__ */ jsx(Text, { children: " " }),
72
+ /* @__PURE__ */ jsx(Text, {
74
73
  color: entry.status === "not-supported" ? "$muted" : void 0,
75
74
  children: padded
76
75
  })
@@ -193,15 +192,15 @@ function TerminalCapsApp({ initialProbes }) {
193
192
  const termType = caps.term || "(unknown)";
194
193
  const colorLevel = caps.colorLevel;
195
194
  const colWidth = 38;
196
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
195
+ return /* @__PURE__ */ jsxs(Box, {
197
196
  flexDirection: "column",
198
197
  paddingX: 1,
199
198
  paddingY: 1,
200
199
  children: [
201
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(H3, { children: "Terminal Capabilities Probe" }),
202
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
200
+ /* @__PURE__ */ jsx(H3, { children: "Terminal Capabilities Probe" }),
201
+ /* @__PURE__ */ jsx(Box, {
203
202
  paddingBottom: 1,
204
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Muted, { children: [
203
+ children: /* @__PURE__ */ jsxs(Muted, { children: [
205
204
  "Terminal: ",
206
205
  termProgram,
207
206
  " (",
@@ -213,43 +212,43 @@ function TerminalCapsApp({ initialProbes }) {
213
212
  caps.darkBackground ? "dark" : "light"
214
213
  ] })
215
214
  }),
216
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
215
+ /* @__PURE__ */ jsxs(Box, { children: [/* @__PURE__ */ jsxs(Box, {
217
216
  flexDirection: "column",
218
217
  width: colWidth + 4,
219
218
  children: [
220
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
219
+ /* @__PURE__ */ jsx(Text, {
221
220
  bold: true,
222
221
  color: "$primary",
223
222
  children: "Static Detection"
224
223
  }),
225
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, { height: 1 }),
226
- staticEntries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CapRow, {
224
+ /* @__PURE__ */ jsx(Box, { height: 1 }),
225
+ staticEntries.map((entry) => /* @__PURE__ */ jsx(CapRow, {
227
226
  entry,
228
227
  width: colWidth
229
228
  }, entry.name))
230
229
  ]
231
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, {
230
+ }), /* @__PURE__ */ jsxs(Box, {
232
231
  flexDirection: "column",
233
232
  width: colWidth + 4,
234
233
  children: [
235
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
234
+ /* @__PURE__ */ jsx(Text, {
236
235
  bold: true,
237
236
  color: "$primary",
238
237
  children: "Runtime Probes"
239
238
  }),
240
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, { height: 1 }),
241
- probeEntries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CapRow, {
239
+ /* @__PURE__ */ jsx(Box, { height: 1 }),
240
+ probeEntries.map((entry) => /* @__PURE__ */ jsx(CapRow, {
242
241
  entry,
243
242
  width: colWidth
244
243
  }, entry.name))
245
244
  ]
246
245
  })] }),
247
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
246
+ /* @__PURE__ */ jsx(Box, {
248
247
  paddingTop: 1,
249
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Muted, { children: [
250
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: "q" }),
248
+ children: /* @__PURE__ */ jsxs(Muted, { children: [
249
+ /* @__PURE__ */ jsx(Kbd, { children: "q" }),
251
250
  " or ",
252
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: "Esc" }),
251
+ /* @__PURE__ */ jsx(Kbd, { children: "Esc" }),
253
252
  " to quit"
254
253
  ] })
255
254
  })
@@ -303,10 +302,10 @@ async function main() {
303
302
  process.stdin.setRawMode(false);
304
303
  process.stdin.pause();
305
304
  }
306
- const { waitUntilExit } = await render(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExampleBanner, {
305
+ const { waitUntilExit } = await render(/* @__PURE__ */ jsx(ExampleBanner, {
307
306
  meta,
308
307
  controls: "q/Esc quit",
309
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TerminalCapsApp, { initialProbes: probeResults })
308
+ children: /* @__PURE__ */ jsx(TerminalCapsApp, { initialProbes: probeResults })
310
309
  }));
311
310
  await waitUntilExit();
312
311
  }