spell-ui 0.8.15 → 0.8.17

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 (285) hide show
  1. package/README-components.md +4 -2
  2. package/README-runtime.md +26 -1
  3. package/README.md +2 -1
  4. package/dist/SliderScale-DunjyaDW.js +67 -0
  5. package/dist/SliderScale-DunjyaDW.js.map +1 -0
  6. package/dist/{ThemeDraft-CyX3YA_L.js → ThemeDraft-spaNC2dD.js} +2 -2
  7. package/dist/{ThemeDraft-CyX3YA_L.js.map → ThemeDraft-spaNC2dD.js.map} +1 -1
  8. package/dist/{UIInput-B3K0w4ow.js → UIInput-8s1aiaw1.js} +2 -2
  9. package/dist/UIInput-8s1aiaw1.js.map +1 -0
  10. package/dist/{UIRuntime-DCv4sy30.js → UIRuntime-BaokNnwk.js} +900 -158
  11. package/dist/UIRuntime-BaokNnwk.js.map +1 -0
  12. package/dist/_spell-element/UIComponent.d.ts +7 -0
  13. package/dist/_spell-element/elements.types.d.ts +6 -0
  14. package/dist/_spell-element/vocabulary.types.d.ts +27 -0
  15. package/dist/_util/dom.d.ts +7 -0
  16. package/dist/components/components.es.d.ts +1 -0
  17. package/dist/components/ui-dial/DialArc.d.ts +43 -0
  18. package/dist/components/ui-dial/UIDial.d.ts +263 -0
  19. package/dist/components/ui-dial/UIDial.en.d.ts +149 -0
  20. package/dist/components/ui-dial/UIDial.es.d.ts +25 -0
  21. package/dist/components/ui-dial/UIDial.fallback.d.ts +167 -0
  22. package/dist/components/ui-dial/UIDial.types.d.ts +11 -0
  23. package/dist/components/ui-dial/index.d.ts +3 -0
  24. package/dist/components/ui-graph/UIGraph.d.ts +17 -0
  25. package/dist/components/ui-graph/UIGraph.en.d.ts +17 -0
  26. package/dist/components/ui-graph/UIGraph.es.d.ts +6 -0
  27. package/dist/components/ui-input/UIInput.d.ts +46 -3
  28. package/dist/components/ui-input/UIInput.en.d.ts +6 -1
  29. package/dist/components/ui-input/UIInput.es.d.ts +1 -0
  30. package/dist/components/ui-input/UIInput.fallback.d.ts +6 -1
  31. package/dist/components/ui-json/UIJson.d.ts +5 -4
  32. package/dist/components/ui-modal/ChoiceRows.d.ts +61 -0
  33. package/dist/components/ui-modal/ModalDialogs.d.ts +15 -1
  34. package/dist/components/ui-modal/UIModal.d.ts +6 -2
  35. package/dist/components/ui-modal/UIModal.en.d.ts +6 -2
  36. package/dist/components/ui-modal/UIModal.es.d.ts +1 -0
  37. package/dist/components/ui-page-layout/UIPageLayout.d.ts +141 -8
  38. package/dist/components/ui-page-layout/UIPageLayout.en.d.ts +51 -2
  39. package/dist/components/ui-page-layout/UIPageLayout.es.d.ts +3 -0
  40. package/dist/components/ui-property-editor/UIProperty.d.ts +2 -2
  41. package/dist/components/ui-site-links/UISiteLinks.d.ts +124 -0
  42. package/dist/components/ui-site-links/UISiteLinks.en.d.ts +60 -0
  43. package/dist/components/ui-site-links/UISiteLinks.es.d.ts +26 -0
  44. package/dist/components/ui-site-links/index.d.ts +1 -0
  45. package/dist/components/ui-site-nav-button/UISiteNavButton.d.ts +12 -5
  46. package/dist/components/ui-site-nav-button/UISiteNavButton.en.d.ts +32 -12
  47. package/dist/components/ui-site-nav-button/UISiteNavButton.es.d.ts +3 -0
  48. package/dist/components/ui-site-tabs/UISiteTabs.d.ts +13 -0
  49. package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +9 -0
  50. package/dist/components/ui-slider/SliderScale.d.ts +26 -2
  51. package/dist/components/ui-slider/UISlider.d.ts +0 -2
  52. package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
  53. package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
  54. package/dist/components/ui-toc/TocIndex.d.ts +16 -1
  55. package/dist/components/ui-toc/UIToc.d.ts +27 -3
  56. package/dist/components/ui-toc/UIToc.en.d.ts +1 -1
  57. package/dist/components/ui-toc/UIToc.types.d.ts +5 -0
  58. package/dist/components/ui-tree/UITree.d.ts +38 -2
  59. package/dist/components/ui-tree/UITree.en.d.ts +9 -0
  60. package/dist/components/ui-tree/UITree.es.d.ts +4 -0
  61. package/dist/components/ui-uploader/UIUploader.d.ts +721 -0
  62. package/dist/components/ui-uploader/UIUploader.en.d.ts +394 -0
  63. package/dist/components/ui-uploader/UIUploader.es.d.ts +112 -0
  64. package/dist/components/ui-uploader/index.d.ts +1 -0
  65. package/dist/{components.es-DilRG1VO.js → components.es-jY2nBwuP.js} +249 -65
  66. package/dist/components.es-jY2nBwuP.js.map +1 -0
  67. package/dist/core.js +605 -571
  68. package/dist/core.js.map +1 -1
  69. package/dist/docs-components/docs-components.types.d.ts +2 -0
  70. package/dist/index.d.ts +3 -0
  71. package/dist/index.js +101 -97
  72. package/dist/jsx.d.ts +1138 -21
  73. package/dist/runtime/DataTooltips.d.ts +10 -0
  74. package/dist/runtime/Modals.d.ts +7 -2
  75. package/dist/runtime/Styles.d.ts +7 -1
  76. package/dist/runtime/UIRuntime.d.ts +6 -0
  77. package/dist/runtime/runtime.types.d.ts +26 -1
  78. package/dist/sound-library/back.ogg +0 -0
  79. package/dist/sound-library/beep.ogg +0 -0
  80. package/dist/sound-library/bell.ogg +0 -0
  81. package/dist/sound-library/big-punch.ogg +0 -0
  82. package/dist/sound-library/bong.ogg +0 -0
  83. package/dist/sound-library/book-close.ogg +0 -0
  84. package/dist/sound-library/book-down.ogg +0 -0
  85. package/dist/sound-library/book-open.ogg +0 -0
  86. package/dist/sound-library/card-fan-2.ogg +0 -0
  87. package/dist/sound-library/card-fan.ogg +0 -0
  88. package/dist/sound-library/card-place-2.ogg +0 -0
  89. package/dist/sound-library/card-place-3.ogg +0 -0
  90. package/dist/sound-library/card-place.ogg +0 -0
  91. package/dist/sound-library/card-shove-2.ogg +0 -0
  92. package/dist/sound-library/card-shove.ogg +0 -0
  93. package/dist/sound-library/card-slide-2.ogg +0 -0
  94. package/dist/sound-library/card-slide-3.ogg +0 -0
  95. package/dist/sound-library/card-slide-4.ogg +0 -0
  96. package/dist/sound-library/card-slide.ogg +0 -0
  97. package/dist/sound-library/chip-down-2.ogg +0 -0
  98. package/dist/sound-library/chip-down.ogg +0 -0
  99. package/dist/sound-library/chips-collide.ogg +0 -0
  100. package/dist/sound-library/chips-handle.ogg +0 -0
  101. package/dist/sound-library/chips-stack-2.ogg +0 -0
  102. package/dist/sound-library/chips-stack.ogg +0 -0
  103. package/dist/sound-library/chop.ogg +0 -0
  104. package/dist/sound-library/click-2.ogg +0 -0
  105. package/dist/sound-library/click-3.ogg +0 -0
  106. package/dist/sound-library/click.ogg +0 -0
  107. package/dist/sound-library/close.ogg +0 -0
  108. package/dist/sound-library/cloth.ogg +0 -0
  109. package/dist/sound-library/coins-2.ogg +0 -0
  110. package/dist/sound-library/coins.ogg +0 -0
  111. package/dist/sound-library/confirm-2.ogg +0 -0
  112. package/dist/sound-library/confirm.ogg +0 -0
  113. package/dist/sound-library/creak.ogg +0 -0
  114. package/dist/sound-library/deck-open.ogg +0 -0
  115. package/dist/sound-library/deck-take-out.ogg +0 -0
  116. package/dist/sound-library/dice-grab.ogg +0 -0
  117. package/dist/sound-library/dice-shake-2.ogg +0 -0
  118. package/dist/sound-library/dice-shake.ogg +0 -0
  119. package/dist/sound-library/dice-throw-2.ogg +0 -0
  120. package/dist/sound-library/dice-throw.ogg +0 -0
  121. package/dist/sound-library/die-throw-2.ogg +0 -0
  122. package/dist/sound-library/die-throw.ogg +0 -0
  123. package/dist/sound-library/door-close.ogg +0 -0
  124. package/dist/sound-library/door-open.ogg +0 -0
  125. package/dist/sound-library/drop.ogg +0 -0
  126. package/dist/sound-library/error-2.ogg +0 -0
  127. package/dist/sound-library/error.ogg +0 -0
  128. package/dist/sound-library/fail.ogg +0 -0
  129. package/dist/sound-library/fall.ogg +0 -0
  130. package/dist/sound-library/glass-break.ogg +0 -0
  131. package/dist/sound-library/glass-clink.ogg +0 -0
  132. package/dist/sound-library/glass-tap.ogg +0 -0
  133. package/dist/sound-library/glass.ogg +0 -0
  134. package/dist/sound-library/glitch.ogg +0 -0
  135. package/dist/sound-library/grow.ogg +0 -0
  136. package/dist/sound-library/high-up.ogg +0 -0
  137. package/dist/sound-library/hover-2.ogg +0 -0
  138. package/dist/sound-library/hover.ogg +0 -0
  139. package/dist/sound-library/jingle-2.ogg +0 -0
  140. package/dist/sound-library/jingle-3.ogg +0 -0
  141. package/dist/sound-library/jingle-4.ogg +0 -0
  142. package/dist/sound-library/jingle.ogg +0 -0
  143. package/dist/sound-library/jump.ogg +0 -0
  144. package/dist/sound-library/knife-draw.ogg +0 -0
  145. package/dist/sound-library/knife-slice.ogg +0 -0
  146. package/dist/sound-library/laser-2.ogg +0 -0
  147. package/dist/sound-library/laser.ogg +0 -0
  148. package/dist/sound-library/latch.ogg +0 -0
  149. package/dist/sound-library/level-up.ogg +0 -0
  150. package/dist/sound-library/lose-2.ogg +0 -0
  151. package/dist/sound-library/lose-3.ogg +0 -0
  152. package/dist/sound-library/lose-4.ogg +0 -0
  153. package/dist/sound-library/lose.ogg +0 -0
  154. package/dist/sound-library/low-down.ogg +0 -0
  155. package/dist/sound-library/metal-clang.ogg +0 -0
  156. package/dist/sound-library/metal-click.ogg +0 -0
  157. package/dist/sound-library/metal-crash.ogg +0 -0
  158. package/dist/sound-library/metal-tap.ogg +0 -0
  159. package/dist/sound-library/mouse-click.ogg +0 -0
  160. package/dist/sound-library/mouse-release.ogg +0 -0
  161. package/dist/sound-library/open.ogg +0 -0
  162. package/dist/sound-library/orchestra-hit-2.ogg +0 -0
  163. package/dist/sound-library/orchestra-hit.ogg +0 -0
  164. package/dist/sound-library/page-turn-2.ogg +0 -0
  165. package/dist/sound-library/page-turn.ogg +0 -0
  166. package/dist/sound-library/pickaxe.ogg +0 -0
  167. package/dist/sound-library/piece-down-2.ogg +0 -0
  168. package/dist/sound-library/piece-down-3.ogg +0 -0
  169. package/dist/sound-library/piece-down.ogg +0 -0
  170. package/dist/sound-library/piece-take-2.ogg +0 -0
  171. package/dist/sound-library/piece-take.ogg +0 -0
  172. package/dist/sound-library/piece-tap-2.ogg +0 -0
  173. package/dist/sound-library/piece-tap.ogg +0 -0
  174. package/dist/sound-library/plank.ogg +0 -0
  175. package/dist/sound-library/plate.ogg +0 -0
  176. package/dist/sound-library/pluck.ogg +0 -0
  177. package/dist/sound-library/pot.ogg +0 -0
  178. package/dist/sound-library/power-up-2.ogg +0 -0
  179. package/dist/sound-library/power-up-3.ogg +0 -0
  180. package/dist/sound-library/power-up.ogg +0 -0
  181. package/dist/sound-library/punch.ogg +0 -0
  182. package/dist/sound-library/question.ogg +0 -0
  183. package/dist/sound-library/rise.ogg +0 -0
  184. package/dist/sound-library/scratch.ogg +0 -0
  185. package/dist/sound-library/scroll.ogg +0 -0
  186. package/dist/sound-library/select-2.ogg +0 -0
  187. package/dist/sound-library/select.ogg +0 -0
  188. package/dist/sound-library/shrink.ogg +0 -0
  189. package/dist/sound-library/shuffle.ogg +0 -0
  190. package/dist/sound-library/soft-thud-2.ogg +0 -0
  191. package/dist/sound-library/soft-thud.ogg +0 -0
  192. package/dist/sound-library/space-junk.ogg +0 -0
  193. package/dist/sound-library/step-2.ogg +0 -0
  194. package/dist/sound-library/step-on-carpet.ogg +0 -0
  195. package/dist/sound-library/step-on-grass.ogg +0 -0
  196. package/dist/sound-library/step-on-snow.ogg +0 -0
  197. package/dist/sound-library/step-on-stone.ogg +0 -0
  198. package/dist/sound-library/step-on-wood.ogg +0 -0
  199. package/dist/sound-library/step.ogg +0 -0
  200. package/dist/sound-library/switch-2.ogg +0 -0
  201. package/dist/sound-library/switch.ogg +0 -0
  202. package/dist/sound-library/tap-2.ogg +0 -0
  203. package/dist/sound-library/tap.ogg +0 -0
  204. package/dist/sound-library/three-tones.ogg +0 -0
  205. package/dist/sound-library/tick-2.ogg +0 -0
  206. package/dist/sound-library/tick.ogg +0 -0
  207. package/dist/sound-library/tin.ogg +0 -0
  208. package/dist/sound-library/toggle-2.ogg +0 -0
  209. package/dist/sound-library/toggle.ogg +0 -0
  210. package/dist/sound-library/two-tones.ogg +0 -0
  211. package/dist/sound-library/win-2.ogg +0 -0
  212. package/dist/sound-library/win-3.ogg +0 -0
  213. package/dist/sound-library/win-4.ogg +0 -0
  214. package/dist/sound-library/win.ogg +0 -0
  215. package/dist/sound-library/wood-thud.ogg +0 -0
  216. package/dist/sound-library/zap.ogg +0 -0
  217. package/dist/sounds/BuiltInSounds.d.ts +41 -0
  218. package/dist/sounds/index.d.ts +9 -0
  219. package/dist/sounds/sounds.types.d.ts +22 -0
  220. package/dist/ui-calendar.js +1 -1
  221. package/dist/ui-dial.editor-CjjdKi5L.js +5 -0
  222. package/dist/ui-dial.editor-CjjdKi5L.js.map +1 -0
  223. package/dist/ui-dial.js +467 -0
  224. package/dist/ui-dial.js.map +1 -0
  225. package/dist/ui-graph.js +22 -0
  226. package/dist/ui-graph.js.map +1 -1
  227. package/dist/{ui-input.editor-budoNoB0.js → ui-input.editor-D11iRgXR.js} +2 -2
  228. package/dist/ui-input.editor-D11iRgXR.js.map +1 -0
  229. package/dist/ui-input.js +84 -54
  230. package/dist/ui-input.js.map +1 -1
  231. package/dist/ui-json.js +8 -8
  232. package/dist/ui-json.js.map +1 -1
  233. package/dist/ui-modal.js +183 -97
  234. package/dist/ui-modal.js.map +1 -1
  235. package/dist/ui-page-layout.editor-IgDEveUY.js +5 -0
  236. package/dist/ui-page-layout.editor-IgDEveUY.js.map +1 -0
  237. package/dist/ui-page-layout.js +217 -72
  238. package/dist/ui-page-layout.js.map +1 -1
  239. package/dist/ui-popup.js +34 -34
  240. package/dist/ui-popup.js.map +1 -1
  241. package/dist/ui-property-editor.js +7 -4
  242. package/dist/ui-property-editor.js.map +1 -1
  243. package/dist/ui-root.js +71 -5
  244. package/dist/ui-root.js.map +1 -1
  245. package/dist/ui-search.js +1 -1
  246. package/dist/ui-section.js +97 -96
  247. package/dist/ui-section.js.map +1 -1
  248. package/dist/ui-site-links.editor-BME3sw5H.js +5 -0
  249. package/dist/ui-site-links.editor-BME3sw5H.js.map +1 -0
  250. package/dist/ui-site-links.js +150 -0
  251. package/dist/ui-site-links.js.map +1 -0
  252. package/dist/ui-site-nav-button.editor-ChY4xe1U.js +5 -0
  253. package/dist/ui-site-nav-button.editor-ChY4xe1U.js.map +1 -0
  254. package/dist/ui-site-nav-button.js +57 -18
  255. package/dist/ui-site-nav-button.js.map +1 -1
  256. package/dist/{ui-site-tabs.editor-DDvQfH6S.js → ui-site-tabs.editor-CdMIw4jw.js} +2 -2
  257. package/dist/ui-site-tabs.editor-CdMIw4jw.js.map +1 -0
  258. package/dist/ui-site-tabs.js +30 -14
  259. package/dist/ui-site-tabs.js.map +1 -1
  260. package/dist/ui-slider.js +75 -124
  261. package/dist/ui-slider.js.map +1 -1
  262. package/dist/ui-statistic.js +1 -0
  263. package/dist/ui-statistic.js.map +1 -1
  264. package/dist/ui-theme-editor.js +2 -2
  265. package/dist/{ui-theme-menu-BZYUMrHe.js → ui-theme-menu-BEBu6dyq.js} +3 -3
  266. package/dist/{ui-theme-menu-BZYUMrHe.js.map → ui-theme-menu-BEBu6dyq.js.map} +1 -1
  267. package/dist/ui-toc.js +159 -122
  268. package/dist/ui-toc.js.map +1 -1
  269. package/dist/ui-tree.js +142 -87
  270. package/dist/ui-tree.js.map +1 -1
  271. package/dist/ui-uploader.editor-DrE80KjL.js +5 -0
  272. package/dist/ui-uploader.editor-DrE80KjL.js.map +1 -0
  273. package/dist/ui-uploader.js +1442 -0
  274. package/dist/ui-uploader.js.map +1 -0
  275. package/dist/vocabulary/hooks.generated.d.ts +7 -0
  276. package/package.json +1 -1
  277. package/dist/UIInput-B3K0w4ow.js.map +0 -1
  278. package/dist/UIRuntime-DCv4sy30.js.map +0 -1
  279. package/dist/components.es-DilRG1VO.js.map +0 -1
  280. package/dist/ui-input.editor-budoNoB0.js.map +0 -1
  281. package/dist/ui-page-layout.editor-xtQW0FZk.js +0 -5
  282. package/dist/ui-page-layout.editor-xtQW0FZk.js.map +0 -1
  283. package/dist/ui-site-nav-button.editor-6J-zJLtZ.js +0 -5
  284. package/dist/ui-site-nav-button.editor-6J-zJLtZ.js.map +0 -1
  285. package/dist/ui-site-tabs.editor-DDvQfH6S.js.map +0 -1
