@prestack/thread-ui 0.0.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 (408) hide show
  1. package/CHANGELOG.md +348 -0
  2. package/dist/attach.d.ts +1 -0
  3. package/dist/attach.js +1 -0
  4. package/dist/ui/animations/anm_appear.d.ts +16 -0
  5. package/dist/ui/animations/anm_appear.js +10 -0
  6. package/dist/ui/animations/anm_blur_in.d.ts +22 -0
  7. package/dist/ui/animations/anm_blur_in.js +16 -0
  8. package/dist/ui/animations/anm_blur_out.d.ts +22 -0
  9. package/dist/ui/animations/anm_blur_out.js +16 -0
  10. package/dist/ui/animations/anm_dismiss.d.ts +22 -0
  11. package/dist/ui/animations/anm_dismiss.js +16 -0
  12. package/dist/ui/animations/anm_drop.d.ts +22 -0
  13. package/dist/ui/animations/anm_drop.js +16 -0
  14. package/dist/ui/animations/anm_fall.d.ts +22 -0
  15. package/dist/ui/animations/anm_fall.js +16 -0
  16. package/dist/ui/animations/anm_flash.d.ts +19 -0
  17. package/dist/ui/animations/anm_flash.js +16 -0
  18. package/dist/ui/animations/anm_glow.d.ts +16 -0
  19. package/dist/ui/animations/anm_glow.js +14 -0
  20. package/dist/ui/animations/anm_lift.d.ts +16 -0
  21. package/dist/ui/animations/anm_lift.js +14 -0
  22. package/dist/ui/animations/anm_nudge.d.ts +16 -0
  23. package/dist/ui/animations/anm_nudge.js +14 -0
  24. package/dist/ui/animations/anm_pop_in.d.ts +29 -0
  25. package/dist/ui/animations/anm_pop_in.js +20 -0
  26. package/dist/ui/animations/anm_pop_out.d.ts +29 -0
  27. package/dist/ui/animations/anm_pop_out.js +20 -0
  28. package/dist/ui/animations/anm_press.d.ts +19 -0
  29. package/dist/ui/animations/anm_press.js +10 -0
  30. package/dist/ui/animations/anm_pulse.d.ts +20 -0
  31. package/dist/ui/animations/anm_pulse.js +11 -0
  32. package/dist/ui/animations/anm_rise.d.ts +22 -0
  33. package/dist/ui/animations/anm_rise.js +16 -0
  34. package/dist/ui/animations/anm_shake.d.ts +23 -0
  35. package/dist/ui/animations/anm_shake.js +11 -0
  36. package/dist/ui/animations/anm_slide_in_left.d.ts +22 -0
  37. package/dist/ui/animations/anm_slide_in_left.js +16 -0
  38. package/dist/ui/animations/anm_slide_in_right.d.ts +22 -0
  39. package/dist/ui/animations/anm_slide_in_right.js +16 -0
  40. package/dist/ui/animations/anm_slide_out_left.d.ts +22 -0
  41. package/dist/ui/animations/anm_slide_out_left.js +16 -0
  42. package/dist/ui/animations/anm_slide_out_right.d.ts +22 -0
  43. package/dist/ui/animations/anm_slide_out_right.js +16 -0
  44. package/dist/ui/animations/anm_spin.d.ts +16 -0
  45. package/dist/ui/animations/anm_spin.js +10 -0
  46. package/dist/ui/animations/anm_swell.d.ts +16 -0
  47. package/dist/ui/animations/anm_swell.js +14 -0
  48. package/dist/ui/animations/anm_wobble.d.ts +27 -0
  49. package/dist/ui/animations/anm_wobble.js +22 -0
  50. package/dist/ui/animations/anm_zoom_in.d.ts +22 -0
  51. package/dist/ui/animations/anm_zoom_in.js +16 -0
  52. package/dist/ui/animations/anm_zoom_out.d.ts +22 -0
  53. package/dist/ui/animations/anm_zoom_out.js +16 -0
  54. package/dist/ui/animations.d.ts +59 -0
  55. package/dist/ui/animations.js +227 -0
  56. package/dist/ui/attach.d.ts +3 -0
  57. package/dist/ui/attach.js +497 -0
  58. package/dist/ui/charts.d.ts +32 -0
  59. package/dist/ui/charts.js +35 -0
  60. package/dist/ui/checked.d.ts +19 -0
  61. package/dist/ui/checked.js +3 -0
  62. package/dist/ui/collector.d.ts +32 -0
  63. package/dist/ui/collector.js +75 -0
  64. package/dist/ui/compositions.d.ts +21 -0
  65. package/dist/ui/compositions.js +305 -0
  66. package/dist/ui/consent.d.ts +22 -0
  67. package/dist/ui/consent.js +44 -0
  68. package/dist/ui/content.d.ts +9 -0
  69. package/dist/ui/content.js +11 -0
  70. package/dist/ui/contrast.d.ts +3 -0
  71. package/dist/ui/contrast.js +23 -0
  72. package/dist/ui/controls.d.ts +14 -0
  73. package/dist/ui/controls.js +2 -0
  74. package/dist/ui/disclosure.d.ts +14 -0
  75. package/dist/ui/disclosure.js +2 -0
  76. package/dist/ui/dismiss-layer.d.ts +14 -0
  77. package/dist/ui/dismiss-layer.js +66 -0
  78. package/dist/ui/door.d.ts +40 -0
  79. package/dist/ui/door.js +100 -0
  80. package/dist/ui/drag.d.ts +82 -0
  81. package/dist/ui/drag.js +212 -0
  82. package/dist/ui/elements/accordion.d.ts +12 -0
  83. package/dist/ui/elements/accordion.js +16 -0
  84. package/dist/ui/elements/accordion.works.d.ts +22 -0
  85. package/dist/ui/elements/accordion.works.js +44 -0
  86. package/dist/ui/elements/aspect-ratio.d.ts +10 -0
  87. package/dist/ui/elements/aspect-ratio.js +9 -0
  88. package/dist/ui/elements/aspect-ratio.works.d.ts +2 -0
  89. package/dist/ui/elements/aspect-ratio.works.js +3 -0
  90. package/dist/ui/elements/avatar.d.ts +11 -0
  91. package/dist/ui/elements/avatar.js +10 -0
  92. package/dist/ui/elements/avatar.works.d.ts +4 -0
  93. package/dist/ui/elements/avatar.works.js +16 -0
  94. package/dist/ui/elements/badge.d.ts +11 -0
  95. package/dist/ui/elements/badge.js +10 -0
  96. package/dist/ui/elements/badge.works.d.ts +5 -0
  97. package/dist/ui/elements/badge.works.js +6 -0
  98. package/dist/ui/elements/bars.d.ts +14 -0
  99. package/dist/ui/elements/bars.js +17 -0
  100. package/dist/ui/elements/bars.works.d.ts +12 -0
  101. package/dist/ui/elements/bars.works.js +20 -0
  102. package/dist/ui/elements/box.d.ts +12 -0
  103. package/dist/ui/elements/box.js +11 -0
  104. package/dist/ui/elements/breadcrumb.d.ts +10 -0
  105. package/dist/ui/elements/breadcrumb.js +12 -0
  106. package/dist/ui/elements/breadcrumb.works.d.ts +7 -0
  107. package/dist/ui/elements/breadcrumb.works.js +21 -0
  108. package/dist/ui/elements/button.d.ts +17 -0
  109. package/dist/ui/elements/button.js +16 -0
  110. package/dist/ui/elements/button.works.d.ts +17 -0
  111. package/dist/ui/elements/button.works.js +34 -0
  112. package/dist/ui/elements/column.d.ts +9 -0
  113. package/dist/ui/elements/column.js +8 -0
  114. package/dist/ui/elements/consent.d.ts +13 -0
  115. package/dist/ui/elements/consent.js +21 -0
  116. package/dist/ui/elements/consent.works.d.ts +41 -0
  117. package/dist/ui/elements/consent.works.js +79 -0
  118. package/dist/ui/elements/donut.d.ts +13 -0
  119. package/dist/ui/elements/donut.js +16 -0
  120. package/dist/ui/elements/donut.works.d.ts +11 -0
  121. package/dist/ui/elements/donut.works.js +28 -0
  122. package/dist/ui/elements/each.d.ts +14 -0
  123. package/dist/ui/elements/each.js +9 -0
  124. package/dist/ui/elements/each.works.d.ts +3 -0
  125. package/dist/ui/elements/each.works.js +68 -0
  126. package/dist/ui/elements/empty.d.ts +9 -0
  127. package/dist/ui/elements/empty.js +12 -0
  128. package/dist/ui/elements/field.d.ts +16 -0
  129. package/dist/ui/elements/field.js +15 -0
  130. package/dist/ui/elements/field.works.d.ts +17 -0
  131. package/dist/ui/elements/field.works.js +45 -0
  132. package/dist/ui/elements/funnel.d.ts +14 -0
  133. package/dist/ui/elements/funnel.js +17 -0
  134. package/dist/ui/elements/funnel.works.d.ts +12 -0
  135. package/dist/ui/elements/funnel.works.js +23 -0
  136. package/dist/ui/elements/gauge.d.ts +12 -0
  137. package/dist/ui/elements/gauge.js +15 -0
  138. package/dist/ui/elements/gauge.works.d.ts +11 -0
  139. package/dist/ui/elements/gauge.works.js +31 -0
  140. package/dist/ui/elements/glyph.d.ts +10 -0
  141. package/dist/ui/elements/glyph.js +9 -0
  142. package/dist/ui/elements/glyph.works.d.ts +5 -0
  143. package/dist/ui/elements/glyph.works.js +16 -0
  144. package/dist/ui/elements/grid.d.ts +9 -0
  145. package/dist/ui/elements/grid.js +8 -0
  146. package/dist/ui/elements/heatmap.d.ts +15 -0
  147. package/dist/ui/elements/heatmap.js +17 -0
  148. package/dist/ui/elements/heatmap.works.d.ts +11 -0
  149. package/dist/ui/elements/heatmap.works.js +11 -0
  150. package/dist/ui/elements/hit-box.d.ts +19 -0
  151. package/dist/ui/elements/hit-box.js +15 -0
  152. package/dist/ui/elements/hit-box.works.d.ts +87 -0
  153. package/dist/ui/elements/hit-box.works.js +451 -0
  154. package/dist/ui/elements/image.d.ts +10 -0
  155. package/dist/ui/elements/image.js +9 -0
  156. package/dist/ui/elements/line-chart.d.ts +13 -0
  157. package/dist/ui/elements/line-chart.js +16 -0
  158. package/dist/ui/elements/line-chart.works.d.ts +12 -0
  159. package/dist/ui/elements/line-chart.works.js +27 -0
  160. package/dist/ui/elements/link.d.ts +12 -0
  161. package/dist/ui/elements/link.js +15 -0
  162. package/dist/ui/elements/link.works.d.ts +10 -0
  163. package/dist/ui/elements/link.works.js +15 -0
  164. package/dist/ui/elements/media.d.ts +11 -0
  165. package/dist/ui/elements/media.js +22 -0
  166. package/dist/ui/elements/menu.d.ts +12 -0
  167. package/dist/ui/elements/menu.js +18 -0
  168. package/dist/ui/elements/menu.works.d.ts +50 -0
  169. package/dist/ui/elements/menu.works.js +100 -0
  170. package/dist/ui/elements/money.d.ts +10 -0
  171. package/dist/ui/elements/money.js +9 -0
  172. package/dist/ui/elements/money.works.d.ts +4 -0
  173. package/dist/ui/elements/money.works.js +4 -0
  174. package/dist/ui/elements/pagination.d.ts +11 -0
  175. package/dist/ui/elements/pagination.js +12 -0
  176. package/dist/ui/elements/pagination.works.d.ts +5 -0
  177. package/dist/ui/elements/pagination.works.js +15 -0
  178. package/dist/ui/elements/progress.d.ts +11 -0
  179. package/dist/ui/elements/progress.js +11 -0
  180. package/dist/ui/elements/progress.works.d.ts +2 -0
  181. package/dist/ui/elements/progress.works.js +6 -0
  182. package/dist/ui/elements/radio-group.d.ts +15 -0
  183. package/dist/ui/elements/radio-group.js +16 -0
  184. package/dist/ui/elements/radio-group.works.d.ts +10 -0
  185. package/dist/ui/elements/radio-group.works.js +22 -0
  186. package/dist/ui/elements/row.d.ts +9 -0
  187. package/dist/ui/elements/row.js +8 -0
  188. package/dist/ui/elements/scatter.d.ts +13 -0
  189. package/dist/ui/elements/scatter.js +15 -0
  190. package/dist/ui/elements/scatter.works.d.ts +11 -0
  191. package/dist/ui/elements/scatter.works.js +24 -0
  192. package/dist/ui/elements/select.d.ts +13 -0
  193. package/dist/ui/elements/select.js +11 -0
  194. package/dist/ui/elements/select.works.d.ts +4 -0
  195. package/dist/ui/elements/select.works.js +3 -0
  196. package/dist/ui/elements/separator.d.ts +10 -0
  197. package/dist/ui/elements/separator.js +9 -0
  198. package/dist/ui/elements/skeleton.d.ts +8 -0
  199. package/dist/ui/elements/skeleton.js +9 -0
  200. package/dist/ui/elements/slider.d.ts +14 -0
  201. package/dist/ui/elements/slider.js +10 -0
  202. package/dist/ui/elements/slider.works.d.ts +4 -0
  203. package/dist/ui/elements/slider.works.js +3 -0
  204. package/dist/ui/elements/sparkline.d.ts +10 -0
  205. package/dist/ui/elements/sparkline.js +15 -0
  206. package/dist/ui/elements/sparkline.works.d.ts +10 -0
  207. package/dist/ui/elements/sparkline.works.js +19 -0
  208. package/dist/ui/elements/spinner.d.ts +9 -0
  209. package/dist/ui/elements/spinner.js +12 -0
  210. package/dist/ui/elements/stack.d.ts +9 -0
  211. package/dist/ui/elements/stack.js +8 -0
  212. package/dist/ui/elements/stat.d.ts +12 -0
  213. package/dist/ui/elements/stat.js +10 -0
  214. package/dist/ui/elements/stat.works.d.ts +3 -0
  215. package/dist/ui/elements/stat.works.js +10 -0
  216. package/dist/ui/elements/surface.d.ts +9 -0
  217. package/dist/ui/elements/surface.js +15 -0
  218. package/dist/ui/elements/surface.works.d.ts +7 -0
  219. package/dist/ui/elements/surface.works.js +4 -0
  220. package/dist/ui/elements/table.d.ts +13 -0
  221. package/dist/ui/elements/table.js +16 -0
  222. package/dist/ui/elements/table.works.d.ts +11 -0
  223. package/dist/ui/elements/table.works.js +15 -0
  224. package/dist/ui/elements/tabs.d.ts +12 -0
  225. package/dist/ui/elements/tabs.js +16 -0
  226. package/dist/ui/elements/tabs.works.d.ts +25 -0
  227. package/dist/ui/elements/tabs.works.js +53 -0
  228. package/dist/ui/elements/text.d.ts +13 -0
  229. package/dist/ui/elements/text.js +9 -0
  230. package/dist/ui/elements/textarea.d.ts +14 -0
  231. package/dist/ui/elements/textarea.js +11 -0
  232. package/dist/ui/elements/textarea.works.d.ts +4 -0
  233. package/dist/ui/elements/textarea.works.js +3 -0
  234. package/dist/ui/elements/time.d.ts +11 -0
  235. package/dist/ui/elements/time.js +14 -0
  236. package/dist/ui/elements/time.works.d.ts +11 -0
  237. package/dist/ui/elements/time.works.js +16 -0
  238. package/dist/ui/elements/toggle.d.ts +11 -0
  239. package/dist/ui/elements/toggle.js +10 -0
  240. package/dist/ui/elements/toggle.works.d.ts +4 -0
  241. package/dist/ui/elements/toggle.works.js +3 -0
  242. package/dist/ui/elements/tooltip.d.ts +12 -0
  243. package/dist/ui/elements/tooltip.js +15 -0
  244. package/dist/ui/elements/tooltip.works.d.ts +28 -0
  245. package/dist/ui/elements/tooltip.works.js +54 -0
  246. package/dist/ui/elements/value.d.ts +12 -0
  247. package/dist/ui/elements/value.js +9 -0
  248. package/dist/ui/elements/value.works.d.ts +4 -0
  249. package/dist/ui/elements/value.works.js +4 -0
  250. package/dist/ui/elements.d.ts +1143 -0
  251. package/dist/ui/elements.js +68 -0
  252. package/dist/ui/focus-scope.d.ts +7 -0
  253. package/dist/ui/focus-scope.js +109 -0
  254. package/dist/ui/fonts.d.ts +103 -0
  255. package/dist/ui/fonts.js +243 -0
  256. package/dist/ui/generators/dev.d.ts +2 -0
  257. package/dist/ui/generators/dev.js +61 -0
  258. package/dist/ui/generators/elements.d.ts +31 -0
  259. package/dist/ui/generators/elements.js +520 -0
  260. package/dist/ui/generators/i18n.d.ts +5 -0
  261. package/dist/ui/generators/i18n.js +264 -0
  262. package/dist/ui/generators/icons.d.ts +1 -0
  263. package/dist/ui/generators/icons.js +187 -0
  264. package/dist/ui/generators/react.d.ts +26 -0
  265. package/dist/ui/generators/react.js +218 -0
  266. package/dist/ui/generators/routes.d.ts +11 -0
  267. package/dist/ui/generators/routes.js +597 -0
  268. package/dist/ui/generators/show.d.ts +1 -0
  269. package/dist/ui/generators/show.js +231 -0
  270. package/dist/ui/generators/styles.d.ts +1 -0
  271. package/dist/ui/generators/styles.js +502 -0
  272. package/dist/ui/generators/variants.d.ts +12 -0
  273. package/dist/ui/generators/variants.js +162 -0
  274. package/dist/ui/i18n/catalogs/en.d.ts +172 -0
  275. package/dist/ui/i18n/catalogs/en.js +148 -0
  276. package/dist/ui/i18n/format.d.ts +13 -0
  277. package/dist/ui/i18n/format.js +161 -0
  278. package/dist/ui/i18n/locales.d.ts +9 -0
  279. package/dist/ui/i18n/locales.js +20 -0
  280. package/dist/ui/i18n/parse.d.ts +45 -0
  281. package/dist/ui/i18n/parse.js +249 -0
  282. package/dist/ui/i18n/translator.d.ts +10 -0
  283. package/dist/ui/i18n/translator.js +22 -0
  284. package/dist/ui/i18n/types.d.ts +33 -0
  285. package/dist/ui/i18n/types.js +9 -0
  286. package/dist/ui/icons.d.ts +67 -0
  287. package/dist/ui/icons.js +249 -0
  288. package/dist/ui/islands/map.d.ts +33 -0
  289. package/dist/ui/islands/map.js +44 -0
  290. package/dist/ui/localizations.d.ts +33 -0
  291. package/dist/ui/localizations.js +51 -0
  292. package/dist/ui/makers/message.d.ts +1 -0
  293. package/dist/ui/makers/message.js +230 -0
  294. package/dist/ui/material.d.ts +83 -0
  295. package/dist/ui/material.js +95 -0
  296. package/dist/ui/materials/mat_bordered.d.ts +22 -0
  297. package/dist/ui/materials/mat_bordered.js +12 -0
  298. package/dist/ui/materials/mat_ceramic.d.ts +22 -0
  299. package/dist/ui/materials/mat_ceramic.js +12 -0
  300. package/dist/ui/materials/mat_clay.d.ts +22 -0
  301. package/dist/ui/materials/mat_clay.js +12 -0
  302. package/dist/ui/materials/mat_elevated.d.ts +32 -0
  303. package/dist/ui/materials/mat_elevated.js +23 -0
  304. package/dist/ui/materials/mat_flat.d.ts +50 -0
  305. package/dist/ui/materials/mat_flat.js +33 -0
  306. package/dist/ui/materials/mat_glass.d.ts +32 -0
  307. package/dist/ui/materials/mat_glass.js +19 -0
  308. package/dist/ui/materials/mat_lit.d.ts +22 -0
  309. package/dist/ui/materials/mat_lit.js +12 -0
  310. package/dist/ui/materials/mat_moulded.d.ts +16 -0
  311. package/dist/ui/materials/mat_moulded.js +10 -0
  312. package/dist/ui/materials.d.ts +56 -0
  313. package/dist/ui/materials.js +175 -0
  314. package/dist/ui/modes.d.ts +25 -0
  315. package/dist/ui/modes.js +25 -0
  316. package/dist/ui/navigation.d.ts +3 -0
  317. package/dist/ui/navigation.js +24 -0
  318. package/dist/ui/positioning.d.ts +24 -0
  319. package/dist/ui/positioning.js +48 -0
  320. package/dist/ui/presented.d.ts +10 -0
  321. package/dist/ui/presented.js +81 -0
  322. package/dist/ui/provider.d.ts +31 -0
  323. package/dist/ui/provider.js +104 -0
  324. package/dist/ui/render-loop.d.ts +12 -0
  325. package/dist/ui/render-loop.js +94 -0
  326. package/dist/ui/roving-focus.d.ts +15 -0
  327. package/dist/ui/roving-focus.js +143 -0
  328. package/dist/ui/screens.d.ts +17 -0
  329. package/dist/ui/screens.js +112 -0
  330. package/dist/ui/scroll-lock.d.ts +2 -0
  331. package/dist/ui/scroll-lock.js +24 -0
  332. package/dist/ui/series.d.ts +9 -0
  333. package/dist/ui/series.js +67 -0
  334. package/dist/ui/signals.d.ts +120 -0
  335. package/dist/ui/signals.js +286 -0
  336. package/dist/ui/styleguide.d.ts +27 -0
  337. package/dist/ui/styleguide.js +138 -0
  338. package/dist/ui/styleguides.d.ts +11 -0
  339. package/dist/ui/styleguides.js +299 -0
  340. package/dist/ui/themes.d.ts +5 -0
  341. package/dist/ui/themes.js +16 -0
  342. package/dist/ui/token.d.ts +16 -0
  343. package/dist/ui/token.js +37 -0
  344. package/dist/ui/tokens/shadow.d.ts +6 -0
  345. package/dist/ui/tokens/shadow.js +17 -0
  346. package/dist/ui/tokens.d.ts +180 -0
  347. package/dist/ui/tokens.js +200 -0
  348. package/dist/ui/validators.d.ts +37 -0
  349. package/dist/ui/validators.js +184 -0
  350. package/dist/ui/variant.d.ts +122 -0
  351. package/dist/ui/variant.js +201 -0
  352. package/dist/ui/variants/var_avatar-round.d.ts +23 -0
  353. package/dist/ui/variants/var_avatar-round.js +13 -0
  354. package/dist/ui/variants/var_bubble-me.d.ts +21 -0
  355. package/dist/ui/variants/var_bubble-me.js +13 -0
  356. package/dist/ui/variants/var_bubble-them.d.ts +18 -0
  357. package/dist/ui/variants/var_bubble-them.js +12 -0
  358. package/dist/ui/variants/var_button-border.d.ts +116 -0
  359. package/dist/ui/variants/var_button-border.js +75 -0
  360. package/dist/ui/variants/var_button-cta.d.ts +116 -0
  361. package/dist/ui/variants/var_button-cta.js +75 -0
  362. package/dist/ui/variants/var_button-destructive-ghost.d.ts +113 -0
  363. package/dist/ui/variants/var_button-destructive-ghost.js +71 -0
  364. package/dist/ui/variants/var_button-destructive.d.ts +116 -0
  365. package/dist/ui/variants/var_button-destructive.js +75 -0
  366. package/dist/ui/variants/var_button-fill.d.ts +116 -0
  367. package/dist/ui/variants/var_button-fill.js +75 -0
  368. package/dist/ui/variants/var_button-ghost.d.ts +113 -0
  369. package/dist/ui/variants/var_button-ghost.js +71 -0
  370. package/dist/ui/variants/var_button-glass.d.ts +84 -0
  371. package/dist/ui/variants/var_button-glass.js +54 -0
  372. package/dist/ui/variants/var_button-normal.d.ts +116 -0
  373. package/dist/ui/variants/var_button-normal.js +75 -0
  374. package/dist/ui/variants/var_button-quiet.d.ts +119 -0
  375. package/dist/ui/variants/var_button-quiet.js +73 -0
  376. package/dist/ui/variants/var_card.d.ts +30 -0
  377. package/dist/ui/variants/var_card.js +16 -0
  378. package/dist/ui/variants/var_chip.d.ts +18 -0
  379. package/dist/ui/variants/var_chip.js +12 -0
  380. package/dist/ui/variants/var_choice.d.ts +26 -0
  381. package/dist/ui/variants/var_choice.js +14 -0
  382. package/dist/ui/variants/var_framed.d.ts +11 -0
  383. package/dist/ui/variants/var_framed.js +9 -0
  384. package/dist/ui/variants/var_glyph-plain.d.ts +14 -0
  385. package/dist/ui/variants/var_glyph-plain.js +10 -0
  386. package/dist/ui/variants/var_input.d.ts +61 -0
  387. package/dist/ui/variants/var_input.js +42 -0
  388. package/dist/ui/variants/var_link-inline.d.ts +39 -0
  389. package/dist/ui/variants/var_link-inline.js +28 -0
  390. package/dist/ui/variants/var_list-row.d.ts +47 -0
  391. package/dist/ui/variants/var_list-row.js +33 -0
  392. package/dist/ui/variants/var_rule.d.ts +11 -0
  393. package/dist/ui/variants/var_rule.js +9 -0
  394. package/dist/ui/variants/var_skeleton-block.d.ts +17 -0
  395. package/dist/ui/variants/var_skeleton-block.js +11 -0
  396. package/dist/ui/variants/var_spinner-turning.d.ts +17 -0
  397. package/dist/ui/variants/var_spinner-turning.js +11 -0
  398. package/dist/ui/variants/var_stat-tile.d.ts +18 -0
  399. package/dist/ui/variants/var_stat-tile.js +12 -0
  400. package/dist/ui/variants/var_tab-bar.d.ts +24 -0
  401. package/dist/ui/variants/var_tab-bar.js +14 -0
  402. package/dist/ui/variants/var_tap-target.d.ts +33 -0
  403. package/dist/ui/variants/var_tap-target.js +24 -0
  404. package/dist/ui/variants.d.ts +174 -0
  405. package/dist/ui/variants.js +50 -0
  406. package/dist/ui/wrappers.d.ts +128 -0
  407. package/dist/ui/wrappers.js +220 -0
  408. package/package.json +16 -0
