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
@@ -27,6 +27,8 @@ import { siteTabsVocabulary } from './UISiteTabs.en';
27
27
  * - It's `<ui-toolbar>`'s scrolling row, the section tabs' too: a `‹` / `›` and a fade at each end with more that way
28
28
  * (epic `notebook` I11).
29
29
  * - Plain data in, no fetching: `pages` and `current`, set on it by hand.
30
+ * - `appearance="header"`: a switch for an app menu's middle, the editor's Run | Edit look (epic `mockup` T55):
31
+ * the row as wide as its tabs, on the bar's fill, never each an equal share.
30
32
  * - Without `pages`, it follows the site navigation it's inside (epic `mockup` T38):
31
33
  * - the nearest box around it with a `<ui-site-nav>` of its own, across shadow roots
32
34
  * (`SitePages.followNavAround()`, which `<ui-site-breadcrumbs>` follows it with too)
@@ -55,6 +57,12 @@ export declare class UISiteTabs extends E.UIComponent<typeof siteTabsVocabulary>
55
57
  readonly group: "content";
56
58
  readonly kind: "string";
57
59
  readonly description: "Which page is shown: its `href` or its `id`. None: the page whose `href` is the browser's address.";
60
+ }, {
61
+ readonly name: "appearance";
62
+ readonly group: "appearance";
63
+ readonly kind: "valueOnly";
64
+ readonly values: readonly ["header"];
65
+ readonly description: string;
58
66
  }, {
59
67
  readonly name: "label";
60
68
  readonly group: "content";
@@ -75,6 +83,9 @@ export declare class UISiteTabs extends E.UIComponent<typeof siteTabsVocabulary>
75
83
  readonly states: readonly [{
76
84
  readonly name: "empty";
77
85
  readonly description: "The shown page has no family, so no tabs are drawn: it takes no room.";
86
+ }, {
87
+ readonly name: "header";
88
+ readonly description: "`appearance=\"header\"`: a switch for an app menu's middle.";
78
89
  }];
79
90
  readonly texts: readonly [];
80
91
  };
@@ -125,6 +136,8 @@ export declare class UISiteTabs extends E.UIComponent<typeof siteTabsVocabulary>
125
136
  * - NEVER throws.
126
137
  */
127
138
  private revealSelected;
139
+ /** `appearance="header"`: a switch in an app menu's middle, as the editor's Run | Edit. */
140
+ get isHeader(): boolean;
128
141
  render(): JSX.Element;
129
142
  /** One page's tab: says its `tab`, else its `title`. */
130
143
  private tab;