@@ -0,0 +1,167 @@
1
+ import { E } from 'spell/ui/core';
2
+ import { dialVocabulary } from './UIDial.en';
3
+ /****************
4
+ * ### `DialFallback`
5
+ * The native fallback of `<ui-dial>`: what it shows when its component breaks,
6
+ * so the value is still chosen and submitted with the form.
7
+ *
8
+ * - Its shadow DOM: a native `<input type="range" part="control">` in the root
9
+ * (`<div class="ui … dial" part="dial">`), then the `label`'s words.
10
+ * - Still a form control. `input` / `change`:
11
+ * - set the DOM element's form value
12
+ * - set `domElement.value`
13
+ * - send a composed `ui-moved` / `ui-changed`.
14
+ * - Its starting value is the DOM element's `value` PROPERTY, else the attribute;
15
+ * `min` / `max` / `step` default to 0 / 100 / 1, as the dial's.
16
+ * - Named by the DOM element's `aria-*` (copied onto the input), else its `label`.
17
+ ****************/
18
+ export declare class DialFallback extends E.NativeFallback<typeof dialVocabulary> {
19
+ static vocabulary: {
20
+ readonly tag: "ui-dial";
21
+ readonly icon: "gauge";
22
+ readonly snippet: "<ui-dial label=\"Volume\"></ui-dial>";
23
+ readonly formControl: true;
24
+ readonly topics: readonly ["inputs", "forms", "controls", "modules"];
25
+ readonly aka: readonly ["knob", "rotary knob", "radial slider", "circular slider", "gauge", "arc slider"];
26
+ readonly skeleton: "inline 10 x 11.5";
27
+ readonly noun: "dial";
28
+ readonly partOfSpeech: "action";
29
+ readonly description: "A dial lets people pick a number by turning it, with its value in the middle and its label under it.";
30
+ readonly attributes: readonly [{
31
+ readonly name: "label";
32
+ readonly group: "name";
33
+ readonly kind: "string";
34
+ readonly description: "The words under the dial; also its name for screen readers, unless `aria-label` or a `<label for>` names it.";
35
+ }, {
36
+ readonly name: "size";
37
+ readonly group: "appearance";
38
+ readonly kind: "size";
39
+ readonly description: "Size of the whole dial, `mini` ... `massive`.";
40
+ }, {
41
+ readonly name: "color";
42
+ readonly group: "appearance";
43
+ readonly kind: "color";
44
+ readonly description: "Hue of the arc and the handle; uncoloured, the theme's primary colour.";
45
+ }, {
46
+ readonly name: "ticks";
47
+ readonly group: "appearance";
48
+ readonly kind: "string";
49
+ readonly description: string;
50
+ }, {
51
+ readonly name: "unit";
52
+ readonly group: "appearance";
53
+ readonly kind: "string";
54
+ readonly description: "Written right after the number: `unit=\"%\"` shows `98%`, `unit=\" px\"` shows `16 px`.";
55
+ }, {
56
+ readonly name: "disabled";
57
+ readonly group: "states";
58
+ readonly kind: "keyOnly";
59
+ readonly description: "Can't be used: dimmed, not focusable, left out of the form.";
60
+ }, {
61
+ readonly description: "Shows its value but can't be changed; still focusable and submitted.";
62
+ readonly name: "readonly";
63
+ readonly group: "form";
64
+ readonly kind: "keyOnly";
65
+ readonly property: "readOnly";
66
+ readonly key: "read-only";
67
+ }, {
68
+ readonly name: "min";
69
+ readonly group: "form";
70
+ readonly kind: "number";
71
+ readonly default: 0;
72
+ readonly description: "Lowest value, at the ring's start.";
73
+ }, {
74
+ readonly name: "max";
75
+ readonly group: "form";
76
+ readonly kind: "number";
77
+ readonly default: 100;
78
+ readonly description: "Highest value, at the ring's end.";
79
+ }, {
80
+ readonly name: "step";
81
+ readonly group: "form";
82
+ readonly kind: "number";
83
+ readonly default: 1;
84
+ readonly description: "Values snap to multiples of it from `min`; `0`: any.";
85
+ }, {
86
+ readonly name: "value";
87
+ readonly group: "form";
88
+ readonly kind: "number";
89
+ readonly reflect: false;
90
+ readonly description: "The value, default `min`. Attribute: the starting (and reset) value; property: the live one.";
91
+ }, {
92
+ readonly name: "name";
93
+ readonly group: "name";
94
+ readonly kind: "string";
95
+ readonly description: "Form field name.";
96
+ }, {
97
+ readonly name: "parameter";
98
+ readonly group: "form";
99
+ readonly kind: "string";
100
+ readonly description: string;
101
+ }, {
102
+ readonly description: string;
103
+ readonly name: "required";
104
+ readonly group: "form";
105
+ readonly kind: "boolean";
106
+ }];
107
+ readonly events: readonly [{
108
+ readonly name: "ui-moved";
109
+ readonly detail: "{ value: number, originalEvent?: Event }";
110
+ readonly description: "The handle moved (each drag step, key or wheel turn). A handler that re-sets `value` wins.";
111
+ }, {
112
+ readonly name: "ui-changed";
113
+ readonly detail: "{ value: number, originalEvent?: Event }";
114
+ readonly description: "A change was committed: on a key or wheel turn, or when a drag ends somewhere new.";
115
+ }];
116
+ readonly slots: readonly [];
117
+ readonly parts: readonly [{
118
+ readonly name: "dial";
119
+ readonly description: "The root box: the ring, then the label.";
120
+ }, {
121
+ readonly name: "control";
122
+ readonly description: "The round control itself (`role=slider`), which takes focus.";
123
+ }, {
124
+ readonly name: "track";
125
+ readonly description: "The empty ring.";
126
+ }, {
127
+ readonly name: "track-fill";
128
+ readonly description: "The coloured arc, from the start to the value.";
129
+ }, {
130
+ readonly name: "handle";
131
+ readonly description: "The round handle, at the arc's end.";
132
+ }, {
133
+ readonly name: "disc";
134
+ readonly description: "The disc in the middle.";
135
+ }, {
136
+ readonly name: "ticks";
137
+ readonly description: "The tick dots (`ticks`).";
138
+ }, {
139
+ readonly name: "value";
140
+ readonly description: "The value, written in the disc.";
141
+ }, {
142
+ readonly name: "label";
143
+ readonly description: "The words under the dial (`label`).";
144
+ }];
145
+ readonly states: readonly [{
146
+ readonly name: "disabled";
147
+ readonly description: "Can't be used.";
148
+ }, {
149
+ readonly name: "dragging";
150
+ readonly description: "The handle is being dragged.";
151
+ }, {
152
+ readonly description: "Fails validation (`required`), once a person has interacted.";
153
+ readonly name: "invalid";
154
+ }];
155
+ readonly texts: readonly [];
156
+ };
157
+ static degraded: string[];
158
+ /** The native input, once built, for `sync()`. */
159
+ private input?;
160
+ protected build(): HTMLDivElement[];
161
+ /** The input moved: update the DOM element, send event `name`. */
162
+ private changed;
163
+ /** The value; a range input is never invalid, so no validity. */
164
+ protected sync(): void;
165
+ /** The DOM element's attribute `name` as a number, else `fallback`. */
166
+ private number;
167
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Constants of the `ui-dial` family that its component (`UIDial`) and its native fallback (`DialFallback`) share.
3
+ * - Pure data: no imports at all, so node can load it (`yarn site:data`).
4
+ * - A constant ONE class uses is a module constant below that class.
5
+ */
6
+ /** The lowest value when `min` is unset. */
7
+ export declare const DEFAULT_MIN = 0;
8
+ /** The highest value when `max` is unset: a dial reads as a percent of a turn by default. */
9
+ export declare const DEFAULT_MAX = 100;
10
+ /** The step when `step` is unset. */
11
+ export declare const DEFAULT_STEP = 1;
@@ -0,0 +1,3 @@
1
+ import { UIDial } from './UIDial';
2
+ import { DialArc } from './DialArc';
3
+ export { UIDial, DialArc };
@@ -173,6 +173,23 @@ export declare class UIGraph extends E.UIComponent<typeof graphVocabulary> {
173
173
  readonly text: "Loading …";
174
174
  readonly description: "A node whose children are loading.";
175
175
  }];
