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
@@ -10,6 +10,8 @@ import { Browser } from './Browser';
10
10
  * - The bubble and a box over the target live at the end of `<body>`:
11
11
  * an anchor name only reaches its own tree, and a target may be in a shadow root.
12
12
  * - A target with no box of its own (`display: contents`, a `<ui-item>`) shows it at its drawn boxes (`boxOf()`).
13
+ * - A target partly cut off by a box around it (`overflow: hidden`, a text cut short with a `…`) shows it at the part
14
+ * that shows (`visiblePartOf()`).
13
15
  * - It takes the target's `--ui-tooltip-*` values as they resolve there, so a theme around the target still shows.
14
16
  * - When it shows:
15
17
  * - the pointer on a target: after `--ui-tooltip-delay` (by default `--ui-hover-delay`)
@@ -29,6 +31,8 @@ export declare class DataTooltips {
29
31
  private box;
30
32
  /** The target the bubble's showing. */
31
33
  private shown;
34
+ /** The innermost element the pointer was last over (`onPointerMove()`). */
35
+ private pointedAt;
32
36
  /** The target under the pointer. */
33
37
  private hovered;
34
38
  /** The target holding keyboard focus. */
@@ -47,6 +51,12 @@ export declare class DataTooltips {
47
51
  */
48
52
  start(): void;
49
53
  private readonly onPointerOver;
54
+ /**
55
+ * The pointer moved onto another element with no `pointerover` saying so: Chromium sometimes sends none, on an
56
+ * epic page's sticky header (headless Chromium, 2026-11-19; `:hover` moved, the boundary events didn't).
57
+ * - Only when the innermost element under it changed: a move inside one element costs a comparison.
58
+ */
59
+ private readonly onPointerMove;
50
60
  /** The pointer left the window: no `pointerover` comes to say so. */
51
61
  private readonly onPointerOut;
52
62
  /** Only keyboard focus, so a click on a button doesn't pin its tooltip open. */
@@ -1,8 +1,8 @@
1
- import { Disposer, ModalOptions, ModalProvider } from './runtime.types';
1
+ import { ChooseModalOptions, Disposer, ModalOptions, ModalProvider } from './runtime.types';
2
2
  /****************
3
3
  * ### `Modals`
4
4
  * Promise-based dialogs, as `UI.modals`: `confirm()`, `alert()`, `prompt()` -- the Fomantic
5
- * `$.modal('confirm', ...)` shortcuts.
5
+ * `$.modal('confirm', ...)` shortcuts -- and `choose()`, a pick from a list.
6
6
  * - A thin front door: the `ui-modal` family registers its provider (`register()`) when it's imported, so the
7
7
  * runtime chunk carries no modal markup.
8
8
  * - Until then every method throws, rather than falling back to `window.confirm()` with different behaviour;
@@ -37,6 +37,11 @@ export declare class Modals {
37
37
  alert(options: ModalOptions | string): Promise<void>;
38
38
  /** Resolves with the entered text, or `undefined` on deny / dismiss. */
39
39
  prompt(options: ModalOptions | string): Promise<string | undefined>;
40
+ /**
41
+ * Resolves with the positions of the rows picked, or `undefined` on deny / dismiss (epic `language` P66).
42
+ * - One: a row picks itself; several (`options.several`): each row turns on and off, and OK picks them.
43
+ */
44
+ choose(options: ChooseModalOptions): Promise<number[] | undefined>;
40
45
  /** `Modals.provider`; throws until the `ui-modal` family has registered one. */
41
46
  private get registeredProvider();
42
47
  /** Options for `input`: a bare string is the message. */
@@ -114,7 +114,13 @@ export declare class Styles {
114
114
  private startApp;
115
115
  /** Recompute one root's `adoptedStyleSheets`. */
116
116
  private push;
117
- /** Re-push every live root; drops collected ones. */
117
+ /**
118
+ * Re-push every live root; drops collected ones.
119
+ * - Skips a root out of the page's document for the moment: its element being moved through a detached template's
120
+ * (Solid inserts a child before the new parent is on the page), where the browser refuses the page's sheets
121
+ * ("Sharing constructed stylesheets in multiple documents is not allowed"; epic `editor` P37).
122
+ * Its own sheets came when it was made; it keeps them.
123
+ */
118
124
  private refreshRoots;
119
125
  /** Put the page sheets onto `document.adoptedStyleSheets`, keeping anything else already there. */
120
126
  private refreshPage;
@@ -1,5 +1,6 @@
1
1
  import { Api } from '../_util/Api';
2
2
  import { Vocabulary } from 'spell/ui/vocabulary';
3
+ import { BuiltInSounds } from 'spell/ui/sounds';
3
4
  import { Disposer, ToastHandle, ToastOptions, VisibilityOptions } from './runtime.types';
4
5
  import { Browser } from './Browser';
5
6
  import { CodeLanguages } from './CodeLanguages';
@@ -72,6 +73,11 @@ export declare class UIRuntime {
72
73
  readonly api: Api;
73
74
  /** the page's icon packs (`<ui-root icons>` adds child sets) and the SVG cache */
74
75
  readonly icons: IconPacks;
76
+ /**
77
+ * Spell's built-in sounds, by name: `url("card slide")` is where its file is.
78
+ * - What a Spell program's `play "card slide"` asks (core's `play()`), as core never imports Spell UI.
79
+ */
80
+ readonly sounds: typeof BuiltInSounds;
75
81
  /** same-origin text files elements load and save (`<ui-include>`, `<ui-code>`, `<ui-markdown>`) */
76
82
  readonly sources: Sources;
77
83
  /** languages `<ui-code>` highlights beyond its own: `register()`, e.g. spell */
@@ -363,7 +363,7 @@ export type ToastProvider = {
363
363
  /** remove a toast early */
364
364
  dismiss(id: string): void;
365
365
  };
366
- /** Options for `UI.modals.confirm/alert/prompt()`. */
366
+ /** Options for `UI.modals.confirm/alert/prompt/choose()`. */
367
367
  export type ModalOptions = {
368
368
  /** header text */
369
369
  title?: string;
@@ -394,6 +394,29 @@ export type ModalOptions = {
394
394
  */
395
395
  closable?: boolean;
396
396
  };
397
+ /**
398
+ * Options for `UI.modals.choose()`: a dialog's, and its rows (epic `language` P66).
399
+ * - Up to 20 rows: a button each. More: a list that scrolls, with a search box above it.
400
+ */
401
+ export type ChooseModalOptions = ModalOptions & {
402
+ /** what's picked from, one row each */
403
+ rows: readonly ChoiceRow[];
404
+ /** pick several: each row turns on and off, and OK picks them; else a row picks itself, and the dialog closes */
405
+ several?: boolean;
406
+ /** several: the fewest that may be picked; default 1 */
407
+ least?: number;
408
+ /** several: the most that may be picked; default every row */
409
+ most?: number;
410
+ /** how many rows show before the rows scroll; default every button, or 10 of a list */
411
+ shown?: number;
412
+ };
413
+ /** One row of `UI.modals.choose()`. */
414
+ export type ChoiceRow = {
415
+ /** its words */
416
+ title: string;
417
+ /** a color to draw as a chip before them, Spell UI's hue name (`red`) or any CSS color */
418
+ color?: string;
419
+ };
397
420
  /** What the modal component registers as `Modals.provider`. */
398
421
  export type ModalProvider = {
399
422
  /** resolves `true` on approve, `false` on deny / dismiss */
@@ -402,6 +425,8 @@ export type ModalProvider = {
402
425
  alert(options: ModalOptions): Promise<void>;
403
426
  /** resolves with the entered text, or `undefined` on deny / dismiss */
404
427
  prompt(options: ModalOptions): Promise<string | undefined>;
428
+ /** resolves with the positions of the rows picked, or `undefined` on deny / dismiss */
429
+ choose(options: ChooseModalOptions): Promise<number[] | undefined>;
405
430
  };
406
431
  export { ApiError, answerOf, fetchOk, fetchText, type ApiErrorCause, type ApiMethod, type ApiRequest, type ApiResponseType, type ApiUrlData, type FetchFailure } from '../_util/fetching';
407
432
  /** Text `UI.sources.load()` fetched. */
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,41 @@
1
+ import { BuiltInSound, SoundKind } from './sounds.types';
2
+ /****************
3
+ * ### `BuiltInSounds`
4
+ * Spell's built-in sounds: 139 short sounds a program plays by name, `play "card slide"`.
5
+ * - Picked from Kenney's free sound packs (CC0, no credit needed): `LICENSE.md` beside this file says which.
6
+ * - Each has a name in English and one in Spanish; either finds it, in any case, with or without accents.
7
+ * - Where the files are: `sound-library/<name>.ogg`, next to the module that holds THIS class.
8
+ * - Dev / tests: this file is `src/sounds/BuiltInSounds.ts`, so `src/sounds/sound-library/`.
9
+ * - Library build: `dist/sound-library/`, where `emitSoundLibrary()` (`vite.config.ts`) copies them.
10
+ * - The editor's build and `<spell-viewer>`'s: beside the chunk holding this class
11
+ * (`builtInFilesBesideTheirCode()`, the app's `vite.shared.ts`).
12
+ * - The docs site: `site/_assets/sound-library`, a link (`Bundle.linkBuiltInFiles()`).
13
+ * - Read by the runtime (`UI.sounds`), which core's `play` asks, and by the editor's sound picker.
14
+ * - STATIC and instance-free on purpose, as `BuiltInPacks`: the files sit in one place per page.
15
+ * No DOM.
16
+ ****************/
17
+ export declare class BuiltInSounds {
18
+ /**
19
+ * Base the sound folder resolves against; `import.meta.url` unless overridden (tests, unusual deployments).
20
+ * - NOTE: NEVER passed to `new URL()` as a literal `import.meta.url`: Vite would turn a template URL next to
21
+ * it into a glob and bundle every sound.
22
+ */
23
+ static base: string;
24
+ /** Every built-in sound, grouped by kind, in the sound picker's order. */
25
+ static get all(): readonly BuiltInSound[];
26
+ /** The built-in sounds of `kind`. */
27
+ static ofKind(kind: SoundKind): BuiltInSound[];
28
+ /**
29
+ * The built-in sound called `name`, in English or Spanish; `undefined` if there's none.
30
+ * - Any case, dashes or spaces, accents or not: `Card-Slide`, `deslizar carta`, `tablon`.
31
+ */
32
+ static find(name: string): BuiltInSound | undefined;
33
+ /**
34
+ * The address of the built-in sound called `name`, `undefined` if there's none.
35
+ * - Against `BuiltInSounds.base`, or `base` when given.
36
+ * - `undefined` too with no base: a classic-script bundle (the docs pages') has no `import.meta.url`.
37
+ */
38
+ static url(name: string, base?: string): string | undefined;
39
+ /** `sound`'s file name in the sound folder: its English name, spaces as dashes (`card-slide.ogg`). */
40
+ static fileOf(sound: BuiltInSound): string;
41
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Barrel for `spell/ui/sounds` -- Spell's built-in sounds: their names, kinds and where their files are.
3
+ * - Its place in the import graph: a LEAF -- no DOM, no element core, no runtime.
4
+ * The runtime (`UI.sounds`) and the editor's sound picker read it.
5
+ * - NOTE: no self-namespace: `BuiltInSounds` already reads as one.
6
+ * - NOTE: the sounds themselves (`./sound-library/*.ogg`) are files, not exports.
7
+ */
8
+ export * from './sounds.types';
9
+ export * from './BuiltInSounds';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared types and constants for `spell/ui/sounds`: Spell's built-in sounds, and the kinds they're grouped by.
3
+ * - The BOTTOM of `spell/ui/sounds`' import graph: no imports.
4
+ */
5
+ /**
6
+ * One built-in sound: a short `.ogg` file in `sound-library/`, from one of Kenney's free sound packs.
7
+ * - Its file is its English name, spaces as dashes: `card slide` => `sound-library/card-slide.ogg`.
8
+ */
9
+ export type BuiltInSound = {
10
+ /** its name in English, as a program says it: `play "card slide"` */
11
+ name: string;
12
+ /** its name in Spanish: `reproducir "deslizar carta"` */
13
+ es: string;
14
+ /** what kind of sound it is: the picker's groups */
15
+ kind: SoundKind;
16
+ };
17
+ /** The kinds of built-in sound, in the order the sound picker shows them. */
18
+ export declare const SOUND_KINDS: readonly ["interface", "cards", "casino", "pieces", "impacts", "footsteps", "things", "digital", "jingles"];
19
+ /** A kind of built-in sound: one of `SOUND_KINDS`. */
20
+ export type SoundKind = (typeof SOUND_KINDS)[number];
21
+ /** The folder the built-in sounds are in, beside `BuiltInSounds`' module (or chunk, once built). */
22
+ export declare const SOUND_LIBRARY = "sound-library";
@@ -1,7 +1,7 @@
1
1
  import "./rolldown-runtime-c6e9CmGy.js";
2
2
  import { A as e, C as t, D as n, F as r, Gt as i, IconGlyph as a, Jt as o, Kt as s, NativeFallback as c, PopoverPanel as l, RUNTIME_KEY as u, UI as d, Ut as f, Wt as p, Yt as m, controlled as h, cssState as g, derived as _, escapeRegExp as v, et as ee, h as te, lazy as ne, n as re, numberToWord as ie, on as ae, onChange as y, proto as b, protoMerged as oe, qt as x, state as S, untracked as C, v as se, w as ce } from "./core.js";
3
3
  import { FormComponent as le } from "./forms.js";
4
- import { t as ue } from "./UIInput-B3K0w4ow.js";
4
+ import { t as ue } from "./UIInput-8s1aiaw1.js";
5
5
  import { For as w, Show as T } from "solid-js";
6
6
  import { addEvent as E, className as D, createComponent as O, delegateEvents as de, effect as k, insert as A, isServer as j, memo as fe, readShallow as M, ref as N, setAttribute as P, spread as pe, style as me, template as F } from "@solidjs/web";
7
7
  // src/components/ui-calendar/UICalendar.en.ts
@@ -0,0 +1,5 @@
1
+ // src/components/ui-dial/ui-dial.editor.html?raw
2
+ var e = "<!-- <ui-dial>'s property editor layout: move, pair (<ui-fields>) or leave out (data-omit) its properties. How: Spell UI's AGENTS.md, \"Property editor layouts\". -->\n<ui-property-editor schema=\"ui-dial\" data-omit=\"\">\n <ui-property-group label=\"Name\" data-group=\"name\">\n <ui-property name=\"label\"></ui-property>\n <ui-property name=\"name\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Appearance\" data-group=\"appearance\">\n <ui-property name=\"size\"></ui-property>\n <ui-property name=\"color\"></ui-property>\n <ui-fields>\n <ui-property name=\"ticks\"></ui-property>\n <ui-property name=\"unit\"></ui-property>\n </ui-fields>\n </ui-property-group>\n <ui-property-group label=\"States\" data-group=\"states\">\n <ui-property name=\"disabled\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Form\" data-group=\"form\">\n <ui-property name=\"readonly\"></ui-property>\n <ui-fields>\n <ui-property name=\"min\"></ui-property>\n <ui-property name=\"max\"></ui-property>\n <ui-property name=\"step\"></ui-property>\n </ui-fields>\n <ui-property name=\"value\"></ui-property>\n <ui-property name=\"parameter\"></ui-property>\n <ui-property name=\"required\"></ui-property>\n </ui-property-group>\n</ui-property-editor>\n";
3
+ export { e as default };
4
+
5
+ //# sourceMappingURL=ui-dial.editor-CjjdKi5L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-dial.editor-CjjdKi5L.js","names":["ui_dial_editor_default"],"sources":[],"mappings":""}