@zonsh/ui 0.5.0 → 0.6.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 (559) hide show
  1. package/CHANGELOG.md +643 -0
  2. package/README.md +49 -21
  3. package/dist/brand.d.ts +3 -0
  4. package/dist/brand.js +7 -0
  5. package/dist/components/_breadcrumb-more.d.ts +6 -0
  6. package/dist/components/_breadcrumb-more.js +5 -0
  7. package/dist/components/_drawing-svg.d.ts +11 -0
  8. package/dist/components/_drawing-svg.js +30 -0
  9. package/dist/components/_media.d.ts +159 -0
  10. package/dist/components/_media.js +266 -0
  11. package/dist/components/_overlay.d.ts +8 -5
  12. package/dist/components/_overlay.js +11 -6
  13. package/dist/components/_scheduler-calendar.d.ts +71 -0
  14. package/dist/components/_scheduler-calendar.js +940 -0
  15. package/dist/components/_scheduler-editor.d.ts +29 -0
  16. package/dist/components/_scheduler-editor.js +111 -0
  17. package/dist/components/_scheduler-menu.d.ts +16 -0
  18. package/dist/components/_scheduler-menu.js +18 -0
  19. package/dist/components/_scheduler-parts.d.ts +164 -0
  20. package/dist/components/_scheduler-parts.js +327 -0
  21. package/dist/components/_suggest-list.d.ts +142 -0
  22. package/dist/components/_suggest-list.js +159 -0
  23. package/dist/components/_toolbar-more.d.ts +24 -0
  24. package/dist/components/_toolbar-more.js +25 -0
  25. package/dist/components/accordion.d.ts +1 -1
  26. package/dist/components/accordion.js +6 -6
  27. package/dist/components/action-sheet.d.ts +88 -0
  28. package/dist/components/action-sheet.js +124 -0
  29. package/dist/components/alert-dialog.js +3 -1
  30. package/dist/components/alert.d.ts +11 -18
  31. package/dist/components/alert.js +9 -6
  32. package/dist/components/app-bar.d.ts +93 -0
  33. package/dist/components/app-bar.js +175 -0
  34. package/dist/components/audio-player.d.ts +134 -0
  35. package/dist/components/audio-player.js +618 -0
  36. package/dist/components/avatar.d.ts +6 -6
  37. package/dist/components/avatar.js +13 -11
  38. package/dist/components/badge.d.ts +12 -12
  39. package/dist/components/badge.js +7 -5
  40. package/dist/components/bottom-nav.d.ts +53 -11
  41. package/dist/components/bottom-nav.js +388 -23
  42. package/dist/components/breadcrumb.d.ts +11 -2
  43. package/dist/components/breadcrumb.js +60 -6
  44. package/dist/components/button-group.js +5 -1
  45. package/dist/components/button.d.ts +23 -6
  46. package/dist/components/button.js +63 -7
  47. package/dist/components/calendar.js +8 -6
  48. package/dist/components/card.d.ts +10 -8
  49. package/dist/components/card.js +15 -14
  50. package/dist/components/carousel.d.ts +2 -2
  51. package/dist/components/carousel.js +21 -8
  52. package/dist/components/chart.d.ts +27 -1
  53. package/dist/components/chart.js +15 -5
  54. package/dist/components/checkbox.js +2 -2
  55. package/dist/components/code-block.d.ts +9 -2
  56. package/dist/components/code-block.js +26 -7
  57. package/dist/components/collapsible.js +3 -3
  58. package/dist/components/color-picker.d.ts +2 -2
  59. package/dist/components/color-picker.js +5 -5
  60. package/dist/components/combobox.d.ts +26 -7
  61. package/dist/components/combobox.js +32 -13
  62. package/dist/components/command.d.ts +29 -5
  63. package/dist/components/command.js +35 -10
  64. package/dist/components/context-menu.d.ts +5 -2
  65. package/dist/components/context-menu.js +24 -3
  66. package/dist/components/conversation.d.ts +1 -1
  67. package/dist/components/conversation.js +67 -13
  68. package/dist/components/copy-button.d.ts +1 -1
  69. package/dist/components/copy-button.js +1 -1
  70. package/dist/components/data-table.d.ts +6 -6
  71. package/dist/components/data-table.js +41 -15
  72. package/dist/components/date-picker.d.ts +31 -9
  73. package/dist/components/date-picker.js +100 -18
  74. package/dist/components/dialog.d.ts +17 -10
  75. package/dist/components/dialog.js +20 -13
  76. package/dist/components/drawer.d.ts +26 -8
  77. package/dist/components/drawer.js +75 -16
  78. package/dist/components/drawing.d.ts +25 -0
  79. package/dist/components/drawing.js +32 -0
  80. package/dist/components/empty.js +2 -2
  81. package/dist/components/feature-list.d.ts +65 -13
  82. package/dist/components/feature-list.js +116 -15
  83. package/dist/components/field.js +2 -2
  84. package/dist/components/file-drop.d.ts +9 -7
  85. package/dist/components/file-drop.js +8 -43
  86. package/dist/components/filter-bar.d.ts +10 -9
  87. package/dist/components/filter-bar.js +42 -25
  88. package/dist/components/graph.d.ts +19 -3
  89. package/dist/components/graph.js +170 -25
  90. package/dist/components/illustration.js +3 -28
  91. package/dist/components/input-group.d.ts +5 -10
  92. package/dist/components/input-group.js +16 -16
  93. package/dist/components/input.d.ts +2 -2
  94. package/dist/components/input.js +3 -3
  95. package/dist/components/item.d.ts +9 -6
  96. package/dist/components/item.js +13 -8
  97. package/dist/components/kbd.d.ts +1 -1
  98. package/dist/components/kbd.js +1 -1
  99. package/dist/components/lightbox.d.ts +76 -9
  100. package/dist/components/lightbox.js +333 -45
  101. package/dist/components/locale.d.ts +6 -6
  102. package/dist/components/logo.d.ts +21 -1
  103. package/dist/components/logo.js +32 -2
  104. package/dist/components/markdown-editor.d.ts +275 -0
  105. package/dist/components/markdown-editor.js +831 -0
  106. package/dist/components/mentions.d.ts +153 -0
  107. package/dist/components/mentions.js +507 -0
  108. package/dist/components/menu.d.ts +2 -1
  109. package/dist/components/menu.js +5 -4
  110. package/dist/components/menubar.d.ts +23 -5
  111. package/dist/components/menubar.js +97 -22
  112. package/dist/components/message.d.ts +62 -11
  113. package/dist/components/message.js +49 -13
  114. package/dist/components/meter.js +1 -1
  115. package/dist/components/money-input.d.ts +1 -1
  116. package/dist/components/money-input.js +1 -1
  117. package/dist/components/native-select.d.ts +2 -2
  118. package/dist/components/native-select.js +4 -4
  119. package/dist/components/navigation-menu.d.ts +3 -1
  120. package/dist/components/navigation-menu.js +23 -12
  121. package/dist/components/number-field.d.ts +2 -9
  122. package/dist/components/number-field.js +86 -36
  123. package/dist/components/number-roll.d.ts +26 -0
  124. package/dist/components/number-roll.js +81 -0
  125. package/dist/components/otp-field.d.ts +1 -1
  126. package/dist/components/otp-field.js +24 -3
  127. package/dist/components/pagination.d.ts +11 -3
  128. package/dist/components/pagination.js +59 -13
  129. package/dist/components/pdf-viewer.d.ts +1 -1
  130. package/dist/components/pdf-viewer.js +8 -8
  131. package/dist/components/phone-input.d.ts +1 -1
  132. package/dist/components/phone-input.js +2 -2
  133. package/dist/components/popover.js +5 -3
  134. package/dist/components/preview-card.d.ts +37 -2
  135. package/dist/components/preview-card.js +226 -2
  136. package/dist/components/progress.js +1 -1
  137. package/dist/components/prompt-input.d.ts +1 -1
  138. package/dist/components/prompt-input.js +24 -14
  139. package/dist/components/pull-to-refresh.d.ts +50 -0
  140. package/dist/components/pull-to-refresh.js +189 -0
  141. package/dist/components/quote.d.ts +6 -1
  142. package/dist/components/quote.js +3 -2
  143. package/dist/components/radio-group.js +1 -1
  144. package/dist/components/rating.d.ts +4 -1
  145. package/dist/components/rating.js +131 -10
  146. package/dist/components/reasoning.d.ts +1 -1
  147. package/dist/components/reasoning.js +7 -3
  148. package/dist/components/resizable.d.ts +1 -1
  149. package/dist/components/resizable.js +2 -2
  150. package/dist/components/response.d.ts +1 -1
  151. package/dist/components/response.js +18 -6
  152. package/dist/components/scheduler.d.ts +352 -0
  153. package/dist/components/scheduler.js +1717 -0
  154. package/dist/components/scroll-area.js +1 -1
  155. package/dist/components/select.d.ts +17 -4
  156. package/dist/components/select.js +140 -9
  157. package/dist/components/separator.d.ts +1 -1
  158. package/dist/components/separator.js +3 -3
  159. package/dist/components/sidebar.d.ts +44 -3
  160. package/dist/components/sidebar.js +57 -17
  161. package/dist/components/site-header.d.ts +18 -13
  162. package/dist/components/site-header.js +23 -11
  163. package/dist/components/skeleton.d.ts +17 -7
  164. package/dist/components/skeleton.js +22 -7
  165. package/dist/components/slider.js +2 -2
  166. package/dist/components/sortable.d.ts +55 -4
  167. package/dist/components/sortable.js +172 -103
  168. package/dist/components/sources.d.ts +1 -1
  169. package/dist/components/sources.js +2 -2
  170. package/dist/components/spinner.d.ts +4 -4
  171. package/dist/components/spinner.js +4 -4
  172. package/dist/components/stat.d.ts +21 -4
  173. package/dist/components/stat.js +17 -8
  174. package/dist/components/stepper.d.ts +1 -1
  175. package/dist/components/stepper.js +8 -7
  176. package/dist/components/suggestions.d.ts +11 -3
  177. package/dist/components/suggestions.js +10 -4
  178. package/dist/components/swipe-actions.d.ts +66 -0
  179. package/dist/components/swipe-actions.js +292 -0
  180. package/dist/components/switch.js +1 -1
  181. package/dist/components/table.d.ts +12 -6
  182. package/dist/components/table.js +78 -30
  183. package/dist/components/tabs.js +7 -4
  184. package/dist/components/tag.d.ts +19 -20
  185. package/dist/components/tag.js +9 -5
  186. package/dist/components/tags-input.d.ts +2 -7
  187. package/dist/components/tags-input.js +11 -8
  188. package/dist/components/textarea.d.ts +3 -2
  189. package/dist/components/textarea.js +4 -3
  190. package/dist/components/theme.d.ts +49 -6
  191. package/dist/components/theme.js +147 -9
  192. package/dist/components/time-field.d.ts +4 -9
  193. package/dist/components/time-field.js +6 -6
  194. package/dist/components/timeline.d.ts +19 -3
  195. package/dist/components/timeline.js +21 -9
  196. package/dist/components/tippy.d.ts +17 -1
  197. package/dist/components/tippy.js +95 -15
  198. package/dist/components/toast.d.ts +2 -7
  199. package/dist/components/toast.js +12 -8
  200. package/dist/components/toggle-group.d.ts +7 -1
  201. package/dist/components/toggle-group.js +16 -5
  202. package/dist/components/toggle.d.ts +2 -2
  203. package/dist/components/toggle.js +3 -2
  204. package/dist/components/tool-call.d.ts +1 -1
  205. package/dist/components/tool-call.js +4 -4
  206. package/dist/components/toolbar.d.ts +57 -4
  207. package/dist/components/toolbar.js +216 -16
  208. package/dist/components/tooltip.d.ts +1 -1
  209. package/dist/components/tooltip.js +4 -2
  210. package/dist/components/tour.d.ts +1 -1
  211. package/dist/components/tour.js +36 -15
  212. package/dist/components/tree.js +5 -5
  213. package/dist/components/typography.d.ts +31 -8
  214. package/dist/components/typography.js +21 -10
  215. package/dist/components/video-player.d.ts +7 -2
  216. package/dist/components/video-player.js +121 -220
  217. package/dist/index.d.ts +99 -92
  218. package/dist/index.js +99 -92
  219. package/dist/lib/calendar.d.ts +153 -0
  220. package/dist/lib/calendar.js +312 -0
  221. package/dist/lib/cn.d.ts +3 -1
  222. package/dist/lib/cn.js +5 -0
  223. package/dist/lib/code-highlight.d.ts +14 -0
  224. package/dist/lib/code-highlight.js +81 -18
  225. package/dist/lib/drag.d.ts +39 -0
  226. package/dist/lib/drag.js +96 -0
  227. package/dist/lib/editorial-assets.js +16 -8
  228. package/dist/lib/figure/figures/automation.js +25 -6
  229. package/dist/lib/figure/figures/bar-chart.js +6 -1
  230. package/dist/lib/figure/figures/brackets-classic.js +4 -1
  231. package/dist/lib/figure/figures/city.js +12 -2
  232. package/dist/lib/figure/figures/conveyor.js +17 -4
  233. package/dist/lib/figure/figures/database.js +5 -2
  234. package/dist/lib/figure/figures/documents.js +11 -3
  235. package/dist/lib/figure/figures/inbox.js +5 -2
  236. package/dist/lib/figure/figures/laptop.js +3 -1
  237. package/dist/lib/figure/figures/pipeline.js +45 -10
  238. package/dist/lib/figure/figures/platform.js +62 -7
  239. package/dist/lib/figure/figures/server.js +21 -5
  240. package/dist/lib/figure/figures/spreadsheet.js +29 -5
  241. package/dist/lib/figure/kernel.d.ts +4 -2
  242. package/dist/lib/figure/kernel.js +10 -5
  243. package/dist/lib/figure/parts.js +6 -2
  244. package/dist/lib/files.d.ts +31 -0
  245. package/dist/lib/files.js +60 -0
  246. package/dist/lib/gesture.d.ts +70 -0
  247. package/dist/lib/gesture.js +141 -0
  248. package/dist/lib/glide.d.ts +5 -0
  249. package/dist/lib/glide.js +9 -1
  250. package/dist/lib/icons.d.ts +1 -0
  251. package/dist/lib/icons.js +6 -0
  252. package/dist/lib/illustration-library.js +1 -6
  253. package/dist/lib/markdown-edit.d.ts +112 -0
  254. package/dist/lib/markdown-edit.js +557 -0
  255. package/dist/lib/markdown-rich-editor.d.ts +188 -0
  256. package/dist/lib/markdown-rich-editor.js +1153 -0
  257. package/dist/lib/markdown-rich.d.ts +63 -0
  258. package/dist/lib/markdown-rich.js +534 -0
  259. package/dist/lib/mentions.d.ts +100 -0
  260. package/dist/lib/mentions.js +246 -0
  261. package/dist/lib/motion.d.ts +18 -0
  262. package/dist/lib/motion.js +43 -5
  263. package/dist/lib/number-roll.d.ts +89 -0
  264. package/dist/lib/number-roll.js +391 -0
  265. package/dist/lib/platform.d.ts +6 -0
  266. package/dist/lib/platform.js +14 -0
  267. package/dist/lib/portal-container.d.ts +9 -0
  268. package/dist/lib/portal-container.js +10 -0
  269. package/dist/lib/press.d.ts +5 -0
  270. package/dist/lib/press.js +186 -0
  271. package/dist/lib/scheduler.d.ts +128 -0
  272. package/dist/lib/scheduler.js +272 -0
  273. package/dist/lib/scroll-edges.d.ts +9 -0
  274. package/dist/lib/scroll-edges.js +50 -0
  275. package/dist/lib/table-fit.d.ts +1 -1
  276. package/dist/lib/table-fit.js +65 -8
  277. package/dist/lib/theme-preset.d.ts +267 -0
  278. package/dist/lib/theme-preset.js +1046 -0
  279. package/dist/lib/theme-script.d.ts +23 -3
  280. package/dist/lib/theme-script.js +17 -5
  281. package/dist/lib/tippy/sprite.d.ts +36 -4
  282. package/dist/lib/tippy/sprite.js +188 -15
  283. package/dist/lib/tone.d.ts +4 -0
  284. package/dist/lib/tone.js +1 -0
  285. package/dist/messages/de.d.ts +3 -3
  286. package/dist/messages/de.js +274 -3
  287. package/dist/skills/zon-ui/SKILL.md +279 -0
  288. package/dist/skills/zon-ui/references/authoring.md +265 -0
  289. package/dist/skills/zon-ui/references/brand.md +416 -0
  290. package/dist/skills/zon-ui/references/components/accordion.md +199 -0
  291. package/dist/skills/zon-ui/references/components/action-sheet.md +268 -0
  292. package/dist/skills/zon-ui/references/components/alert-dialog.md +276 -0
  293. package/dist/skills/zon-ui/references/components/alert.md +167 -0
  294. package/dist/skills/zon-ui/references/components/app-bar.md +307 -0
  295. package/dist/skills/zon-ui/references/components/ascii-field.md +121 -0
  296. package/dist/skills/zon-ui/references/components/aspect-ratio.md +112 -0
  297. package/dist/skills/zon-ui/references/components/audio-player.md +231 -0
  298. package/dist/skills/zon-ui/references/components/avatar.md +98 -0
  299. package/dist/skills/zon-ui/references/components/badge.md +227 -0
  300. package/dist/skills/zon-ui/references/components/bottom-nav.md +709 -0
  301. package/dist/skills/zon-ui/references/components/breadcrumb.md +143 -0
  302. package/dist/skills/zon-ui/references/components/button-group.md +216 -0
  303. package/dist/skills/zon-ui/references/components/button.md +309 -0
  304. package/dist/skills/zon-ui/references/components/calendar.md +296 -0
  305. package/dist/skills/zon-ui/references/components/card.md +158 -0
  306. package/dist/skills/zon-ui/references/components/carousel.md +297 -0
  307. package/dist/skills/zon-ui/references/components/chart.md +739 -0
  308. package/dist/skills/zon-ui/references/components/chat.md +417 -0
  309. package/dist/skills/zon-ui/references/components/checkbox.md +219 -0
  310. package/dist/skills/zon-ui/references/components/code-block.md +143 -0
  311. package/dist/skills/zon-ui/references/components/code-highlight.md +118 -0
  312. package/dist/skills/zon-ui/references/components/collapsible.md +146 -0
  313. package/dist/skills/zon-ui/references/components/color-picker.md +200 -0
  314. package/dist/skills/zon-ui/references/components/combobox.md +455 -0
  315. package/dist/skills/zon-ui/references/components/command.md +326 -0
  316. package/dist/skills/zon-ui/references/components/contact-form.md +562 -0
  317. package/dist/skills/zon-ui/references/components/context-menu.md +159 -0
  318. package/dist/skills/zon-ui/references/components/conversation.md +146 -0
  319. package/dist/skills/zon-ui/references/components/copy-button.md +162 -0
  320. package/dist/skills/zon-ui/references/components/crm.md +1022 -0
  321. package/dist/skills/zon-ui/references/components/dashboard.md +612 -0
  322. package/dist/skills/zon-ui/references/components/data-table.md +776 -0
  323. package/dist/skills/zon-ui/references/components/date-picker.md +444 -0
  324. package/dist/skills/zon-ui/references/components/dialog.md +335 -0
  325. package/dist/skills/zon-ui/references/components/direction.md +165 -0
  326. package/dist/skills/zon-ui/references/components/drawer.md +276 -0
  327. package/dist/skills/zon-ui/references/components/drawing.md +94 -0
  328. package/dist/skills/zon-ui/references/components/empty.md +225 -0
  329. package/dist/skills/zon-ui/references/components/feature-list.md +412 -0
  330. package/dist/skills/zon-ui/references/components/field.md +209 -0
  331. package/dist/skills/zon-ui/references/components/file-drop.md +234 -0
  332. package/dist/skills/zon-ui/references/components/filter-bar.md +485 -0
  333. package/dist/skills/zon-ui/references/components/form.md +970 -0
  334. package/dist/skills/zon-ui/references/components/graph.md +339 -0
  335. package/dist/skills/zon-ui/references/components/illustration.md +497 -0
  336. package/dist/skills/zon-ui/references/components/inbox.md +263 -0
  337. package/dist/skills/zon-ui/references/components/input-group.md +339 -0
  338. package/dist/skills/zon-ui/references/components/input.md +189 -0
  339. package/dist/skills/zon-ui/references/components/item.md +277 -0
  340. package/dist/skills/zon-ui/references/components/kanban.md +626 -0
  341. package/dist/skills/zon-ui/references/components/kbd.md +116 -0
  342. package/dist/skills/zon-ui/references/components/label.md +104 -0
  343. package/dist/skills/zon-ui/references/components/layout.md +291 -0
  344. package/dist/skills/zon-ui/references/components/lightbox.md +235 -0
  345. package/dist/skills/zon-ui/references/components/locale.md +279 -0
  346. package/dist/skills/zon-ui/references/components/logo.md +257 -0
  347. package/dist/skills/zon-ui/references/components/markdown-editor.md +558 -0
  348. package/dist/skills/zon-ui/references/components/mentions.md +512 -0
  349. package/dist/skills/zon-ui/references/components/menu.md +218 -0
  350. package/dist/skills/zon-ui/references/components/menubar.md +292 -0
  351. package/dist/skills/zon-ui/references/components/message.md +243 -0
  352. package/dist/skills/zon-ui/references/components/meter.md +105 -0
  353. package/dist/skills/zon-ui/references/components/money-input.md +333 -0
  354. package/dist/skills/zon-ui/references/components/native-select.md +197 -0
  355. package/dist/skills/zon-ui/references/components/navigation-menu.md +253 -0
  356. package/dist/skills/zon-ui/references/components/number-field.md +210 -0
  357. package/dist/skills/zon-ui/references/components/number-roll.md +175 -0
  358. package/dist/skills/zon-ui/references/components/onboarding.md +896 -0
  359. package/dist/skills/zon-ui/references/components/otp-field.md +166 -0
  360. package/dist/skills/zon-ui/references/components/pagination.md +109 -0
  361. package/dist/skills/zon-ui/references/components/pdf-viewer.md +177 -0
  362. package/dist/skills/zon-ui/references/components/phone-input.md +252 -0
  363. package/dist/skills/zon-ui/references/components/popover.md +176 -0
  364. package/dist/skills/zon-ui/references/components/preview-card.md +193 -0
  365. package/dist/skills/zon-ui/references/components/pricing.md +724 -0
  366. package/dist/skills/zon-ui/references/components/progress.md +92 -0
  367. package/dist/skills/zon-ui/references/components/prompt-input.md +307 -0
  368. package/dist/skills/zon-ui/references/components/pull-to-refresh.md +188 -0
  369. package/dist/skills/zon-ui/references/components/quote.md +115 -0
  370. package/dist/skills/zon-ui/references/components/radio-group.md +215 -0
  371. package/dist/skills/zon-ui/references/components/rating.md +260 -0
  372. package/dist/skills/zon-ui/references/components/reasoning.md +102 -0
  373. package/dist/skills/zon-ui/references/components/resizable.md +213 -0
  374. package/dist/skills/zon-ui/references/components/response.md +170 -0
  375. package/dist/skills/zon-ui/references/components/scheduler.md +732 -0
  376. package/dist/skills/zon-ui/references/components/scroll-area.md +122 -0
  377. package/dist/skills/zon-ui/references/components/select.md +351 -0
  378. package/dist/skills/zon-ui/references/components/separator.md +103 -0
  379. package/dist/skills/zon-ui/references/components/settings.md +793 -0
  380. package/dist/skills/zon-ui/references/components/shop.md +1715 -0
  381. package/dist/skills/zon-ui/references/components/sidebar.md +813 -0
  382. package/dist/skills/zon-ui/references/components/sign-in.md +1639 -0
  383. package/dist/skills/zon-ui/references/components/site-header.md +303 -0
  384. package/dist/skills/zon-ui/references/components/skeleton.md +256 -0
  385. package/dist/skills/zon-ui/references/components/slider.md +172 -0
  386. package/dist/skills/zon-ui/references/components/sortable.md +405 -0
  387. package/dist/skills/zon-ui/references/components/sources.md +106 -0
  388. package/dist/skills/zon-ui/references/components/spinner.md +222 -0
  389. package/dist/skills/zon-ui/references/components/stat.md +267 -0
  390. package/dist/skills/zon-ui/references/components/stepper.md +285 -0
  391. package/dist/skills/zon-ui/references/components/suggestions.md +146 -0
  392. package/dist/skills/zon-ui/references/components/swipe-actions.md +344 -0
  393. package/dist/skills/zon-ui/references/components/switch.md +160 -0
  394. package/dist/skills/zon-ui/references/components/table.md +999 -0
  395. package/dist/skills/zon-ui/references/components/tabs.md +258 -0
  396. package/dist/skills/zon-ui/references/components/tag.md +115 -0
  397. package/dist/skills/zon-ui/references/components/tags-input.md +216 -0
  398. package/dist/skills/zon-ui/references/components/textarea.md +95 -0
  399. package/dist/skills/zon-ui/references/components/theme-editor.md +3940 -0
  400. package/dist/skills/zon-ui/references/components/theme.md +362 -0
  401. package/dist/skills/zon-ui/references/components/time-field.md +222 -0
  402. package/dist/skills/zon-ui/references/components/timeline.md +285 -0
  403. package/dist/skills/zon-ui/references/components/tippy.md +243 -0
  404. package/dist/skills/zon-ui/references/components/toast.md +220 -0
  405. package/dist/skills/zon-ui/references/components/toggle-group.md +261 -0
  406. package/dist/skills/zon-ui/references/components/toggle.md +167 -0
  407. package/dist/skills/zon-ui/references/components/tool-call.md +146 -0
  408. package/dist/skills/zon-ui/references/components/toolbar.md +260 -0
  409. package/dist/skills/zon-ui/references/components/tooltip.md +172 -0
  410. package/dist/skills/zon-ui/references/components/tour.md +423 -0
  411. package/dist/skills/zon-ui/references/components/tree.md +481 -0
  412. package/dist/skills/zon-ui/references/components/typography.md +347 -0
  413. package/dist/skills/zon-ui/references/components/video-player.md +386 -0
  414. package/dist/skills/zon-ui/references/marketing.md +467 -0
  415. package/dist/skills/zon-ui/references/motion.md +455 -0
  416. package/dist/skills/zon-ui/references/recipes.md +1232 -0
  417. package/dist/skills/zon-ui/references/tokens.md +866 -0
  418. package/dist/sources/accordion.css +4 -0
  419. package/dist/sources/action-sheet.css +11 -0
  420. package/dist/sources/alert-dialog.css +6 -0
  421. package/dist/sources/alert.css +3 -0
  422. package/dist/sources/app-bar.css +14 -0
  423. package/dist/sources/ascii-field.css +3 -0
  424. package/dist/sources/aspect-ratio.css +3 -0
  425. package/dist/sources/audio-player.css +20 -0
  426. package/dist/sources/avatar.css +3 -0
  427. package/dist/sources/badge.css +3 -0
  428. package/dist/sources/bottom-nav.css +9 -0
  429. package/dist/sources/breadcrumb.css +14 -0
  430. package/dist/sources/button-group.css +3 -0
  431. package/dist/sources/button.css +9 -0
  432. package/dist/sources/calendar.css +13 -0
  433. package/dist/sources/card.css +3 -0
  434. package/dist/sources/carousel.css +11 -0
  435. package/dist/sources/chart.css +5 -0
  436. package/dist/sources/checkbox.css +6 -0
  437. package/dist/sources/code-block.css +13 -0
  438. package/dist/sources/collapsible.css +4 -0
  439. package/dist/sources/color-picker.css +13 -0
  440. package/dist/sources/combobox.css +13 -0
  441. package/dist/sources/command.css +13 -0
  442. package/dist/sources/context-menu.css +12 -0
  443. package/dist/sources/conversation.css +10 -0
  444. package/dist/sources/copy-button.css +10 -0
  445. package/dist/sources/data-table.css +27 -0
  446. package/dist/sources/date-picker.css +20 -0
  447. package/dist/sources/dialog.css +9 -0
  448. package/dist/sources/direction.css +2 -0
  449. package/dist/sources/drawer.css +9 -0
  450. package/dist/sources/drawing.css +5 -0
  451. package/dist/sources/empty.css +3 -0
  452. package/dist/sources/feature-list.css +4 -0
  453. package/dist/sources/field.css +4 -0
  454. package/dist/sources/file-drop.css +15 -0
  455. package/dist/sources/filter-bar.css +30 -0
  456. package/dist/sources/form.css +4 -0
  457. package/dist/sources/graph.css +19 -0
  458. package/dist/sources/illustration.css +28 -0
  459. package/dist/sources/input-group.css +7 -0
  460. package/dist/sources/input.css +3 -0
  461. package/dist/sources/item.css +4 -0
  462. package/dist/sources/kbd.css +5 -0
  463. package/dist/sources/label.css +3 -0
  464. package/dist/sources/layout.css +3 -0
  465. package/dist/sources/lightbox.css +33 -0
  466. package/dist/sources/locale.css +2 -0
  467. package/dist/sources/logo.css +4 -0
  468. package/dist/sources/markdown-editor.css +41 -0
  469. package/dist/sources/mentions.css +13 -0
  470. package/dist/sources/menu.css +11 -0
  471. package/dist/sources/menubar.css +14 -0
  472. package/dist/sources/message.css +16 -0
  473. package/dist/sources/meter.css +4 -0
  474. package/dist/sources/money-input.css +10 -0
  475. package/dist/sources/native-select.css +4 -0
  476. package/dist/sources/navigation-menu.css +8 -0
  477. package/dist/sources/number-field.css +8 -0
  478. package/dist/sources/number-roll.css +6 -0
  479. package/dist/sources/otp-field.css +5 -0
  480. package/dist/sources/pagination.css +11 -0
  481. package/dist/sources/pdf-viewer.css +30 -0
  482. package/dist/sources/phone-input.css +20 -0
  483. package/dist/sources/popover.css +7 -0
  484. package/dist/sources/preview-card.css +7 -0
  485. package/dist/sources/progress.css +4 -0
  486. package/dist/sources/prompt-input.css +15 -0
  487. package/dist/sources/pull-to-refresh.css +14 -0
  488. package/dist/sources/quote.css +3 -0
  489. package/dist/sources/radio-group.css +5 -0
  490. package/dist/sources/rating.css +6 -0
  491. package/dist/sources/reasoning.css +6 -0
  492. package/dist/sources/resizable.css +4 -0
  493. package/dist/sources/response.css +16 -0
  494. package/dist/sources/scheduler.css +44 -0
  495. package/dist/sources/scroll-area.css +3 -0
  496. package/dist/sources/select.css +12 -0
  497. package/dist/sources/separator.css +3 -0
  498. package/dist/sources/sidebar.css +19 -0
  499. package/dist/sources/site-header.css +15 -0
  500. package/dist/sources/skeleton.css +3 -0
  501. package/dist/sources/slider.css +6 -0
  502. package/dist/sources/sortable.css +12 -0
  503. package/dist/sources/sources.css +6 -0
  504. package/dist/sources/spinner.css +6 -0
  505. package/dist/sources/stat.css +9 -0
  506. package/dist/sources/stepper.css +6 -0
  507. package/dist/sources/suggestions.css +10 -0
  508. package/dist/sources/swipe-actions.css +20 -0
  509. package/dist/sources/switch.css +5 -0
  510. package/dist/sources/table.css +7 -0
  511. package/dist/sources/tabs.css +5 -0
  512. package/dist/sources/tag.css +3 -0
  513. package/dist/sources/tags-input.css +6 -0
  514. package/dist/sources/textarea.css +3 -0
  515. package/dist/sources/theme.css +13 -0
  516. package/dist/sources/time-field.css +7 -0
  517. package/dist/sources/timeline.css +7 -0
  518. package/dist/sources/tippy.css +6 -0
  519. package/dist/sources/toast.css +6 -0
  520. package/dist/sources/toggle-group.css +5 -0
  521. package/dist/sources/toggle.css +3 -0
  522. package/dist/sources/tool-call.css +16 -0
  523. package/dist/sources/toolbar.css +14 -0
  524. package/dist/sources/tooltip.css +6 -0
  525. package/dist/sources/tour.css +14 -0
  526. package/dist/sources/tree.css +6 -0
  527. package/dist/sources/typography.css +4 -0
  528. package/dist/sources/video-player.css +21 -0
  529. package/dist/styles/ai.css +3 -0
  530. package/dist/styles/brand.css +98 -0
  531. package/dist/styles/core.css +266 -0
  532. package/dist/styles/editor.css +3 -0
  533. package/dist/styles/expressive.css +35 -56
  534. package/dist/styles/fonts.css +61 -117
  535. package/dist/styles/graph.css +4 -0
  536. package/dist/styles/illustration.css +4 -0
  537. package/dist/styles/index.css +11 -201
  538. package/dist/styles/material.css +138 -12
  539. package/dist/styles/parts/ai.css +18 -13
  540. package/dist/styles/parts/brand.css +2 -2
  541. package/dist/styles/parts/controls.css +29 -20
  542. package/dist/styles/parts/data.css +13 -9
  543. package/dist/styles/parts/editor.css +372 -0
  544. package/dist/styles/parts/feedback.css +32 -2
  545. package/dist/styles/parts/foundations.css +12 -7
  546. package/dist/styles/parts/graph.css +25 -9
  547. package/dist/styles/parts/inputs.css +172 -9
  548. package/dist/styles/parts/isometric.css +6 -5
  549. package/dist/styles/parts/navigation.css +206 -27
  550. package/dist/styles/parts/overlays.css +19 -4
  551. package/dist/styles/parts/pdf.css +2 -2
  552. package/dist/styles/pdf.css +3 -0
  553. package/dist/styles/prose.css +3 -0
  554. package/dist/styles/tokens.css +89 -14
  555. package/dist/theme.d.ts +1 -0
  556. package/dist/theme.js +5 -0
  557. package/dist/vite.d.ts +48 -59
  558. package/dist/vite.js +54 -21
  559. package/package.json +69 -2