176
+ readonly hooks: readonly [{
177
+ readonly name: "nodeLabel";
178
+ readonly words: "give the label of (a node)";
179
+ readonly description: "A node's text; by default its `label`, else its id.";
180
+ }, {
181
+ readonly name: "nodeClass";
182
+ readonly words: "give the class of (a node)";
183
+ readonly description: "Extra class names on a node, for the subclass's own sheet.";
184
+ }, {
185
+ readonly name: "edgeLabel";
186
+ readonly words: "give the label of (an edge)";
187
+ readonly description: "An edge's text, at its middle; none: no text.";
188
+ }, {
189
+ readonly name: "edgeClass";
190
+ readonly words: "give the class of (an edge)";
191
+ readonly description: "Extra class names on an edge, for the subclass's own sheet.";
192
+ }];
176
193
  };
177
194
  static elementSetup: {
178
195
  styleSheets: {
@@ -134,4 +134,21 @@ export declare const graphVocabulary: {
134
134
  readonly text: "Loading …";
135
135
  readonly description: "A node whose children are loading.";
136
136
  }];
137
+ readonly hooks: readonly [{
138
+ readonly name: "nodeLabel";
139
+ readonly words: "give the label of (a node)";
140
+ readonly description: "A node's text; by default its `label`, else its id.";
141
+ }, {
142
+ readonly name: "nodeClass";
143
+ readonly words: "give the class of (a node)";
144
+ readonly description: "Extra class names on a node, for the subclass's own sheet.";
145
+ }, {
146
+ readonly name: "edgeLabel";
147
+ readonly words: "give the label of (an edge)";
148
+ readonly description: "An edge's text, at its middle; none: no text.";
149
+ }, {
150
+ readonly name: "edgeClass";
151
+ readonly words: "give the class of (an edge)";
152
+ readonly description: "Extra class names on an edge, for the subclass's own sheet.";
153
+ }];
137
154
  };