@@ -25,6 +25,12 @@ export declare const siteTabsVocabulary: {
25
25
  readonly group: "content";
26
26
  readonly kind: "string";
27
27
  readonly description: "Which page is shown: its `href` or its `id`. None: the page whose `href` is the browser's address.";
28
+ }, {
29
+ readonly name: "appearance";
30
+ readonly group: "appearance";
31
+ readonly kind: "valueOnly";
32
+ readonly values: readonly ["header"];
33
+ readonly description: string;
28
34
  }, {
29
35
  readonly name: "label";
30
36
  readonly group: "content";
@@ -45,6 +51,9 @@ export declare const siteTabsVocabulary: {
45
51
  readonly states: readonly [{
46
52
  readonly name: "empty";
47
53
  readonly description: "The shown page has no family, so no tabs are drawn: it takes no room.";
54
+ }, {
55
+ readonly name: "header";
56
+ readonly description: "`appearance=\"header\"`: a switch for an app menu's middle.";
48
57
  }];
49
58
  readonly texts: readonly [];
50
59
  };
@@ -1,7 +1,9 @@
1
1
  /****************
2
2
  * ### `SliderScale`
3
- * The number line of a slider: `min` ... `max` in `step`s -- snapping, ratios along the track, and which steps get
4
- * a label. Pure arithmetic (no DOM; of the core, only `E.clamp()`), so it's tested on its own.
3
+ * The number line of a slider: `min` ... `max` in `step`s -- snapping, ratios along the track, which steps get
4
+ * a label, and where a key moves a value.
5
+ * - Pure arithmetic (no DOM; of the core, only `E.clamp()` and `UIT.Key`), so it's tested on its own.
6
+ * - `<ui-slider>`'s and `<ui-dial>`'s: a dial is the same number line, bent round.
5
7
  * - Snapping keeps to the step grid from `min`, like a native `<input type=range>`: a `max` off the grid is never
6
8
  * reached (the last step below it is). `step` `0` allows any value.
7
9
  * - Floating point: results are rounded to the step's own decimals, so `0.1` steps give `0.3`, not
@@ -28,6 +30,17 @@ export declare class SliderScale {
28
30
  valueAt(ratio: number): number;
29
31
  /** `value` moved by `steps` steps (a percent of the span when `step` is `0`), snapped. */
30
32
  move(value: number, steps: number): number;
33
+ /**
34
+ * The value key `key` moves `value` to, or `undefined` for a key that moves nothing:
35
+ * - arrows step the way they point (Fomantic's `keyMovement`), so on a `reversed` or `vertical` track they follow
36
+ * the thumb, not "right / up increases"; the other arrow pair steps too, up / right increasing
37
+ * - PageUp / PageDown take `PAGE_MULTIPLIER` steps (Fomantic's `pageMultiplier`)
38
+ * - Home / End go to `low` / `high` (default `min` / `max`: a range's thumb passes its own bounds)
39
+ * - The result is snapped, but not bounded by `low` / `high` for the step keys: the caller clamps.
40
+ */
41
+ valueForKey(key: string, value: number, options?: KeyMoveOptions): number | undefined;
42
+ /** Steps key `key` takes on a track laid out as `options` say; `0` for keys that don't step. */
43
+ private static stepsForKey;
31
44
  /** Number of intervals between labels: one per `tickStep` (per unit, with no step). */
32
45
  get intervals(): number;
33
46
  /** Value of label `index`. */
@@ -54,3 +67,14 @@ export type SliderScaleProps = {
54
67
  /** labels / ticks every this much; absent or `<= 0` ~== every step */
55
68
  tickStep?: number;
56
69
  };
70
+ /** How `SliderScale.valueForKey()` reads a key. */
71
+ export type KeyMoveOptions = {
72
+ /** lowest value Home goes to; default `min` */
73
+ low?: number;
74
+ /** highest value End goes to; default `max` */
75
+ high?: number;
76
+ /** the track runs upright, min at the top */
77
+ vertical?: boolean;
78
+ /** the track runs from the right (or, `vertical`, from the bottom) */
79
+ reversed?: boolean;
80
+ };
@@ -366,8 +366,6 @@ export declare class UISlider extends F.FormComponent<typeof sliderVocabulary> {
366
366
  private nearest;
367
367
  /** Keys on a thumb, see the class doc. */
368
368
  private onKeyDown;
369
- /** Steps key `key` takes: arrows the way they point (Fomantic's `keyMovement`), pages 2; `0` for other keys. */
370
- private keySteps;
371
369
  /** A click aimed at the DOM element itself (its `<label for>`) focuses the first thumb. */
372
370
  protected activateControl(): void;
373
371
  }
@@ -68,6 +68,7 @@ export declare class UIStatistic extends E.UIComponent<typeof statisticVocabular
68
68
  readonly name: "value";
69
69
  readonly group: "form";
70
70
  readonly kind: "string";
71
+ readonly canBeNumber: true;
71
72
  readonly description: "Shorthand for a `<ui-value>`: the number (or word) shown.";
72
73
  }, {
73
74
  readonly name: "text";
@@ -62,6 +62,7 @@ export declare const statisticVocabulary: {
62
62
  readonly name: "value";
63
63
  readonly group: "form";
64
64
  readonly kind: "string";
65
+ readonly canBeNumber: true;
65
66
  readonly description: "Shorthand for a `<ui-value>`: the number (or word) shown.";
66
67
  }, {
67
68
  readonly name: "text";
@@ -21,7 +21,22 @@ export declare class TocIndex {
21
21
  * The element named by `forId` (else the page's `<main>`, else `<body>`), and the tab set when it is one.
22
22
  * - `undefined` while a named element doesn't exist yet (the toc may come first in the page).
23
23
  */
24
- static followed(document: Document, forId: string | undefined): FollowedContent | undefined;
24
+ static followed(document: Document, forId: string | undefined, toc?: Element): FollowedContent | undefined;
25
+ /**
26
+ * The page of `layout`, a `<ui-page-layout>`: its first child in no slot, the page a site shows in it
27
+ * (epic `mockup` T55).
28
+ */
29
+ static layoutPage(layout: Element): Element | undefined;
30
+ /**
31
+ * The title of `page`: the text of its level 1 heading (`<h1>`, `<ui-header level="1">`), not its sub-header's;
32
+ * `undefined` with none.
33
+ */
34
+ static pageTitle(page: Element): string | undefined;
35
+ /**
36
+ * The box whose scroll `element` moves with: the nearest one around it, across shadow roots, that scrolls
37
+ * (`overflow-y` auto or scroll); `undefined` for the window.
38
+ */
39
+ static scrollerAround(element: Element): Element | undefined;
25
40
  /** The pane of `tabs` on show: `:state(selected)`, else the first child with a box. */
26
41
  static shownPane(tabs: Element): Element | undefined;
27
42
  /** The pane of `tabs` holding `target`, if any. */
@@ -26,6 +26,11 @@ import { TocVocabulary, TocAllFolds, TocFolds, TocSection } from './UIToc.types'
26
26
  * - light DOM only, but for the shadow roots another family names (`TocIndex.addShadowHost()`):
27
27
  * the docs site's `<ui-docs-api only>` marks its rows and tag headers (`TocIndex.shadowEntries()`),
28
28
  * so every attribute, event ... is listed under its section
29
+ * - In a `<ui-page-layout>` (one of its side bars), with no `for`, it follows the layout's page (epic `mockup` T55):
30
+ * - the page the site shows in it, its first child in no slot, scanned again as the site shows another
31
+ * - its scroll, the box the layout scrolls in (`TocIndex.scrollerAround()`), unless `scroller` names one
32
+ * - headed by that page's title, its level 1 heading, unless `heading` says
33
+ * - a click on a link scrolls there itself, the address left as it is: a site inside the editor has the editor's
29
34
  * - It follows the scroll: the entry whose top passed the reading line (`TocIndex.current()`) is `selected`,
30
35
  * and its section opens; `ui-scrolled-to { value }` when that changes.
31
36
  * - The window's scroll, or, with `scroller`, the scroll of the box that id names: content scrolling in a pane
@@ -69,7 +74,7 @@ export declare class UIToc extends E.UIComponent<TocVocabulary> {
69
74
  readonly name: "heading";
70
75
  readonly replaces: readonly ["header"];
71
76
  readonly kind: "string";
72
- readonly description: "Title above the links, e.g. the page's name (Fomantic's `Button`). Its old name was `header`.";
77
+ readonly description: string;
73
78
  }, {
74
79
  readonly name: "size";
75
80
  readonly kind: "size";
@@ -239,10 +244,29 @@ export declare class UIToc extends E.UIComponent<TocVocabulary> {
239
244
  * - Not on a page that lands its hashes itself (the site, the epic pages): `landOnHash()` leaves it to the page.
240
245
  */
241
246
  private reveal;
242
- /** What `for` names (else the page's `main`), and its tabs; `undefined` while it doesn't exist. */
247
+ /**
248
+ * What `for` names (else the page layout it's in, else the page's `main`), and its tabs;
249
+ * `undefined` while it doesn't exist.
250
+ */
243
251
  private followedContent;
244
- /** The box `scroller` names, whose scroll it follows; `undefined` for the window (or while it doesn't exist). */
252
+ /**
253
+ * The box whose scroll it follows: the one `scroller` names; in a page layout, with no `for`, the box the layout
254
+ * scrolls in; `undefined` for the window (or while it doesn't exist).
255
+ */
245
256
  private scrollerElement;
257
+ /**
258
+ * Its title: `heading`, else, following a page layout's page, that page's title (epic `mockup` T55):
259
+ * the component's name over its contents in Spell UI's site.
260
+ */
261
+ get shownHeading(): string | undefined;
262
+ /** The page layout's page's title, from the last scan: `undefined` when it follows no layout. */
263
+ accessor pageTitle: string | undefined;
264
+ /**
265
+ * A click on one of its links, following a page layout's page: it scrolls there itself, in the box the page
266
+ * scrolls in, and leaves the address as it is (a site inside the editor has the editor's address).
267
+ * - Its own links only (`#id`), the plain click: a middle click or Command-click is the browser's.
268
+ */
269
+ protected onLinkClick(event: MouseEvent): void;
246
270
  /** Ids a new heading id must not take: the followed tabs' pane values (the URL hash names those too). */
247
271
  private static reservedIdsFor;
248
272
  }
@@ -33,7 +33,7 @@ export declare const tocVocabulary: {
33
33
  readonly name: "heading";
34
34
  readonly replaces: readonly ["header"];
35
35
  readonly kind: "string";
36
- readonly description: "Title above the links, e.g. the page's name (Fomantic's `Button`). Its old name was `header`.";
36
+ readonly description: string;
37
37
  }, {
38
38
  readonly name: "size";
39
39
  readonly kind: "size";
@@ -23,6 +23,11 @@ export type FollowedContent = {
23
23
  readonly root: Element;
24
24
  /** `root` itself, when it's a `<ui-tabs>`: then only its shown pane is listed */
25
25
  readonly tabs?: Element;
26
+ /**
27
+ * `root` itself, when it's the `<ui-page-layout>` the toc is in: then only its page is listed,
28
+ * what's in no slot of it (`TocIndex.layoutPage()`)
29
+ */
30
+ readonly layout?: Element;
26
31
  };
27
32
  /**
28
33
  * One section of a page, as `PageOutline.sections()` reads it: where a link to it lands.
@@ -56,7 +56,9 @@ export declare class DOMTreeElement extends E.DOMElement<UITree> {
56
56
  * - `sticky-detail`: it stays in view at the box's end while the columns scroll sideways.
57
57
  * - `filter` filters one column: the last one on screen as the filter starts, so moving about doesn't move it.
58
58
  * After its rows, the matches elsewhere in the tree, at any depth (`otherMatches`): a click on one opens the
59
- * path to it. The column's kept pick, which may not match, is dimmed (`unmatched`). From `items`, it runs the `children` functions to look, waiting for promised ones, but opens no
59
+ * path to it, as do Enter and Space.
60
+ * - The keys go on into them: down from the column's last row, up from the first match back to it.
61
+ * The column's kept pick, which may not match, is dimmed (`unmatched`). From `items`, it runs the `children` functions to look, waiting for promised ones, but opens no
60
62
  * column.
61
63
  * - `sticky-path`: the path line above the columns, naming each column's pick; a click on one picks it again,
62
64
  * keeping the columns after it, and scrolls its column into view.
@@ -273,6 +275,10 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
273
275
  readonly key: "elsewhere";
274
276
  readonly text: "Elsewhere in the tree";
275
277
  readonly description: "`appearance=\"columns\"` with a `filter`: the title over the matches outside the filtered column.";
278
+ }, {
279
+ readonly key: "matchIn";
280
+ readonly text: "{label}, in {path}";
281
+ readonly description: string;
276
282
  }, {
277
283
  readonly key: "lookingElsewhere";
278
284
  readonly text: "Looking through the tree";
@@ -286,6 +292,11 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
286
292
  readonly text: "Stopped looking after {count} rows";
287
293
  readonly description: "`appearance=\"columns\"` with a `filter`: the look through the tree went through that many rows, and stopped.";
288
294
  }];
295
+ readonly hooks: readonly [{
296
+ readonly name: "rowClass";
297
+ readonly words: "give the row class of (an item)";
298
+ readonly description: string;
299
+ }];
289
300
  };
290
301
  static elementSetup: Partial<E.ElementSetup>;
291
302
  /** The anchor of a Shift range. */
@@ -864,11 +875,34 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
864
875
  */
865
876
  private lookInItems;
866
877
  /**
867
- * A match elsewhere was clicked: the path to it opens, and it's selected, as a click on it would.
878
+ * A match elsewhere was clicked, or Enter or Space pressed on it: the path to it opens, and it's selected, as a
879
+ * click on its row would.
868
880
  * - The filtered column keeps its pick, though it doesn't match; a match nearer the top than that column filters the
869
881
  * last column on screen instead (`filteredColumn`).
870
882
  */
871
883
  private pickMatch;
884
+ /**
885
+ * The matches' boxes on screen, in order: drawn in the tree's shadow root (from `items`, and the first column),
886
+ * else in the shadow root of the pick the filtered column is inside.
887
+ */
888
+ private get matchBoxes();
889
+ /**
890
+ * The focus goes to match `index` (the last for -1), when there is one; nothing is picked, so the columns stay.
891
+ * - The matches keep `tabindex="-1"`: the tree stays one tab stop, its rows'.
892
+ */
893
+ private focusMatch;
894
+ /**
895
+ * The keys on a match elsewhere, as part of the filtered column:
896
+ * - Up and down walk the matches; up on the first goes back to the column's last row.
897
+ * - Home and End: the first and last match.
898
+ * - Enter and Space open its path, as a click does (`pickMatch()`).
899
+ */
900
+ private onMatchKeyDown;
901
+ /**
902
+ * Back from the matches to the filtered column's last row: focused, and picked as a key moving onto it picks,
903
+ * unless it's the column's pick already.
904
+ */
905
+ private focusLastFilteredRow;
872
906
  /**
873
907
  * The matches elsewhere, after the filtered column's rows: each its icon and words, the rows it's inside under its
874
908
  * words, quieter; a spinner and "Looking through the tree" while promised `children` come; a line when there are
@@ -967,6 +1001,8 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
967
1001
  private onItemKeyDown;
968
1002
  /** The focus goes to the row with the tab stop, scrolled into its column's view. */
969
1003
  private focusKeyRow;
1004
+ /** The focus goes to the row of item `id` in column `depth`, scrolled into its column's view. */
1005
+ private focusItemRow;
970
1006
  /** `path` changed: the selected row's column in view, its end too; from `items`, each column's pick in view. */
971
1007
  protected onOpenPathChanged(): void;
972
1008
  /** Scroll each column from `items` to its pick, before the next paint. */
@@ -195,6 +195,10 @@ export declare const treeVocabulary: {
195
195
  readonly key: "elsewhere";
196
196
  readonly text: "Elsewhere in the tree";
197
197
  readonly description: "`appearance=\"columns\"` with a `filter`: the title over the matches outside the filtered column.";
198
+ }, {
199
+ readonly key: "matchIn";
200
+ readonly text: "{label}, in {path}";
201
+ readonly description: string;
198
202
  }, {
199
203
  readonly key: "lookingElsewhere";
200
204
  readonly text: "Looking through the tree";
@@ -208,4 +212,9 @@ export declare const treeVocabulary: {
208
212
  readonly text: "Stopped looking after {count} rows";
209
213
  readonly description: "`appearance=\"columns\"` with a `filter`: the look through the tree went through that many rows, and stopped.";
210
214
  }];
215
+ readonly hooks: readonly [{
216
+ readonly name: "rowClass";
217
+ readonly words: "give the row class of (an item)";
218
+ readonly description: string;
219
+ }];
211
220
  };
@@ -55,8 +55,12 @@ export declare const treeEs: {
55
55
  readonly openLevels: "Abrir {levels} niveles";
56
56
  readonly closeAll: "Cerrar todo";
57
57
  readonly elsewhere: "En otras partes del árbol";
58
+ readonly matchIn: "{label}, en {path}";
58
59
  readonly lookingElsewhere: "Buscando en el árbol";
59
60
  readonly moreMatches: "{count} más, sin listar";
60
61
  readonly stoppedLooking: "Dejó de buscar tras {count} filas";
61
62
  };
63
+ readonly hooks: {
64
+ readonly rowClass: "dar la clase de fila de (un elemento)";
65
+ };
62
66
  };