@@ -1,22 +1,29 @@
1
1
  const assistant = new URL("../../assets/illustrations/editorial/assistant.webp", import.meta.url).href;
2
- const assistantSmall = new URL("../../assets/illustrations/editorial/assistant-640.webp", import.meta.url).href;
2
+ const assistantSmall = new URL("../../assets/illustrations/editorial/assistant-640.webp", import.meta.url)
3
+ .href;
3
4
  const automation = new URL("../../assets/illustrations/editorial/automation.webp", import.meta.url).href;
4
- const automationSmall = new URL("../../assets/illustrations/editorial/automation-640.webp", import.meta.url).href;
5
+ const automationSmall = new URL("../../assets/illustrations/editorial/automation-640.webp", import.meta.url)
6
+ .href;
5
7
  const bracketLeft = new URL("../../assets/illustrations/editorial/bracket-left.webp", import.meta.url).href;
6
8
  const bracketLeftSmall = new URL("../../assets/illustrations/editorial/bracket-left-640.webp", import.meta.url).href;
7
9
  const bracketRight = new URL("../../assets/illustrations/editorial/bracket-right.webp", import.meta.url).href;
8
10
  const bracketRightSmall = new URL("../../assets/illustrations/editorial/bracket-right-640.webp", import.meta.url).href;
