@silvery/examples 0.5.6 → 0.17.4

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 (112) hide show
  1. package/dist/UPNG-Cy7ViL8f.mjs +5074 -0
  2. package/dist/__vite-browser-external-2447137e-BML7CYau.mjs +4 -0
  3. package/dist/_banner-DLPxCqVy.mjs +44 -0
  4. package/dist/ansi-CCE2pVS0.mjs +16397 -0
  5. package/dist/apng-HhhBjRGt.mjs +68 -0
  6. package/dist/apng-mwUQbTTF.mjs +3 -0
  7. package/dist/apps/aichat/index.mjs +1299 -0
  8. package/dist/apps/app-todo.mjs +139 -0
  9. package/dist/apps/async-data.mjs +204 -0
  10. package/dist/apps/cli-wizard.mjs +339 -0
  11. package/dist/apps/clipboard.mjs +198 -0
  12. package/dist/apps/components.mjs +864 -0
  13. package/dist/apps/data-explorer.mjs +483 -0
  14. package/dist/apps/dev-tools.mjs +397 -0
  15. package/dist/apps/explorer.mjs +698 -0
  16. package/dist/apps/gallery.mjs +766 -0
  17. package/dist/apps/inline-bench.mjs +115 -0
  18. package/dist/apps/kanban.mjs +280 -0
  19. package/dist/apps/layout-ref.mjs +187 -0
  20. package/dist/apps/outline.mjs +203 -0
  21. package/dist/apps/paste-demo.mjs +189 -0
  22. package/dist/apps/scroll.mjs +86 -0
  23. package/dist/apps/search-filter.mjs +287 -0
  24. package/dist/apps/selection.mjs +355 -0
  25. package/dist/apps/spatial-focus-demo.mjs +388 -0
  26. package/dist/apps/task-list.mjs +258 -0
  27. package/dist/apps/terminal-caps-demo.mjs +315 -0
  28. package/dist/apps/terminal.mjs +872 -0
  29. package/dist/apps/text-selection-demo.mjs +254 -0
  30. package/dist/apps/textarea.mjs +178 -0
  31. package/dist/apps/theme.mjs +661 -0
  32. package/dist/apps/transform.mjs +215 -0
  33. package/dist/apps/virtual-10k.mjs +422 -0
  34. package/dist/assets/resvgjs.darwin-arm64-BtufyGW1.node +0 -0
  35. package/dist/backends-Bahh9mKN.mjs +1179 -0
  36. package/dist/backends-CCtCDQ94.mjs +3 -0
  37. package/dist/{cli.mjs → bin/cli.mjs} +21 -25
  38. package/dist/chunk-BSw8zbkd.mjs +37 -0
  39. package/dist/components/counter.mjs +48 -0
  40. package/dist/components/hello.mjs +31 -0
  41. package/dist/components/progress-bar.mjs +59 -0
  42. package/dist/components/select-list.mjs +85 -0
  43. package/dist/components/spinner.mjs +57 -0
  44. package/dist/components/text-input.mjs +62 -0
  45. package/dist/components/virtual-list.mjs +51 -0
  46. package/dist/flexily-zero-adapter-UB-ra8fR.mjs +3374 -0
  47. package/dist/gif-BZaqPPVX.mjs +3 -0
  48. package/dist/gif-BtnXuxLF.mjs +71 -0
  49. package/dist/gifenc-CLRW41dk.mjs +728 -0
  50. package/dist/jsx-runtime-dMs_8fNu.mjs +241 -0
  51. package/dist/key-mapping-5oYQdAQE.mjs +3 -0
  52. package/dist/key-mapping-D4LR1go6.mjs +130 -0
  53. package/dist/layout/dashboard.mjs +1204 -0
  54. package/dist/layout/live-resize.mjs +303 -0
  55. package/dist/layout/overflow.mjs +70 -0
  56. package/dist/layout/text-layout.mjs +335 -0
  57. package/dist/node-NuJ94BWl.mjs +1083 -0
  58. package/dist/plugins-D1KtkT4a.mjs +3057 -0
  59. package/dist/resvg-js-C_8Wps1F.mjs +201 -0
  60. package/dist/src-BTEVGpd9.mjs +23538 -0
  61. package/dist/src-CUUOuRH6.mjs +5322 -0
  62. package/dist/src-CzfRafCQ.mjs +814 -0
  63. package/dist/usingCtx-CsEf0xO3.mjs +57 -0
  64. package/dist/yoga-adapter-BVtQ5OJR.mjs +237 -0
  65. package/package.json +19 -14
  66. package/_banner.tsx +0 -60
  67. package/apps/aichat/components.tsx +0 -469
  68. package/apps/aichat/index.tsx +0 -220
  69. package/apps/aichat/script.ts +0 -460
  70. package/apps/aichat/state.ts +0 -325
  71. package/apps/aichat/types.ts +0 -19
  72. package/apps/app-todo.tsx +0 -201
  73. package/apps/async-data.tsx +0 -196
  74. package/apps/cli-wizard.tsx +0 -332
  75. package/apps/clipboard.tsx +0 -183
  76. package/apps/components.tsx +0 -658
  77. package/apps/data-explorer.tsx +0 -490
  78. package/apps/dev-tools.tsx +0 -395
  79. package/apps/explorer.tsx +0 -731
  80. package/apps/gallery.tsx +0 -653
  81. package/apps/inline-bench.tsx +0 -138
  82. package/apps/kanban.tsx +0 -265
  83. package/apps/layout-ref.tsx +0 -173
  84. package/apps/outline.tsx +0 -160
  85. package/apps/panes/index.tsx +0 -203
  86. package/apps/paste-demo.tsx +0 -185
  87. package/apps/scroll.tsx +0 -77
  88. package/apps/search-filter.tsx +0 -240
  89. package/apps/selection.tsx +0 -342
  90. package/apps/spatial-focus-demo.tsx +0 -368
  91. package/apps/task-list.tsx +0 -271
  92. package/apps/terminal-caps-demo.tsx +0 -334
  93. package/apps/terminal.tsx +0 -800
  94. package/apps/text-selection-demo.tsx +0 -189
  95. package/apps/textarea.tsx +0 -155
  96. package/apps/theme.tsx +0 -515
  97. package/apps/transform.tsx +0 -229
  98. package/apps/virtual-10k.tsx +0 -405
  99. package/apps/vterm-demo/index.tsx +0 -216
  100. package/components/counter.tsx +0 -45
  101. package/components/hello.tsx +0 -34
  102. package/components/progress-bar.tsx +0 -48
  103. package/components/select-list.tsx +0 -50
  104. package/components/spinner.tsx +0 -40
  105. package/components/text-input.tsx +0 -57
  106. package/components/virtual-list.tsx +0 -52
  107. package/dist/cli.d.mts +0 -1
  108. package/dist/cli.mjs.map +0 -1
  109. package/layout/dashboard.tsx +0 -953
  110. package/layout/live-resize.tsx +0 -282
  111. package/layout/overflow.tsx +0 -51
  112. package/layout/text-layout.tsx +0 -283