@@ -45,4 +45,10 @@ export declare const graphEs: {
45
45
  readonly graphTop: "Inicio";
46
46
  readonly graphLoading: "Cargando …";
47
47
  };
48
+ readonly hooks: {
49
+ readonly nodeLabel: "dar la etiqueta de (un nodo)";
50
+ readonly nodeClass: "dar la clase de (un nodo)";
51
+ readonly edgeLabel: "dar la etiqueta de (una arista)";
52
+ readonly edgeClass: "dar la clase de (una arista)";
53
+ };
48
54
  };
@@ -1,8 +1,26 @@
1
1
  import { JSX } from '@solidjs/web';
2
2
  import { E } from 'spell/ui/core';
3
+ import { F } from 'spell/ui/forms';
3
4
  import { InputFallback } from './UIInput.fallback';
4
5
  import { TextControl } from './TextControl';
5
6
  import { CommonAttributes, LabelPlace, Vocabulary } from './UIInput.types';
7
+ /****************
8
+ * ### `DOMInputElement`
9
+ * The `<ui-input>` in the page: a native input's members its component answers.
10
+ * - `showPicker()`: opens the inner native input's picker, as `HTMLInputElement.showPicker()` does.
11
+ * - `files`: a `file` input's files.
12
+ * - Above the component: its `elementSetup` reads this class while the component is defined.
13
+ ****************/
14
+ export declare class DOMInputElement extends F.DOMFormControl<UIInput> {
15
+ /** A `file` input's chosen files, in the order picked; empty for any other type. */
16
+ get files(): readonly File[];
17
+ /**
18
+ * Open its picker, as a native input's `showPicker()`: a `file` input's dialog, a `date`'s calendar ...
19
+ * - The browser opens it only from a person's click or key, as natively.
20
+ * - throws as the native one does: `NotAllowedError` without that click, `InvalidStateError` while disabled
21
+ */
22
+ showPicker(): void;
23
+ }
6
24
  /****************
7
25
  * ### `UIInput`
8
26
  * The component behind `<ui-input>`: a one-line text field.
@@ -11,7 +29,10 @@ import { CommonAttributes, LabelPlace, Vocabulary } from './UIInput.types';
11
29
  * with the optional joined label, action buttons and icon box, in the order `UIInput.css` documents.
12
30
  * - A form control (see `TextControl`): its value, native constraints + `rules`, reset, a disabled fieldset.
13
31
  * - `type` passes through to the native input.
14
- * `file` submits the chosen `File`s (one `FormData` entry each), and script can't set its value, as natively.
32
+ * `file` submits the chosen `File`s (one `FormData` entry each), and script can't set its value, as natively;
33
+ * `folder` makes it pick whole folders.
34
+ * - `showPicker()` opens the native input's picker from script (`DOMInputElement`):
35
+ * `<ui-uploader>` opens its file dialog that way.
15
36
  * `percent` is ours (epic `language` P34): a number field for a part of a whole, see `isPercent`.
16
37
  * - Enter submits the form, as in a native field ("implicit submission"):
17
38
  * it clicks the form's first submit button, else calls `requestSubmit()`.
@@ -187,6 +208,11 @@ export declare class UIInput extends TextControl<Vocabulary> {
187
208
  readonly group: "form";
188
209
  readonly kind: "string";
189
210
  readonly description: "`file`: accepted file types.";
211
+ }, {
212
+ readonly name: "folder";
213
+ readonly group: "form";
214
+ readonly kind: "boolean";
215
+ readonly description: string;
190
216
  }, {
191
217
  readonly name: "autocomplete";
192
218
  readonly group: "form";
@@ -213,7 +239,7 @@ export declare class UIInput extends TextControl<Vocabulary> {
213
239
  }, {
214
240
  readonly name: "ui-changed";
215
241
  readonly detail: "{ value: string, originalEvent?: Event }";
216
- readonly description: "Someone committed a change (blur, Enter, picking a file).";
242
+ readonly description: "Someone committed a change (blur, Enter, picking a file); a file input's element holds them in `files`.";
217
243
  }];
218
244
  readonly slots: readonly [{
219
245
  readonly name: "label";
@@ -259,6 +285,7 @@ export declare class UIInput extends TextControl<Vocabulary> {
259
285
  input: string;
260
286
  };
261
287
  Fallback: typeof InputFallback;
288
+ DOMElement: typeof DOMInputElement;
262
289
  loading: "its own";
263
290
  };
264
291
  /** Which slots have light-DOM children (`label`, `action`, `icon`). */