9
- const customSoftware = new URL("../../assets/illustrations/editorial/custom-software.webp", import.meta.url).href;
11
+ const customSoftware = new URL("../../assets/illustrations/editorial/custom-software.webp", import.meta.url)
12
+ .href;
10
13
  const customSoftwareSmall = new URL("../../assets/illustrations/editorial/custom-software-640.webp", import.meta.url).href;
11
- const digitalization = new URL("../../assets/illustrations/editorial/digitalization.webp", import.meta.url).href;
14
+ const digitalization = new URL("../../assets/illustrations/editorial/digitalization.webp", import.meta.url)
15
+ .href;
12
16
  const digitalizationSmall = new URL("../../assets/illustrations/editorial/digitalization-640.webp", import.meta.url).href;
13
17
  const integration = new URL("../../assets/illustrations/editorial/integration.webp", import.meta.url).href;
14
- const integrationSmall = new URL("../../assets/illustrations/editorial/integration-640.webp", import.meta.url).href;
18
+ const integrationSmall = new URL("../../assets/illustrations/editorial/integration-640.webp", import.meta.url)
19
+ .href;
15
20
  const problem = new URL("../../assets/illustrations/editorial/problem.webp", import.meta.url).href;
16
21
  const problemSmall = new URL("../../assets/illustrations/editorial/problem-640.webp", import.meta.url).href;
