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
@@ -1 +1 @@
1
- {"version":3,"file":"ui-page-layout.js","names":["<Show when={this.has(\"drawer\")}>\n <div\n class={DRAWER}\n part={this.partForName(\"drawer\")}\n ref={(element) => this.drawerColumnDrawn(element)}\n onPointerEnter={(event) => this.onDrawerEnter(event)}\n onPointerLeave={() => this.onDrawerLeave()}\n onFocusIn={() => this.onDrawerFocusIn()}\n onFocusOut={(event) => this.onDrawerFocusOut(event)}\n >\n <div class={DRAWER_BOX} part={this.partForName(\"drawer-box\")}>\n <slot name={this.slotForName(\"drawer\")} ref={(slot) => this.drawerSlot = slot} />\n </div>\n </div>\n </Show>","this","ref={(element) => this.drawerColumnDrawn(element)}","ref={(slot) => this.drawerSlot = slot}","part={this.partForName(\"drawer\")}","class={DRAWER_BOX}","part={this.partForName(\"drawer-box\")}","name={this.slotForName(\"drawer\")}","<div\n class={DRAWER}\n part={this.partForName(\"drawer\")}\n ref={(element) => this.drawerColumnDrawn(element)}\n onPointerEnter={(event) => this.onDrawerEnter(event)}\n onPointerLeave={() => this.onDrawerLeave()}\n onFocusIn={() => this.onDrawerFocusIn()}\n onFocusOut={(event) => this.onDrawerFocusOut(event)}\n >\n <div class={DRAWER_BOX} part={this.partForName(\"drawer-box\")}>\n <slot name={this.slotForName(\"drawer\")} ref={(slot) => this.drawerSlot = slot} />\n </div>\n </div>","<div class={LAYOUT} part={this.partForName(\"layout\")} style={this.layoutStyle}>\n <Show when={this.has(\"drawer\")}>\n <div\n class={DRAWER}\n part={this.partForName(\"drawer\")}\n ref={(element) => this.drawerColumnDrawn(element)}\n onPointerEnter={(event) => this.onDrawerEnter(event)}\n onPointerLeave={() => this.onDrawerLeave()}\n onFocusIn={() => this.onDrawerFocusIn()}\n onFocusOut={(event) => this.onDrawerFocusOut(event)}\n >\n <div class={DRAWER_BOX} part={this.partForName(\"drawer-box\")}>\n <slot name={this.slotForName(\"drawer\")} ref={(slot) => this.drawerSlot = slot} />\n </div>\n </div>\n </Show>\n <div class={BODY}>\n <Show when={this.drawsMenuButton}>\n <ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />\n </Show>\n {this.region(\"menu\")}\n <div class={UNDER_MENU}>\n {this.region(\"page-menu\")}\n <div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>\n {this.region(\"footer\")}\n </div>\n </div>\n </div>","<Show when={this.drawsMenuButton}>\n <ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />\n </Show>","part={this.partForName(\"menu-button\")}","aria-label={this.translationForKey(\"menu\")}","title={this.translationForKey(\"menu\")}","aria-expanded={this.isOpen ? \"true\" : \"false\"}","<ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />","<div class={BODY}>\n <Show when={this.drawsMenuButton}>\n <ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />\n </Show>\n {this.region(\"menu\")}\n <div class={UNDER_MENU}>\n {this.region(\"page-menu\")}\n <div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>\n {this.region(\"footer\")}\n </div>\n </div>","<div class={UNDER_MENU}>\n {this.region(\"page-menu\")}\n <div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>\n {this.region(\"footer\")}\n </div>","<div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>","part={this.partForName(\"layout\")}","style={this.layoutStyle}","class={BODY}","class={UNDER_MENU}","class={ROW}","class={PAGE}","part={this.partForName(\"page\")}","<Show when={this.has(name)}>\n <div\n class={name}\n part={this.partForName(name)}\n ref={(box) => name === MENU ? this.menuDrawn(box) : void 0}\n >\n <slot name={this.slotForName(name)} />\n </div>\n </Show>","ref={(box) => name === MENU ? this.menuDrawn(box) : void 0}","part={this.partForName(name)}","name={this.slotForName(name)}","<div\n class={name}\n part={this.partForName(name)}\n ref={(box) => name === MENU ? this.menuDrawn(box) : void 0}\n >\n <slot name={this.slotForName(name)} />\n </div>","E.DOMElement","E.UIComponent","E.proto","E.protoMerged","E.cssState","E.state","E.watches","E.isSameList","E.onChange","E.on","E.whileConnected","E.SlotContent","E.beforeNextPaint","E.after","_$getOwner","_$readShallow","_$setAttribute","__name","pageLayoutCSS","__decoratorStart","__publicField","__name$1","__decorateElement","__decoratorMetadata","__runInitializers","__privateAdd","getOwner$1","pageLayoutVocabulary","UIPageLayout_default","_tmpl$","_tmpl$2","_tmpl$3","_tmpl$4","_drawsMenuButton_dec","_onNarrowChanged_dec","_menuHeight_dec","_watchWidth_dec","_isWidening_dec","_compactWidth_dec","_isMoving_dec","_onNavigating_dec","_onKeyDown_dec","_onIconsOnlyChanged_dec","_drawerNavs_dec","_isNarrow_dec","_isOpen_dec","_isCompact_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_isOpen","_isNarrow","_isMoving","_compactWidth","_isWidening","_menuHeight","LIGHT_DOM_CHANGES","DOMElement","_UIPageLayout","UIComponent","proto","protoMerged","cssState","state","watches","isSameList","onChange","on","whileConnected","SlotContent","name","COMPACT","element","SITE_NAV","nav","navs","COLLAPSED","showsIconsOnly","oldState","FULL","newState","beforeNextPaint","column","now","width","move","event","run","moves","box","after","OPEN_DELAY","CLOSE_DELAY","menuHeight","COMPACT_WIDTH","NAV_BAR_HEIGHT","isServer","resized","ABSOLUTE","NAV_BUTTON","child","target","node","_self$","_el$","_el$5","_el$7","_el$8","_el$9","_el$10","_el$11","_el$12","_el$13","insert","createComponent","Show","_el$2","_el$3","_el$4","ref","slot","effect","readShallow","DRAWER","DRAWER_BOX","className","_p$","t","setAttribute","i","_el$6","BARS","BASIC","SMALL","MENU_BUTTON","a","o","LAYOUT","BODY","UNDER_MENU","ROW","PAGE","style","n","s","h","_self$2","_el$14","_el$15","MENU","UIPageLayout","delegateEvents"],"sources":["../src/components/ui-page-layout/UIPageLayout.en.ts","../src/components/ui-page-layout/UIPageLayout.tsx","../src/components/ui-page-layout/index.ts"],"sourcesContent":["/**\n * The English vocabulary of `<ui-page-layout>`: every name the tag uses.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `pageLayoutVocabulary`\n * The names of `<ui-page-layout>`: what stays on screen around a site's pages -- its menu, its drawer (the side\n * navigation), two side bars and a footer -- in its own box.\n ****************/\nexport const pageLayoutVocabulary = {\n tag: \"ui-page-layout\",\n icon: \"columns\",\n topics: [\"layout\", \"containers\", \"navigation\"],\n aka: [\"app layout\", \"app shell\", \"site layout\", \"page frame\", \"drawer layout\", \"navigation drawer\", \"holy grail\"],\n noun: \"page layout\",\n partOfSpeech: \"structure\",\n description:\n \"A page layout puts what stays on screen around a page: a menu across the top, a drawer of side navigation \" +\n \"down the start, side bars either side of the page, and a footer. An empty one takes no room. Its own box, \" +\n \"not the window: below 40em of it, the drawer slides over the page.\",\n skeleton: \"24 wide: 4 line paragraph\",\n attributes: [\n {\n name: \"drawer\",\n group: \"appearance\",\n kind: \"valueOnly\",\n values: [\"compact\"],\n description:\n \"`compact`: the drawer shows only its icons (its `<ui-site-nav>`s `collapsed`), and opens over the page \" +\n \"while the pointer rests on it. None: the whole drawer. `toggleDrawer()` switches it, and says so with \" +\n \"`ui-toggle`.\"\n }\n ],\n events: [\n {\n name: \"ui-toggle\",\n detail: '{ newState: \"compact\" | \"full\", oldState: \"compact\" | \"full\" }',\n description:\n \"The drawer switched between its icons only (`compact`) and all of it (`full`), from `toggleDrawer()` \" +\n \"(a `<ui-site-nav-button>`'s click): a site keeps each person's choice, and sets `drawer` again next time.\"\n }\n ],\n slots: [\n { name: \"\", description: \"The page.\" },\n { name: \"menu\", description: \"The app's top bar, across the top beside the drawer: usually a `<ui-app-menu>`.\" },\n {\n name: \"page-menu\",\n description: \"A row of its own under the menu, over the page and its side bars: usually `<ui-site-tabs>`.\"\n },\n {\n name: \"drawer\",\n description: \"The side navigation, a column the whole height at the start: usually a `<ui-site-nav>`.\"\n },\n { name: \"left\", description: \"A side bar between the drawer and the page.\" },\n { name: \"right\", description: \"A side bar at the page's end.\" },\n { name: \"footer\", description: \"Across the bottom, under the page and its side bars.\" }\n ],\n parts: [\n { name: \"layout\", description: \"The grid of regions: the drawer's column, then the rest.\" },\n { name: \"drawer\", description: \"The drawer's column, on its own fill with a line at its end.\" },\n { name: \"drawer-box\", description: \"The drawer's box inside its column: what scrolls, and what slides out.\" },\n { name: \"menu\", description: \"The menu's row.\" },\n { name: \"page-menu\", description: \"The page menu's row.\" },\n { name: \"left\", description: \"The start side bar's box.\" },\n { name: \"page\", description: \"The page's box.\" },\n { name: \"right\", description: \"The end side bar's box.\" },\n { name: \"footer\", description: \"The footer's row.\" },\n {\n name: \"menu-button\",\n description:\n \"Its own button to show the drawer, at a narrow width, when nothing inside it is a `<ui-site-nav-button>`.\"\n }\n ],\n states: [\n { name: \"compact\", description: '`drawer=\"compact\"`: the drawer shows only its icons.' },\n {\n name: \"open\",\n description:\n \"The drawer is open over the page: slid in at a narrow width, or opened from its icons while the pointer \" +\n \"rests on it.\"\n },\n { name: \"narrow\", description: \"Below 40em of its own box: one column, the drawer slid out of the way.\" }\n ],\n texts: [{ key: \"menu\", text: \"Pages\", description: \"Its own button to show the drawer, at a narrow width.\" }]\n} as const satisfies E.ComponentVocabulary\n","import { Show } from \"solid-js\"\nimport { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E } from \"spell/ui/core\"\nimport { pageLayoutVocabulary } from \"./UIPageLayout.en\"\n\nimport pageLayoutCSS from \"./UIPageLayout.css?inline\"\n\n// Above the class: `@E.watches` reads them while the class is defined\n\n/** What a change to its light DOM may move: an element in or out, or a `slot` changed. */\nconst LIGHT_DOM_CHANGES = { childList: true, subtree: true, attributes: true, attributeFilter: [\"slot\"] }\n\n/****************\n * ### `DOMPageLayoutElement`\n * The DOM element of `<ui-page-layout>`: its script API, `toggleDrawer()`.\n * Its component (`UIPageLayout`) carries it out.\n ****************/\nexport class DOMPageLayoutElement extends E.DOMElement<UIPageLayout> {\n /**\n * Show or hide the drawer, as its button does: narrow, slide it over the page or away; wide, switch it between\n * its icons only and all of it (`drawer`), and say so (`ui-toggle`).\n */\n toggleDrawer() {\n this.component?.toggleDrawer()\n }\n}\n\n/****************\n * ### `<ui-page-layout>`\n * The component behind `<ui-page-layout>`: what stays on screen around a site's pages (epic `mockup` T39).\n * A site draws it once and puts each page in it, so going between pages redraws only the page.\n *\n * <div class=\"layout\" part=\"layout\"> (a grid: the drawer's column, then the rest)\n * <div class=\"drawer\" part=\"drawer\"> (the whole height, at the start)\n * <div class=\"drawer-box\" part=\"drawer-box\"> <slot name=\"drawer\"> </div>\n * </div>\n * <div class=\"body\">\n * <ui-button part=\"menu-button\"> (narrow, with no `<ui-site-nav-button>`)\n * <div part=\"menu\"> <slot name=\"menu\"> </div> (flush against the drawer)\n * <div class=\"under-menu\"> (the drawer's line at its start)\n * <div part=\"page-menu\"> <slot name=\"page-menu\"> </div>\n * <div class=\"row\"> left | page (the default slot) | right </div>\n * <div part=\"footer\"> <slot name=\"footer\"> </div>\n * </div>\n * </div>\n * </div>\n *\n * - Its OWN box, not the window and not a root: Run draws a Spell site inside the editor's page.\n * - So plain boxes, no landmarks: a second `<main>` or banner inside the editor's page would be wrong;\n * what's slotted brings its own (the navigation's `<nav>`).\n * - At least as tall as the box it's in (`min-height: 100%`), the drawer running from top to bottom.\n * - A slot with nothing in it isn't drawn: no column, no row, no gap.\n * - The page is a font size in from the drawer; the menu's row is flush against it, on the drawer's fill:\n * - so the drawer and the menu read as one surface, the bar beside the drawer's top with no line between them\n * - the drawer's line starts under the menu, the menu's own line turning into it (epic `mockup` I25)\n * - `drawer=\"compact\"`: the drawer shows only its icons, as the layout sets `collapsed` on each `<ui-site-nav>` in it.\n * - The pointer resting on it half a second, or the keyboard's focus coming into it, opens it over the page,\n * all of it, the whole height of its column, without pushing the page: its column keeps its width.\n * Leaving it closes it, a moment later (0.15s).\n * - Its icons stay where they are as it opens and closes: the navigation keeps their room at the start the same\n * either way (`UISiteNav.css`, epic `mockup` C1 on J161).\n * - It grows out from the column's edge and shrinks back into it; switched to all of it and back, the column\n * widens and narrows (`UIPageLayout.css`, \"Motion\").\n * - Below 40em of its own box (a container query): one column, and the drawer slides over the page from the start\n * (`:state(open)`), from a `<ui-site-nav-button>` inside it, or its own menu button when it has none.\n * - Escape closes it; so does going to a page from it (`ui-navigating` from inside the drawer).\n * - `toggleDrawer()` (the `<ui-site-nav-button>`'s click): narrow, slides the drawer in or out; wide, switches\n * `drawer` and sends `ui-toggle`. Remembering the choice is the site's: the layout keeps nothing.\n * - It finds its navigations and buttons by their English tags (`ui-site-nav`, `ui-site-nav-button`).\n ****************/\nexport class UIPageLayout extends E.UIComponent<typeof pageLayoutVocabulary> {\n @E.proto static vocabulary = pageLayoutVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { \"page-layout\": pageLayoutCSS },\n DOMElement: DOMPageLayoutElement,\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n ////////////////\n // ## Regions\n ////////////////\n\n /** Which named slots have content. */\n readonly slots = new E.SlotContent(this.domElement)\n\n /** Has region `name` content? An empty one isn't drawn. */\n has(name: Region): boolean {\n return this.slots.hasContent(this.slotForName(name))\n }\n\n ////////////////\n // ## The drawer: compact, open\n ////////////////\n\n /** `drawer=\"compact\"`: the drawer shows only its icons. */\n @E.cssState(\"compact\")\n get isCompact(): boolean {\n return this.drawer === COMPACT\n }\n\n /**\n * The drawer is open over the page: slid in at a narrow width, or opened from its icons (`compact`).\n * - Wide and not compact, it changes nothing: the drawer is all there.\n */\n @E.cssState(\"open\") @E.state accessor isOpen = false\n\n /**\n * Below 40em of its own box: one column, the drawer slid out of the way.\n * - Read from its style, where the width is decided (a container query in `UIPageLayout.css`):\n * so the sheet stays the one truth.\n */\n @E.cssState(\"narrow\") @E.state accessor isNarrow = false\n\n /** Does the drawer show all of it: wide and not compact, or open over the page? A drawer button's `aria-expanded`. */\n get isDrawerShown(): boolean {\n return this.isNarrow ? this.isOpen : !this.isCompact || this.isOpen\n }\n\n /**\n * The `<ui-site-nav>`s in the drawer: slotted into it, or inside what is.\n * - English tags only, as `<ui-site-tabs>` finds its navigation.\n */\n @E.watches({ ...LIGHT_DOM_CHANGES, equals: E.isSameList })\n get drawerNavs(): readonly Element[] {\n return this.drawerElements().flatMap((element) =>\n element.localName === SITE_NAV ? [element] : [...element.querySelectorAll(SITE_NAV)]\n )\n }\n\n /**\n * The navigations show only their icons: compact, not open over the page, and not moving.\n * - While the column narrows, or the open box shrinks back, they keep all of it, clipped (`isMoving`):\n * they switch to their icons once it's narrow (epic `mockup` I32, Owen: \"the illusion of collapse is wonky\").\n */\n get showsIconsOnly(): boolean {\n return this.isCompact && !this.isOpen && !this.isMoving\n }\n\n /** SIDE EFFECT: each navigation in the drawer is `collapsed` while it shows only its icons. */\n @E.onChange(\"drawerNavs\", \"showsIconsOnly\", { writesDOMElement: true })\n protected onIconsOnlyChanged(navs: readonly Element[], showsIconsOnly: boolean) {\n for (const nav of navs) nav.toggleAttribute(COLLAPSED, showsIconsOnly)\n }\n\n /**\n * Show or hide the drawer: narrow, slide it in or out (`:state(open)`); wide, switch `drawer` between its icons\n * only and all of it, and send `ui-toggle`. Script API, on the DOM element too.\n * - From its icons to all of it, the switch waits a frame:\n * the column first holds the width it has, so it has a width to widen from (`isWidening`).\n * - From all of it to its icons, the column narrows to the width its icons will take (`narrowToIcons()`).\n */\n toggleDrawer() {\n if (this.isNarrow) {\n this.isOpen = !this.isOpen\n return\n }\n const oldState: DrawerState = this.isCompact ? COMPACT : FULL\n const newState: DrawerState = oldState === COMPACT ? FULL : COMPACT\n this.peekTimer?.cancel()\n this.cancelWidening?.()\n this.isWidening = false\n this.isOpen = false\n if (newState === FULL) {\n this.compactWidth = this.drawerColumn?.getBoundingClientRect().width\n this.isWidening = true\n this.cancelWidening = E.beforeNextPaint(() => this.switchDrawer(newState, oldState))\n } else {\n this.narrowToIcons(oldState)\n }\n }\n\n /**\n * Switch to its icons only: the column narrows to the width they take, all of it still drawn in it, clipped;\n * the navigations switch to their icons once it's there (`whileDrawerMoves()`).\n * - The width is measured first, just before the next paint:\n * each navigation shows its icons till then, the column's own width read at `fit-content`,\n * and all of it is back before anything is painted.\n */\n private narrowToIcons(oldState: DrawerState) {\n const navs = this.drawerNavs\n for (const nav of navs) nav.toggleAttribute(COLLAPSED, true)\n this.cancelWidening = E.beforeNextPaint(() => {\n this.compactWidth = this.iconsWidth()\n this.whileDrawerMoves()\n this.switchDrawer(COMPACT, oldState)\n for (const nav of navs) nav.toggleAttribute(COLLAPSED, this.showsIconsOnly)\n })\n }\n\n /**\n * The drawer's column's width at `fit-content`, read at once with no move: what its icons take, while they're shown.\n * - SIDE EFFECT: the column stops where it is, if it was moving, so it narrows from there.\n */\n private iconsWidth(): number | undefined {\n const column = this.drawerColumn\n if (!column) return undefined\n const now = column.getBoundingClientRect().width\n column.style.transition = \"none\"\n column.style.inlineSize = \"fit-content\"\n const width = column.getBoundingClientRect().width\n column.style.inlineSize = `${now}px`\n void getComputedStyle(column).inlineSize\n column.style.transition = \"\"\n // ... its own width again once the switch reaches its style: so it moves from `now`\n column.style.inlineSize = \"\"\n return width\n }\n\n /** Switch `drawer` to `newState`, and say so (`ui-toggle`). */\n private switchDrawer(newState: DrawerState, oldState: DrawerState) {\n // The column at its held width at once (holding it starts a move of its own), so it's what it widens from\n if (this.isWidening && this.drawerColumn) {\n for (const move of this.drawerColumn.getAnimations()) move.finish()\n void getComputedStyle(this.drawerColumn).inlineSize\n }\n this.drawer = newState === COMPACT ? COMPACT : undefined\n if (newState === FULL) this.whileDrawerMoves()\n this.send(\"ui-toggle\", { newState, oldState })\n // ... held till it's no longer compact everywhere (`:state(compact)` follows a moment later)\n if (this.isWidening) this.cancelWidening = E.beforeNextPaint(() => (this.isWidening = false))\n }\n\n /** Escape closes the drawer open over the page. */\n @E.on(\"keydown\")\n protected onKeyDown(event: KeyboardEvent) {\n if (event.key === \"Escape\") this.close()\n }\n\n /** Going to a page from the drawer closes it. */\n @E.on(\"ui-navigating\")\n protected onNavigating(event: Event) {\n if (this.isInDrawer(event.target)) this.close()\n }\n\n /**\n * Close the drawer open over the page, if it is.\n * - Compact and wide, its box shrinks back into the column with all of it still in it, clipped (`whileDrawerMoves()`).\n */\n private close() {\n if (!this.isOpen) return\n if (this.isCompact && !this.isNarrow) this.whileDrawerMoves()\n this.isOpen = false\n }\n\n ////////////////\n // ## Moving\n ////////////////\n\n /**\n * The drawer is moving between its icons and all of it: its column narrowing or widening, or its open box growing\n * or shrinking back.\n * - Meanwhile what's in it is drawn as all of it, at its full width, clipped (`:state(moving)`, `UIPageLayout.css`).\n */\n @E.cssState(\"moving\") @E.state accessor isMoving = false\n\n /** Stop waiting for the drawer's moves to finish, while it waits. */\n private cancelMoving: (() => void) | undefined\n\n /** Each run of `whileDrawerMoves()`: only the latest ends the move. */\n private moveRun = 0\n\n /**\n * Hold `isMoving` till the drawer's column and box finish the moves the change about to be made starts.\n * - Its moves are read just before the next paint, once the change has reached the style.\n * - None (reduced motion, `animation=\"none\"`): it ends there, before anything's painted.\n */\n private whileDrawerMoves() {\n const run = ++this.moveRun\n this.isMoving = true\n this.cancelMoving?.()\n this.cancelMoving = E.beforeNextPaint(() => {\n const boxes = [this.drawerColumn, this.drawerColumn?.firstElementChild]\n const moves = boxes.flatMap((box) => box?.getAnimations() ?? [])\n void Promise.allSettled(moves.map((move) => move.finished)).then(() => {\n if (run === this.moveRun) this.isMoving = false\n })\n })\n }\n\n ////////////////\n // ## Opening the compact drawer\n ////////////////\n\n /** The wait before the pointer on the compact drawer opens it, or off it closes it, while one runs. */\n private peekTimer: ReturnType<typeof E.after> | undefined\n\n /** The compact drawer's column width, kept while it's open over the page: so the page doesn't move. */\n @E.state accessor compactWidth: number | undefined = undefined\n\n /** Switching from its icons to all of it, for a frame: the compact column holds its width, to widen from. */\n @E.state accessor isWidening = false\n\n /** Stop waiting the frame `toggleDrawer()` waits before widening, while one runs. */\n private cancelWidening: (() => void) | undefined\n\n /**\n * The pointer came onto the compact drawer: open it after half a second (`OPEN_DELAY`), or stay open.\n * - Not the page's hover delay (`--ui-hover-delay`, 800ms) for pop-ups: the drawer is where the pointer goes on\n * purpose, and waiting that long for it read as broken (epic `mockup` I26).\n * - Nor at once (0.1s, J161): passing over it on the way to the page opened it (Owen, C1: \"a 1/2 second hover\").\n */\n private onDrawerEnter(event: PointerEvent) {\n if (!this.isCompact || this.isNarrow || event.pointerType === \"touch\") return\n this.peekTimer?.cancel()\n if (!this.isOpen) this.peekTimer = E.after(OPEN_DELAY, () => this.peek())\n }\n\n /** The pointer left the drawer: stop waiting to open it, or close it after a moment (`CLOSE_DELAY`). */\n private onDrawerLeave() {\n this.peekTimer?.cancel()\n if (this.isCompact && !this.isNarrow && this.isOpen) this.peekTimer = E.after(CLOSE_DELAY, () => this.unpeek())\n }\n\n /** Close the compact drawer opened over the page. */\n private unpeek() {\n if (this.isCompact && !this.isNarrow) this.close()\n }\n\n /** The keyboard's focus came into the compact drawer: open it at once. */\n private onDrawerFocusIn() {\n this.peekTimer?.cancel()\n if (this.isCompact && !this.isNarrow && !this.isOpen) this.peek()\n }\n\n /** The keyboard's focus left the compact drawer: close it. */\n private onDrawerFocusOut(event: FocusEvent) {\n if (this.isCompact && !this.isNarrow && !this.isInDrawer(event.relatedTarget)) this.close()\n }\n\n /** Open the compact drawer over the page, its column kept at the width it has now. */\n private peek() {\n this.compactWidth = this.drawerColumn?.getBoundingClientRect().width\n this.whileDrawerMoves()\n this.isOpen = true\n }\n\n /**\n * Its inline style:\n * - the compact column's kept width, while it's open over the page, moving, or about to widen\n * - the menu's height, for the navigations in the drawer to line their first row up with it (`menuHeight`)\n */\n get layoutStyle(): Record<string, string | undefined> {\n const isHeld = (this.isCompact && !this.isNarrow && (this.isOpen || this.isMoving)) || this.isWidening\n const width = isHeld ? this.compactWidth : undefined\n const menuHeight = this.has(\"menu\") ? this.menuHeight : undefined\n return {\n [COMPACT_WIDTH]: width === undefined ? undefined : `${width}px`,\n [NAV_BAR_HEIGHT]: menuHeight ? `${menuHeight}px` : undefined\n }\n }\n\n ////////////////\n // ## Narrow\n ////////////////\n\n /** While connected: read whether it's narrow, again each time its box changes size. */\n @E.whileConnected\n protected watchWidth() {\n if (isServer) return\n const resized = new ResizeObserver(() => {\n this.isNarrow = this.isSlidOver()\n this.measureMenu()\n })\n resized.observe(this.domElement)\n if (this.drawerColumn) resized.observe(this.drawerColumn)\n if (this.menuBox) resized.observe(this.menuBox)\n this.resized = resized\n return () => {\n resized.disconnect()\n this.resized = undefined\n }\n }\n\n /** What watches its box, the drawer's column and the menu for a new size, while connected. */\n private resized: ResizeObserver | undefined\n\n /** The drawer's column was drawn: watch it too, as it's what goes narrow. */\n private drawerColumnDrawn(column: HTMLElement) {\n this.drawerColumn = column\n this.resized?.observe(column)\n }\n\n ////////////////\n // ## The menu beside the drawer's top\n ////////////////\n\n /**\n * The menu's height, in pixels, while it's drawn: the navigations in the drawer line their first row up with it,\n * its icon on the menu's middle, beside the drawer's button (epic `mockup` I35, `--ui-site-nav-bar-height`).\n */\n @E.state accessor menuHeight: number | undefined = undefined\n\n /** The menu's box, while drawn. */\n private menuBox: HTMLElement | undefined\n\n /** The menu's box was drawn: watch it for a new height. */\n private menuDrawn(box: HTMLElement) {\n this.menuBox = box\n this.resized?.observe(box)\n this.measureMenu()\n }\n\n /** Read the menu's height again: none while it isn't on the page. */\n private measureMenu() {\n const box = this.menuBox\n this.menuHeight = box?.isConnected ? box.getBoundingClientRect().height || undefined : undefined\n }\n\n /** Is the drawer slid over the page, rather than beside it? Its style says (`UIPageLayout.css`). */\n private isSlidOver(): boolean {\n return !!this.drawerColumn && getComputedStyle(this.drawerColumn).position === ABSOLUTE\n }\n\n /** Narrow, it closes as it widens: wide, the open drawer would sit over the page. */\n @E.onChange(\"isNarrow\", { defer: true })\n protected onNarrowChanged() {\n this.isOpen = false\n }\n\n /**\n * Does it draw its own menu button: a drawer, and no `<ui-site-nav-button>` anywhere in its light DOM?\n * - Shown only at a narrow width (`UIPageLayout.css`).\n */\n @E.watches(LIGHT_DOM_CHANGES)\n get drawsMenuButton(): boolean {\n return this.has(\"drawer\") && !this.domElement.querySelector(NAV_BUTTON)\n }\n\n ////////////////\n // ## The drawer's boxes\n ////////////////\n\n /** The drawer's column, while drawn. */\n private drawerColumn: HTMLElement | undefined\n\n /** The drawer's slot, while drawn. */\n private drawerSlot: HTMLSlotElement | undefined\n\n /** The elements slotted into the drawer: its light-DOM children with its slot's name. */\n private drawerElements(): Element[] {\n const name = this.slotForName(\"drawer\")\n return [...this.domElement.children].filter((child) => child.getAttribute(\"slot\") === name)\n }\n\n /** Is `target` in the drawer: its own boxes, or what's slotted into it? */\n private isInDrawer(target: EventTarget | null): boolean {\n if (!target || typeof (target as Node).nodeType !== \"number\") return false\n const node = target as Node\n if (this.drawerColumn?.contains(node)) return true\n const slotted = this.drawerSlot?.assignedElements({ flatten: true }) ?? this.drawerElements()\n return slotted.some((element) => element === node || element.contains(node))\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n render(): JSX.Element {\n return (\n <div class={LAYOUT} part={this.partForName(\"layout\")} style={this.layoutStyle}>\n <Show when={this.has(\"drawer\")}>\n <div\n class={DRAWER}\n part={this.partForName(\"drawer\")}\n ref={(element: HTMLElement) => this.drawerColumnDrawn(element)}\n onPointerEnter={(event: PointerEvent) => this.onDrawerEnter(event)}\n onPointerLeave={() => this.onDrawerLeave()}\n onFocusIn={() => this.onDrawerFocusIn()}\n onFocusOut={(event: FocusEvent) => this.onDrawerFocusOut(event)}\n >\n <div class={DRAWER_BOX} part={this.partForName(\"drawer-box\")}>\n <slot name={this.slotForName(\"drawer\")} ref={(slot: HTMLSlotElement) => (this.drawerSlot = slot)} />\n </div>\n </div>\n </Show>\n <div class={BODY}>\n <Show when={this.drawsMenuButton}>\n <ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />\n </Show>\n {this.region(\"menu\")}\n <div class={UNDER_MENU}>\n {this.region(\"page-menu\")}\n <div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>\n {this.region(\"footer\")}\n </div>\n </div>\n </div>\n )\n }\n\n /** Region `name`'s box around its slot, while it has content. */\n private region(name: Exclude<Region, \"drawer\">): JSX.Element {\n return (\n <Show when={this.has(name)}>\n <div\n class={name}\n part={this.partForName(name)}\n ref={(box: HTMLElement) => (name === MENU ? this.menuDrawn(box) : undefined)}\n >\n <slot name={this.slotForName(name)} />\n </div>\n </Show>\n )\n }\n}\n\n/** The vocabulary getters, typed (`UIComponent`'s doc). */\nexport interface UIPageLayout extends E.AttributeValues<typeof pageLayoutVocabulary> {}\n\n/** A named region, each its slot's name. */\ntype Region = \"menu\" | \"page-menu\" | \"drawer\" | \"left\" | \"right\" | \"footer\"\n\n/** What `ui-toggle` says the drawer was and is: its icons only, or all of it. */\ntype DrawerState = typeof COMPACT | typeof FULL\n\n/** `drawer=\"compact\"`, and `ui-toggle`'s word for it. */\nconst COMPACT = \"compact\"\n\n/** `ui-toggle`'s word for the whole drawer: no `drawer`. */\nconst FULL = \"full\"\n\n/** The navigation's tag, and its attribute for icons only. */\nconst SITE_NAV = \"ui-site-nav\"\nconst COLLAPSED = \"collapsed\"\n\n/** The drawer's button's tag: with one inside, the layout draws no menu button of its own. */\nconst NAV_BUTTON = \"ui-site-nav-button\"\n\n/** The private custom property holding the compact column's kept width (`UIPageLayout.css`). */\nconst COMPACT_WIDTH = \"--_page-layout-compact-width\"\n\n/** The menu's region, whose height the navigations in the drawer line their first row up with. */\nconst MENU = \"menu\"\n\n/** `<ui-site-nav>`'s token for the height of the bar beside its top: the menu's, set on the layout's box. */\nconst NAV_BAR_HEIGHT = \"--ui-site-nav-bar-height\"\n\n/**\n * How long, in seconds, the pointer rests on the compact drawer before it opens: long enough that passing over it\n * on the way somewhere else doesn't open it (Owen, epic `mockup` C1 on J161: \"Change to a 1/2 second hover\").\n * - The keyboard's focus opens it at once (`onDrawerFocusIn()`).\n */\nconst OPEN_DELAY = 0.5\n\n/** How long, in seconds, the pointer is off the open compact drawer before it closes: a slip off its edge doesn't. */\nconst CLOSE_DELAY = 0.15\n\n/** The drawer's column's `position` while it's slid over a narrow page. */\nconst ABSOLUTE = \"absolute\"\n\n/** The class words of its boxes (`UIPageLayout.css`). */\nconst LAYOUT = \"layout\"\nconst DRAWER = \"drawer\"\nconst DRAWER_BOX = \"drawer-box\"\nconst BODY = \"body\"\nconst UNDER_MENU = \"under-menu\"\nconst ROW = \"row\"\nconst PAGE = \"page\"\nconst MENU_BUTTON = \"menu-button\"\n\n/** Its own menu button's look: today's site's. */\nconst BARS = \"bars\"\nconst BASIC = \"basic\"\nconst SMALL = \"small\"\n","/**\n * The page layout family: defines `<ui-page-layout>`, and exports its component.\n * - SIDE EFFECT: importing it defines the tag, and the button it draws to show its drawer at a narrow width.\n * - Also the library's `spell/ui/ui-page-layout` entry.\n */\n\nimport { UIPageLayout } from \"./UIPageLayout\"\n\nimport \"spell/ui/components/ui-button\"\n\nUIPageLayout.define()\n\nexport { UIPageLayout, DOMPageLayoutElement } from \"./UIPageLayout\"\n"],"mappings":";;;;;;AAYA,IAAa0D,KAAuB;CAClC,KAAK;CACL,MAAM;CACN,QAAQ;EAAC;EAAU;EAAc;CAAY;CAC7C,KAAK;EAAC;EAAc;EAAa;EAAe;EAAc;EAAiB;EAAqB;CAAY;CAChH,MAAM;CACN,cAAc;CACd,aACE;CAGF,UAAU;CACV,YAAY,CACV;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,QAAQ,CAAC,SAAS;EAClB,aACE;CAGJ,CACF;CACA,QAAQ,CACN;EACE,MAAM;EACN,QAAQ;EACR,aACE;CAEJ,CACF;CACA,OAAO;EACL;GAAE,MAAM;GAAI,aAAa;EAAY;EACrC;GAAE,MAAM;GAAQ,aAAa;EAAmF;EAChH;GACE,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,aAAa;EACf;EACA;GAAE,MAAM;GAAQ,aAAa;EAA8C;EAC3E;GAAE,MAAM;GAAS,aAAa;EAAgC;EAC9D;GAAE,MAAM;GAAU,aAAa;EAAuD;CACxF;CACA,OAAO;EACL;GAAE,MAAM;GAAU,aAAa;EAA4D;EAC3F;GAAE,MAAM;GAAU,aAAa;EAA+D;EAC9F;GAAE,MAAM;GAAc,aAAa;EAA0E;EAC7G;GAAE,MAAM;GAAQ,aAAa;EAAkB;EAC/C;GAAE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C,EAAA4B,GAAA,GAAS,cAAlBf,GAhUWwB,GAgUOH,CAAA,GAyBlBlC,EAAA4B,GAAA,GAAU,mBADVhB,GAxVWyB,CAAA,GAkWXrC,EAAA4B,GAAA,GAAI,mBADJjB,GAjWW0B,CAAA,GACFrC,EAAA4B,GAAA,IAAO,cAAhBF,GADWW,CAAA,GAEIrC,EAAA4B,GAAA,IAAO,gBAAtBH,GAFWY,CAAA,GAANpC,EAAA2B,GAAMS,CAAA,GAAgE1C,EAAA0C,GAAA,cAAA,GAClEvC,EADEuC,GACK,cAAanC,EAApB0B,GAAA,IADES,GACkBhC,EAAA,CAAA,GAApBH,EAAA0B,GAAA,IADES,CAAA,GAEIvC,EAFJuC,GAEW,gBAAenC,EAAtB0B,GAAA,IAFJS,GAE0B;CACnC,aAAa,EAAE,eAAezC,GAAc;CAC5C,YAAY;CACZ,gBAAgB;AAClB,CAAA,CAAA,GAJeM,EAAA0B,GAAA,IAFJS,CAAA;AAAN,IAAM4F,KAAN5F,GA8cDa,IAAU,WAGVQ,IAAO,QAGPN,KAAW,eACXG,IAAY,aAGZuB,KAAa,sBAGbL,KAAgB,gCAGhBuD,KAAO,QAGPtD,KAAiB,4BAOjBJ,KAAa,IAGbC,KAAc,KAGdM,KAAW,YAGXuC,KAAS,UACTd,KAAS,UACTC,KAAa,cACbc,KAAO,QACPC,KAAa,cACbC,KAAM,OACNC,KAAO,QACPP,KAAc,eAGdH,KAAO,QACPC,KAAQ,SACRC,KAAQ;;;;;;A,IC1jBdiB,GAAa,OAAO"}
1
+ {"version":3,"file":"ui-page-layout.js","names":["ref={(box) => this.layoutBox = box}","<Show when={this.has(\"drawer\")}>\n <div\n class={DRAWER}\n part={this.partForName(\"drawer\")}\n ref={(element) => this.drawerColumnDrawn(element)}\n onPointerEnter={(event) => this.onDrawerEnter(event)}\n onPointerLeave={() => this.onDrawerLeave()}\n onFocusIn={() => this.onDrawerFocusIn()}\n onFocusOut={(event) => this.onDrawerFocusOut(event)}\n >\n <div class={DRAWER_BOX} part={this.partForName(\"drawer-box\")}>\n <slot name={this.slotForName(\"drawer\")} ref={(slot) => this.drawerSlot = slot} />\n </div>\n </div>\n </Show>","this","ref={(element) => this.drawerColumnDrawn(element)}","ref={(slot) => this.drawerSlot = slot}","part={this.partForName(\"drawer\")}","class={DRAWER_BOX}","part={this.partForName(\"drawer-box\")}","name={this.slotForName(\"drawer\")}","<div\n class={DRAWER}\n part={this.partForName(\"drawer\")}\n ref={(element) => this.drawerColumnDrawn(element)}\n onPointerEnter={(event) => this.onDrawerEnter(event)}\n onPointerLeave={() => this.onDrawerLeave()}\n onFocusIn={() => this.onDrawerFocusIn()}\n onFocusOut={(event) => this.onDrawerFocusOut(event)}\n >\n <div class={DRAWER_BOX} part={this.partForName(\"drawer-box\")}>\n <slot name={this.slotForName(\"drawer\")} ref={(slot) => this.drawerSlot = slot} />\n </div>\n </div>","<div\n class={LAYOUT}\n part={this.partForName(\"layout\")}\n style={this.layoutStyle}\n ref={(box) => this.layoutBox = box}\n >\n <Show when={this.has(\"drawer\")}>\n <div\n class={DRAWER}\n part={this.partForName(\"drawer\")}\n ref={(element) => this.drawerColumnDrawn(element)}\n onPointerEnter={(event) => this.onDrawerEnter(event)}\n onPointerLeave={() => this.onDrawerLeave()}\n onFocusIn={() => this.onDrawerFocusIn()}\n onFocusOut={(event) => this.onDrawerFocusOut(event)}\n >\n <div class={DRAWER_BOX} part={this.partForName(\"drawer-box\")}>\n <slot name={this.slotForName(\"drawer\")} ref={(slot) => this.drawerSlot = slot} />\n </div>\n </div>\n </Show>\n <div class={BODY}>\n <Show when={this.drawsMenuButton}>\n <ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />\n </Show>\n {this.region(\"menu\")}\n <div class={UNDER_MENU}>\n {this.region(\"page-menu\")}\n <div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>\n {this.region(\"footer\")}\n </div>\n </div>\n </div>","<Show when={this.drawsMenuButton}>\n <ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />\n </Show>","part={this.partForName(\"menu-button\")}","aria-label={this.translationForKey(\"menu\")}","title={this.translationForKey(\"menu\")}","aria-expanded={this.isOpen ? \"true\" : \"false\"}","<ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />","<div class={BODY}>\n <Show when={this.drawsMenuButton}>\n <ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />\n </Show>\n {this.region(\"menu\")}\n <div class={UNDER_MENU}>\n {this.region(\"page-menu\")}\n <div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>\n {this.region(\"footer\")}\n </div>\n </div>","<div class={UNDER_MENU}>\n {this.region(\"page-menu\")}\n <div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>\n {this.region(\"footer\")}\n </div>","<div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>","part={this.partForName(\"layout\")}","style={this.layoutStyle}","class={BODY}","class={UNDER_MENU}","class={ROW}","class={PAGE}","part={this.partForName(\"page\")}","<Show when={this.has(name)}>\n <div\n class={name}\n part={this.partForName(name)}\n ref={(box) => name === MENU ? this.menuDrawn(box) : void 0}\n >\n <slot name={this.slotForName(name)} />\n </div>\n </Show>","ref={(box) => name === MENU ? this.menuDrawn(box) : void 0}","part={this.partForName(name)}","name={this.slotForName(name)}","<div\n class={name}\n part={this.partForName(name)}\n ref={(box) => name === MENU ? this.menuDrawn(box) : void 0}\n >\n <slot name={this.slotForName(name)} />\n </div>","E.DOMElement","E.UIComponent","E.proto","E.protoMerged","E.cssState","E.state","E.watches","E.isSameList","E.onChange","E.on","E.whileConnected","E.SlotContent","E.beforeNextPaint","E.after","_$getOwner","_$readShallow","_$setAttribute","__name","pageLayoutCSS","__decoratorStart","__publicField","__name$1","__decorateElement","__decoratorMetadata","__runInitializers","__privateAdd","getOwner$1","pageLayoutVocabulary","UIPageLayout_default","_tmpl$","_tmpl$2","_tmpl$3","_tmpl$4","_drawsMenuButton_dec","_onSidesNarrowChanged_dec","_onNarrowChanged_dec","_menuHeight_dec","_watchWidth_dec","_isWidening_dec","_compactWidth_dec","_isMoving_dec","_onClickInSide_dec","_isLeftClosable_dec","_isRightClosable_dec","_sidesWithButtons_dec","_isLeftOpen_dec","_isRightOpen_dec","_isLeftHidden_dec","_isRightHidden_dec","_onNavigating_dec","_onKeyDown_dec","_onIconsOnlyChanged_dec","_drawerNavs_dec","_isDrawerHidden_dec","_isSidesNarrow_dec","_isNarrow_dec","_isOpen_dec","_isCompact_dec","_isFloating_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_isOpen","_isNarrow","_isSidesNarrow","_isRightOpen","_isLeftOpen","_isMoving","_compactWidth","_isWidening","_menuHeight","LIGHT_DOM_CHANGES","TOGGLES","DOMElement","side","_UIPageLayout","UIComponent","proto","protoMerged","cssState","state","watches","isSameList","onChange","on","whileConnected","SlotContent","name","COMPACT","HIDDEN","element","SITE_NAV","nav","navs","COLLAPSED","showsIconsOnly","oldState","FULL","newState","beforeNextPaint","column","now","width","move","DRAWER","event","SIDES","NAV_BUTTON","RIGHT","LEFT","opens","SHOWN","node","target","child","run","moves","box","after","OPEN_DELAY","CLOSE_DELAY","menuHeight","COMPACT_WIDTH","NAV_BAR_HEIGHT","isServer","resized","NARROW_FLAG","SIDES_NARROW_FLAG","flag","_self$","_el$","_el$5","_el$7","_el$8","_el$9","_el$10","_el$11","_el$12","_el$13","ref","insert","createComponent","Show","_el$2","_el$3","_el$4","slot","effect","readShallow","DRAWER_BOX","className","_p$","t","setAttribute","i","_el$6","BARS","BASIC","SMALL","MENU_BUTTON","a","o","LAYOUT","BODY","UNDER_MENU","ROW","PAGE","style","n","s","h","_self$2","_el$14","_el$15","MENU","UIPageLayout","delegateEvents"],"sources":["../src/components/ui-page-layout/UIPageLayout.en.ts","../src/components/ui-page-layout/UIPageLayout.tsx","../src/components/ui-page-layout/index.ts"],"sourcesContent":["/**\n * The English vocabulary of `<ui-page-layout>`: every name the tag uses.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `pageLayoutVocabulary`\n * The names of `<ui-page-layout>`: what stays on screen around a site's pages -- its menu, its drawer (the side\n * navigation), two side bars and a footer -- in its own box.\n ****************/\nexport const pageLayoutVocabulary = {\n tag: \"ui-page-layout\",\n icon: \"columns\",\n topics: [\"layout\", \"containers\", \"navigation\"],\n aka: [\"app layout\", \"app shell\", \"site layout\", \"page frame\", \"drawer layout\", \"navigation drawer\", \"holy grail\"],\n noun: \"page layout\",\n partOfSpeech: \"structure\",\n description:\n \"A page layout puts what stays on screen around a page: a menu across the top, a drawer of side navigation \" +\n \"down the start, side bars either side of the page, and a footer. An empty one takes no room. Its own box, \" +\n \"not the window: below 40em of it, the drawer slides over the page.\",\n skeleton: \"24 wide: 4 line paragraph\",\n attributes: [\n {\n name: \"drawer\",\n group: \"appearance\",\n kind: \"valueOnly\",\n values: [\"compact\", \"hidden\"],\n description:\n \"`compact`: the drawer shows only its icons (its `<ui-site-nav>`s `collapsed`), and opens over the page \" +\n \"while the pointer rests on it. `hidden`: no drawer at all, until its button shows it again. \" +\n \"None: the whole drawer. `toggleDrawer()` switches it, and says so with `ui-toggle`.\"\n },\n {\n name: \"drawer-hides\",\n group: \"behaviour\",\n kind: \"keyOnly\",\n description:\n 'The drawer\\'s button hides the whole drawer (`drawer=\"hidden\"`) and shows it again, never switching it to ' +\n \"its icons: for a navigation with no icons.\"\n },\n {\n name: \"left\",\n group: \"appearance\",\n kind: \"valueOnly\",\n values: [\"hidden\"],\n description:\n '`hidden`: the left side bar isn\\'t shown, until its button shows it again. `toggleSidebar(\"left\")` ' +\n \"switches it, and says so with `ui-toggle`.\"\n },\n {\n name: \"right\",\n group: \"appearance\",\n kind: \"valueOnly\",\n values: [\"hidden\"],\n description:\n '`hidden`: the right side bar isn\\'t shown, until its button (`<ui-site-nav-button toggles=\"right\">`) ' +\n 'shows it again. `toggleSidebar(\"right\")` switches it, and says so with `ui-toggle`. Below 64em, a ' +\n \"side bar with such a button is hidden behind it, and shows over the page while open.\"\n },\n {\n name: \"floating\",\n group: \"appearance\",\n kind: \"keyOnly\",\n description:\n \"The drawer and the side bars float: rounded cards with a soft shadow and room round them, over the \" +\n \"page's own ground. None: the drawer a column of its own fill, the page's side a box beside it.\"\n }\n ],\n events: [\n {\n name: \"ui-toggle\",\n detail:\n '{ region: \"drawer\" | \"left\" | \"right\", newState: \"compact\" | \"hidden\" | \"full\" | \"shown\", ' +\n 'oldState: \"compact\" | \"hidden\" | \"full\" | \"shown\" }',\n description:\n \"The drawer switched between its icons only (`compact`), hidden (`hidden`) and all of it (`full`), from \" +\n \"`toggleDrawer()`; or a side bar between `hidden` and `shown`, from `toggleSidebar()` (a \" +\n \"`<ui-site-nav-button>`'s click): a site keeps each person's choice, and sets `drawer`, `left` or `right` \" +\n \"again next time.\"\n }\n ],\n slots: [\n { name: \"\", description: \"The page.\" },\n { name: \"menu\", description: \"The app's top bar, across the top beside the drawer: usually a `<ui-app-menu>`.\" },\n {\n name: \"page-menu\",\n description: \"A row of its own under the menu, over the page and its side bars: usually `<ui-site-tabs>`.\"\n },\n {\n name: \"drawer\",\n description: \"The side navigation, a column the whole height at the start: usually a `<ui-site-nav>`.\"\n },\n { name: \"left\", description: \"A side bar between the drawer and the page.\" },\n { name: \"right\", description: \"A side bar at the page's end.\" },\n { name: \"footer\", description: \"Across the bottom, under the page and its side bars.\" }\n ],\n parts: [\n { name: \"layout\", description: \"The grid of regions: the drawer's column, then the rest.\" },\n { name: \"drawer\", description: \"The drawer's column, on its own fill with a line at its end.\" },\n { name: \"drawer-box\", description: \"The drawer's box inside its column: what scrolls, and what slides out.\" },\n { name: \"menu\", description: \"The menu's row.\" },\n { name: \"page-menu\", description: \"The page menu's row.\" },\n { name: \"left\", description: \"The start side bar's box.\" },\n { name: \"page\", description: \"The page's box.\" },\n { name: \"right\", description: \"The end side bar's box.\" },\n { name: \"footer\", description: \"The footer's row.\" },\n {\n name: \"menu-button\",\n description:\n \"Its own button to show the drawer, at a narrow width, when nothing inside it is a `<ui-site-nav-button>`.\"\n }\n ],\n states: [\n { name: \"compact\", description: '`drawer=\"compact\"`: the drawer shows only its icons.' },\n {\n name: \"open\",\n description:\n \"The drawer is open over the page: slid in at a narrow width, or opened from its icons while the pointer \" +\n \"rests on it.\"\n },\n { name: \"narrow\", description: \"Below 40em of its own box: one column, the drawer slid out of the way.\" },\n {\n name: \"sides-narrow\",\n description:\n \"Below 64em of its own box: a side bar with its button hides behind it, and shows over the page while open.\"\n },\n { name: \"drawer-hidden\", description: '`drawer=\"hidden\"`: no drawer, on a wide page.' },\n { name: \"floating\", description: \"`floating`: the drawer and the side bars are cards floating over the page.\" },\n { name: \"left-hidden\", description: '`left=\"hidden\"`: no left side bar, on a wide page.' },\n { name: \"right-hidden\", description: '`right=\"hidden\"`: no right side bar, on a wide page.' },\n {\n name: \"left-closable\",\n description: 'A `<ui-site-nav-button toggles=\"left\">` is in it: narrow, the left side bar hides behind it.'\n },\n {\n name: \"right-closable\",\n description: 'A `<ui-site-nav-button toggles=\"right\">` is in it: narrow, the right side bar hides behind it.'\n },\n { name: \"left-open\", description: \"The left side bar is slid over a narrow page, from its button.\" },\n { name: \"right-open\", description: \"The right side bar is slid over a narrow page, from its button.\" }\n ],\n texts: [{ key: \"menu\", text: \"Pages\", description: \"Its own button to show the drawer, at a narrow width.\" }]\n} as const satisfies E.ComponentVocabulary\n","import { Show } from \"solid-js\"\nimport { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E } from \"spell/ui/core\"\nimport { pageLayoutVocabulary } from \"./UIPageLayout.en\"\n\nimport pageLayoutCSS from \"./UIPageLayout.css?inline\"\n\n// Above the class: `@E.watches` reads them while the class is defined\n\n/** What a change to its light DOM may move: an element in or out, or a `slot` changed. */\nconst LIGHT_DOM_CHANGES = { childList: true, subtree: true, attributes: true, attributeFilter: [\"slot\"] }\n\n/** A `<ui-site-nav-button>`'s attribute naming what it shows and hides: `@E.watches` reads it too. */\nconst TOGGLES = \"toggles\"\n\n/****************\n * ### `DOMPageLayoutElement`\n * The DOM element of `<ui-page-layout>`: its script API, `toggleDrawer()`.\n * Its component (`UIPageLayout`) carries it out.\n ****************/\nexport class DOMPageLayoutElement extends E.DOMElement<UIPageLayout> {\n /**\n * Show or hide the drawer, as its button does: narrow, slide it over the page or away; wide, switch it between\n * its icons only and all of it (`drawer`), or with `drawer-hides`, between hidden and all of it;\n * and say so (`ui-toggle`).\n */\n toggleDrawer() {\n this.component?.toggleDrawer()\n }\n\n /**\n * Show or hide side bar `side` (`\"left\"` or `\"right\"`), as its button does: wide, switch its attribute between\n * `hidden` and none, and say so (`ui-toggle`); narrow, with a button for it, slide it over the page or away.\n */\n toggleSidebar(side: Side) {\n this.component?.toggleSidebar(side)\n }\n}\n\n/****************\n * ### `<ui-page-layout>`\n * The component behind `<ui-page-layout>`: what stays on screen around a site's pages (epic `mockup` T39).\n * A site draws it once and puts each page in it, so going between pages redraws only the page.\n *\n * <div class=\"layout\" part=\"layout\"> (a grid: the drawer's column, then the rest)\n * <div class=\"drawer\" part=\"drawer\"> (the whole height, at the start)\n * <div class=\"drawer-box\" part=\"drawer-box\"> <slot name=\"drawer\"> </div>\n * </div>\n * <div class=\"body\">\n * <ui-button part=\"menu-button\"> (narrow, with no `<ui-site-nav-button>`)\n * <div part=\"menu\"> <slot name=\"menu\"> </div> (flush against the drawer)\n * <div class=\"under-menu\"> (the drawer's line at its start)\n * <div part=\"page-menu\"> <slot name=\"page-menu\"> </div>\n * <div class=\"row\"> left | page (the default slot) | right </div>\n * <div part=\"footer\"> <slot name=\"footer\"> </div>\n * </div>\n * </div>\n * </div>\n *\n * - Its OWN box, not the window and not a root: Run draws a Spell site inside the editor's page.\n * - So plain boxes, no landmarks: a second `<main>` or banner inside the editor's page would be wrong;\n * what's slotted brings its own (the navigation's `<nav>`).\n * - At least as tall as the box it's in (`min-height: 100%`), the drawer running from top to bottom.\n * - A slot with nothing in it isn't drawn: no column, no row, no gap.\n * - The page is a font size in from the drawer; the menu's row is flush against it, on the drawer's fill:\n * - so the drawer and the menu read as one surface, the bar beside the drawer's top with no line between them\n * - the drawer's line starts under the menu, the menu's own line turning into it (epic `mockup` I25)\n * - `drawer=\"compact\"`: the drawer shows only its icons, as the layout sets `collapsed` on each `<ui-site-nav>` in it.\n * - The pointer resting on it half a second, or the keyboard's focus coming into it, opens it over the page,\n * all of it, the whole height of its column, without pushing the page: its column keeps its width.\n * Leaving it closes it, a moment later (0.15s).\n * - Its icons stay where they are as it opens and closes: the navigation keeps their room at the start the same\n * either way (`UISiteNav.css`, epic `mockup` C1 on J161).\n * - It grows out from the column's edge and shrinks back into it; switched to all of it and back, the column\n * widens and narrows (`UIPageLayout.css`, \"Motion\").\n * - Below 40em of its own box (a container query): one column, and the drawer slides over the page from the start\n * (`:state(open)`), from a `<ui-site-nav-button>` inside it, or its own menu button when it has none.\n * - Escape closes it; so does going to a page from it (`ui-navigating` from inside the drawer).\n * - `toggleDrawer()` (the `<ui-site-nav-button>`'s click): narrow, slides the drawer in or out; wide, switches\n * `drawer` and sends `ui-toggle`. Remembering the choice is the site's: the layout keeps nothing.\n * - `drawer-hides`: wide, it switches the drawer between hidden (`drawer=\"hidden\"`) and all of it, never to its\n * icons (epic `mockup` T55: Spell UI's site, whose navigation has no icons).\n * - The side bars close too (epic `mockup` T55): `right=\"hidden\"` (or `left`) hides one, wide;\n * `toggleSidebar(\"right\")`, a `<ui-site-nav-button toggles=\"right\">`'s click, switches it and sends `ui-toggle`.\n * - Below 64em of its own box (`:state(sides-narrow)`), a side bar with such a button in the layout is hidden behind\n * it, and shows over the page from its side while open (`:state(right-open)`); one with no button stays in the\n * row, as before.\n * - `floating`: the drawer and the side bars float, rounded cards with a soft shadow and room round them, over the\n * page's own ground (Spell UI's docs site's look); the page's side is no box of its own then.\n * - It finds its navigations and buttons by their English tags (`ui-site-nav`, `ui-site-nav-button`).\n ****************/\nexport class UIPageLayout extends E.UIComponent<typeof pageLayoutVocabulary> {\n @E.proto static vocabulary = pageLayoutVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { \"page-layout\": pageLayoutCSS },\n DOMElement: DOMPageLayoutElement,\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n ////////////////\n // ## Regions\n ////////////////\n\n /** Which named slots have content. */\n readonly slots = new E.SlotContent(this.domElement)\n\n /** Has region `name` content? An empty one isn't drawn. */\n has(name: Region): boolean {\n return this.slots.hasContent(this.slotForName(name))\n }\n\n /** `floating`: the drawer and the side bars are cards floating over the page's ground. */\n @E.cssState(\"floating\")\n get isFloating(): boolean {\n return !!this.floating\n }\n\n ////////////////\n // ## The drawer: compact, open\n ////////////////\n\n /** `drawer=\"compact\"`: the drawer shows only its icons. */\n @E.cssState(\"compact\")\n get isCompact(): boolean {\n return this.drawer === COMPACT\n }\n\n /**\n * The drawer is open over the page: slid in at a narrow width, or opened from its icons (`compact`).\n * - Wide and not compact, it changes nothing: the drawer is all there.\n */\n @E.cssState(\"open\") @E.state accessor isOpen = false\n\n /**\n * Below 40em of its own box: one column, the drawer slid out of the way.\n * - Read from its style, where the width is decided (a container query in `UIPageLayout.css`):\n * so the sheet stays the one truth.\n */\n @E.cssState(\"narrow\") @E.state accessor isNarrow = false\n\n /**\n * Below 64em of its own box: a side bar with its button hides behind it, and shows over the page while open.\n * - Read from its style, as `isNarrow` is.\n */\n @E.cssState(\"sides-narrow\") @E.state accessor isSidesNarrow = false\n\n /** `drawer=\"hidden\"`: wide, no drawer at all; its button shows it again. */\n @E.cssState(\"drawer-hidden\")\n get isDrawerHidden(): boolean {\n return this.drawer === HIDDEN\n }\n\n /**\n * Does the drawer show all of it: wide and neither compact nor hidden, or open over the page?\n * A drawer button's `aria-expanded`.\n */\n get isDrawerShown(): boolean {\n return this.isNarrow ? this.isOpen : (!this.isCompact && !this.isDrawerHidden) || this.isOpen\n }\n\n /**\n * The `<ui-site-nav>`s in the drawer: slotted into it, or inside what is.\n * - English tags only, as `<ui-site-tabs>` finds its navigation.\n */\n @E.watches({ ...LIGHT_DOM_CHANGES, equals: E.isSameList })\n get drawerNavs(): readonly Element[] {\n return this.drawerElements().flatMap((element) =>\n element.localName === SITE_NAV ? [element] : [...element.querySelectorAll(SITE_NAV)]\n )\n }\n\n /**\n * The navigations show only their icons: compact, not open over the page, and not moving.\n * - While the column narrows, or the open box shrinks back, they keep all of it, clipped (`isMoving`):\n * they switch to their icons once it's narrow (epic `mockup` I32, Owen: \"the illusion of collapse is wonky\").\n */\n get showsIconsOnly(): boolean {\n return this.isCompact && !this.isOpen && !this.isMoving\n }\n\n /** SIDE EFFECT: each navigation in the drawer is `collapsed` while it shows only its icons. */\n @E.onChange(\"drawerNavs\", \"showsIconsOnly\", { writesDOMElement: true })\n protected onIconsOnlyChanged(navs: readonly Element[], showsIconsOnly: boolean) {\n for (const nav of navs) nav.toggleAttribute(COLLAPSED, showsIconsOnly)\n }\n\n /**\n * Show or hide the drawer: narrow, slide it in or out (`:state(open)`); wide, switch `drawer` between its icons\n * only and all of it, and send `ui-toggle`. Script API, on the DOM element too.\n * - From its icons to all of it, the switch waits a frame:\n * the column first holds the width it has, so it has a width to widen from (`isWidening`).\n * - From all of it to its icons, the column narrows to the width its icons will take (`narrowToIcons()`).\n */\n toggleDrawer() {\n if (this.isNarrow) {\n this.isOpen = !this.isOpen\n return\n }\n if (this.drawerHides || this.isDrawerHidden) {\n this.hideOrShowDrawer()\n return\n }\n const oldState: DrawerState = this.isCompact ? COMPACT : FULL\n const newState: DrawerState = oldState === COMPACT ? FULL : COMPACT\n this.peekTimer?.cancel()\n this.cancelWidening?.()\n this.isWidening = false\n this.isOpen = false\n if (newState === FULL) {\n this.compactWidth = this.drawerColumn?.getBoundingClientRect().width\n this.isWidening = true\n this.cancelWidening = E.beforeNextPaint(() => this.switchDrawer(newState, oldState))\n } else {\n this.narrowToIcons(oldState)\n }\n }\n\n /**\n * Switch to its icons only: the column narrows to the width they take, all of it still drawn in it, clipped;\n * the navigations switch to their icons once it's there (`whileDrawerMoves()`).\n * - The width is measured first, just before the next paint:\n * each navigation shows its icons till then, the column's own width read at `fit-content`,\n * and all of it is back before anything is painted.\n */\n private narrowToIcons(oldState: DrawerState) {\n const navs = this.drawerNavs\n for (const nav of navs) nav.toggleAttribute(COLLAPSED, true)\n this.cancelWidening = E.beforeNextPaint(() => {\n this.compactWidth = this.iconsWidth()\n this.whileDrawerMoves()\n this.switchDrawer(COMPACT, oldState)\n for (const nav of navs) nav.toggleAttribute(COLLAPSED, this.showsIconsOnly)\n })\n }\n\n /**\n * The drawer's column's width at `fit-content`, read at once with no move: what its icons take, while they're shown.\n * - SIDE EFFECT: the column stops where it is, if it was moving, so it narrows from there.\n */\n private iconsWidth(): number | undefined {\n const column = this.drawerColumn\n if (!column) return undefined\n const now = column.getBoundingClientRect().width\n column.style.transition = \"none\"\n column.style.inlineSize = \"fit-content\"\n const width = column.getBoundingClientRect().width\n column.style.inlineSize = `${now}px`\n void getComputedStyle(column).inlineSize\n column.style.transition = \"\"\n // ... its own width again once the switch reaches its style: so it moves from `now`\n column.style.inlineSize = \"\"\n return width\n }\n\n /** Switch `drawer` to `newState`, and say so (`ui-toggle`). */\n private switchDrawer(newState: DrawerState, oldState: DrawerState) {\n // The column at its held width at once (holding it starts a move of its own), so it's what it widens from\n if (this.isWidening && this.drawerColumn) {\n for (const move of this.drawerColumn.getAnimations()) move.finish()\n void getComputedStyle(this.drawerColumn).inlineSize\n }\n this.drawer = newState === COMPACT ? COMPACT : undefined\n if (newState === FULL) this.whileDrawerMoves()\n this.send(\"ui-toggle\", { region: DRAWER, newState, oldState })\n // ... held till it's no longer compact everywhere (`:state(compact)` follows a moment later)\n if (this.isWidening) this.cancelWidening = E.beforeNextPaint(() => (this.isWidening = false))\n }\n\n /**\n * Wide, hide the whole drawer (`drawer=\"hidden\"`), or show all of it again, and say so (`ui-toggle`):\n * `drawer-hides`, or a drawer hidden already.\n * - The column narrows to nothing and widens back (`UIPageLayout.css`); nothing in it switches to its icons.\n */\n private hideOrShowDrawer() {\n const oldState: DrawerState = this.isDrawerHidden ? HIDDEN : this.isCompact ? COMPACT : FULL\n const newState: DrawerState = oldState === HIDDEN ? FULL : HIDDEN\n this.peekTimer?.cancel()\n this.isOpen = false\n this.drawer = newState === HIDDEN ? HIDDEN : undefined\n this.send(\"ui-toggle\", { region: DRAWER, newState, oldState })\n }\n\n /** Escape closes the drawer or a side bar open over the page. */\n @E.on(\"keydown\")\n protected onKeyDown(event: KeyboardEvent) {\n if (event.key !== \"Escape\") return\n this.close()\n this.closeSidebars()\n }\n\n /** Going to a page from the drawer, or from a side bar open over the page, closes it. */\n @E.on(\"ui-navigating\")\n protected onNavigating(event: Event) {\n if (this.isInDrawer(event.target)) this.close()\n if (this.sideHolding(event.target)) this.closeSidebars()\n }\n\n /**\n * Close the drawer open over the page, if it is.\n * - Compact and wide, its box shrinks back into the column with all of it still in it, clipped (`whileDrawerMoves()`).\n */\n private close() {\n if (!this.isOpen) return\n if (this.isCompact && !this.isNarrow) this.whileDrawerMoves()\n this.isOpen = false\n }\n\n ////////////////\n // ## The side bars: hidden, open over a narrow page\n ////////////////\n\n /** `right=\"hidden\"`: wide, the right side bar isn't shown; its button shows it again. */\n @E.cssState(\"right-hidden\")\n get isRightHidden(): boolean {\n return this.right === HIDDEN\n }\n\n /** `left=\"hidden\"`: wide, the left side bar isn't shown; its button shows it again. */\n @E.cssState(\"left-hidden\")\n get isLeftHidden(): boolean {\n return this.left === HIDDEN\n }\n\n /** The right side bar slid over a narrow page, from its button. */\n @E.cssState(\"right-open\") @E.state accessor isRightOpen = false\n\n /** The left side bar slid over a narrow page, from its button. */\n @E.cssState(\"left-open\") @E.state accessor isLeftOpen = false\n\n /**\n * The side bars a `<ui-site-nav-button toggles=\"...\">` in its light DOM shows and hides:\n * narrow, those hide behind their button; the rest stay in the row.\n */\n @E.watches({ ...LIGHT_DOM_CHANGES, attributeFilter: [\"slot\", TOGGLES], equals: E.isSameList })\n get sidesWithButtons(): readonly Side[] {\n return SIDES.filter((side) => this.domElement.querySelector(`${NAV_BUTTON}[${TOGGLES}=\"${side}\"]`))\n }\n\n /** Narrow, the right side bar hides behind its button: `:state(right-closable)`. */\n @E.cssState(\"right-closable\")\n get isRightClosable(): boolean {\n return this.sidesWithButtons.includes(RIGHT)\n }\n\n /** Narrow, the left side bar hides behind its button: `:state(left-closable)`. */\n @E.cssState(\"left-closable\")\n get isLeftClosable(): boolean {\n return this.sidesWithButtons.includes(LEFT)\n }\n\n /** Is side bar `side` hidden (`hidden`) on a wide page? */\n isSideHidden(side: Side): boolean {\n return side === RIGHT ? this.isRightHidden : this.isLeftHidden\n }\n\n /** Is side bar `side` slid over a narrow page? */\n isSideOpen(side: Side): boolean {\n return side === RIGHT ? this.isRightOpen : this.isLeftOpen\n }\n\n /**\n * Is side bar `side` shown: narrow, behind its button, while it's open; else unless it's hidden.\n * Its button's `aria-expanded`.\n */\n isSideShown(side: Side): boolean {\n const isBehindButton = this.isSidesNarrow && this.sidesWithButtons.includes(side)\n return isBehindButton ? this.isSideOpen(side) : !this.isSideHidden(side)\n }\n\n /**\n * Show or hide side bar `side`, as its button does: narrow, behind its button, slide it over the page or away;\n * else switch its attribute between `hidden` and none, and say so (`ui-toggle`, `newState` `hidden` or `shown`).\n * Script API, on the DOM element too.\n */\n toggleSidebar(side: Side) {\n if (this.isSidesNarrow && this.sidesWithButtons.includes(side)) {\n const opens = !this.isSideOpen(side)\n this.closeSidebars()\n this.close()\n if (side === RIGHT) this.isRightOpen = opens\n else this.isLeftOpen = opens\n return\n }\n const oldState: SideState = this.isSideHidden(side) ? HIDDEN : SHOWN\n const newState: SideState = oldState === HIDDEN ? SHOWN : HIDDEN\n if (side === RIGHT) this.right = newState === HIDDEN ? HIDDEN : undefined\n else this.left = newState === HIDDEN ? HIDDEN : undefined\n this.send(\"ui-toggle\", { region: side, newState, oldState })\n }\n\n /** Close the side bars slid over a narrow page, if any are. */\n private closeSidebars() {\n this.isRightOpen = false\n this.isLeftOpen = false\n }\n\n /** A link followed from a side bar slid over a narrow page (its table of contents) closes it. */\n @E.on(\"click\")\n protected onClickInSide(event: MouseEvent) {\n if (!this.isRightOpen && !this.isLeftOpen) return\n const isLink = event\n .composedPath()\n .some((node) => node instanceof Element && (node.localName === \"a\" || node.hasAttribute(\"link\")))\n if (isLink && this.sideHolding(event.target)) this.closeSidebars()\n }\n\n /** The side bar holding `target`, slotted into it: `undefined` for none. */\n private sideHolding(target: EventTarget | null): Side | undefined {\n if (!target || typeof (target as Node).nodeType !== \"number\") return undefined\n const node = target as Node\n return SIDES.find((side) => {\n const name = this.slotForName(side)\n return [...this.domElement.children].some(\n (child) => child.getAttribute(\"slot\") === name && (child === node || child.contains(node))\n )\n })\n }\n\n ////////////////\n // ## Moving\n ////////////////\n\n /**\n * The drawer is moving between its icons and all of it: its column narrowing or widening, or its open box growing\n * or shrinking back.\n * - Meanwhile what's in it is drawn as all of it, at its full width, clipped (`:state(moving)`, `UIPageLayout.css`).\n */\n @E.cssState(\"moving\") @E.state accessor isMoving = false\n\n /** Stop waiting for the drawer's moves to finish, while it waits. */\n private cancelMoving: (() => void) | undefined\n\n /** Each run of `whileDrawerMoves()`: only the latest ends the move. */\n private moveRun = 0\n\n /**\n * Hold `isMoving` till the drawer's column and box finish the moves the change about to be made starts.\n * - Its moves are read just before the next paint, once the change has reached the style.\n * - None (reduced motion, `animation=\"none\"`): it ends there, before anything's painted.\n */\n private whileDrawerMoves() {\n const run = ++this.moveRun\n this.isMoving = true\n this.cancelMoving?.()\n this.cancelMoving = E.beforeNextPaint(() => {\n const boxes = [this.drawerColumn, this.drawerColumn?.firstElementChild]\n const moves = boxes.flatMap((box) => box?.getAnimations() ?? [])\n void Promise.allSettled(moves.map((move) => move.finished)).then(() => {\n if (run === this.moveRun) this.isMoving = false\n })\n })\n }\n\n ////////////////\n // ## Opening the compact drawer\n ////////////////\n\n /** The wait before the pointer on the compact drawer opens it, or off it closes it, while one runs. */\n private peekTimer: ReturnType<typeof E.after> | undefined\n\n /** The compact drawer's column width, kept while it's open over the page: so the page doesn't move. */\n @E.state accessor compactWidth: number | undefined = undefined\n\n /** Switching from its icons to all of it, for a frame: the compact column holds its width, to widen from. */\n @E.state accessor isWidening = false\n\n /** Stop waiting the frame `toggleDrawer()` waits before widening, while one runs. */\n private cancelWidening: (() => void) | undefined\n\n /**\n * The pointer came onto the compact drawer: open it after half a second (`OPEN_DELAY`), or stay open.\n * - Not the page's hover delay (`--ui-hover-delay`, 800ms) for pop-ups: the drawer is where the pointer goes on\n * purpose, and waiting that long for it read as broken (epic `mockup` I26).\n * - Nor at once (0.1s, J161): passing over it on the way to the page opened it (Owen, C1: \"a 1/2 second hover\").\n */\n private onDrawerEnter(event: PointerEvent) {\n if (!this.isCompact || this.isNarrow || event.pointerType === \"touch\") return\n this.peekTimer?.cancel()\n if (!this.isOpen) this.peekTimer = E.after(OPEN_DELAY, () => this.peek())\n }\n\n /** The pointer left the drawer: stop waiting to open it, or close it after a moment (`CLOSE_DELAY`). */\n private onDrawerLeave() {\n this.peekTimer?.cancel()\n if (this.isCompact && !this.isNarrow && this.isOpen) this.peekTimer = E.after(CLOSE_DELAY, () => this.unpeek())\n }\n\n /** Close the compact drawer opened over the page. */\n private unpeek() {\n if (this.isCompact && !this.isNarrow) this.close()\n }\n\n /** The keyboard's focus came into the compact drawer: open it at once. */\n private onDrawerFocusIn() {\n this.peekTimer?.cancel()\n if (this.isCompact && !this.isNarrow && !this.isOpen) this.peek()\n }\n\n /** The keyboard's focus left the compact drawer: close it. */\n private onDrawerFocusOut(event: FocusEvent) {\n if (this.isCompact && !this.isNarrow && !this.isInDrawer(event.relatedTarget)) this.close()\n }\n\n /** Open the compact drawer over the page, its column kept at the width it has now. */\n private peek() {\n this.compactWidth = this.drawerColumn?.getBoundingClientRect().width\n this.whileDrawerMoves()\n this.isOpen = true\n }\n\n /**\n * Its inline style:\n * - the compact column's kept width, while it's open over the page, moving, or about to widen\n * - the menu's height, for the navigations in the drawer to line their first row up with it (`menuHeight`)\n */\n get layoutStyle(): Record<string, string | undefined> {\n const isHeld = (this.isCompact && !this.isNarrow && (this.isOpen || this.isMoving)) || this.isWidening\n const width = isHeld ? this.compactWidth : undefined\n const menuHeight = this.has(\"menu\") ? this.menuHeight : undefined\n return {\n [COMPACT_WIDTH]: width === undefined ? undefined : `${width}px`,\n [NAV_BAR_HEIGHT]: menuHeight ? `${menuHeight}px` : undefined\n }\n }\n\n ////////////////\n // ## Narrow\n ////////////////\n\n /** While connected: read whether it's narrow, again each time its box changes size. */\n @E.whileConnected\n protected watchWidth() {\n if (isServer) return\n const resized = new ResizeObserver(() => {\n this.isNarrow = this.isNarrowByStyle(NARROW_FLAG)\n this.isSidesNarrow = this.isNarrowByStyle(SIDES_NARROW_FLAG)\n this.measureMenu()\n })\n resized.observe(this.domElement)\n if (this.drawerColumn) resized.observe(this.drawerColumn)\n if (this.menuBox) resized.observe(this.menuBox)\n this.resized = resized\n return () => {\n resized.disconnect()\n this.resized = undefined\n }\n }\n\n /** What watches its box, the drawer's column and the menu for a new size, while connected. */\n private resized: ResizeObserver | undefined\n\n /** The drawer's column was drawn: watch it too, as it's what goes narrow. */\n private drawerColumnDrawn(column: HTMLElement) {\n this.drawerColumn = column\n this.resized?.observe(column)\n }\n\n ////////////////\n // ## The menu beside the drawer's top\n ////////////////\n\n /**\n * The menu's height, in pixels, while it's drawn: the navigations in the drawer line their first row up with it,\n * its icon on the menu's middle, beside the drawer's button (epic `mockup` I35, `--ui-site-nav-bar-height`).\n */\n @E.state accessor menuHeight: number | undefined = undefined\n\n /** The menu's box, while drawn. */\n private menuBox: HTMLElement | undefined\n\n /** The menu's box was drawn: watch it for a new height. */\n private menuDrawn(box: HTMLElement) {\n this.menuBox = box\n this.resized?.observe(box)\n this.measureMenu()\n }\n\n /** Read the menu's height again: none while it isn't on the page. */\n private measureMenu() {\n const box = this.menuBox\n this.menuHeight = box?.isConnected ? box.getBoundingClientRect().height || undefined : undefined\n }\n\n /**\n * Is it narrow: below 40em of its own box (`flag`, `--_page-layout-narrow`), or below 64em, for its side bars\n * (`--_page-layout-sides-narrow`)? Its style says (`UIPageLayout.css`'s container queries set them on its grid):\n * so a layout with no drawer, only side bars, knows too.\n */\n private isNarrowByStyle(flag: string): boolean {\n const box = this.layoutBox\n return !!box && getComputedStyle(box).getPropertyValue(flag).trim() === \"1\"\n }\n\n /** Its grid's box, while drawn. */\n private layoutBox: HTMLElement | undefined\n\n /** Narrow, it closes as it widens: wide, the open drawer would sit over the page. */\n @E.onChange(\"isNarrow\", { defer: true })\n protected onNarrowChanged() {\n this.isOpen = false\n }\n\n /** A side bar open over the page closes as the layout widens, or narrows. */\n @E.onChange(\"isSidesNarrow\", { defer: true })\n protected onSidesNarrowChanged() {\n this.closeSidebars()\n }\n\n /**\n * Does it draw its own menu button: a drawer, and no `<ui-site-nav-button>` anywhere in its light DOM?\n * - Shown only at a narrow width (`UIPageLayout.css`).\n */\n @E.watches(LIGHT_DOM_CHANGES)\n get drawsMenuButton(): boolean {\n return this.has(\"drawer\") && !this.domElement.querySelector(NAV_BUTTON)\n }\n\n ////////////////\n // ## The drawer's boxes\n ////////////////\n\n /** The drawer's column, while drawn. */\n private drawerColumn: HTMLElement | undefined\n\n /** The drawer's slot, while drawn. */\n private drawerSlot: HTMLSlotElement | undefined\n\n /** The elements slotted into the drawer: its light-DOM children with its slot's name. */\n private drawerElements(): Element[] {\n const name = this.slotForName(\"drawer\")\n return [...this.domElement.children].filter((child) => child.getAttribute(\"slot\") === name)\n }\n\n /** Is `target` in the drawer: its own boxes, or what's slotted into it? */\n private isInDrawer(target: EventTarget | null): boolean {\n if (!target || typeof (target as Node).nodeType !== \"number\") return false\n const node = target as Node\n if (this.drawerColumn?.contains(node)) return true\n const slotted = this.drawerSlot?.assignedElements({ flatten: true }) ?? this.drawerElements()\n return slotted.some((element) => element === node || element.contains(node))\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n render(): JSX.Element {\n return (\n <div\n class={LAYOUT}\n part={this.partForName(\"layout\")}\n style={this.layoutStyle}\n ref={(box: HTMLElement) => (this.layoutBox = box)}\n >\n <Show when={this.has(\"drawer\")}>\n <div\n class={DRAWER}\n part={this.partForName(\"drawer\")}\n ref={(element: HTMLElement) => this.drawerColumnDrawn(element)}\n onPointerEnter={(event: PointerEvent) => this.onDrawerEnter(event)}\n onPointerLeave={() => this.onDrawerLeave()}\n onFocusIn={() => this.onDrawerFocusIn()}\n onFocusOut={(event: FocusEvent) => this.onDrawerFocusOut(event)}\n >\n <div class={DRAWER_BOX} part={this.partForName(\"drawer-box\")}>\n <slot name={this.slotForName(\"drawer\")} ref={(slot: HTMLSlotElement) => (this.drawerSlot = slot)} />\n </div>\n </div>\n </Show>\n <div class={BODY}>\n <Show when={this.drawsMenuButton}>\n <ui-button\n class={MENU_BUTTON}\n part={this.partForName(\"menu-button\")}\n icon={BARS}\n appearance={BASIC}\n size={SMALL}\n aria-label={this.translationForKey(\"menu\")}\n title={this.translationForKey(\"menu\")}\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n onClick={() => this.toggleDrawer()}\n />\n </Show>\n {this.region(\"menu\")}\n <div class={UNDER_MENU}>\n {this.region(\"page-menu\")}\n <div class={ROW}>\n {this.region(\"left\")}\n <div class={PAGE} part={this.partForName(\"page\")}>\n <slot />\n </div>\n {this.region(\"right\")}\n </div>\n {this.region(\"footer\")}\n </div>\n </div>\n </div>\n )\n }\n\n /** Region `name`'s box around its slot, while it has content. */\n private region(name: Exclude<Region, \"drawer\">): JSX.Element {\n return (\n <Show when={this.has(name)}>\n <div\n class={name}\n part={this.partForName(name)}\n ref={(box: HTMLElement) => (name === MENU ? this.menuDrawn(box) : undefined)}\n >\n <slot name={this.slotForName(name)} />\n </div>\n </Show>\n )\n }\n}\n\n/** The vocabulary getters, typed (`UIComponent`'s doc). */\nexport interface UIPageLayout extends E.AttributeValues<typeof pageLayoutVocabulary> {}\n\n/** A named region, each its slot's name. */\ntype Region = \"menu\" | \"page-menu\" | \"drawer\" | \"left\" | \"right\" | \"footer\"\n\n/** What `ui-toggle` says the drawer was and is: its icons only, hidden (`drawer-hides`), or all of it. */\ntype DrawerState = typeof COMPACT | typeof HIDDEN | typeof FULL\n\n/** A side bar, by its region's name. */\nexport type Side = typeof LEFT | typeof RIGHT\n\n/** What `ui-toggle` says a side bar was and is. */\ntype SideState = typeof HIDDEN | typeof SHOWN\n\n/** `drawer=\"compact\"`, and `ui-toggle`'s word for it. */\nconst COMPACT = \"compact\"\n\n/** `ui-toggle`'s word for the whole drawer: no `drawer`. */\nconst FULL = \"full\"\n\n/** `drawer=\"hidden\"`, `right=\"hidden\"`, `left=\"hidden\"`, and `ui-toggle`'s word for them. */\nconst HIDDEN = \"hidden\"\n\n/** `ui-toggle`'s word for a side bar shown: no `hidden`. */\nconst SHOWN = \"shown\"\n\n/** The side bars' regions, and `ui-toggle`'s `region` for them. */\nconst LEFT = \"left\"\nconst RIGHT = \"right\"\nconst SIDES = [LEFT, RIGHT] as const\n\n/** The navigation's tag, and its attribute for icons only. */\nconst SITE_NAV = \"ui-site-nav\"\nconst COLLAPSED = \"collapsed\"\n\n/** The drawer's button's tag: with one inside, the layout draws no menu button of its own. */\nconst NAV_BUTTON = \"ui-site-nav-button\"\n\n/** The private custom property holding the compact column's kept width (`UIPageLayout.css`). */\nconst COMPACT_WIDTH = \"--_page-layout-compact-width\"\n\n/** The menu's region, whose height the navigations in the drawer line their first row up with. */\nconst MENU = \"menu\"\n\n/** `<ui-site-nav>`'s token for the height of the bar beside its top: the menu's, set on the layout's box. */\nconst NAV_BAR_HEIGHT = \"--ui-site-nav-bar-height\"\n\n/**\n * How long, in seconds, the pointer rests on the compact drawer before it opens: long enough that passing over it\n * on the way somewhere else doesn't open it (Owen, epic `mockup` C1 on J161: \"Change to a 1/2 second hover\").\n * - The keyboard's focus opens it at once (`onDrawerFocusIn()`).\n */\nconst OPEN_DELAY = 0.5\n\n/** How long, in seconds, the pointer is off the open compact drawer before it closes: a slip off its edge doesn't. */\nconst CLOSE_DELAY = 0.15\n\n/** The private custom property its grid has while it's narrow (`UIPageLayout.css`). */\nconst NARROW_FLAG = \"--_page-layout-narrow\"\n\n/** The private custom property its grid has while its side bars hide behind their buttons, below 64em. */\nconst SIDES_NARROW_FLAG = \"--_page-layout-sides-narrow\"\n\n/** The class words of its boxes (`UIPageLayout.css`). */\nconst LAYOUT = \"layout\"\nconst DRAWER = \"drawer\"\nconst DRAWER_BOX = \"drawer-box\"\nconst BODY = \"body\"\nconst UNDER_MENU = \"under-menu\"\nconst ROW = \"row\"\nconst PAGE = \"page\"\nconst MENU_BUTTON = \"menu-button\"\n\n/** Its own menu button's look: today's site's. */\nconst BARS = \"bars\"\nconst BASIC = \"basic\"\nconst SMALL = \"small\"\n","/**\n * The page layout family: defines `<ui-page-layout>`, and exports its component.\n * - SIDE EFFECT: importing it defines the tag, and the button it draws to show its drawer at a narrow width.\n * - Also the library's `spell/ui/ui-page-layout` entry.\n */\n\nimport { UIPageLayout } from \"./UIPageLayout\"\n\nimport \"spell/ui/components/ui-button\"\n\nUIPageLayout.define()\n\nexport { UIPageLayout, DOMPageLayoutElement } from \"./UIPageLayout\"\n"],"mappings":";;;;;;AAYA,IAAa2D,KAAuB;CAClC,KAAK;CACL,MAAM;CACN,QAAQ;EAAC;EAAU;EAAc;CAAY;CAC7C,KAAK;EAAC;EAAc;EAAa;EAAe;EAAc;EAAiB;EAAqB;CAAY;CAChH,MAAM;CACN,cAAc;CACd,aACE;CAGF,UAAU;CACV,YAAY;EACV;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ,CAAC,WAAW,QAAQ;GAC5B,aACE;EAGJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aACE;EAEJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ,CAAC,QAAQ;GACjB,aACE;EAEJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ,CAAC,QAAQ;GACjB,aACE;EAGJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aACE;EAEJ;CACF;CACA,QAAQ,CACN;EACE,MAAM;EACN,QACE;EAEF,aACE;CAIJ,CACF;CACA,OAAO;EACL;GAAE,MAAM;GAAI,aAAa;EAAY;EACrC;GAAE,MAAM;GAAQ,aAAa;EAAmF;EAChH;GACE,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,aAAa;EACf;EACA;GAAE,MAAM;GAAQ,aAAa;EAA8C;EAC3E;GAAE,MAAM;GAAS,aAAa;EAAgC;EAC9D;GAAE,MAAM;GAAU,aAAa;EAAuD;CACxF;CACA,OAAO;EACL;GAAE,MAAM;GAAU,aAAa;EAA4D;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EAAAwC,GAAA,GAAI,mBADJ7B,IAzgBW2C,CAAA,GACFtD,EAAAwC,GAAA,IAAO,cAAhBF,IADWgB,CAAA,GAEItD,EAAAwC,GAAA,IAAO,gBAAtBH,IAFWiB,CAAA,GAANrD,EAAAuC,GAAMc,CAAA,GAAgE3D,EAAA2D,GAAA,cAAA,GAClExD,EADEwD,GACK,cAAapD,EAApBsC,GAAA,IADEc,GACkBjD,EAAA,CAAA,GAApBH,EAAAsC,GAAA,IADEc,CAAA,GAEIxD,EAFJwD,GAEW,gBAAepD,EAAtBsC,GAAA,IAFJc,GAE0B;CACnC,aAAa,EAAE,eAAe1D,GAAc;CAC5C,YAAY;CACZ,gBAAgB;AAClB,CAAA,CAAA,GAJeM,EAAAsC,GAAA,IAFJc,CAAA;AAAN,IAAMoG,KAANpG,GAioBDa,IAAU,WAGVS,IAAO,QAGPR,IAAS,UAGTsB,KAAQ,SAGRF,KAAO,QACPD,IAAQ,SACRF,KAAQ,CAACG,IAAMD,CAAK,GAGpBjB,KAAW,eACXG,IAAY,aAGZa,KAAa,sBAGbe,KAAgB,gCAGhBoD,KAAO,QAGPnD,KAAiB,4BAOjBJ,KAAa,IAGbC,KAAc,KAGdM,KAAc,yBAGdC,KAAoB,+BAGpBmC,KAAS,UACT1D,IAAS,UACT6C,KAAa,cACbc,KAAO,QACPC,KAAa,cACbC,KAAM,OACNC,KAAO,QACPP,KAAc,eAGdH,KAAO,QACPC,KAAQ,SACRC,KAAQ;;;;;;A,IChxBdiB,GAAa,OAAO"}
package/dist/ui-popup.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./rolldown-runtime-c6e9CmGy.js";
2
- import { D as e, Disclosure as t, Gt as n, Jt as r, K as i, Kt as a, Lt as o, NodeType as s, Nt as c, UI as l, UIComponent as u, Ut as d, Wt as ee, Yt as f, a as te, after as ne, aria as p, beforeNextPaint as re, derived as ie, f as m, on as h, onChange as g, proto as ae, protoMerged as oe, q as se, qt as ce, state as le, untracked as ue, whileConnected as de } from "./core.js";
2
+ import { D as e, Disclosure as t, Gt as n, Jt as r, K as i, Kt as a, Lt as o, NodeType as s, Nt as c, UI as l, UIComponent as u, Ut as d, Wt as ee, Yt as f, a as te, after as ne, aria as p, beforeNextPaint as re, cssSecondsFor as ie, derived as ae, f as m, on as h, onChange as g, proto as oe, protoMerged as se, q as ce, qt as le, state as ue, untracked as de, whileConnected as fe } from "./core.js";
3
3
  import { Show as _ } from "solid-js";
