@prestack/thread-ui 0.1.10 → 0.1.12

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 (209) hide show
  1. package/CHANGELOG.md +375 -0
  2. package/dist/ui/attach.js +6 -7
  3. package/dist/ui/compositions.d.ts +0 -8
  4. package/dist/ui/compositions.js +3 -166
  5. package/dist/ui/generators/routes.js +1 -0
  6. package/package.json +2 -2
  7. package/dist/ui/animations/anm_appear.ts +0 -13
  8. package/dist/ui/animations/anm_blur_in.ts +0 -19
  9. package/dist/ui/animations/anm_blur_out.ts +0 -18
  10. package/dist/ui/animations/anm_dismiss.ts +0 -18
  11. package/dist/ui/animations/anm_drop.ts +0 -19
  12. package/dist/ui/animations/anm_fall.ts +0 -18
  13. package/dist/ui/animations/anm_flash.ts +0 -18
  14. package/dist/ui/animations/anm_glow.ts +0 -16
  15. package/dist/ui/animations/anm_lift.ts +0 -16
  16. package/dist/ui/animations/anm_nudge.ts +0 -16
  17. package/dist/ui/animations/anm_pop_in.ts +0 -23
  18. package/dist/ui/animations/anm_pop_out.ts +0 -22
  19. package/dist/ui/animations/anm_press.ts +0 -12
  20. package/dist/ui/animations/anm_pulse.ts +0 -13
  21. package/dist/ui/animations/anm_rise.ts +0 -19
  22. package/dist/ui/animations/anm_shake.ts +0 -13
  23. package/dist/ui/animations/anm_slide_in_left.ts +0 -19
  24. package/dist/ui/animations/anm_slide_in_right.ts +0 -19
  25. package/dist/ui/animations/anm_slide_out_left.ts +0 -18
  26. package/dist/ui/animations/anm_slide_out_right.ts +0 -18
  27. package/dist/ui/animations/anm_spin.ts +0 -12
  28. package/dist/ui/animations/anm_swell.ts +0 -16
  29. package/dist/ui/animations/anm_wobble.ts +0 -24
  30. package/dist/ui/animations/anm_zoom_in.ts +0 -19
  31. package/dist/ui/animations/anm_zoom_out.ts +0 -18
  32. package/dist/ui/animations.ts +0 -308
  33. package/dist/ui/attach.ts +0 -553
  34. package/dist/ui/charts.tsx +0 -69
  35. package/dist/ui/checked.ts +0 -32
  36. package/dist/ui/collector.ts +0 -140
  37. package/dist/ui/compositions.ts +0 -613
  38. package/dist/ui/consent.ts +0 -55
  39. package/dist/ui/content.tsx +0 -27
  40. package/dist/ui/contrast.ts +0 -27
  41. package/dist/ui/controls.tsx +0 -25
  42. package/dist/ui/disclosure.tsx +0 -20
  43. package/dist/ui/dismiss-layer.ts +0 -87
  44. package/dist/ui/door.ts +0 -140
  45. package/dist/ui/drag.ts +0 -316
  46. package/dist/ui/elements/accordion.tsx +0 -47
  47. package/dist/ui/elements/accordion.works.ts +0 -66
  48. package/dist/ui/elements/aspect-ratio.tsx +0 -31
  49. package/dist/ui/elements/aspect-ratio.works.ts +0 -5
  50. package/dist/ui/elements/avatar.tsx +0 -34
  51. package/dist/ui/elements/avatar.works.ts +0 -16
  52. package/dist/ui/elements/badge.tsx +0 -33
  53. package/dist/ui/elements/badge.works.ts +0 -9
  54. package/dist/ui/elements/bars.tsx +0 -50
  55. package/dist/ui/elements/bars.works.ts +0 -29
  56. package/dist/ui/elements/box.tsx +0 -36
  57. package/dist/ui/elements/breadcrumb.tsx +0 -38
  58. package/dist/ui/elements/breadcrumb.works.ts +0 -24
  59. package/dist/ui/elements/button.tsx +0 -46
  60. package/dist/ui/elements/button.works.tsx +0 -52
  61. package/dist/ui/elements/column.tsx +0 -29
  62. package/dist/ui/elements/consent.tsx +0 -71
  63. package/dist/ui/elements/consent.works.tsx +0 -132
  64. package/dist/ui/elements/donut.tsx +0 -45
  65. package/dist/ui/elements/donut.works.ts +0 -42
  66. package/dist/ui/elements/each.tsx +0 -34
  67. package/dist/ui/elements/each.works.tsx +0 -82
  68. package/dist/ui/elements/empty.tsx +0 -33
  69. package/dist/ui/elements/field.tsx +0 -45
  70. package/dist/ui/elements/field.works.ts +0 -65
  71. package/dist/ui/elements/funnel.tsx +0 -50
  72. package/dist/ui/elements/funnel.works.ts +0 -37
  73. package/dist/ui/elements/gauge.tsx +0 -40
  74. package/dist/ui/elements/gauge.works.ts +0 -42
  75. package/dist/ui/elements/glyph.tsx +0 -30
  76. package/dist/ui/elements/glyph.works.tsx +0 -42
  77. package/dist/ui/elements/grid.tsx +0 -29
  78. package/dist/ui/elements/heatmap.tsx +0 -48
  79. package/dist/ui/elements/heatmap.works.ts +0 -24
  80. package/dist/ui/elements/hit-box.tsx +0 -47
  81. package/dist/ui/elements/hit-box.works.tsx +0 -576
  82. package/dist/ui/elements/image.tsx +0 -29
  83. package/dist/ui/elements/line-chart.tsx +0 -45
  84. package/dist/ui/elements/line-chart.works.ts +0 -41
  85. package/dist/ui/elements/link.tsx +0 -38
  86. package/dist/ui/elements/link.works.ts +0 -25
  87. package/dist/ui/elements/media.tsx +0 -57
  88. package/dist/ui/elements/menu.tsx +0 -51
  89. package/dist/ui/elements/menu.works.tsx +0 -154
  90. package/dist/ui/elements/money.tsx +0 -36
  91. package/dist/ui/elements/money.works.ts +0 -9
  92. package/dist/ui/elements/pagination.tsx +0 -39
  93. package/dist/ui/elements/pagination.works.ts +0 -20
  94. package/dist/ui/elements/progress.tsx +0 -34
  95. package/dist/ui/elements/progress.works.ts +0 -8
  96. package/dist/ui/elements/radio-group.tsx +0 -50
  97. package/dist/ui/elements/radio-group.works.ts +0 -33
  98. package/dist/ui/elements/row.tsx +0 -29
  99. package/dist/ui/elements/scatter.tsx +0 -42
  100. package/dist/ui/elements/scatter.works.ts +0 -38
  101. package/dist/ui/elements/select.tsx +0 -43
  102. package/dist/ui/elements/select.works.ts +0 -5
  103. package/dist/ui/elements/separator.tsx +0 -31
  104. package/dist/ui/elements/skeleton.tsx +0 -31
  105. package/dist/ui/elements/slider.tsx +0 -34
  106. package/dist/ui/elements/slider.works.ts +0 -5
  107. package/dist/ui/elements/sparkline.tsx +0 -37
  108. package/dist/ui/elements/sparkline.works.ts +0 -32
  109. package/dist/ui/elements/spinner.tsx +0 -33
  110. package/dist/ui/elements/stack.tsx +0 -29
  111. package/dist/ui/elements/stat.tsx +0 -36
  112. package/dist/ui/elements/stat.works.ts +0 -14
  113. package/dist/ui/elements/surface.tsx +0 -36
  114. package/dist/ui/elements/surface.works.ts +0 -9
  115. package/dist/ui/elements/table.tsx +0 -62
  116. package/dist/ui/elements/table.works.ts +0 -30
  117. package/dist/ui/elements/tabs.tsx +0 -47
  118. package/dist/ui/elements/tabs.works.ts +0 -84
  119. package/dist/ui/elements/text.tsx +0 -33
  120. package/dist/ui/elements/textarea.tsx +0 -38
  121. package/dist/ui/elements/textarea.works.ts +0 -5
  122. package/dist/ui/elements/time.tsx +0 -40
  123. package/dist/ui/elements/time.works.ts +0 -29
  124. package/dist/ui/elements/toggle.tsx +0 -34
  125. package/dist/ui/elements/toggle.works.ts +0 -5
  126. package/dist/ui/elements/tooltip.tsx +0 -40
  127. package/dist/ui/elements/tooltip.works.ts +0 -77
  128. package/dist/ui/elements/value.tsx +0 -38
  129. package/dist/ui/elements/value.works.ts +0 -9
  130. package/dist/ui/elements.ts +0 -127
  131. package/dist/ui/focus-scope.ts +0 -121
  132. package/dist/ui/fonts.ts +0 -355
  133. package/dist/ui/generators/dev.d.ts +0 -1
  134. package/dist/ui/generators/dev.js +0 -62
  135. package/dist/ui/generators/dev.ts +0 -75
  136. package/dist/ui/generators/elements.ts +0 -796
  137. package/dist/ui/generators/i18n.ts +0 -283
  138. package/dist/ui/generators/icons.ts +0 -207
  139. package/dist/ui/generators/react.ts +0 -267
  140. package/dist/ui/generators/routes.ts +0 -847
  141. package/dist/ui/generators/show.ts +0 -261
  142. package/dist/ui/generators/styles.ts +0 -677
  143. package/dist/ui/generators/variants.ts +0 -196
  144. package/dist/ui/i18n/catalogs/en.ts +0 -191
  145. package/dist/ui/i18n/format.ts +0 -221
  146. package/dist/ui/i18n/locales.ts +0 -33
  147. package/dist/ui/i18n/parse.ts +0 -315
  148. package/dist/ui/i18n/translator.ts +0 -31
  149. package/dist/ui/i18n/types.ts +0 -96
  150. package/dist/ui/icons.ts +0 -331
  151. package/dist/ui/islands/map.ts +0 -58
  152. package/dist/ui/localizations.ts +0 -75
  153. package/dist/ui/material.ts +0 -236
  154. package/dist/ui/materials/mat_bordered.ts +0 -13
  155. package/dist/ui/materials/mat_ceramic.ts +0 -13
  156. package/dist/ui/materials/mat_clay.ts +0 -13
  157. package/dist/ui/materials/mat_elevated.ts +0 -24
  158. package/dist/ui/materials/mat_flat.ts +0 -34
  159. package/dist/ui/materials/mat_glass.ts +0 -20
  160. package/dist/ui/materials/mat_lit.ts +0 -13
  161. package/dist/ui/materials/mat_moulded.ts +0 -11
  162. package/dist/ui/materials.ts +0 -197
  163. package/dist/ui/modes.ts +0 -44
  164. package/dist/ui/navigation.tsx +0 -29
  165. package/dist/ui/positioning.ts +0 -90
  166. package/dist/ui/presented.tsx +0 -119
  167. package/dist/ui/provider.tsx +0 -184
  168. package/dist/ui/render-loop.ts +0 -133
  169. package/dist/ui/roving-focus.ts +0 -161
  170. package/dist/ui/screens.ts +0 -141
  171. package/dist/ui/scroll-lock.ts +0 -28
  172. package/dist/ui/series.ts +0 -97
  173. package/dist/ui/signals.ts +0 -386
  174. package/dist/ui/styleguide.ts +0 -231
  175. package/dist/ui/styleguides.ts +0 -374
  176. package/dist/ui/themes.ts +0 -22
  177. package/dist/ui/token.ts +0 -78
  178. package/dist/ui/tokens/shadow.ts +0 -25
  179. package/dist/ui/tokens.ts +0 -234
  180. package/dist/ui/validators.ts +0 -232
  181. package/dist/ui/variant.ts +0 -349
  182. package/dist/ui/variants/var_avatar-round.ts +0 -14
  183. package/dist/ui/variants/var_bubble-me.ts +0 -14
  184. package/dist/ui/variants/var_bubble-them.ts +0 -13
  185. package/dist/ui/variants/var_button-border.ts +0 -76
  186. package/dist/ui/variants/var_button-cta.ts +0 -76
  187. package/dist/ui/variants/var_button-destructive-ghost.ts +0 -72
  188. package/dist/ui/variants/var_button-destructive.ts +0 -76
  189. package/dist/ui/variants/var_button-fill.ts +0 -76
  190. package/dist/ui/variants/var_button-ghost.ts +0 -72
  191. package/dist/ui/variants/var_button-glass.ts +0 -55
  192. package/dist/ui/variants/var_button-normal.ts +0 -76
  193. package/dist/ui/variants/var_button-quiet.ts +0 -74
  194. package/dist/ui/variants/var_card.ts +0 -17
  195. package/dist/ui/variants/var_chip.ts +0 -13
  196. package/dist/ui/variants/var_choice.ts +0 -15
  197. package/dist/ui/variants/var_framed.ts +0 -10
  198. package/dist/ui/variants/var_glyph-plain.ts +0 -11
  199. package/dist/ui/variants/var_input.ts +0 -43
  200. package/dist/ui/variants/var_link-inline.ts +0 -29
  201. package/dist/ui/variants/var_list-row.ts +0 -34
  202. package/dist/ui/variants/var_rule.ts +0 -10
  203. package/dist/ui/variants/var_skeleton-block.ts +0 -12
  204. package/dist/ui/variants/var_spinner-turning.ts +0 -12
  205. package/dist/ui/variants/var_stat-tile.ts +0 -13
  206. package/dist/ui/variants/var_tab-bar.ts +0 -15
  207. package/dist/ui/variants/var_tap-target.ts +0 -25
  208. package/dist/ui/variants.ts +0 -64
  209. package/dist/ui/wrappers.tsx +0 -429