17
- const processAnalysis = new URL("../../assets/illustrations/editorial/process-analysis.webp", import.meta.url).href;
22
+ const processAnalysis = new URL("../../assets/illustrations/editorial/process-analysis.webp", import.meta.url)
23
+ .href;
18
24
  const processAnalysisSmall = new URL("../../assets/illustrations/editorial/process-analysis-640.webp", import.meta.url).href;
19
- const processConcept = new URL("../../assets/illustrations/editorial/process-concept.webp", import.meta.url).href;
25
+ const processConcept = new URL("../../assets/illustrations/editorial/process-concept.webp", import.meta.url)
26
+ .href;
20
27
  const processConceptSmall = new URL("../../assets/illustrations/editorial/process-concept-640.webp", import.meta.url).href;
21
28
  const processDevelopment = new URL("../../assets/illustrations/editorial/process-development.webp", import.meta.url).href;
22
29
  const processDevelopmentSmall = new URL("../../assets/illustrations/editorial/process-development-640.webp", import.meta.url).href;
@@ -26,7 +33,8 @@ const processMaintenance = new URL("../../assets/illustrations/editorial/process
26
33
  const processMaintenanceSmall = new URL("../../assets/illustrations/editorial/process-maintenance-640.webp", import.meta.url).href;
27
34
  const processPrototype = new URL("../../assets/illustrations/editorial/process-prototype.webp", import.meta.url).href;
28
35
  const processPrototypeSmall = new URL("../../assets/illustrations/editorial/process-prototype-640.webp", import.meta.url).href;
29
- const processTesting = new URL("../../assets/illustrations/editorial/process-testing.webp", import.meta.url).href;
36
+ const processTesting = new URL("../../assets/illustrations/editorial/process-testing.webp", import.meta.url)
37
+ .href;
30
38
  const processTestingSmall = new URL("../../assets/illustrations/editorial/process-testing-640.webp", import.meta.url).href;
31
39
  export const EDITORIAL_ASSETS = {
32
40
  assistant: { src: assistant, small: assistantSmall },
@@ -29,7 +29,12 @@ const figure = {
29
29
  x: bx,
30
30
  y: by,
31
31
  icon: (j + (side > 0 ? 1 : 2)) % 3,
32
- route: [...first, [a[0] + half * side * px, a[1] + half * side * py, 0.02], [a[0] + 3.6 * side * px, a[1] + 3.6 * side * py, 0.02], [bx - half * dx, by - half * dy, 0.02]],
32
+ route: [
33
+ ...first,
34
+ [a[0] + half * side * px, a[1] + half * side * py, 0.02],
35
+ [a[0] + 3.6 * side * px, a[1] + 3.6 * side * py, 0.02],
36
+ [bx - half * dx, by - half * dy, 0.02],
37
+ ],
33
38
  });
34
39
  }
