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
package/dist/ui-toc.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import "./rolldown-runtime-c6e9CmGy.js";
2
- import { Gt as e, Jt as t, Kt as n, Mt as r, Queued as i, UIComponent as a, Ut as o, Wt as s, Yt as c, after as l, afterSolidUpdate as u, beforeNextPaint as d, cssState as f, derived as ee, it as te, nextFrame as ne, proto as re, protoMerged as ie, qt as p, slug as ae, state as m, untracked as h, whileConnected as oe } from "./core.js";
3
- import { t as se } from "./PrefStore-Di83C0bY.js";
2
+ import { Gt as e, Jt as t, Kt as n, Mt as r, Queued as i, UIComponent as a, Ut as o, Wt as s, Yt as c, after as l, afterSolidUpdate as u, beforeNextPaint as d, closestAcrossShadow as f, cssState as ee, derived as te, flatParentFor as p, it as ne, nextFrame as m, on as re, proto as ie, protoMerged as ae, qt as h, slug as oe, state as g, untracked as _, whileConnected as se } from "./core.js";
3
+ import { t as ce } from "./PrefStore-Di83C0bY.js";
4
4
  import "./ui-menu.js";
5
5
  import "./ui-item.js";
6
6
  import "./ui-parts.js";
7
- import { For as ce, Show as g } from "solid-js";
8
- import { className as _, createComponent as v, delegateEvents as le, effect as y, getOwner as b, insert as x, memo as ue, readShallow as S, setAttribute as C, template as w } from "@solidjs/web";
7
+ import { For as v, Show as y } from "solid-js";
8
+ import { className as b, createComponent as x, delegateEvents as le, effect as S, getOwner as C, insert as w, memo as ue, readShallow as T, setAttribute as E, template as D } from "@solidjs/web";
9
9
  // src/components/ui-toc/UIToc.en.ts