@@ -1,261 +0,0 @@
1
- import { existsSync, readFileSync, readdirSync } from '@prestack/thread/integrations/disk'
2
- import { valuesIn } from '@prestack/thread/core/rows'
3
- import { join, resolve } from 'node:path'
4
- import { argv, stdout } from 'node:process'
5
-
6
- import { exit, invoked } from '@prestack/thread/core/invoked'
7
- import { named as packageOf } from '@prestack/thread/core/scope'
8
- import { findTree, inTree } from '@prestack/thread/core/tree'
9
-
10
- interface Row {
11
- readonly id: string
12
- readonly at?: string
13
- readonly is?: string
14
- readonly token?: string
15
- readonly sets?: Readonly<Record<string, string>>
16
- readonly places?: Readonly<Record<string, Readonly<Record<string, string>>>>
17
- readonly wears?: readonly string[]
18
- readonly plays?: { readonly in?: string; readonly out?: string }
19
- }
20
-
21
- interface Node {
22
- readonly declares?: readonly Row[]
23
- readonly holds?: readonly Row[]
24
- }
25
-
26
- function inside(node: Node): readonly Row[] {
27
- return [...(node.holds ?? []), ...(node.declares ?? [])]
28
- }
29
-
30
- const compare = (a: string, b: string): number => (a < b ? -1 : a > b ? 1 : 0)
31
-
32
- const exported = (id: string): string => id.replace(/-/g, '_').toUpperCase()
33
-
34
- function pascal(id: string): string {
35
- return id
36
- .split('-')
37
- .map((part) => `${part.charAt(0).toUpperCase()}${part.slice(1)}`)
38
- .join('')
39
- }
40
-
41
- async function node(file: string, name: string): Promise<Node> {
42
- const path = inTree(findTree(), file)
43
- if (!existsSync(path)) return {}
44
- const held = valuesIn(readFileSync(path)) as Record<string, unknown>
45
- const one = held[name]
46
- if (one === undefined) return {}
47
- return one as Node
48
- }
49
-
50
- const LOADABLE = /\.(js|mjs|cjs|ts|mts)$/
51
-
52
- async function fileFor(root: string, at: string, id: string): Promise<Record<string, unknown> | undefined> {
53
- const path = resolve(root, at)
54
- if (!existsSync(path) || !LOADABLE.test(path)) return undefined
55
- try {
56
- const held = valuesIn(readFileSync(path)) as Record<string, unknown>
57
- return held[exported(id)] as Record<string, unknown> | undefined
58
- } catch (wrong) {
59
-
60
- throw new Error(
61
- `${at} is there but will not load, so what it names cannot be read. A guard that cannot read is ` +
62
- `not a guard that passed.\n ${String(wrong instanceof Error ? wrong.message : wrong)}`,
63
- )
64
- }
65
- }
66
-
67
- const NAMED = /var\(\s*--([a-z0-9-]+)\s*\)/g
68
-
69
- const PACKAGES = 'node_modules'
70
-
71
- const INSTALLED = `${PACKAGES}/${packageOf('ui')}/dist/elements`
72
-
73
- function referenced(value: unknown, named: ReadonlySet<string>, into: Set<string>): void {
74
- if (typeof value === 'string') {
75
- for (const one of value.matchAll(NAMED)) into.add(one[1] ?? '')
76
- if (named.has(value)) into.add(value)
77
- return
78
- }
79
- if (Array.isArray(value)) {
80
- for (const one of value) referenced(one, named, into)
81
- return
82
- }
83
- if (typeof value === 'object' && value !== null) {
84
- for (const one of Object.values(value)) referenced(one, named, into)
85
- }
86
- }
87
-
88
- function raising(files: readonly string[]): {
89
- readonly still: ReadonlyMap<string, readonly string[]>
90
- readonly moving: readonly string[]
91
- } {
92
- const still = new Map<string, string[]>()
93
- const moving: string[] = []
94
- for (const path of files) {
95
- const one = path.slice(path.lastIndexOf('/') + 1)
96
- let text = ''
97
- try {
98
- text = readFileSync(path, 'utf8')
99
- } catch {
100
- continue
101
- }
102
-
103
- const code = text.replace(/\/\*[\s\S]*?\*\//g, '').replace(/^\s*\/\/.*$/gm, '')
104
- const at = code.indexOf('holds:')
105
- if (at === -1) continue
106
- const opens = code.indexOf('[', at)
107
- if (opens === -1 || opens > at + 40) continue
108
- let depth = 0
109
- let shut = opens
110
- for (; shut < code.length; shut += 1) {
111
- const ch = code[shut]
112
- if (ch === '[') depth += 1
113
- else if (ch === ']') {
114
- depth -= 1
115
- if (depth === 0) break
116
- }
117
- }
118
- const held = code.slice(opens, shut + 1)
119
- const found = [...held.matchAll(/'([a-zA-Z]+)'/g)].map((each) => each[1] ?? '')
120
- const element = pascal(one.replace(/\.tsx$/, ''))
121
- if (/\.filter\(|\.map\(/.test(held)) moving.push(element)
122
- if (found.length > 0) still.set(element, [...new Set(found)].sort(compare))
123
- }
124
- return { still, moving }
125
- }
126
-
127
- function listed(what: string, held: readonly string[], good: string): readonly string[] {
128
- if (held.length === 0) return [` ${what}: ${good}`]
129
- return [` ${what}: ${String(held.length)}`, ...held.map((one) => ` ${one}`)]
130
- }
131
-
132
- export async function namedBy(id: string): Promise<readonly string[]> {
133
- const root = findTree().at
134
- const found: string[] = []
135
-
136
- const looks = async (file: string, name: string, what: string): Promise<void> => {
137
- for (const one of inside(await node(file, name))) {
138
-
139
- if (one.id === id) continue
140
- if (one.at === undefined) {
141
- const held = new Set<string>()
142
- referenced(one, new Set([id]), held)
143
- if (held.has(id)) found.push(`the ${what} \`${one.id}\``)
144
- continue
145
- }
146
- const shape = await fileFor(root, one.at, one.id)
147
- const held = new Set<string>()
148
- referenced(shape, new Set([id]), held)
149
- if (held.has(id)) found.push(`the ${what} \`${one.id}\``)
150
- }
151
- }
152
-
153
- await looks(`styleguides.${'ts'}`, 'STYLEGUIDE', 'value')
154
- await looks(`variants.${'ts'}`, 'VARIANT', 'variant')
155
- await looks(`materials.${'ts'}`, 'MATERIAL', 'material')
156
- await looks(`animations.${'ts'}`, 'ANIMATION', 'animation')
157
- await looks(`compositions.${'ts'}`, 'COMPOSITION', 'composition')
158
- await looks(`screens.${'ts'}`, 'SCREEN', 'screen')
159
- await looks(`fonts.${'ts'}`, 'FONT', 'font role')
160
-
161
- return [...new Set(found)].sort(compare)
162
- }
163
-
164
- async function run(): Promise<number> {
165
- const tree = findTree()
166
- const root = tree.at
167
-
168
- const guide = inside(await node('styleguides.ts', 'STYLEGUIDE'))
169
- const variants = inside(await node('variants.ts', 'VARIANT'))
170
- const elements = inside(await node('elements.ts', 'ELEMENT'))
171
- const signals = inside(await node('signals.ts', 'SIGNAL'))
172
- const materials = inside(await node('materials.ts', 'MATERIAL'))
173
- const animations = inside(await node('animations.ts', 'ANIMATION'))
174
- const compositions = inside(await node('compositions.ts', 'COMPOSITION'))
175
- const screens = inside(await node('screens.ts', 'SCREEN'))
176
- const fonts = inside(await node('fonts.ts', 'FONT'))
177
-
178
- const named = new Set(guide.map((row) => row.id))
179
- const used = new Set<string>()
180
-
181
- for (const row of [...variants, ...materials, ...animations]) {
182
- if (row.at === undefined) continue
183
- referenced(await fileFor(root, row.at, row.id), named, used)
184
- }
185
- for (const row of [...compositions, ...screens, ...fonts]) referenced(row, named, used)
186
-
187
- const unused = [...named].filter((one) => !used.has(one)).sort(compare)
188
-
189
- const worn = new Set(variants.flatMap((row) => row.wears ?? []))
190
- const known = new Set(elements.map((row) => pascal(row.id)))
191
- const bare = [...known].filter((one) => !worn.has(one)).sort(compare)
192
- const unworn = variants.filter((row) => (row.wears ?? []).every((one) => !known.has(one))).map((row) => row.id).sort(compare)
193
-
194
- const shipped = ((): readonly string[] => {
195
- const dir = join(root, INSTALLED)
196
- try {
197
- return readdirSync(dir)
198
- .filter((one) => one.endsWith('.tsx'))
199
- .map((one) => join(dir, one))
200
- } catch {
201
- return []
202
- }
203
- })()
204
- const ours = elements
205
- .map((row) => row.at ?? '')
206
- .filter((one) => one !== '' && !one.startsWith(PACKAGES))
207
- .map((one) => resolve(root, one))
208
- .filter((one) => existsSync(one))
209
- const { still, moving } = raising([...shipped, ...ours])
210
- const raised = new Set([...still.values()].flat())
211
- const reacted = new Set<string>()
212
- for (const row of variants) {
213
- if (row.at === undefined) continue
214
- const held = (await fileFor(root, row.at, row.id)) as { readonly reacts?: readonly string[] } | undefined
215
- for (const one of held?.reacts ?? []) reacted.add(one)
216
- }
217
- const declaredSignals = signals.map((row) => row.id)
218
- const unraisable = declaredSignals
219
- .filter((one) => !raised.has(one) && !/^(hover|active|focus|disabled|invalid)$/.test(one))
220
- .sort(compare)
221
- const answered = declaredSignals.filter((one) => reacted.has(one)).length
222
-
223
- stdout.write(`show: ${tree.name}\n\n`)
224
- stdout.write(
225
- [
226
- `declared: ${String(guide.length)} values · ${String(variants.length)} variants · ${String(elements.length)} elements · ` +
227
- `${String(signals.length)} signals · ${String(materials.length)} materials · ${String(animations.length)} animations`,
228
- '',
229
- ...listed('style guide rows nothing names', unused, 'none — every value is reached'),
230
- '',
231
- ...listed('variants no declared element accepts', unworn, 'none — every variant is worn'),
232
- '',
233
- ...listed('elements wearing no variant', bare, 'none — every element is dressed'),
234
- '',
235
- ...listed(
236
- 'signals no element is seen to raise',
237
- unraisable,
238
- 'none — every declared signal is raised somewhere',
239
- ),
240
- moving.length === 0
241
- ? ''
242
- : ` (${moving.join(', ')} ${moving.length === 1 ? 'works its' : 'work theirs'} out at run time, from the gesture it is bound to, so it cannot be read from source)`,
243
- '',
244
- ` signals answered by some variant: ${String(answered)} of ${String(signals.length)}`,
245
- ].join('\n'),
246
- )
247
- stdout.write('\n')
248
-
249
- if (argv.includes('--check')) {
250
- const wrong = unused.length + unworn.length + unraisable.length
251
- if (wrong > 0) {
252
- stdout.write(
253
- `\nshow: ${String(wrong)} declared thing(s) nothing reaches. This is a report, not a refusal — ` +
254
- 'reaching them, or retiring them, is a decision.\n',
255
- )
256
- }
257
- }
258
- return 0
259
- }
260
-
261
- if (invoked(import.meta.url)) exit(await run())