@@ -0,0 +1,50 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { MessageKey } from '../content.tsx';
3
+ import { type Position } from '../positioning.ts';
4
+ import type { MenuProps } from './menu.tsx';
5
+ export interface MenuItem {
6
+ readonly labelKey: MessageKey;
7
+ readonly dispatch?: string;
8
+ readonly navigateTo?: string;
9
+ readonly icon?: string;
10
+ readonly disabled?: boolean;
11
+ }
12
+ export { Presented } from '../presented.tsx';
13
+ import type { PresentedProps } from '../presented.tsx';
14
+ export declare function MenuRow({ item, onDone, }: {
15
+ readonly item: MenuItem;
16
+ readonly onDone: () => void;
17
+ }): ReactNode;
18
+ type Kept = {
19
+ readonly trigger: React.RefObject<HTMLButtonElement | null>;
20
+ readonly layer: React.RefObject<HTMLDivElement | null>;
21
+ readonly open: boolean;
22
+ readonly at: Position | null;
23
+ readonly names: {
24
+ readonly trigger: string;
25
+ readonly menu: string;
26
+ };
27
+ readonly show: (to: boolean | ((was: boolean) => boolean)) => void;
28
+ };
29
+ export declare function uses(props: MenuProps): {
30
+ readonly holds?: readonly string[];
31
+ readonly animates?: boolean;
32
+ readonly on?: Readonly<Record<string, unknown>>;
33
+ readonly trigger: React.RefObject<HTMLButtonElement | null>;
34
+ readonly layer: React.RefObject<HTMLDivElement | null>;
35
+ readonly open: boolean;
36
+ readonly at: Position | null;
37
+ readonly names: {
38
+ readonly trigger: string;
39
+ readonly menu: string;
40
+ };
41
+ readonly show: (to: boolean | ((was: boolean) => boolean)) => void;
42
+ };
43
+ export declare function opener(_props: MenuProps, kept: Kept): Readonly<Record<string, unknown>>;
44
+ export declare function portal(_props: MenuProps, kept: Kept): PresentedProps;
45
+ export declare function listing(props: MenuProps, kept: Kept): Readonly<Record<string, unknown>>;
46
+ export declare function row(_props: MenuProps, kept: Kept, item: Record<string, unknown>, _at: number): {
47
+ readonly item: MenuItem;
48
+ readonly onDone: () => void;
49
+ };
50
+ export declare function measured(_props: MenuProps, kept: Kept): Readonly<Record<string, string | number>>;
@@ -0,0 +1,100 @@
1
+ 'use client';
2
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useId, useRef, useState } from 'react';
4
+ import { positionOf } from "../positioning.js";
5
+ import { ITEM_ATTR, useRovingFocus } from "../roving-focus.js";
6
+ import { pressOf, usePress, useSurface } from "../wrappers.js";
7
+ import { drawn } from "./glyph.works.js";
8
+ export { Presented } from "../presented.js";
9
+ const SIDE = 'bottom';
10
+ export function MenuRow({ item, onDone, }) {
11
+ const { text } = useSurface({});
12
+ const press = usePress(pressOf(item), { element: 'Menu', name: item.labelKey });
13
+ return (_jsxs("button", { [ITEM_ATTR]: '', type: "button", role: "menuitem", disabled: item.disabled === true, onClick: () => {
14
+ press?.();
15
+ onDone();
16
+ }, children: [item.icon === undefined ? null : drawn(item.icon, { 'aria-hidden': true }), text(item.labelKey)] }));
17
+ }
18
+ export function uses(props) {
19
+ const trigger = useRef(null);
20
+ const layer = useRef(null);
21
+ const [open, setOpen] = useState(false);
22
+ const [at, setAt] = useState(null);
23
+ const base = useId();
24
+ useRovingFocus(layer, { orientation: 'vertical', wrap: true, active: open });
25
+ useEffect(() => {
26
+ if (!open)
27
+ return undefined;
28
+ const anchor = trigger.current;
29
+ const floating = layer.current;
30
+ if (anchor === null || floating === null)
31
+ return undefined;
32
+ let live = true;
33
+ void positionOf(anchor, floating, {
34
+ placement: (props.side ?? SIDE),
35
+ }).then((position) => {
36
+ if (live)
37
+ setAt(position);
38
+ });
39
+ return () => {
40
+ live = false;
41
+ };
42
+ }, [open, props.side]);
43
+ return {
44
+ trigger,
45
+ layer,
46
+ open,
47
+ at,
48
+ names: { trigger: `${base}-trigger`, menu: `${base}-menu` },
49
+ show: setOpen,
50
+ };
51
+ }
52
+ export function opener(_props, kept) {
53
+ return {
54
+ ref: kept.trigger,
55
+ type: 'button',
56
+ id: kept.names.trigger,
57
+ 'aria-haspopup': 'menu',
58
+ 'aria-expanded': kept.open,
59
+ ...(kept.open ? { 'aria-controls': kept.names.menu } : {}),
60
+ onPointerDown: (event) => {
61
+ if (event.button > 0 || event.ctrlKey)
62
+ return;
63
+ event.currentTarget.focus();
64
+ event.preventDefault();
65
+ kept.show((was) => !was);
66
+ },
67
+ onKeyDown: (event) => {
68
+ if (event.key !== 'Enter' && event.key !== ' ' && event.key !== 'ArrowDown')
69
+ return;
70
+ event.preventDefault();
71
+ if (event.key === 'ArrowDown')
72
+ kept.show(true);
73
+ else
74
+ kept.show((was) => !was);
75
+ },
76
+ };
77
+ }
78
+ export function portal(_props, kept) {
79
+ return { presentation: 'popover', open: kept.open, onDismiss: () => kept.show(false), children: null };
80
+ }
81
+ export function listing(props, kept) {
82
+ return {
83
+ ref: kept.layer,
84
+ id: kept.names.menu,
85
+ role: 'menu',
86
+ 'aria-labelledby': kept.names.trigger,
87
+ 'data-side': kept.at?.placement ?? props.side ?? SIDE,
88
+ onKeyDown: (event) => {
89
+ if (event.key !== 'Tab')
90
+ return;
91
+ kept.show(false);
92
+ },
93
+ };
94
+ }
95
+ export function row(_props, kept, item, _at) {
96
+ return { item: item, onDone: () => kept.show(false) };
97
+ }
98
+ export function measured(_props, kept) {
99
+ return kept.at === null ? {} : { x: `${String(kept.at.x)}px`, y: `${String(kept.at.y)}px` };
100
+ }
@@ -0,0 +1,10 @@
1
+ import { type FontRoleId } from '../fonts.ts';
2
+ import { type Element } from '../wrappers.tsx';
3
+ export interface MoneyProps {
4
+ readonly value?: unknown;
5
+ readonly is?: FontRoleId;
6
+ readonly dispatch?: string;
7
+ readonly input?: Readonly<Record<string, unknown>>;
8
+ readonly invokeOn?: 'press' | 'shown';
9
+ }
10
+ export declare const Money: Element<'Money', MoneyProps>;
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { roleClass } from "../fonts.js";
3
+ import { element, useSurface } from "../wrappers.js";
4
+ import { shows } from "./money.works.js";
5
+ export const Money = element('Money', (props, className) => {
6
+ const surface = useSurface({ className: roleClass(props.is, className),
7
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
8
+ return (shows(props, surface));
9
+ }, 'e-money');
@@ -0,0 +1,4 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { Surface } from '../door.ts';
3
+ import type { MoneyProps } from './money.tsx';
4
+ export declare function shows(props: MoneyProps, surface: Surface): ReactNode;
@@ -0,0 +1,4 @@
1
+ import { renderValue } from "../content.js";
2
+ export function shows(props, surface) {
3
+ return renderValue({ validator: 'money', value: props.value }, surface);
4
+ }
@@ -0,0 +1,11 @@
1
+ import type { MapIsland } from '../islands/map.ts';
2
+ import { type Element } from '../wrappers.tsx';
3
+ export interface PaginationProps {
4
+ readonly map: MapIsland;
5
+ readonly sequence: readonly string[];
6
+ readonly current: string;
7
+ readonly dispatch?: string;
8
+ readonly input?: Readonly<Record<string, unknown>>;
9
+ readonly invokeOn?: 'press' | 'shown';
10
+ }
11
+ export declare const Pagination: Element<'Pagination', PaginationProps>;
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { roleClass } from "../fonts.js";
4
+ import { Link } from "./link.js";
5
+ import { element, useSurface } from "../wrappers.js";
6
+ import { Each } from "./each.js";
7
+ import { step, steps } from "./pagination.works.js";
8
+ export const Pagination = element('Pagination', (props, className) => {
9
+ const surface = useSurface({ className: roleClass(undefined, className),
10
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
11
+ return (_jsx("nav", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, "aria-label": surface.text('nav.pagination'), children: _jsx(Each, { rows: steps(props), by: 'id', children: (each0, at) => (_jsx(Link.linkInline, { ...step(props, each0, at) })) }) }));
12
+ }, 'e-pagination');
@@ -0,0 +1,5 @@
1
+ import type { Row } from '../charts.tsx';
2
+ import type { LinkProps } from './link.tsx';
3
+ import type { PaginationProps } from './pagination.tsx';
4
+ export declare function steps(props: PaginationProps): readonly Row[];
5
+ export declare function step(_props: PaginationProps, row: Row, _at: number): LinkProps;
@@ -0,0 +1,15 @@
1
+ export function steps(props) {
2
+ const known = new Map(props.map.screens.map((one) => [one.id, one]));
3
+ const walk = props.sequence.filter((id) => known.has(id));
4
+ const at = walk.indexOf(props.current);
5
+ if (at === -1)
6
+ return [];
7
+ const either = [
8
+ ...(at > 0 ? [{ id: walk[at - 1], way: 'previous' }] : []),
9
+ ...(at < walk.length - 1 ? [{ id: walk[at + 1], way: 'next' }] : []),
10
+ ];
11
+ return either.map((one) => ({ ...one, nameKey: known.get(one.id)?.nameKey ?? `nav.${one.way}` }));
12
+ }
13
+ export function step(_props, row, _at) {
14
+ return { navigateTo: String(row['id']), labelKey: String(row['nameKey']), is: 'label' };
15
+ }
@@ -0,0 +1,11 @@
1
+ import type { MessageKey } from '../content.tsx';
2
+ import { type Element } from '../wrappers.tsx';
3
+ export interface ProgressProps {
4
+ readonly value?: number;
5
+ readonly target?: number;
6
+ readonly labelKey: MessageKey;
7
+ readonly dispatch?: string;
8
+ readonly input?: Readonly<Record<string, unknown>>;
9
+ readonly invokeOn?: 'press' | 'shown';
10
+ }
11
+ export declare const Progress: Element<'Progress', ProgressProps>;
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { roleClass } from "../fonts.js";
4
+ import { element, useSurface } from "../wrappers.js";
5
+ import { measured } from "./progress.works.js";
6
+ export const Progress = element('Progress', (props, className) => {
7
+ const surface = useSurface({ className: roleClass(undefined, className),
8
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) },
9
+ measures: measured(props), });
10
+ return (_jsx("div", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, role: "progressbar", "aria-valuenow": Number(measured(props).fraction), "aria-valuemin": 0, "aria-valuemax": 100, style: surface.measures, "aria-label": surface.text(props.labelKey), children: _jsx("span", { className: "e-progress-bar" }) }));
11
+ }, 'e-progress');
@@ -0,0 +1,2 @@
1
+ import type { ProgressProps } from './progress.tsx';
2
+ export declare function measured(props: ProgressProps): Readonly<Record<string, string | number>>;
@@ -0,0 +1,6 @@
1
+ export function measured(props) {
2
+ const target = props.target ?? 0;
3
+ const part = target <= 0 ? 0 : Math.min(1, Math.max(0, (props.value ?? 0) / target));
4
+ const whole = Math.round(part * 100);
5
+ return { fraction: whole, span: `${String(whole)}%` };
6
+ }
@@ -0,0 +1,15 @@
1
+ import type { MessageKey } from '../content.tsx';
2
+ import type { Row } from '../charts.tsx';
3
+ import { type Element } from '../wrappers.tsx';
4
+ export interface RadioGroupProps {
5
+ readonly name: string;
6
+ readonly labelKey: MessageKey;
7
+ readonly options: readonly Row[];
8
+ readonly chosen?: string;
9
+ readonly onValue?: (said: string) => void;
10
+ readonly disabled?: boolean;
11
+ readonly dispatch?: string;
12
+ readonly input?: Readonly<Record<string, unknown>>;
13
+ readonly invokeOn?: 'press' | 'shown';
14
+ }
15
+ export declare const RadioGroup: Element<'RadioGroup', RadioGroupProps>;
@@ -0,0 +1,16 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { roleClass } from "../fonts.js";
4
+ import { element, useSurface } from "../wrappers.js";
5
+ import { Each } from "./each.js";
6
+ import { shown, option, uses } from "./radio-group.works.js";
7
+ export const RadioGroup = element('RadioGroup', (props, className) => {
8
+ const kept = uses(props);
9
+ const surface = useSurface({ className: roleClass(undefined, className),
10
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) },
11
+ holds: [
12
+ ...(kept.holds ?? []),
13
+ ],
14
+ ...(kept.animates === undefined ? {} : { animates: kept.animates }), });
15
+ return (_jsx("div", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, ...(kept.on ?? {}), role: "radiogroup", "aria-label": surface.text(props.labelKey), children: _jsx(Each, { rows: props.options, by: 'value', children: (each0, at) => (_jsxs("label", { children: [_jsx("input", { ...option(props, kept, each0, at), type: "radio", disabled: surface.marked('disabled') }), _jsx("span", { children: shown(props, each0, surface, kept).caption })] })) }) }));
16
+ }, 'e-radio-group');
@@ -0,0 +1,10 @@
1
+ import type { Row } from '../charts.tsx';
2
+ import type { Surface } from '../door.ts';
3
+ import type { RadioGroupProps } from './radio-group.tsx';
4
+ export declare function uses(props: RadioGroupProps): {
5
+ readonly holds?: readonly string[];
6
+ readonly animates?: boolean;
7
+ readonly on: Readonly<Record<string, unknown>>;
8
+ };
9
+ export declare function option(props: RadioGroupProps, _kept: unknown, row: Row, _at: number): Readonly<Record<string, unknown>>;
10
+ export declare function shown(_props: RadioGroupProps, row: Row, surface: Surface, _kept?: unknown): Readonly<Record<string, string>>;
@@ -0,0 +1,22 @@
1
+ import { useRef } from 'react';
2
+ import { ITEM_ATTR, useRovingFocus } from "../roving-focus.js";
3
+ export function uses(props) {
4
+ const group = useRef(null);
5
+ useRovingFocus(group, { orientation: 'vertical' });
6
+ return {
7
+ ...(props.disabled === true ? { holds: ['disabled'] } : {}),
8
+ on: { ref: group },
9
+ };
10
+ }
11
+ export function option(props, _kept, row, _at) {
12
+ return {
13
+ ...{ [ITEM_ATTR]: '' },
14
+ name: props.name,
15
+ value: String(row['value']),
16
+ checked: props.chosen === row['value'],
17
+ onChange: () => props.onValue?.(String(row['value'])),
18
+ };
19
+ }
20
+ export function shown(_props, row, surface, _kept) {
21
+ return { caption: surface.text(String(row['labelKey'])) };
22
+ }
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type Element } from '../wrappers.tsx';
3
+ export interface RowProps {
4
+ readonly children: ReactNode;
5
+ readonly dispatch?: string;
6
+ readonly input?: Readonly<Record<string, unknown>>;
7
+ readonly invokeOn?: 'press' | 'shown';
8
+ }
9
+ export declare const Row: Element<'Row', RowProps>;
@@ -0,0 +1,8 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { element, useSurface } from "../wrappers.js";
4
+ export const Row = element('Row', (props, className) => {
5
+ const surface = useSurface({ className,
6
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
7
+ return (_jsx("div", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, children: props.children }));
8
+ }, 'e-row');
@@ -0,0 +1,13 @@
1
+ import type { MessageKey } from '../content.tsx';
2
+ import type { Row } from '../charts.tsx';
3
+ import { type Element } from '../wrappers.tsx';
4
+ export interface ScatterProps {
5
+ readonly rows: readonly Row[];
6
+ readonly x: string;
7
+ readonly y: string;
8
+ readonly titleKey?: MessageKey;
9
+ readonly dispatch?: string;
10
+ readonly input?: Readonly<Record<string, unknown>>;
11
+ readonly invokeOn?: 'press' | 'shown';
12
+ }
13
+ export declare const Scatter: Element<'Scatter', ScatterProps>;
@@ -0,0 +1,15 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { roleClass } from "../fonts.js";
4
+ import { element, useSurface } from "../wrappers.js";
5
+ import { point, uses } from "./scatter.works.js";
6
+ export const Scatter = element('Scatter', (props, className) => {
7
+ const kept = uses(props);
8
+ const surface = useSurface({ className: roleClass(undefined, className),
9
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) },
10
+ holds: [
11
+ ...(kept.holds ?? []),
12
+ ],
13
+ ...(kept.animates === undefined ? {} : { animates: kept.animates }), });
14
+ return (_jsx("svg", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, ...(kept.on ?? {}), role: "img", ...(props.titleKey === undefined ? {} : { 'aria-label': surface.text(props.titleKey) }), children: props.rows.map((each0, at) => (_jsx("circle", { ...point(props, kept, each0, at) }, at))) }));
15
+ }, 'e-scatter');
@@ -0,0 +1,11 @@
1
+ import { type Row } from '../charts.tsx';
2
+ import type { ScatterProps } from './scatter.tsx';
3
+ export declare function uses(props: ScatterProps): {
4
+ readonly holds?: readonly string[];
5
+ readonly animates?: boolean;
6
+ readonly on?: Readonly<Record<string, unknown>>;
7
+ readonly ramp: readonly string[];
8
+ };
9
+ export declare function point(props: ScatterProps, kept: {
10
+ readonly ramp: readonly string[];
11
+ }, row: Row, _at: number): Readonly<Record<string, string | number>>;
@@ -0,0 +1,24 @@
1
+ import { num, useRamp } from "../charts.js";
2
+ const SIDE = 100;
3
+ export function uses(props) {
4
+ const ramp = useRamp(1);
5
+ return {
6
+ ...(props.rows.length === 0 ? { holds: ['empty'] } : {}),
7
+ on: { viewBox: `0 0 ${String(SIDE)} ${String(SIDE)}` },
8
+ ramp,
9
+ };
10
+ }
11
+ export function point(props, kept, row, _at) {
12
+ const xs = props.rows.map((one) => num(one, props.x));
13
+ const ys = props.rows.map((one) => num(one, props.y));
14
+ const leastX = Math.min(...xs);
15
+ const leastY = Math.min(...ys);
16
+ const spanX = Math.max(...xs) - leastX || 1;
17
+ const spanY = Math.max(...ys) - leastY || 1;
18
+ return {
19
+ cx: (((num(row, props.x) - leastX) / spanX) * SIDE).toFixed(2),
20
+ cy: (SIDE - ((num(row, props.y) - leastY) / spanY) * SIDE).toFixed(2),
21
+ r: 2,
22
+ fill: kept.ramp[0] ?? 'currentColor',
23
+ };
24
+ }
@@ -0,0 +1,13 @@
1
+ import type { MessageKey } from '../content.tsx';
2
+ import type { Row } from '../charts.tsx';
3
+ import { type Element } from '../wrappers.tsx';
4
+ export interface SelectProps {
5
+ readonly labelKey: MessageKey;
6
+ readonly options: readonly Row[];
7
+ readonly value?: string;
8
+ readonly onValue?: (said: string) => void;
9
+ readonly dispatch?: string;
10
+ readonly input?: Readonly<Record<string, unknown>>;
11
+ readonly invokeOn?: 'press' | 'shown';
12
+ }
13
+ export declare const Select: Element<'Select', SelectProps>;
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { roleClass } from "../fonts.js";
4
+ import { element, useSurface } from "../wrappers.js";
5
+ import { Each } from "./each.js";
6
+ import { does } from "./select.works.js";
7
+ export const Select = element('Select', (props, className) => {
8
+ const surface = useSurface({ className: roleClass(undefined, className),
9
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
10
+ return (_jsxs("label", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, children: [_jsx("span", { children: surface.text(props.labelKey) }), props.value === undefined ? null : _jsx("select", { disabled: surface.marked('disabled'), value: props.value ?? '', onChange: (event) => does(props).chose(event.target.value), children: _jsx(Each, { rows: props.options, by: props.value, children: (each0, at) => (_jsx("option", { value: String(each0.value), children: surface.text(String(each0.labelKey)) })) }) })] }));
11
+ }, 'e-select');
@@ -0,0 +1,4 @@
1
+ import type { SelectProps } from './select.tsx';
2
+ export declare function does(props: SelectProps): {
3
+ readonly chose: (value: string) => void;
4
+ };
@@ -0,0 +1,3 @@
1
+ export function does(props) {
2
+ return { chose: (value) => props.onValue?.(value) };
3
+ }
@@ -0,0 +1,10 @@
1
+ import type { MessageKey } from '../content.tsx';
2
+ import { type Element } from '../wrappers.tsx';
3
+ export interface SeparatorProps {
4
+ readonly labelKey?: MessageKey;
5
+ readonly orientation?: string;
6
+ readonly dispatch?: string;
7
+ readonly input?: Readonly<Record<string, unknown>>;
8
+ readonly invokeOn?: 'press' | 'shown';
9
+ }
10
+ export declare const Separator: Element<'Separator', SeparatorProps>;
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { roleClass } from "../fonts.js";
4
+ import { element, useSurface } from "../wrappers.js";
5
+ export const Separator = element('Separator', (props, className) => {
6
+ const surface = useSurface({ className: roleClass(undefined, className),
7
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
8
+ return (_jsx("div", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, role: "separator", "aria-orientation": props.orientation === 'vertical' ? 'vertical' : 'horizontal', children: props.labelKey === undefined ? null : _jsx("span", { children: surface.text(props.labelKey) }) }));
9
+ }, 'e-separator');
@@ -0,0 +1,8 @@
1
+ import { type Element } from '../wrappers.tsx';
2
+ export interface SkeletonProps {
3
+ readonly lines?: number;
4
+ readonly dispatch?: string;
5
+ readonly input?: Readonly<Record<string, unknown>>;
6
+ readonly invokeOn?: 'press' | 'shown';
7
+ }
8
+ export declare const Skeleton: Element<'Skeleton', SkeletonProps>;
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { roleClass } from "../fonts.js";
4
+ import { element, useSurface } from "../wrappers.js";
5
+ export const Skeleton = element('Skeleton', (props, className) => {
6
+ const surface = useSurface({ className: roleClass(undefined, className),
7
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
8
+ return (_jsx("span", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, "aria-hidden": "true", children: Array.from({ length: Math.max(1, props.lines ?? 1) }, (_, at) => (_jsx("span", {}))) }));
9
+ }, 'e-skeleton');
@@ -0,0 +1,14 @@
1
+ import type { MessageKey } from '../content.tsx';
2
+ import { type Element } from '../wrappers.tsx';
3
+ export interface SliderProps {
4
+ readonly labelKey: MessageKey;
5
+ readonly value?: number;
6
+ readonly min?: number;
7
+ readonly max?: number;
8
+ readonly step?: number;
9
+ readonly onValue?: (said: number) => void;
10
+ readonly dispatch?: string;
11
+ readonly input?: Readonly<Record<string, unknown>>;
12
+ readonly invokeOn?: 'press' | 'shown';
13
+ }
14
+ export declare const Slider: Element<'Slider', SliderProps>;
@@ -0,0 +1,10 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { roleClass } from "../fonts.js";
4
+ import { element, useSurface } from "../wrappers.js";
5
+ import { does } from "./slider.works.js";
6
+ export const Slider = element('Slider', (props, className) => {
7
+ const surface = useSurface({ className: roleClass(undefined, className),
8
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
9
+ return (_jsx("input", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, type: "range", disabled: surface.marked('disabled'), value: props.value ?? 0, onChange: (event) => does(props).moved(Number(event.target.value)), min: props.min, max: props.max, step: props.step ?? 1, "aria-label": surface.text(props.labelKey) }));
10
+ }, 'e-slider');
@@ -0,0 +1,4 @@
1
+ import type { SliderProps } from './slider.tsx';
2
+ export declare function does(props: SliderProps): {
3
+ readonly moved: (to: number) => void;
4
+ };
@@ -0,0 +1,3 @@
1
+ export function does(props) {
2
+ return { moved: (to) => props.onValue?.(to) };
3
+ }
@@ -0,0 +1,10 @@
1
+ import type { Row } from '../charts.tsx';
2
+ import { type Element } from '../wrappers.tsx';
3
+ export interface SparklineProps {
4
+ readonly rows: readonly Row[];
5
+ readonly value: string;
6
+ readonly dispatch?: string;
7
+ readonly input?: Readonly<Record<string, unknown>>;
8
+ readonly invokeOn?: 'press' | 'shown';
9
+ }
10
+ export declare const Sparkline: Element<'Sparkline', SparklineProps>;
@@ -0,0 +1,15 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { roleClass } from "../fonts.js";
4
+ import { element, useSurface } from "../wrappers.js";
5
+ import { drawing, uses } from "./sparkline.works.js";
6
+ export const Sparkline = element('Sparkline', (props, className) => {
7
+ const kept = uses(props);
8
+ const surface = useSurface({ className: roleClass(undefined, className),
9
+ invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) },
10
+ holds: [
11
+ ...(kept.holds ?? []),
12
+ ],
13
+ ...(kept.animates === undefined ? {} : { animates: kept.animates }), });
14
+ return (_jsx("svg", { className: surface.className, ...surface.marks, ...surface.invokes, ...surface.a11y, ...(kept.on ?? {}), "aria-hidden": "true", children: _jsx("polyline", { ...drawing(props, kept) }) }));
15
+ }, 'e-sparkline');
@@ -0,0 +1,10 @@
1
+ import type { SparklineProps } from './sparkline.tsx';
2
+ export declare function uses(props: SparklineProps): {
3
+ readonly holds?: readonly string[];
4
+ readonly animates?: boolean;
5
+ readonly on?: Readonly<Record<string, unknown>>;
6
+ readonly ramp: readonly string[];
7
+ };
8
+ export declare function drawing(props: SparklineProps, kept: {
9
+ readonly ramp: readonly string[];
10
+ }): Readonly<Record<string, string | number>>;
@@ -0,0 +1,19 @@
1
+ import { num, polyline, useRamp } from "../charts.js";
2
+ const WIDE = 100;
3
+ const TALL = 24;
4
+ export function uses(props) {
5
+ const ramp = useRamp(1);
6
+ return {
7
+ ...(props.rows.length === 0 ? { holds: ['empty'] } : {}),
8
+ on: { viewBox: `0 0 ${String(WIDE)} ${String(TALL)}` },
9
+ ramp,
10
+ };
11
+ }
12
+ export function drawing(props, kept) {
13
+ return {
14
+ points: polyline(props.rows.map((one) => num(one, props.value)), WIDE, TALL),
15
+ fill: 'none',
16
+ stroke: kept.ramp[0] ?? 'currentColor',
17
+ strokeWidth: 2,
18
+ };
19
+ }
@@ -0,0 +1,9 @@
1
+ import type { MessageKey } from '../content.tsx';
2
+ import { type Element } from '../wrappers.tsx';
3
+ export interface SpinnerProps {
4
+ readonly labelKey: MessageKey;
5
+ readonly dispatch?: string;
6
+ readonly input?: Readonly<Record<string, unknown>>;
7
+ readonly invokeOn?: 'press' | 'shown';
8
+ }
9
+ export declare const Spinner: Element<'Spinner', SpinnerProps>;