@nmnmcc/standard 0.0.0-stage → 0.4.0

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 (260) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +516 -2
  3. package/dist/Extend.d.ts +15 -0
  4. package/dist/Extend.d.ts.map +1 -0
  5. package/dist/Extend.js +1 -0
  6. package/dist/Node.d.ts +71 -0
  7. package/dist/Node.d.ts.map +1 -0
  8. package/dist/Palette-BIJ96BEh.js +84 -0
  9. package/dist/Palette.d.ts +8 -0
  10. package/dist/Palette.d.ts.map +1 -0
  11. package/dist/Palette.js +1 -0
  12. package/dist/Standard-BPpzr5SM.js +488 -0
  13. package/dist/Standard.d.ts +249 -0
  14. package/dist/Standard.d.ts.map +1 -0
  15. package/dist/Standard.js +1 -0
  16. package/dist/Ui-B9xQqqNT.js +468 -0
  17. package/dist/Ui.d.ts +500 -0
  18. package/dist/Ui.d.ts.map +1 -0
  19. package/dist/Ui.js +1 -0
  20. package/dist/index.d.ts +25 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.js +4 -0
  23. package/dist/rolldown-runtime-BMBA7GOT.js +10 -0
  24. package/dist/standard/button/button.d.ts +21 -0
  25. package/dist/standard/button/button.d.ts.map +1 -0
  26. package/dist/standard/colour/colour.d.ts +93 -0
  27. package/dist/standard/colour/colour.d.ts.map +1 -0
  28. package/dist/standard/field/field.d.ts +91 -0
  29. package/dist/standard/field/field.d.ts.map +1 -0
  30. package/dist/standard/form/form.d.ts +16 -0
  31. package/dist/standard/form/form.d.ts.map +1 -0
  32. package/dist/standard/icon/icon.d.ts +31 -0
  33. package/dist/standard/icon/icon.d.ts.map +1 -0
  34. package/dist/standard/image/image.d.ts +21 -0
  35. package/dist/standard/image/image.d.ts.map +1 -0
  36. package/dist/standard/layout/layout.d.ts +73 -0
  37. package/dist/standard/layout/layout.d.ts.map +1 -0
  38. package/dist/standard/list/list.d.ts +26 -0
  39. package/dist/standard/list/list.d.ts.map +1 -0
  40. package/dist/standard/page/page.d.ts +20 -0
  41. package/dist/standard/page/page.d.ts.map +1 -0
  42. package/dist/standard/table/table.d.ts +18 -0
  43. package/dist/standard/table/table.d.ts.map +1 -0
  44. package/dist/standard/text/text.d.ts +39 -0
  45. package/dist/standard/text/text.d.ts.map +1 -0
  46. package/dist/standard/tokens/classes.d.ts +16 -0
  47. package/dist/standard/tokens/classes.d.ts.map +1 -0
  48. package/dist/standard/tokens/tokens.d.ts +162 -0
  49. package/dist/standard/tokens/tokens.d.ts.map +1 -0
  50. package/dist/standard.css +2 -0
  51. package/dist/ui/arrow/arrow.d.ts +18 -0
  52. package/dist/ui/arrow/arrow.d.ts.map +1 -0
  53. package/dist/ui/avatar/avatar.d.ts +15 -0
  54. package/dist/ui/avatar/avatar.d.ts.map +1 -0
  55. package/dist/ui/board/board.d.ts +34 -0
  56. package/dist/ui/board/board.d.ts.map +1 -0
  57. package/dist/ui/bullet/bullet.d.ts +15 -0
  58. package/dist/ui/bullet/bullet.d.ts.map +1 -0
  59. package/dist/ui/card/card.d.ts +24 -0
  60. package/dist/ui/card/card.d.ts.map +1 -0
  61. package/dist/ui/carousel/carousel.d.ts +17 -0
  62. package/dist/ui/carousel/carousel.d.ts.map +1 -0
  63. package/dist/ui/check/check.d.ts +20 -0
  64. package/dist/ui/check/check.d.ts.map +1 -0
  65. package/dist/ui/choice/choice.d.ts +19 -0
  66. package/dist/ui/choice/choice.d.ts.map +1 -0
  67. package/dist/ui/control/control.d.ts +57 -0
  68. package/dist/ui/control/control.d.ts.map +1 -0
  69. package/dist/ui/dialog/dialog.d.ts +30 -0
  70. package/dist/ui/dialog/dialog.d.ts.map +1 -0
  71. package/dist/ui/disclosure/disclosure.d.ts +20 -0
  72. package/dist/ui/disclosure/disclosure.d.ts.map +1 -0
  73. package/dist/ui/flap/flap.d.ts +18 -0
  74. package/dist/ui/flap/flap.d.ts.map +1 -0
  75. package/dist/ui/item/item.d.ts +21 -0
  76. package/dist/ui/item/item.d.ts.map +1 -0
  77. package/dist/ui/key/key.d.ts +12 -0
  78. package/dist/ui/key/key.d.ts.map +1 -0
  79. package/dist/ui/menu/menu.d.ts +26 -0
  80. package/dist/ui/menu/menu.d.ts.map +1 -0
  81. package/dist/ui/modal/modal.d.ts +22 -0
  82. package/dist/ui/modal/modal.d.ts.map +1 -0
  83. package/dist/ui/navigator/navigator.d.ts +137 -0
  84. package/dist/ui/navigator/navigator.d.ts.map +1 -0
  85. package/dist/ui/notice/notice.d.ts +34 -0
  86. package/dist/ui/notice/notice.d.ts.map +1 -0
  87. package/dist/ui/options/options.d.ts +19 -0
  88. package/dist/ui/options/options.d.ts.map +1 -0
  89. package/dist/ui/pager/pager.d.ts +29 -0
  90. package/dist/ui/pager/pager.d.ts.map +1 -0
  91. package/dist/ui/pagination/pagination.d.ts +14 -0
  92. package/dist/ui/pagination/pagination.d.ts.map +1 -0
  93. package/dist/ui/popover/popover.d.ts +20 -0
  94. package/dist/ui/popover/popover.d.ts.map +1 -0
  95. package/dist/ui/progress/progress.d.ts +17 -0
  96. package/dist/ui/progress/progress.d.ts.map +1 -0
  97. package/dist/ui/route/route.d.ts +27 -0
  98. package/dist/ui/route/route.d.ts.map +1 -0
  99. package/dist/ui/sheet/sheet.d.ts +35 -0
  100. package/dist/ui/sheet/sheet.d.ts.map +1 -0
  101. package/dist/ui/skeleton/skeleton.d.ts +15 -0
  102. package/dist/ui/skeleton/skeleton.d.ts.map +1 -0
  103. package/dist/ui/slider/slider.d.ts +23 -0
  104. package/dist/ui/slider/slider.d.ts.map +1 -0
  105. package/dist/ui/stepper/stepper.d.ts +32 -0
  106. package/dist/ui/stepper/stepper.d.ts.map +1 -0
  107. package/dist/ui/tabs/tabs.d.ts +22 -0
  108. package/dist/ui/tabs/tabs.d.ts.map +1 -0
  109. package/dist/ui/tag/tag.d.ts +17 -0
  110. package/dist/ui/tag/tag.d.ts.map +1 -0
  111. package/dist/ui/tile/tile.d.ts +38 -0
  112. package/dist/ui/tile/tile.d.ts.map +1 -0
  113. package/dist/ui/toasts/toasts.d.ts +17 -0
  114. package/dist/ui/toasts/toasts.d.ts.map +1 -0
  115. package/dist/ui/toggle/toggle.d.ts +17 -0
  116. package/dist/ui/toggle/toggle.d.ts.map +1 -0
  117. package/dist/ui/trail/trail.d.ts +22 -0
  118. package/dist/ui/trail/trail.d.ts.map +1 -0
  119. package/package.json +70 -3
  120. package/src/Extend.ts +14 -0
  121. package/src/Node.ts +44 -0
  122. package/src/Palette.ts +7 -0
  123. package/src/Standard.ts +109 -0
  124. package/src/Ui.ts +156 -0
  125. package/src/index.ts +27 -0
  126. package/src/standard/button/button.module.css +43 -0
  127. package/src/standard/button/button.module.d.css.ts +6 -0
  128. package/src/standard/button/button.ts +38 -0
  129. package/src/standard/colour/colour.ts +197 -0
  130. package/src/standard/field/field.module.css +222 -0
  131. package/src/standard/field/field.module.d.css.ts +13 -0
  132. package/src/standard/field/field.ts +266 -0
  133. package/src/standard/form/form.ts +25 -0
  134. package/src/standard/icon/icon.module.css +349 -0
  135. package/src/standard/icon/icon.module.d.css.ts +112 -0
  136. package/src/standard/icon/icon.ts +148 -0
  137. package/src/standard/image/image.module.css +42 -0
  138. package/src/standard/image/image.module.d.css.ts +12 -0
  139. package/src/standard/image/image.ts +39 -0
  140. package/src/standard/layout/layout.module.css +224 -0
  141. package/src/standard/layout/layout.module.d.css.ts +41 -0
  142. package/src/standard/layout/layout.ts +133 -0
  143. package/src/standard/list/list.module.css +71 -0
  144. package/src/standard/list/list.module.d.css.ts +10 -0
  145. package/src/standard/list/list.ts +53 -0
  146. package/src/standard/page/page.module.css +244 -0
  147. package/src/standard/page/page.module.d.css.ts +9 -0
  148. package/src/standard/page/page.ts +32 -0
  149. package/src/standard/table/table.module.css +40 -0
  150. package/src/standard/table/table.module.d.css.ts +6 -0
  151. package/src/standard/table/table.ts +36 -0
  152. package/src/standard/text/text.module.css +149 -0
  153. package/src/standard/text/text.module.d.css.ts +19 -0
  154. package/src/standard/text/text.ts +77 -0
  155. package/src/standard/tokens/classes.ts +31 -0
  156. package/src/standard/tokens/tokens.module.css +294 -0
  157. package/src/standard/tokens/tokens.module.d.css.ts +40 -0
  158. package/src/standard/tokens/tokens.ts +339 -0
  159. package/src/ui/arrow/arrow.module.css +38 -0
  160. package/src/ui/arrow/arrow.module.d.css.ts +13 -0
  161. package/src/ui/arrow/arrow.ts +35 -0
  162. package/src/ui/avatar/avatar.module.css +25 -0
  163. package/src/ui/avatar/avatar.module.d.css.ts +5 -0
  164. package/src/ui/avatar/avatar.ts +28 -0
  165. package/src/ui/board/board.module.css +94 -0
  166. package/src/ui/board/board.module.d.css.ts +10 -0
  167. package/src/ui/board/board.ts +84 -0
  168. package/src/ui/bullet/bullet.module.css +28 -0
  169. package/src/ui/bullet/bullet.module.d.css.ts +5 -0
  170. package/src/ui/bullet/bullet.ts +16 -0
  171. package/src/ui/card/card.module.css +80 -0
  172. package/src/ui/card/card.module.d.css.ts +6 -0
  173. package/src/ui/card/card.ts +42 -0
  174. package/src/ui/carousel/carousel.module.css +24 -0
  175. package/src/ui/carousel/carousel.module.d.css.ts +5 -0
  176. package/src/ui/carousel/carousel.ts +30 -0
  177. package/src/ui/check/check.module.css +53 -0
  178. package/src/ui/check/check.module.d.css.ts +8 -0
  179. package/src/ui/check/check.ts +46 -0
  180. package/src/ui/choice/choice.module.css +32 -0
  181. package/src/ui/choice/choice.module.d.css.ts +6 -0
  182. package/src/ui/choice/choice.ts +31 -0
  183. package/src/ui/control/control.module.css +127 -0
  184. package/src/ui/control/control.module.d.css.ts +12 -0
  185. package/src/ui/control/control.ts +97 -0
  186. package/src/ui/dialog/dialog.module.css +42 -0
  187. package/src/ui/dialog/dialog.module.d.css.ts +6 -0
  188. package/src/ui/dialog/dialog.ts +44 -0
  189. package/src/ui/disclosure/disclosure.module.css +57 -0
  190. package/src/ui/disclosure/disclosure.module.d.css.ts +7 -0
  191. package/src/ui/disclosure/disclosure.ts +32 -0
  192. package/src/ui/flap/flap.module.css +161 -0
  193. package/src/ui/flap/flap.module.d.css.ts +48 -0
  194. package/src/ui/flap/flap.ts +78 -0
  195. package/src/ui/item/item.module.css +39 -0
  196. package/src/ui/item/item.module.d.css.ts +7 -0
  197. package/src/ui/item/item.ts +33 -0
  198. package/src/ui/key/key.module.css +15 -0
  199. package/src/ui/key/key.module.d.css.ts +5 -0
  200. package/src/ui/key/key.ts +13 -0
  201. package/src/ui/menu/menu.module.css +11 -0
  202. package/src/ui/menu/menu.module.d.css.ts +5 -0
  203. package/src/ui/menu/menu.ts +48 -0
  204. package/src/ui/modal/modal.module.css +66 -0
  205. package/src/ui/modal/modal.module.d.css.ts +8 -0
  206. package/src/ui/modal/modal.ts +55 -0
  207. package/src/ui/navigator/navigator.module.css +658 -0
  208. package/src/ui/navigator/navigator.module.d.css.ts +39 -0
  209. package/src/ui/navigator/navigator.ts +337 -0
  210. package/src/ui/notice/notice.module.css +80 -0
  211. package/src/ui/notice/notice.module.d.css.ts +10 -0
  212. package/src/ui/notice/notice.ts +57 -0
  213. package/src/ui/options/options.module.css +30 -0
  214. package/src/ui/options/options.module.d.css.ts +6 -0
  215. package/src/ui/options/options.ts +31 -0
  216. package/src/ui/pager/pager.module.css +38 -0
  217. package/src/ui/pager/pager.module.d.css.ts +8 -0
  218. package/src/ui/pager/pager.ts +48 -0
  219. package/src/ui/pagination/pagination.module.css +38 -0
  220. package/src/ui/pagination/pagination.module.d.css.ts +7 -0
  221. package/src/ui/pagination/pagination.ts +52 -0
  222. package/src/ui/popover/popover.module.css +94 -0
  223. package/src/ui/popover/popover.module.d.css.ts +8 -0
  224. package/src/ui/popover/popover.ts +139 -0
  225. package/src/ui/progress/progress.module.css +69 -0
  226. package/src/ui/progress/progress.module.d.css.ts +6 -0
  227. package/src/ui/progress/progress.ts +26 -0
  228. package/src/ui/route/route.module.css +116 -0
  229. package/src/ui/route/route.module.d.css.ts +11 -0
  230. package/src/ui/route/route.ts +58 -0
  231. package/src/ui/sheet/sheet.module.css +194 -0
  232. package/src/ui/sheet/sheet.module.d.css.ts +7 -0
  233. package/src/ui/sheet/sheet.ts +47 -0
  234. package/src/ui/skeleton/skeleton.module.css +44 -0
  235. package/src/ui/skeleton/skeleton.module.d.css.ts +6 -0
  236. package/src/ui/skeleton/skeleton.ts +20 -0
  237. package/src/ui/slider/slider.module.css +56 -0
  238. package/src/ui/slider/slider.module.d.css.ts +6 -0
  239. package/src/ui/slider/slider.ts +48 -0
  240. package/src/ui/stepper/stepper.module.css +32 -0
  241. package/src/ui/stepper/stepper.module.d.css.ts +7 -0
  242. package/src/ui/stepper/stepper.ts +62 -0
  243. package/src/ui/tabs/tabs.module.css +38 -0
  244. package/src/ui/tabs/tabs.module.d.css.ts +6 -0
  245. package/src/ui/tabs/tabs.ts +24 -0
  246. package/src/ui/tag/tag.module.css +23 -0
  247. package/src/ui/tag/tag.module.d.css.ts +5 -0
  248. package/src/ui/tag/tag.ts +17 -0
  249. package/src/ui/tile/tile.module.css +137 -0
  250. package/src/ui/tile/tile.module.d.css.ts +13 -0
  251. package/src/ui/tile/tile.ts +69 -0
  252. package/src/ui/toasts/toasts.module.css +38 -0
  253. package/src/ui/toasts/toasts.module.d.css.ts +6 -0
  254. package/src/ui/toasts/toasts.ts +26 -0
  255. package/src/ui/toggle/toggle.module.css +46 -0
  256. package/src/ui/toggle/toggle.module.d.css.ts +6 -0
  257. package/src/ui/toggle/toggle.ts +29 -0
  258. package/src/ui/trail/trail.module.css +42 -0
  259. package/src/ui/trail/trail.module.d.css.ts +5 -0
  260. package/src/ui/trail/trail.ts +28 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * `flap`: a readout that rolls to a new value.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ export declare const flap: <Msg>(h: Html.H<Msg>) => {
9
+ /**
10
+ * A readout of the kind a split-flap board gives: numbers and capital
11
+ * letters that roll to a new value through every glyph between. For a
12
+ * value that changes while it is watched, such as minutes, a count, or
13
+ * where the window is. Keep the text the same length, so each cell keeps
14
+ * its place. Anything not on the reel shows as a blank.
15
+ */
16
+ flap: (text: string) => Node<"inline", Msg>;
17
+ };
18
+ //# sourceMappingURL=flap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flap.d.ts","sourceRoot":"","sources":["../../../src/ui/flap/flap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAgD/C,eAAO,MAAM,IAAI,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACtC;;;;;;OAMG;IACH,IAAI,SAAS,MAAM,KAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC;CAezC,CAAA"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `item`: one thing in a list, and what can be done to it.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Child, type Kind, type Node } from "../../Node.ts";
8
+ import { type Actions } from "../control/control.ts";
9
+ export declare const item: <Msg>(h: Html.H<Msg>) => {
10
+ /**
11
+ * One thing in a ruled `list`, and what can be done to it. The actions are
12
+ * large buttons at the end of its row, as high as the row and out to its
13
+ * edge, as the answers of a `dialog` are across its bottom; where the page
14
+ * is narrow they are across the row's foot. They are part of the row's
15
+ * block, so there is no doubt which thing they act on.
16
+ */
17
+ item: <R = never>(options: {
18
+ readonly actions?: Actions<Msg>;
19
+ }, ...children: ReadonlyArray<Child<Kind, Msg, R>>) => Node<"block", Msg, R>;
20
+ };
21
+ //# sourceMappingURL=item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../src/ui/item/item.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,KAAK,KAAK,EAAqB,KAAK,IAAI,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AACzF,OAAO,EAAE,KAAK,OAAO,EAAW,MAAM,uBAAuB,CAAA;AAG7D,eAAO,MAAM,IAAI,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACtC;;;;;;OAMG;IACH,IAAI,GAAG,CAAC,GAAG,KAAK,WACL;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;KAAE,eAC/B,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,KAC9C,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;CAWxB,CAAA"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `key`: a key of the keyboard.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ export declare const key: <Msg>(h: Html.H<Msg>) => {
9
+ /** A key of the keyboard. */
10
+ key: (label: string) => Node<"inline", Msg>;
11
+ };
12
+ //# sourceMappingURL=key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../../src/ui/key/key.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAG/C,eAAO,MAAM,GAAG,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACrC,6BAA6B;IAC7B,GAAG,UAAU,MAAM,KAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC;CACzC,CAAA"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `menu`: a few things to do, behind one button.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ import { type Icon } from "../../standard/icon/icon.ts";
9
+ export declare const menu: <Msg>(h: Html.H<Msg>) => {
10
+ /**
11
+ * A few things to do, behind one button. It opens against the button,
12
+ * closes on Escape, on a press anywhere else and on a choice, and gives
13
+ * the focus back.
14
+ */
15
+ menu: (options: {
16
+ readonly name: string;
17
+ readonly label: string;
18
+ readonly items: ReadonlyArray<{
19
+ readonly label: string;
20
+ readonly onPress: Msg;
21
+ readonly icon?: Icon;
22
+ readonly disabled?: boolean;
23
+ }>;
24
+ }) => Node<"block", Msg>;
25
+ };
26
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/menu.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,KAAK,IAAI,EAAW,MAAM,6BAA6B,CAAA;AAIhE,eAAO,MAAM,IAAI,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACtC;;;;OAIG;IACH,IAAI,YAAY;QACd,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;YAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;YACtB,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAA;YACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;YACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;SAC5B,CAAC,CAAA;KACH,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CAoBtB,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * What a `sheet` and a `dialog` share: a modal `dialog` element with a
3
+ * title and the button that closes it.
4
+ *
5
+ * @since 0.4.0
6
+ */
7
+ import type { View } from "effect/ui";
8
+ import type { Html } from "effect/ui/html";
9
+ import { type Child, type Kind } from "../../Node.ts";
10
+ /** The Model decides when it is open. */
11
+ export declare const modal: <Msg, R>(h: Html.H<Msg>, name: "sheet" | "dialog", look: ReadonlyArray<string | false>, options: {
12
+ readonly open: boolean;
13
+ readonly title: string;
14
+ readonly close: {
15
+ readonly label: string;
16
+ readonly onPress: Msg;
17
+ };
18
+ readonly alert?: boolean;
19
+ }, children: ReadonlyArray<Child<Kind, Msg, R>>,
20
+ /** What comes after its children, at its bottom. */
21
+ foot?: View.Input<Msg>) => Html.Element<Msg, R, Html.EventsOf<"dialog">, HTMLDialogElement, "dialog">;
22
+ //# sourceMappingURL=modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/ui/modal/modal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,KAAK,KAAK,EAA8B,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAIjF,yCAAyC;AACzC,eAAO,MAAM,KAAK,GAAI,GAAG,EAAE,CAAC,KACvB,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QACR,OAAO,GAAG,QAAQ,QAClB,aAAa,CAAC,MAAM,GAAG,KAAK,CAAC,WAC1B;IACP,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACjE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CACzB,YACS,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AAC5C,oDAAoD;OAC7C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,+EA6BvB,CAAA"}
@@ -0,0 +1,137 @@
1
+ /**
2
+ * `navigator`: everywhere you can go, at the side of the page, along its top, or along its bottom.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import { Schema } from "effect";
7
+ import type { Html } from "effect/ui/html";
8
+ import { type Child, type Kind, type Node } from "../../Node.ts";
9
+ import { type Icon } from "../../standard/icon/icon.ts";
10
+ import type { Colour, Tone, Travel } from "../../standard/tokens/tokens.ts";
11
+ /** Where a navigator is: at the side of the page, along its top, or along its bottom. */
12
+ export declare const Place: Schema.Literals<readonly ["side", "top", "bottom"]>;
13
+ export type Place = typeof Place.Type;
14
+ /**
15
+ * How an open navigator takes its place: with room taken from the page,
16
+ * with the window moved over to it, or with neither, hanging over the page
17
+ * as a menu does. The first two can be asked for, at the side. The third
18
+ * is what a navigator along the top is.
19
+ */
20
+ export declare const Hold: Schema.Literals<readonly ["docked", "sheet", "menu"]>;
21
+ export type Hold = typeof Hold.Type;
22
+ export declare const navigator: <Msg>(h: Html.H<Msg>) => {
23
+ /**
24
+ * The navigator, and the page it leads you round. It has two layers.
25
+ * First a bar: each group, by its pictogram and its name. Then a pane: the
26
+ * places of the group that is shown. The group shown and its pane are
27
+ * a block of colour: the group's colour if it was given one, the accent if
28
+ * not. A group that is not shown has its pictogram and name written in
29
+ * that colour. The current place is the two colours swapped.
30
+ *
31
+ * `place` says where it is. At the `"side"`, the bar is a rail down the
32
+ * edge where the page starts, as wide as its pictograms until it is
33
+ * opened, and the pane is beside it. Along the `"top"`, the bar is a row
34
+ * and the pane hangs under the group that is shown, its places in a list
35
+ * read downwards. Along the `"bottom"`, where a thumb is, the bar is a
36
+ * row of tabs and the pane rises from behind it. A narrow window always
37
+ * has it along the bottom, whatever is asked for.
38
+ *
39
+ * At the start of the bar is the button that opens and closes it:
40
+ * three bars, or with a `brand`, the app's mark and name. With a `back`,
41
+ * the button that goes back is before it, in the corner where the page
42
+ * starts. Its arrow points the way the window will move: give the `back`
43
+ * its `travel`, and it turns to that as the page changes.
44
+ *
45
+ * Along the bottom the tabs have no room for either. There, and so in
46
+ * every narrow window, a navigator with a `back` or a `brand` has a bar
47
+ * along the top of the page as well, with the two in it.
48
+ *
49
+ * Closed, which is how it is until `open` is true, there is only the bar.
50
+ * Pressing a group shows its places and goes nowhere: have the Model
51
+ * open the navigator on `onShow` as well, because closed there is
52
+ * nowhere to show them. Pressing the group that is shown, while it is
53
+ * open, closes it.
54
+ *
55
+ * `mode` says how it takes its place when open. `"docked"`, it takes its
56
+ * room from the page. As a `"sheet"` it takes none: the window moves over
57
+ * to it, so the page slides out by as much as it slides in. That is for
58
+ * the side: along the bottom it is always a sheet, and along the top it
59
+ * is a `"menu"`: it hangs over the page and moves nothing.
60
+ * `onShow` and `onToggle` are told which of the three the window they
61
+ * were pressed in has, so the Model knows.
62
+ *
63
+ * Going to a place and closing the navigator are two movements; don't
64
+ * make both at once. Docked, leave it open and let the window travel. As
65
+ * a sheet, close it and change the page with no transition: the window
66
+ * coming back from the navigator is the movement. As a menu, close it
67
+ * and let the window travel: a menu closing moves nothing, so the travel
68
+ * is the only movement there is.
69
+ *
70
+ * The Model keeps which group is `shown`, and whether it is `open`. Its
71
+ * children are the page. Give `toasts` as the last of them.
72
+ */
73
+ navigator: <R = never>(options: {
74
+ readonly label: string;
75
+ readonly groups: ReadonlyArray<{
76
+ readonly label: string;
77
+ /** Its pictogram: all there is of it in a rail that is closed. */
78
+ readonly icon: Icon;
79
+ readonly colour?: Colour;
80
+ readonly links: ReadonlyArray<{
81
+ readonly label: string;
82
+ readonly href: string;
83
+ readonly icon?: Icon;
84
+ readonly current?: boolean;
85
+ }>;
86
+ }>;
87
+ /** The index of the group whose places are in the pane. */
88
+ readonly shown: number;
89
+ readonly onShow: (index: number, as: Hold) => Msg;
90
+ readonly open?: boolean;
91
+ readonly toggle: {
92
+ /** The button's name, for anyone who can't see its pictogram. */
93
+ readonly label: string;
94
+ /** What it sends: the state to go to, and how the navigator takes its place in the window it was pressed in. */
95
+ readonly onToggle: (open: boolean, as: Hold) => Msg;
96
+ };
97
+ /**
98
+ * Whose app this is: a mark and a name, at the start of the bar, in
99
+ * place of the three bars. It is the button that opens and closes the
100
+ * navigator. The mark is a picture, or a pictogram, or, with neither,
101
+ * a square of colour: its colour if it was given one, the accent if
102
+ * not. Along the bottom it is in the bar along the top, and opens
103
+ * nothing: the tabs do that.
104
+ */
105
+ readonly brand?: {
106
+ readonly name: string;
107
+ readonly icon?: Icon;
108
+ readonly src?: string;
109
+ readonly colour?: Colour;
110
+ };
111
+ /**
112
+ * The button that goes back: an arrow, in the corner where the page
113
+ * starts. Where it goes is the Model's to say; usually to the page
114
+ * you were on before.
115
+ */
116
+ readonly back?: {
117
+ /** The button's name, for anyone who can't see its pictogram. */
118
+ readonly label: string;
119
+ readonly onPress: Msg;
120
+ /** True when there is nowhere to go back to: no page before this one, or one that is not the app's. */
121
+ readonly disabled?: boolean;
122
+ /**
123
+ * The way the window will move when it is pressed: what
124
+ * `Standard.travel` makes of this route and the one it goes back
125
+ * to. The arrow points that way, and turns to it, the short way
126
+ * round, when it changes. Without one, or with no way at all, it
127
+ * points back along the line of reading.
128
+ */
129
+ readonly travel?: ReadonlyArray<Travel>;
130
+ };
131
+ readonly place?: Place;
132
+ /** At the side, whether it is docked or a sheet. Anywhere else it is not asked. */
133
+ readonly mode?: Exclude<Hold, "menu">;
134
+ readonly tone?: Tone;
135
+ }, ...children: ReadonlyArray<Child<Kind, Msg, R>>) => Node<"block", Msg, R>;
136
+ };
137
+ //# sourceMappingURL=navigator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigator.d.ts","sourceRoot":"","sources":["../../../src/ui/navigator/navigator.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * `notice`: something a person should know before going on.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import { Schema } from "effect";
7
+ import type { Html } from "effect/ui/html";
8
+ import { type Child, type Kind, type Node } from "../../Node.ts";
9
+ import { type Icon } from "../../standard/icon/icon.ts";
10
+ import { type Actions } from "../control/control.ts";
11
+ /** How urgent a notice is. */
12
+ export declare const Level: Schema.Literals<readonly ["info", "caution"]>;
13
+ export type Level = typeof Level.Type;
14
+ export declare const notice: <Msg>(h: Html.H<Msg>) => {
15
+ /**
16
+ * Something a person should know before going on. Its pictogram says
17
+ * how urgent it is, together with the words: `info`, or `warning` for a
18
+ * caution, unless another is given. With `dismiss` it can be dismissed:
19
+ * the button is at its end, as high as the notice. With `actions`, what
20
+ * can be done about it is across its foot, edge to edge, as the answers
21
+ * of a `dialog` are.
22
+ */
23
+ notice: <R = never>(options: {
24
+ readonly title: string;
25
+ readonly level?: Level;
26
+ readonly icon?: Icon;
27
+ readonly dismiss?: {
28
+ readonly label: string;
29
+ readonly onPress: Msg;
30
+ };
31
+ readonly actions?: Actions<Msg>;
32
+ }, ...children: ReadonlyArray<Child<Kind, Msg, R>>) => Node<"block", Msg, R>;
33
+ };
34
+ //# sourceMappingURL=notice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notice.d.ts","sourceRoot":"","sources":["../../../src/ui/notice/notice.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,KAAK,KAAK,EAAqB,KAAK,IAAI,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AACzF,OAAO,EAAE,KAAK,IAAI,EAAW,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,KAAK,OAAO,EAAW,MAAM,uBAAuB,CAAA;AAG7D,8BAA8B;AAC9B,eAAO,MAAM,KAAK,+CAAuC,CAAA;AACzD,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAErC,eAAO,MAAM,MAAM,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACxC;;;;;;;OAOG;IACH,MAAM,GAAG,CAAC,GAAG,KAAK,WACP;QACP,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAA;QACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;QACpB,QAAQ,CAAC,OAAO,CAAC,EAAE;YAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAA;SAAE,CAAA;QACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;KAChC,eACY,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,KAC9C,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;CAsBxB,CAAA"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * `options`: which of several values, as a list down the page.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ import { type Item } from "../control/control.ts";
9
+ export declare const options: <Msg>(h: Html.H<Msg>) => {
10
+ /** Which of several values, as a list down the page. The arrow keys move between them. */
11
+ options: <A extends string>(options: {
12
+ readonly name: string;
13
+ readonly label: string;
14
+ readonly value: A;
15
+ readonly onChange: (value: A) => Msg;
16
+ readonly items: ReadonlyArray<Item<A>>;
17
+ }) => Node<"block", Msg>;
18
+ };
19
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/ui/options/options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,KAAK,IAAI,EAAU,MAAM,uBAAuB,CAAA;AAGzD,eAAO,MAAM,OAAO,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,0FAA0F;IAC1F,OAAO,GAAG,CAAC,SAAS,MAAM,WAAW;QACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;QACjB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,CAAA;QACpC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;KACvC,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CAWtB,CAAA"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * `pager`: the page before and the page after.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ export declare const pager: <Msg>(h: Html.H<Msg>) => {
9
+ /**
10
+ * Where you can go next: the page before and the page after, each by
11
+ * its name, with an arrow pointing its way. `vertical` when the pages
12
+ * are listed down the page, not across it.
13
+ */
14
+ pager: (options: {
15
+ readonly label: string;
16
+ readonly previous?: {
17
+ readonly label: string;
18
+ readonly title: string;
19
+ readonly href: string;
20
+ };
21
+ readonly next?: {
22
+ readonly label: string;
23
+ readonly title: string;
24
+ readonly href: string;
25
+ };
26
+ readonly axis?: "horizontal" | "vertical";
27
+ }) => Node<"block", Msg>;
28
+ };
29
+ //# sourceMappingURL=pager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pager.d.ts","sourceRoot":"","sources":["../../../src/ui/pager/pager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAK/C,eAAO,MAAM,KAAK,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACvC;;;;OAIG;IACH,KAAK,YAAY;QACf,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE;YAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;QAC7F,QAAQ,CAAC,IAAI,CAAC,EAAE;YAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;QACzF,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;KAC1C,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CAyBtB,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { Html } from "effect/ui/html";
2
+ import { type Node } from "../../Node.ts";
3
+ export declare const pagination: <Msg>(h: Html.H<Msg>) => {
4
+ /** Which page of several, by number, with the pages next to the current one, and both ends. */
5
+ pagination: (options: {
6
+ readonly label: string;
7
+ readonly page: number;
8
+ readonly count: number;
9
+ readonly onChange: (page: number) => Msg;
10
+ readonly previous: string;
11
+ readonly next: string;
12
+ }) => Node<"block", Msg>;
13
+ };
14
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/ui/pagination/pagination.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAK/C,eAAO,MAAM,UAAU,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5C,+FAA+F;IAC/F,UAAU,YAAY;QACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAA;QACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;QACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KACtB,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CA8BtB,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { type View } from "effect/ui";
2
+ import type { Html } from "effect/ui/html";
3
+ import { type Child, type Kind, type Node } from "../../Node.ts";
4
+ /** A button that opens the popover after it. It opens under the button, or over it when that is where the room is. */
5
+ export declare const anchored: <Msg, R>(h: Html.H<Msg>, options: {
6
+ readonly name: string;
7
+ readonly label: string;
8
+ readonly role?: "menu";
9
+ }, body: View.Input<Msg, R>) => {
10
+ id: string;
11
+ content: Html.Element<Msg, R, Html.Events, HTMLDivElement, "div">;
12
+ };
13
+ export declare const popover: <Msg>(h: Html.H<Msg>) => {
14
+ /** More about something, behind one button, next to it. */
15
+ popover: <R = never>(options: {
16
+ readonly name: string;
17
+ readonly label: string;
18
+ }, ...children: ReadonlyArray<Child<Kind, Msg, R>>) => Node<"block", Msg, R>;
19
+ };
20
+ //# sourceMappingURL=popover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/ui/popover/popover.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoB,KAAK,IAAI,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,KAAK,KAAK,EAAqB,KAAK,IAAI,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAmGzF,sHAAsH;AACtH,eAAO,MAAM,QAAQ,GAAI,GAAG,EAAE,CAAC,KAC1B,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,WACL;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,QAC5E,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;;;CAkBzB,CAAA;AAED,eAAO,MAAM,OAAO,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,2DAA2D;IAC3D,OAAO,GAAG,CAAC,GAAG,KAAK,WACR;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,eAC7C,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,KAC9C,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;CAExB,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `progress`: how far along something is.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ import type { Colour } from "../../standard/tokens/tokens.ts";
9
+ export declare const progress: <Msg>(h: Html.H<Msg>) => {
10
+ /** How far along something is, from 0 to 1. With no value, it is not yet known how far. With a colour, the part that is done is in it. */
11
+ progress: (options: {
12
+ readonly label: string;
13
+ readonly value?: number;
14
+ readonly colour?: Colour;
15
+ }) => Node<"block", Msg>;
16
+ };
17
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/progress.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAI7D,eAAO,MAAM,QAAQ,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IAC1C,0IAA0I;IAC1I,QAAQ,YAAY;QAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KACzB,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CAQtB,CAAA"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * `route`: the steps of something with an order, and the one it has reached.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ import type { Colour } from "../../standard/tokens/tokens.ts";
9
+ export declare const route: <Msg>(h: Html.H<Msg>) => {
10
+ /**
11
+ * The steps of something with an order, and the one it has reached: the
12
+ * steps of a task, the stages of an order, the events of a day.
13
+ * With `onSelect` each step can be pressed.
14
+ */
15
+ route: (options: {
16
+ readonly label: string;
17
+ readonly stops: ReadonlyArray<{
18
+ readonly name: string;
19
+ readonly note?: string;
20
+ }>;
21
+ readonly at?: number;
22
+ readonly onSelect?: (index: number) => Msg;
23
+ readonly colour?: Colour;
24
+ readonly axis?: "vertical" | "horizontal";
25
+ }) => Node<"block", Msg>;
26
+ };
27
+ //# sourceMappingURL=route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/ui/route/route.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAK7D,eAAO,MAAM,KAAK,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACvC;;;;OAIG;IACH,KAAK,YAAY;QACf,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;YAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QAChF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAA;QAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,YAAY,CAAA;KAC1C,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CAgCtB,CAAA"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * `sheet`: the place next to the page.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Child, type Kind, type Node } from "../../Node.ts";
8
+ import { type Actions } from "../control/control.ts";
9
+ export declare const sheet: <Msg>(h: Html.H<Msg>) => {
10
+ /**
11
+ * The place next to the page: a task, some detail, or the app's
12
+ * navigation. It isn't a layer over the page. The window moves over to
13
+ * it, so the page slides out by exactly as much as the sheet slides in,
14
+ * and back again when it closes; nothing is dimmed. It is at the end of
15
+ * the page, or with `side: "start"` at its start. On a narrow screen it
16
+ * is above the page: it comes down out of the navigator's top bar and
17
+ * fills the window down to its tabs, and its button is across the
18
+ * bottom, always in view. It keeps the focus inside, gives it back when it
19
+ * closes, and asks to close on Escape, on a press outside it, and by its
20
+ * button. The Model decides: it is open while `open` is true. With
21
+ * `actions`, what ends the task is across its bottom, edge to edge, as the
22
+ * answers of a `dialog` are, and in view whatever it is scrolled to.
23
+ */
24
+ sheet: <R = never>(options: {
25
+ readonly open: boolean;
26
+ readonly title: string;
27
+ readonly close: {
28
+ readonly label: string;
29
+ readonly onPress: Msg;
30
+ };
31
+ readonly side?: "start" | "end";
32
+ readonly actions?: Actions<Msg>;
33
+ }, ...children: ReadonlyArray<Child<Kind, Msg, R>>) => Node<"block", Msg, R>;
34
+ };
35
+ //# sourceMappingURL=sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../src/ui/sheet/sheet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AACtE,OAAO,EAAE,KAAK,OAAO,EAAW,MAAM,uBAAuB,CAAA;AAI7D,eAAO,MAAM,KAAK,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACvC;;;;;;;;;;;;;OAaG;IACH,KAAK,GAAG,CAAC,GAAG,KAAK,WACN;QACP,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;QACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,EAAE;YAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAA;SAAE,CAAA;QACjE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;QAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;KAChC,eACY,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,KAC9C,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;CAWxB,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `skeleton`: where content will be, while it loads.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ export declare const skeleton: <Msg>(h: Html.H<Msg>) => {
9
+ /** Where content will be, while it loads. */
10
+ skeleton: (options: {
11
+ readonly label: string;
12
+ readonly lines?: 1 | 2 | 3 | 4;
13
+ }) => Node<"block", Msg>;
14
+ };
15
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/ui/skeleton/skeleton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAG/C,eAAO,MAAM,QAAQ,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IAC1C,6CAA6C;IAC7C,QAAQ,YAAY;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;KAAE,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CAQnG,CAAA"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `slider`: a number picked along a track.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ export declare const slider: <Msg>(h: Html.H<Msg>) => {
9
+ /** A number picked along a track, by dragging, by the arrow keys, or by a press on the track. */
10
+ slider: (options: {
11
+ readonly name: string;
12
+ readonly label: string;
13
+ readonly value: number;
14
+ readonly min: number;
15
+ readonly max: number;
16
+ readonly step?: number;
17
+ readonly onInput: (value: number) => Msg;
18
+ /** The value as it is shown beside the label. */
19
+ readonly shown?: string;
20
+ readonly disabled?: boolean;
21
+ }) => Node<"block", Msg>;
22
+ };
23
+ //# sourceMappingURL=slider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/ui/slider/slider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAI/C,eAAO,MAAM,MAAM,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACxC,iGAAiG;IACjG,MAAM,YAAY;QAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAA;QACxC,iDAAiD;QACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CAwBtB,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * `stepper`: a small whole number, set one step at a time.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ export declare const stepper: <Msg>(h: Html.H<Msg>) => {
9
+ /**
10
+ * A small number between two buttons: one takes a step off it, the other
11
+ * adds one. For how many of a thing. A number picked from a wide range
12
+ * is a `slider`'s.
13
+ */
14
+ stepper: (options: {
15
+ /** What is counted. It is not shown: the number stands beside the thing it counts. */
16
+ readonly label: string;
17
+ readonly value: number;
18
+ /** The least it can be. 0 by default. */
19
+ readonly min?: number;
20
+ /** The most it can be. No limit by default. */
21
+ readonly max?: number;
22
+ readonly step?: number;
23
+ readonly onChange: (value: number) => Msg;
24
+ /** The names of the two buttons, such as “One less” and “One more”. */
25
+ readonly less: string;
26
+ readonly more: string;
27
+ /** The value as it is shown between the buttons. */
28
+ readonly shown?: string;
29
+ readonly disabled?: boolean;
30
+ }) => Node<"block", Msg>;
31
+ };
32
+ //# sourceMappingURL=stepper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../../src/ui/stepper/stepper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAK/C,eAAO,MAAM,OAAO,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC;;;;OAIG;IACH,OAAO,YAAY;QACjB,sFAAsF;QACtF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,yCAAyC;QACzC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;QACrB,+CAA+C;QAC/C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAA;QACzC,uEAAuE;QACvE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,oDAAoD;QACpD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CA4BtB,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * `tabs`: which of several views is shown.
3
+ *
4
+ * @since 0.4.0
5
+ */
6
+ import type { Html } from "effect/ui/html";
7
+ import { type Node } from "../../Node.ts";
8
+ import { type Item } from "../control/control.ts";
9
+ export declare const tabs: <Msg>(h: Html.H<Msg>) => {
10
+ /**
11
+ * Which of several views is shown. The arrow keys move between them, and
12
+ * the row scrolls under a finger when it doesn't fit.
13
+ */
14
+ tabs: <A extends string>(options: {
15
+ readonly name: string;
16
+ readonly label: string;
17
+ readonly value: A;
18
+ readonly onChange: (value: A) => Msg;
19
+ readonly items: ReadonlyArray<Item<A>>;
20
+ }) => Node<"block", Msg>;
21
+ };
22
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/ui/tabs/tabs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,KAAK,IAAI,EAAU,MAAM,uBAAuB,CAAA;AAGzD,eAAO,MAAM,IAAI,GAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACtC;;;OAGG;IACH,IAAI,GAAG,CAAC,SAAS,MAAM,WAAW;QAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;QACjB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,CAAA;QACpC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;KACvC,KAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;CAEtB,CAAA"}