35
40
  });
@@ -58,7 +63,13 @@ const figure = {
58
63
  const s = steps[p.i];
59
64
  const box = ctx.box(s.x - half, s.y - half, s.x + half, s.y + half, 0, th, { r: 0.25, b: 0.15 });
60
65
  // A bouncier spring for the hop on arrival: it lands.
61
- tiles[p.i] = { box, icon: ctx.path("crease", box.g), ring: ctx.path("hi", box.g), lift: new Spring(0), bump: new Spring(0, 170, 9) };
66
+ tiles[p.i] = {
67
+ box,
68
+ icon: ctx.path("crease", box.g),
69
+ ring: ctx.path("hi", box.g),
70
+ lift: new Spring(0),
71
+ bump: new Spring(0, 170, 9),
72
+ };
62
73
  }
63
74
  const mark = markOutline(2.0);
64
75
  // Idle, each step's pulse comes round once a long cycle (spread out, so only a few run at a
@@ -76,10 +87,16 @@ const figure = {
76
87
  t.box.draw(cam, [0, 0, z]);
77
88
  const f = topFace(cam, s.x - half, s.y - half, th + z);
78
89
  t.icon.attr("d", s.icon === 0
79
- ? faceRect(f, 0.62, 0.42, 0.86, 1.26, 0.08) + [0.75, 1.0, 1.25].map((v) => faceLine(f, [0.78, v], [1.32, v])).join("")
90
+ ? faceRect(f, 0.62, 0.42, 0.86, 1.26, 0.08) +
91
+ [0.75, 1.0, 1.25].map((v) => faceLine(f, [0.78, v], [1.32, v])).join("")
80
92
  : s.icon === 1
81
- ? faceRect(f, 0.45, 0.55, 1.2, 1.0, 0.08) + faceLine(f, [0.85, 0.55], [0.85, 1.55]) + faceLine(f, [1.25, 0.55], [1.25, 1.55]) + faceLine(f, [0.45, 1.05], [1.65, 1.05])
82
- : faceRect(f, 0.45, 0.6, 1.2, 0.9, 0.08) + faceLine(f, [0.45, 0.6], [1.05, 1.05]) + faceLine(f, [1.05, 1.05], [1.65, 0.6]));
93
+ ? faceRect(f, 0.45, 0.55, 1.2, 1.0, 0.08) +
94
+ faceLine(f, [0.85, 0.55], [0.85, 1.55]) +
95
+ faceLine(f, [1.25, 0.55], [1.25, 1.55]) +
96
+ faceLine(f, [0.45, 1.05], [1.65, 1.05])
97
+ : faceRect(f, 0.45, 0.6, 1.2, 0.9, 0.08) +
98
+ faceLine(f, [0.45, 0.6], [1.05, 1.05]) +
99
+ faceLine(f, [1.05, 1.05], [1.65, 0.6]));
83
100
  const since = clock - lit[i];
84
101
  t.box.hi(i === near);
85
102
  t.box.g.cls("lit", since < 0.5);
@@ -96,7 +113,9 @@ const figure = {
96
113
  });
97
114
  hub.draw(cam);
98
115
  const top = topFace(cam, -2, -2, 0.8);
99
- hubMark.attr("d", mark.map((m) => line(m.map(([u, v]) => top(1.0 + u, 1.0 + v)), true)).join(""));
116
+ hubMark.attr("d", mark
117
+ .map((m) => line(m.map(([u, v]) => top(1.0 + u, 1.0 + v)), true))
118
+ .join(""));
100
119
  };
101
120
  ctx.loop((dt) => {
102
121
  const p = ctx.pointer;
@@ -21,7 +21,12 @@ const figure = {
21
21
  const slots = ctx.path("guide");
22
22
  slots.attr("d", xs
23
23
  .map((x) => {
24
- const pts = [cam.P(x, 0.7, 0), cam.P(x + s, 0.7, 0), cam.P(x + s, 0.7 + s, 0), cam.P(x, 0.7 + s, 0)];
24
+ const pts = [
25
+ cam.P(x, 0.7, 0),
26
+ cam.P(x + s, 0.7, 0),
27
+ cam.P(x + s, 0.7 + s, 0),
28
+ cam.P(x, 0.7 + s, 0),
29
+ ];
25
30
  return `M${pts.map((p) => p.join(" ")).join("L")}Z`;
26
31
  })
27
32
  .join(""));
@@ -79,7 +79,10 @@ function prism(outline) {
79
79
  });
80
80
  }
81
81
  sides.sort((a, b) => a.key - b.key);
82
- return [...sides, { pts: outline.map(([x, z]) => [x, Y, z]), tone: "ink-left" }];
82
+ return [
83
+ ...sides,
84
+ { pts: outline.map(([x, z]) => [x, Y, z]), tone: "ink-left" },
85
+ ];
83
86
  }
84
87
  const figure = {
85
88
  mount(ctx) {
@@ -31,7 +31,14 @@ const figure = {
31
31
  if (j < 0 || hash(b.i * 7 + j) < 0.35)
32
32
  continue;
33
33
  const o = blds[j];
34
- links.push({ a: b.i, b: j, route: [[b.x, b.y, 0.02], [o.x, o.y, 0.02]] });
34
+ links.push({
35
+ a: b.i,
36
+ b: j,
37
+ route: [
38
+ [b.x, b.y, 0.02],
39
+ [o.x, o.y, 0.02],
40
+ ],
41
+ });
35
42
  }
36
43
  });
37
44
  const streets = ctx.path("guide");