@@ -288,11 +315,27 @@ export declare class UIInput extends TextControl<Vocabulary> {
288
315
  get isFileInput(): boolean;
289
316
  /** Files chosen in a `file` input. */
290
317
  accessor files: readonly File[];
318
+ /**
319
+ * Open the native input's picker (`DOMInputElement.showPicker()`).
320
+ * - A browser with no `showPicker()` gets a click on the input instead, which opens a file dialog.
321
+ * - throws as the native one does
322
+ */
323
+ showPicker(): void;
324
+ /** `folder`: the native input picks folders (the browser's `webkitdirectory`). */
325
+ protected get folderMode(): Record<string, unknown>;
326
+ /** A file input's value set to `""` (by script) forgets its files, as a native one does: so they can be picked again. */
327
+ protected onFileValueCleared(): void;
328
+ /** Forget the chosen files, in the native input too, which only script can empty. */
329
+ private forgetFiles;
291
330
  /** Files submit themselves: one entry per file. */
292
331
  protected formSubmission(value: E.FieldValue, name: string | undefined): string | File | FormData | null;
293
332
  /** Also clears a file input's chosen files, which only script can. */
294
333
  onFormReset(): void;
295
- /** `change`: a file input's value and files arrive here too. */
334
+ /**
335
+ * `change`: a file input's value and files arrive here too.
336
+ * - A `ui-changed` handler that empties it (`value = ""`, to pick the same file again) forgets them at once:
337
+ * the value is back where it started before any effect runs, so `onFileValueCleared()` never sees it change.
338
+ */
296
339
  private readonly onFileOrChange;
297
340
  protected classValue(name: E.AttributeName<Vocabulary>): unknown;
298
341
  protected get extraClass(): string | undefined;
@@ -185,6 +185,11 @@ export declare const inputVocabulary: {
185
185
  readonly group: "form";
186
186
  readonly kind: "string";
187
187
  readonly description: "`file`: accepted file types.";
188
+ }, {
189
+ readonly name: "folder";
190
+ readonly group: "form";
191
+ readonly kind: "boolean";
192
+ readonly description: string;
188
193
  }, {
189
194
  readonly name: "autocomplete";
190
195
  readonly group: "form";
@@ -211,7 +216,7 @@ export declare const inputVocabulary: {
211
216
  }, {
212
217
  readonly name: "ui-changed";
213
218
  readonly detail: "{ value: string, originalEvent?: Event }";
214
- readonly description: "Someone committed a change (blur, Enter, picking a file).";
219
+ readonly description: "Someone committed a change (blur, Enter, picking a file); a file input's element holds them in `files`.";
215
220
  }];
216
221
  readonly slots: readonly [{
217
222
  readonly name: "label";
@@ -12,6 +12,7 @@ export declare const inputEs: {
12
12
  readonly aka: readonly ["entrada", "campo de texto", "cuadro de texto", "campo de entrada", "cuadro de búsqueda"];
13
13
  readonly attributes: {
14
14
  readonly action: "accion";
15
+ readonly folder: "carpeta";
15
16
  };
16
17
  readonly values: {
17
18
  readonly type: {
@@ -184,6 +184,11 @@ export declare class InputFallback extends E.NativeFallback<Vocabulary> {
184
184
  readonly group: "form";
185
185
  readonly kind: "string";
186
186
  readonly description: "`file`: accepted file types.";
187
+ }, {
188
+ readonly name: "folder";
189
+ readonly group: "form";
190
+ readonly kind: "boolean";
191
+ readonly description: string;
187
192
  }, {
188
193
  readonly name: "autocomplete";
189
194
  readonly group: "form";
@@ -210,7 +215,7 @@ export declare class InputFallback extends E.NativeFallback<Vocabulary> {
210
215
  }, {
211
216
  readonly name: "ui-changed";
212
217
  readonly detail: "{ value: string, originalEvent?: Event }";
213
- readonly description: "Someone committed a change (blur, Enter, picking a file).";
218
+ readonly description: "Someone committed a change (blur, Enter, picking a file); a file input's element holds them in `files`.";
214
219
  }];
215
220
  readonly slots: readonly [{
216
221
  readonly name: "label";
@@ -44,7 +44,7 @@ export declare class DOMJsonElement extends E.DOMLoadableElement<UIJson> {
44
44
  *
45
45
  * The outline:
46
46
  * - Two spaces per level, monospace, coloured by the theme's code tokens (`--ui-code-attr`, `--ui-code-string` ...).
47
- * - A header (part `header`; `no-header` hides it), of plain icon buttons:
47
+ * - A header (part `header`; `no-header` hides it), of mini `<ui-button>`s with no ring:
48
48
  * Copy, and a toggle for the quotes round keys (`quotes`).
49
49
  * - Each object and array has a toggle in the gutter just before its own indent:
50
50
  * a real `<button aria-expanded>` (part `toggle`) holding a chevron; Alt-click opens or closes its branch.
@@ -309,9 +309,10 @@ export declare class UIJson extends E.LoadableComponent<typeof jsonVocabulary> {
309
309
  /** Keep `columns` in step with the element's width: a closed line's preview is cut to it. */
310
310
  protected watchWidth(): (() => void) | undefined;
311
311
  /**
312
- * Copy and the quotes toggle: plain icon buttons, as big as an example's code button.
313
- * - Native `<button>`s, not `<ui-button>`s: no ring at rest, a background only on hover, a fill while pressed.
314
- * - The quotes toggle draws its glyph as text, `""`: the icon set has no outline quote mark.
312
+ * Copy and the quotes toggle: mini basic `<ui-button>`s, as big as an example's code button.
313
+ * - The sheet takes their ring off: a background only on hover, a fill while the quotes toggle is pressed.
314
+ * - The quotes toggle is a `toggle`, so its inner button says `aria-pressed`; `selected` follows `quotes`.
315
+ * - It draws its glyph as text, `""`: the icon set has no outline quote mark.
315
316
  */
316
317
  private header;
317
318
  /** The whole outline, rebuilt only when the data changes. */
@@ -0,0 +1,61 @@
1
+ import { E } from 'spell/ui/core';
2
+ /****************
3
+ * ### `ChoiceRows`
4
+ * The rows of `UI.modals.choose()`'s dialog, and which of them are picked (epic `language` P66).
5
+ * - Up to `BUTTON_ROWS` rows: a `<ui-button>` each, one under another.
6
+ * - More: a `<ui-list selection>` of `<ui-item>`s that scrolls, with a search box above it, which hides the rows
7
+ * whose words don't hold what's typed.
8
+ * - `shown`: how many rows show before the rows scroll; default every button, or `LIST_ROWS` of a list.
9
+ * - One: a row picks itself (`onPicked()`), and the dialog closes.
10
+ * - Several: each row turns on and off; `onCountChanged()` says whether OK may pick them (`fits`).
11
+ * - A row with a `color`: a `<ui-color-chip>` before its words, read-only, so the row around it is what's picked;
12
+ * `ModalDialogs.choose()` imports the chip's family first.
13
+ * - Plain DOM, built with `createElement` / `textContent`, as `ModalDialogs` is: never `innerHTML` with caller text.
14
+ * - Other families' tags are found by class noun (`tagFor`), as `ModalDialogs` finds them.
15
+ ****************/
16
+ export declare class ChoiceRows {
17
+ /** what the dialog holds: the rows, and the search box above a long list */
18
+ readonly element: HTMLElement;
19
+ /** pick several */
20
+ readonly several: boolean;
21
+ /** the rows picked, by position */
22
+ readonly picked: Set<number>;
23
+ /** a row picked itself: one, never several */
24
+ onPicked: () => void;
25
+ /** several: the rows picked changed */
26
+ onCountChanged: () => void;
27
+ private readonly document;
28
+ private readonly least;
29
+ private readonly most;
30
+ constructor({ document, options, tagFor }: ChoiceRowsProps);
31
+ /** May OK pick the rows picked now? Several: as many as `least` to `most`. */
32
+ get fits(): boolean;
33
+ /** The rows picked, by position, in the order they show. */
34
+ get positions(): number[];
35
+ /** A `<ui-button>` per row, one under another; a `toggle` button each, for several. */
36
+ private drawButtons;
37
+ /** A search box, then a `<ui-list selection>` of the rows, `shown` of them tall. */
38
+ private drawList;
39
+ /** A box `shown` rows of `rowHeight` tall, that scrolls past that; none: as tall as its rows. */
40
+ private scroller;
41
+ /** A row's words, and its color's chip before them. */
42
+ private words;
43
+ /** One: `position` is picked, and the dialog closes. */
44
+ private pick;
45
+ /** Several: `position` turned on or off. */
46
+ private turn;
47
+ }
48
+ /** What `ChoiceRows` is made from. */
49
+ export type ChoiceRowsProps = {
50
+ /** page to build in */
51
+ document: Document;
52
+ /** the dialog's options: its rows, and how many may be picked */
53
+ options: E.ChooseModalOptions;
54
+ /** the registered tag of a class noun: `ModalDialogs.tagFor()` */
55
+ tagFor: TagFor;
56
+ };
57
+ /** The registered tag of a class noun, `button` => `ui-button`. */
58
+ type TagFor = (noun: string) => string;
59
+ /** The most rows drawn as buttons: past it, a list with a search box (Q75). */
60
+ export declare const BUTTON_ROWS = 20;
61
+ export {};
@@ -1,7 +1,8 @@
1
1
  import { E } from 'spell/ui/core';
2
2
  /****************
3
3
  * ### `ModalDialogs`
4
- * The dialogs behind `UI.modals.confirm()` / `alert()` / `prompt()` (Fomantic's `$.modal('confirm', …)`):
4
+ * The dialogs behind `UI.modals.confirm()` / `alert()` / `prompt()` (Fomantic's `$.modal('confirm', …)`),
5
+ * and `choose()`'s pick from a list (its rows: `ChoiceRows`):
5
6
  * a `<ui-modal>` built for the call, appended to `<body>`, shown (`visible`), and removed once hidden.
6
7
  *
7
8
  * - Markup: `<ui-modal size="tiny" closedby="closerequest" closable heading="title">` holding
@@ -35,6 +36,15 @@ export declare class ModalDialogs implements E.ModalProvider {
35
36
  alert(options: E.ModalOptions): Promise<void>;
36
37
  /** Ask for one line of text: resolves with it on approve, `undefined` on deny or Escape. */
37
38
  prompt(options: E.ModalOptions): Promise<string | undefined>;
39
+ /**
40
+ * Ask the person to pick from `options.rows`: resolves with the positions picked, `undefined` on deny or Escape
41
+ * (epic `language` P66).
42
+ * - One: a row picks itself, and the dialog closes; no OK button.
43
+ * - Several: each row turns on and off; OK stays off until as many as `least` to `most` are on.
44
+ * - More than `BUTTON_ROWS` rows: the list family is imported first, for its `<ui-list>`.
45
+ * - A row with a color: the theme editor's family is imported first, for its `<ui-color-chip>`.
46
+ */
47
+ choose(options: E.ChooseModalOptions): Promise<number[] | undefined>;
38
48
  /**
39
49
  * Build, open and await one dialog; `result()` turns "approved?" and the input's value into the answer.
40
50
  * - SIDE EFFECT: a `<ui-modal>` in `<body>` until it has hidden.
@@ -46,6 +56,10 @@ export declare class ModalDialogs implements E.ModalProvider {
46
56
  * - Plain text opens at once, in the same task as the call: callers and tests find the dialog straight away.
47
57
  */
48
58
  private open;
59
+ /**
60
+ * SIDE EFFECT: `rows` answer `modal`: a row picked hides it; several keep `approve` off until the count fits.
61
+ */
62
+ private answerWith;
49
63
  /**
50
64
  * The message as a paragraph, a `\n` in it a line break.
51
65
  * - `size`: its words in a `<span>` of that text size, so the paragraph's own margins stay the dialog's
@@ -149,11 +149,15 @@ export declare class UIModal extends DialogComponent<Vocabulary> {
149
149
  }, {
150
150
  readonly key: "ok";
151
151
  readonly text: "OK";
152
- readonly description: "Approve button of `UI.modals.confirm()` / `alert()` / `prompt()`.";
152
+ readonly description: "Approve button of `UI.modals.confirm()` / `alert()` / `prompt()`, and `choose()` picking several.";
153
153
  }, {
154
154
  readonly key: "cancel";
155
155
  readonly text: "Cancel";
156
- readonly description: "Deny button of `UI.modals.confirm()` / `prompt()`.";
156
+ readonly description: "Deny button of `UI.modals.confirm()` / `prompt()` / `choose()`.";
157
+ }, {
158
+ readonly key: "search";
159
+ readonly text: "Search";
160
+ readonly description: "Search box above a long list of `UI.modals.choose()`.";
157
161
  }];
158
162
  readonly ownsParts: readonly ["header", "content", "description", "actions"];
159
163
  };
@@ -152,11 +152,15 @@ export declare const modalVocabulary: {
152
152
  }, {
153
153
  readonly key: "ok";
154
154
  readonly text: "OK";
155
- readonly description: "Approve button of `UI.modals.confirm()` / `alert()` / `prompt()`.";
155
+ readonly description: "Approve button of `UI.modals.confirm()` / `alert()` / `prompt()`, and `choose()` picking several.";
156
156
  }, {
157
157
  readonly key: "cancel";
158
158
  readonly text: "Cancel";
159
- readonly description: "Deny button of `UI.modals.confirm()` / `prompt()`.";
159
+ readonly description: "Deny button of `UI.modals.confirm()` / `prompt()` / `choose()`.";
160
+ }, {
161
+ readonly key: "search";
162
+ readonly text: "Search";
163
+ readonly description: "Search box above a long list of `UI.modals.choose()`.";
160
164
  }];
161
165
  readonly ownsParts: readonly ["header", "content", "description", "actions"];
162
166
  };
@@ -21,5 +21,6 @@ export declare const modalEs: {
21
21
  readonly close: "Cerrar";
22
22
  readonly ok: "Aceptar";
23
23
  readonly cancel: "Cancelar";
24
+ readonly search: "Buscar";
24
25
  };
25
26
  };