@zonsh/ui 0.0.0 → 0.4.1

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 (425) hide show
  1. package/LICENSE +43 -0
  2. package/README.md +81 -1
  3. package/assets/illustrations/drawing/bracket-construction-dark.svg +77 -0
  4. package/assets/illustrations/drawing/bracket-construction-filled-dark.svg +50 -0
  5. package/assets/illustrations/drawing/bracket-construction-filled.svg +50 -0
  6. package/assets/illustrations/drawing/bracket-construction.svg +77 -0
  7. package/assets/illustrations/drawing/crescent-dark.svg +28 -0
  8. package/assets/illustrations/drawing/crescent-guides-dark.svg +33 -0
  9. package/assets/illustrations/drawing/crescent-guides.svg +33 -0
  10. package/assets/illustrations/drawing/crescent.svg +28 -0
  11. package/assets/illustrations/drawing/eclipse-dark.svg +187 -0
  12. package/assets/illustrations/drawing/eclipse-guides-dark.svg +191 -0
  13. package/assets/illustrations/drawing/eclipse-guides.svg +191 -0
  14. package/assets/illustrations/drawing/eclipse.svg +187 -0
  15. package/assets/illustrations/drawing/elevation-guides-dark.svg +31 -0
  16. package/assets/illustrations/drawing/elevation-guides-plain-dark.svg +9 -0
  17. package/assets/illustrations/drawing/elevation-guides-plain.svg +9 -0
  18. package/assets/illustrations/drawing/elevation-guides.svg +31 -0
  19. package/assets/illustrations/drawing/horizon-dark.svg +30 -0
  20. package/assets/illustrations/drawing/horizon.svg +30 -0
  21. package/assets/illustrations/drawing/nib-study-dark.svg +107 -0
  22. package/assets/illustrations/drawing/nib-study-plain-dark.svg +93 -0
  23. package/assets/illustrations/drawing/nib-study-plain.svg +93 -0
  24. package/assets/illustrations/drawing/nib-study.svg +107 -0
  25. package/assets/illustrations/editorial/assistant-640.webp +0 -0
  26. package/assets/illustrations/editorial/assistant.webp +0 -0
  27. package/assets/illustrations/editorial/automation-640.webp +0 -0
  28. package/assets/illustrations/editorial/automation.webp +0 -0
  29. package/assets/illustrations/editorial/bracket-left-640.webp +0 -0
  30. package/assets/illustrations/editorial/bracket-left.webp +0 -0
  31. package/assets/illustrations/editorial/bracket-right-640.webp +0 -0
  32. package/assets/illustrations/editorial/bracket-right.webp +0 -0
  33. package/assets/illustrations/editorial/custom-software-640.webp +0 -0
  34. package/assets/illustrations/editorial/custom-software.webp +0 -0
  35. package/assets/illustrations/editorial/digitalization-640.webp +0 -0
  36. package/assets/illustrations/editorial/digitalization.webp +0 -0
  37. package/assets/illustrations/editorial/integration-640.webp +0 -0
  38. package/assets/illustrations/editorial/integration.webp +0 -0
  39. package/assets/illustrations/editorial/problem-640.webp +0 -0
  40. package/assets/illustrations/editorial/problem.webp +0 -0
  41. package/assets/illustrations/editorial/process-analysis-640.webp +0 -0
  42. package/assets/illustrations/editorial/process-analysis.webp +0 -0
  43. package/assets/illustrations/editorial/process-concept-640.webp +0 -0
  44. package/assets/illustrations/editorial/process-concept.webp +0 -0
  45. package/assets/illustrations/editorial/process-development-640.webp +0 -0
  46. package/assets/illustrations/editorial/process-development.webp +0 -0
  47. package/assets/illustrations/editorial/process-discovery-640.webp +0 -0
  48. package/assets/illustrations/editorial/process-discovery.webp +0 -0
  49. package/assets/illustrations/editorial/process-maintenance-640.webp +0 -0
  50. package/assets/illustrations/editorial/process-maintenance.webp +0 -0
  51. package/assets/illustrations/editorial/process-prototype-640.webp +0 -0
  52. package/assets/illustrations/editorial/process-prototype.webp +0 -0
  53. package/assets/illustrations/editorial/process-testing-640.webp +0 -0
  54. package/assets/illustrations/editorial/process-testing.webp +0 -0
  55. package/assets/illustrations/iso/automation-dark.svg +6 -0
  56. package/assets/illustrations/iso/automation.svg +6 -0
  57. package/assets/illustrations/iso/bar-chart-dark.svg +6 -0
  58. package/assets/illustrations/iso/bar-chart.svg +6 -0
  59. package/assets/illustrations/iso/brackets-classic-dark.svg +6 -0
  60. package/assets/illustrations/iso/brackets-classic.svg +6 -0
  61. package/assets/illustrations/iso/brackets-dark.svg +6 -0
  62. package/assets/illustrations/iso/brackets.svg +6 -0
  63. package/assets/illustrations/iso/city-dark.svg +6 -0
  64. package/assets/illustrations/iso/city.svg +6 -0
  65. package/assets/illustrations/iso/conveyor-dark.svg +6 -0
  66. package/assets/illustrations/iso/conveyor.svg +6 -0
  67. package/assets/illustrations/iso/database-dark.svg +6 -0
  68. package/assets/illustrations/iso/database.svg +6 -0
  69. package/assets/illustrations/iso/documents-dark.svg +6 -0
  70. package/assets/illustrations/iso/documents.svg +6 -0
  71. package/assets/illustrations/iso/inbox-dark.svg +6 -0
  72. package/assets/illustrations/iso/inbox.svg +6 -0
  73. package/assets/illustrations/iso/laptop-dark.svg +6 -0
  74. package/assets/illustrations/iso/laptop.svg +6 -0
  75. package/assets/illustrations/iso/monitor-dark.svg +6 -0
  76. package/assets/illustrations/iso/monitor.svg +6 -0
  77. package/assets/illustrations/iso/pipeline-dark.svg +6 -0
  78. package/assets/illustrations/iso/pipeline.svg +6 -0
  79. package/assets/illustrations/iso/platform-dark.svg +6 -0
  80. package/assets/illustrations/iso/platform.svg +6 -0
  81. package/assets/illustrations/iso/server-dark.svg +6 -0
  82. package/assets/illustrations/iso/server.svg +6 -0
  83. package/assets/illustrations/iso/spreadsheet-dark.svg +6 -0
  84. package/assets/illustrations/iso/spreadsheet.svg +6 -0
  85. package/assets/illustrations/iso/timeline-dark.svg +6 -0
  86. package/assets/illustrations/iso/timeline.svg +6 -0
  87. package/assets/illustrations/sheet/construction.svg +115 -0
  88. package/assets/illustrations/sheet/crescent.svg +40 -0
  89. package/assets/illustrations/sheet/limb.svg +42 -0
  90. package/assets/illustrations/sheet/stress-axis.svg +119 -0
  91. package/assets/illustrations/sheet/totality.svg +215 -0
  92. package/assets/illustrations/sheet/vertical-metrics.svg +43 -0
  93. package/assets/logo-left.svg +1 -0
  94. package/assets/logo-right.svg +1 -0
  95. package/assets/logo.svg +1 -0
  96. package/dist/components/_overlay.d.ts +47 -0
  97. package/dist/components/_overlay.js +59 -0
  98. package/dist/components/accordion.d.ts +32 -0
  99. package/dist/components/accordion.js +39 -0
  100. package/dist/components/alert-dialog.d.ts +45 -0
  101. package/dist/components/alert-dialog.js +56 -0
  102. package/dist/components/alert.d.ts +35 -0
  103. package/dist/components/alert.js +42 -0
  104. package/dist/components/ascii-field.d.ts +34 -0
  105. package/dist/components/ascii-field.js +410 -0
  106. package/dist/components/aspect-ratio.d.ts +14 -0
  107. package/dist/components/aspect-ratio.js +17 -0
  108. package/dist/components/avatar.d.ts +42 -0
  109. package/dist/components/avatar.js +55 -0
  110. package/dist/components/badge.d.ts +70 -0
  111. package/dist/components/badge.js +62 -0
  112. package/dist/components/bottom-nav.d.ts +86 -0
  113. package/dist/components/bottom-nav.js +175 -0
  114. package/dist/components/breadcrumb.d.ts +31 -0
  115. package/dist/components/breadcrumb.js +37 -0
  116. package/dist/components/button-group.d.ts +30 -0
  117. package/dist/components/button-group.js +47 -0
  118. package/dist/components/button.d.ts +53 -0
  119. package/dist/components/button.js +130 -0
  120. package/dist/components/calendar.d.ts +26 -0
  121. package/dist/components/calendar.js +179 -0
  122. package/dist/components/card.d.ts +42 -0
  123. package/dist/components/card.js +76 -0
  124. package/dist/components/carousel.d.ts +109 -0
  125. package/dist/components/carousel.js +231 -0
  126. package/dist/components/chart.d.ts +189 -0
  127. package/dist/components/chart.js +323 -0
  128. package/dist/components/checkbox.d.ts +23 -0
  129. package/dist/components/checkbox.js +43 -0
  130. package/dist/components/code-block.d.ts +55 -0
  131. package/dist/components/code-block.js +100 -0
  132. package/dist/components/collapsible.d.ts +20 -0
  133. package/dist/components/collapsible.js +32 -0
  134. package/dist/components/color-picker.d.ts +107 -0
  135. package/dist/components/color-picker.js +428 -0
  136. package/dist/components/combobox.d.ts +99 -0
  137. package/dist/components/combobox.js +172 -0
  138. package/dist/components/command.d.ts +132 -0
  139. package/dist/components/command.js +257 -0
  140. package/dist/components/context-menu.d.ts +29 -0
  141. package/dist/components/context-menu.js +35 -0
  142. package/dist/components/conversation.d.ts +36 -0
  143. package/dist/components/conversation.js +303 -0
  144. package/dist/components/copy-button.d.ts +55 -0
  145. package/dist/components/copy-button.js +133 -0
  146. package/dist/components/data-table.d.ts +235 -0
  147. package/dist/components/data-table.js +655 -0
  148. package/dist/components/date-picker.d.ts +160 -0
  149. package/dist/components/date-picker.js +338 -0
  150. package/dist/components/dialog.d.ts +57 -0
  151. package/dist/components/dialog.js +95 -0
  152. package/dist/components/direction.d.ts +16 -0
  153. package/dist/components/direction.js +18 -0
  154. package/dist/components/drawer.d.ts +69 -0
  155. package/dist/components/drawer.js +79 -0
  156. package/dist/components/empty.d.ts +31 -0
  157. package/dist/components/empty.js +50 -0
  158. package/dist/components/feature-list.d.ts +54 -0
  159. package/dist/components/feature-list.js +43 -0
  160. package/dist/components/field.d.ts +34 -0
  161. package/dist/components/field.js +81 -0
  162. package/dist/components/file-drop.d.ts +77 -0
  163. package/dist/components/file-drop.js +258 -0
  164. package/dist/components/filter-bar.d.ts +153 -0
  165. package/dist/components/filter-bar.js +334 -0
  166. package/dist/components/form.d.ts +35 -0
  167. package/dist/components/form.js +56 -0
  168. package/dist/components/graph.d.ts +146 -0
  169. package/dist/components/graph.js +825 -0
  170. package/dist/components/illustration.d.ts +85 -0
  171. package/dist/components/illustration.js +165 -0
  172. package/dist/components/input-group.d.ts +138 -0
  173. package/dist/components/input-group.js +312 -0
  174. package/dist/components/input.d.ts +16 -0
  175. package/dist/components/input.js +25 -0
  176. package/dist/components/item.d.ts +64 -0
  177. package/dist/components/item.js +116 -0
  178. package/dist/components/kbd.d.ts +50 -0
  179. package/dist/components/kbd.js +45 -0
  180. package/dist/components/label.d.ts +12 -0
  181. package/dist/components/label.js +24 -0
  182. package/dist/components/layout.d.ts +136 -0
  183. package/dist/components/layout.js +162 -0
  184. package/dist/components/lightbox.d.ts +100 -0
  185. package/dist/components/lightbox.js +439 -0
  186. package/dist/components/locale.d.ts +44 -0
  187. package/dist/components/locale.js +37 -0
  188. package/dist/components/logo.d.ts +54 -0
  189. package/dist/components/logo.js +96 -0
  190. package/dist/components/menu.d.ts +60 -0
  191. package/dist/components/menu.js +140 -0
  192. package/dist/components/menubar.d.ts +62 -0
  193. package/dist/components/menubar.js +223 -0
  194. package/dist/components/message.d.ts +42 -0
  195. package/dist/components/message.js +59 -0
  196. package/dist/components/meter.d.ts +31 -0
  197. package/dist/components/meter.js +27 -0
  198. package/dist/components/money-input.d.ts +80 -0
  199. package/dist/components/money-input.js +253 -0
  200. package/dist/components/native-select.d.ts +26 -0
  201. package/dist/components/native-select.js +35 -0
  202. package/dist/components/navigation-menu.d.ts +42 -0
  203. package/dist/components/navigation-menu.js +97 -0
  204. package/dist/components/number-field.d.ts +55 -0
  205. package/dist/components/number-field.js +164 -0
  206. package/dist/components/otp-field.d.ts +48 -0
  207. package/dist/components/otp-field.js +102 -0
  208. package/dist/components/pagination.d.ts +37 -0
  209. package/dist/components/pagination.js +81 -0
  210. package/dist/components/pdf-viewer.d.ts +134 -0
  211. package/dist/components/pdf-viewer.js +996 -0
  212. package/dist/components/phone-input.d.ts +79 -0
  213. package/dist/components/phone-input.js +282 -0
  214. package/dist/components/popover.d.ts +33 -0
  215. package/dist/components/popover.js +48 -0
  216. package/dist/components/preview-card.d.ts +25 -0
  217. package/dist/components/preview-card.js +22 -0
  218. package/dist/components/progress.d.ts +27 -0
  219. package/dist/components/progress.js +25 -0
  220. package/dist/components/prompt-input.d.ts +156 -0
  221. package/dist/components/prompt-input.js +415 -0
  222. package/dist/components/quote.d.ts +22 -0
  223. package/dist/components/quote.js +15 -0
  224. package/dist/components/radio-group.d.ts +18 -0
  225. package/dist/components/radio-group.js +34 -0
  226. package/dist/components/rating.d.ts +73 -0
  227. package/dist/components/rating.js +124 -0
  228. package/dist/components/reasoning.d.ts +46 -0
  229. package/dist/components/reasoning.js +73 -0
  230. package/dist/components/resizable.d.ts +47 -0
  231. package/dist/components/resizable.js +44 -0
  232. package/dist/components/response.d.ts +41 -0
  233. package/dist/components/response.js +566 -0
  234. package/dist/components/scroll-area.d.ts +33 -0
  235. package/dist/components/scroll-area.js +31 -0
  236. package/dist/components/select.d.ts +35 -0
  237. package/dist/components/select.js +71 -0
  238. package/dist/components/separator.d.ts +14 -0
  239. package/dist/components/separator.js +17 -0
  240. package/dist/components/sidebar.d.ts +163 -0
  241. package/dist/components/sidebar.js +505 -0
  242. package/dist/components/site-header.d.ts +93 -0
  243. package/dist/components/site-header.js +121 -0
  244. package/dist/components/skeleton.d.ts +31 -0
  245. package/dist/components/skeleton.js +29 -0
  246. package/dist/components/slider.d.ts +24 -0
  247. package/dist/components/slider.js +131 -0
  248. package/dist/components/sortable.d.ts +178 -0
  249. package/dist/components/sortable.js +1258 -0
  250. package/dist/components/sources.d.ts +40 -0
  251. package/dist/components/sources.js +42 -0
  252. package/dist/components/spinner.d.ts +48 -0
  253. package/dist/components/spinner.js +75 -0
  254. package/dist/components/stat.d.ts +91 -0
  255. package/dist/components/stat.js +141 -0
  256. package/dist/components/stepper.d.ts +71 -0
  257. package/dist/components/stepper.js +101 -0
  258. package/dist/components/suggestions.d.ts +20 -0
  259. package/dist/components/suggestions.js +18 -0
  260. package/dist/components/switch.d.ts +14 -0
  261. package/dist/components/switch.js +26 -0
  262. package/dist/components/table.d.ts +172 -0
  263. package/dist/components/table.js +895 -0
  264. package/dist/components/tabs.d.ts +25 -0
  265. package/dist/components/tabs.js +162 -0
  266. package/dist/components/tag.d.ts +41 -0
  267. package/dist/components/tag.js +88 -0
  268. package/dist/components/tags-input.d.ts +56 -0
  269. package/dist/components/tags-input.js +271 -0
  270. package/dist/components/textarea.d.ts +13 -0
  271. package/dist/components/textarea.js +16 -0
  272. package/dist/components/theme.d.ts +55 -0
  273. package/dist/components/theme.js +120 -0
  274. package/dist/components/time-field.d.ts +70 -0
  275. package/dist/components/time-field.js +450 -0
  276. package/dist/components/timeline.d.ts +92 -0
  277. package/dist/components/timeline.js +108 -0
  278. package/dist/components/tippy.d.ts +48 -0
  279. package/dist/components/tippy.js +648 -0
  280. package/dist/components/toast.d.ts +88 -0
  281. package/dist/components/toast.js +205 -0
  282. package/dist/components/toggle-group.d.ts +41 -0
  283. package/dist/components/toggle-group.js +140 -0
  284. package/dist/components/toggle.d.ts +23 -0
  285. package/dist/components/toggle.js +35 -0
  286. package/dist/components/tool-call.d.ts +63 -0
  287. package/dist/components/tool-call.js +68 -0
  288. package/dist/components/toolbar.d.ts +17 -0
  289. package/dist/components/toolbar.js +39 -0
  290. package/dist/components/tooltip.d.ts +42 -0
  291. package/dist/components/tooltip.js +47 -0
  292. package/dist/components/tour.d.ts +127 -0
  293. package/dist/components/tour.js +648 -0
  294. package/dist/components/tree.d.ts +75 -0
  295. package/dist/components/tree.js +649 -0
  296. package/dist/components/typography.d.ts +134 -0
  297. package/dist/components/typography.js +176 -0
  298. package/dist/components/video-player.d.ts +284 -0
  299. package/dist/components/video-player.js +1392 -0
  300. package/dist/illustration.d.ts +2 -0
  301. package/dist/illustration.js +7 -0
  302. package/dist/index.d.ts +93 -0
  303. package/dist/index.js +94 -0
  304. package/dist/lib/cn.d.ts +20 -0
  305. package/dist/lib/cn.js +38 -0
  306. package/dist/lib/code-highlight.d.ts +18 -0
  307. package/dist/lib/code-highlight.js +174 -0
  308. package/dist/lib/code-theme.d.ts +19 -0
  309. package/dist/lib/code-theme.js +140 -0
  310. package/dist/lib/collapse-row.d.ts +9 -0
  311. package/dist/lib/collapse-row.js +129 -0
  312. package/dist/lib/digit-roll.d.ts +21 -0
  313. package/dist/lib/digit-roll.js +31 -0
  314. package/dist/lib/editorial-assets.d.ts +16 -0
  315. package/dist/lib/editorial-assets.js +56 -0
  316. package/dist/lib/field-errors.d.ts +28 -0
  317. package/dist/lib/field-errors.js +24 -0
  318. package/dist/lib/field-value.d.ts +13 -0
  319. package/dist/lib/field-value.js +44 -0
  320. package/dist/lib/figure/catalog.d.ts +127 -0
  321. package/dist/lib/figure/catalog.js +130 -0
  322. package/dist/lib/figure/figures/automation.d.ts +7 -0
  323. package/dist/lib/figure/figures/automation.js +143 -0
  324. package/dist/lib/figure/figures/bar-chart.d.ts +7 -0
  325. package/dist/lib/figure/figures/bar-chart.js +99 -0
  326. package/dist/lib/figure/figures/brackets-classic.d.ts +11 -0
  327. package/dist/lib/figure/figures/brackets-classic.js +170 -0
  328. package/dist/lib/figure/figures/brackets.d.ts +8 -0
  329. package/dist/lib/figure/figures/brackets.js +84 -0
  330. package/dist/lib/figure/figures/city.d.ts +7 -0
  331. package/dist/lib/figure/figures/city.js +93 -0
  332. package/dist/lib/figure/figures/conveyor.d.ts +7 -0
  333. package/dist/lib/figure/figures/conveyor.js +97 -0
  334. package/dist/lib/figure/figures/database.d.ts +7 -0
  335. package/dist/lib/figure/figures/database.js +65 -0
  336. package/dist/lib/figure/figures/documents.d.ts +7 -0
  337. package/dist/lib/figure/figures/documents.js +83 -0
  338. package/dist/lib/figure/figures/inbox.d.ts +7 -0
  339. package/dist/lib/figure/figures/inbox.js +92 -0
  340. package/dist/lib/figure/figures/laptop.d.ts +7 -0
  341. package/dist/lib/figure/figures/laptop.js +67 -0
  342. package/dist/lib/figure/figures/monitor.d.ts +7 -0
  343. package/dist/lib/figure/figures/monitor.js +59 -0
  344. package/dist/lib/figure/figures/pipeline.d.ts +8 -0
  345. package/dist/lib/figure/figures/pipeline.js +117 -0
  346. package/dist/lib/figure/figures/platform.d.ts +7 -0
  347. package/dist/lib/figure/figures/platform.js +117 -0
  348. package/dist/lib/figure/figures/server.d.ts +7 -0
  349. package/dist/lib/figure/figures/server.js +115 -0
  350. package/dist/lib/figure/figures/spreadsheet.d.ts +7 -0
  351. package/dist/lib/figure/figures/spreadsheet.js +87 -0
  352. package/dist/lib/figure/figures/timeline.d.ts +7 -0
  353. package/dist/lib/figure/figures/timeline.js +65 -0
  354. package/dist/lib/figure/kernel.d.ts +152 -0
  355. package/dist/lib/figure/kernel.js +576 -0
  356. package/dist/lib/figure/parts.d.ts +42 -0
  357. package/dist/lib/figure/parts.js +126 -0
  358. package/dist/lib/form-reset.d.ts +11 -0
  359. package/dist/lib/form-reset.js +22 -0
  360. package/dist/lib/glide.d.ts +53 -0
  361. package/dist/lib/glide.js +138 -0
  362. package/dist/lib/graph-layout.d.ts +58 -0
  363. package/dist/lib/graph-layout.js +209 -0
  364. package/dist/lib/illustration-drawings.d.ts +89 -0
  365. package/dist/lib/illustration-drawings.js +539 -0
  366. package/dist/lib/illustration-info.d.ts +37 -0
  367. package/dist/lib/illustration-info.js +22 -0
  368. package/dist/lib/illustration-library.d.ts +87 -0
  369. package/dist/lib/illustration-library.js +352 -0
  370. package/dist/lib/logo-geometry.d.ts +29 -0
  371. package/dist/lib/logo-geometry.js +67 -0
  372. package/dist/lib/markdown-guard.d.ts +16 -0
  373. package/dist/lib/markdown-guard.js +123 -0
  374. package/dist/lib/merge-refs.d.ts +10 -0
  375. package/dist/lib/merge-refs.js +26 -0
  376. package/dist/lib/money.d.ts +73 -0
  377. package/dist/lib/money.js +343 -0
  378. package/dist/lib/motion.d.ts +6 -0
  379. package/dist/lib/motion.js +12 -0
  380. package/dist/lib/pdf-worker.d.ts +1 -0
  381. package/dist/lib/pdf-worker.js +6 -0
  382. package/dist/lib/pdf.d.ts +19 -0
  383. package/dist/lib/pdf.js +58 -0
  384. package/dist/lib/phone-countries.d.ts +1 -0
  385. package/dist/lib/phone-countries.js +281 -0
  386. package/dist/lib/phone.d.ts +90 -0
  387. package/dist/lib/phone.js +286 -0
  388. package/dist/lib/platform.d.ts +38 -0
  389. package/dist/lib/platform.js +75 -0
  390. package/dist/lib/room.d.ts +25 -0
  391. package/dist/lib/room.js +46 -0
  392. package/dist/lib/row-index.d.ts +15 -0
  393. package/dist/lib/row-index.js +136 -0
  394. package/dist/lib/table-fit.d.ts +143 -0
  395. package/dist/lib/table-fit.js +596 -0
  396. package/dist/lib/theme-script.d.ts +31 -0
  397. package/dist/lib/theme-script.js +49 -0
  398. package/dist/lib/tippy/pixels.d.ts +47 -0
  399. package/dist/lib/tippy/pixels.js +187 -0
  400. package/dist/lib/tippy/sprite.d.ts +86 -0
  401. package/dist/lib/tippy/sprite.js +753 -0
  402. package/dist/messages/de.d.ts +12 -0
  403. package/dist/messages/de.js +326 -0
  404. package/dist/styles/expressive.css +203 -0
  405. package/dist/styles/fonts.css +145 -0
  406. package/dist/styles/index.css +207 -0
  407. package/dist/styles/material.css +317 -0
  408. package/dist/styles/parts/ai.css +361 -0
  409. package/dist/styles/parts/brand.css +75 -0
  410. package/dist/styles/parts/controls.css +774 -0
  411. package/dist/styles/parts/data.css +222 -0
  412. package/dist/styles/parts/editorial.css +120 -0
  413. package/dist/styles/parts/feedback.css +340 -0
  414. package/dist/styles/parts/foundations.css +166 -0
  415. package/dist/styles/parts/graph.css +214 -0
  416. package/dist/styles/parts/inputs.css +261 -0
  417. package/dist/styles/parts/isometric.css +124 -0
  418. package/dist/styles/parts/navigation.css +424 -0
  419. package/dist/styles/parts/overlays.css +250 -0
  420. package/dist/styles/parts/pdf.css +154 -0
  421. package/dist/styles/parts/react-flow.css +519 -0
  422. package/dist/styles/tokens.css +299 -0
  423. package/dist/vite.d.ts +66 -0
  424. package/dist/vite.js +29 -0
  425. package/package.json +183 -5