@@ -41,7 +48,10 @@ const figure = {
41
48
  const boxes = [];
42
49
  const windows = [];
43
50
  for (const b of order) {
44
- const box = ctx.box(b.x - fs / 2, b.y - fs / 2, b.x + fs / 2, b.y + fs / 2, 0, b.h, { r: 0.25, b: 0.18 });
51
+ const box = ctx.box(b.x - fs / 2, b.y - fs / 2, b.x + fs / 2, b.y + fs / 2, 0, b.h, {
52
+ r: 0.25,
53
+ b: 0.18,
54
+ });
45
55
  boxes[b.i] = box;
46
56
  windows[b.i] = ctx.path("crease", box.g);
47
57
  }
@@ -39,8 +39,14 @@ const figure = {
39
39
  crates.push({ g, solid: ctx.solid(g), mark: ctx.path("mid", g) });
40
40
  }
41
41
  // The ram: a rod through the crossbar and a head that comes down on each crate.
42
- const rod = ctx.box(gate - 0.11, D / 2 - 0.11, gate + 0.11, D / 2 + 0.11, zt + 1.65, zt + 3.6, { r: 0.08, b: 0 });
43
- const head = ctx.box(gate - 0.62, D / 2 - 0.62, gate + 0.62, D / 2 + 0.62, zt + 1.3, zt + 1.65, { r: 0.15, b: 0.1 });
42
+ const rod = ctx.box(gate - 0.11, D / 2 - 0.11, gate + 0.11, D / 2 + 0.11, zt + 1.65, zt + 3.6, {
43
+ r: 0.08,
44
+ b: 0,
45
+ });
46
+ const head = ctx.box(gate - 0.62, D / 2 - 0.62, gate + 0.62, D / 2 + 0.62, zt + 1.3, zt + 1.65, {
47
+ r: 0.15,
48
+ b: 0.1,
49
+ });
44
50
  post(gate - 1.1, D - 0.07);
45
51
  post(gate + 0.7, D - 0.07);
46
52
  ctx.box(gate - 1.1, -0.35, gate + 1.12, D + 0.35, zt + 3.4, zt + 3.85, { r: 0.18, b: 0.12 }).draw(cam);
@@ -54,7 +60,10 @@ const figure = {
54
60
  const off = (clock * speed) % 1;
55
61
  const parts = [];
56
62
  for (let x = inX + off; x < L - 2; x += 1)
57
- parts.push(poly(cam, [[x, 0.2, zt], [x, D - 0.2, zt]]));
63
+ parts.push(poly(cam, [
64
+ [x, 0.2, zt],
65
+ [x, D - 0.2, zt],
66
+ ]));
58
67
  slats.attr("d", parts.join(""));
59
68
  let press = 0;
60
69
  const order = [];
@@ -77,7 +86,11 @@ const figure = {
77
86
  // Past the press, the lid carries the mark.
78
87
  const stamped = x0 + cs / 2 > gate + 0.05 && x0 + 0.15 > inX && x0 + cs - 0.1 < outX;
79
88
  const lid = topFace(cam, x0, y0, zt + ch);
80
- c.mark.attr("d", stamped ? mark.map((m) => line(m.map(([u, v]) => lid(0.28 + u, 0.3 + v * 0.75)), true)).join("") : null);
89
+ c.mark.attr("d", stamped
90
+ ? mark
91
+ .map((m) => line(m.map(([u, v]) => lid(0.28 + u, 0.3 + v * 0.75)), true))
92
+ .join("")
93
+ : null);
81
94
  press = Math.max(press, clamp(1 - Math.abs(x0 + cs / 2 - gate) / 0.55, 0, 1));
82
95
  order.push({ g: c.g, x: x0 });
83
96
  });
@@ -2,7 +2,7 @@
2
2
  * Database — three platters in a stack. The pointer's height opens the stack at that level: the
3
3
  * platters above lift clear, and the open platter's read arm is the bright line.
4
4
  */
5
- import { Spring, circle, falloff, fit, line } from "../kernel.js";
5
+ import { Spring, circle, falloff, fit, line, } from "../kernel.js";
6
6
  import { bandIndex } from "../parts.js";
7
7
  const figure = {
8
8
  mount(ctx) {
@@ -36,7 +36,10 @@ const figure = {
36
36
  p.solid.draw(cam, ring, inner, z0, z0 + h);
37
37
  const at = (pts) => pts.map(([x, y]) => cam.P(x, y, z0 + h));
38
38
  p.rings.attr("d", [1.55, 0.95, 0.42].map((rr) => line(at(circle(0, 0, rr, 32)), true)).join(""));
39
- p.arm.attr("d", line(at([[0.25, 0.55], [1.15, 1.75]])));
39
+ p.arm.attr("d", line(at([
40
+ [0.25, 0.55],
41
+ [1.15, 1.75],
42
+ ])));
40
43
  });
41
44
  // The read arm of the platter most open above is the bright line.
42
45
  const open = gaps[0].x >= gaps[1].x ? 0 : 1;
@@ -12,7 +12,10 @@ const SIGNATURE = (() => {
12
12
  const th = (i / n) * Math.PI * 2 * 6.5;
13
13
  // Loops of varying height and spacing, leaning a little, as a hand writes them.
14
14
  const amp = 0.1 + 0.07 * Math.abs(Math.sin(th * 0.41 + 0.6));
15
- out.push([0.062 * th - 0.075 * Math.sin(th) + 0.02 * Math.sin(th * 0.23), -amp * Math.cos(th) - 0.012 * th + 0.05]);
15
+ out.push([
16
+ 0.062 * th - 0.075 * Math.sin(th) + 0.02 * Math.sin(th * 0.23),
17
+ -amp * Math.cos(th) - 0.012 * th + 0.05,
18
+ ]);
16
19
  }
17
20
  for (let i = 1; i <= 12; i++) {
18
21
  const last = out[out.length - 1];
@@ -52,8 +55,13 @@ const figure = {
52
55
  const dx = slide.x;
53
56
  page.draw(cam, [dx, 0, dz]);
54
57
  const f = topFace(cam, dx, 0, dz + th);
55
- text.attr("d", faceRect(f, 0.5, 0.55, 1.5, 0.42, 0.1) + [1.45, 1.9, 2.35, 2.8, 3.25].map((v, k) => faceLine(f, [0.5, v], [k === 4 ? 2.3 : k % 2 ? 3.1 : 3.9, v])).join(""));
56
- signLine.attr("d", faceLine(f, [1.0, 4.85], [3.9, 4.85]) + faceLine(f, [0.62, 4.62], [0.82, 4.82]) + faceLine(f, [0.82, 4.62], [0.62, 4.82]));
58
+ text.attr("d", faceRect(f, 0.5, 0.55, 1.5, 0.42, 0.1) +
59
+ [1.45, 1.9, 2.35, 2.8, 3.25]
60
+ .map((v, k) => faceLine(f, [0.5, v], [k === 4 ? 2.3 : k % 2 ? 3.1 : 3.9, v]))
61
+ .join(""));
62
+ signLine.attr("d", faceLine(f, [1.0, 4.85], [3.9, 4.85]) +
63
+ faceLine(f, [0.62, 4.62], [0.82, 4.82]) +
64
+ faceLine(f, [0.82, 4.62], [0.62, 4.82]));
57
65
  const k = Math.round(clamp(ink.x, 0, 1) * (SIGNATURE.length - 1));
58
66
  signature.attr("d", k > 1 ? line(SIGNATURE.slice(0, k + 1).map(([u, v]) => f(1.1 + u, 4.75 + v))) : null);
59
67
  };
@@ -28,7 +28,8 @@ const figure = {
28
28
  ctx.box(0, 0, w, d, 0, eh, { r: 0.3, b: 0.2, parent: envG }).draw(cam);
29
29
  const seams = ctx.path("crease", envG);
30
30
  const top = topFace(cam, 0, 0, eh);
31
- seams.attr("d", faceLine(top, [0.2, d - 0.15], [w / 2, d * 0.45]) + faceLine(top, [w / 2, d * 0.45], [w - 0.2, d - 0.15]));
31
+ seams.attr("d", faceLine(top, [0.2, d - 0.15], [w / 2, d * 0.45]) +
32
+ faceLine(top, [w / 2, d * 0.45], [w - 0.2, d - 0.15]));
32
33
  const flapFrontG = ctx.g();
33
34
  const flapFront = ctx.solid(flapFrontG);
34
35
  const angle = new Spring(rest);
@@ -63,7 +64,9 @@ const figure = {
63
64
  letter.draw(cam, ring, null, lz, lz + 0.05);
64
65
  letter.hi(s > 0.5);
65
66
  const lt = topFace(cam, (w - lw) / 2, ly, lz + 0.05);
66
- letterMark.attr("d", mark.map((m) => line(m.map(([u, v]) => lt(0.5 + u, 0.45 + v)), true)).join("") +
67
+ letterMark.attr("d", mark
68
+ .map((m) => line(m.map(([u, v]) => lt(0.5 + u, 0.45 + v)), true))
69
+ .join("") +
67
70
  [1.6, 2.0, 2.4].map((v, k) => faceLine(lt, [0.5, v], [k === 2 ? 2.8 : 4.4, v])).join(""));
68
71
  // Past upright the flap lies behind the letter; before it, over the envelope (rule 06).
69
72
  ctx.root.order(angle.x > 90 ? [flapBackG, letterG, envG, flapFrontG] : [letterG, envG, flapFrontG, flapBackG]);
@@ -48,7 +48,9 @@ const figure = {
48
48
  const scr = rrect(0.35, 0.35, w - 0.35, lw - 0.55, 0.15, 3).map(([u, v]) => at(u, v, -0.001));
49
49
  frame.attr("d", facing ? line(scr, true) : null);
50
50
  screen.attr("d", facing
51
- ? [0.9, 1.55, 2.2].map((v) => line([at(0.8, lw - 0.55 - v, 0), at(v === 2.2 ? 3.4 : 4.9, lw - 0.55 - v, 0)])).join("")
51
+ ? [0.9, 1.55, 2.2]
52
+ .map((v) => line([at(0.8, lw - 0.55 - v, 0), at(v === 2.2 ? 3.4 : 4.9, lw - 0.55 - v, 0)]))
53
+ .join("")
52
54
  : null);
53
55
  // Past upright the lid stands behind the deck; before it, over it.
54
56
  ctx.root.order(angle.x > 90 ? [lidG, baseG] : [baseG, lidG]);
@@ -19,9 +19,22 @@ const figure = {
19
19
  ctx.box(0, 0, PW, PD, -0.4, 0, { r: 0.8, b: 0.5 }).draw(cam);
20
20
  // Feeds from the sources to the intake, painted on the platform.
21
21
  const feeds = [
22
- [[3.4, 2.3, 0.02], [5.4, 2.3, 0.02], [5.4, 6, 0.02], [7, 6, 0.02]],
23
- [[3.4, 6, 0.02], [7, 6, 0.02]],
24
- [[3.4, 9.4, 0.02], [5.4, 9.4, 0.02], [5.4, 6, 0.02], [7, 6, 0.02]],
22
+ [
23
+ [3.4, 2.3, 0.02],
24
+ [5.4, 2.3, 0.02],
25
+ [5.4, 6, 0.02],
26
+ [7, 6, 0.02],
27
+ ],
28
+ [
29
+ [3.4, 6, 0.02],
30
+ [7, 6, 0.02],
31
+ ],
32
+ [
33
+ [3.4, 9.4, 0.02],
34
+ [5.4, 9.4, 0.02],
35
+ [5.4, 6, 0.02],
36
+ [7, 6, 0.02],
37
+ ],
25
38
  ];
26
39
  ctx.path("guide").attr("d", feeds.map((f) => poly(cam, f)).join(""));
27
40
  const stages = [];
@@ -29,7 +42,11 @@ const figure = {
29
42
  stages.push(boxes);
30
43
  return boxes;
31
44
  };
32
- stage([ctx.box(1, 1.3, 3.4, 3.3, 0, 2.4, { r: 0.3, b: 0.2 }), ctx.box(1, 5, 3.4, 7, 0, 0.6, { r: 0.25, b: 0.15 }), ctx.box(1, 8.5, 3.4, 10.4, 0, 0.3, { r: 0.2, b: 0.12 })]);
45
+ stage([
46
+ ctx.box(1, 1.3, 3.4, 3.3, 0, 2.4, { r: 0.3, b: 0.2 }),
47
+ ctx.box(1, 5, 3.4, 7, 0, 0.6, { r: 0.25, b: 0.15 }),
48
+ ctx.box(1, 8.5, 3.4, 10.4, 0, 0.3, { r: 0.2, b: 0.12 }),
49
+ ]);
33
50
  // The processor behind the belt.
34
51
  const proc = ctx.solid();
35
52
  const procTop = ctx.path("crease");
@@ -56,15 +73,24 @@ const figure = {
56
73
  const g = ctx.g();
57
74
  blocks.push({ g, solid: ctx.solid(g), route: belt, k, n: 5, speed: 0.12, belt: true });
58
75
  }
59
- stage([ctx.box(7, 4.8, 9.6, 7.2, 0, 1.6, { r: 0.3, b: 0.2 }), ctx.box(6.8, 4.6, 9.8, 7.4, 1.6, 2.2, { r: 0.35, b: 0.25 })]);
60
- stage([ctx.box(14.1, 7.1, 14.6, 7.6, 0, 2.6, { r: 0.1, b: 0 }), ctx.box(13.95, 4.4, 14.75, 7.6, 2.6, 3.0, { r: 0.15, b: 0.1 })]);
76
+ stage([
77
+ ctx.box(7, 4.8, 9.6, 7.2, 0, 1.6, { r: 0.3, b: 0.2 }),
78
+ ctx.box(6.8, 4.6, 9.8, 7.4, 1.6, 2.2, { r: 0.35, b: 0.25 }),
79
+ ]);
80
+ stage([
81
+ ctx.box(14.1, 7.1, 14.6, 7.6, 0, 2.6, { r: 0.1, b: 0 }),
82
+ ctx.box(13.95, 4.4, 14.75, 7.6, 2.6, 3.0, { r: 0.15, b: 0.1 }),
83
+ ]);
61
84
  const beam = ctx.path("crease");
62
85
  const ware = [];
63
86
  const wareRing = circle(22.6, 6, 1.7, 36);
64
87
  const wareInner = circle(22.6, 6, 1.42, 36);
65
88
  const wareSolids = [0, 1, 2].map(() => ctx.solid());
66
89
  stage(ware);
67
- stage([ctx.box(26.2, 4.2, 29.4, 7.8, 0, 0.35, { r: 0.3, b: 0.2 }), ctx.box(26.5, 4.9, 29.1, 5.2, 0.35, 2.7, { r: 0.2, b: 0.1 })]);
90
+ stage([
91
+ ctx.box(26.2, 4.2, 29.4, 7.8, 0, 0.35, { r: 0.3, b: 0.2 }),
92
+ ctx.box(26.5, 4.9, 29.1, 5.2, 0.35, 2.7, { r: 0.2, b: 0.1 }),
93
+ ]);
68
94
  const chart = ctx.path("mid");
69
95
  let clock = 0;
70
96
  const vals = [0.4, 0.7, 0.55, 0.95, 0.8, 1.3, 1.5];
@@ -78,8 +104,16 @@ const figure = {
78
104
  });
79
105
  proc.draw(cam, circle(16.5, 2.4, 1.2, 32), circle(16.5, 2.4, 0.95, 32), 0, 2.6);
80
106
  const a = clock * 1.4;
81
- procTop.attr("d", poly(cam, [[16.5 - 0.8 * Math.cos(a), 2.4 - 0.8 * Math.sin(a), 2.6], [16.5 + 0.8 * Math.cos(a), 2.4 + 0.8 * Math.sin(a), 2.6]]));
82
- beam.attr("d", [5.3, 6, 6.7].map((y) => poly(cam, [[14.35, y, 2.6], [14.35, y, zr + 0.5]])).join(""));
107
+ procTop.attr("d", poly(cam, [
108
+ [16.5 - 0.8 * Math.cos(a), 2.4 - 0.8 * Math.sin(a), 2.6],
109
+ [16.5 + 0.8 * Math.cos(a), 2.4 + 0.8 * Math.sin(a), 2.6],
110
+ ]));
111
+ beam.attr("d", [5.3, 6, 6.7]
112
+ .map((y) => poly(cam, [
113
+ [14.35, y, 2.6],
114
+ [14.35, y, zr + 0.5],
115
+ ]))
116
+ .join(""));
83
117
  // Blocks: raw cubes before the scanner, flat tiles after; cut where they enter a machine (rule 06).
84
118
  for (const b of blocks) {
85
119
  const t = (clock * b.speed + b.k / b.n) % 1;
@@ -96,7 +130,8 @@ const figure = {
96
130
  b.solid.draw(cam, rrect(x0, y - s, x1, y + s, 0.08, 2), null, z, z + (done ? 0.12 : 0.5));
97
131
  }
98
132
  const f = frontFace(cam, 26.5, 5.2, 0.35);
99
- chart.attr("d", vals.map((v, i) => `${i ? "L" : "M"}${f(0.35 + i * 0.32, 0.4 + v).join(" ")}`).join("") + faceLine(f, [0.3, 0.35], [2.3, 0.35]));
133
+ chart.attr("d", vals.map((v, i) => `${i ? "L" : "M"}${f(0.35 + i * 0.32, 0.4 + v).join(" ")}`).join("") +
134
+ faceLine(f, [0.3, 0.35], [2.3, 0.35]));
100
135
  };
101
136
  let next = 0;
102
137
  ctx.loop((dt) => {
@@ -4,7 +4,20 @@
4
4
  */
5
5
  import { Spring, falloff, fit, line } from "../kernel.js";
6
6
  import { markOutline, poly, topFace } from "../parts.js";
7
- const HEIGHTS = { "0-0": 1.2, "1-0": 0.9, "2-0": 2.4, "3-0": 1.5, "0-1": 0.8, "3-1": 1.0, "0-2": 1.9, "3-2": 1.3, "0-3": 1.7, "1-3": 0.7, "2-3": 1.1, "3-3": 2.0 };
7
+ const HEIGHTS = {
8
+ "0-0": 1.2,
9
+ "1-0": 0.9,
10
+ "2-0": 2.4,
11
+ "3-0": 1.5,
12
+ "0-1": 0.8,
13
+ "3-1": 1.0,
14
+ "0-2": 1.9,
15
+ "3-2": 1.3,
16
+ "0-3": 1.7,
17
+ "1-3": 0.7,
18
+ "2-3": 1.1,
19
+ "3-3": 2.0,
20
+ };
8
21
  const figure = {
9
22
  mount(ctx) {
10
23
  const n = 4;
@@ -19,11 +32,19 @@ const figure = {
19
32
  ], 28);
20
33
  for (let y = 0; y < n; y++)
21
34
  for (let x = 0; x < n; x++)
22
- ctx.box(x * t + gap / 2, y * t + gap / 2, (x + 1) * t - gap / 2, (y + 1) * t - gap / 2, -0.5, 0, { r: 0.25, b: 0.15 }).draw(cam);
35
+ ctx
36
+ .box(x * t + gap / 2, y * t + gap / 2, (x + 1) * t - gap / 2, (y + 1) * t - gap / 2, -0.5, 0, {
37
+ r: 0.25,
38
+ b: 0.15,
39
+ })
40
+ .draw(cam);
23
41
  const ghost = ctx.path("guide");
24
42
  const ids = Object.keys(HEIGHTS);
25
43
  const at = (id) => id.split("-").map(Number);
26
- const pieces = [...ids.map((id) => ({ id, depth: at(id)[0] + at(id)[1] })), { id: "core", depth: 2.9 }].sort((a, b) => a.depth - b.depth);
44
+ const pieces = [
45
+ ...ids.map((id) => ({ id, depth: at(id)[0] + at(id)[1] })),
46
+ { id: "core", depth: 2.9 },
47
+ ].sort((a, b) => a.depth - b.depth);
27
48
  const modules = new Map();
28
49
  let core;
29
50
  const coreMark = ctx.path("mid");
@@ -34,7 +55,16 @@ const figure = {
34
55
  continue;
35
56
  }
36
57
  const [x, y] = at(p.id);
37
- modules.set(p.id, { box: ctx.box(x * t + 0.45, y * t + 0.45, x * t + t - 0.45, y * t + t - 0.45, 0, HEIGHTS[p.id], { r: 0.22, b: 0.15 }), lift: new Spring(0), drop: new Spring(0), leave: new Spring(0), leaving: false });
58
+ modules.set(p.id, {
59
+ box: ctx.box(x * t + 0.45, y * t + 0.45, x * t + t - 0.45, y * t + t - 0.45, 0, HEIGHTS[p.id], {
60
+ r: 0.22,
61
+ b: 0.15,
62
+ }),
63
+ lift: new Spring(0),
64
+ drop: new Spring(0),
65
+ leave: new Spring(0),
66
+ leaving: false,
67
+ });
38
68
  }
39
69
  const outline = markOutline(1.6);
40
70
  let hover = null;
@@ -78,12 +108,37 @@ const figure = {
78
108
  }
79
109
  core.draw(cam);
80
110
  const top = topFace(cam, 2.35, 2.35, 1.5);
81
- coreMark.attr("d", outline.map((o) => line(o.map(([u, v]) => top(0.95 + u, 0.85 + v)), true)).join(""));
111
+ coreMark.attr("d", outline
112
+ .map((o) => line(o.map(([u, v]) => top(0.95 + u, 0.85 + v)), true))
113
+ .join(""));
82
114
  // Over an empty tile, the module that would go there waits as an outline.
83
115
  if (hover && !on.has(hover)) {
84
116
  const [x, y] = at(hover);
85
- const [x0, y0, x1, y1, h] = [x * t + 0.45, y * t + 0.45, x * t + t - 0.45, y * t + t - 0.45, HEIGHTS[hover]];
86
- ghost.attr("d", poly(cam, [[x0, y1, 0], [x1, y1, 0], [x1, y0, 0], [x1, y0, h], [x0, y0, h], [x0, y1, h], [x0, y1, 0]]) + poly(cam, [[x0, y1, h], [x1, y1, h], [x1, y0, h]]) + poly(cam, [[x1, y1, 0], [x1, y1, h]]));
117
+ const [x0, y0, x1, y1, h] = [
118
+ x * t + 0.45,
119
+ y * t + 0.45,
120
+ x * t + t - 0.45,
121
+ y * t + t - 0.45,
122
+ HEIGHTS[hover],
123
+ ];
124
+ ghost.attr("d", poly(cam, [
125
+ [x0, y1, 0],
126
+ [x1, y1, 0],
127
+ [x1, y0, 0],
128
+ [x1, y0, h],
129
+ [x0, y0, h],
130
+ [x0, y1, h],
131
+ [x0, y1, 0],
132
+ ]) +
133
+ poly(cam, [
134
+ [x0, y1, h],
135
+ [x1, y1, h],
136
+ [x1, y0, h],
137
+ ]) +
138
+ poly(cam, [
139
+ [x1, y1, 0],
140
+ [x1, y1, h],
141
+ ]));
87
142
  }
88
143
  else
89
144
  ghost.attr("d", null);
@@ -41,7 +41,11 @@ const figure = {
41
41
  const inside = ctx.path("crease", tray);
42
42
  const fanRings = ctx.path("mid", tray);
43
43
  const blades = ctx.path("crease", tray);
44
- const rams = [0, 1, 2, 3].map((k) => ctx.box(4.0 + k * 0.22, 0.5, 4.1 + k * 0.22, 2.5, zTop + 0.08, zTop + 0.62, { r: 0.03, b: 0, parent: tray }));
44
+ const rams = [0, 1, 2, 3].map((k) => ctx.box(4.0 + k * 0.22, 0.5, 4.1 + k * 0.22, 2.5, zTop + 0.08, zTop + 0.62, {
45
+ r: 0.03,
46
+ b: 0,
47
+ parent: tray,
48
+ }));
45
49
  const rightWall = ctx.box(w - t, t, w, d - t, zTop, zTop + h - 0.1, { r: 0.04, b: 0, parent: tray });
46
50
  const panel = ctx.box(0, d - t, w, d, zTop, zTop + h, { r: 0.08, b: 0, parent: tray });
47
51
  const topFront = frontParts(panel.g);
@@ -51,7 +55,9 @@ const figure = {
51
55
  const lift = new Spring(0);
52
56
  let angle = 0;
53
57
  // Rest bands (rule 01): each unit's front centre, and the lid's top centre, in frame y.
54
- const bands = [0, 1, 2].map((i) => cam.P(w / 2, d, i * (h + gap) + h / 2)[1]).concat(cam.P(w / 2, d / 2, zTop + h)[1]);
58
+ const bands = [0, 1, 2]
59
+ .map((i) => cam.P(w / 2, d, i * (h + gap) + h / 2)[1])
60
+ .concat(cam.P(w / 2, d / 2, zTop + h)[1]);
55
61
  const draw = () => {
56
62
  units.forEach((u, i) => {
57
63
  const o = out[i].x;
@@ -64,14 +70,24 @@ const figure = {
64
70
  leftWall.draw(cam, dd);
65
71
  floor.draw(cam, dd);
66
72
  const z0 = zTop + 0.08;
67
- inside.attr("d", poly(cam, [[0.35, 0.35 + o, z0], [w - 0.35, 0.35 + o, z0], [w - 0.35, d - 0.4 + o, z0], [0.35, d - 0.4 + o, z0]], true));
73
+ inside.attr("d", poly(cam, [
74
+ [0.35, 0.35 + o, z0],
75
+ [w - 0.35, 0.35 + o, z0],
76
+ [w - 0.35, d - 0.4 + o, z0],
77
+ [0.35, d - 0.4 + o, z0],
78
+ ], true));
68
79
  const fans = [1.05, 2.4].map((cx) => [cx, 1.35 + o]);
69
- fanRings.attr("d", fans.map(([cx, cy]) => line(Array.from({ length: 24 }, (_, k) => cam.P(cx + 0.55 * Math.cos((k / 24) * 6.283), cy + 0.55 * Math.sin((k / 24) * 6.283), z0)), true)).join(""));
80
+ fanRings.attr("d", fans
81
+ .map(([cx, cy]) => line(Array.from({ length: 24 }, (_, k) => cam.P(cx + 0.55 * Math.cos((k / 24) * 6.283), cy + 0.55 * Math.sin((k / 24) * 6.283), z0)), true))
82
+ .join(""));
70
83
  blades.attr("d", fans
71
84
  .map(([cx, cy]) => [0, 1, 2, 3, 4]
72
85
  .map((k) => {
73
86
  const a = angle + (k / 5) * 6.283;
74
- return poly(cam, [[cx + 0.1 * Math.cos(a), cy + 0.1 * Math.sin(a), z0], [cx + 0.48 * Math.cos(a + 0.5), cy + 0.48 * Math.sin(a + 0.5), z0]]);
87
+ return poly(cam, [
88
+ [cx + 0.1 * Math.cos(a), cy + 0.1 * Math.sin(a), z0],
89
+ [cx + 0.48 * Math.cos(a + 0.5), cy + 0.48 * Math.sin(a + 0.5), z0],
90
+ ]);
75
91
  })
76
92
  .join(""))
77
93
  .join(""));
@@ -31,7 +31,12 @@ const figure = {
31
31
  const lx = ix + loose.c * cw;
32
32
  const ly = hy + loose.r * rh;
33
33
  const hole = ctx.path("guide");
34
- hole.attr("d", poly(cam, [[lx + 0.06, ly + 0.06, zs], [lx + cw - 0.06, ly + 0.06, zs], [lx + cw - 0.06, ly + rh - 0.06, zs], [lx + 0.06, ly + rh - 0.06, zs]], true));
34
+ hole.attr("d", poly(cam, [
35
+ [lx + 0.06, ly + 0.06, zs],
36
+ [lx + cw - 0.06, ly + 0.06, zs],
37
+ [lx + cw - 0.06, ly + rh - 0.06, zs],
38
+ [lx + 0.06, ly + rh - 0.06, zs],
39
+ ], true));
35
40
  const cells = [];
36
41
  for (let k = 0; k < cols + rows - 1; k++)
37
42
  for (let c = 0; c < cols; c++) {
@@ -40,11 +45,25 @@ const figure = {
40
45
  continue;
41
46
  const x = ix + c * cw;
42
47
  const y = hy + r * rh;
43
- const box = ctx.box(x + 0.07, y + 0.07, x + cw - 0.07, y + rh - 0.07, zs, zs + 0.1, { r: 0.08, b: 0 });
44
- cells.push({ box, mark: ctx.path("crease", box.g), x: x + cw / 2, y: y + rh / 2, s: new Spring(0), c, r });
48
+ const box = ctx.box(x + 0.07, y + 0.07, x + cw - 0.07, y + rh - 0.07, zs, zs + 0.1, {
49
+ r: 0.08,
50
+ b: 0,
51
+ });
52
+ cells.push({
53
+ box,
54
+ mark: ctx.path("crease", box.g),
55
+ x: x + cw / 2,
56
+ y: y + rh / 2,
57
+ s: new Spring(0),
58
+ c,
59
+ r,
60
+ });
45
61
  }
46
62
  const tether = ctx.path("guide");
47
- const cellBox = ctx.box(lx + 0.07, ly + 0.07, lx + cw - 0.07, ly + rh - 0.07, zs, zs + 0.45, { r: 0.1, b: 0.08 });
63
+ const cellBox = ctx.box(lx + 0.07, ly + 0.07, lx + cw - 0.07, ly + rh - 0.07, zs, zs + 0.45, {
64
+ r: 0.1,
65
+ b: 0.08,
66
+ });
48
67
  const cellMark = ctx.path("crease", cellBox.g);
49
68
  const height = new Spring(float);
50
69
  const draw = () => {
@@ -57,7 +76,12 @@ const figure = {
57
76
  const hz = height.x;
58
77
  cellBox.draw(cam, [0, 0, hz]);
59
78
  cellMark.attr("d", faceLine(topFace(cam, lx, ly, zs + 0.45 + hz), [0.3, rh / 2], [0.8, rh / 2]));
60
- tether.attr("d", hz > 0.05 ? poly(cam, [[lx + cw / 2, ly + rh / 2, zs], [lx + cw / 2, ly + rh / 2, zs + hz]]) : null);
79
+ tether.attr("d", hz > 0.05
80
+ ? poly(cam, [
81
+ [lx + cw / 2, ly + rh / 2, zs],
82
+ [lx + cw / 2, ly + rh / 2, zs + hz],
83
+ ])
84
+ : null);
61
85
  // While it floats, the loose cell is the bright one; once it is back, nothing needs looking at.
62
86
  cellBox.hi(hz > 0.25);
63
87
  };
@@ -51,9 +51,11 @@ export declare class Spring {
51
51
  /** Advance; false once it has settled. */
52
52
  step(dt: number, snap?: boolean): boolean;
53
53
  }
54
- /** cubic-bezier(.32, .72, 0, 1): the long ease-out for which part is chosen (rule 08). */
54
+ /** --duration-settle (tokens.css): how long the choice of a part takes to settle (rule 08). */
55
+ export declare const SETTLE_MS = 700;
56
+ /** The --ease curve as a function of progress: the long ease-out for which part is chosen (rule 08). */
55
57
  export declare function settle(p: number): number;
56
- /** A tween for which part is chosen: 700ms on `settle`, with an optional delay (rule 02). */
58
+ /** A tween for which part is chosen: SETTLE_MS on `settle`, with an optional delay (rule 02). */
57
59
  export declare class Tween {
58
60
  from: number;
59
61
  to: number;