10
10
  var de = {
11
11
  tag: "ui-toc",
@@ -28,18 +28,18 @@ var de = {
28
28
  name: "for",
29
29
  kind: "string",
30
30
  property: "htmlFor",
31
- description: "Id of the element whose headings to list. A `<ui-tabs>`: its SHOWN pane, followed as the tabs switch. Default: the page's `<main>`, else `<body>`."
31
+ description: "Id of the element whose headings to list. A `<ui-tabs>`: its SHOWN pane, followed as the tabs switch. Default: inside a `<ui-page-layout>` (a side bar of it), the layout's page, followed as the site shows another; else the page's `<main>`, else `<body>`."
32
32
  },
33
33
  {
34
34
  name: "scroller",
35
35
  kind: "string",
36
- description: "Id of the element whose scroll it follows, when the content scrolls inside a box of its own (a pane) rather than the window. Its reading line is then that box's top. Default: the window."
36
+ description: "Id of the element whose scroll it follows, when the content scrolls inside a box of its own (a pane) rather than the window. Its reading line is then that box's top. Default: inside a `<ui-page-layout>`, the box the layout scrolls in; else the window."
37
37
  },
38
38
  {
39
39
  name: "heading",
40
40
  replaces: ["header"],
41
41
  kind: "string",
42
- description: "Title above the links, e.g. the page's name (Fomantic's `Button`). Its old name was `header`."
42
+ description: "Title above the links, e.g. the page's name (Fomantic's `Button`). Default: inside a `<ui-page-layout>`, the title of the layout's page (its level 1 heading). Its old name was `header`."
43
43
  },
44
44
  {
45
45
  name: "size",
@@ -139,28 +139,28 @@ var de = {
139
139
  description: "The header's toggle, while every section is open."
140
140
  }
141
141
  ]
142
- }, T = class PageOutline {
142
+ }, O = class PageOutline {
143
143
  static sections(e) {
144
144
  let t = [...e.querySelectorAll(fe)].filter((e) => !PageOutline.demoAround(e) && PageOutline.titleOf(e)), n = new Map(t.map((e, t) => [e, t])), r = {};
145
- for (let t of e.querySelectorAll(E)) {
146
- let e = t.getAttribute(O);
145
+ for (let t of e.querySelectorAll(k)) {
146
+ let e = t.getAttribute(j);
147
147
  r[e] = t.getAttribute(ge) ?? e;
148
148
  }
149
149
  return {
150
150
  sections: t.map((e) => {
151
- let t = PageOutline.parentOf(e, n), r = t === void 0 ? e.closest(E) : void 0;
151
+ let t = PageOutline.parentOf(e, n), r = t === void 0 ? e.closest(k) : void 0;
152
152
  return {
153
153
  id: e.id,
154
154
  title: PageOutline.titleOf(e),
155
155
  ...t !== void 0 && { parent: t },
156
- ...r && { tab: r.getAttribute(O) }
156
+ ...r && { tab: r.getAttribute(j) }
157
157
  };
158
158
  }),
159
159
  tabs: r
160
160
  };
161
161
  }
162
162
  static titleOf(e) {
163
- if (e.localName === me) return PageOutline.clean(te.textOf(e) ?? "");
163
+ if (e.localName === me) return PageOutline.clean(ne.textOf(e) ?? "");
164
164
  let t = e.cloneNode(!0);
165
165
  for (let e of t.querySelectorAll(he)) e.remove();
166
166
  return PageOutline.clean(t.textContent ?? "");
@@ -176,26 +176,45 @@ var de = {
176
176
  return a ? [a, ...r] : r;
177
177
  }
178
178
  static parentOf(e, t) {
179
- for (let n = e.parentElement?.closest(D); n;) {
179
+ for (let n = e.parentElement?.closest(A); n;) {
180
180
  let e = t.get(n);
181
181
  if (e !== void 0) return e;
182
- n = n.parentElement?.closest(D);
182
+ n = n.parentElement?.closest(A);
183
183
  }
184
184
  }
185
185
  static clean(e) {
186
186
  return e.replace(/\s+/g, " ").trim();
187
187
  }
188
- }, fe = "ui-section[id], ui-header[id][level='2'], ui-header[id][level='3'], ui-header[id][level='4'], h2[id], h3[id], h4[id]", pe = "ui-example, ui-docs-tokens, template, script", E = "ui-tabs#site-tabs > ui-tab[value]", me = "ui-section", D = "ui-section[id]", he = "ui-header, ui-icon, [slot]", O = "value", ge = "label", k = "ui-header[level=\"2\"], h2, ui-section, ui-example[heading], ui-header[level=\"3\"], h3", A = "ui-section", j = "ui-tabs", _e = .2, ve = ["expanded", "collapsed"], M = {
188
+ }, fe = "ui-section[id], ui-header[id][level='2'], ui-header[id][level='3'], ui-header[id][level='4'], h2[id], h3[id], h4[id]", pe = "ui-example, ui-docs-tokens, template, script", k = "ui-tabs#site-tabs > ui-tab[value]", me = "ui-section", A = "ui-section[id]", he = "ui-header, ui-icon, [slot]", j = "value", ge = "label", M = "ui-header[level=\"2\"], h2, ui-section, ui-example[heading], ui-header[level=\"3\"], h3", N = "ui-section", P = "ui-tabs", _e = .2, ve = ["expanded", "collapsed"], F = {
189
189
  store: "spell-ui-toc",
190
190
  all: "all",
191
191
  folds: "folds:"
192
- }, N = class TocIndex {
193
- static followed(e, t) {
194
- let n = t ? e.getElementById(t) : e.querySelector("main") ?? e.body;
195
- if (n) return n.localName === "ui-tabs" ? {
196
- root: n,
197
- tabs: n
198
- } : { root: n };
192
+ }, I = class TocIndex {
193
+ static followed(e, t, n) {
194
+ let r = !t && n ? f(n, xe) : null;
195
+ if (r) return {
196
+ root: r,
197
+ layout: r
198
+ };
199
+ let i = t ? e.getElementById(t) : e.querySelector("main") ?? e.body;
200
+ if (i) return i.localName === "ui-tabs" ? {
201
+ root: i,
202
+ tabs: i
203
+ } : { root: i };
204
+ }
205
+ static layoutPage(e) {
206
+ return [...e.children].find((e) => !e.hasAttribute("slot"));
207
+ }
208
+ static pageTitle(e) {
209
+ let t = e.querySelector(Se);
210
+ if (t) return [...t.childNodes].filter((e) => e.nodeType === Node.TEXT_NODE).map((e) => e.textContent).join(" ").replace(/\s+/g, " ").trim() || t.textContent?.trim() || void 0;
211
+ }
212
+ static scrollerAround(e) {
213
+ let t = e.ownerDocument.defaultView;
214
+ for (let n = p(e); n; n = p(n)) {
215
+ if (n === e.ownerDocument.documentElement || n === e.ownerDocument.body) return;
216
+ if (/auto|scroll/.test(t?.getComputedStyle(n).overflowY ?? "")) return n;
217
+ }
199
218
  }
200
219
  static shownPane(e) {
201
220
  let t = TocIndex.panes(e);
@@ -209,7 +228,7 @@ var de = {
209
228
  }
210
229
  static scan(e, t = /* @__PURE__ */ new Set()) {
211
230
  let n = [], r = /* @__PURE__ */ new Map(), i = TocIndex.shadowHosts;
212
- for (let a of e.querySelectorAll(i ? `${k}, ${i}` : k)) {
231
+ for (let a of e.querySelectorAll(i ? `${M}, ${i}` : M)) {
213
232
  if (TocIndex.insideExample(a, e)) continue;
214
233
  if (i && a.matches(i)) {
215
234
  let t = TocIndex.enclosing(a, e, r) ?? n.at(-1);
@@ -326,7 +345,7 @@ var de = {
326
345
  n.addEventListener("ui-ready", onReady);
327
346
  }
328
347
  static slug(e) {
329
- return ae(e.replace(/['’]/g, " "), { fallback: "section" });
348
+ return oe(e.replace(/['’]/g, " "), { fallback: "section" });
330
349
  }
331
350
  static idOf(e, t, n) {
332
351
  if (e.id) return e.id;
@@ -335,24 +354,24 @@ var de = {
335
354
  return e.id = a, a;
336
355
  }
337
356
  static text(e) {
338
- return ((e.localName === "ui-example" ? e.getAttribute(ye) : T.titleOf(e)) ?? "").replace(/\s+/g, " ").trim();
357
+ return ((e.localName === "ui-example" ? e.getAttribute(ye) : O.titleOf(e)) ?? "").replace(/\s+/g, " ").trim();
339
358
  }
340
359
  static insideExample(e, t) {
341
- let n = T.demoAround(e);
360
+ let n = O.demoAround(e);
342
361
  return !!n && t.contains(n);
343
362
  }
344
363
  static enclosing(e, t, n) {
345
- for (let r = e.parentElement?.closest(A); r;) {
364
+ for (let r = e.parentElement?.closest(N); r;) {
346
365
  if (!t.contains(r) || r === t) return;
347
366
  let e = n.get(r);
348
367
  if (e) return e;
349
- r = r.parentElement?.closest(A);
368
+ r = r.parentElement?.closest(N);
350
369
  }
351
370
  }
352
371
  static folded(e) {
353
- for (let t = e.parentElement?.closest(A); t;) {
372
+ for (let t = e.parentElement?.closest(N); t;) {
354
373
  if (t.hasAttribute("collapsible") && t.getAttribute("open") === "false") return !0;
355
- t = t.parentElement?.closest(A);
374
+ t = t.parentElement?.closest(N);
356
375
  }
357
376
  return !1;
358
377
  }
@@ -366,10 +385,10 @@ var de = {
366
385
  return !1;
367
386
  }
368
387
  }
369
- }, ye = "heading", be = Symbol.for("spell-ui:toc-shadow-hosts"), P = class HashLanding {
388
+ }, ye = "heading", be = Symbol.for("spell-ui:toc-shadow-hosts"), xe = "ui-page-layout", Se = "h1, ui-header[level=\"1\"]", L = class HashLanding {
370
389
  static forDocument(e) {
371
- let t = F.get(e);
372
- return t || F.set(e, t = new HashLanding(e)), t;
390
+ let t = R.get(e);
391
+ return t || R.set(e, t = new HashLanding(e)), t;
373
392
  }
374
393
  document;
375
394
  rules;
@@ -391,7 +410,7 @@ var de = {
391
410
  }
392
411
  landOnHash(e, t = {}) {
393
412
  if (this.isPageOwned) return Promise.resolve(!1);
394
- let n = N.decode(e.replace(/^#/, "")), r = n ? N.elementById(this.document, n) : void 0;
413
+ let n = I.decode(e.replace(/^#/, "")), r = n ? I.elementById(this.document, n) : void 0;
395
414
  return r ? this.land(r, t) : Promise.resolve(!1);
396
415
  }
397
416
  async land(e, { scroll: t = "jump", opensTarget: n = !0 } = {}) {
@@ -400,15 +419,15 @@ var de = {
400
419
  let i = await Promise.resolve(e).catch(() => void 0);
401
420
  if (!i || r !== this.landings || (await this.rules.whenReady(i), r !== this.landings)) return !1;
402
421
  let a = this.rules.reveal(i, { opensTarget: n });
403
- for (let e = 0; e < we && this.rules.topOf(i) === void 0; e++) await ne();
404
- return a && await ne(this.rules.revealFrames), r === this.landings && (this.scrollTo(i, t), l(this.rules.settleSeconds, () => {
422
+ for (let e = 0; e < Ee && this.rules.topOf(i) === void 0; e++) await m();
423
+ return a && await m(this.rules.revealFrames), r === this.landings && (this.scrollTo(i, t), l(this.rules.settleSeconds, () => {
405
424
  r === this.landings && !this.hasViewerMoved && this.scrollTo(i, t);
406
425
  }), !0);
407
426
  }
408
427
  scrollTo(e, t) {
409
428
  let n = this.rules.topOf(e), r = this.document.defaultView;
410
429
  if (n === void 0 || !r) return;
411
- let i = t === "glide" && !r.matchMedia(Ee).matches;
430
+ let i = t === "glide" && !r.matchMedia(Oe).matches;
412
431
  r.scrollTo({
413
432
  top: Math.max(0, r.scrollY + n - this.rules.lineFor(e)),
414
433
  behavior: i ? "smooth" : "instant"
@@ -418,7 +437,7 @@ var de = {
418
437
  let e = this.document.defaultView;
419
438
  if (!this.isWatching && e) {
420
439
  this.isWatching = !0;
421
- for (let t of Se) e.addEventListener(t, () => this.hasViewerMoved = !0, {
440
+ for (let t of we) e.addEventListener(t, () => this.hasViewerMoved = !0, {
422
441
  capture: !0,
423
442
  passive: !0
424
443
  });
@@ -426,22 +445,22 @@ var de = {
426
445
  }
427
446
  static defaultRules() {
428
447
  return {
429
- whenReady: (e) => new Promise((t) => N.whenReady(N.lightElementOf(e), t)),
448
+ whenReady: (e) => new Promise((t) => I.whenReady(I.lightElementOf(e), t)),
430
449
  reveal: (e, { opensTarget: t }) => HashLanding.reveal(e, { opensTarget: t }),
431
450
  lineFor: (e) => HashLanding.marginLine(e),
432
451
  topOf: (e) => HashLanding.topOf(e),
433
- revealFrames: Ce,
434
- settleSeconds: Te
452
+ revealFrames: Te,
453
+ settleSeconds: De
435
454
  };
436
455
  }
437
456
  static reveal(e, { opensTarget: t }) {
438
- let n = N.lightElementOf(e), r = !1;
439
- for (let e = n.parentElement?.closest(j); e; e = e.parentElement?.closest(j)) {
440
- let t = N.paneOf(e, n);
441
- t && N.shownPane(e) !== t && (e.value = N.paneValue(e, t), r = !0);
457
+ let n = I.lightElementOf(e), r = !1;
458
+ for (let e = n.parentElement?.closest(P); e; e = e.parentElement?.closest(P)) {
459
+ let t = I.paneOf(e, n);
460
+ t && I.shownPane(e) !== t && (e.value = I.paneValue(e, t), r = !0);
442
461
  }
443
- let i = t ? n.closest(A) : n.parentElement?.closest(A);
444
- for (let e = i; e; e = e.parentElement?.closest(A)) e.getAttribute(I) === "false" && (e.removeAttribute(I), r = !0);
462
+ let i = t ? n.closest(N) : n.parentElement?.closest(N);
463
+ for (let e = i; e; e = e.parentElement?.closest(N)) e.getAttribute(z) === "false" && (e.removeAttribute(z), r = !0);
445
464
  return r;
446
465
  }
447
466
  static topOf(e) {
@@ -455,42 +474,42 @@ var de = {
455
474
  let t = e.ownerDocument.defaultView;
456
475
  return t ? (parseFloat(t.getComputedStyle(e.ownerDocument.documentElement).scrollPaddingTop) || 0) + (parseFloat(t.getComputedStyle(e).scrollMarginTop) || 0) : 0;
457
476
  }
458
- }, xe = Symbol.for("spell-ui:hash-landings"), F = globalThis[xe] ??= /* @__PURE__ */ new WeakMap(), Se = [
477
+ }, Ce = Symbol.for("spell-ui:hash-landings"), R = globalThis[Ce] ??= /* @__PURE__ */ new WeakMap(), we = [
459
478
  "wheel",
460
479
  "touchstart",
461
480
  "keydown",
462
481
  "pointerdown"
463
- ], Ce = 3, we = 30, Te = .4, I = "open", Ee = "(prefers-reduced-motion: reduce)", L = class TocPreferences {
482
+ ], Te = 3, Ee = 30, De = .4, z = "open", Oe = "(prefers-reduced-motion: reduce)", B = class TocPreferences {
464
483
  static all() {
465
- let e = TocPreferences.store.get(M.all);
484
+ let e = TocPreferences.store.get(F.all);
466
485
  return ve.find((t) => t === e);
467
486
  }
468
487
  static setAll(e) {
469
- TocPreferences.store.set(M.all, e);
488
+ TocPreferences.store.set(F.all, e);
470
489
  }
471
490
  static foldsFor(e) {
472
- let t = TocPreferences.store.get(M.folds + e);
491
+ let t = TocPreferences.store.get(F.folds + e);
473
492
  return !t || typeof t != "object" || Array.isArray(t) ? {} : Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "boolean"));
474
493
  }
475
494
  static setFoldsFor(e, t) {
476
- TocPreferences.store.set(M.folds + e, Object.keys(t).length ? t : void 0);
495
+ TocPreferences.store.set(F.folds + e, Object.keys(t).length ? t : void 0);
477
496
  }
478
497
  static get store() {
479
- return TocPreferences.made ??= new se(M.store);
498
+ return TocPreferences.made ??= new ce(F.store);
480
499
  }
481
500
  static made;
482
- }, De = "@layer ui.components.toc.types{:host{display:block}.ui.toc{--_ui-toc-indent:var(--ui-toc-indent,.5em);--_ui-toc-section-weight:var(--ui-toc-section-weight,bold);--_ui-toc-current-weight:var(--ui-toc-current-weight,bold);--_ui-toc-gutter:var(--ui-toc-gutter,1.25em);--_ui-toc-control-color:var(--ui-toc-control-color,var(--ui-text-muted));--_ui-toc-control-hover-color:var(--ui-toc-control-hover-color,var(--ui-link));--_ui-toc-control-hover-background:var(--ui-toc-control-hover-background,var(--ui-primary-background));display:block}}@layer ui.components.toc.content{.head{min-height:1.75em;align-items:center;gap:.5em;margin-block-end:var(--ui-font-size);display:flex}slot[name=tools]{display:contents}::slotted([slot=tools]){order:2}.head:not(:has(.toggle-all)):after{content:\"\";flex:none;order:1;width:1.75em;margin-inline-start:auto}[part~=header]{--ui-header-margin-top:0;--ui-header-margin-bottom:0}.fold,.toggle-all{box-sizing:border-box;color:var(--_ui-toc-control-color);font:inherit;cursor:pointer;background:0 0;border:none;flex:none;place-items:center;padding:0;display:inline-grid}.fold:hover,.toggle-all:hover{color:var(--_ui-toc-control-hover-color)}.fold:focus-visible,.toggle-all:focus-visible{outline:2px solid var(--ui-focus-color,var(--ui-link));outline-offset:1px}.chevron,.chevrons{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;display:block}.toggle-all{border-radius:.4286em;width:1.75em;height:1.75em;margin-inline-start:auto}.toggle-all:hover{background:var(--_ui-toc-control-hover-background)}.chevrons{stroke-width:1.8px;width:1em;height:1em}.section-row{padding-inline-start:var(--_ui-toc-gutter);position:relative}.fold{width:var(--_ui-toc-gutter);border-radius:.25em;position:absolute;inset-block:0;inset-inline-start:0}.chevron{stroke-width:2px;width:.8571em;height:.8571em;transition:rotate var(--ui-duration-fast) var(--ui-ease);translate:0 -.1em}.fold[aria-expanded=true] .chevron{rotate:90deg}[part~=menu]{--ui-menu-margin:0}.section::part(item){font-weight:var(--_ui-toc-section-weight)}.entries{padding-inline-start:var(--_ui-toc-indent)}[part~=menu]>.entries{padding-inline-start:calc(var(--_ui-toc-gutter) + var(--_ui-toc-indent))}[part~=entries]{--ui-menu-margin:0}}@layer ui.components.toc.variations;@layer ui.components.toc.states{[part~=entry]:state(selected)::part(item){font-weight:var(--_ui-toc-current-weight)}}", Oe = /* @__PURE__ */ w("<ui-header>", 1), ke = /* @__PURE__ */ w("<div><!><slot name=tools>"), Ae = /* @__PURE__ */ w("<div><ui-menu direction=vertical appearance=text fluid>", 1), je = /* @__PURE__ */ w("<div><ui-item>", 1), Me = /* @__PURE__ */ w("<button type=button><svg viewBox=\"0 0 16 16\"aria-hidden=true><path d=\"M6 3.5 10.5 8 6 12.5\">"), Ne = /* @__PURE__ */ w("<button type=button><svg viewBox=\"0 0 16 16\"aria-hidden=true><path>"), Pe = /* @__PURE__ */ w("<ui-item padding=none-y><ui-menu direction=vertical appearance=text fluid>", 1), Fe = /* @__PURE__ */ w("<ui-item>", 1), R, z, B, V, H, U, W, Ie, Le, Re, ze, Be, G, K, q, J, Y, X, Z = class _UIToc extends (G = a, Be = [re], ze = [ie], Re = [m], Le = [f("empty")], Ie = [m], W = [ee], U = [m], H = [m], V = [h], B = [h], z = [oe], R = [h], G) {
501
+ }, ke = "@layer ui.components.toc.types{:host{display:block}.ui.toc{--_ui-toc-indent:var(--ui-toc-indent,.5em);--_ui-toc-section-weight:var(--ui-toc-section-weight,bold);--_ui-toc-current-weight:var(--ui-toc-current-weight,bold);--_ui-toc-gutter:var(--ui-toc-gutter,1.25em);--_ui-toc-control-color:var(--ui-toc-control-color,var(--ui-text-muted));--_ui-toc-control-hover-color:var(--ui-toc-control-hover-color,var(--ui-link));--_ui-toc-control-hover-background:var(--ui-toc-control-hover-background,var(--ui-primary-background));--_ui-toc-head-background:var(--ui-toc-head-background,none);--_ui-toc-head-padding:var(--ui-toc-head-padding,0);--_ui-toc-head-height:var(--ui-toc-head-height,1.75em);--_ui-toc-head-gap:var(--ui-toc-head-gap,var(--ui-font-size));--_ui-toc-head-position:var(--ui-toc-head-position,static);--_ui-toc-padding:var(--ui-toc-padding,0);display:block}}@layer ui.components.toc.content{.head{min-height:var(--_ui-toc-head-height);box-sizing:border-box;position:var(--_ui-toc-head-position);z-index:1;padding:var(--_ui-toc-head-padding);background:var(--_ui-toc-head-background);align-items:center;gap:.5em;margin-block-end:var(--_ui-toc-head-gap);display:flex;inset-block-start:0}slot[name=tools]{display:contents}::slotted([slot=tools]){order:2}.toggle-room{flex:none;width:1.75em;margin-inline-start:auto}[part~=header]{--ui-header-margin-top:0;--ui-header-margin-bottom:0}.fold,.toggle-all{box-sizing:border-box;color:var(--_ui-toc-control-color);font:inherit;cursor:pointer;background:0 0;border:none;flex:none;place-items:center;padding:0;display:inline-grid}.fold:hover,.toggle-all:hover{color:var(--_ui-toc-control-hover-color)}.fold:focus-visible,.toggle-all:focus-visible{outline:2px solid var(--ui-focus-color,var(--ui-link));outline-offset:1px}.chevron,.chevrons{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;display:block}.toggle-all{border-radius:.4286em;width:1.75em;height:1.75em;margin-inline-start:auto}.toggle-all:hover{background:var(--_ui-toc-control-hover-background)}.chevrons{stroke-width:1.8px;width:1em;height:1em}.section-row{padding-inline-start:var(--_ui-toc-gutter);position:relative}.fold{width:var(--_ui-toc-gutter);border-radius:.25em;position:absolute;inset-block:0;inset-inline-start:0}.chevron{stroke-width:2px;width:.8571em;height:.8571em;transition:rotate var(--ui-duration-fast) var(--ui-ease);translate:0 -.1em}.fold[aria-expanded=true] .chevron{rotate:90deg}[part~=menu]{--ui-menu-margin:var(--_ui-toc-padding)}.section::part(item){font-weight:var(--_ui-toc-section-weight)}.entries{padding-inline-start:var(--_ui-toc-indent)}[part~=menu]>.entries{padding-inline-start:calc(var(--_ui-toc-gutter) + var(--_ui-toc-indent))}[part~=entries]{--ui-menu-margin:0}}@layer ui.components.toc.variations;@layer ui.components.toc.states{[part~=entry]:state(selected)::part(item){font-weight:var(--_ui-toc-current-weight)}}", Ae = /* @__PURE__ */ D("<ui-header>", 1), je = /* @__PURE__ */ D("<div><!><slot name=tools>"), Me = /* @__PURE__ */ D("<div><ui-menu direction=vertical appearance=text fluid>", 1), Ne = /* @__PURE__ */ D("<span aria-hidden=true>"), Pe = /* @__PURE__ */ D("<div><ui-item>", 1), Fe = /* @__PURE__ */ D("<button type=button><svg viewBox=\"0 0 16 16\"aria-hidden=true><path d=\"M6 3.5 10.5 8 6 12.5\">"), Ie = /* @__PURE__ */ D("<button type=button><svg viewBox=\"0 0 16 16\"aria-hidden=true><path>"), Le = /* @__PURE__ */ D("<ui-item padding=none-y><ui-menu direction=vertical appearance=text fluid>", 1), Re = /* @__PURE__ */ D("<ui-item>", 1), V, H, U, W, ze, Be, Ve, He, Ue, We, Ge, Ke, qe, Je, G, K, q, J, Y, X, Z, Q = class _UIToc extends (G = a, Je = [ie], qe = [ae], Ke = [g], Ge = [ee("empty")], We = [g], Ue = [te], He = [g], Ve = [g], Be = [_], ze = [_], W = [se], U = [_], H = [g], V = [re("click")], G) {
483
502
  constructor() {
484
- super(...arguments), c(K, 5, this), p(this, q, c(K, 8, this, [])), c(K, 11, this), p(this, J, c(K, 12, this)), c(K, 15, this), p(this, Y, c(K, 16, this, {})), c(K, 19, this), p(this, X, c(K, 20, this)), c(K, 23, this), t(this, "frame", new i({
503
+ super(...arguments), c(K, 5, this), h(this, q, c(K, 8, this, [])), c(K, 11, this), h(this, J, c(K, 12, this)), c(K, 15, this), h(this, Y, c(K, 16, this, {})), c(K, 19, this), h(this, X, c(K, 20, this)), c(K, 23, this), t(this, "frame", new i({
485
504
  when: d,
486
505
  run: /* @__PURE__ */ n(() => this.onFrame(), "run")
487
- })), t(this, "queuedUpdate");
506
+ })), t(this, "queuedUpdate"), h(this, Z, c(K, 24, this)), c(K, 27, this);
488
507
  }
489
508
  get isEmpty() {
490
509
  return !this.sections.length;
491
510
  }
492
511
  get pathInView() {
493
- return N.pathTo(this.sections, this.idInView);
512
+ return I.pathTo(this.sections, this.idInView);
494
513
  }
495
514
  get sectionIdInView() {
496
515
  return this.pathInView[0];
@@ -512,145 +531,151 @@ var de = {
512
531
  this.handFolds = {
513
532
  ...this.handFolds,
514
533
  [e.id]: !this.isSectionOpen(e)
515
- }, L.setFoldsFor(this.path, this.handFolds);
534
+ }, B.setFoldsFor(this.path, this.handFolds);
516
535
  }
517
536
  toggleAll() {
518
- this.allFolds = this.isAllOpen ? "collapsed" : "expanded", this.handFolds = {}, L.setAll(this.allFolds), L.setFoldsFor(this.path, {});
537
+ this.allFolds = this.isAllOpen ? "collapsed" : "expanded", this.handFolds = {}, B.setAll(this.allFolds), B.setFoldsFor(this.path, {});
519
538
  }
520
539
  get path() {
521
540
  return this.domElement.ownerDocument.defaultView?.location.pathname ?? "";
522
541
  }
523
542
  loadFolds() {
524
- this.handFolds = L.foldsFor(this.path), this.allFolds = L.all();
543
+ this.handFolds = B.foldsFor(this.path), this.allFolds = B.all();
525
544
  }
526
545
  render() {
527
546
  let e = this;
528
- var t = Ae(), n = t.firstChild;
529
- return x(t, v(g, {
547
+ var t = Me(), n = t.firstChild;
548
+ return w(t, x(y, {
530
549
  get when() {
531
- return e.heading || e.hasFolds;
550
+ return e.shownHeading || e.hasFolds;
532
551
  },
533
552
  get children() {
534
- var t = ke(), n = t.firstChild, r = n.nextSibling;
535
- return x(t, v(g, {
553
+ var t = je(), n = t.firstChild, r = n.nextSibling;
554
+ return w(t, x(y, {
536
555
  get when() {
537
- return e.heading;
556
+ return e.shownHeading;
538
557
  },
539
558
  get children() {
540
- var t = Oe();
541
- return t._$owner = b(), x(t, () => e.heading), y(() => e.partForName("header"), (e) => {
542
- C(t, "part", e);
559
+ var t = Ae();
560
+ return t._$owner = C(), w(t, () => e.shownHeading), S(() => e.partForName("header"), (e) => {
561
+ E(t, "part", e);
543
562
  }), t;
544
563
  }
545
- }), n), x(t, v(g, {
564
+ }), n), w(t, x(y, {
546
565
  get when() {
547
566
  return e.hasFolds;
548
567
  },
568
+ get fallback() {
569
+ var e = Ne();
570
+ return S(() => T(at), (t, n) => {
571
+ b(e, t, n);
572
+ }), e;
573
+ },
549
574
  get children() {
550
575
  return e.toggleAllButton();
551
576
  }
552
- }), r), r._$owner = b(), y(() => ({
553
- e: S(Ge),
577
+ }), r), r._$owner = C(), S(() => ({
578
+ e: T(et),
554
579
  t: e.partForName("head")
555
580
  }), ({ e, t: n }, r) => {
556
- _(t, e, r?.e), n !== r?.t && C(t, "part", n);
581
+ b(t, e, r?.e), n !== r?.t && E(t, "part", n);
557
582
  }), t;
558
583
  }
559
- }), n), n._$owner = b(), x(n, v(ce, {
584
+ }), n), n._$owner = C(), w(n, x(v, {
560
585
  get each() {
561
586
  return e.sections;
562
587
  },
563
588
  children: (t) => e.section(t)
564
- })), y(() => ({
565
- e: S(e.rootClass),
589
+ })), S(() => ({
590
+ e: T(e.rootClass),
566
591
  t: e.partForName("toc"),
567
592
  a: e.partForName("menu"),
568
593
  o: e.menuSize,
569
594
  i: e.translationForKey("label")
570
595
  }), ({ e, t: r, a: i, o: a, i: o }, s) => {
571
- _(t, e, s?.e), r !== s?.t && C(t, "part", r), i !== s?.a && C(n, "part", i), a !== s?.o && C(n, "size", a), o !== s?.i && C(n, "aria-label", o);
596
+ b(t, e, s?.e), r !== s?.t && E(t, "part", r), i !== s?.a && E(n, "part", i), a !== s?.o && E(n, "size", a), o !== s?.i && E(n, "aria-label", o);
572
597
  }), t;
573
598
  }
574
599
  section(e) {
575
600
  let t = /* @__PURE__ */ n(() => !!e.entries.length && this.isSectionOpen(e), "isOpen"), r = this;
576
601
  return [(() => {
577
- var t = je(), n = t.firstChild;
578
- return x(t, v(g, {
602
+ var t = Pe(), n = t.firstChild;
603
+ return w(t, x(y, {
579
604
  get when() {
580
605
  return e.entries.length;
581
606
  },
582
607
  get children() {
583
608
  return r.foldButton(e);
584
609
  }
585
- }), n), n._$owner = b(), x(n, () => e.text), y(() => ({
586
- e: S(Ke),
610
+ }), n), n._$owner = C(), w(n, () => e.text), S(() => ({
611
+ e: T(tt),
587
612
  t: r.partForName("section-row"),
588
613
  a: r.partForName("section"),
589
- o: S(Ue),
614
+ o: T(Qe),
590
615
  i: `#${e.id}`,
591
616
  n: r.sectionIdInView === e.id ? "" : void 0
592
617
  }), ({ e, t: r, a: i, o: a, i: o, n: s }, c) => {
593
- _(t, e, c?.e), r !== c?.t && C(t, "part", r), i !== c?.a && C(n, "part", i), _(n, a, c?.o), o !== c?.i && C(n, "link", o), s !== c?.n && C(n, "selected", s);
618
+ b(t, e, c?.e), r !== c?.t && E(t, "part", r), i !== c?.a && E(n, "part", i), b(n, a, c?.o), o !== c?.i && E(n, "link", o), s !== c?.n && E(n, "selected", s);
594
619
  }), t;
595
620
  })(), ue(() => r.entries(e, t))];
596
621
  }
597
622
  foldButton(e) {
598
623
  let t = /* @__PURE__ */ n(() => this.isSectionOpen(e), "isOpen"), r = /* @__PURE__ */ n(() => this.translationForKey(t() ? "foldSection" : "openSection", { section: e.text }), "tip"), i = this;
599
- var a = Me(), o = a.firstChild;
600
- return a._$$click = () => i.toggleSection(e), y(() => ({
601
- e: S(qe),
624
+ var a = Fe(), o = a.firstChild;
625
+ return a._$$click = () => i.toggleSection(e), S(() => ({
626
+ e: T(nt),
602
627
  t: i.partForName("fold"),
603
628
  a: e.text,
604
629
  o: t() ? "true" : "false",
605
630
  i: r(),
606
- n: S(Je)
631
+ n: T(rt)
607
632
  }), ({ e, t, a: n, o: r, i, n: s }, c) => {
608
- _(a, e, c?.e), t !== c?.t && C(a, "part", t), n !== c?.a && C(a, "aria-label", n), r !== c?.o && C(a, "aria-expanded", r), i !== c?.i && C(a, "title", i), _(o, s, c?.n);
633
+ b(a, e, c?.e), t !== c?.t && E(a, "part", t), n !== c?.a && E(a, "aria-label", n), r !== c?.o && E(a, "aria-expanded", r), i !== c?.i && E(a, "title", i), b(o, s, c?.n);
609
634
  }), a;
610
635
  }
611
636
  toggleAllButton() {
612
637
  let e = /* @__PURE__ */ n(() => this.translationForKey(this.isAllOpen ? "collapseAll" : "expandAll"), "label"), t = this;
613
- var r = Ne(), i = r.firstChild, a = i.firstChild;
614
- return r._$$click = () => t.toggleAll(), y(() => ({
615
- e: S(Ye),
638
+ var r = Ie(), i = r.firstChild, a = i.firstChild;
639
+ return r._$$click = () => t.toggleAll(), S(() => ({
640
+ e: T(it),
616
641
  t: t.partForName("toggle-all"),
617
642
  a: e(),
618
643
  o: e(),
619
644
  i: t.isAllOpen ? "true" : "false",
620
- n: S(Xe),
621
- s: t.isAllOpen ? Qe : Ze
645
+ n: T(ot),
646
+ s: t.isAllOpen ? ct : st
622
647
  }), ({ e, t, a: n, o, i: s, n: c, s: l }, u) => {
623
- _(r, e, u?.e), t !== u?.t && C(r, "part", t), n !== u?.a && C(r, "aria-label", n), o !== u?.o && C(r, "title", o), s !== u?.i && C(r, "aria-pressed", s), _(i, c, u?.n), l !== u?.s && C(a, "d", l);
648
+ b(r, e, u?.e), t !== u?.t && E(r, "part", t), n !== u?.a && E(r, "aria-label", n), o !== u?.o && E(r, "title", o), s !== u?.i && E(r, "aria-pressed", s), b(i, c, u?.n), l !== u?.s && E(a, "d", l);
624
649
  }), r;
625
650
  }
626
651
  entries(e, t) {
627
652
  let r = /* @__PURE__ */ n(() => !!e.entries.length && (t ? t() : this.isOpenAllTheWay || this.pathInView.includes(e.id)), "isOpen"), i = this;
628
- return v(g, {
653
+ return x(y, {
629
654
  get when() {
630
655
  return r();
631
656
  },
632
657
  get children() {
633
- var t = Pe(), n = t.firstChild;
634
- return t._$owner = b(), n._$owner = b(), x(n, v(ce, {
658
+ var t = Le(), n = t.firstChild;
659
+ return t._$owner = C(), n._$owner = C(), w(n, x(v, {
635
660
  get each() {
636
661
  return e.entries;
637
662
  },
638
663
  children: (e) => [(() => {
639
- var t = Fe();
640
- return t._$owner = b(), x(t, () => e.text), y(() => ({
664
+ var t = Re();
665
+ return t._$owner = C(), w(t, () => e.text), S(() => ({
641
666
  e: i.partForName("entry"),
642
667
  t: `#${e.id}`,
643
668
  a: i.idInView === e.id ? "" : void 0
644
669
  }), ({ e, t: n, a: r }, i) => {
645
- e !== i?.e && C(t, "part", e), n !== i?.t && C(t, "link", n), r !== i?.a && C(t, "selected", r);
670
+ e !== i?.e && E(t, "part", e), n !== i?.t && E(t, "link", n), r !== i?.a && E(t, "selected", r);
646
671
  }), t;
647
672
  })(), ue(() => i.entries(e))]
648
- })), y(() => ({
649
- e: S(We),
673
+ })), S(() => ({
674
+ e: T($e),
650
675
  t: i.partForName("entries"),
651
676
  a: i.menuSize
652
677
  }), ({ e, t: r, a: i }, a) => {
653
- _(t, e, a?.e), r !== a?.t && C(n, "part", r), i !== a?.a && C(n, "size", i);
678
+ b(t, e, a?.e), r !== a?.t && E(n, "part", r), i !== a?.a && E(n, "size", i);
654
679
  }), t;
655
680
  }
656
681
  });
@@ -660,7 +685,7 @@ var de = {
660
685
  }
661
686
  watch() {
662
687
  let e = this.domElement.ownerDocument, t = e.defaultView, r = new MutationObserver(() => this.schedule("rescan")), i = new ResizeObserver(() => this.schedule("follow")), a = /* @__PURE__ */ n(() => this.schedule("follow"), "onScroll"), o = /* @__PURE__ */ n(() => this.schedule("rescan"), "onShow"), s = /* @__PURE__ */ n((e) => {
663
- let t = N.shadowHosts;
688
+ let t = I.shadowHosts;
664
689
  t && e.target.matches?.(t) && this.schedule("rescan");
665
690
  }, "onDrawn"), c = /* @__PURE__ */ n(() => this.reveal(), "onHash");
666
691
  this.loadFolds();
@@ -673,7 +698,7 @@ var de = {
673
698
  }), d = this.scrollerElement(), d?.addEventListener("scroll", a, { passive: !0 });
674
699
  }, "start");
675
700
  return t.addEventListener("scroll", a, { passive: !0 }), t.addEventListener("resize", a, { passive: !0 }), t.addEventListener("hashchange", c), e.readyState === "loading" ? e.addEventListener("DOMContentLoaded", f, { once: !0 }) : u(f), () => {
676
- r.disconnect(), i.disconnect(), l?.tabs?.removeEventListener(Q, o), l?.root.removeEventListener($, s), d?.removeEventListener("scroll", a), e.removeEventListener("DOMContentLoaded", f), t.removeEventListener("scroll", a), t.removeEventListener("resize", a), t.removeEventListener("hashchange", c), this.frame.cancel(), this.queuedUpdate = void 0;
701
+ r.disconnect(), i.disconnect(), l?.tabs?.removeEventListener(Ze, o), l?.root.removeEventListener($, s), d?.removeEventListener("scroll", a), e.removeEventListener("DOMContentLoaded", f), t.removeEventListener("scroll", a), t.removeEventListener("resize", a), t.removeEventListener("hashchange", c), this.frame.cancel(), this.queuedUpdate = void 0;
677
702
  };
678
703
  }
679
704
  observe({ observer: e, resized: t, onShow: n, onDrawn: r }) {
@@ -682,8 +707,8 @@ var de = {
682
707
  subtree: !0,
683
708
  childList: !0,
684
709
  attributes: !0,
685
- attributeFilter: He
686
- }), t.observe(i.root), i.tabs?.addEventListener(Q, n), i.root.addEventListener($, r), this.rescan(), this.reveal(), i;
710
+ attributeFilter: Xe
711
+ }), t.observe(i.root), i.tabs?.addEventListener(Ze, n), i.root.addEventListener($, r), this.rescan(), this.reveal(), i;
687
712
  }
688
713
  schedule(e) {
689
714
  e === "rescan" ? this.queuedUpdate = e : this.queuedUpdate ??= e, this.frame.ask();
@@ -693,39 +718,51 @@ var de = {
693
718
  this.queuedUpdate = void 0, e === "rescan" ? this.rescan() : this.followScroll();
694
719
  }
695
720
  rescan() {
696
- let e = this.followedContent(), t = e?.tabs ? N.shownPane(e.tabs) : e?.root, n = t ? N.scan(t, _UIToc.reservedIdsFor(e?.tabs)) : [];
697
- this.sections = n, this.send("ui-drawn", { ids: N.flatten(n).map((e) => e.id) }), this.followScroll(n);
721
+ let e = this.followedContent(), t = e?.tabs ? I.shownPane(e.tabs) : e?.layout ? I.layoutPage(e.layout) : e?.root, n = t ? I.scan(t, _UIToc.reservedIdsFor(e?.tabs)) : [];
722
+ this.pageTitle = e?.layout && t ? I.pageTitle(t) : void 0, this.sections = n, this.send("ui-drawn", { ids: I.flatten(n).map((e) => e.id) }), this.followScroll(n);
698
723
  }
699
724
  followScroll(e = this.sections) {
700
- let t = N.current(e, this.domElement.ownerDocument, this.scrollerElement());
725
+ let t = I.current(e, this.domElement.ownerDocument, this.scrollerElement());
701
726
  t !== this.idInView && (this.idInView = t, t && this.send("ui-scrolled-to", { value: t }));
702
727
  }
703
728
  reveal() {
704
729
  let e = this.domElement.ownerDocument, t = e.defaultView.location.hash;
705
- t && P.forDocument(e).landOnHash(t);
730
+ t && L.forDocument(e).landOnHash(t);
706
731
  }
707
732
  followedContent() {
708
- return N.followed(this.domElement.ownerDocument, this.for || void 0);
733
+ return I.followed(this.domElement.ownerDocument, this.for || void 0, this.domElement);
709
734
  }
710
735
  scrollerElement() {
711
- return this.scroller && this.domElement.ownerDocument.getElementById(this.scroller) || void 0;
736
+ if (this.scroller) return this.domElement.ownerDocument.getElementById(this.scroller) ?? void 0;
737
+ let e = this.followedContent()?.layout;
738
+ return e ? I.scrollerAround(e) : void 0;
739
+ }
740
+ get shownHeading() {
741
+ return this.heading || this.pageTitle;
742
+ }
743
+ onLinkClick(e) {
744
+ if (!this.followedContent()?.layout || e.button !== 0 || e.metaKey || e.ctrlKey) return;
745
+ let t = e.composedPath().find((e) => e instanceof HTMLAnchorElement)?.getAttribute("href");
746
+ if (!t?.startsWith("#")) return;
747
+ let n = I.elementById(this.domElement.ownerDocument, decodeURIComponent(t.slice(1)));
748
+ n && (e.preventDefault(), n.scrollIntoView({ block: "start" }));
712
749
  }
713
750
  static reservedIdsFor(e) {
714
751
  return e ? new Set([...e.children].map((e, t) => e.getAttribute("value") ?? String(t))) : /* @__PURE__ */ new Set();
715
752
  }
716
753
  };
717
- K = e(G), q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), o(K, 4, "sections", Re, Z, q), o(K, 2, "isEmpty", Le, Z), o(K, 4, "idInView", Ie, Z, J), o(K, 2, "pathInView", W, Z), o(K, 4, "handFolds", U, Z, Y), o(K, 4, "allFolds", H, Z, X), o(K, 1, "toggleSection", V, Z), o(K, 1, "toggleAll", B, Z), o(K, 1, "watch", z, Z), o(K, 1, "followScroll", R, Z), o(K, 13, "vocabulary", Be, Z), o(K, 13, "elementSetup", ze, Z), s(K, Z), n(Z, "UIToc"), t(Z, "vocabulary", c(K, 24, Z, de)), c(K, 27, Z), t(Z, "elementSetup", c(K, 28, Z, {
718
- styleSheets: { toc: De },
754
+ K = e(G), q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), o(K, 4, "sections", Ke, Q, q), o(K, 2, "isEmpty", Ge, Q), o(K, 4, "idInView", We, Q, J), o(K, 2, "pathInView", Ue, Q), o(K, 4, "handFolds", He, Q, Y), o(K, 4, "allFolds", Ve, Q, X), o(K, 1, "toggleSection", Be, Q), o(K, 1, "toggleAll", ze, Q), o(K, 1, "watch", W, Q), o(K, 1, "followScroll", U, Q), o(K, 4, "pageTitle", H, Q, Z), o(K, 1, "onLinkClick", V, Q), o(K, 13, "vocabulary", Je, Q), o(K, 13, "elementSetup", qe, Q), s(K, Q), n(Q, "UIToc"), t(Q, "vocabulary", c(K, 28, Q, de)), c(K, 31, Q), t(Q, "elementSetup", c(K, 32, Q, {
755
+ styleSheets: { toc: ke },
719
756
  delegatesFocus: !1
720
- })), c(K, 31, Z);
721
- var Ve = Z, He = [
757
+ })), c(K, 35, Q);
758
+ var Ye = Q, Xe = [
722
759
  "heading",
723
760
  "label",
724
761
  "level",
725
762
  "id"
726
- ], Q = "ui-opened", $ = "ui-drawn", Ue = "section", We = "entries", Ge = "head", Ke = "section-row", qe = "fold", Je = "chevron", Ye = "toggle-all", Xe = "chevrons", Ze = "M4 3.5 8 7.5 12 3.5M4 7.5 8 11.5 12 7.5", Qe = "M4 8.5 8 4.5 12 8.5M4 12.5 8 8.5 12 12.5";
763
+ ], Ze = "ui-opened", $ = "ui-drawn", Qe = "section", $e = "entries", et = "head", tt = "section-row", nt = "fold", rt = "chevron", it = "toggle-all", at = "toggle-room", ot = "chevrons", st = "M4 3.5 8 7.5 12 3.5M4 7.5 8 11.5 12 7.5", ct = "M4 8.5 8 4.5 12 8.5M4 12.5 8 8.5 12 12.5";
727
764
  // src/components/ui-toc/index.ts
728
- le(["click"]), Ve.define();
729
- export { P as HashLanding, T as PageOutline, N as TocIndex, Ve as UIToc };
765
+ le(["click"]), Ye.define();
766
+ export { L as HashLanding, O as PageOutline, I as TocIndex, Ye as UIToc };
730
767
 
731
768
  //# sourceMappingURL=ui-toc.js.map