4
- import { className as v, createComponent as y, effect as b, getOwner as x, insert as S, isServer as C, readShallow as w, ref as fe, setAttribute as T, template as E } from "@solidjs/web";
4
+ import { className as v, createComponent as y, effect as b, getOwner as x, insert as S, isServer as C, readShallow as w, ref as pe, setAttribute as T, template as E } from "@solidjs/web";
5
5
  // src/components/ui-popup/UIPopup.en.ts
6
- var pe = {
6
+ var me = {
7
7
  tag: "ui-popup",
8
8
  icon: "comment outline",
9
9
  topics: [
@@ -96,7 +96,7 @@ var pe = {
96
96
  name: "open-on",
97
97
  group: "appearance",
98
98
  kind: "enum",
99
- values: se,
99
+ values: ce,
100
100
  default: i.hover,
101
101
  description: "What opens it: `hover` (also keyboard focus), `focus`, `click` (toggles; a non-modal dialog), or `manual` (only `visible`)."
102
102
  },
@@ -192,7 +192,7 @@ var pe = {
192
192
  }],
193
193
  texts: [],
194
194
  ownsParts: ["header", "content"]
195
- }, me = "@layer ui.components.popup.types{:host{--ui-color:initial;--ui-color-text:initial;--ui-color-header:initial;--ui-color-border:initial;--ui-color-background:initial;--ui-color-inverted:initial;--ui-color-on:initial;--ui-color-inverted-on:initial;--ui-scale:initial;--_ui-popup-duration:var(--ui-popup-duration,var(--ui-duration-normal));z-index:var(--ui-z-popup);box-sizing:border-box;width:max-content;height:max-content;color:inherit;position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;container-type:anchored;transition-property:display,overlay;transition-duration:var(--_ui-popup-duration);transition-behavior:allow-discrete;background:0 0;border:0;margin:0;padding:0;display:block;position:absolute;inset:auto;overflow:visible}:host(:not(:popover-open)){display:none}:host(:state(fluid)){width:anchor-size(width)}.ui.popup{--_ui-popup-background:var(--ui-popup-background,var(--ui-surface));--_ui-popup-color:var(--ui-popup-color,var(--ui-text-color));--_ui-popup-border-color:var(--ui-popup-border-color,var(--ui-border-color-strong));--_ui-popup-shadow:var(--ui-popup-shadow,var(--ui-shadow-floating));--_ui-popup-radius:var(--ui-popup-radius,var(--ui-radius));--_ui-popup-padding:var(--ui-popup-padding,.833em 1em);--_ui-popup-max-width:var(--ui-popup-max-width,250px);--_ui-popup-wide-width:var(--ui-popup-wide-width,350px);--_ui-popup-very-wide-width:var(--ui-popup-very-wide-width,550px);--_ui-popup-arrow-size:var(--ui-popup-arrow-size,.71428em);--_ui-popup-arrow-edge-distance:var(--ui-popup-arrow-edge-distance,1em);--_ui-popup-arrow-offset:var(--ui-popup-arrow-offset,calc(var(--_ui-popup-arrow-size) / -2 + .05em));--_ui-popup-arrow-edge:var(--ui-popup-arrow-edge,var(--_ui-popup-border-color));--_ui-popup-distance:var(--ui-popup-distance,var(--_ui-popup-arrow-size));--_ui-popup-inverted-background:var(--ui-popup-inverted-background,var(--ui-ink));--_ui-popup-inverted-color:var(--ui-popup-inverted-color,var(--ui-surface));--_ui-popup-loading-opacity:var(--ui-popup-loading-opacity,.3);--_ui-popup-duration:var(--ui-popup-duration,var(--ui-duration-normal));--_ui-popup-header-font-size:var(--ui-popup-header-font-size,1.14285em);--_ui-popup-header-distance:var(--ui-popup-header-distance,.5em);--_popup-arrow-shadow:1px 1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(calc(100% + 2px) -5px, calc(100% + 2px) calc(100% + 2px), -5px calc(100% + 2px));--_popup-arrow-edge:var(--ui-color,var(--_ui-popup-arrow-edge));z-index:var(--ui-z-popup);box-sizing:border-box;min-width:min-content;max-width:var(--_ui-popup-max-width);padding:var(--_ui-popup-padding);border:var(--ui-border-width) solid var(--ui-color,var(--_ui-popup-border-color));border-radius:var(--_ui-popup-radius);background:var(--ui-color,var(--_ui-popup-background));box-shadow:var(--_ui-popup-shadow);color:var(--ui-color-on,var(--_ui-popup-color));font-family:var(--ui-font-family);font-size:calc(var(--ui-font-size) * var(--ui-scale,1));font-style:normal;font-weight:var(--ui-font-weight-normal);line-height:var(--ui-line-height);text-align:start;margin:0;display:none;position:absolute;top:0;right:0}:host>.ui.popup{opacity:1;transition:opacity var(--_ui-popup-duration) var(--ui-ease), transform var(--_ui-popup-duration) var(--ui-ease);display:block;position:relative;top:auto;right:auto;transform:none}:host(:not(:popover-open))>.ui.popup{opacity:0;transform:scale(.8)}@starting-style{:host(:popover-open)>.ui.popup{opacity:0;transform:scale(.8)}}.ui.popup:before{content:\"\";z-index:1;width:var(--_ui-popup-arrow-size);height:var(--_ui-popup-arrow-size);background:inherit;box-shadow:var(--_popup-arrow-shadow);clip-path:var(--_popup-arrow-clip,none);position:absolute;transform:rotate(45deg)}}@layer ui.components.popup.content{.ui.popup>.header{font-family:var(--ui-font-family-heading);font-size:var(--_ui-popup-header-font-size);font-weight:var(--ui-font-weight-bold);padding:0;line-height:1.2;display:block}.ui.popup>.header+.content{padding-top:var(--_ui-popup-header-distance)}.ui.popup>.content{display:block}.ui.popup>.ui.grid:not(.padded),.ui.popup>::slotted(ui-grid:not([padding])){width:calc(100% + 2em);margin:-.7em -1em}}@layer ui.components.popup.variations{.ui.top.popup{margin:0 0 var(--_ui-popup-distance)}.ui.bottom.popup{margin:var(--_ui-popup-distance) 0 0;--_popup-arrow-shadow:-1px -1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-2px -2px, calc(100% + 5px) -2px, -2px calc(100% + 5px))}.ui.left.center.popup{margin:0 var(--_ui-popup-distance) 0 0;transform-origin:100%;--_popup-arrow-shadow:1px -1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-5px -2px, calc(100% + 2px) -2px, calc(100% + 2px) calc(100% + 5px))}.ui.right.center.popup{margin:0 0 0 var(--_ui-popup-distance);transform-origin:0;--_popup-arrow-shadow:-1px 1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-2px -5px, calc(100% + 5px) calc(100% + 2px), -2px calc(100% + 2px))}.ui.top.left.popup{transform-origin:0 100%}.ui.top.center.popup{transform-origin:bottom}.ui.top.right.popup{transform-origin:100% 100%}.ui.bottom.left.popup{transform-origin:0 0}.ui.bottom.center.popup{transform-origin:top}.ui.bottom.right.popup{transform-origin:100% 0}.ui.bottom.center.popup:before{inset:var(--_ui-popup-arrow-offset) auto auto 50%;margin-left:var(--_ui-popup-arrow-offset)}.ui.bottom.left.popup:before{inset:var(--_ui-popup-arrow-offset) auto auto var(--_ui-popup-arrow-edge-distance)}.ui.bottom.right.popup:before{inset:var(--_ui-popup-arrow-offset) var(--_ui-popup-arrow-edge-distance) auto auto}.ui.top.center.popup:before{inset:auto auto var(--_ui-popup-arrow-offset) 50%;margin-left:var(--_ui-popup-arrow-offset)}.ui.top.left.popup:before{inset:auto auto var(--_ui-popup-arrow-offset) var(--_ui-popup-arrow-edge-distance)}.ui.top.right.popup:before{inset:auto var(--_ui-popup-arrow-edge-distance) var(--_ui-popup-arrow-offset) auto}.ui.left.center.popup:before{inset:50% var(--_ui-popup-arrow-offset) auto auto;margin-top:var(--_ui-popup-arrow-offset)}.ui.right.center.popup:before{inset:50% auto auto var(--_ui-popup-arrow-offset);margin-top:var(--_ui-popup-arrow-offset)}.ui[class*=left\\ top].left.popup,.ui[class*=left\\ bottom].left.popup{margin:0 var(--_ui-popup-distance) 0 0;--_popup-arrow-shadow:1px -1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-5px -2px, calc(100% + 2px) -2px, calc(100% + 2px) calc(100% + 5px))}.ui[class*=right\\ top].right.popup,.ui[class*=right\\ bottom].right.popup{margin:0 0 0 var(--_ui-popup-distance);--_popup-arrow-shadow:-1px 1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-2px -5px, calc(100% + 5px) calc(100% + 2px), -2px calc(100% + 2px))}.ui[class*=left\\ top].left.popup{transform-origin:100% 0}.ui[class*=left\\ bottom].left.popup{transform-origin:100% 100%}.ui[class*=right\\ top].right.popup{transform-origin:0 0}.ui[class*=right\\ bottom].right.popup{transform-origin:0 100%}.ui[class*=left\\ top].left.popup:before{inset:var(--_ui-popup-arrow-edge-distance) var(--_ui-popup-arrow-offset) auto auto}.ui[class*=left\\ bottom].left.popup:before{inset:auto var(--_ui-popup-arrow-offset) var(--_ui-popup-arrow-edge-distance) auto}.ui[class*=right\\ top].right.popup:before{inset:var(--_ui-popup-arrow-edge-distance) auto auto var(--_ui-popup-arrow-offset)}.ui[class*=right\\ bottom].right.popup:before{inset:auto auto var(--_ui-popup-arrow-edge-distance) var(--_ui-popup-arrow-offset)}.ui.basic.popup:before{display:none}.ui.fixed.popup{width:var(--_ui-popup-max-width)}.ui.wide.popup{--_ui-popup-max-width:var(--_ui-popup-wide-width)}.ui[class*=very\\ wide].popup{--_ui-popup-max-width:var(--_ui-popup-very-wide-width)}@media (width<768px){.ui.wide.popup,.ui[class*=very\\ wide].popup{--_ui-popup-max-width:var(--ui-popup-max-width,250px)}}.ui.fluid.popup{width:100%;max-width:none}.ui.flowing.popup{max-width:none}.ui.flowing.popup>::slotted(ui-grid){container-type:normal}.ui.inverted.popup{--ui-inverted:1;--_popup-arrow-shadow:none;background:var(--ui-color-inverted,var(--_ui-popup-inverted-background));box-shadow:none;color:var(--ui-color-inverted-on,var(--_ui-popup-inverted-color));border-color:#0000}.ui.inverted.popup>.header{color:inherit;background:0 0}}@layer ui.components.popup.states{.ui.visible.popup{display:block}.ui.popup[popover]:not(:popover-open){display:none}.ui.loading.popup{cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none}.ui.loading.popup>*,.ui.loading.popup>::slotted(*){opacity:var(--_ui-popup-loading-opacity)}.ui.loading.popup:after{content:\"\";z-index:2;border:.2em solid oklch(from currentColor l c h / .15);border-radius:var(--ui-radius-circle);border-top-color:currentColor;width:2em;height:2em;margin:-1em 0 0 -1em;animation:.6s linear infinite ui-popup-spin;position:absolute;top:50%;left:50%}}@keyframes ui-popup-spin{to{transform:rotate(360deg)}}", he = "/*\n * `<ui-popup>` after a flip: the gap and the arrow move to the side that now faces the target,\n * where anchored container queries exist (the DOM element is `container-type: anchored`, `UIPopup.css`).\n * Elsewhere a flipped popup keeps its first side's arrow.\n * - A SEPARATE sheet, imported `?raw`: Lightning CSS (1.30) can't parse `@container anchored(...)` and fails the\n * whole file, so this one skips the CSS pipeline. MUST stay self-contained: no `@import`, no `@custom-media`.\n * - Same sublayer as the position rules it overrides (`UIPopup.css`, variations), adopted after them,\n * with selectors of the same specificity (`:is(.left, .center, .right)` matches the arrow rules' extra class).\n */\n\n@layer ui.components.popup.variations {\n @container anchored(fallback: flip-block) {\n .ui.top.popup {\n --_popup-arrow-shadow: -1px -1px 0 0 var(--_popup-arrow-edge);\n margin: var(--_ui-popup-distance) 0 0;\n }\n .ui.top:is(.left, .center, .right).popup::before {\n top: var(--_ui-popup-arrow-offset);\n bottom: auto;\n }\n .ui.bottom.popup {\n --_popup-arrow-shadow: 1px 1px 0 0 var(--_popup-arrow-edge);\n margin: 0 0 var(--_ui-popup-distance);\n }\n .ui.bottom:is(.left, .center, .right).popup::before {\n top: auto;\n bottom: var(--_ui-popup-arrow-offset);\n }\n /*\n * Beside + top / bottom edge: still beside, so the arrow moves along the edge instead\n * (ties the rules above, later).\n */\n .ui[class*=\"left top\"].top.popup::before,\n .ui[class*=\"right top\"].top.popup::before {\n top: auto;\n bottom: var(--_ui-popup-arrow-edge-distance);\n }\n .ui[class*=\"left bottom\"].bottom.popup::before,\n .ui[class*=\"right bottom\"].bottom.popup::before {\n top: var(--_ui-popup-arrow-edge-distance);\n bottom: auto;\n }\n }\n @container anchored(fallback: flip-inline) {\n .ui.left.center.popup {\n --_popup-arrow-shadow: -1px 1px 0 0 var(--_popup-arrow-edge);\n margin: 0 0 0 var(--_ui-popup-distance);\n }\n .ui.left.center.popup::before {\n right: auto;\n left: var(--_ui-popup-arrow-offset);\n }\n .ui.right.center.popup {\n --_popup-arrow-shadow: 1px -1px 0 0 var(--_popup-arrow-edge);\n margin: 0 var(--_ui-popup-distance) 0 0;\n }\n .ui.right.center.popup::before {\n right: var(--_ui-popup-arrow-offset);\n left: auto;\n }\n .ui[class*=\"left top\"].left.popup,\n .ui[class*=\"left bottom\"].left.popup {\n --_popup-arrow-shadow: -1px 1px 0 0 var(--_popup-arrow-edge);\n margin: 0 0 0 var(--_ui-popup-distance);\n }\n .ui[class*=\"left top\"].left.popup::before,\n .ui[class*=\"left bottom\"].left.popup::before {\n right: auto;\n left: var(--_ui-popup-arrow-offset);\n }\n .ui[class*=\"right top\"].right.popup,\n .ui[class*=\"right bottom\"].right.popup {\n --_popup-arrow-shadow: 1px -1px 0 0 var(--_popup-arrow-edge);\n margin: 0 var(--_ui-popup-distance) 0 0;\n }\n .ui[class*=\"right top\"].right.popup::before,\n .ui[class*=\"right bottom\"].right.popup::before {\n right: var(--_ui-popup-arrow-offset);\n left: auto;\n }\n }\n}\n\n/*\n * A centred popup slid along its side to stay in the window, or across to the other side (`SHIFTED_FALLBACKS`,\n * `UIPopup.tsx`): the gap faces the target, and the arrow points at it, near the end the popup lines up with.\n * - Its fallbacks are named (`bottom span-left` ...), never `flip-block`, so the rules above don't apply to it.\n */\n@layer ui.components.popup.variations {\n @container anchored(fallback: bottom center) or anchored(fallback: bottom span-left) or anchored(fallback: bottom span-right) {\n .ui:is(.top, .bottom).center.popup {\n --_popup-arrow-shadow: -1px -1px 0 0 var(--_popup-arrow-edge);\n --_popup-arrow-clip: polygon(-2px -2px, calc(100% + 5px) -2px, -2px calc(100% + 5px));\n margin: var(--_ui-popup-distance) 0 0;\n }\n .ui:is(.top, .bottom).center.popup::before {\n top: var(--_ui-popup-arrow-offset);\n bottom: auto;\n }\n }\n @container anchored(fallback: top center) or anchored(fallback: top span-left) or anchored(fallback: top span-right) {\n .ui:is(.top, .bottom).center.popup {\n --_popup-arrow-shadow: 1px 1px 0 0 var(--_popup-arrow-edge);\n --_popup-arrow-clip: polygon(calc(100% + 2px) -5px, calc(100% + 2px) calc(100% + 2px), -5px calc(100% + 2px));\n margin: 0 0 var(--_ui-popup-distance);\n }\n .ui:is(.top, .bottom).center.popup::before {\n top: auto;\n bottom: var(--_ui-popup-arrow-offset);\n }\n }\n /* Ends at the target's right edge: the arrow near its own right end */\n @container anchored(fallback: top span-left) or anchored(fallback: bottom span-left) {\n .ui:is(.top, .bottom).center.popup::before {\n right: var(--_ui-popup-arrow-edge-distance);\n left: auto;\n margin-left: 0;\n }\n }\n /* Starts at the target's left edge: the arrow near its own left end */\n @container anchored(fallback: top span-right) or anchored(fallback: bottom span-right) {\n .ui:is(.top, .bottom).center.popup::before {\n right: auto;\n left: var(--_ui-popup-arrow-edge-distance);\n margin-left: 0;\n }\n }\n}\n", D = /* @__PURE__ */ E("<div>"), ge = /* @__PURE__ */ E("<div><!><slot>"), O = /* @__PURE__ */ E("<span>"), _e = /* @__PURE__ */ E("<span><!><slot>"), k, A, j, M, N, P, F, I, L, R, ve, z, B, V, H, U, W, G, K, ye, q, J, Y, X, Z = class _UIPopup extends (q = u, ye = [ae], K = [oe], G = [de], W = [ue], U = [le], H = [g("at", { defer: !0 })], V = [h("toggle")], B = [h("command")], z = [ie], ve = [le], R = [g("isReady", "targetElement", "trigger")], L = [g("ariaElement", "isInteractive", "isVisible")], I = [ue], F = [h("pointerenter")], P = [h("pointerleave")], N = [h("focusout")], M = [p("role")], j = [p("label")], A = [g("position", "point", { writesDOMElement: !0 })], k = [g("isReady", "trigger")], q) {
195
+ }, he = "@layer ui.components.popup.types{:host{--ui-color:initial;--ui-color-text:initial;--ui-color-header:initial;--ui-color-border:initial;--ui-color-background:initial;--ui-color-inverted:initial;--ui-color-on:initial;--ui-color-inverted-on:initial;--ui-scale:initial;--_ui-popup-duration:var(--ui-popup-duration,var(--ui-duration-normal));z-index:var(--ui-z-popup);box-sizing:border-box;width:max-content;height:max-content;color:inherit;position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;container-type:anchored;transition-property:display,overlay;transition-duration:var(--_ui-popup-duration);transition-behavior:allow-discrete;background:0 0;border:0;margin:0;padding:0;display:block;position:absolute;inset:auto;overflow:visible}:host(:not(:popover-open)){display:none}:host(:state(fluid)){width:anchor-size(width)}.ui.popup{--_ui-popup-background:var(--ui-popup-background,var(--ui-surface));--_ui-popup-color:var(--ui-popup-color,var(--ui-text-color));--_ui-popup-border-color:var(--ui-popup-border-color,var(--ui-border-color-strong));--_ui-popup-shadow:var(--ui-popup-shadow,var(--ui-shadow-floating));--_ui-popup-radius:var(--ui-popup-radius,var(--ui-radius));--_ui-popup-padding:var(--ui-popup-padding,.833em 1em);--_ui-popup-max-width:var(--ui-popup-max-width,250px);--_ui-popup-wide-width:var(--ui-popup-wide-width,350px);--_ui-popup-very-wide-width:var(--ui-popup-very-wide-width,550px);--_ui-popup-arrow-size:var(--ui-popup-arrow-size,.71428em);--_ui-popup-arrow-edge-distance:var(--ui-popup-arrow-edge-distance,1em);--_ui-popup-arrow-offset:var(--ui-popup-arrow-offset,calc(var(--_ui-popup-arrow-size) / -2 + .05em));--_ui-popup-arrow-edge:var(--ui-popup-arrow-edge,var(--_ui-popup-border-color));--_ui-popup-distance:var(--ui-popup-distance,var(--_ui-popup-arrow-size));--_ui-popup-inverted-background:var(--ui-popup-inverted-background,var(--ui-ink));--_ui-popup-inverted-color:var(--ui-popup-inverted-color,var(--ui-surface));--_ui-popup-loading-opacity:var(--ui-popup-loading-opacity,.3);--_ui-popup-duration:var(--ui-popup-duration,var(--ui-duration-normal));--_ui-popup-header-font-size:var(--ui-popup-header-font-size,1.14285em);--_ui-popup-header-distance:var(--ui-popup-header-distance,.5em);--_popup-arrow-shadow:1px 1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(calc(100% + 2px) -5px, calc(100% + 2px) calc(100% + 2px), -5px calc(100% + 2px));--_popup-arrow-edge:var(--ui-color,var(--_ui-popup-arrow-edge));z-index:var(--ui-z-popup);box-sizing:border-box;min-width:min-content;max-width:var(--_ui-popup-max-width);padding:var(--_ui-popup-padding);border:var(--ui-border-width) solid var(--ui-color,var(--_ui-popup-border-color));border-radius:var(--_ui-popup-radius);background:var(--ui-color,var(--_ui-popup-background));box-shadow:var(--_ui-popup-shadow);color:var(--ui-color-on,var(--_ui-popup-color));font-family:var(--ui-font-family);font-size:calc(var(--ui-font-size) * var(--ui-scale,1));font-style:normal;font-weight:var(--ui-font-weight-normal);line-height:var(--ui-line-height);text-align:start;margin:0;display:none;position:absolute;top:0;right:0}:host>.ui.popup{opacity:1;transition:opacity var(--_ui-popup-duration) var(--ui-ease), transform var(--_ui-popup-duration) var(--ui-ease);display:block;position:relative;top:auto;right:auto;transform:none}:host(:not(:popover-open))>.ui.popup{opacity:0;transform:scale(.8)}@starting-style{:host(:popover-open)>.ui.popup{opacity:0;transform:scale(.8)}}.ui.popup:before{content:\"\";z-index:1;width:var(--_ui-popup-arrow-size);height:var(--_ui-popup-arrow-size);background:inherit;box-shadow:var(--_popup-arrow-shadow);clip-path:var(--_popup-arrow-clip,none);position:absolute;transform:rotate(45deg)}}@layer ui.components.popup.content{.ui.popup>.header{font-family:var(--ui-font-family-heading);font-size:var(--_ui-popup-header-font-size);font-weight:var(--ui-font-weight-bold);padding:0;line-height:1.2;display:block}.ui.popup>.header+.content{padding-top:var(--_ui-popup-header-distance)}.ui.popup>.content{display:block}.ui.popup>.ui.grid:not(.padded),.ui.popup>::slotted(ui-grid:not([padding])){width:calc(100% + 2em);margin:-.7em -1em}}@layer ui.components.popup.variations{.ui.top.popup{margin:0 0 var(--_ui-popup-distance)}.ui.bottom.popup{margin:var(--_ui-popup-distance) 0 0;--_popup-arrow-shadow:-1px -1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-2px -2px, calc(100% + 5px) -2px, -2px calc(100% + 5px))}.ui.left.center.popup{margin:0 var(--_ui-popup-distance) 0 0;transform-origin:100%;--_popup-arrow-shadow:1px -1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-5px -2px, calc(100% + 2px) -2px, calc(100% + 2px) calc(100% + 5px))}.ui.right.center.popup{margin:0 0 0 var(--_ui-popup-distance);transform-origin:0;--_popup-arrow-shadow:-1px 1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-2px -5px, calc(100% + 5px) calc(100% + 2px), -2px calc(100% + 2px))}.ui.top.left.popup{transform-origin:0 100%}.ui.top.center.popup{transform-origin:bottom}.ui.top.right.popup{transform-origin:100% 100%}.ui.bottom.left.popup{transform-origin:0 0}.ui.bottom.center.popup{transform-origin:top}.ui.bottom.right.popup{transform-origin:100% 0}.ui.bottom.center.popup:before{inset:var(--_ui-popup-arrow-offset) auto auto 50%;margin-left:var(--_ui-popup-arrow-offset)}.ui.bottom.left.popup:before{inset:var(--_ui-popup-arrow-offset) auto auto var(--_ui-popup-arrow-edge-distance)}.ui.bottom.right.popup:before{inset:var(--_ui-popup-arrow-offset) var(--_ui-popup-arrow-edge-distance) auto auto}.ui.top.center.popup:before{inset:auto auto var(--_ui-popup-arrow-offset) 50%;margin-left:var(--_ui-popup-arrow-offset)}.ui.top.left.popup:before{inset:auto auto var(--_ui-popup-arrow-offset) var(--_ui-popup-arrow-edge-distance)}.ui.top.right.popup:before{inset:auto var(--_ui-popup-arrow-edge-distance) var(--_ui-popup-arrow-offset) auto}.ui.left.center.popup:before{inset:50% var(--_ui-popup-arrow-offset) auto auto;margin-top:var(--_ui-popup-arrow-offset)}.ui.right.center.popup:before{inset:50% auto auto var(--_ui-popup-arrow-offset);margin-top:var(--_ui-popup-arrow-offset)}.ui[class*=left\\ top].left.popup,.ui[class*=left\\ bottom].left.popup{margin:0 var(--_ui-popup-distance) 0 0;--_popup-arrow-shadow:1px -1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-5px -2px, calc(100% + 2px) -2px, calc(100% + 2px) calc(100% + 5px))}.ui[class*=right\\ top].right.popup,.ui[class*=right\\ bottom].right.popup{margin:0 0 0 var(--_ui-popup-distance);--_popup-arrow-shadow:-1px 1px 0 0 var(--_popup-arrow-edge);--_popup-arrow-clip:polygon(-2px -5px, calc(100% + 5px) calc(100% + 2px), -2px calc(100% + 2px))}.ui[class*=left\\ top].left.popup{transform-origin:100% 0}.ui[class*=left\\ bottom].left.popup{transform-origin:100% 100%}.ui[class*=right\\ top].right.popup{transform-origin:0 0}.ui[class*=right\\ bottom].right.popup{transform-origin:0 100%}.ui[class*=left\\ top].left.popup:before{inset:var(--_ui-popup-arrow-edge-distance) var(--_ui-popup-arrow-offset) auto auto}.ui[class*=left\\ bottom].left.popup:before{inset:auto var(--_ui-popup-arrow-offset) var(--_ui-popup-arrow-edge-distance) auto}.ui[class*=right\\ top].right.popup:before{inset:var(--_ui-popup-arrow-edge-distance) auto auto var(--_ui-popup-arrow-offset)}.ui[class*=right\\ bottom].right.popup:before{inset:auto auto var(--_ui-popup-arrow-edge-distance) var(--_ui-popup-arrow-offset)}.ui.basic.popup:before{display:none}.ui.fixed.popup{width:var(--_ui-popup-max-width)}.ui.wide.popup{--_ui-popup-max-width:var(--_ui-popup-wide-width)}.ui[class*=very\\ wide].popup{--_ui-popup-max-width:var(--_ui-popup-very-wide-width)}@media (width<768px){.ui.wide.popup,.ui[class*=very\\ wide].popup{--_ui-popup-max-width:var(--ui-popup-max-width,250px)}}.ui.fluid.popup{width:100%;max-width:none}.ui.flowing.popup{max-width:none}.ui.flowing.popup>::slotted(ui-grid){container-type:normal}.ui.inverted.popup{--ui-inverted:1;--_popup-arrow-shadow:none;background:var(--ui-color-inverted,var(--_ui-popup-inverted-background));box-shadow:none;color:var(--ui-color-inverted-on,var(--_ui-popup-inverted-color));border-color:#0000}.ui.inverted.popup>.header{color:inherit;background:0 0}}@layer ui.components.popup.states{.ui.visible.popup{display:block}.ui.popup[popover]:not(:popover-open){display:none}.ui.loading.popup{cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none}.ui.loading.popup>*,.ui.loading.popup>::slotted(*){opacity:var(--_ui-popup-loading-opacity)}.ui.loading.popup:after{content:\"\";z-index:2;border:.2em solid oklch(from currentColor l c h / .15);border-radius:var(--ui-radius-circle);border-top-color:currentColor;width:2em;height:2em;margin:-1em 0 0 -1em;animation:.6s linear infinite ui-popup-spin;position:absolute;top:50%;left:50%}}@keyframes ui-popup-spin{to{transform:rotate(360deg)}}", ge = "/*\n * `<ui-popup>` after a flip: the gap and the arrow move to the side that now faces the target,\n * where anchored container queries exist (the DOM element is `container-type: anchored`, `UIPopup.css`).\n * Elsewhere a flipped popup keeps its first side's arrow.\n * - A SEPARATE sheet, imported `?raw`: Lightning CSS (1.30) can't parse `@container anchored(...)` and fails the\n * whole file, so this one skips the CSS pipeline. MUST stay self-contained: no `@import`, no `@custom-media`.\n * - Same sublayer as the position rules it overrides (`UIPopup.css`, variations), adopted after them,\n * with selectors of the same specificity (`:is(.left, .center, .right)` matches the arrow rules' extra class).\n */\n\n@layer ui.components.popup.variations {\n @container anchored(fallback: flip-block) {\n .ui.top.popup {\n --_popup-arrow-shadow: -1px -1px 0 0 var(--_popup-arrow-edge);\n margin: var(--_ui-popup-distance) 0 0;\n }\n .ui.top:is(.left, .center, .right).popup::before {\n top: var(--_ui-popup-arrow-offset);\n bottom: auto;\n }\n .ui.bottom.popup {\n --_popup-arrow-shadow: 1px 1px 0 0 var(--_popup-arrow-edge);\n margin: 0 0 var(--_ui-popup-distance);\n }\n .ui.bottom:is(.left, .center, .right).popup::before {\n top: auto;\n bottom: var(--_ui-popup-arrow-offset);\n }\n /*\n * Beside + top / bottom edge: still beside, so the arrow moves along the edge instead\n * (ties the rules above, later).\n */\n .ui[class*=\"left top\"].top.popup::before,\n .ui[class*=\"right top\"].top.popup::before {\n top: auto;\n bottom: var(--_ui-popup-arrow-edge-distance);\n }\n .ui[class*=\"left bottom\"].bottom.popup::before,\n .ui[class*=\"right bottom\"].bottom.popup::before {\n top: var(--_ui-popup-arrow-edge-distance);\n bottom: auto;\n }\n }\n @container anchored(fallback: flip-inline) {\n .ui.left.center.popup {\n --_popup-arrow-shadow: -1px 1px 0 0 var(--_popup-arrow-edge);\n margin: 0 0 0 var(--_ui-popup-distance);\n }\n .ui.left.center.popup::before {\n right: auto;\n left: var(--_ui-popup-arrow-offset);\n }\n .ui.right.center.popup {\n --_popup-arrow-shadow: 1px -1px 0 0 var(--_popup-arrow-edge);\n margin: 0 var(--_ui-popup-distance) 0 0;\n }\n .ui.right.center.popup::before {\n right: var(--_ui-popup-arrow-offset);\n left: auto;\n }\n .ui[class*=\"left top\"].left.popup,\n .ui[class*=\"left bottom\"].left.popup {\n --_popup-arrow-shadow: -1px 1px 0 0 var(--_popup-arrow-edge);\n margin: 0 0 0 var(--_ui-popup-distance);\n }\n .ui[class*=\"left top\"].left.popup::before,\n .ui[class*=\"left bottom\"].left.popup::before {\n right: auto;\n left: var(--_ui-popup-arrow-offset);\n }\n .ui[class*=\"right top\"].right.popup,\n .ui[class*=\"right bottom\"].right.popup {\n --_popup-arrow-shadow: 1px -1px 0 0 var(--_popup-arrow-edge);\n margin: 0 var(--_ui-popup-distance) 0 0;\n }\n .ui[class*=\"right top\"].right.popup::before,\n .ui[class*=\"right bottom\"].right.popup::before {\n right: var(--_ui-popup-arrow-offset);\n left: auto;\n }\n }\n}\n\n/*\n * A centred popup slid along its side to stay in the window, or across to the other side (`SHIFTED_FALLBACKS`,\n * `UIPopup.tsx`): the gap faces the target, and the arrow points at it, near the end the popup lines up with.\n * - Its fallbacks are named (`bottom span-left` ...), never `flip-block`, so the rules above don't apply to it.\n */\n@layer ui.components.popup.variations {\n @container anchored(fallback: bottom center) or anchored(fallback: bottom span-left) or anchored(fallback: bottom span-right) {\n .ui:is(.top, .bottom).center.popup {\n --_popup-arrow-shadow: -1px -1px 0 0 var(--_popup-arrow-edge);\n --_popup-arrow-clip: polygon(-2px -2px, calc(100% + 5px) -2px, -2px calc(100% + 5px));\n margin: var(--_ui-popup-distance) 0 0;\n }\n .ui:is(.top, .bottom).center.popup::before {\n top: var(--_ui-popup-arrow-offset);\n bottom: auto;\n }\n }\n @container anchored(fallback: top center) or anchored(fallback: top span-left) or anchored(fallback: top span-right) {\n .ui:is(.top, .bottom).center.popup {\n --_popup-arrow-shadow: 1px 1px 0 0 var(--_popup-arrow-edge);\n --_popup-arrow-clip: polygon(calc(100% + 2px) -5px, calc(100% + 2px) calc(100% + 2px), -5px calc(100% + 2px));\n margin: 0 0 var(--_ui-popup-distance);\n }\n .ui:is(.top, .bottom).center.popup::before {\n top: auto;\n bottom: var(--_ui-popup-arrow-offset);\n }\n }\n /* Ends at the target's right edge: the arrow near its own right end */\n @container anchored(fallback: top span-left) or anchored(fallback: bottom span-left) {\n .ui:is(.top, .bottom).center.popup::before {\n right: var(--_ui-popup-arrow-edge-distance);\n left: auto;\n margin-left: 0;\n }\n }\n /* Starts at the target's left edge: the arrow near its own left end */\n @container anchored(fallback: top span-right) or anchored(fallback: bottom span-right) {\n .ui:is(.top, .bottom).center.popup::before {\n right: auto;\n left: var(--_ui-popup-arrow-edge-distance);\n margin-left: 0;\n }\n }\n}\n", D = /* @__PURE__ */ E("<div>"), _e = /* @__PURE__ */ E("<div><!><slot>"), O = /* @__PURE__ */ E("<span>"), ve = /* @__PURE__ */ E("<span><!><slot>"), k, A, j, M, N, P, F, I, L, ye, R, z, B, V, H, U, W, G, K, be, q, J, Y, X, Z = class _UIPopup extends (q = u, be = [oe], K = [se], G = [fe], W = [de], U = [ue], H = [g("at", { defer: !0 })], V = [h("toggle")], B = [h("command")], z = [ae], R = [ue], ye = [g("isReady", "targetElement", "trigger")], L = [g("ariaElement", "isInteractive", "isVisible")], I = [de], F = [h("pointerenter")], P = [h("pointerleave")], N = [h("focusout")], M = [p("role")], j = [p("label")], A = [g("position", "point", { writesDOMElement: !0 })], k = [g("isReady", "trigger")], q) {
196
196
  constructor() {
197
197
  super(...arguments), f(J, 5, this), r(this, "delayTimer"), r(this, "overlay", {
198
198
  element: this.domElement,
@@ -205,7 +205,7 @@ var pe = {
205
205
  visible: e,
206
206
  originalEvent: t
207
207
  }), "detail")
208
- })), r(this, "box"), ce(this, Y, f(J, 8, this)), f(J, 11, this), ce(this, X, f(J, 12, this)), f(J, 15, this), r(this, "anchorName", ""), r(this, "onTargetEnter", /* @__PURE__ */ a((e) => {
208
+ })), r(this, "box"), le(this, Y, f(J, 8, this)), f(J, 11, this), le(this, X, f(J, 12, this)), f(J, 15, this), r(this, "anchorName", ""), r(this, "onTargetEnter", /* @__PURE__ */ a((e) => {
209
209
  this.schedule(!0, this.hoverDelay, e);
210
210
  }, "onTargetEnter")), r(this, "onTargetLeave", /* @__PURE__ */ a((e) => {
211
211
  this.schedule(!1, this.hideDelay ?? 0, e);
@@ -228,7 +228,7 @@ var pe = {
228
228
  let n = this.box, r = te.keyframesBeside(t, this.elementSetup.animation);
229
229
  if (e) {
230
230
  if (await this.targetElement?.ready, !this.isVisible || !this.isConnected) return;
231
- this.show(), this.point && re(() => this.firstFocus?.focus(Se)), r && n && await l.transitions.animate({
231
+ this.show(), this.point && re(() => this.firstFocus?.focus(Ce)), r && n && await l.transitions.animate({
232
232
  element: n,
233
233
  name: r,
234
234
  direction: "in"
@@ -267,16 +267,16 @@ var pe = {
267
267
  let { point: e, domElement: t } = this;
268
268
  if (!e) return this.removePointBox();
269
269
  let n = t.getRootNode(), r = this.pointBox ?? t.ownerDocument.createElement("div");
270
- r.style.cssText = `position:fixed;left:${e.x}px;top:${e.y}px;width:0;height:0`, r.setAttribute("aria-hidden", "true"), r.isConnected || ("body" in n ? n.body : n).append(r), this.anchorName ||= `--${l.ids.next(Q)}`, _UIPopup.addAnchorName(r, this.anchorName), t.style.setProperty(Ee, "0px"), this.pointBox = r;
270
+ r.style.cssText = `position:fixed;left:${e.x}px;top:${e.y}px;width:0;height:0`, r.setAttribute("aria-hidden", "true"), r.isConnected || ("body" in n ? n.body : n).append(r), this.anchorName ||= `--${l.ids.next(Q)}`, _UIPopup.addAnchorName(r, this.anchorName), t.style.setProperty(De, "0px"), this.pointBox = r;
271
271
  }
272
272
  removePointBox() {
273
- this.pointBox && (this.pointBox.remove(), this.pointBox = void 0, this.domElement.style.removeProperty(Ee));
273
+ this.pointBox && (this.pointBox.remove(), this.pointBox = void 0, this.domElement.style.removeProperty(De));
274
274
  }
275
275
  onPointChanged() {
276
276
  this.isVisible && this.isConnected && this.placeAtPoint();
277
277
  }
278
278
  onToggle(e) {
279
- e.newState === Ae && this.domElement.isConnected && this.disclosure.adopt(!1, e);
279
+ e.newState === je && this.domElement.isConnected && this.disclosure.adopt(!1, e);
280
280
  }
281
281
  onCommand(e) {
282
282
  let t = c.action(e, this.isVisible);
@@ -291,7 +291,7 @@ var pe = {
291
291
  return t ? this.domElement.getRootNode().getElementById?.(t) ?? void 0 : this.domElement.previousElementSibling ?? void 0;
292
292
  }
293
293
  get trigger() {
294
- return this.openOn ?? Oe;
294
+ return this.openOn ?? ke;
295
295
  }
296
296
  get isInteractive() {
297
297
  return this.trigger === i.click || !!this.point;
@@ -306,7 +306,7 @@ var pe = {
306
306
  t === i.hover && (s.addEventListener("pointerenter", this.onTargetEnter, a), s.addEventListener("pointerleave", this.onTargetLeave, a)), (t === i.hover || t === i.focus) && (s.addEventListener("focusin", this.onTargetFocus, a), s.addEventListener("focusout", this.onTargetBlur, a)), o && s.addEventListener("click", this.onTargetClick, a), _UIPopup.addAnchorName(e, this.anchorName), l.ids.ensure(n, Q);
307
307
  let c = _UIPopup.ariaTargetFor(e), u = _UIPopup.addAriaRelation({
308
308
  element: c,
309
- relation: o ? $ : ke,
309
+ relation: o ? $ : Ae,
310
310
  domElement: n
311
311
  });
312
312
  return o && c.setAttribute("aria-haspopup", "dialog"), this.ariaElement = c, () => {
@@ -321,7 +321,7 @@ var pe = {
321
321
  let n = _UIPopup.ariaTargetFor(e);
322
322
  _UIPopup.addAriaRelation({
323
323
  element: n,
324
- relation: t ? $ : ke,
324
+ relation: t ? $ : Ae,
325
325
  domElement: this.domElement
326
326
  }), t && n.setAttribute("aria-haspopup", "dialog");
327
327
  }
@@ -330,8 +330,8 @@ var pe = {
330
330
  }
331
331
  get hoverDelay() {
332
332
  if (this.attributes["show-delay"] !== null) return this.showDelay ?? 0;
333
- let e = getComputedStyle(this.domElement).getPropertyValue(Pe).trim(), t = Fe.exec(e);
334
- return t ? Number(t[1]) * (t[2] === "s" ? 1e3 : 1) : this.showDelay ?? 0;
333
+ let e = ie(this.domElement, Fe);
334
+ return e === void 0 ? this.showDelay ?? 0 : e * 1e3;
335
335
  }
336
336
  onPopupEnter() {
337
337
  this.trigger === i.hover && this.hoverable !== !1 && this.delayTimer?.cancel();
@@ -351,9 +351,9 @@ var pe = {
351
351
  return this.isInteractive ? this.heading : void 0;
352
352
  }
353
353
  onPositionChanged(e, t) {
354
- let n = t ? Ce : e ?? xe, { style: r } = this.domElement;
355
- r.setProperty("position-area", Me[n]);
356
- let i = t ? we : Ne[n];
354
+ let n = t ? we : e ?? Se, { style: r } = this.domElement;
355
+ r.setProperty("position-area", Ne[n]);
356
+ let i = t ? Te : Pe[n];
357
357
  i ? r.setProperty("position-try-fallbacks", i) : r.removeProperty("position-try-fallbacks");
358
358
  }
359
359
  get popoverMode() {
@@ -369,8 +369,8 @@ var pe = {
369
369
  return this.isInteractive ? "auto" : "manual";
370
370
  }
371
371
  get extraClass() {
372
- let e = this.point ? `${Te} ${Ce}` : this.position ?? xe;
373
- return this.isVisible ? `${e} ${De}` : e;
372
+ let e = this.point ? `${Ee} ${we}` : this.position ?? Se;
373
+ return this.isVisible ? `${e} ${Oe}` : e;
374
374
  }
375
375
  onMount() {
376
376
  return C && this.serverBind(), super.onMount();
@@ -378,8 +378,8 @@ var pe = {
378
378
  render() {
379
379
  if (C) return this.serverMarkup();
380
380
  let t = this;
381
- var n = ge(), r = n.firstChild, i = r.nextSibling;
382
- return fe(() => (e) => t.box = e, n), S(n, y(_, {
381
+ var n = _e(), r = n.firstChild, i = r.nextSibling;
382
+ return pe(() => (e) => t.box = e, n), S(n, y(_, {
383
383
  get when() {
384
384
  return t.heading;
385
385
  },
@@ -414,7 +414,7 @@ var pe = {
414
414
  }
415
415
  serverMarkup() {
416
416
  let t = this;
417
- var n = _e(), r = n.firstChild, i = r.nextSibling;
417
+ var n = ve(), r = n.firstChild, i = r.nextSibling;
418
418
  return S(n, y(_, {
419
419
  get when() {
420
420
  return t.heading;
@@ -453,7 +453,7 @@ var pe = {
453
453
  return typeof e == "object" && !!e && e.nodeType === s.element;
454
454
  }
455
455
  static anchorBoxFor(e) {
456
- return getComputedStyle(e).display === je ? e.shadowRoot?.firstElementChild ?? e.firstElementChild ?? e : e;
456
+ return getComputedStyle(e).display === Me ? e.shadowRoot?.firstElementChild ?? e.firstElementChild ?? e : e;
457
457
  }
458
458
  static ariaTargetFor(e) {
459
459
  let t = e.shadowRoot;
@@ -494,10 +494,10 @@ var pe = {
494
494
  return (e.getAttribute(t) ?? "").split(o).filter(Boolean);
495
495
  }
496
496
  };
497
- J = n(q), Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), d(J, 1, "watchPlacement", G, Z), d(J, 1, "show", W, Z), d(J, 4, "pointBox", U, Z, Y), d(J, 1, "onPointChanged", H, Z), d(J, 1, "onToggle", V, Z), d(J, 1, "onCommand", B, Z), d(J, 2, "targetElement", z, Z), d(J, 4, "ariaElement", ve, Z, X), d(J, 1, "onTargetChanged", R, Z), d(J, 1, "onExpandedChanged", L, Z), d(J, 1, "onPopupEnter", F, Z), d(J, 1, "onPopupLeave", P, Z), d(J, 1, "onPopupFocusOut", N, Z), d(J, 2, "ariaRole", M, Z), d(J, 2, "accessibleName", j, Z), d(J, 1, "onPositionChanged", A, Z), d(J, 1, "onPopoverModeChanged", k, Z), d(J, 13, "vocabulary", ye, Z), d(J, 13, "elementSetup", K, Z), d(J, 5, "onTargetClick", I, Z), ee(J, Z), a(Z, "UIPopup"), r(Z, "vocabulary", f(J, 16, Z, pe)), f(J, 19, Z), r(Z, "elementSetup", f(J, 20, Z, {
497
+ J = n(q), Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), d(J, 1, "watchPlacement", G, Z), d(J, 1, "show", W, Z), d(J, 4, "pointBox", U, Z, Y), d(J, 1, "onPointChanged", H, Z), d(J, 1, "onToggle", V, Z), d(J, 1, "onCommand", B, Z), d(J, 2, "targetElement", z, Z), d(J, 4, "ariaElement", R, Z, X), d(J, 1, "onTargetChanged", ye, Z), d(J, 1, "onExpandedChanged", L, Z), d(J, 1, "onPopupEnter", F, Z), d(J, 1, "onPopupLeave", P, Z), d(J, 1, "onPopupFocusOut", N, Z), d(J, 2, "ariaRole", M, Z), d(J, 2, "accessibleName", j, Z), d(J, 1, "onPositionChanged", A, Z), d(J, 1, "onPopoverModeChanged", k, Z), d(J, 13, "vocabulary", be, Z), d(J, 13, "elementSetup", K, Z), d(J, 5, "onTargetClick", I, Z), ee(J, Z), a(Z, "UIPopup"), r(Z, "vocabulary", f(J, 16, Z, me)), f(J, 19, Z), r(Z, "elementSetup", f(J, 20, Z, {
498
498
  styleSheets: {
499
- popup: me,
500
- "popup-anchored": he
499
+ popup: he,
500
+ "popup-anchored": ge
501
501
  },
502
502
  cssStates: ["fluid"],
503
503
  delegatesFocus: !1,
@@ -505,16 +505,16 @@ J = n(q), Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(),
505
505
  visible: "hidden",
506
506
  animation: "scale"
507
507
  })), f(J, 23, Z);
508
- var be = Z, xe = "top left", Se = {
508
+ var xe = Z, Se = "top left", Ce = {
509
509
  preventScroll: !0,
510
510
  focusVisible: !1
511
- }, Ce = "bottom left", we = "flip-inline, flip-block, flip-block flip-inline, bottom span-all, top span-all", Te = "basic", Ee = "--ui-popup-distance", De = "visible", Oe = i.hover, Q = "ui-popup", ke = {
511
+ }, we = "bottom left", Te = "flip-inline, flip-block, flip-block flip-inline, bottom span-all, top span-all", Ee = "basic", De = "--ui-popup-distance", Oe = "visible", ke = i.hover, Q = "ui-popup", Ae = {
512
512
  attribute: "aria-describedby",
513
513
  property: "ariaDescribedByElements"
514
514
  }, $ = {
515
515
  attribute: "aria-controls",
516
516
  property: "ariaControlsElements"
517
- }, Ae = "closed", je = "contents", Me = {
517
+ }, je = "closed", Me = "contents", Ne = {
518
518
  "top left": "top span-right",
519
519
  "top center": "top center",
520
520
  "top right": "top span-left",
@@ -527,12 +527,12 @@ var be = Z, xe = "top left", Se = {
527
527
  "left bottom": "left span-top",
528
528
  "right top": "right span-bottom",
529
529
  "right bottom": "right span-top"
530
- }, Ne = {
530
+ }, Pe = {
531
531
  "top center": "top span-left, top span-right, bottom center, bottom span-left, bottom span-right",
532
532
  "bottom center": "bottom span-left, bottom span-right, top center, top span-left, top span-right"
533
- }, Pe = "--ui-hover-delay", Fe = /^(\d+(?:\.\d+)?)(ms|s)$/;
533
+ }, Fe = "--ui-hover-delay";
534
534
  // src/components/ui-popup/index.ts
535
- be.define();
536
- export { be as UIPopup };
535
+ xe.define();
536
+ export { xe as UIPopup };
537
537
 
538
538
  //# sourceMappingURL=ui-popup.js.map