@@ -0,0 +1,201 @@
1
+ import { i as __require, t as __commonJSMin } from "./chunk-BSw8zbkd.mjs";
2
+ //#region ../../../node_modules/.bun/@resvg+resvg-js@2.6.2/node_modules/@resvg/resvg-js/js-binding.js
3
+ var require_js_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
+ const { existsSync, readFileSync } = __require("fs"), { join } = __require("path"), { platform, arch } = process;
5
+ let nativeBinding = null, localFileExisted = !1, loadError = null;
6
+ function isMusl() {
7
+ if (!process.report || typeof process.report.getReport != "function") try {
8
+ return readFileSync(__require("child_process").execSync("which ldd").toString().trim(), "utf8").includes("musl");
9
+ } catch {
10
+ return !0;
11
+ }
12
+ else {
13
+ const { glibcVersionRuntime: e } = process.report.getReport().header;
14
+ return !e;
15
+ }
16
+ }
17
+ switch (platform) {
18
+ case "android":
19
+ switch (arch) {
20
+ case "arm64":
21
+ localFileExisted = existsSync(join(__dirname, "resvgjs.android-arm64.node"));
22
+ try {
23
+ localFileExisted ? nativeBinding = __require("./resvgjs.android-arm64.node") : nativeBinding = __require("@resvg/resvg-js-android-arm64");
24
+ } catch (e) {
25
+ loadError = e;
26
+ }
27
+ break;
28
+ case "arm":
29
+ localFileExisted = existsSync(join(__dirname, "resvgjs.android-arm-eabi.node"));
30
+ try {
31
+ localFileExisted ? nativeBinding = __require("./resvgjs.android-arm-eabi.node") : nativeBinding = __require("@resvg/resvg-js-android-arm-eabi");
32
+ } catch (e) {
33
+ loadError = e;
34
+ }
35
+ break;
36
+ default: throw new Error(`Unsupported architecture on Android ${arch}`);
37
+ }
38
+ break;
39
+ case "win32":
40
+ switch (arch) {
41
+ case "x64":
42
+ localFileExisted = existsSync(join(__dirname, "resvgjs.win32-x64-msvc.node"));
43
+ try {
44
+ localFileExisted ? nativeBinding = __require("./resvgjs.win32-x64-msvc.node") : nativeBinding = __require("@resvg/resvg-js-win32-x64-msvc");
45
+ } catch (e) {
46
+ loadError = e;
47
+ }
48
+ break;
49
+ case "ia32":
50
+ localFileExisted = existsSync(join(__dirname, "resvgjs.win32-ia32-msvc.node"));
51
+ try {
52
+ localFileExisted ? nativeBinding = __require("./resvgjs.win32-ia32-msvc.node") : nativeBinding = __require("@resvg/resvg-js-win32-ia32-msvc");
53
+ } catch (e) {
54
+ loadError = e;
55
+ }
56
+ break;
57
+ case "arm64":
58
+ localFileExisted = existsSync(join(__dirname, "resvgjs.win32-arm64-msvc.node"));
59
+ try {
60
+ localFileExisted ? nativeBinding = __require("./resvgjs.win32-arm64-msvc.node") : nativeBinding = __require("@resvg/resvg-js-win32-arm64-msvc");
61
+ } catch (e) {
62
+ loadError = e;
63
+ }
64
+ break;
65
+ default: throw new Error(`Unsupported architecture on Windows: ${arch}`);
66
+ }
67
+ break;
68
+ case "darwin":
69
+ localFileExisted = existsSync(join(__dirname, "resvgjs.darwin-universal.node"));
70
+ try {
71
+ localFileExisted ? nativeBinding = __require("./resvgjs.darwin-universal.node") : nativeBinding = __require("@resvg/resvg-js-darwin-universal");
72
+ break;
73
+ } catch {}
74
+ switch (arch) {
75
+ case "x64":
76
+ localFileExisted = existsSync(join(__dirname, "resvgjs.darwin-x64.node"));
77
+ try {
78
+ localFileExisted ? nativeBinding = __require("./resvgjs.darwin-x64.node") : nativeBinding = __require("@resvg/resvg-js-darwin-x64");
79
+ } catch (e) {
80
+ loadError = e;
81
+ }
82
+ break;
83
+ case "arm64":
84
+ localFileExisted = existsSync(join(__dirname, "resvgjs.darwin-arm64.node"));
85
+ try {
86
+ localFileExisted ? nativeBinding = __require("./resvgjs.darwin-arm64.node") : nativeBinding = __require("./assets/resvgjs.darwin-arm64-BtufyGW1.node");
87
+ } catch (e) {
88
+ loadError = e;
89
+ }
90
+ break;
91
+ default: throw new Error(`Unsupported architecture on macOS: ${arch}`);
92
+ }
93
+ break;
94
+ case "freebsd":
95
+ if (arch !== "x64") throw new Error(`Unsupported architecture on FreeBSD: ${arch}`);
96
+ localFileExisted = existsSync(join(__dirname, "resvgjs.freebsd-x64.node"));
97
+ try {
98
+ localFileExisted ? nativeBinding = __require("./resvgjs.freebsd-x64.node") : nativeBinding = __require("@resvg/resvg-js-freebsd-x64");
99
+ } catch (e) {
100
+ loadError = e;
101
+ }
102
+ break;
103
+ case "linux":
104
+ switch (arch) {
105
+ case "x64":
106
+ if (isMusl()) {
107
+ localFileExisted = existsSync(join(__dirname, "resvgjs.linux-x64-musl.node"));
108
+ try {
109
+ localFileExisted ? nativeBinding = __require("./resvgjs.linux-x64-musl.node") : nativeBinding = __require("@resvg/resvg-js-linux-x64-musl");
110
+ } catch (e) {
111
+ loadError = e;
112
+ }
113
+ } else {
114
+ localFileExisted = existsSync(join(__dirname, "resvgjs.linux-x64-gnu.node"));
115
+ try {
116
+ localFileExisted ? nativeBinding = __require("./resvgjs.linux-x64-gnu.node") : nativeBinding = __require("@resvg/resvg-js-linux-x64-gnu");
117
+ } catch (e) {
118
+ loadError = e;
119
+ }
120
+ }
121
+ break;
122
+ case "arm64":
123
+ if (isMusl()) {
124
+ localFileExisted = existsSync(join(__dirname, "resvgjs.linux-arm64-musl.node"));
125
+ try {
126
+ localFileExisted ? nativeBinding = __require("./resvgjs.linux-arm64-musl.node") : nativeBinding = __require("@resvg/resvg-js-linux-arm64-musl");
127
+ } catch (e) {
128
+ loadError = e;
129
+ }
130
+ } else {
131
+ localFileExisted = existsSync(join(__dirname, "resvgjs.linux-arm64-gnu.node"));
132
+ try {
133
+ localFileExisted ? nativeBinding = __require("./resvgjs.linux-arm64-gnu.node") : nativeBinding = __require("@resvg/resvg-js-linux-arm64-gnu");
134
+ } catch (e) {
135
+ loadError = e;
136
+ }
137
+ }
138
+ break;
139
+ case "arm":
140
+ localFileExisted = existsSync(join(__dirname, "resvgjs.linux-arm-gnueabihf.node"));
141
+ try {
142
+ localFileExisted ? nativeBinding = __require("./resvgjs.linux-arm-gnueabihf.node") : nativeBinding = __require("@resvg/resvg-js-linux-arm-gnueabihf");
143
+ } catch (e) {
144
+ loadError = e;
145
+ }
146
+ break;
147
+ case "riscv64":
148
+ if (isMusl()) {
149
+ localFileExisted = existsSync(join(__dirname, "resvgjs.linux-riscv64-musl.node"));
150
+ try {
151
+ localFileExisted ? nativeBinding = __require("./resvgjs.linux-riscv64-musl.node") : nativeBinding = __require("@resvg/resvg-js-linux-riscv64-musl");
152
+ } catch (e) {
153
+ loadError = e;
154
+ }
155
+ } else {
156
+ localFileExisted = existsSync(join(__dirname, "resvgjs.linux-riscv64-gnu.node"));
157
+ try {
158
+ localFileExisted ? nativeBinding = __require("./resvgjs.linux-riscv64-gnu.node") : nativeBinding = __require("@resvg/resvg-js-linux-riscv64-gnu");
159
+ } catch (e) {
160
+ loadError = e;
161
+ }
162
+ }
163
+ break;
164
+ case "s390x":
165
+ localFileExisted = existsSync(join(__dirname, "resvgjs.linux-s390x-gnu.node"));
166
+ try {
167
+ localFileExisted ? nativeBinding = __require("./resvgjs.linux-s390x-gnu.node") : nativeBinding = __require("@resvg/resvg-js-linux-s390x-gnu");
168
+ } catch (e) {
169
+ loadError = e;
170
+ }
171
+ break;
172
+ default: throw new Error(`Unsupported architecture on Linux: ${arch}`);
173
+ }
174
+ break;
175
+ default: throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`);
176
+ }
177
+ if (!nativeBinding) throw loadError || /* @__PURE__ */ new Error("Failed to load native binding");
178
+ const { BBox, Resvg, RenderedImage, renderAsync } = nativeBinding;
179
+ module.exports.BBox = BBox, module.exports.Resvg = Resvg, module.exports.RenderedImage = RenderedImage, module.exports.renderAsync = renderAsync;
180
+ }));
181
+ //#endregion
182
+ //#region ../../../node_modules/.bun/@resvg+resvg-js@2.6.2/node_modules/@resvg/resvg-js/index.js
183
+ var require_resvg_js = /* @__PURE__ */ __commonJSMin(((exports, module) => {
184
+ const { render: _render, renderAsync: _renderAsync, Resvg: _Resvg } = require_js_binding();
185
+ module.exports.render = function render(svg, options) {
186
+ if (options) return _render(svg, JSON.stringify(options));
187
+ return _render(svg);
188
+ };
189
+ module.exports.renderAsync = function renderAsync(svg, options, signal) {
190
+ if (options) return _renderAsync(svg, JSON.stringify(options), signal);
191
+ return _renderAsync(svg, null, signal);
192
+ };
193
+ module.exports.Resvg = class Resvg extends _Resvg {
194
+ constructor(svg, options) {
195
+ super(svg, JSON.stringify(options));
196
+ }
197
+ };
198
+ }));
199
+ //#endregion
200
+ export default require_resvg_js();
201
+ export {};