@@ -0,0 +1,89 @@
1
+ export type SvgAttrs = Record<string, string | number | undefined | null | false>;
2
+ export type SvgChild = SvgNode | string | null | undefined | false | SvgChild[];
3
+ export interface SvgNode {
4
+ tag: string;
5
+ /** SVG attribute names as written in markup (`stroke-width`, `viewBox`). */
6
+ attrs: SvgAttrs;
7
+ children: (SvgNode | string)[];
8
+ }
9
+ export declare function h(tag: string, attrs?: SvgAttrs, ...children: SvgChild[]): SvgNode;
10
+ /** Serialise a tree to markup. */
11
+ export declare function toSvgString(node: SvgChild, depth?: number): string;
12
+ /** What a drawing paints with besides `currentColor`. */
13
+ export interface Ink {
14
+ /** Knockout fill: the colour of the ground the drawing sits on. */
15
+ ground: string;
16
+ /** Faint construction lines. */
17
+ guide: string;
18
+ mono: string;
19
+ heading: string;
20
+ }
21
+ /** Inline: follows the theme, a `.theme-night` region or a paper sheet. */
22
+ export declare const INLINE_INK: Ink;
23
+ /** Fixed inks for static files. `color` is set on the root so `currentColor` resolves. */
24
+ export declare const STATIC_INK: Record<"light" | "dark", Ink & {
25
+ color: string;
26
+ }>;
27
+ export interface DrawCtx {
28
+ /** Prefix for ids in <defs>; unique per rendered instance. */
29
+ uid: string;
30
+ ink: Ink;
31
+ variant: string;
32
+ }
33
+ export interface Drawing {
34
+ viewBox: string;
35
+ preserveAspectRatio?: string;
36
+ body: SvgChild[];
37
+ }
38
+ /** Deterministic PRNG (mulberry32): identical sequences on server and client. */
39
+ export declare function random(seed: number): () => number;
40
+ /** "The o, at totality": a disc in the ground colour, a corona of hairlines and a glow. Variant `guides`. */
41
+ export declare function eclipse({ uid, ink, variant }: DrawCtx): Drawing;
42
+ /** A thin lit crescent at 14° with a whisper of earthshine. Variant `guides`. */
43
+ export declare function crescent({ uid, ink, variant }: DrawCtx): Drawing;
44
+ /** A planet limb with a glowing rim. Static by design; it fills its box (`slice`). */
45
+ export declare function horizon({ uid, ink }: DrawCtx): Drawing;
46
+ /** A radial protractor with the 14° stress axis and an oval nib. Variant `plain` drops the degree labels. */
47
+ export declare function nibStudy({ ink, variant }: DrawCtx): Drawing;
48
+ /** Licht's vertical metrics, in font units. */
49
+ export declare const LICHT_METRICS: {
50
+ unitsPerEm: number;
51
+ ascender: number;
52
+ capHeight: number;
53
+ xHeight: number;
54
+ descender: number;
55
+ };
56
+ /**
57
+ * Guide lines at Licht's vertical metrics around a "Hxgo" specimen. The specimen's baseline is
58
+ * placed on the 0 guide exactly (SVG text sits on its baseline). Variant `plain` drops the labels.
59
+ */
60
+ export declare function elevationGuides({ ink, variant }: DrawCtx): Drawing;
61
+ /**
62
+ * The bracket mark as a construction drawing: the exact rectangles from the logo files in
63
+ * dashes, a node at every corner, dimension lines in mono. Variant `filled`: the solid mark
64
+ * under its construction lines, without dimensions.
65
+ */
66
+ export declare function bracketConstruction({ ink, variant }: DrawCtx): Drawing;
67
+ /** A drawing as a standalone SVG file in a fixed ink. */
68
+ export declare function drawingToSvg(draw: (ctx: DrawCtx) => Drawing, variant: string, theme: "light" | "dark", uid: string, title?: string): string;
69
+ export type SheetTone = "night" | "paper";
70
+ export interface SheetTitleEntry {
71
+ label: string;
72
+ value: string;
73
+ }
74
+ /** A sheet from the light table: one drawing, framed, with captions. */
75
+ export interface SheetSpec {
76
+ tone: SheetTone;
77
+ /** Mono index tag, top left. */
78
+ index: string;
79
+ /** Mono eyebrow, top right. */
80
+ eyebrow?: string;
81
+ marks?: boolean;
82
+ titleBlock?: SheetTitleEntry[];
83
+ /** Width / height. Default 4/3. */
84
+ aspect?: number;
85
+ /** The drawing runs to the edges (no padding), e.g. a horizon. */
86
+ bleed?: boolean;
87
+ }
88
+ /** A spec sheet as a standalone SVG file: ground, captions, crosshairs, title block and drawing. */
89
+ export declare function sheetToSvg(sheet: SheetSpec, draw: (ctx: DrawCtx) => Drawing, variant: string, uid: string, title?: string): string;
@@ -0,0 +1,539 @@
1
+ /*
2
+ * The drawings and spec sheets of the zon illustration library, as plain SVG trees.
3
+ *
4
+ * Every drawing is a function that returns an `SvgNode` tree, so one definition renders both as
5
+ * React elements (the `Illustration` component) and as a standalone SVG string (the static
6
+ * export in scripts/build-illustrations.mjs). Drawings ink with `currentColor` and take their
7
+ * ground (knockouts), guide colour and fonts from an `Ink`: CSS variables inline, fixed colours
8
+ * in files. Geometry is integer maths and a seeded PRNG, so server and client render the same.
9
+ *
10
+ * Pure TypeScript with no JSX or DOM: the export script imports it under Node.
11
+ */
12
+ /** Flatten nested children and drop empty ones. */
13
+ function flatten(children) {
14
+ const out = [];
15
+ for (const c of children) {
16
+ if (Array.isArray(c))
17
+ out.push(...flatten(c));
18
+ else if (c)
19
+ out.push(c);
20
+ }
21
+ return out;
22
+ }
23
+ export function h(tag, attrs = {}, ...children) {
24
+ return { tag, attrs, children: flatten(children) };
25
+ }
26
+ const fmt = (n) => String(Math.round(n * 1000) / 1000);
27
+ const escText = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
28
+ const escAttr = (s) => escText(s).replace(/"/g, "&quot;");
29
+ /** Serialise a tree to markup. */
30
+ export function toSvgString(node, depth = 0) {
31
+ if (!node)
32
+ return "";
33
+ if (typeof node === "string")
34
+ return escText(node);
35
+ if (Array.isArray(node))
36
+ return node.map((c) => toSvgString(c, depth)).join("");
37
+ const attrs = Object.entries(node.attrs)
38
+ .filter(([, v]) => v !== undefined && v !== null && v !== false)
39
+ .map(([k, v]) => ` ${k}="${escAttr(typeof v === "number" ? fmt(v) : String(v))}"`)
40
+ .join("");
41
+ const kids = node.children;
42
+ if (!kids.length)
43
+ return `<${node.tag}${attrs}/>`;
44
+ const inline = kids.every((c) => typeof c === "string");
45
+ const pad = "\n" + " ".repeat(depth + 1);
46
+ const inner = inline
47
+ ? kids.map((c) => toSvgString(c)).join("")
48
+ : kids.map((c) => pad + toSvgString(c, depth + 1)).join("") + "\n" + " ".repeat(depth);
49
+ return `<${node.tag}${attrs}>${inner}</${node.tag}>`;
50
+ }
51
+ /** Inline: follows the theme, a `.theme-night` region or a paper sheet. */
52
+ export const INLINE_INK = {
53
+ ground: "var(--background)",
54
+ guide: "var(--guide)",
55
+ mono: "var(--font-mono)",
56
+ heading: "var(--font-heading)",
57
+ };
58
+ const MONO_STACK = "'Licht Mono', ui-monospace, 'SF Mono', Menlo, monospace";
59
+ const HEADING_STACK = "Licht, 'Iowan Old Style', Georgia, serif";
60
+ /** Fixed inks for static files. `color` is set on the root so `currentColor` resolves. */
61
+ export const STATIC_INK = {
62
+ light: {
63
+ color: "#0a0a0a",
64
+ ground: "#fcfcfc",
65
+ guide: "#0a0a0a29",
66
+ mono: MONO_STACK,
67
+ heading: HEADING_STACK,
68
+ },
69
+ dark: { color: "#fafafa", ground: "#050505", guide: "#ffffff29", mono: MONO_STACK, heading: HEADING_STACK },
70
+ };
71
+ /* ── Helpers ────────────────────────────────────────────────────────────────── */
72
+ /** Deterministic PRNG (mulberry32): identical sequences on server and client. */
73
+ export function random(seed) {
74
+ let a = seed >>> 0;
75
+ return () => {
76
+ a = (a + 0x6d2b79f5) >>> 0;
77
+ let t = a;
78
+ t = Math.imul(t ^ (t >>> 15), t | 1);
79
+ t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
80
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
81
+ };
82
+ }
83
+ const r2 = (n) => Math.round(n * 100) / 100;
84
+ const rad = (deg) => (deg * Math.PI) / 180;
85
+ /** Point on a circle, maths convention: 0° to the right, counter-clockwise (SVG y is down). */
86
+ const polar = (cx, cy, r, deg) => [r2(cx + Math.cos(rad(deg)) * r), r2(cy - Math.sin(rad(deg)) * r)];
87
+ /* ── Eclipse ────────────────────────────────────────────────────────────────── */
88
+ /** "The o, at totality": a disc in the ground colour, a corona of hairlines and a glow. Variant `guides`. */
89
+ export function eclipse({ uid, ink, variant }) {
90
+ const guides = variant === "guides";
91
+ const next = random(guides ? 21 : 7);
92
+ const rays = 168;
93
+ const c = 200;
94
+ const R = 80;
95
+ const lines = Array.from({ length: rays }, (_, i) => {
96
+ const deg = (i / rays) * 360 + (next() - 0.5) * (360 / rays);
97
+ const streamer = next() > 0.9;
98
+ const len = streamer ? 70 + next() * 60 : 10 + next() ** 2 * 62;
99
+ const [x1, y1] = polar(c, c, R + 2, deg);
100
+ const [x2, y2] = polar(c, c, R + 2 + len, deg);
101
+ return h("line", { x1, y1, x2, y2, "stroke-opacity": r2(0.22 + next() * 0.6) });
102
+ });
103
+ return {
104
+ viewBox: "0 0 400 400",
105
+ body: [
106
+ h("defs", {}, h("radialGradient", { id: `${uid}-glow`, cx: c, cy: c, r: 200, gradientUnits: "userSpaceOnUse" }, h("stop", { offset: 0.38, "stop-color": "currentColor", "stop-opacity": 0.55 }), h("stop", { offset: 0.46, "stop-color": "currentColor", "stop-opacity": 0.2 }), h("stop", { offset: 0.66, "stop-color": "currentColor", "stop-opacity": 0.06 }), h("stop", { offset: 1, "stop-color": "currentColor", "stop-opacity": 0 })), h("filter", { id: `${uid}-blur`, x: "-50%", y: "-50%", width: "200%", height: "200%" }, h("feGaussianBlur", { stdDeviation: 3.5 }))),
107
+ guides &&
108
+ h("g", { "stroke-width": 0.75, stroke: ink.guide }, h("path", { d: `M${c} 8V392M8 ${c}H392`, "stroke-dasharray": "2 4" }), h("circle", { cx: c, cy: c, r: 150, "stroke-dasharray": "2 4" })),
109
+ h("circle", { cx: c, cy: c, r: 200, fill: `url(#${uid}-glow)` }),
110
+ h("g", { stroke: "currentColor", "stroke-width": 0.6, "stroke-linecap": "round" }, lines),
111
+ h("circle", {
112
+ cx: c,
113
+ cy: c,
114
+ r: R + 1,
115
+ stroke: "currentColor",
116
+ "stroke-width": 5,
117
+ filter: `url(#${uid}-blur)`,
118
+ }),
119
+ h("circle", { cx: c, cy: c, r: R, fill: ink.ground, stroke: "currentColor", "stroke-width": 1 }),
120
+ ],
121
+ };
122
+ }
123
+ /* ── Crescent ───────────────────────────────────────────────────────────────── */
124
+ /** A thin lit crescent at 14° with a whisper of earthshine. Variant `guides`. */
125
+ export function crescent({ uid, ink, variant }) {
126
+ const guides = variant === "guides";
127
+ const angle = 14;
128
+ const c = 200;
129
+ const R = 120;
130
+ const d = R * 0.12;
131
+ const [ax1, ay1] = polar(c, c, 175, 180 - angle);
132
+ const [ax2, ay2] = polar(c, c, 175, -angle);
133
+ const [lx, ly] = polar(c, c, 186, 180 - angle);
134
+ const lit = () => h("rect", { width: 400, height: 400, mask: `url(#${uid}-mask)` });
135
+ return {
136
+ viewBox: "0 0 400 400",
137
+ body: [
138
+ h("defs", {}, h("mask", { id: `${uid}-mask`, maskUnits: "userSpaceOnUse", x: 0, y: 0, width: 400, height: 400 }, h("rect", { width: 400, height: 400, fill: "#000" }), h("g", { transform: `rotate(${-angle} ${c} ${c})` }, h("circle", { cx: c, cy: c, r: R, fill: "#fff" }), h("circle", { cx: c + d, cy: c, r: R, fill: "#000" }))), h("filter", { id: `${uid}-soft`, x: "-50%", y: "-50%", width: "200%", height: "200%" }, h("feGaussianBlur", { stdDeviation: 7 })), h("filter", { id: `${uid}-wide`, x: "-50%", y: "-50%", width: "200%", height: "200%" }, h("feGaussianBlur", { stdDeviation: 20 }))),
139
+ guides &&
140
+ h("g", { "stroke-width": 0.75, stroke: ink.guide }, h("circle", { cx: c, cy: c, r: 160, "stroke-dasharray": "2 4" }), h("line", { x1: ax1, y1: ay1, x2: ax2, y2: ay2, "stroke-dasharray": "6 4" }), h("text", {
141
+ x: lx,
142
+ y: ly,
143
+ fill: "currentColor",
144
+ "fill-opacity": 0.6,
145
+ stroke: "none",
146
+ "font-size": 9,
147
+ "font-family": ink.mono,
148
+ "text-anchor": "end",
149
+ "dominant-baseline": "central",
150
+ }, `${angle}°`)),
151
+ h("circle", {
152
+ cx: c,
153
+ cy: c,
154
+ r: R,
155
+ stroke: "currentColor",
156
+ "stroke-opacity": 0.12,
157
+ "stroke-width": 0.75,
158
+ }),
159
+ // Filters apply before masks on one element, so each glow blurs an already-masked group.
160
+ h("g", { fill: "currentColor" }, h("g", { filter: `url(#${uid}-wide)`, opacity: 0.35 }, lit()), h("g", { filter: `url(#${uid}-soft)`, opacity: 0.55 }, lit()), lit()),
161
+ ],
162
+ };
163
+ }
164
+ /* ── Horizon ────────────────────────────────────────────────────────────────── */
165
+ /** A planet limb with a glowing rim. Static by design; it fills its box (`slice`). */
166
+ export function horizon({ uid, ink }) {
167
+ const cx = 400;
168
+ const R = 1400;
169
+ const top = 300;
170
+ const cy = top + R;
171
+ const rim = (width, opacity, filter) => h("circle", {
172
+ cx,
173
+ cy,
174
+ r: R,
175
+ stroke: `url(#${uid}-rim)`,
176
+ "stroke-width": width,
177
+ opacity,
178
+ filter: filter && `url(#${uid}-${filter})`,
179
+ });
180
+ return {
181
+ viewBox: "0 0 800 400",
182
+ preserveAspectRatio: "xMidYMax slice",
183
+ body: [
184
+ h("defs", {}, h("linearGradient", { id: `${uid}-rim`, x1: 0, y1: 0, x2: 800, y2: 0, gradientUnits: "userSpaceOnUse" }, h("stop", { offset: 0, "stop-color": "currentColor", "stop-opacity": 0.1 }), h("stop", { offset: 0.5, "stop-color": "currentColor", "stop-opacity": 1 }), h("stop", { offset: 1, "stop-color": "currentColor", "stop-opacity": 0.1 })), h("radialGradient", {
185
+ id: `${uid}-sky`,
186
+ cx,
187
+ cy: top,
188
+ r: 420,
189
+ gradientUnits: "userSpaceOnUse",
190
+ gradientTransform: `translate(0 ${top}) scale(1 0.42) translate(0 ${-top})`,
191
+ }, h("stop", { offset: 0, "stop-color": "currentColor", "stop-opacity": 0.22 }), h("stop", { offset: 1, "stop-color": "currentColor", "stop-opacity": 0 })), h("linearGradient", { id: `${uid}-sheen`, x1: 0, y1: top, x2: 0, y2: top + 90, gradientUnits: "userSpaceOnUse" }, h("stop", { offset: 0, "stop-color": "currentColor", "stop-opacity": 0.1 }), h("stop", { offset: 1, "stop-color": "currentColor", "stop-opacity": 0 })), h("filter", { id: `${uid}-wide`, x: "-20%", y: "-20%", width: "140%", height: "140%" }, h("feGaussianBlur", { stdDeviation: 16 })), h("filter", { id: `${uid}-soft`, x: "-20%", y: "-20%", width: "140%", height: "140%" }, h("feGaussianBlur", { stdDeviation: 3 }))),
192
+ h("rect", { width: 800, height: 400, fill: `url(#${uid}-sky)` }),
193
+ rim(36, 0.3, "wide"),
194
+ h("circle", { cx, cy, r: R, fill: ink.ground }),
195
+ h("circle", { cx, cy, r: R, fill: `url(#${uid}-sheen)` }),
196
+ rim(6, 0.6, "soft"),
197
+ rim(1.25),
198
+ ],
199
+ };
200
+ }
201
+ /* ── Nib study ──────────────────────────────────────────────────────────────── */
202
+ /** A radial protractor with the 14° stress axis and an oval nib. Variant `plain` drops the degree labels. */
203
+ export function nibStudy({ ink, variant }) {
204
+ const labels = variant !== "plain";
205
+ const angle = 14;
206
+ const c = 200;
207
+ const R = 150;
208
+ const ticks = Array.from({ length: 72 }, (_, i) => i * 5);
209
+ const [sx1, sy1] = polar(c, c, R + 8, 180 + angle);
210
+ const [sx2, sy2] = polar(c, c, R + 8, angle);
211
+ const [arcX, arcY] = polar(c, c, 72, angle);
212
+ const [alx, aly] = polar(c, c, 86, angle / 2);
213
+ const [tx, ty] = polar(c, c, R - 22, angle + 4);
214
+ const tick = (t, inner) => {
215
+ const [x1, y1] = polar(c, c, R, t);
216
+ const [x2, y2] = polar(c, c, R - inner, t);
217
+ return h("line", { x1, y1, x2, y2 });
218
+ };
219
+ return {
220
+ viewBox: "0 0 400 400",
221
+ body: [
222
+ h("g", { "stroke-width": 0.75, stroke: ink.guide }, h("path", { d: `M${c - R} ${c}H${c + R}M${c} ${c - R}V${c + R}` }), h("circle", { cx: c, cy: c, r: 100, "stroke-dasharray": "2 4" }), h("circle", { cx: c, cy: c, r: 50, "stroke-dasharray": "2 4" }), h("circle", { cx: c, cy: c, r: R - 6 }), ticks.filter((t) => t % 30 !== 0).map((t) => tick(t, 6))),
223
+ h("circle", {
224
+ cx: c,
225
+ cy: c,
226
+ r: R,
227
+ stroke: "currentColor",
228
+ "stroke-opacity": 0.55,
229
+ "stroke-width": 0.75,
230
+ }),
231
+ h("g", { stroke: "currentColor", "stroke-opacity": 0.85, "stroke-width": 0.9 }, ticks.filter((t) => t % 30 === 0).map((t) => tick(t, 14))),
232
+ labels &&
233
+ h("g", {
234
+ fill: "currentColor",
235
+ "fill-opacity": 0.6,
236
+ "font-size": 9,
237
+ "font-family": ink.mono,
238
+ "text-anchor": "middle",
239
+ }, ticks
240
+ .filter((t) => t % 30 === 0)
241
+ .map((t) => {
242
+ const [x, y] = polar(c, c, R + 18, t);
243
+ return h("text", { x, y, "dominant-baseline": "central" }, `${t}°`);
244
+ })),
245
+ // Stress axis and its angle
246
+ h("line", {
247
+ x1: sx1,
248
+ y1: sy1,
249
+ x2: sx2,
250
+ y2: sy2,
251
+ stroke: "currentColor",
252
+ "stroke-width": 1,
253
+ "stroke-dasharray": "8 3 1 3",
254
+ }),
255
+ h("path", {
256
+ d: `M${c + 72} ${c}A72 72 0 0 0 ${arcX} ${arcY}`,
257
+ stroke: "currentColor",
258
+ "stroke-opacity": 0.7,
259
+ "stroke-width": 0.75,
260
+ }),
261
+ h("text", {
262
+ x: alx,
263
+ y: aly,
264
+ fill: "currentColor",
265
+ "font-size": 8.5,
266
+ "font-family": ink.mono,
267
+ "dominant-baseline": "central",
268
+ }, `${angle}°`),
269
+ h("text", {
270
+ x: tx,
271
+ y: ty,
272
+ fill: "currentColor",
273
+ "fill-opacity": 0.7,
274
+ "font-size": 7.5,
275
+ "font-family": ink.mono,
276
+ "letter-spacing": 1.2,
277
+ "text-anchor": "end",
278
+ transform: `rotate(${-angle} ${tx} ${ty})`,
279
+ }, "STRESS"),
280
+ // Oval nib
281
+ h("g", { transform: `rotate(${-angle} ${c} ${c})` }, h("ellipse", {
282
+ cx: c,
283
+ cy: c,
284
+ rx: 58,
285
+ ry: 19,
286
+ fill: "currentColor",
287
+ "fill-opacity": 0.08,
288
+ stroke: "currentColor",
289
+ "stroke-width": 1,
290
+ }), h("path", {
291
+ d: `M${c - 58} ${c}H${c + 58}`,
292
+ stroke: "currentColor",
293
+ "stroke-opacity": 0.35,
294
+ "stroke-width": 0.5,
295
+ })),
296
+ h("circle", { cx: c, cy: c, r: 2.5, fill: ink.ground, stroke: "currentColor", "stroke-width": 1 }),
297
+ ],
298
+ };
299
+ }
300
+ /* ── Elevation guides ───────────────────────────────────────────────────────── */
301
+ /** Licht's vertical metrics, in font units. */
302
+ export const LICHT_METRICS = {
303
+ unitsPerEm: 1000,
304
+ ascender: 742,
305
+ capHeight: 720,
306
+ xHeight: 506,
307
+ descender: -204,
308
+ };
309
+ /**
310
+ * Guide lines at Licht's vertical metrics around a "Hxgo" specimen. The specimen's baseline is
311
+ * placed on the 0 guide exactly (SVG text sits on its baseline). Variant `plain` drops the labels.
312
+ */
313
+ export function elevationGuides({ ink, variant }) {
314
+ const labels = variant !== "plain";
315
+ const m = LICHT_METRICS;
316
+ const F = 200;
317
+ const W = 640;
318
+ const top = 34;
319
+ const y = (v) => r2(top + ((m.ascender - v) / m.unitsPerEm) * F);
320
+ const H = r2(y(m.descender) + 26);
321
+ const guides = [
322
+ { value: m.ascender, name: "Ascender", below: false },
323
+ // Cap height sits a hair under the ascender, so it and the x-height label sit beneath their lines.
324
+ { value: m.capHeight, name: "Cap height", below: true },
325
+ { value: m.xHeight, name: "X-height", below: true },
326
+ { value: 0, name: "Baseline", below: false },
327
+ { value: m.descender, name: "Descender", below: false },
328
+ ];
329
+ const x0 = labels ? 56 : 0;
330
+ return {
331
+ viewBox: `0 0 ${W} ${H}`,
332
+ body: [
333
+ guides.map((g) => h("line", {
334
+ x1: 0,
335
+ x2: W,
336
+ y1: y(g.value),
337
+ y2: y(g.value),
338
+ stroke: g.value === 0 ? "currentColor" : ink.guide,
339
+ "stroke-opacity": g.value === 0 ? 0.4 : undefined,
340
+ "stroke-width": 1,
341
+ "stroke-dasharray": g.value === 0 ? undefined : "4 3",
342
+ })),
343
+ labels &&
344
+ h("g", {
345
+ fill: "currentColor",
346
+ "fill-opacity": 0.55,
347
+ "font-size": 10,
348
+ "font-family": ink.mono,
349
+ "letter-spacing": 1.2,
350
+ }, guides.map((g) => {
351
+ const ly = g.below ? y(g.value) + 13 : y(g.value) - 5;
352
+ return h("g", {}, h("text", { x: 44, y: ly, "text-anchor": "end" }, String(g.value).replace("-", "−")), h("text", { x: W, y: ly, "text-anchor": "end" }, g.name.toUpperCase()));
353
+ })),
354
+ h("text", {
355
+ x: r2(x0 + (W - x0) / 2),
356
+ y: y(0),
357
+ fill: "currentColor",
358
+ "font-family": ink.heading,
359
+ "font-weight": 300,
360
+ "font-size": F,
361
+ "letter-spacing": -4,
362
+ "text-anchor": "middle",
363
+ }, "Hxgo"),
364
+ ],
365
+ };
366
+ }
367
+ /* ── Bracket construction ───────────────────────────────────────────────────── */
368
+ /*
369
+ * Exact geometry of the bracket halves, read from assets/logo-left.svg and logo-right.svg
370
+ * (clip rect ∩ transformed path). Each half sits on a 187.92-wide canvas; the right one is
371
+ * placed at its canvas offset, as the two files sit side by side.
372
+ */
373
+ const HALF = 187.92;
374
+ const marks = [
375
+ { x: 56.23, y: 111.62, w: 93.17, h: 36.76 }, // left arm
376
+ { x: 112.64, y: 55.29, w: 36.76, h: 264.42 }, // left stem
377
+ { x: HALF + 38.09, y: 55.25, w: 36.76, h: 262.27 }, // right stem
378
+ { x: HALF + 38.0, y: 168.01, w: 93.17, h: 36.76 }, // right arm
379
+ ];
380
+ function dimension(ink, x1, y1, x2, y2, label,
381
+ /** Which side of the line the label sits on: -1 above/left, 1 below/right. */
382
+ side = -1) {
383
+ const vertical = x1 === x2;
384
+ const t = 3.5;
385
+ // Architectural 45° slashes at both ends.
386
+ const ticks = `M${x1 - t} ${y1 + t}L${x1 + t} ${y1 - t}M${x2 - t} ${y2 + t}L${x2 + t} ${y2 - t}`;
387
+ const mx = r2((x1 + x2) / 2);
388
+ const my = r2((y1 + y2) / 2);
389
+ const lx = vertical ? mx + side * 7 : mx;
390
+ const ly = vertical ? my : my + side * 6;
391
+ return h("g", {}, h("line", { x1, y1, x2, y2, stroke: "currentColor", "stroke-opacity": 0.6, "stroke-width": 0.6 }), h("path", { d: ticks, stroke: "currentColor", "stroke-width": 0.75 }), h("text", {
392
+ x: lx,
393
+ y: ly,
394
+ fill: "currentColor",
395
+ "fill-opacity": 0.8,
396
+ "font-size": 8,
397
+ "font-family": ink.mono,
398
+ "text-anchor": "middle",
399
+ "dominant-baseline": "central",
400
+ transform: vertical ? `rotate(-90 ${lx} ${ly})` : undefined,
401
+ }, label));
402
+ }
403
+ /**
404
+ * The bracket mark as a construction drawing: the exact rectangles from the logo files in
405
+ * dashes, a node at every corner, dimension lines in mono. Variant `filled`: the solid mark
406
+ * under its construction lines, without dimensions.
407
+ */
408
+ export function bracketConstruction({ ink, variant }) {
409
+ const filled = variant === "filled";
410
+ const W = r2(HALF * 2);
411
+ const H = 375;
412
+ const xs = [...new Set(marks.flatMap((m) => [m.x, r2(m.x + m.w)]))];
413
+ const ys = [...new Set(marks.flatMap((m) => [m.y, r2(m.y + m.h)]))];
414
+ const nodes = [
415
+ ...new Set(marks.flatMap((m) => [
416
+ `${m.x},${m.y}`,
417
+ `${r2(m.x + m.w)},${m.y}`,
418
+ `${m.x},${r2(m.y + m.h)}`,
419
+ `${r2(m.x + m.w)},${r2(m.y + m.h)}`,
420
+ ])),
421
+ ].map((p) => p.split(",").map(Number));
422
+ const [lArm, lStem, rStem, rArm] = marks;
423
+ const rects = marks.map((m) => h("rect", { x: m.x, y: m.y, width: m.w, height: m.h }));
424
+ return {
425
+ viewBox: `0 0 ${W} ${H}`,
426
+ body: [
427
+ h("g", { "stroke-width": 0.5, "stroke-dasharray": "1.5 3", stroke: ink.guide }, xs.map((x) => h("line", { x1: x, y1: 0, x2: x, y2: H })), ys.map((y) => h("line", { x1: 0, y1: y, x2: W, y2: y }))),
428
+ h("g", { fill: "currentColor", "fill-opacity": filled ? 0.9 : 0.1 }, rects),
429
+ h("g", { stroke: "currentColor", "stroke-opacity": 0.75, "stroke-width": 0.75, "stroke-dasharray": "4 2.5" }, rects),
430
+ !filled &&
431
+ h("g", {}, dimension(ink, lStem.x, 34, r2(lStem.x + lStem.w), 34, lStem.w.toFixed(2)), dimension(ink, lArm.x, 96, r2(lArm.x + lArm.w), 96, lArm.w.toFixed(2)), dimension(ink, 30, lStem.y, 30, r2(lStem.y + lStem.h), lStem.h.toFixed(2)), dimension(ink, r2(W - 26), rStem.y, r2(W - 26), r2(rStem.y + rStem.h), rStem.h.toFixed(2), 1), dimension(ink, rArm.x, r2(rArm.y + rArm.h + 16), r2(rArm.x + rArm.w), r2(rArm.y + rArm.h + 16), rArm.w.toFixed(2), 1)),
432
+ h("g", { stroke: "currentColor", "stroke-width": 0.75, fill: ink.ground }, nodes.map(([x, y]) => h("rect", { x: r2(x - 1.75), y: r2(y - 1.75), width: 3.5, height: 3.5 }))),
433
+ ],
434
+ };
435
+ }
436
+ /* ── Standalone files ───────────────────────────────────────────────────────── */
437
+ /** A drawing as a standalone SVG file in a fixed ink. */
438
+ export function drawingToSvg(draw, variant, theme, uid, title) {
439
+ const ink = STATIC_INK[theme];
440
+ const d = draw({ uid, ink, variant });
441
+ const [, , w, hgt] = d.viewBox.split(" ").map(Number);
442
+ const px = 480;
443
+ return `${toSvgString(h("svg", {
444
+ xmlns: "http://www.w3.org/2000/svg",
445
+ viewBox: d.viewBox,
446
+ width: px,
447
+ height: Math.round((px * hgt) / w),
448
+ fill: "none",
449
+ color: ink.color,
450
+ preserveAspectRatio: d.preserveAspectRatio,
451
+ role: title ? "img" : undefined,
452
+ "aria-label": title,
453
+ "aria-hidden": title ? undefined : "true",
454
+ }, title && h("title", {}, title), d.body))}\n`;
455
+ }
456
+ /** Fixed sheet colours for static files. Keep in sync with editorial.css. */
457
+ const SHEET_COLORS = {
458
+ night: {
459
+ ground: "#040404",
460
+ ink: "#fafafa",
461
+ knockout: "#040404",
462
+ guide: "#ffffff29",
463
+ caption: "rgba(255,255,255,0.5)",
464
+ rule: "rgba(255,255,255,0.16)",
465
+ mark: "rgba(255,255,255,0.42)",
466
+ edge: "#393939",
467
+ },
468
+ paper: {
469
+ ground: "#efefed",
470
+ ink: "#121212",
471
+ knockout: "#efefed",
472
+ guide: "#12121229",
473
+ caption: "rgba(18,18,18,0.55)",
474
+ rule: "rgba(18,18,18,0.18)",
475
+ mark: "rgba(18,18,18,0.4)",
476
+ edge: "#d4d4d0",
477
+ },
478
+ };
479
+ /** A spec sheet as a standalone SVG file: ground, captions, crosshairs, title block and drawing. */
480
+ export function sheetToSvg(sheet, draw, variant, uid, title) {
481
+ const W = 960;
482
+ const H = Math.round(W / (sheet.aspect ?? 4 / 3));
483
+ const col = SHEET_COLORS[sheet.tone];
484
+ const ink = { ground: col.knockout, guide: col.guide, mono: MONO_STACK, heading: HEADING_STACK };
485
+ const d = draw({ uid, ink, variant });
486
+ const pad = sheet.bleed ? 0 : Math.max(44, Math.round(W * 0.09));
487
+ const capX = sheet.marks ? 36 : 22;
488
+ const caption = {
489
+ "font-family": MONO_STACK,
490
+ "font-size": 13,
491
+ "letter-spacing": 1.8,
492
+ fill: col.caption,
493
+ };
494
+ const cross = (x, y) => h("path", { d: `M${x + 6.5} ${y}v13M${x} ${y + 6.5}h13`, stroke: col.mark, "stroke-width": 1 });
495
+ // Title block: two columns of cells, bottom right; an odd last cell spans both.
496
+ const entries = sheet.titleBlock ?? [];
497
+ const cw = 92;
498
+ const ch = 40;
499
+ const rows = Math.ceil(entries.length / 2);
500
+ const inset = sheet.marks ? 28 : 18;
501
+ const bx = W - inset - cw * 2;
502
+ const by = H - inset - ch * rows;
503
+ const block = entries.length
504
+ ? h("g", { "font-family": MONO_STACK }, entries.map((e, i) => {
505
+ const x = bx + (i % 2) * cw;
506
+ const y = by + Math.floor(i / 2) * ch;
507
+ const w = i === entries.length - 1 && i % 2 === 0 ? cw * 2 : cw;
508
+ return h("g", {}, h("rect", { x, y, width: w, height: ch, stroke: col.rule, "stroke-width": 1 }), h("text", { x: x + 10, y: y + 16, "font-size": 10, "letter-spacing": 1.4, fill: col.caption }, e.label.toUpperCase()), h("text", { x: x + 10, y: y + 31, "font-size": 12, fill: col.ink }, e.value));
509
+ }))
510
+ : null;
511
+ return `${toSvgString(h("svg", {
512
+ xmlns: "http://www.w3.org/2000/svg",
513
+ viewBox: `0 0 ${W} ${H}`,
514
+ width: W,
515
+ height: H,
516
+ fill: "none",
517
+ role: title ? "img" : undefined,
518
+ "aria-label": title,
519
+ "aria-hidden": title ? undefined : "true",
520
+ }, title && h("title", {}, title), h("defs", {}, h("linearGradient", { id: `${uid}-paper`, x1: 0.33, y1: 0.03, x2: 0.67, y2: 0.97 }, h("stop", { offset: 0, "stop-color": "#fdfdfc" }), h("stop", { offset: 0.7, "stop-color": "#efefed" }), h("stop", { offset: 1, "stop-color": "#e7e7e4" }))), h("rect", {
521
+ x: 0.5,
522
+ y: 0.5,
523
+ width: W - 1,
524
+ height: H - 1,
525
+ fill: sheet.tone === "paper" ? `url(#${uid}-paper)` : col.ground,
526
+ stroke: col.edge,
527
+ "stroke-width": 1,
528
+ }), h("svg", {
529
+ x: pad,
530
+ y: pad,
531
+ width: W - pad * 2,
532
+ height: H - pad * 2,
533
+ viewBox: d.viewBox,
534
+ preserveAspectRatio: d.preserveAspectRatio ?? "xMidYMid meet",
535
+ color: col.ink,
536
+ overflow: "hidden",
537
+ }, d.body), h("text", { ...caption, x: capX, y: 32 }, sheet.index.toUpperCase()), sheet.eyebrow &&
538
+ h("text", { ...caption, x: W - capX, y: 32, "text-anchor": "end" }, sheet.eyebrow.toUpperCase()), sheet.marks && [cross(10, 10), cross(W - 23, 10), cross(10, H - 23), cross(W - 23, H - 23)], block))}\n`;
539
+ }
@@ -0,0 +1,37 @@
1
+ import { type IllustrationFile, type IllustrationKind, type IllustrationName, type IllustrationVariant } from "./illustration-library.js";
2
+ /** One library entry, as listed by `illustrations`. */
3
+ export interface IllustrationInfo {
4
+ /** `<kind>/<name>`, e.g. `iso/server`. Pass it to `<Illustration name>`. */
5
+ id: IllustrationName;
6
+ kind: IllustrationKind;
7
+ name: string;
8
+ title: string;
9
+ /** What it stands for. Use it beside the sentence it illustrates. */
10
+ meaning: string;
11
+ tags: readonly string[];
12
+ /** Supported variants; the first is the default. */
13
+ variants: readonly IllustrationVariant[];
14
+ /** It moves inline (never under reduced motion). */
15
+ animated: boolean;
16
+ motion?: string;
17
+ /** Static SVG files, relative to `@zonsh/ui/assets/illustrations/` (and `/illustrations/` on the docs site). */
18
+ files: IllustrationFile[];
19
+ /**
20
+ * Editorial entries: the bundled full-size image's URL. On a server no bundler built (Vite's
21
+ * SSR) it is a `file:` URL, so put links to it in the page on the client.
22
+ */
23
+ src?: string;
24
+ /** Width / height, for entries with a fixed ratio (sheets, editorial images). */
25
+ aspect?: number;
26
+ }
27
+ /**
28
+ * Every entry of the illustration library — id, kind, title, meaning, tags, variants, motion
29
+ * and static files — for galleries, pickers and agents. Kinds: `iso`, `drawing`, `sheet`, `editorial`.
30
+ */
31
+ export declare const illustrations: IllustrationInfo[];
32
+ /** The kinds in display order, with a title and one-line description each. */
33
+ export declare const illustrationKinds: readonly {
34
+ id: IllustrationKind;
35
+ title: string;
36
+ description: string;
37
+ }[];