spell-ui 0.8.5 → 0.8.7

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 (722) hide show
  1. package/README-components.md +14 -6
  2. package/README-frameworks.md +22 -12
  3. package/README-migrating.md +7 -6
  4. package/README-runtime.md +14 -13
  5. package/README-site.md +11 -11
  6. package/README-themes.md +38 -11
  7. package/README.md +61 -73
  8. package/dist/Dragging-CMZoLEWQ.js +169 -0
  9. package/dist/Dragging-CMZoLEWQ.js.map +1 -0
  10. package/dist/{MarkdownEngine-CbuT9Mjc.js → MarkdownEngine-CW1WGqNp.js} +122 -100
  11. package/dist/MarkdownEngine-CW1WGqNp.js.map +1 -0
  12. package/dist/{PrefStore-CeaTtjTz.js → PrefStore-Qv0e5y04.js} +22 -22
  13. package/dist/PrefStore-Qv0e5y04.js.map +1 -0
  14. package/dist/ScrollingRow-7n7Z-HIE.js +88 -0
  15. package/dist/ScrollingRow-7n7Z-HIE.js.map +1 -0
  16. package/dist/SitePages-CciwREek.js +51 -0
  17. package/dist/SitePages-CciwREek.js.map +1 -0
  18. package/dist/{SlottedItems-Ch0tzzlL.js → SlottedItems-Du3aJwG1.js} +22 -22
  19. package/dist/{SlottedItems-Ch0tzzlL.js.map → SlottedItems-Du3aJwG1.js.map} +1 -1
  20. package/dist/ThemeDraft-B7NPif4d.js +805 -0
  21. package/dist/ThemeDraft-B7NPif4d.js.map +1 -0
  22. package/dist/TreeMeasure-BVJeGb1L.js +42 -0
  23. package/dist/TreeMeasure-BVJeGb1L.js.map +1 -0
  24. package/dist/UIButton-DFEds67r.js +6 -0
  25. package/dist/UIButton-DFEds67r.js.map +1 -0
  26. package/dist/UIInput-BodVbUoQ.js +6 -0
  27. package/dist/UIInput-BodVbUoQ.js.map +1 -0
  28. package/dist/{UIKeys-DJF2TIKE.js → UIKeys-Rh_gUZjP.js} +10 -9
  29. package/dist/UIKeys-Rh_gUZjP.js.map +1 -0
  30. package/dist/UILabel-DgJUBzB_.js +6 -0
  31. package/dist/UILabel-DgJUBzB_.js.map +1 -0
  32. package/dist/UIMenu-zdcAtwTa.js +42 -0
  33. package/dist/UIMenu-zdcAtwTa.js.map +1 -0
  34. package/dist/{UIRuntime-BBuehGly.js → UIRuntime-KH309p5B.js} +398 -207
  35. package/dist/UIRuntime-KH309p5B.js.map +1 -0
  36. package/dist/_spell-element/DOMElement.d.ts +62 -5
  37. package/dist/_spell-element/MoveAndResize.d.ts +75 -0
  38. package/dist/_spell-element/UIComponent.d.ts +42 -0
  39. package/dist/_spell-element/elements.types.d.ts +47 -0
  40. package/dist/_spell-element/index.d.ts +1 -0
  41. package/dist/_spell-element/vocabulary.types.d.ts +34 -2
  42. package/dist/{runtime → _util}/Api.d.ts +14 -4
  43. package/dist/_util/Dragging.d.ts +148 -0
  44. package/dist/_util/ListSelection.d.ts +46 -0
  45. package/dist/{util → _util}/LoadOnce.d.ts +9 -1
  46. package/dist/_util/ReconnectingSocket.d.ts +51 -0
  47. package/dist/_util/diagram/DiagramColumns.d.ts +14 -0
  48. package/dist/_util/diagram/DiagramLayout.d.ts +119 -0
  49. package/dist/_util/diagram/DiagramSVG.d.ts +17 -0
  50. package/dist/_util/dom.d.ts +10 -0
  51. package/dist/_util/fetching.d.ts +92 -0
  52. package/dist/_util/measures/Dimension.d.ts +63 -0
  53. package/dist/_util/measures/MeasureSystem.d.ts +66 -0
  54. package/dist/_util/measures/dimensions.generated.d.ts +16 -0
  55. package/dist/_util/persist/ColorScheme.d.ts +6 -0
  56. package/dist/_util/persist/ServerPlace.d.ts +42 -0
  57. package/dist/_util/persist/WaitedOnPlace.d.ts +27 -0
  58. package/dist/_util/persist/persist.types.d.ts +21 -2
  59. package/dist/_util/timing.d.ts +10 -1
  60. package/dist/api.js +8 -7
  61. package/dist/api.js.map +1 -1
  62. package/dist/components/ComponentDefinitions.d.ts +29 -0
  63. package/dist/components/components.es.d.ts +13 -0
  64. package/dist/components/components.types.d.ts +113 -8
  65. package/dist/components/ui-accordion/UIAccordion.d.ts +1 -0
  66. package/dist/components/ui-accordion/UIAccordion.en.d.ts +1 -0
  67. package/dist/components/ui-action/UIAction.en.d.ts +5 -1
  68. package/dist/components/ui-ad/UIAd.d.ts +1 -0
  69. package/dist/components/ui-ad/UIAd.en.d.ts +1 -0
  70. package/dist/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
  71. package/dist/components/ui-breadcrumbs/UIBreadcrumb.en.d.ts +1 -0
  72. package/dist/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
  73. package/dist/components/ui-breadcrumbs/UIBreadcrumbs.en.d.ts +1 -0
  74. package/dist/components/ui-button/UIButton.d.ts +8 -3
  75. package/dist/components/ui-button/UIButton.en.d.ts +9 -4
  76. package/dist/components/ui-button/UIButton.es.d.ts +6 -0
  77. package/dist/components/ui-button/UIButton.fallback.d.ts +8 -3
  78. package/dist/components/ui-button/UIButtons.d.ts +1 -0
  79. package/dist/components/ui-button/UIButtons.en.d.ts +1 -0
  80. package/dist/components/ui-button/UIOr.d.ts +1 -0
  81. package/dist/components/ui-button/UIOr.en.d.ts +1 -0
  82. package/dist/components/ui-calendar/UICalendar.d.ts +6 -0
  83. package/dist/components/ui-calendar/UICalendar.en.d.ts +6 -0
  84. package/dist/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
  85. package/dist/components/ui-card/CardClicks.d.ts +40 -0
  86. package/dist/components/ui-card/UICard.d.ts +41 -0
  87. package/dist/components/ui-card/UICard.en.d.ts +49 -0
  88. package/dist/components/ui-card/UICard.es.d.ts +1 -0
  89. package/dist/components/ui-card/UICards.d.ts +31 -0
  90. package/dist/components/ui-card/UICards.en.d.ts +31 -0
  91. package/dist/components/ui-card/UICards.es.d.ts +8 -0
  92. package/dist/components/ui-checkbox/CheckControl.d.ts +7 -0
  93. package/dist/components/ui-checkbox/UICheckbox.d.ts +7 -0
  94. package/dist/components/ui-checkbox/UICheckbox.en.d.ts +7 -0
  95. package/dist/components/ui-checkbox/UICheckbox.es.d.ts +1 -0
  96. package/dist/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
  97. package/dist/components/ui-checkbox/UICheckbox.types.d.ts +5 -0
  98. package/dist/components/ui-checkbox/UIRadio.d.ts +8 -0
  99. package/dist/components/ui-checkbox/UIRadio.en.d.ts +6 -0
  100. package/dist/components/ui-code/UICode.en.d.ts +1 -0
  101. package/dist/components/ui-comment/UIComment.d.ts +1 -0
  102. package/dist/components/ui-comment/UIComment.en.d.ts +1 -0
  103. package/dist/components/ui-comment/UIComments.d.ts +1 -0
  104. package/dist/components/ui-comment/UIComments.en.d.ts +1 -0
  105. package/dist/components/ui-components/PackHotSwap.d.ts +17 -1
  106. package/dist/components/ui-components/UIComponents.d.ts +1 -0
  107. package/dist/components/ui-components/UIComponents.en.d.ts +1 -0
  108. package/dist/components/ui-container/UIContainer.d.ts +11 -0
  109. package/dist/components/ui-container/UIContainer.en.d.ts +7 -0
  110. package/dist/components/ui-container/UIContainer.es.d.ts +1 -0
  111. package/dist/components/ui-diagram/UIDiagram.d.ts +268 -0
  112. package/dist/components/ui-diagram/UIDiagram.en.d.ts +106 -0
  113. package/dist/components/ui-diagram/UIDiagram.es.d.ts +37 -0
  114. package/dist/components/ui-diagram/UIDiagramNode.d.ts +98 -0
  115. package/dist/components/ui-diagram/UIDiagramNode.en.d.ts +38 -0
  116. package/dist/components/ui-diagram/UIDiagramNode.es.d.ts +16 -0
  117. package/dist/components/ui-diagram/index.d.ts +8 -0
  118. package/dist/components/ui-dimension/UIDimension.d.ts +81 -0
  119. package/dist/components/ui-dimension/UIDimension.en.d.ts +54 -0
  120. package/dist/components/ui-dimension/UIDimension.es.d.ts +22 -0
  121. package/dist/components/ui-dimension/index.d.ts +2 -0
  122. package/dist/components/ui-dimmer/UIDimmer.d.ts +6 -1
  123. package/dist/components/ui-dimmer/UIDimmer.en.d.ts +1 -0
  124. package/dist/components/ui-dimmer/UIDimmer.es.d.ts +1 -1
  125. package/dist/components/ui-divider/UIDivider.d.ts +2 -0
  126. package/dist/components/ui-divider/UIDivider.en.d.ts +2 -0
  127. package/dist/components/ui-divider/UIDivider.es.d.ts +1 -0
  128. package/dist/components/ui-dropdown/UIDropdown.d.ts +6 -0
  129. package/dist/components/ui-dropdown/UIDropdown.en.d.ts +6 -0
  130. package/dist/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
  131. package/dist/components/ui-embed/UIEmbed.d.ts +1 -0
  132. package/dist/components/ui-embed/UIEmbed.en.d.ts +1 -0
  133. package/dist/components/ui-emoji/UIEmoji.d.ts +1 -0
  134. package/dist/components/ui-emoji/UIEmoji.en.d.ts +1 -0
  135. package/dist/components/ui-example/UIExample.en.d.ts +4 -2
  136. package/dist/components/ui-example/UIExample.es.d.ts +3 -2
  137. package/dist/components/ui-feed/UIFeed.d.ts +1 -0
  138. package/dist/components/ui-feed/UIFeed.en.d.ts +1 -0
  139. package/dist/components/ui-feed/UIFeedEvent.d.ts +1 -0
  140. package/dist/components/ui-feed/UIFeedEvent.en.d.ts +1 -0
  141. package/dist/components/ui-flag/UIFlag.d.ts +1 -0
  142. package/dist/components/ui-flag/UIFlag.en.d.ts +1 -0
  143. package/dist/components/ui-flyout/UIFlyout.d.ts +1 -0
  144. package/dist/components/ui-flyout/UIFlyout.en.d.ts +1 -0
  145. package/dist/components/ui-form/FormBinding.d.ts +13 -1
  146. package/dist/components/ui-form/FormFields.d.ts +4 -4
  147. package/dist/components/ui-form/UIField.d.ts +30 -3
  148. package/dist/components/ui-form/UIField.en.d.ts +9 -0
  149. package/dist/components/ui-form/UIField.es.d.ts +6 -0
  150. package/dist/components/ui-form/UIFields.d.ts +1 -0
  151. package/dist/components/ui-form/UIFields.en.d.ts +1 -0
  152. package/dist/components/ui-form/UIForm.d.ts +15 -0
  153. package/dist/components/ui-form/UIForm.en.d.ts +6 -0
  154. package/dist/components/ui-form/UIRepeat.d.ts +1 -0
  155. package/dist/components/ui-form/UIRepeat.en.d.ts +1 -0
  156. package/dist/components/ui-form/index.d.ts +2 -1
  157. package/dist/components/ui-grid/UIColumn.d.ts +1 -0
  158. package/dist/components/ui-grid/UIColumn.en.d.ts +1 -0
  159. package/dist/components/ui-grid/UIGrid.d.ts +1 -0
  160. package/dist/components/ui-grid/UIGrid.en.d.ts +1 -0
  161. package/dist/components/ui-grid/UIRow.d.ts +1 -0
  162. package/dist/components/ui-grid/UIRow.en.d.ts +1 -0
  163. package/dist/components/ui-icon/UIIcon.d.ts +3 -2
  164. package/dist/components/ui-icon/UIIcon.en.d.ts +3 -2
  165. package/dist/components/ui-icon/UIIcons.d.ts +1 -0
  166. package/dist/components/ui-icon/UIIcons.en.d.ts +1 -0
  167. package/dist/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
  168. package/dist/components/ui-icon-picker/UIIconPicker.en.d.ts +6 -0
  169. package/dist/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
  170. package/dist/components/ui-image/UIImage.d.ts +34 -0
  171. package/dist/components/ui-image/UIImage.en.d.ts +23 -0
  172. package/dist/components/ui-image/UIImage.es.d.ts +2 -0
  173. package/dist/components/ui-image/UIImages.d.ts +1 -0
  174. package/dist/components/ui-image/UIImages.en.d.ts +1 -0
  175. package/dist/components/ui-include/UIInclude.d.ts +1 -0
  176. package/dist/components/ui-include/UIInclude.en.d.ts +1 -0
  177. package/dist/components/ui-input/TextControl.d.ts +7 -0
  178. package/dist/components/ui-input/UIInput.d.ts +22 -3
  179. package/dist/components/ui-input/UIInput.en.d.ts +9 -2
  180. package/dist/components/ui-input/UIInput.es.d.ts +2 -0
  181. package/dist/components/ui-input/UIInput.fallback.d.ts +9 -2
  182. package/dist/components/ui-input/UITextarea.d.ts +20 -0
  183. package/dist/components/ui-input/UITextarea.en.d.ts +15 -0
  184. package/dist/components/ui-input/UITextarea.es.d.ts +4 -0
  185. package/dist/components/ui-item/UIItem.d.ts +27 -4
  186. package/dist/components/ui-item/UIItem.en.d.ts +5 -1
  187. package/dist/components/ui-items/UIItems.d.ts +1 -0
  188. package/dist/components/ui-items/UIItems.en.d.ts +1 -0
  189. package/dist/components/ui-json/JsonChild.d.ts +30 -0
  190. package/dist/components/ui-json/UIJson.d.ts +128 -0
  191. package/dist/components/ui-json/UIJson.en.d.ts +71 -0
  192. package/dist/components/ui-json/UIJson.es.d.ts +12 -0
  193. package/dist/components/ui-json/index.d.ts +3 -0
  194. package/dist/components/ui-keys/UIKeys.d.ts +1 -0
  195. package/dist/components/ui-keys/UIKeys.en.d.ts +1 -0
  196. package/dist/components/ui-label/UILabel.d.ts +2 -0
  197. package/dist/components/ui-label/UILabel.en.d.ts +2 -0
  198. package/dist/components/ui-label/UILabel.es.d.ts +1 -0
  199. package/dist/components/ui-label/UILabels.d.ts +1 -0
  200. package/dist/components/ui-label/UILabels.en.d.ts +1 -0
  201. package/dist/components/ui-list/UIList.d.ts +2 -0
  202. package/dist/components/ui-list/UIList.en.d.ts +2 -0
  203. package/dist/components/ui-list/UIList.es.d.ts +1 -0
  204. package/dist/components/ui-loader/UILoader.d.ts +1 -0
  205. package/dist/components/ui-loader/UILoader.en.d.ts +1 -0
  206. package/dist/components/ui-markdown/MarkdownBox.d.ts +143 -0
  207. package/dist/components/ui-markdown/MarkdownEngine.d.ts +14 -2
  208. package/dist/components/ui-markdown/MarkdownFormats.d.ts +95 -0
  209. package/dist/components/ui-markdown/MarkdownSource.d.ts +57 -0
  210. package/dist/components/ui-markdown/UIMarkdown.d.ts +126 -6
  211. package/dist/components/ui-markdown/UIMarkdown.en.d.ts +111 -8
  212. package/dist/components/ui-markdown/UIMarkdown.es.d.ts +29 -1
  213. package/dist/components/ui-markdown/UIMarkdown.types.d.ts +26 -0
  214. package/dist/components/ui-menu/ScrollingRow.d.ts +79 -0
  215. package/dist/components/ui-menu/TitleFit.d.ts +3 -0
  216. package/dist/components/ui-menu/UIMenu.d.ts +97 -4
  217. package/dist/components/ui-menu/UIMenu.en.d.ts +50 -1
  218. package/dist/components/ui-menu/UIMenu.es.d.ts +4 -0
  219. package/dist/components/ui-message/UIMessage.d.ts +2 -0
  220. package/dist/components/ui-message/UIMessage.en.d.ts +2 -0
  221. package/dist/components/ui-message/UIMessage.es.d.ts +1 -0
  222. package/dist/components/ui-modal/UIModal.d.ts +1 -0
  223. package/dist/components/ui-modal/UIModal.en.d.ts +1 -0
  224. package/dist/components/ui-nag/UINag.d.ts +1 -0
  225. package/dist/components/ui-nag/UINag.en.d.ts +1 -0
  226. package/dist/components/ui-page/UIPage.d.ts +15 -0
  227. package/dist/components/ui-page/UIPage.en.d.ts +15 -0
  228. package/dist/components/ui-page/UIPage.es.d.ts +1 -0
  229. package/dist/components/ui-panel/UIPanel.d.ts +6 -0
  230. package/dist/components/ui-panel/UIPanel.en.d.ts +33 -20
  231. package/dist/components/ui-parts/UIActions.d.ts +1 -0
  232. package/dist/components/ui-parts/UIActions.en.d.ts +1 -0
  233. package/dist/components/ui-parts/UIAuthor.d.ts +1 -0
  234. package/dist/components/ui-parts/UIAuthor.en.d.ts +1 -0
  235. package/dist/components/ui-parts/UIAvatar.d.ts +1 -0
  236. package/dist/components/ui-parts/UIAvatar.en.d.ts +1 -0
  237. package/dist/components/ui-parts/UIContent.d.ts +1 -0
  238. package/dist/components/ui-parts/UIContent.en.d.ts +1 -0
  239. package/dist/components/ui-parts/UIDate.d.ts +1 -0
  240. package/dist/components/ui-parts/UIDate.en.d.ts +1 -0
  241. package/dist/components/ui-parts/UIDescription.d.ts +1 -0
  242. package/dist/components/ui-parts/UIDescription.en.d.ts +1 -0
  243. package/dist/components/ui-parts/UIDetail.d.ts +1 -0
  244. package/dist/components/ui-parts/UIDetail.en.d.ts +1 -0
  245. package/dist/components/ui-parts/UIExtra.d.ts +1 -0
  246. package/dist/components/ui-parts/UIExtra.en.d.ts +1 -0
  247. package/dist/components/ui-parts/UIHeader.d.ts +3 -1
  248. package/dist/components/ui-parts/UIHeader.en.d.ts +3 -1
  249. package/dist/components/ui-parts/UIMeta.d.ts +1 -0
  250. package/dist/components/ui-parts/UIMeta.en.d.ts +1 -0
  251. package/dist/components/ui-parts/UIParts.types.d.ts +15 -1
  252. package/dist/components/ui-parts/UISummary.d.ts +1 -0
  253. package/dist/components/ui-parts/UISummary.en.d.ts +1 -0
  254. package/dist/components/ui-parts/UITitle.d.ts +1 -0
  255. package/dist/components/ui-parts/UITitle.en.d.ts +1 -0
  256. package/dist/components/ui-parts/UIValue.d.ts +1 -0
  257. package/dist/components/ui-parts/UIValue.en.d.ts +1 -0
  258. package/dist/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
  259. package/dist/components/ui-placeholder/UIPlaceholder.en.d.ts +1 -0
  260. package/dist/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
  261. package/dist/components/ui-placeholder/UIPlaceholderHeader.en.d.ts +1 -0
  262. package/dist/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
  263. package/dist/components/ui-placeholder/UIPlaceholderImage.en.d.ts +1 -0
  264. package/dist/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
  265. package/dist/components/ui-placeholder/UIPlaceholderLine.en.d.ts +1 -0
  266. package/dist/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
  267. package/dist/components/ui-placeholder/UIPlaceholderParagraph.en.d.ts +1 -0
  268. package/dist/components/ui-popup/UIPopup.d.ts +30 -3
  269. package/dist/components/ui-popup/UIPopup.en.d.ts +7 -0
  270. package/dist/components/ui-popup/UIPopup.es.d.ts +1 -0
  271. package/dist/components/ui-progress/UIProgress.d.ts +2 -0
  272. package/dist/components/ui-progress/UIProgress.en.d.ts +2 -0
  273. package/dist/components/ui-progress/UIProgress.es.d.ts +1 -0
  274. package/dist/components/ui-property-editor/UIProperty.d.ts +132 -5
  275. package/dist/components/ui-property-editor/UIProperty.en.d.ts +11 -44
  276. package/dist/components/ui-property-editor/UIProperty.es.d.ts +4 -0
  277. package/dist/components/ui-property-editor/UIPropertyEditor.d.ts +38 -0
  278. package/dist/components/ui-property-editor/UIPropertyEditor.en.d.ts +1 -0
  279. package/dist/components/ui-property-editor/UIPropertyEditor.es.d.ts +4 -0
  280. package/dist/components/ui-property-editor/UIPropertyEditor.types.d.ts +33 -0
  281. package/dist/components/ui-property-editor/UIPropertyGroup.d.ts +12 -0
  282. package/dist/components/ui-property-editor/UIPropertyGroup.en.d.ts +2 -0
  283. package/dist/components/ui-property-editor/UIPropertyGroup.es.d.ts +9 -0
  284. package/dist/components/ui-property-editor/index.d.ts +1 -0
  285. package/dist/components/ui-quote/UIQuote.d.ts +1 -0
  286. package/dist/components/ui-quote/UIQuote.en.d.ts +1 -0
  287. package/dist/components/ui-rail/UIRail.d.ts +1 -0
  288. package/dist/components/ui-rail/UIRail.en.d.ts +1 -0
  289. package/dist/components/ui-rating/UIRating.d.ts +6 -0
  290. package/dist/components/ui-rating/UIRating.en.d.ts +6 -0
  291. package/dist/components/ui-rating/UIRating.fallback.d.ts +6 -0
  292. package/dist/components/ui-reveal/UIReveal.d.ts +1 -0
  293. package/dist/components/ui-reveal/UIReveal.en.d.ts +1 -0
  294. package/dist/components/ui-root/UIRoot.d.ts +18 -3
  295. package/dist/components/ui-root/UIRoot.en.d.ts +15 -0
  296. package/dist/components/ui-root/UIRoot.es.d.ts +1 -0
  297. package/dist/components/ui-search/UISearch.d.ts +48 -7
  298. package/dist/components/ui-search/UISearch.en.d.ts +13 -1
  299. package/dist/components/ui-search/UISearch.es.d.ts +1 -0
  300. package/dist/components/ui-search/UISearch.fallback.d.ts +13 -1
  301. package/dist/components/ui-section/UISection.d.ts +30 -1
  302. package/dist/components/ui-section/UISection.en.d.ts +10 -0
  303. package/dist/components/ui-section/UISection.es.d.ts +1 -0
  304. package/dist/components/ui-section/UISections.d.ts +1 -0
  305. package/dist/components/ui-section/UISections.en.d.ts +1 -0
  306. package/dist/components/ui-segment/UISegment.d.ts +2 -0
  307. package/dist/components/ui-segment/UISegment.en.d.ts +2 -0
  308. package/dist/components/ui-segment/UISegment.es.d.ts +1 -0
  309. package/dist/components/ui-segment/UISegments.d.ts +1 -0
  310. package/dist/components/ui-segment/UISegments.en.d.ts +1 -0
  311. package/dist/components/ui-select/UISelect.d.ts +6 -0
  312. package/dist/components/ui-select/UISelect.en.d.ts +6 -0
  313. package/dist/components/ui-select/UISelect.fallback.d.ts +6 -0
  314. package/dist/components/ui-shape/UIShape.d.ts +23 -2
  315. package/dist/components/ui-shape/UIShape.en.d.ts +8 -0
  316. package/dist/components/ui-shape/UIShape.es.d.ts +1 -0
  317. package/dist/components/ui-shape/UISide.d.ts +4 -0
  318. package/dist/components/ui-shape/UISide.en.d.ts +4 -0
  319. package/dist/components/ui-sidebar/UIPushable.d.ts +1 -0
  320. package/dist/components/ui-sidebar/UIPushable.en.d.ts +1 -0
  321. package/dist/components/ui-sidebar/UIPusher.d.ts +1 -0
  322. package/dist/components/ui-sidebar/UIPusher.en.d.ts +1 -0
  323. package/dist/components/ui-sidebar/UISidebar.d.ts +1 -0
  324. package/dist/components/ui-sidebar/UISidebar.en.d.ts +1 -0
  325. package/dist/components/ui-sides/UISides.d.ts +209 -0
  326. package/dist/components/ui-sides/UISides.en.d.ts +122 -0
  327. package/dist/components/ui-sides/UISides.es.d.ts +30 -0
  328. package/dist/components/ui-sides/UISides.fallback.d.ts +134 -0
  329. package/dist/components/ui-sides/index.d.ts +2 -0
  330. package/dist/components/ui-site-nav/SitePages.d.ts +53 -0
  331. package/dist/components/ui-site-nav/UISiteNav.d.ts +207 -0
  332. package/dist/components/ui-site-nav/UISiteNav.en.d.ts +87 -0
  333. package/dist/components/ui-site-nav/UISiteNav.es.d.ts +29 -0
  334. package/dist/components/ui-site-nav/index.d.ts +1 -0
  335. package/dist/components/ui-site-tabs/UISiteTabs.d.ts +126 -0
  336. package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +49 -0
  337. package/dist/components/ui-site-tabs/UISiteTabs.es.d.ts +18 -0
  338. package/dist/components/ui-site-tabs/index.d.ts +1 -0
  339. package/dist/components/ui-slider/UISlider.d.ts +7 -0
  340. package/dist/components/ui-slider/UISlider.en.d.ts +7 -0
  341. package/dist/components/ui-slider/UISlider.es.d.ts +1 -0
  342. package/dist/components/ui-slider/UISlider.fallback.d.ts +7 -0
  343. package/dist/components/ui-space/UISpace.d.ts +1 -0
  344. package/dist/components/ui-space/UISpace.en.d.ts +1 -0
  345. package/dist/components/ui-split-panel/UISplitPanel.d.ts +175 -0
  346. package/dist/components/ui-split-panel/UISplitPanel.en.d.ts +74 -0
  347. package/dist/components/ui-split-panel/UISplitPanel.es.d.ts +25 -0
  348. package/dist/components/ui-split-panel/index.d.ts +2 -0
  349. package/dist/components/ui-stack/UIStack.d.ts +31 -5
  350. package/dist/components/ui-stack/UIStack.en.d.ts +15 -3
  351. package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
  352. package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
  353. package/dist/components/ui-statistic/UIStatistics.d.ts +1 -0
  354. package/dist/components/ui-statistic/UIStatistics.en.d.ts +1 -0
  355. package/dist/components/ui-step/UIStep.d.ts +1 -0
  356. package/dist/components/ui-step/UIStep.en.d.ts +1 -0
  357. package/dist/components/ui-step/UISteps.d.ts +1 -0
  358. package/dist/components/ui-step/UISteps.en.d.ts +1 -0
  359. package/dist/components/ui-sticky/UISticky.d.ts +4 -0
  360. package/dist/components/ui-sticky/UISticky.en.d.ts +1 -0
  361. package/dist/components/ui-tab/UITab.d.ts +8 -0
  362. package/dist/components/ui-tab/UITab.en.d.ts +1 -0
  363. package/dist/components/ui-tab/UITabs.d.ts +107 -16
  364. package/dist/components/ui-tab/UITabs.en.d.ts +40 -1
  365. package/dist/components/ui-tab/UITabs.es.d.ts +4 -0
  366. package/dist/components/ui-table/TableEditing.d.ts +77 -0
  367. package/dist/components/ui-table/UICell.d.ts +1 -0
  368. package/dist/components/ui-table/UICell.en.d.ts +1 -0
  369. package/dist/components/ui-table/UITable.d.ts +145 -5
  370. package/dist/components/ui-table/UITable.en.d.ts +19 -0
  371. package/dist/components/ui-table/UITable.es.d.ts +3 -0
  372. package/dist/components/ui-terms/UITerm.d.ts +1 -0
  373. package/dist/components/ui-terms/UITerm.en.d.ts +1 -0
  374. package/dist/components/ui-terms/UITerms.d.ts +1 -0
  375. package/dist/components/ui-terms/UITerms.en.d.ts +1 -0
  376. package/dist/components/ui-text/UILink.d.ts +11 -0
  377. package/dist/components/ui-text/UILink.en.d.ts +4 -0
  378. package/dist/components/ui-text/UIText.d.ts +7 -0
  379. package/dist/components/ui-text/UIText.en.d.ts +7 -0
  380. package/dist/components/ui-text/UIText.es.d.ts +2 -0
  381. package/dist/components/ui-theme-editor/SavedTheme.d.ts +55 -43
  382. package/dist/components/ui-theme-editor/ThemeDraft.d.ts +15 -0
  383. package/dist/components/ui-theme-editor/UIColorChip.d.ts +1 -0
  384. package/dist/components/ui-theme-editor/UIColorChip.en.d.ts +1 -0
  385. package/dist/components/ui-theme-editor/UIThemeEditor.d.ts +157 -26
  386. package/dist/components/ui-theme-editor/UIThemeEditor.en.d.ts +79 -6
  387. package/dist/components/ui-theme-editor/UIThemeEditor.es.d.ts +20 -2
  388. package/dist/components/ui-theme-editor/UIThemeEditor.types.d.ts +0 -2
  389. package/dist/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
  390. package/dist/components/ui-theme-editor/UIThemeToken.en.d.ts +1 -0
  391. package/dist/components/ui-theme-menu/HueDropdown.d.ts +47 -0
  392. package/dist/components/ui-theme-menu/ThemeMenu.d.ts +18 -7
  393. package/dist/components/ui-theme-menu/ThemePreference.d.ts +145 -36
  394. package/dist/components/ui-theme-menu/UIThemeMenu.d.ts +118 -7
  395. package/dist/components/ui-theme-menu/UIThemeMenu.en.d.ts +82 -2
  396. package/dist/components/ui-theme-menu/UIThemeMenu.es.d.ts +21 -1
  397. package/dist/components/ui-theme-menu/UIThemeMenu.types.d.ts +36 -8
  398. package/dist/components/ui-theme-menu/index.d.ts +2 -1
  399. package/dist/components/ui-toast/UIToast.d.ts +1 -0
  400. package/dist/components/ui-toast/UIToast.en.d.ts +1 -0
  401. package/dist/components/ui-toc/UIToc.d.ts +1 -0
  402. package/dist/components/ui-toc/UIToc.en.d.ts +1 -0
  403. package/dist/components/ui-toolbar/UIToolbar.d.ts +13 -10
  404. package/dist/components/ui-toolbar/UIToolbar.en.d.ts +138 -84
  405. package/dist/components/ui-toolbar/UIToolbar.es.d.ts +2 -0
  406. package/dist/components/ui-transition/UITransition.d.ts +1 -0
  407. package/dist/components/ui-transition/UITransition.en.d.ts +1 -0
  408. package/dist/components/ui-tree/UITree.d.ts +162 -0
  409. package/dist/components/ui-tree/UITree.en.d.ts +88 -0
  410. package/dist/components/ui-tree/UITree.es.d.ts +35 -0
  411. package/dist/components/ui-tree/UITreeItem.d.ts +204 -0
  412. package/dist/components/ui-tree/UITreeItem.en.d.ts +142 -0
  413. package/dist/components/ui-tree/UITreeItem.es.d.ts +32 -0
  414. package/dist/components/ui-tree/index.d.ts +3 -0
  415. package/dist/components/ui-tree-diagram/TreeData.d.ts +3 -12
  416. package/dist/components/ui-tree-diagram/TreeLayout.d.ts +54 -21
  417. package/dist/components/ui-tree-diagram/TreeMeasure.d.ts +36 -0
  418. package/dist/components/ui-tree-diagram/UITreeDiagram.d.ts +152 -27
  419. package/dist/components/ui-tree-diagram/UITreeDiagram.en.d.ts +47 -7
  420. package/dist/components/ui-tree-diagram/UITreeDiagram.es.d.ts +12 -1
  421. package/dist/components/ui-tree-diagram/UITreeDiagram.types.d.ts +66 -21
  422. package/dist/components/ui-tree-diagram/UITreeNode.d.ts +148 -0
  423. package/dist/components/ui-tree-diagram/UITreeNode.en.d.ts +69 -0
  424. package/dist/components/ui-tree-diagram/UITreeNode.es.d.ts +21 -0
  425. package/dist/components/ui-tree-diagram/index.d.ts +4 -2
  426. package/dist/components/ui-video/UIAudio.d.ts +1 -0
  427. package/dist/components/ui-video/UIAudio.en.d.ts +1 -0
  428. package/dist/components/ui-video/UIVideo.d.ts +1 -0
  429. package/dist/components/ui-video/UIVideo.en.d.ts +1 -0
  430. package/dist/components/ui-visibility/UIVisibility.d.ts +1 -0
  431. package/dist/components/ui-visibility/UIVisibility.en.d.ts +1 -0
  432. package/dist/components/ui-zoom/UIZoom.d.ts +1 -0
  433. package/dist/components/ui-zoom/UIZoom.en.d.ts +1 -0
  434. package/dist/{components.es-DmLzT-Bq.js → components.es-BOa_7gFF.js} +498 -109
  435. package/dist/components.es-BOa_7gFF.js.map +1 -0
  436. package/dist/core.d.ts +3 -1
  437. package/dist/core.js +1082 -511
  438. package/dist/core.js.map +1 -1
  439. package/dist/crisp-VfYZlTph.js +6 -0
  440. package/dist/{crisp-CoZRRDuQ.js.map → crisp-VfYZlTph.js.map} +1 -1
  441. package/dist/docs-components/index.d.ts +1 -0
  442. package/dist/docs-components/ui-docs-index/UIDocsIndex.d.ts +89 -0
  443. package/dist/docs-components/ui-docs-index/UIDocsIndex.en.d.ts +43 -0
  444. package/dist/docs-components/ui-docs-index/index.d.ts +2 -0
  445. package/dist/docs-components/ui-docs-nav/UIDocsNav.d.ts +54 -87
  446. package/dist/docs-components/ui-docs-nav/UIDocsNav.types.d.ts +2 -29
  447. package/dist/docs-components/ui-docs-search/SearchIndex.d.ts +8 -2
  448. package/dist/docs-components/ui-docs-search/UIDocsSearch.d.ts +10 -0
  449. package/dist/docs-components/ui-docs-search/UIDocsSearch.en.d.ts +5 -0
  450. package/dist/elements/AddressParameter.d.ts +87 -0
  451. package/dist/elements/DOMFormControl.d.ts +5 -0
  452. package/dist/elements/FormComponent.d.ts +32 -0
  453. package/dist/elements/LoadableBody.d.ts +6 -1
  454. package/dist/elements/LoadableComponent.d.ts +10 -1
  455. package/dist/elements/RootSettings.d.ts +43 -6
  456. package/dist/elements/SpellUISettings.d.ts +1 -0
  457. package/dist/elements/StickyWatch.d.ts +20 -0
  458. package/dist/elements/elements.types.d.ts +15 -0
  459. package/dist/elements/index.d.ts +2 -0
  460. package/dist/forms.js +93 -63
  461. package/dist/forms.js.map +1 -1
  462. package/dist/fruity-BRVlgJZd.js +6 -0
  463. package/dist/fruity-BRVlgJZd.js.map +1 -0
  464. package/dist/{fruity.theme-BJcMiPl1.js → fruity.theme-CbC7Jyvk.js} +2 -2
  465. package/dist/fruity.theme-CbC7Jyvk.js.map +1 -0
  466. package/dist/glass-x9tbbwVq.js +6 -0
  467. package/dist/glass-x9tbbwVq.js.map +1 -0
  468. package/dist/glass.theme-24wY2wH9.js +6 -0
  469. package/dist/glass.theme-24wY2wH9.js.map +1 -0
  470. package/dist/hot.js +536 -26
  471. package/dist/hot.js.map +1 -1
  472. package/dist/index.d.ts +8 -0
  473. package/dist/index.js +91 -81
  474. package/dist/jsx.d.ts +21149 -10377
  475. package/dist/matrix-QY2gWbJ0.js +6 -0
  476. package/dist/{matrix-CqA59hiF.js.map → matrix-QY2gWbJ0.js.map} +1 -1
  477. package/dist/{matrix.theme-jqQZjcq3.js → matrix.theme-_8xtwhDq.js} +2 -2
  478. package/dist/matrix.theme-_8xtwhDq.js.map +1 -0
  479. package/dist/midnight-BxlTQSfw.js +6 -0
  480. package/dist/{midnight-BnoVOrhC.js.map → midnight-BxlTQSfw.js.map} +1 -1
  481. package/dist/mockup-83ELBuVr.js +6 -0
  482. package/dist/mockup-83ELBuVr.js.map +1 -0
  483. package/dist/mockup.theme-DmpBgGBl.js +6 -0
  484. package/dist/mockup.theme-DmpBgGBl.js.map +1 -0
  485. package/dist/paper-M61nUilz.js +6 -0
  486. package/dist/{paper-CynH8ZuT.js.map → paper-M61nUilz.js.map} +1 -1
  487. package/dist/persist.types-D2m6wD-S.js +9 -0
  488. package/dist/persist.types-D2m6wD-S.js.map +1 -0
  489. package/dist/pop-CxXfytjk.js +6 -0
  490. package/dist/{pop-D2i9V_rG.js.map → pop-CxXfytjk.js.map} +1 -1
  491. package/dist/runtime/DataTooltips.d.ts +75 -0
  492. package/dist/runtime/PropertyControls.d.ts +15 -1
  493. package/dist/runtime/Sources.d.ts +16 -4
  494. package/dist/runtime/Styles.d.ts +11 -0
  495. package/dist/runtime/Themes.d.ts +10 -4
  496. package/dist/runtime/UIRuntime.d.ts +4 -1
  497. package/dist/runtime/index.d.ts +1 -1
  498. package/dist/runtime/runtime.types.d.ts +18 -85
  499. package/dist/spell-By5Y3jKP.js +6 -0
  500. package/dist/{spell-BFtLICm7.js.map → spell-By5Y3jKP.js.map} +1 -1
  501. package/dist/{spell.theme-B7AU7SQX.js → spell.theme-DxGj7qHx.js} +2 -2
  502. package/dist/spell.theme-DxGj7qHx.js.map +1 -0
  503. package/dist/styles/CodeThemeFile.d.ts +73 -0
  504. package/dist/styles/StyleGenerator.d.ts +6 -0
  505. package/dist/styles/styles.en.d.ts +141 -3
  506. package/dist/styles/styles.types.d.ts +2 -0
  507. package/dist/{styles.en-RLpYiO5_.js → styles.en-CUUxNwHo.js} +71 -14
  508. package/dist/styles.en-CUUxNwHo.js.map +1 -0
  509. package/dist/styles.js +13 -13
  510. package/dist/styles.js.map +1 -1
  511. package/dist/ui-accordion.js +54 -53
  512. package/dist/ui-accordion.js.map +1 -1
  513. package/dist/ui-action.js +20 -19
  514. package/dist/ui-action.js.map +1 -1
  515. package/dist/ui-ad.js +5 -4
  516. package/dist/ui-ad.js.map +1 -1
  517. package/dist/ui-breadcrumbs.js +15 -13
  518. package/dist/ui-breadcrumbs.js.map +1 -1
  519. package/dist/ui-button.js +132 -125
  520. package/dist/ui-button.js.map +1 -1
  521. package/dist/ui-calendar.js +208 -206
  522. package/dist/ui-calendar.js.map +1 -1
  523. package/dist/ui-card.js +260 -98
  524. package/dist/ui-card.js.map +1 -1
  525. package/dist/ui-checkbox.js +95 -81
  526. package/dist/ui-checkbox.js.map +1 -1
  527. package/dist/ui-code.js +25 -24
  528. package/dist/ui-code.js.map +1 -1
  529. package/dist/ui-comment.js +14 -12
  530. package/dist/ui-comment.js.map +1 -1
  531. package/dist/ui-components.js +7 -6
  532. package/dist/ui-components.js.map +1 -1
  533. package/dist/ui-container.js +24 -12
  534. package/dist/ui-container.js.map +1 -1
  535. package/dist/ui-diagram.js +1328 -0
  536. package/dist/ui-diagram.js.map +1 -0
  537. package/dist/ui-dimension.js +779 -0
  538. package/dist/ui-dimension.js.map +1 -0
  539. package/dist/ui-dimmer.js +36 -34
  540. package/dist/ui-dimmer.js.map +1 -1
  541. package/dist/ui-divider.js +7 -5
  542. package/dist/ui-divider.js.map +1 -1
  543. package/dist/ui-dropdown.js +107 -105
  544. package/dist/ui-dropdown.js.map +1 -1
  545. package/dist/ui-embed.js +36 -35
  546. package/dist/ui-embed.js.map +1 -1
  547. package/dist/ui-emoji.js +10 -9
  548. package/dist/ui-emoji.js.map +1 -1
  549. package/dist/ui-example.js +63 -61
  550. package/dist/ui-example.js.map +1 -1
  551. package/dist/ui-feed.js +12 -10
  552. package/dist/ui-feed.js.map +1 -1
  553. package/dist/ui-flag.js +10 -9
  554. package/dist/ui-flag.js.map +1 -1
  555. package/dist/ui-flyout.js +7 -6
  556. package/dist/ui-flyout.js.map +1 -1
  557. package/dist/ui-form.js +244 -162
  558. package/dist/ui-form.js.map +1 -1
  559. package/dist/ui-grid.js +21 -18
  560. package/dist/ui-grid.js.map +1 -1
  561. package/dist/ui-icon-picker.js +46 -44
  562. package/dist/ui-icon-picker.js.map +1 -1
  563. package/dist/ui-icon.js +17 -14
  564. package/dist/ui-icon.js.map +1 -1
  565. package/dist/ui-image.js +93 -55
  566. package/dist/ui-image.js.map +1 -1
  567. package/dist/ui-include.js +18 -17
  568. package/dist/ui-include.js.map +1 -1
  569. package/dist/ui-input.js +154 -112
  570. package/dist/ui-input.js.map +1 -1
  571. package/dist/ui-item.js +152 -102
  572. package/dist/ui-item.js.map +1 -1
  573. package/dist/ui-items.js +9 -8
  574. package/dist/ui-items.js.map +1 -1
  575. package/dist/ui-json.js +115 -0
  576. package/dist/ui-json.js.map +1 -0
  577. package/dist/ui-keys.js +1 -1
  578. package/dist/ui-label.js +18 -15
  579. package/dist/ui-label.js.map +1 -1
  580. package/dist/ui-list.js +7 -5
  581. package/dist/ui-list.js.map +1 -1
  582. package/dist/ui-loader.js +7 -6
  583. package/dist/ui-loader.js.map +1 -1
  584. package/dist/ui-markdown.js +975 -83
  585. package/dist/ui-markdown.js.map +1 -1
  586. package/dist/ui-menu.js +329 -196
  587. package/dist/ui-menu.js.map +1 -1
  588. package/dist/ui-message.js +20 -18
  589. package/dist/ui-message.js.map +1 -1
  590. package/dist/ui-modal.js +46 -45
  591. package/dist/ui-modal.js.map +1 -1
  592. package/dist/ui-nag.js +19 -18
  593. package/dist/ui-nag.js.map +1 -1
  594. package/dist/ui-page.js +8 -7
  595. package/dist/ui-page.js.map +1 -1
  596. package/dist/ui-panel.js +28 -17
  597. package/dist/ui-panel.js.map +1 -1
  598. package/dist/ui-parts.js +66 -52
  599. package/dist/ui-parts.js.map +1 -1
  600. package/dist/ui-placeholder.js +21 -16
  601. package/dist/ui-placeholder.js.map +1 -1
  602. package/dist/ui-popup.js +113 -84
  603. package/dist/ui-popup.js.map +1 -1
  604. package/dist/ui-progress.js +9 -7
  605. package/dist/ui-progress.js.map +1 -1
  606. package/dist/ui-property-editor.js +706 -203
  607. package/dist/ui-property-editor.js.map +1 -1
  608. package/dist/ui-quote.js +5 -4
  609. package/dist/ui-quote.js.map +1 -1
  610. package/dist/ui-rail.js +5 -4
  611. package/dist/ui-rail.js.map +1 -1
  612. package/dist/ui-rating.js +31 -29
  613. package/dist/ui-rating.js.map +1 -1
  614. package/dist/ui-reveal.js +7 -6
  615. package/dist/ui-reveal.js.map +1 -1
  616. package/dist/ui-root.js +324 -158
  617. package/dist/ui-root.js.map +1 -1
  618. package/dist/ui-search.js +210 -168
  619. package/dist/ui-search.js.map +1 -1
  620. package/dist/ui-section.js +167 -130
  621. package/dist/ui-section.js.map +1 -1
  622. package/dist/ui-segment.js +15 -12
  623. package/dist/ui-segment.js.map +1 -1
  624. package/dist/ui-select.js +83 -81
  625. package/dist/ui-select.js.map +1 -1
  626. package/dist/ui-shape.js +86 -58
  627. package/dist/ui-shape.js.map +1 -1
  628. package/dist/ui-sidebar.js +59 -56
  629. package/dist/ui-sidebar.js.map +1 -1
  630. package/dist/ui-sides.js +325 -0
  631. package/dist/ui-sides.js.map +1 -0
  632. package/dist/ui-site-nav.js +329 -0
  633. package/dist/ui-site-nav.js.map +1 -0
  634. package/dist/ui-site-tabs.js +177 -0
  635. package/dist/ui-site-tabs.js.map +1 -0
  636. package/dist/ui-slider.js +84 -81
  637. package/dist/ui-slider.js.map +1 -1
  638. package/dist/ui-space.js +7 -6
  639. package/dist/ui-space.js.map +1 -1
  640. package/dist/ui-split-panel.js +298 -0
  641. package/dist/ui-split-panel.js.map +1 -0
  642. package/dist/ui-stack.js +47 -23
  643. package/dist/ui-stack.js.map +1 -1
  644. package/dist/ui-statistic.js +15 -13
  645. package/dist/ui-statistic.js.map +1 -1
  646. package/dist/ui-step.js +31 -29
  647. package/dist/ui-step.js.map +1 -1
  648. package/dist/ui-sticky.js +7 -6
  649. package/dist/ui-sticky.js.map +1 -1
  650. package/dist/ui-tab.js +230 -138
  651. package/dist/ui-tab.js.map +1 -1
  652. package/dist/ui-table.js +724 -162
  653. package/dist/ui-table.js.map +1 -1
  654. package/dist/ui-terms.js +12 -10
  655. package/dist/ui-terms.js.map +1 -1
  656. package/dist/ui-text.js +53 -28
  657. package/dist/ui-text.js.map +1 -1
  658. package/dist/ui-theme-editor.js +1018 -1545
  659. package/dist/ui-theme-editor.js.map +1 -1
  660. package/dist/ui-theme-menu-CuIjr8Ou.js +1493 -0
  661. package/dist/ui-theme-menu-CuIjr8Ou.js.map +1 -0
  662. package/dist/ui-toast.js +45 -44
  663. package/dist/ui-toast.js.map +1 -1
  664. package/dist/ui-toc.js +75 -74
  665. package/dist/ui-toc.js.map +1 -1
  666. package/dist/ui-toolbar.js +51 -73
  667. package/dist/ui-toolbar.js.map +1 -1
  668. package/dist/ui-transition.js +12 -11
  669. package/dist/ui-transition.js.map +1 -1
  670. package/dist/ui-tree-diagram.js +676 -197
  671. package/dist/ui-tree-diagram.js.map +1 -1
  672. package/dist/ui-tree.js +625 -0
  673. package/dist/ui-tree.js.map +1 -0
  674. package/dist/ui-video.js +13 -11
  675. package/dist/ui-video.js.map +1 -1
  676. package/dist/ui-visibility.js +26 -25
  677. package/dist/ui-visibility.js.map +1 -1
  678. package/dist/ui-zoom.js +79 -78
  679. package/dist/ui-zoom.js.map +1 -1
  680. package/dist/util/TopLayerTip.d.ts +28 -0
  681. package/dist/util/index.d.ts +5 -2
  682. package/dist/vocabulary/DefaultValues.d.ts +34 -0
  683. package/dist/vocabulary/SharedVocabulary.d.ts +4 -0
  684. package/dist/vocabulary/SharedVocabulary.es.d.ts +7 -0
  685. package/dist/vocabulary/ValueSets.d.ts +18 -0
  686. package/dist/vocabulary/Vocabulary.d.ts +1 -0
  687. package/dist/vocabulary/defaults.generated.d.ts +6 -0
  688. package/dist/vocabulary/index.d.ts +1 -0
  689. package/package.json +1 -1
  690. package/dist/MarkdownEngine-CbuT9Mjc.js.map +0 -1
  691. package/dist/PrefStore-CeaTtjTz.js.map +0 -1
  692. package/dist/UIButton-XkfGqgh6.js +0 -6
  693. package/dist/UIButton-XkfGqgh6.js.map +0 -1
  694. package/dist/UIInput-BUudZstW.js +0 -6
  695. package/dist/UIInput-BUudZstW.js.map +0 -1
  696. package/dist/UIKeys-DJF2TIKE.js.map +0 -1
  697. package/dist/UILabel-C1jy3Yl8.js +0 -6
  698. package/dist/UILabel-C1jy3Yl8.js.map +0 -1
  699. package/dist/UIMenu-Btd-8V3A.js +0 -42
  700. package/dist/UIMenu-Btd-8V3A.js.map +0 -1
  701. package/dist/UIRuntime-BBuehGly.js.map +0 -1
  702. package/dist/components.es-DmLzT-Bq.js.map +0 -1
  703. package/dist/crisp-CoZRRDuQ.js +0 -6
  704. package/dist/fruity-CQFYeRlh.js +0 -6
  705. package/dist/fruity-CQFYeRlh.js.map +0 -1
  706. package/dist/fruity.theme-BJcMiPl1.js.map +0 -1
  707. package/dist/glass-CAfW11kL.js +0 -6
  708. package/dist/glass-CAfW11kL.js.map +0 -1
  709. package/dist/glass.theme-DQcBbtCW.js +0 -6
  710. package/dist/glass.theme-DQcBbtCW.js.map +0 -1
  711. package/dist/matrix-CqA59hiF.js +0 -6
  712. package/dist/matrix.theme-jqQZjcq3.js.map +0 -1
  713. package/dist/midnight-BnoVOrhC.js +0 -6
  714. package/dist/paper-CynH8ZuT.js +0 -6
  715. package/dist/persist.types-CsZxS8TG.js +0 -9
  716. package/dist/persist.types-CsZxS8TG.js.map +0 -1
  717. package/dist/pop-D2i9V_rG.js +0 -6
  718. package/dist/spell-BFtLICm7.js +0 -6
  719. package/dist/spell.theme-B7AU7SQX.js.map +0 -1
  720. package/dist/styles.en-RLpYiO5_.js.map +0 -1
  721. package/dist/ui-theme-menu-DyKZygpV.js +0 -921
  722. package/dist/ui-theme-menu-DyKZygpV.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ui-modal.js","names":["this","ref={(element) => this.dialog = element}","<Show when={this.heading}>\n <div id={this.headerId} class={UIT.HEADER} part={this.dialogPart(UIT.HEADER)}>\n {this.heading}\n </div>\n </Show>","class={UIT.HEADER}","part={this.dialogPart(UIT.HEADER)}","<div id={this.headerId} class={UIT.HEADER} part={this.dialogPart(UIT.HEADER)}>\n {this.heading}\n </div>","<dialog\n ref={(element) => this.dialog = element}\n class={this.rootClass}\n part={this.dialogPart(this.rootPart)}\n aria-labelledby={isServer ? this.serverLabelledBy() : void 0}\n onCancel={this.onCancel}\n onClose={this.onClose}\n onPointerDown={this.onPointerDown}\n onClick={this.onDialogClick}\n >\n <Show when={this.heading}>\n <div id={this.headerId} class={UIT.HEADER} part={this.dialogPart(UIT.HEADER)}>\n {this.heading}\n </div>\n </Show>\n <Show when={this.content}>\n <div class={UIT.CONTENT} part={this.dialogPart(UIT.CONTENT)}>\n {this.content}\n </div>\n </Show>\n <slot />\n {this.closeButton.draw()}\n </dialog>","<Show when={this.content}>\n <div class={UIT.CONTENT} part={this.dialogPart(UIT.CONTENT)}>\n {this.content}\n </div>\n </Show>","part={this.dialogPart(UIT.CONTENT)}","<div class={UIT.CONTENT} part={this.dialogPart(UIT.CONTENT)}>\n {this.content}\n </div>","part={this.dialogPart(this.rootPart)}","aria-labelledby={isServer ? this.serverLabelledBy() : void 0}","_elementSetup_dec","_a","_init","E.UIComponent","E.protoMerged","E.untracked","E.whileConnected","E.on","E.state","E.onChange","E.Disclosure","E.CloseButton","UIT.CLOSE","_$createComponent","_$readShallow","UIT.HEADER","_$setAttribute","UIT.CONTENT","_$getOwner","__name","_$delegateEvents","E.proto","E.protoMerged","__name","modalCSS","UIT.HEADING","UIT.CONTENT","UIT.BUTTON","E.isBrowser","ModalActions","__publicField","HEADER","Key","__decorateElement","__decoratorMetadata","__decoratorStart","HEADING","__name$1","__runInitializers","AnimationLookup","BUTTON","CONTENT","ToggleCommands","CLOSE","__privateAdd","getOwner$1","_tmpl$","_tmpl$2","_onNameChanged_dec","_onSlotChange_dec","_slottedHeading_dec","_onClose_dec","_closedBy_dec","_onCommand_dec","_watchPlacement_dec","_requestClose_dec","_elementSetup_dec$1","_a$1","_init$1","_slottedHeading","_DialogComponent","UIComponent","protoMerged","untracked","whileConnected","on","state","onChange","args","reason","Disclosure","visible","dialog","event","box","x","y","closedBy","CloseButton","found","kind","action","detail","originalEvent","soon","keyframes","animation","UI","wasShown","isModeless","isNative","generation","animations","name","CLOSABLE","child","hasHeader","header","reflected","label","heading","_self$","_el$","_el$3","_el$5","_el$6","addEvent","ref","element","insert","createComponent","Show","_el$2","effect","readShallow","_p$","setAttribute","className","t","a","_el$4","isServer","target","domElement","DialogComponent","delegateEvents","modalVocabulary","UIModal_default","_shownClass_dec","_overlayKind_dec","_rootPart_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_UIModal","proto","UIModal","ModalDialogs","document","options","isApproved","value","modal","SIZE","TINY","content","field","input","actions","ACTIONS","canDeny","CANCEL","approve","OK","APPROVE_CLASS","COLOR","PRIMARY","APPROVE_EVENT","HIDE_EVENT","resolve","result","paragraph","message","NATIVE_LOOK","LABEL_LAYOUT","button","actionClass","text","vocabulary","noun","isBrowser"],"sources":["../src/components/ui-modal/DialogComponent.tsx","../src/components/ui-modal/UIModal.en.ts","../src/components/ui-modal/UIModal.css?inline","../src/components/ui-modal/UIModal.tsx","../src/components/ui-modal/ModalDialogs.ts","../src/components/ui-modal/index.ts"],"sourcesContent":["import { Show } from \"solid-js\"\nimport { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UI, UIT } from \"spell/ui/core\"\nimport { type DialogAttributes, type DialogEventName } from \"./UIModal.types\"\n\n/****************\n * ### `DialogComponent`\n * The base of the components behind `<ui-modal>` and `<ui-flyout>`:\n * everything they do, on a shadow `<dialog class=\"ui … <noun>\" part=\"<rootPart>\">` shown with `showModal()`.\n * The browser gives it the focus trap, the `inert` page, the top layer and the `::backdrop` (the dimmer).\n * A subclass may be MODELESS (`isModeless`: `<ui-flyout modeless>`): `show()`, the page left usable;\n * a click on the page closes the dialog, and still lands where it went.\n *\n * - A subclass adds only its names and looks:\n * `vocabulary`, `elementSetup.styleSheets` (and `animation`), `rootPart`, `overlayKind`, `shownClass`.\n *\n * - In the modal family, not `src/elements/`: a flyout IS Fomantic's side modal\n * (the same parts, buttons, events and dismissal), and nothing else shares it yet.\n * A third, non-modal overlay would move it to `src/elements/` (`agents/CODE-DEBT.md`, `ui`).\n *\n * - Every dialog vocabulary MUST name (each family's tests check it; types can't):\n * - attributes `closable`, `closedby`, `heading`, `content`\n * - events `ui-opening`, `ui-opened`, `ui-closing`, `ui-closed`, `ui-approving`, `ui-denying`\n * - parts `rootPart`, `header`, `content`, `close`; text `close`.\n *\n * - Shown by the shared `visible` / `hidden` (`UIComponent`, \"Shown or hidden\"), starting hidden\n * (`elementSetup.visible`): `<ui-modal visible>`, `modal.visible = true`.\n * - Controlled (`isVisible`): a person's `ui-opening` / `ui-closing` (with a `reason`) come first and can veto;\n * `ui-opened` / `ui-closed` follow once the transition has finished.\n * - The `<dialog>` opens with `showModal()` and closes with `close()` as `visible` changes (`onVisibleChange()`).\n *\n * - Dismissal, by `closedby` (read when it opens; `closedBy` says what an absent one means):\n * - Escape: through `UI.overlays` (kind `overlayKind`: scroll lock, keyboard scope, focus restore),\n * so only the topmost overlay closes, and `ui-closing` can veto.\n * The dialog's own `cancel` is always prevented.\n * - A click on the `::backdrop`: the browser's light dismiss (`<dialog closedby>`)\n * when `UI.browser.supports.dialogClosedBy`, reported as `cancel`;\n * else `UI.overlays`' outside click, which tells a backdrop click from one on the dialog by where the pointer is.\n * - A close the browser forces anyway (a repeated Escape it won't let a page veto) is followed:\n * a `ui-closing` that can't veto, then `visible` off.\n *\n * - Opening as a PERSON'S action, so `ui-opening` fires:\n * an invoker command, `<button commandfor=\"id\" command=\"--show\">`\n * (`ToggleCommands`; `--close` closes, `--toggle` flips).\n * Writing `visible` (or `hidden`) is the app's own decision, and fires nothing.\n *\n * - Buttons: a click on an approve / deny element fires the cancelable `ui-approving` / `ui-denying`, then closes.\n * - Those elements (`ModalActionSelectors`):\n * Fomantic's `.approve` / `.deny` classes, `<ui-button color=\"positive\">` / `\"negative\"` (and the old\n * `<ui-button color=\"negative\">`).\n * - The `closable` icon closes (reason `close`).\n *\n * - `closable=\"false\"` is Fomantic's `closable: false` AND `closeIcon: false`:\n * no icon, and (unless `closedby` is set) `closedby=\"none\"`, so Escape and the dimmer do nothing.\n *\n * - Its name: the DOM element's `aria-label`, else the `heading` shorthand, else a slotted `<ui-header>`\n * (by element reflection: an idref can't reach into the light DOM from the shadow root).\n ****************/\nexport abstract class DialogComponent<\n V extends E.ComponentVocabulary = E.ComponentVocabulary\n> extends E.UIComponent<V> {\n /** Starts hidden, unless the page writes `visible`. */\n @E.protoMerged static elementSetup: Partial<E.ElementSetup> = { visible: \"hidden\" }\n\n /** Part name of the `<dialog>`, e.g. `modal`. */\n declare rootPart: string\n\n /** `UI.overlays` kind: `modal` or `flyout`. */\n declare overlayKind: E.OverlayKind\n\n /**\n * Hook: shown without blocking the page (`show()`, not `showModal()`).\n * - No `::backdrop`, no scroll lock, no focus trap.\n * - A click on the page lands, and closes it (light dismiss, `closedby=\"any\"`).\n * - Default `false`; `<ui-flyout modeless>`.\n */\n protected get isModeless(): boolean {\n return false\n }\n\n // The dialog attributes this base reads (see the class docs):\n // each vocabulary's getters, declared here since `V` is unknown to this class.\n\n /** `closable`: the close icon; `false` (written) is also Fomantic's `closable: false`. */\n declare closable: boolean\n\n /** `closedby`: what dismisses it, as written; see `closedBy` for what it means. */\n declare closedby: DialogAttributes[\"closedby\"] | undefined\n\n /** `heading`: the heading shorthand (old name `header`). */\n declare heading: string | undefined\n\n /** `content`: the content shorthand. */\n declare content: string | undefined\n\n /** The dialog. */\n protected dialog?: HTMLDialogElement\n\n /**\n * This element's `UI.overlays` entry; its Escape / outside options follow `closedby` when it opens.\n * - `kind` is the subclass's `overlayKind`, set in the constructor (a prototype value TypeScript can't see here).\n */\n private readonly overlayEntry: E.OverlayEntry = {\n element: this.domElement,\n kind: \"modal\",\n onDismiss: (reason: E.DismissReason) => void this.requestClose(reason)\n }\n\n constructor(...args: ConstructorParameters<typeof E.UIComponent>) {\n super(...args)\n this.overlayEntry.kind = this.overlayKind\n }\n\n ////////////////\n // ## Shown or hidden\n ////////////////\n\n /** Fomantic's class word on the `<dialog>` while it shows: `active` (a modal), `visible` (a flyout). */\n declare shownClass: string\n\n /** Bumped on every show / hide, so a late `ui-opened` / `ui-closed` of an earlier one is dropped. */\n private generation = 0\n\n /** Fomantic's shown class (`shownClass`), just before the noun while `visible`. */\n protected get extraClass(): string | undefined {\n return this.isVisible ? this.shownClass : undefined\n }\n\n /**\n * Shown or hidden, as `visible` (`isVisible`): `ui-opening` / `ui-closing` first, `ui-opened` / `ui-closed` once\n * its transition ends (`onVisibleChange()`).\n */\n readonly disclosure = new E.Disclosure({\n component: this,\n member: \"isVisible\",\n detail: (visible, originalEvent): UIT.ModalOpenDetail | UIT.ModalCloseDetail =>\n visible ? { visible, originalEvent } : { visible, reason: this.closeReason, originalEvent },\n afterDetail: (visible): UIT.ModalOpenDetail => ({ visible })\n })\n\n /** Why the latest close was asked for: `ui-closing`'s `reason`. */\n private closeReason: UIT.ModalCloseReason = \"escape\"\n\n /** Show, dispatching the cancelable `ui-opening` first; true when applied. */\n requestOpen(originalEvent?: Event): boolean {\n return this.disclosure.open(originalEvent)\n }\n\n /** Hide for `reason`, dispatching the cancelable `ui-closing` first; true when applied. */\n @E.untracked\n requestClose(reason: UIT.ModalCloseReason, originalEvent?: Event): boolean {\n if (!this.isVisible) return false\n this.isDismissing = true\n E.soon(() => (this.isDismissing = false))\n this.closeReason = reason\n return this.disclosure.close(originalEvent)\n }\n\n /**\n * `visible` changed (`UIComponent`'s hook): open or close the `<dialog>`;\n * resolves once its transition has ended, with `ui-opened` / `ui-closed`.\n * - `animation`:\n * - the family's own (`elementSetup.animation`): the sheet's transition (`UIModal.css`, `UIFlyout.css`)\n * - another one (the element's own `animation`): run on the `<dialog>` through `UI.transitions`\n * - `none`: at once (motion off, or the element's first draw)\n * - `ui-closed` only when it was shown: a modal that starts hidden fires nothing.\n */\n protected async onVisibleChange(visible: boolean, animation: UIT.Animation): Promise<void> {\n const dialog = this.dialog\n if (!dialog) return\n const keyframes = UIT.AnimationLookup.keyframesBeside(animation, this.elementSetup.animation)\n if (visible) {\n this.show()\n if (keyframes) await UI.transitions.animate({ element: dialog, name: keyframes, direction: UIT.IN })\n if ((await this.transitionsEnd()) && this.isVisible) this.disclosure.sendAfter(true)\n return\n }\n const wasShown = UI.overlays.isOpen(this.overlayEntry)\n if (keyframes && wasShown) await UI.transitions.animate({ element: dialog, name: keyframes, direction: UIT.OUT })\n // shown again while the keyframes ran\n if (this.isVisible) return\n this.hide()\n if (!wasShown || !(await this.transitionsEnd())) return\n if (!this.isVisible && this.domElement.isConnected) this.disclosure.sendAfter(false)\n }\n\n /**\n * Shown again when it comes back into the page while `visible`; closed, quietly, when it leaves.\n * - Not on the first connect: the dialog isn't drawn yet, and `onVisibleChange()` runs once it is.\n */\n @E.whileConnected\n protected watchPlacement() {\n if (this.isVisible && this.isReady) this.show()\n return () => this.hide()\n }\n\n /**\n * `showModal()` (`show()` when `isModeless`) and register with `UI.overlays`; nothing when already open.\n * - Modeless: the overlay entry isn't `modal` (no scroll lock), and the page stays usable.\n * - A click on the page LIGHT-DISMISSES it (`any`, the default), through the overlay entry, never the browser's:\n * the click still lands where it went.\n * - Its opener (`commandfor`) and a click inside don't count.\n * - `closedby` is applied here:\n * natively when supported (the browser's light dismiss), else by the overlay entry's outside-click handling.\n * - A `<dialog>` that other keyframes animated out (`hidden` on it) shows again first.\n */\n private show() {\n const dialog = this.dialog\n if (!dialog) return\n const isModeless = this.isModeless\n const closedBy = this.closedBy\n // modeless: our own outside-click handling, which lets the click through (the browser's needs a backdrop)\n const isNative = UI.browser.supports.dialogClosedBy && !isModeless\n if (isNative) dialog.setAttribute(\"closedby\", closedBy)\n else dialog.removeAttribute(\"closedby\")\n this.overlayEntry.closeOnEscape = closedBy !== \"none\"\n this.overlayEntry.closeOnOutsideClick = !isNative && closedBy === \"any\"\n this.overlayEntry.modal = !isModeless\n UI.transitions.reveal(dialog)\n if (!dialog.open) {\n if (isModeless) dialog.show()\n else dialog.showModal()\n UI.focus.enter(dialog)\n }\n UI.overlays.open(this.overlayEntry)\n }\n\n /** `close()` the dialog, THEN leave `UI.overlays` (whose focus restore needs the page no longer `inert`). */\n private hide() {\n const dialog = this.dialog\n if (dialog?.open) dialog.close()\n UI.overlays.close(this.overlayEntry)\n }\n\n /** Once the dialog's own transitions end: `true` unless another show / hide started meanwhile. */\n private async transitionsEnd(): Promise<boolean> {\n const generation = ++this.generation\n const animations = this.dialog?.getAnimations() ?? []\n await Promise.allSettled(animations.map((animation) => animation.finished))\n return generation === this.generation\n }\n\n /** `send()` one of the events every dialog vocabulary names (see the class docs). */\n private fire(name: DialogEventName, detail: object): boolean {\n return this.send(name as E.EventName<V>, detail)\n }\n\n /** An invoker command aimed at the DOM element (`UIT.ToggleCommands`). */\n @E.on(\"command\")\n protected onCommand(event: Event) {\n const action = UIT.ToggleCommands.action(event, this.isVisible)\n if (action === \"show\") this.requestOpen(event)\n else if (action === \"close\") this.requestClose(\"close\", event)\n }\n\n ////////////////\n // ## Dismissal\n ////////////////\n\n /** A dismissal was asked for in this task: the dialog's own `cancel` for the same key press is ignored. */\n private isDismissing = false\n\n /** The last press started on the `::backdrop`. */\n private pressStartedOnBackdrop = false\n\n /**\n * What dismisses it: an explicit `closedby` wins;\n * else `none` for `closable=\"false\"` (Fomantic's `closable: false`), else `any`.\n * - NOTE: `closedby` has a vocabulary default, so whether it was written is read off the DOM element.\n * - Untracked.\n */\n @E.untracked\n private get closedBy(): NonNullable<DialogAttributes[\"closedby\"]> {\n if (this.domElement.hasAttribute(\"closedby\")) return this.closedby ?? \"any\"\n // NOTE: an absent boolean also converts to `false`, so `closable` must be present to mean \"closable: false\"\n const isOff = this.domElement.hasAttribute(CLOSABLE) && !this.closable\n return isOff ? \"none\" : \"any\"\n }\n\n /** Remember whether a press started on the `::backdrop` (the dialog itself, outside its box). */\n private readonly onPointerDown = (event: PointerEvent) => {\n const dialog = this.dialog\n if (!dialog || event.target !== dialog) return void (this.pressStartedOnBackdrop = false)\n const box = dialog.getBoundingClientRect()\n const { clientX: x, clientY: y } = event\n this.pressStartedOnBackdrop = x < box.left || x > box.right || y < box.top || y > box.bottom\n }\n\n /**\n * The dialog's `cancel`: Escape the overlay didn't take, or the browser's light dismiss (`closedby`).\n * - Always prevented; the element decides, by `closedby`, and `ui-closing` may veto.\n */\n private readonly onCancel = (event: Event) => {\n event.preventDefault()\n const reason = this.pressStartedOnBackdrop ? \"outside\" : \"escape\"\n this.pressStartedOnBackdrop = false\n if (this.isDismissing) return\n const closedBy = this.closedBy\n if (closedBy === \"none\" || (reason === \"outside\" && closedBy !== \"any\")) return\n this.requestClose(reason, event)\n }\n\n /**\n * The dialog closed while the element thinks it's open: the browser forced it -- follow.\n * - `close` is queued as a task:\n * one from an earlier close can arrive after a quick re-open, when the dialog is open again -- ignored.\n */\n @E.untracked\n private readonly onClose = (event: Event) => {\n if (this.dialog?.open || !this.domElement.isConnected) return\n this.closeReason = \"escape\"\n this.disclosure.adopt(false, event)\n }\n\n ////////////////\n // ## Buttons\n ////////////////\n\n /** The close icon, while `closable`. */\n readonly closeButton = new E.CloseButton({\n owner: this,\n shows: () => !!this.closable,\n label: () => this.closeText,\n part: this.dialogPart(UIT.CLOSE),\n onClick: (event) => this.onCloseIcon(event)\n })\n\n /**\n * The close icon's label (`translationForKey(\"close\")`).\n * - Not a cast in the JSX, for the reason `dialogPart()` is a method.\n */\n private get closeText(): string {\n return this.translationForKey(UIT.CLOSE as E.TextKey<V>)\n }\n\n /** Close icon. */\n private readonly onCloseIcon = (event: MouseEvent) => {\n event.stopPropagation()\n this.requestClose(\"close\", event)\n }\n\n /** A click inside: an approve / deny element asks, then closes. */\n private readonly onDialogClick = (event: MouseEvent) => {\n const found = DialogComponent.actionFor(event, this.domElement)\n if (!found) return\n const [kind, action] = found\n const detail: UIT.ModalActionDetail = { action, originalEvent: event }\n if (!this.fire(kind === \"approve\" ? \"ui-approving\" : \"ui-denying\", detail)) return\n this.requestClose(kind, event)\n }\n\n ////////////////\n // ## The name\n ////////////////\n\n /** The DOM element's `aria-label`, forwarded to the dialog. */\n get ariaLabel(): string | undefined {\n return this.attributes[\"aria-label\"] ?? undefined\n }\n\n /**\n * First slotted `<ui-header>` (any tag whose noun is `header`), which names the dialog.\n * - Read on the server too, NO `isServer` guard:\n * the static render (`spell/ui/static`, on linkedom elements) names the dialog by it (`serverLabelledBy()`).\n */\n @E.state accessor slottedHeading: Element | undefined = this.findHeading()\n\n /** Id of the `heading` shorthand, from `UI.ids` once rendering. */\n private headerId = \"\"\n\n /** The light DOM's slotted children changed: look for the heading again. */\n @E.on(\"slotchange\", { target: \"renderRoot\" })\n protected onSlotChange() {\n this.slottedHeading = this.findHeading()\n }\n\n /** First child element whose definition's noun is `header` (a `<ui-header>`, or a translated one). */\n private findHeading(): Element | undefined {\n for (const child of this.domElement.children) {\n if (E.UIComponent.registry.definitions.get(child.localName)?.vocabulary.noun === UIT.HEADER) return child\n }\n return undefined\n }\n\n /** The dialog's name: its `aria-label`, else `aria-labelledby` the `heading` shorthand, else the slotted heading. */\n @E.onChange(\"isReady\", \"ariaLabel\", \"heading\", \"slottedHeading\")\n protected onNameChanged(\n _isReady: boolean,\n label: string | undefined,\n header: string | undefined,\n heading: Element | undefined\n ) {\n const dialog = this.dialog\n if (!dialog) return\n const hasHeader = !!header\n const reflected = dialog as unknown as { ariaLabelledByElements: Element[] | null }\n if (label) dialog.setAttribute(\"aria-label\", label)\n else dialog.removeAttribute(\"aria-label\")\n // NOTE: setting the reflected list (even to `null`, the platform's \"none\") rewrites the attribute,\n // so it goes first\n reflected.ariaLabelledByElements = !label && !hasHeader && heading ? [heading] : null\n if (!label && hasHeader) dialog.setAttribute(\"aria-labelledby\", this.headerId)\n }\n\n /**\n * The dialog's `aria-labelledby` in a server render (`spell/ui/static`):\n * the `heading` shorthand's id, else the slotted heading's,\n * unless the DOM element has an `aria-label` (which the static output moves onto the dialog).\n * - Why: on a server no effect applies and no element reflects.\n * - SIDE EFFECT: gives the slotted heading (the render's parsed copy) an id if it has none.\n */\n private serverLabelledBy(): string | undefined {\n if (this.ariaLabel) return undefined\n if (this.heading) return this.headerId\n const heading = this.slottedHeading\n return heading ? UI.ids.ensure(heading, `ui-${this.elementDefinition.vocabulary.noun}-heading`) : undefined\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n render(): JSX.Element {\n this.headerId = UI.ids.next(`ui-${this.elementDefinition.vocabulary.noun}`)\n return (\n <dialog\n ref={(element) => (this.dialog = element)}\n class={this.rootClass}\n part={this.dialogPart(this.rootPart)}\n aria-labelledby={isServer ? this.serverLabelledBy() : undefined}\n onCancel={this.onCancel}\n onClose={this.onClose}\n onPointerDown={this.onPointerDown}\n onClick={this.onDialogClick}\n >\n <Show when={this.heading}>\n <div id={this.headerId} class={UIT.HEADER} part={this.dialogPart(UIT.HEADER)}>\n {this.heading}\n </div>\n </Show>\n <Show when={this.content}>\n <div class={UIT.CONTENT} part={this.dialogPart(UIT.CONTENT)}>\n {this.content}\n </div>\n </Show>\n <slot />\n {this.closeButton.draw()}\n </dialog>\n )\n }\n\n /**\n * `part` value of one of the parts every dialog vocabulary names (see the class docs).\n * - A method, not a cast in the JSX:\n * Solid's SSR compile (`hoistProps`) hoists a `<Show>`'s children into a module-level constructor,\n * and passes it every free identifier they use.\n * That includes the type parameter `V` of a `PartName<V>` cast, as a VALUE (\"V is not defined\").\n */\n private dialogPart(name: string): string {\n return this.partForName(name as E.PartName<V>)\n }\n\n /**\n * The approve / deny element `event` activated, with which it is; `undefined` for none.\n * - The innermost light-DOM element on its path (in `domElement`'s tree)\n * matching `UIT.ModalActionSelectors`, up to `domElement` (`UIT.ModalActions`, the toast's walk too).\n */\n private static actionFor(event: Event, domElement: Element): [UIT.ModalAction, Element] | undefined {\n for (const target of UIT.ModalActions.lightPath(event, domElement)) {\n const action = UIT.ModalActions.of(target)\n if (action) return [action, target]\n }\n return undefined\n }\n}\n\n/** The attribute of the close icon (and of Fomantic's `closable: false`). */\nconst CLOSABLE = \"closable\"\n","/**\n * Every name `<ui-modal>` uses: tag, attributes (kind + allowed values), events, slots, parts, states, texts.\n * Schema: `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Class words come out through `ClassBuilder`, in Fomantic's grammar:\n * `<ui-modal size=\"tiny\" appearance=\"basic\" vertical-align=\"top\" visible>` => `ui tiny basic top aligned active modal`;\n * `active`, Fomantic's shown-modal class, is the element's own while it shows (the shared `visible` / `hidden`).\n * - Sizes are WIDTHS here (Fomantic's modal ratios), not text sizes:\n * `UIModal.css` reads the size class, never `--ui-scale`.\n * - A modal OWNS the `header`, `content`, `description` and `actions` parts:\n * slotted ones get `:state(in-modal)` and style themselves from `UIParts.css`,\n * reading `--_ui-modal-basic` / `--_ui-modal-header-size` (`UIModal.css`).\n * - `closedby` mirrors `<dialog closedby>`:\n * `any` (Fomantic's `closable: true`), `closerequest` (Escape only), `none`.\n * - `closable` is the close ICON (Fomantic's `closeIcon`).\n * `closable=\"false\"` also brings back Fomantic's `closable: false` (dismissal `none`), unless `closedby` is set.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `<ui-modal>`\n * A modal dialog: `<dialog class=\"ui ... modal\" part=\"modal\">`, shown with `showModal()`.\n ****************/\nexport const modalVocabulary = {\n tag: \"ui-modal\",\n topics: [\"dialogs\", \"overlays\", \"popups\", \"modules\"],\n aka: [\"dialog\", \"popup window\", \"lightbox\", \"confirm\", \"alert dialog\"],\n noun: \"modal\",\n description: \"A modal displays content that temporarily blocks interactions with the main view of a site.\",\n attributes: [\n {\n name: \"size\",\n group: \"appearance\",\n kind: \"size\",\n description: \"Width, `mini` ... `massive` (Fomantic's ratios of the default width); `medium` is the default.\"\n },\n {\n name: \"appearance\",\n group: \"appearance\",\n kind: \"multiple\",\n values: [\"basic\"],\n // each word draws itself: no key after it\n classes: {},\n replaces: [{ from: \"basic\", value: \"basic\" }],\n description: \"The look: `basic`, no box: light text straight on the dimmer. Old name: `basic`.\"\n },\n { name: \"inverted\", group: \"appearance\", kind: \"keyOnly\", description: \"The dark scheme.\" },\n { name: \"fullscreen\", group: \"appearance\", kind: \"keyOnly\", description: \"Nearly the whole viewport wide.\" },\n {\n name: \"overlay\",\n group: \"appearance\",\n kind: \"keyOnly\",\n description: \"With `fullscreen`: covers the whole viewport, edge to edge (`overlay fullscreen`).\"\n },\n {\n name: \"scrolling\",\n group: \"layout\",\n kind: \"keyOnly\",\n description: \"Scrolls inside itself when taller than the viewport.\"\n },\n {\n name: \"vertical-align\",\n group: \"layout\",\n kind: \"verticalAlign\",\n values: [\"top\", \"bottom\"],\n description: \"Pinned near the `top` or `bottom` of the viewport instead of centred (`top aligned`).\"\n },\n {\n name: \"closable\",\n group: \"behaviour\",\n kind: \"boolean\",\n description:\n \"Shows a close icon (Fomantic's `closeIcon` setting). `closable=\\\"false\\\"` is also Fomantic's `closable: \" +\n 'false` setting: no icon AND `closedby=\"none\"` (Escape and the dimmer do nothing), unless `closedby` is ' +\n \"set, which wins for dismissal. Absent: no icon, dismissed by `closedby` (default `any`).\"\n },\n {\n name: \"closedby\",\n group: \"behaviour\",\n kind: \"enum\",\n values: [\"any\", \"closerequest\", \"none\"],\n default: \"any\",\n property: \"closedBy\",\n description:\n \"What dismisses it, as `<dialog closedby>` (Fomantic's `closable` setting, in three steps): `any` -- \" +\n \"Escape or a click on the dimmer (default); `closerequest` -- Escape only; `none` -- only its own \" +\n 'buttons. Read when it opens; when set, it wins over `closable=\"false\"`.'\n },\n {\n name: \"heading\",\n replaces: [\"header\"],\n group: \"name\",\n kind: \"string\",\n description:\n \"Shorthand for a header; a slotted `<ui-header>` is the rich version (and names the dialog). Its old name was `header`.\"\n },\n {\n name: \"content\",\n group: \"content\",\n kind: \"string\",\n description: \"Shorthand for a content block of text; a slotted `<ui-content>` is the rich version.\"\n }\n ],\n events: [\n {\n name: \"ui-opening\",\n detail: \"{ visible: true, originalEvent?: Event }\",\n cancelable: true,\n description: \"About to show (a person's action, not a `visible` write); `preventDefault()` keeps it hidden.\"\n },\n {\n name: \"ui-opened\",\n detail: \"{ visible: true }\",\n description: \"Shown, its entry transition finished (Fomantic's `onVisible`).\"\n },\n {\n name: \"ui-closing\",\n detail: \"{ visible: false, reason: ModalCloseReason, originalEvent?: Event }\",\n cancelable: true,\n description:\n \"About to hide: Escape, the dimmer, the close icon, approve or deny. `preventDefault()` keeps it shown.\"\n },\n {\n name: \"ui-closed\",\n detail: \"{ visible: false }\",\n description: \"Hidden, its exit transition finished (Fomantic's `onHidden`).\"\n },\n {\n name: \"ui-approving\",\n detail: \"{ action: Element, originalEvent?: Event }\",\n cancelable: true,\n description:\n 'An approve button (`.approve` / `.ok` / `.positive`, `<ui-button color=\"positive\">`) was activated; ' +\n \"`preventDefault()` keeps the modal shown (Fomantic's `onApprove` returning `false`).\"\n },\n {\n name: \"ui-denying\",\n detail: \"{ action: Element, originalEvent?: Event }\",\n cancelable: true,\n description:\n 'A deny button (`.deny` / `.cancel` / `.negative`, `<ui-button color=\"negative\">`) was activated; ' +\n \"`preventDefault()` keeps the modal shown.\"\n }\n ],\n slots: [\n {\n name: \"\",\n description: \"Content parts: `<ui-header>`, `<ui-content>` (`image`, `scrolling`), `<ui-actions>` with buttons.\"\n }\n ],\n parts: [\n { name: \"modal\", description: \"The `<dialog>` box; its `::backdrop` is the dimmer.\" },\n { name: \"header\", description: \"The `header` shorthand.\" },\n { name: \"content\", description: \"The `content` shorthand.\" },\n { name: \"close\", description: \"The close icon of a `closable` modal.\" }\n ],\n states: [],\n texts: [\n { key: \"close\", text: \"Close\", description: \"Accessible name of the close icon.\" },\n { key: \"ok\", text: \"OK\", description: \"Approve button of `UI.modals.confirm()` / `alert()` / `prompt()`.\" },\n { key: \"cancel\", text: \"Cancel\", description: \"Deny button of `UI.modals.confirm()` / `prompt()`.\" }\n ],\n ownsParts: [\"header\", \"content\", \"description\", \"actions\"]\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-modal>`: port of Fomantic's `modal.less` + `modal.variables`; the dimmer is the dialog's `::backdrop`\n * (`dimmer.variables`' page dimmer colour), not a `ui-dimmer`.\n * - Shadow markup contract: `<dialog class=\"ui [size] [keyOnly ...] [top | bottom aligned] modal\" part=\"modal\">`,\n * opened with `showModal()` (focus trap, `inert` page, top layer), holding in order:\n * - `<div class=\"header\" part=\"header\">` -- the `header` shorthand\n * - `<div class=\"content\" part=\"content\">` -- the `content` shorthand\n * - the default `<slot>`: `<ui-header>`, `<ui-content>`, `<ui-actions>` ... parts\n * - `closable`: `<button type=\"button\" class=\"close icon\" part=\"close\" aria-label=\"...\">svg</button>`, LAST in\n * the DOM (so initial focus lands in the content) but drawn top right\n * - The dialog is the box AND its scroll container (`overflow: auto`, `max-height`): a modal taller than the\n * viewport scrolls inside itself, where Fomantic's scrolled the dimmer. Its rounded corners clip the parts.\n * - Close icon: INSIDE the box (Fomantic's tablet / fullscreen / `inside` placement) for the element --\n * the dialog's scroll box would clip it outside; static markup keeps Fomantic's outside placement on computers.\n * - Widths: Fomantic's responsive widths times the size ratio (`--_modal-ratio`, mini 0.4 ... massive 1.8),\n * by viewport breakpoints (a modal is viewport-level). Text size never scales with `size`.\n * - Motion: the box scales and fades in from `@starting-style` and out while `display` / `overlay` transition\n * (`allow-discrete`) keep it in the top layer; the `::backdrop` fades with it. Reduced motion shortens both.\n * - Public tokens (`--ui-modal-*`, the theming surface) are NEVER declared here: the token block reads each\n * through a private alias, `--_ui-modal-radius: var(--ui-modal-radius, var(--ui-radius))`,\n * and every rule reads the alias. So a value set on `:root`, an ancestor, the DOM element,\n * `::part(modal)` or in the app stylesheet reaches the box (`notes/theming.md` \"Component tokens\").\n * - responsive defaults (the width, the aligned margin) change a private DEFAULT (`--_modal-width`) per\n * breakpoint, never the alias, so a page's value holds on every screen; `fullscreen` swaps the alias\n * - OWNER side: a modal owns `header`, `content`, `description` and `actions` (`ownsParts`).\n * Slotted parts style themselves from `UIParts.css` (context `in-modal`), reading what the root declares:\n * - `--_ui-modal-basic` (`0` / `1`), on EVERY root\n * - the aliases of the look tokens the modal VARIES, on EVERY root: `--_ui-modal-header-size` (per size),\n * `--_ui-modal-header-color`, `--_ui-modal-header-background`, `--_ui-modal-content-background`,\n * `--_ui-modal-actions-background` (`basic` writes them) and `--_ui-modal-radius`; so a page sets them on\n * the modal or above it, not on the part\n * - `--ui-inverted` (`0` / `1`) with `color-scheme`: an inverted modal re-resolves its parts' `light-dark()`\n * tokens to the dark scheme\n * - the root's `<slot>` resets the colour remap and `--ui-scale`, so a large modal doesn't enlarge its buttons\n * - NOTE: left out, on purpose:\n * - `legacy` (margin positioning), `.ui.loading.modal`, `.dimmer` children: script states `<dialog>` replaces\n * - `.ui.inverted.dimmer > .modal` couplings: the dimmer is the `::backdrop`; theme it with the shared\n * `--ui-dimmer-background` (every dimmer) or `--ui-modal-dimmer-background` / `--ui-modal-dimmer-filter`\n * (modals only, e.g. `var(--ui-dimmer-blur)` for Fomantic's blurring dimmer)\n * - `resizable scrolling content`: a table variation's coupling, not a modal one\n */\n\n@layer ui.components.modal.types, ui.components.modal.content, ui.components.modal.variations, ui.components.modal.states;\n\n/* Breakpoints (`@custom-media`), inlined at build time. */\n@import \"../../styles/media.css\";\n\n/*******************************\n Modal\n*******************************/\n\n@layer ui.components.modal.types {\n /* DOM element: no box of its own; the dialog is in the top layer while open. */\n :host {\n display: contents;\n }\n\n /* Tokens: one private alias per `modal.variables` entry that still matters, from the global tokens. */\n .ui.modal {\n --_ui-modal-background: var(--ui-modal-background, var(--ui-surface));\n --_ui-modal-color: var(--ui-modal-color, var(--ui-text-color));\n --_ui-modal-radius: var(--ui-modal-radius, var(--ui-radius));\n --_ui-modal-shadow: var(--ui-modal-shadow, 1px 3px 3px 0 oklch(0 0 0 / 0.2), 1px 3px 15px 2px oklch(0 0 0 / 0.2));\n /* The shared dimmer token (`UIDimmer.css`), so a theme styles this `::backdrop` and `<ui-dimmer>` at once. */\n --_ui-modal-dimmer-background: var(--ui-modal-dimmer-background, var(--ui-dimmer-background, oklch(0 0 0 / 0.85)));\n --_ui-modal-duration: var(--ui-modal-duration, var(--ui-duration-slow));\n --_ui-modal-close-size: var(--ui-modal-close-size, 1.25em);\n --_ui-modal-close-hitbox: var(--ui-modal-close-hitbox, 2.25em);\n --_ui-modal-close-opacity: var(--ui-modal-close-opacity, 0.8);\n --_ui-modal-inner-close-top: var(--ui-modal-inner-close-top, 1.0625em);\n --_ui-modal-inner-close-right: var(--ui-modal-inner-close-right, 1em);\n /* The dialog's width; its default depends on the screen and the size (\"Responsive widths\" below), a value\n set from outside holds on every screen. */\n --_ui-modal-width: var(--ui-modal-width, var(--_modal-width));\n /* Gap to the viewport's edge of a `top aligned` / `bottom aligned` modal; default 5vh, 1em on phones. */\n --_ui-modal-aligned-margin: var(--ui-modal-aligned-margin, var(--_modal-aligned-margin));\n --_modal-ratio: 1;\n --_modal-width: 95%;\n --_modal-aligned-margin: 5vh;\n /* Owner tokens (`UIParts.css`): declared on every root; `basic` writes the look ones. */\n --_ui-modal-basic: 0;\n --_ui-modal-header-size: var(--ui-modal-header-size, 1.42857em);\n --_ui-modal-header-color: var(--ui-modal-header-color, var(--ui-text-dark));\n --_ui-modal-header-background: var(--ui-modal-header-background, var(--ui-surface));\n --_ui-modal-content-background: var(--ui-modal-content-background, var(--ui-surface));\n --_ui-modal-actions-background: var(--ui-modal-actions-background, var(--ui-surface-muted));\n --ui-inverted: 0;\n position: absolute;\n z-index: var(--ui-z-modal);\n box-sizing: border-box;\n display: none;\n flex: 0 0 auto;\n width: var(--_ui-modal-width);\n max-width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n border-radius: var(--_ui-modal-radius);\n outline: none;\n background: var(--_ui-modal-background);\n box-shadow: var(--_ui-modal-shadow);\n color: var(--_ui-modal-color);\n font-family: var(--ui-font-family);\n font-size: var(--ui-font-size);\n line-height: var(--ui-line-height);\n text-align: start;\n transform-origin: 50% 25%;\n user-select: text;\n }\n\n /* The element's `<dialog>`: fixed in the top layer, centred, its own scroll box. */\n dialog.ui.modal {\n position: fixed;\n inset: 0;\n max-height: calc(100dvh - 2em);\n margin: auto;\n overflow: auto;\n overscroll-behavior: contain;\n opacity: 1;\n transform: none;\n transition:\n opacity var(--_ui-modal-duration) var(--ui-ease),\n transform var(--_ui-modal-duration) var(--ui-ease),\n display var(--_ui-modal-duration) allow-discrete,\n overlay var(--_ui-modal-duration) allow-discrete;\n }\n dialog.ui.modal[open] {\n display: block;\n }\n dialog.ui.modal:not([open]) {\n opacity: 0;\n transform: scale(0.8);\n }\n @starting-style {\n dialog.ui.modal[open] {\n opacity: 0;\n transform: scale(0.8);\n }\n }\n\n /* The dimmer. */\n dialog.ui.modal::backdrop {\n background: var(--_ui-modal-dimmer-background);\n backdrop-filter: var(--ui-modal-dimmer-filter, none);\n opacity: 1;\n transition:\n opacity var(--_ui-modal-duration) var(--ui-ease),\n display var(--_ui-modal-duration) allow-discrete,\n overlay var(--_ui-modal-duration) allow-discrete;\n }\n dialog.ui.modal:not([open])::backdrop {\n opacity: 0;\n }\n @starting-style {\n dialog.ui.modal[open]::backdrop {\n opacity: 0;\n }\n }\n /* `reset.css`'s reduced-motion block reaches the dialog, not its `::backdrop`. */\n @media (prefers-reduced-motion: reduce) {\n dialog.ui.modal::backdrop {\n transition-duration: 0.01ms;\n }\n }\n\n /* What the modal hands its content: not its size remap (a large modal is WIDER, not bigger text). */\n .ui.modal slot {\n --ui-color: initial;\n --ui-color-text: initial;\n --ui-color-header: initial;\n --ui-color-border: initial;\n --ui-color-background: initial;\n --ui-color-inverted: initial;\n --ui-color-on: initial;\n --ui-color-inverted-on: initial;\n --ui-scale: initial;\n }\n\n /* Static markup's outer corners (the dialog clips its own). */\n .ui.modal > :first-child:not(.close),\n .ui.modal > .close:first-child + * {\n border-start-start-radius: var(--_ui-modal-radius);\n border-start-end-radius: var(--_ui-modal-radius);\n }\n .ui.modal > :last-child {\n border-end-start-radius: var(--_ui-modal-radius);\n border-end-end-radius: var(--_ui-modal-radius);\n }\n}\n\n/*******************************\n Content\n*******************************/\n\n@layer ui.components.modal.content {\n /* Close: outside the box, top right, on the dimmer (static markup on computers). */\n .ui.modal > .close {\n position: absolute;\n top: calc(-0.25em - var(--_ui-modal-close-hitbox));\n right: calc(-0.25em - var(--_ui-modal-close-hitbox));\n z-index: 1;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--_ui-modal-close-hitbox);\n height: var(--_ui-modal-close-hitbox);\n margin: 0;\n padding: 0;\n border: none;\n border-radius: var(--ui-radius);\n background: none;\n color: var(--ui-text-inverted-color);\n font-size: var(--_ui-modal-close-size);\n opacity: var(--_ui-modal-close-opacity);\n cursor: pointer;\n }\n .ui.modal > .close > svg {\n width: 1em;\n height: 1em;\n }\n .ui.modal > .close:is(:hover, :focus-visible) {\n opacity: 1;\n }\n .ui.modal > .close:focus-visible {\n outline: var(--ui-focus-width) solid var(--ui-focus-color);\n outline-offset: calc(var(--ui-focus-width) * -1);\n }\n /* Inside the box: the element's dialog always; static markup below computers, fullscreen, or `inside`. */\n dialog.ui.modal > .close,\n .ui.modal > .close.inside,\n .ui.fullscreen.modal > .close {\n top: var(--_ui-modal-inner-close-top);\n right: var(--_ui-modal-inner-close-right);\n color: var(--_ui-modal-color);\n font-size: 1em;\n }\n @media (--ui-mobile), (--ui-tablet) {\n .ui.modal > .close {\n top: var(--_ui-modal-inner-close-top);\n right: var(--_ui-modal-inner-close-right);\n color: var(--_ui-modal-color);\n font-size: 1em;\n }\n }\n /* The header shorthand makes room for it. */\n .ui.modal:has(> .close) > .header {\n padding-inline-end: calc(var(--_ui-modal-close-hitbox) * 1.2);\n }\n\n /* Header (the shorthand, or static `.header`) */\n .ui.modal > .header {\n display: block;\n margin: 0;\n padding: 0.875em 1.05em;\n border-bottom: var(--ui-border-width) solid var(--ui-border-color);\n background: var(--_ui-modal-header-background);\n box-shadow: none;\n color: var(--_ui-modal-header-color);\n font-family: var(--ui-font-family-heading);\n }\n .ui.modal > .header:not(.ui) {\n font-size: var(--_ui-modal-header-size);\n font-weight: var(--ui-font-weight-bold);\n line-height: var(--ui-line-height-heading);\n }\n\n /* Content */\n .ui.modal > .content {\n box-sizing: border-box;\n display: block;\n width: 100%;\n padding: var(--ui-modal-content-padding, 1.5em);\n background: var(--_ui-modal-content-background);\n font-size: 1em;\n line-height: 1.4;\n }\n .ui.modal > .image.content {\n display: flex;\n flex-direction: row;\n }\n .ui.modal > .content > .image {\n display: block;\n flex: 0 1 auto;\n align-self: start;\n max-width: 100%;\n }\n .ui.modal > .content > .description {\n display: block;\n flex: 1 0 auto;\n align-self: start;\n min-width: 0;\n }\n .ui.modal > .content > :is(.icon, .image) + .description {\n flex: auto;\n width: auto;\n min-width: auto;\n padding-inline-start: var(--ui-modal-description-distance, 2em);\n }\n .ui.modal > .scrolling.content {\n max-height: var(--ui-modal-scrolling-height, calc(80dvh - 10em));\n overflow: auto;\n overscroll-behavior: none;\n }\n\n /* Actions */\n .ui.modal > .actions {\n padding: var(--ui-modal-actions-padding, 1em);\n border-top: var(--ui-border-width) solid var(--ui-border-color);\n background: var(--_ui-modal-actions-background);\n text-align: right;\n }\n .ui.modal .actions > .button:not(.fluid) {\n margin-inline-start: var(--ui-modal-button-distance, 0.75em);\n }\n .ui.modal > .left.actions {\n text-align: left;\n }\n .ui.modal > .left.actions > .button:not(.fluid) {\n margin-inline: 0.5em;\n }\n .ui.modal > :is(.centered, [class*=\"center aligned\"]) {\n text-align: center;\n }\n .ui.modal > :is(.centered, [class*=\"center aligned\"]).actions > .button:not(.fluid) {\n margin-inline: 0.5em;\n }\n\n /* Mobile: tighter header and content, stacked image content and buttons. */\n @media (--ui-mobile) {\n .ui.modal > .header {\n padding: 0.525em 0.7em;\n }\n .ui.modal > .content {\n display: block;\n padding: 1em;\n }\n .ui.modal .image.content {\n flex-direction: column;\n }\n .ui.modal > .content > .image {\n display: block;\n max-width: 100%;\n margin: 0 auto;\n padding: 0 0 1em;\n text-align: center;\n }\n .ui.modal > .content > .description,\n .ui.modal > .content > :is(.icon, .image) + .description {\n display: block;\n width: 100%;\n margin: 0;\n padding: 1em 0;\n }\n .ui.modal > .actions {\n padding: 1em 1em 0;\n }\n .ui.modal .actions > :is(.buttons, .button) {\n margin-bottom: 1em;\n }\n }\n}\n\n/*******************************\n Variations\n*******************************/\n\n@layer ui.components.modal.variations {\n /* ## Size: a width ratio and a header size; text stays the page's size. */\n .ui.mini.modal {\n --_modal-ratio: 0.4;\n --_ui-modal-header-size: 1.3em;\n }\n .ui.tiny.modal {\n --_modal-ratio: 0.6;\n --_ui-modal-header-size: 1.3em;\n }\n .ui.small.modal {\n --_modal-ratio: 0.8;\n --_ui-modal-header-size: 1.3em;\n }\n .ui.large.modal {\n --_modal-ratio: 1.2;\n --_ui-modal-header-size: 1.6em;\n }\n .ui.big.modal {\n --_modal-ratio: 1.4;\n --_ui-modal-header-size: 1.6em;\n }\n .ui.huge.modal {\n --_modal-ratio: 1.6;\n --_ui-modal-header-size: 1.6em;\n }\n .ui.massive.modal {\n --_modal-ratio: 1.8;\n --_ui-modal-header-size: 1.8em;\n }\n\n /*\n * Responsive widths (Fomantic's `@mobileWidth` ... `@widescreenMonitorWidth`); tablets never grow past 88%.\n * - The width's DEFAULT (`--_modal-width`), not the alias: a page's `--ui-modal-width` holds on every screen.\n */\n @media (--ui-tablet) {\n .ui.modal {\n --_modal-width: calc(88% * min(var(--_modal-ratio), 1));\n }\n }\n @media (--ui-computer) {\n .ui.modal {\n --_modal-width: calc(850px * var(--_modal-ratio));\n }\n }\n @media (--ui-large-monitor) {\n .ui.modal {\n --_modal-width: calc(900px * var(--_modal-ratio));\n }\n }\n @media (--ui-widescreen) {\n .ui.modal {\n --_modal-width: calc(950px * var(--_modal-ratio));\n }\n }\n\n /* ## Fullscreen: nearly the whole width; `overlay fullscreen` edge to edge, full height. */\n .ui.fullscreen.modal {\n --_ui-modal-width: 95%;\n }\n dialog.ui.fullscreen.modal {\n margin-block: 1em;\n }\n .ui.overlay.fullscreen.modal {\n --_ui-modal-width: 100%;\n border-radius: 0;\n }\n dialog.ui.overlay.fullscreen.modal {\n height: 100dvh;\n max-height: 100dvh;\n margin: 0;\n }\n\n /* ## Aligned: pinned near the top or bottom instead of centred. */\n dialog.ui[class*=\"top aligned\"].modal {\n margin-block: var(--_ui-modal-aligned-margin) auto;\n }\n dialog.ui[class*=\"bottom aligned\"].modal {\n margin-block: auto var(--_ui-modal-aligned-margin);\n }\n @media (--ui-mobile) {\n .ui.modal {\n --_modal-aligned-margin: 1em;\n }\n }\n\n /* ## Scrolling: capped by the viewport, scrolls inside (the dialog's own scroll box). */\n dialog.ui.scrolling.modal {\n max-height: calc(100dvh - 4em);\n }\n\n /* ## Basic: no box, light text on the dimmer. */\n .ui.basic.modal {\n --_ui-modal-basic: 1;\n --_ui-modal-background: transparent;\n --_ui-modal-color: var(--ui-text-inverted-color);\n --_ui-modal-header-color: var(--ui-text-inverted-color);\n --_ui-modal-header-background: transparent;\n --_ui-modal-content-background: transparent;\n --_ui-modal-actions-background: transparent;\n border-radius: 0;\n box-shadow: none;\n }\n .ui.basic.modal > .header {\n border-bottom: none;\n }\n .ui.basic.modal > .actions {\n border-top: none;\n }\n .ui.basic.modal > .close {\n top: 1em;\n right: 1.5em;\n color: var(--ui-text-inverted-color);\n }\n\n /* ## Inverted: the dark scheme; parts re-resolve their tokens from it. */\n .ui.inverted.modal {\n --ui-inverted: 1;\n --ui-scheme: dark;\n color-scheme: dark;\n }\n}\n\n/*******************************\n States\n*******************************/\n\n@layer ui.components.modal.states {\n /* Shown (static markup; the element's dialog shows while `[open]`). */\n .ui.active.modal {\n display: block;\n }\n}\n","import { E } from \"spell/ui/core\"\nimport { modalVocabulary } from \"./UIModal.en\"\nimport { DialogComponent } from \"./DialogComponent\"\nimport type { Vocabulary } from \"./UIModal.types\"\n\nimport modalCSS from \"./UIModal.css?inline\"\n\n/****************\n * ### `UIModal`\n * The component behind `<ui-modal>`:\n * a modal dialog, a shadow `<dialog class=\"ui … modal\" part=\"modal\">` shown with `showModal()`.\n *\n * - The browser gives it the focus trap, the `inert` page, the top layer and the `::backdrop`:\n * the dimmer, themed by the shared `--ui-dimmer-*` tokens. No `<ui-dimmer>` element.\n * - All of its behaviour is `DialogComponent`'s, which `<ui-flyout>` shares:\n * this class only names and styles it.\n * - shared: `visible` / `hidden`, `closedby`, approve / deny, the close icon, invoker commands, its name\n * - `UI.modals.confirm()` / `alert()` / `prompt()` draw one of these (`ModalDialogs`, registered by the barrel).\n ****************/\nexport class UIModal extends DialogComponent<Vocabulary> {\n @E.proto static vocabulary = modalVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { modal: modalCSS },\n // the sheet's own transition is Fomantic's `scale`: faded in from 80%\n animation: \"scale\"\n } satisfies Partial<E.ElementSetup>\n @E.proto static rootPart = \"modal\"\n @E.proto static overlayKind = \"modal\" as const\n @E.proto static shownClass = \"active\"\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIModal extends E.AttributeValues<typeof modalVocabulary> {}\n","import { E, UI, UIT } from \"spell/ui/core\"\nimport { modalVocabulary } from \"./UIModal.en\"\nimport { type Vocabulary } from \"./UIModal.types\"\n\n/****************\n * ### `ModalDialogs`\n * The dialogs behind `UI.modals.confirm()` / `alert()` / `prompt()` (Fomantic's `$.modal('confirm', …)`):\n * a `<ui-modal>` built for the call, appended to `<body>`, shown (`visible`), and removed once hidden.\n *\n * - Markup: `<ui-modal size=\"tiny\" closedby=\"closerequest\" heading=\"title\">` holding\n * - a `<ui-content>`: the message as a `<p>`, or for `prompt()` a `<label>` around it and an `<input>`\n * - `<ui-actions>`: a deny button (`cancel`, first: it takes the initial focus, the least destructive choice)\n * and a primary approve button.\n * - Escape denies (`closedby=\"closerequest\"`: no dimmer clicks, so a stray click can't answer).\n * - The promise settles once the modal is HIDDEN (`ui-closed`), so a caller can open the next dialog straight away.\n * - Button texts: `okText` / `cancelText`, else the translated `ok` / `cancel` texts (`UI.i18n`).\n * - Everything is light DOM built with `createElement` / `textContent`: never `innerHTML` with caller text.\n * - Other families' tags (`<ui-content>`, `<ui-actions>`, `<ui-button>`) are looked up at CALL time,\n * by class noun, in the vocabulary registry (`UI.vocabulary`).\n * - Why: importing their vocabulary files would reach into other families' files,\n * which `AGENTS.md` keeps behind `spell/ui/core`.\n * - The family barrel imports `parts` and `button`, so both are defined before any dialog opens.\n * - Registered by the family barrel as `UI.modals`' provider; the runtime never imports it.\n ****************/\nexport class ModalDialogs implements E.ModalProvider {\n /** Page the dialogs are made in; a test passes its own. */\n readonly document: Document\n\n constructor({ document = globalThis.document }: ModalDialogsProps = {}) {\n this.document = document\n }\n\n /** Ask a yes / no question: resolves `true` on approve, `false` on deny or Escape. */\n confirm(options: E.ModalOptions): Promise<boolean> {\n return this.run(options, { canDeny: true }, (isApproved) => isApproved)\n }\n\n /** Tell `options.message`: resolves once the dialog has hidden, however it closed. */\n alert(options: E.ModalOptions): Promise<void> {\n return this.run(options, { canDeny: false }, () => undefined)\n }\n\n /** Ask for one line of text: resolves with it on approve, `undefined` on deny or Escape. */\n prompt(options: E.ModalOptions): Promise<string | undefined> {\n return this.run(options, { canDeny: true, input: options.value ?? \"\" }, (isApproved, value) =>\n isApproved ? value : undefined\n )\n }\n\n /**\n * Build, open and await one dialog; `result()` turns \"approved?\" and the input's value into the answer.\n * - SIDE EFFECT: a `<ui-modal>` in `<body>` until it has hidden.\n * - Throws when the parts or `<ui-button>` aren't registered (`tagFor()`).\n */\n private run<T>(\n options: E.ModalOptions,\n { canDeny, input }: { canDeny: boolean; input?: string },\n result: (isApproved: boolean, value: string) => T\n ): Promise<T> {\n const modal = this.document.createElement(modalVocabulary.tag) as HTMLElement & { visible: boolean }\n modal.setAttribute(SIZE, TINY)\n modal.setAttribute(\"closedby\", \"closerequest\")\n if (options.title) modal.setAttribute(UIT.HEADING, options.title)\n else modal.setAttribute(\"aria-label\", options.message)\n const content = this.document.createElement(ModalDialogs.tagFor(UIT.CONTENT))\n const field = input === undefined ? undefined : this.input(input)\n content.append(field ? this.label(options.message, field) : this.paragraph(options.message))\n const actions = this.document.createElement(ModalDialogs.tagFor(ACTIONS))\n if (canDeny) actions.append(this.button(options.cancelText ?? UI.i18n.t(CANCEL), CANCEL))\n const approve = this.button(options.okText ?? UI.i18n.t(OK), APPROVE_CLASS)\n approve.setAttribute(COLOR, PRIMARY)\n actions.append(approve)\n modal.append(content, actions)\n field?.addEventListener(\"keydown\", (event) => {\n if (event.key === UIT.Key.enter) approve.click()\n })\n this.document.body.append(modal)\n modal.visible = true\n return new Promise<T>((resolve) => {\n let isApproved = false\n modal.addEventListener(APPROVE_EVENT, () => (isApproved = true))\n modal.addEventListener(\n HIDE_EVENT,\n () => {\n modal.remove()\n resolve(result(isApproved, field?.value ?? \"\"))\n },\n { once: true }\n )\n })\n }\n\n /** The message as a paragraph. */\n private paragraph(message: string): HTMLParagraphElement {\n const paragraph = this.document.createElement(\"p\")\n paragraph.textContent = message\n return paragraph\n }\n\n /** `prompt()`'s text input, focused when the dialog opens. */\n private input(value: string): HTMLInputElement {\n const input = this.document.createElement(\"input\")\n input.type = \"text\"\n input.value = value\n input.autofocus = true\n return input\n }\n\n /** The message as the input's `<label>`, in the opt-in native look (`native.css`). */\n private label(message: string, input: HTMLInputElement): HTMLLabelElement {\n const label = this.document.createElement(\"label\")\n label.className = NATIVE_LOOK\n label.style.cssText = LABEL_LAYOUT\n label.append(message, input)\n return label\n }\n\n /** A `<ui-button>` with Fomantic's action class (`approve` / `cancel`). */\n private button(text: string, actionClass: string): HTMLElement {\n const button = this.document.createElement(ModalDialogs.tagFor(UIT.BUTTON))\n button.className = actionClass\n button.textContent = text\n return button\n }\n\n /**\n * Canonical tag of the registered component whose class noun is `noun` (`button` => `ui-button`).\n * - Throws when none is registered: a dialog built from undefined elements would look right and not work.\n * - Static: it reads only the page-wide vocabulary registry.\n */\n private static tagFor(noun: string): string {\n for (const vocabulary of UI.vocabulary.vocabularies.values()) if (vocabulary.noun === noun) return vocabulary.tag\n throw new Error(\n `UI.modals: no component with the class noun \"${noun}\" is registered; ` +\n `import its family (\\`spell/ui/components/ui-parts\\`, \\`ui-button\\`) before opening a dialog`\n )\n }\n}\n\n/** Constructor props for `ModalDialogs`. */\nexport type ModalDialogsProps = {\n /** page to build in. Default: the global `document`. */\n document?: Document\n}\n\n/** An approve element was activated: the dialog answers yes. */\nconst APPROVE_EVENT: E.EventName<Vocabulary> = \"ui-approving\"\n\n/** Hidden: the call settles. */\nconst HIDE_EVENT: E.EventName<Vocabulary> = \"ui-closed\"\n\n/** `<ui-modal>` width attribute (canonical name). */\nconst SIZE = \"size\"\n\n/** The dialogs' width. */\nconst TINY = \"tiny\"\n\n/** Class noun of the actions part (`<ui-actions>`). */\nconst ACTIONS = \"actions\"\n\n/** `<ui-button>` colour of the approve button. */\nconst PRIMARY = \"primary\"\n\n/** `<ui-button>`'s `color`, which `PRIMARY` is a value of (epic `ui-gaps` P4). */\nconst COLOR = \"color\"\n\n/** Fomantic's approve class of a button. */\nconst APPROVE_CLASS = \"approve\"\n\n/** Fomantic's deny class of a button, and the text key of its label. */\nconst CANCEL = \"cancel\"\n\n/** Text key of the approve button's label. */\nconst OK = \"ok\"\n\n/** `native.css`'s opt-in class, for the prompt's input. */\nconst NATIVE_LOOK = \"ui-native\"\n\n/** The prompt's label: message above a full-width input. */\nconst LABEL_LAYOUT = \"display: grid; gap: 0.5em\"\n","/**\n * The modal family: defines `<ui-modal>` and exports its component, `UIModal`.\n * - SIDE EFFECTS:\n * - defines `<ui-modal>`, the owner of the `header`, `content`, `description` and `actions` parts,\n * and those parts and `<ui-button>` too (`UI.modals.*` builds its dialogs from them)\n * - registers `ModalDialogs` as `UI.modals`' provider once the runtime has loaded,\n * so `UI.modals.confirm()` / `alert()` / `prompt()` work\n * - Also exports `DialogComponent`, the base `<ui-flyout>` (`spell/ui/components/ui-flyout`) builds on.\n * - Also the library's `spell/ui/ui-modal` entry (its size is in `notes/report.md`).\n */\n\nimport { E, UI } from \"spell/ui/core\"\nimport { DialogComponent } from \"./DialogComponent\"\nimport { UIModal } from \"./UIModal\"\nimport { ModalDialogs } from \"./ModalDialogs\"\n\nimport \"spell/ui/components/ui-parts\"\nimport \"spell/ui/components/ui-button\"\n\nUIModal.define()\nif (E.isBrowser()) void UI.load().then(() => UI.modals.register(new ModalDialogs()))\n\nexport { DialogComponent, UIModal, ModalDialogs }\nexport type { DialogAttributes } from \"./UIModal.types\"\n"],"mappings":";;;;;;;2FAAA4D,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAvD,GAAAC,GAAAC,GAAAyD,GA2DsBC,IAAf,MAAe,0BAEZ,IAAAzD,GAER,IAAA,CAACC,CAAE,GAuFH,IAAA,CAACC,CAAE,GAyCH,IAAA,CAACC,EAAE,GA0DH,IAAA,CAACC,EAAK,SAAS,CAAA,GAuBf,IAAA,CAACF,CAAE,GAoCH,IA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IAAQ,KAAK,SAAS,cAAc,OAAO;EAIjD,OAHA,EAAM,YAAYiE,IAClB,EAAM,MAAM,UAAUC,IACtBlE,EAAM,OAAOgE,GAASf,CAAK,GACpBjD;CACT;CAGA,OAAe,GAAc,GAAkC;EAC7D,IAAMmE,IAAS,KAAK,SAAS,cAAc,aAAa,OAAO3I,EAAU,CAAC;EAG1E,OAFA,EAAO,YAAY4I,GACnB,EAAO,cAAcC,GACdF;CACT;CAOA,OAAe,OAAO,GAAsB;EAC1C,KAAK,IAAMG,KAAclF,EAAG,WAAW,aAAa,OAAO,GAAG,IAAIkF,EAAW,SAASC,GAAM,OAAOD,EAAW;EAC9G,MAAU,MACR,iDAAiDC,EAAK,8GAExD;CACF;AACF,GASMZ,KAAyC,gBAGzCC,KAAsC,aAGtCf,KAAO,QAGPC,KAAO,QAGPK,KAAU,WAGVO,KAAU,WAGVD,KAAQ,SAGRD,KAAgB,WAGhBH,IAAS,UAGTE,KAAK,MAGLU,KAAc,aAGdC,KAAe;AChKrB5B,EAAQ,OAAO,GACX7G,GAAY,KAAG2D,EAAQ,KAAK,CAAC,CAAC,WAAWA,EAAG,OAAO,SAAS,IAAImD,EAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"ui-modal.js","names":["this","ref={(element) => this.dialog = element}","<Show when={this.heading}>\n <div id={this.headerId} class={UIT.HEADER} part={this.dialogPart(UIT.HEADER)}>\n {this.heading}\n </div>\n </Show>","class={UIT.HEADER}","part={this.dialogPart(UIT.HEADER)}","<div id={this.headerId} class={UIT.HEADER} part={this.dialogPart(UIT.HEADER)}>\n {this.heading}\n </div>","<dialog\n ref={(element) => this.dialog = element}\n class={this.rootClass}\n part={this.dialogPart(this.rootPart)}\n aria-labelledby={isServer ? this.serverLabelledBy() : void 0}\n onCancel={this.onCancel}\n onClose={this.onClose}\n onPointerDown={this.onPointerDown}\n onClick={this.onDialogClick}\n >\n <Show when={this.heading}>\n <div id={this.headerId} class={UIT.HEADER} part={this.dialogPart(UIT.HEADER)}>\n {this.heading}\n </div>\n </Show>\n <Show when={this.content}>\n <div class={UIT.CONTENT} part={this.dialogPart(UIT.CONTENT)}>\n {this.content}\n </div>\n </Show>\n <slot />\n {this.closeButton.draw()}\n </dialog>","<Show when={this.content}>\n <div class={UIT.CONTENT} part={this.dialogPart(UIT.CONTENT)}>\n {this.content}\n </div>\n </Show>","part={this.dialogPart(UIT.CONTENT)}","<div class={UIT.CONTENT} part={this.dialogPart(UIT.CONTENT)}>\n {this.content}\n </div>","part={this.dialogPart(this.rootPart)}","aria-labelledby={isServer ? this.serverLabelledBy() : void 0}","_elementSetup_dec","_a","_init","E.UIComponent","E.protoMerged","E.untracked","E.whileConnected","E.on","E.state","E.onChange","E.Disclosure","E.CloseButton","UIT.CLOSE","_$createComponent","_$readShallow","UIT.HEADER","_$setAttribute","UIT.CONTENT","_$getOwner","__name","_$delegateEvents","E.proto","E.protoMerged","__name","modalCSS","UIT.HEADING","UIT.CONTENT","UIT.BUTTON","E.isBrowser","ModalActions","__name$1","HEADER","Key","__publicField","__decorateElement","HEADING","__decoratorMetadata","__runInitializers","__privateAdd","AnimationLookup","BUTTON","ToggleCommands","CLOSE","__decoratorStart","getOwner$1","_tmpl$","_tmpl$2","_onNameChanged_dec","_onSlotChange_dec","_slottedHeading_dec","_onClose_dec","_closedBy_dec","_onCommand_dec","_watchPlacement_dec","_requestClose_dec","_elementSetup_dec$1","_a$1","_init$1","_slottedHeading","_DialogComponent","UIComponent","protoMerged","untracked","whileConnected","on","state","onChange","args","reason","Disclosure","visible","dialog","event","box","x","y","closedBy","CloseButton","found","kind","action","detail","originalEvent","soon","keyframes","animation","UI","wasShown","isModeless","isNative","generation","animations","name","CLOSABLE","child","hasHeader","header","reflected","label","heading","_self$","_el$","_el$3","_el$5","_el$6","addEvent","ref","element","insert","createComponent","Show","_el$2","effect","readShallow","_p$","setAttribute","className","t","a","_el$4","CONTENT","isServer","target","domElement","DialogComponent","delegateEvents","modalVocabulary","UIModal_default","_shownClass_dec","_overlayKind_dec","_rootPart_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_UIModal","proto","UIModal","ModalDialogs","document","options","isApproved","value","modal","SIZE","TINY","content","field","input","actions","ACTIONS","canDeny","CANCEL","approve","OK","APPROVE_CLASS","COLOR","PRIMARY","APPROVE_EVENT","HIDE_EVENT","resolve","result","paragraph","message","NATIVE_LOOK","LABEL_LAYOUT","button","actionClass","text","vocabulary","noun","isBrowser"],"sources":["../src/components/ui-modal/DialogComponent.tsx","../src/components/ui-modal/UIModal.en.ts","../src/components/ui-modal/UIModal.css?inline","../src/components/ui-modal/UIModal.tsx","../src/components/ui-modal/ModalDialogs.ts","../src/components/ui-modal/index.ts"],"sourcesContent":["import { Show } from \"solid-js\"\nimport { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UI, UIT } from \"spell/ui/core\"\nimport { type DialogAttributes, type DialogEventName } from \"./UIModal.types\"\n\n/****************\n * ### `DialogComponent`\n * The base of the components behind `<ui-modal>` and `<ui-flyout>`:\n * everything they do, on a shadow `<dialog class=\"ui … <noun>\" part=\"<rootPart>\">` shown with `showModal()`.\n * The browser gives it the focus trap, the `inert` page, the top layer and the `::backdrop` (the dimmer).\n * A subclass may be MODELESS (`isModeless`: `<ui-flyout modeless>`): `show()`, the page left usable;\n * a click on the page closes the dialog, and still lands where it went.\n *\n * - A subclass adds only its names and looks:\n * `vocabulary`, `elementSetup.styleSheets` (and `animation`), `rootPart`, `overlayKind`, `shownClass`.\n *\n * - In the modal family, not `src/elements/`: a flyout IS Fomantic's side modal\n * (the same parts, buttons, events and dismissal), and nothing else shares it yet.\n * A third, non-modal overlay would move it to `src/elements/` (`agents/CODE-DEBT.md`, `ui`).\n *\n * - Every dialog vocabulary MUST name (each family's tests check it; types can't):\n * - attributes `closable`, `closedby`, `heading`, `content`\n * - events `ui-opening`, `ui-opened`, `ui-closing`, `ui-closed`, `ui-approving`, `ui-denying`\n * - parts `rootPart`, `header`, `content`, `close`; text `close`.\n *\n * - Shown by the shared `visible` / `hidden` (`UIComponent`, \"Shown or hidden\"), starting hidden\n * (`elementSetup.visible`): `<ui-modal visible>`, `modal.visible = true`.\n * - Controlled (`isVisible`): a person's `ui-opening` / `ui-closing` (with a `reason`) come first and can veto;\n * `ui-opened` / `ui-closed` follow once the transition has finished.\n * - The `<dialog>` opens with `showModal()` and closes with `close()` as `visible` changes (`onVisibleChange()`).\n *\n * - Dismissal, by `closedby` (read when it opens; `closedBy` says what an absent one means):\n * - Escape: through `UI.overlays` (kind `overlayKind`: scroll lock, keyboard scope, focus restore),\n * so only the topmost overlay closes, and `ui-closing` can veto.\n * The dialog's own `cancel` is always prevented.\n * - A click on the `::backdrop`: the browser's light dismiss (`<dialog closedby>`)\n * when `UI.browser.supports.dialogClosedBy`, reported as `cancel`;\n * else `UI.overlays`' outside click, which tells a backdrop click from one on the dialog by where the pointer is.\n * - A close the browser forces anyway (a repeated Escape it won't let a page veto) is followed:\n * a `ui-closing` that can't veto, then `visible` off.\n *\n * - Opening as a PERSON'S action, so `ui-opening` fires:\n * an invoker command, `<button commandfor=\"id\" command=\"--show\">`\n * (`ToggleCommands`; `--close` closes, `--toggle` flips).\n * Writing `visible` (or `hidden`) is the app's own decision, and fires nothing.\n *\n * - Buttons: a click on an approve / deny element fires the cancelable `ui-approving` / `ui-denying`, then closes.\n * - Those elements (`ModalActionSelectors`):\n * Fomantic's `.approve` / `.deny` classes, `<ui-button color=\"positive\">` / `\"negative\"` (and the old\n * `<ui-button color=\"negative\">`).\n * - The `closable` icon closes (reason `close`).\n *\n * - `closable=\"false\"` is Fomantic's `closable: false` AND `closeIcon: false`:\n * no icon, and (unless `closedby` is set) `closedby=\"none\"`, so Escape and the dimmer do nothing.\n *\n * - Its name: the DOM element's `aria-label`, else the `heading` shorthand, else a slotted `<ui-header>`\n * (by element reflection: an idref can't reach into the light DOM from the shadow root).\n ****************/\nexport abstract class DialogComponent<\n V extends E.ComponentVocabulary = E.ComponentVocabulary\n> extends E.UIComponent<V> {\n /** Starts hidden, unless the page writes `visible`. */\n @E.protoMerged static elementSetup: Partial<E.ElementSetup> = { visible: \"hidden\" }\n\n /** Part name of the `<dialog>`, e.g. `modal`. */\n declare rootPart: string\n\n /** `UI.overlays` kind: `modal` or `flyout`. */\n declare overlayKind: E.OverlayKind\n\n /**\n * Hook: shown without blocking the page (`show()`, not `showModal()`).\n * - No `::backdrop`, no scroll lock, no focus trap.\n * - A click on the page lands, and closes it (light dismiss, `closedby=\"any\"`).\n * - Default `false`; `<ui-flyout modeless>`.\n */\n protected get isModeless(): boolean {\n return false\n }\n\n // The dialog attributes this base reads (see the class docs):\n // each vocabulary's getters, declared here since `V` is unknown to this class.\n\n /** `closable`: the close icon; `false` (written) is also Fomantic's `closable: false`. */\n declare closable: boolean\n\n /** `closedby`: what dismisses it, as written; see `closedBy` for what it means. */\n declare closedby: DialogAttributes[\"closedby\"] | undefined\n\n /** `heading`: the heading shorthand (old name `header`). */\n declare heading: string | undefined\n\n /** `content`: the content shorthand. */\n declare content: string | undefined\n\n /** The dialog. */\n protected dialog?: HTMLDialogElement\n\n /**\n * This element's `UI.overlays` entry; its Escape / outside options follow `closedby` when it opens.\n * - `kind` is the subclass's `overlayKind`, set in the constructor (a prototype value TypeScript can't see here).\n */\n private readonly overlayEntry: E.OverlayEntry = {\n element: this.domElement,\n kind: \"modal\",\n onDismiss: (reason: E.DismissReason) => void this.requestClose(reason)\n }\n\n constructor(...args: ConstructorParameters<typeof E.UIComponent>) {\n super(...args)\n this.overlayEntry.kind = this.overlayKind\n }\n\n ////////////////\n // ## Shown or hidden\n ////////////////\n\n /** Fomantic's class word on the `<dialog>` while it shows: `active` (a modal), `visible` (a flyout). */\n declare shownClass: string\n\n /** Bumped on every show / hide, so a late `ui-opened` / `ui-closed` of an earlier one is dropped. */\n private generation = 0\n\n /** Fomantic's shown class (`shownClass`), just before the noun while `visible`. */\n protected get extraClass(): string | undefined {\n return this.isVisible ? this.shownClass : undefined\n }\n\n /**\n * Shown or hidden, as `visible` (`isVisible`): `ui-opening` / `ui-closing` first, `ui-opened` / `ui-closed` once\n * its transition ends (`onVisibleChange()`).\n */\n readonly disclosure = new E.Disclosure({\n component: this,\n member: \"isVisible\",\n detail: (visible, originalEvent): UIT.ModalOpenDetail | UIT.ModalCloseDetail =>\n visible ? { visible, originalEvent } : { visible, reason: this.closeReason, originalEvent },\n afterDetail: (visible): UIT.ModalOpenDetail => ({ visible })\n })\n\n /** Why the latest close was asked for: `ui-closing`'s `reason`. */\n private closeReason: UIT.ModalCloseReason = \"escape\"\n\n /** Show, dispatching the cancelable `ui-opening` first; true when applied. */\n requestOpen(originalEvent?: Event): boolean {\n return this.disclosure.open(originalEvent)\n }\n\n /** Hide for `reason`, dispatching the cancelable `ui-closing` first; true when applied. */\n @E.untracked\n requestClose(reason: UIT.ModalCloseReason, originalEvent?: Event): boolean {\n if (!this.isVisible) return false\n this.isDismissing = true\n E.soon(() => (this.isDismissing = false))\n this.closeReason = reason\n return this.disclosure.close(originalEvent)\n }\n\n /**\n * `visible` changed (`UIComponent`'s hook): open or close the `<dialog>`;\n * resolves once its transition has ended, with `ui-opened` / `ui-closed`.\n * - `animation`:\n * - the family's own (`elementSetup.animation`): the sheet's transition (`UIModal.css`, `UIFlyout.css`)\n * - another one (the element's own `animation`): run on the `<dialog>` through `UI.transitions`\n * - `none`: at once (motion off, or the element's first draw)\n * - `ui-closed` only when it was shown: a modal that starts hidden fires nothing.\n */\n protected async onVisibleChange(visible: boolean, animation: UIT.Animation): Promise<void> {\n const dialog = this.dialog\n if (!dialog) return\n const keyframes = UIT.AnimationLookup.keyframesBeside(animation, this.elementSetup.animation)\n if (visible) {\n this.show()\n if (keyframes) await UI.transitions.animate({ element: dialog, name: keyframes, direction: UIT.IN })\n if ((await this.transitionsEnd()) && this.isVisible) this.disclosure.sendAfter(true)\n return\n }\n const wasShown = UI.overlays.isOpen(this.overlayEntry)\n if (keyframes && wasShown) await UI.transitions.animate({ element: dialog, name: keyframes, direction: UIT.OUT })\n // shown again while the keyframes ran\n if (this.isVisible) return\n this.hide()\n if (!wasShown || !(await this.transitionsEnd())) return\n if (!this.isVisible && this.domElement.isConnected) this.disclosure.sendAfter(false)\n }\n\n /**\n * Shown again when it comes back into the page while `visible`; closed, quietly, when it leaves.\n * - Not on the first connect: the dialog isn't drawn yet, and `onVisibleChange()` runs once it is.\n */\n @E.whileConnected\n protected watchPlacement() {\n if (this.isVisible && this.isReady) this.show()\n return () => this.hide()\n }\n\n /**\n * `showModal()` (`show()` when `isModeless`) and register with `UI.overlays`; nothing when already open.\n * - Modeless: the overlay entry isn't `modal` (no scroll lock), and the page stays usable.\n * - A click on the page LIGHT-DISMISSES it (`any`, the default), through the overlay entry, never the browser's:\n * the click still lands where it went.\n * - Its opener (`commandfor`) and a click inside don't count.\n * - `closedby` is applied here:\n * natively when supported (the browser's light dismiss), else by the overlay entry's outside-click handling.\n * - A `<dialog>` that other keyframes animated out (`hidden` on it) shows again first.\n */\n private show() {\n const dialog = this.dialog\n if (!dialog) return\n const isModeless = this.isModeless\n const closedBy = this.closedBy\n // modeless: our own outside-click handling, which lets the click through (the browser's needs a backdrop)\n const isNative = UI.browser.supports.dialogClosedBy && !isModeless\n if (isNative) dialog.setAttribute(\"closedby\", closedBy)\n else dialog.removeAttribute(\"closedby\")\n this.overlayEntry.closeOnEscape = closedBy !== \"none\"\n this.overlayEntry.closeOnOutsideClick = !isNative && closedBy === \"any\"\n this.overlayEntry.modal = !isModeless\n UI.transitions.reveal(dialog)\n if (!dialog.open) {\n if (isModeless) dialog.show()\n else dialog.showModal()\n UI.focus.enter(dialog)\n }\n UI.overlays.open(this.overlayEntry)\n }\n\n /** `close()` the dialog, THEN leave `UI.overlays` (whose focus restore needs the page no longer `inert`). */\n private hide() {\n const dialog = this.dialog\n if (dialog?.open) dialog.close()\n UI.overlays.close(this.overlayEntry)\n }\n\n /** Once the dialog's own transitions end: `true` unless another show / hide started meanwhile. */\n private async transitionsEnd(): Promise<boolean> {\n const generation = ++this.generation\n const animations = this.dialog?.getAnimations() ?? []\n await Promise.allSettled(animations.map((animation) => animation.finished))\n return generation === this.generation\n }\n\n /** `send()` one of the events every dialog vocabulary names (see the class docs). */\n private fire(name: DialogEventName, detail: object): boolean {\n return this.send(name as E.EventName<V>, detail)\n }\n\n /** An invoker command aimed at the DOM element (`UIT.ToggleCommands`). */\n @E.on(\"command\")\n protected onCommand(event: Event) {\n const action = UIT.ToggleCommands.action(event, this.isVisible)\n if (action === \"show\") this.requestOpen(event)\n else if (action === \"close\") this.requestClose(\"close\", event)\n }\n\n ////////////////\n // ## Dismissal\n ////////////////\n\n /** A dismissal was asked for in this task: the dialog's own `cancel` for the same key press is ignored. */\n private isDismissing = false\n\n /** The last press started on the `::backdrop`. */\n private pressStartedOnBackdrop = false\n\n /**\n * What dismisses it: an explicit `closedby` wins;\n * else `none` for `closable=\"false\"` (Fomantic's `closable: false`), else `any`.\n * - NOTE: `closedby` has a vocabulary default, so whether it was written is read off the DOM element.\n * - Untracked.\n */\n @E.untracked\n private get closedBy(): NonNullable<DialogAttributes[\"closedby\"]> {\n if (this.domElement.hasAttribute(\"closedby\")) return this.closedby ?? \"any\"\n // NOTE: an absent boolean also converts to `false`, so `closable` must be present to mean \"closable: false\"\n const isOff = this.domElement.hasAttribute(CLOSABLE) && !this.closable\n return isOff ? \"none\" : \"any\"\n }\n\n /** Remember whether a press started on the `::backdrop` (the dialog itself, outside its box). */\n private readonly onPointerDown = (event: PointerEvent) => {\n const dialog = this.dialog\n if (!dialog || event.target !== dialog) return void (this.pressStartedOnBackdrop = false)\n const box = dialog.getBoundingClientRect()\n const { clientX: x, clientY: y } = event\n this.pressStartedOnBackdrop = x < box.left || x > box.right || y < box.top || y > box.bottom\n }\n\n /**\n * The dialog's `cancel`: Escape the overlay didn't take, or the browser's light dismiss (`closedby`).\n * - Always prevented; the element decides, by `closedby`, and `ui-closing` may veto.\n */\n private readonly onCancel = (event: Event) => {\n event.preventDefault()\n const reason = this.pressStartedOnBackdrop ? \"outside\" : \"escape\"\n this.pressStartedOnBackdrop = false\n if (this.isDismissing) return\n const closedBy = this.closedBy\n if (closedBy === \"none\" || (reason === \"outside\" && closedBy !== \"any\")) return\n this.requestClose(reason, event)\n }\n\n /**\n * The dialog closed while the element thinks it's open: the browser forced it -- follow.\n * - `close` is queued as a task:\n * one from an earlier close can arrive after a quick re-open, when the dialog is open again -- ignored.\n */\n @E.untracked\n private readonly onClose = (event: Event) => {\n if (this.dialog?.open || !this.domElement.isConnected) return\n this.closeReason = \"escape\"\n this.disclosure.adopt(false, event)\n }\n\n ////////////////\n // ## Buttons\n ////////////////\n\n /** The close icon, while `closable`. */\n readonly closeButton = new E.CloseButton({\n owner: this,\n shows: () => !!this.closable,\n label: () => this.closeText,\n part: this.dialogPart(UIT.CLOSE),\n onClick: (event) => this.onCloseIcon(event)\n })\n\n /**\n * The close icon's label (`translationForKey(\"close\")`).\n * - Not a cast in the JSX, for the reason `dialogPart()` is a method.\n */\n private get closeText(): string {\n return this.translationForKey(UIT.CLOSE as E.TextKey<V>)\n }\n\n /** Close icon. */\n private readonly onCloseIcon = (event: MouseEvent) => {\n event.stopPropagation()\n this.requestClose(\"close\", event)\n }\n\n /** A click inside: an approve / deny element asks, then closes. */\n private readonly onDialogClick = (event: MouseEvent) => {\n const found = DialogComponent.actionFor(event, this.domElement)\n if (!found) return\n const [kind, action] = found\n const detail: UIT.ModalActionDetail = { action, originalEvent: event }\n if (!this.fire(kind === \"approve\" ? \"ui-approving\" : \"ui-denying\", detail)) return\n this.requestClose(kind, event)\n }\n\n ////////////////\n // ## The name\n ////////////////\n\n /** The DOM element's `aria-label`, forwarded to the dialog. */\n get ariaLabel(): string | undefined {\n return this.attributes[\"aria-label\"] ?? undefined\n }\n\n /**\n * First slotted `<ui-header>` (any tag whose noun is `header`), which names the dialog.\n * - Read on the server too, NO `isServer` guard:\n * the static render (`spell/ui/static`, on linkedom elements) names the dialog by it (`serverLabelledBy()`).\n */\n @E.state accessor slottedHeading: Element | undefined = this.findHeading()\n\n /** Id of the `heading` shorthand, from `UI.ids` once rendering. */\n private headerId = \"\"\n\n /** The light DOM's slotted children changed: look for the heading again. */\n @E.on(\"slotchange\", { target: \"renderRoot\" })\n protected onSlotChange() {\n this.slottedHeading = this.findHeading()\n }\n\n /** First child element whose definition's noun is `header` (a `<ui-header>`, or a translated one). */\n private findHeading(): Element | undefined {\n for (const child of this.domElement.children) {\n if (E.UIComponent.registry.definitions.get(child.localName)?.vocabulary.noun === UIT.HEADER) return child\n }\n return undefined\n }\n\n /** The dialog's name: its `aria-label`, else `aria-labelledby` the `heading` shorthand, else the slotted heading. */\n @E.onChange(\"isReady\", \"ariaLabel\", \"heading\", \"slottedHeading\")\n protected onNameChanged(\n _isReady: boolean,\n label: string | undefined,\n header: string | undefined,\n heading: Element | undefined\n ) {\n const dialog = this.dialog\n if (!dialog) return\n const hasHeader = !!header\n const reflected = dialog as unknown as { ariaLabelledByElements: Element[] | null }\n if (label) dialog.setAttribute(\"aria-label\", label)\n else dialog.removeAttribute(\"aria-label\")\n // NOTE: setting the reflected list (even to `null`, the platform's \"none\") rewrites the attribute,\n // so it goes first\n reflected.ariaLabelledByElements = !label && !hasHeader && heading ? [heading] : null\n if (!label && hasHeader) dialog.setAttribute(\"aria-labelledby\", this.headerId)\n }\n\n /**\n * The dialog's `aria-labelledby` in a server render (`spell/ui/static`):\n * the `heading` shorthand's id, else the slotted heading's,\n * unless the DOM element has an `aria-label` (which the static output moves onto the dialog).\n * - Why: on a server no effect applies and no element reflects.\n * - SIDE EFFECT: gives the slotted heading (the render's parsed copy) an id if it has none.\n */\n private serverLabelledBy(): string | undefined {\n if (this.ariaLabel) return undefined\n if (this.heading) return this.headerId\n const heading = this.slottedHeading\n return heading ? UI.ids.ensure(heading, `ui-${this.elementDefinition.vocabulary.noun}-heading`) : undefined\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n render(): JSX.Element {\n this.headerId = UI.ids.next(`ui-${this.elementDefinition.vocabulary.noun}`)\n return (\n <dialog\n ref={(element) => (this.dialog = element)}\n class={this.rootClass}\n part={this.dialogPart(this.rootPart)}\n aria-labelledby={isServer ? this.serverLabelledBy() : undefined}\n onCancel={this.onCancel}\n onClose={this.onClose}\n onPointerDown={this.onPointerDown}\n onClick={this.onDialogClick}\n >\n <Show when={this.heading}>\n <div id={this.headerId} class={UIT.HEADER} part={this.dialogPart(UIT.HEADER)}>\n {this.heading}\n </div>\n </Show>\n <Show when={this.content}>\n <div class={UIT.CONTENT} part={this.dialogPart(UIT.CONTENT)}>\n {this.content}\n </div>\n </Show>\n <slot />\n {this.closeButton.draw()}\n </dialog>\n )\n }\n\n /**\n * `part` value of one of the parts every dialog vocabulary names (see the class docs).\n * - A method, not a cast in the JSX:\n * Solid's SSR compile (`hoistProps`) hoists a `<Show>`'s children into a module-level constructor,\n * and passes it every free identifier they use.\n * That includes the type parameter `V` of a `PartName<V>` cast, as a VALUE (\"V is not defined\").\n */\n private dialogPart(name: string): string {\n return this.partForName(name as E.PartName<V>)\n }\n\n /**\n * The approve / deny element `event` activated, with which it is; `undefined` for none.\n * - The innermost light-DOM element on its path (in `domElement`'s tree)\n * matching `UIT.ModalActionSelectors`, up to `domElement` (`UIT.ModalActions`, the toast's walk too).\n */\n private static actionFor(event: Event, domElement: Element): [UIT.ModalAction, Element] | undefined {\n for (const target of UIT.ModalActions.lightPath(event, domElement)) {\n const action = UIT.ModalActions.of(target)\n if (action) return [action, target]\n }\n return undefined\n }\n}\n\n/** The attribute of the close icon (and of Fomantic's `closable: false`). */\nconst CLOSABLE = \"closable\"\n","/**\n * Every name `<ui-modal>` uses: tag, attributes (kind + allowed values), events, slots, parts, states, texts.\n * Schema: `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Class words come out through `ClassBuilder`, in Fomantic's grammar:\n * `<ui-modal size=\"tiny\" appearance=\"basic\" vertical-align=\"top\" visible>` => `ui tiny basic top aligned active modal`;\n * `active`, Fomantic's shown-modal class, is the element's own while it shows (the shared `visible` / `hidden`).\n * - Sizes are WIDTHS here (Fomantic's modal ratios), not text sizes:\n * `UIModal.css` reads the size class, never `--ui-scale`.\n * - A modal OWNS the `header`, `content`, `description` and `actions` parts:\n * slotted ones get `:state(in-modal)` and style themselves from `UIParts.css`,\n * reading `--_ui-modal-basic` / `--_ui-modal-header-size` (`UIModal.css`).\n * - `closedby` mirrors `<dialog closedby>`:\n * `any` (Fomantic's `closable: true`), `closerequest` (Escape only), `none`.\n * - `closable` is the close ICON (Fomantic's `closeIcon`).\n * `closable=\"false\"` also brings back Fomantic's `closable: false` (dismissal `none`), unless `closedby` is set.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `<ui-modal>`\n * A modal dialog: `<dialog class=\"ui ... modal\" part=\"modal\">`, shown with `showModal()`.\n ****************/\nexport const modalVocabulary = {\n tag: \"ui-modal\",\n icon: \"window restore outline\",\n topics: [\"dialogs\", \"overlays\", \"popups\", \"modules\"],\n aka: [\"dialog\", \"popup window\", \"lightbox\", \"confirm\", \"alert dialog\"],\n noun: \"modal\",\n description: \"A modal displays content that temporarily blocks interactions with the main view of a site.\",\n attributes: [\n {\n name: \"size\",\n group: \"appearance\",\n kind: \"size\",\n description: \"Width, `mini` ... `massive` (Fomantic's ratios of the default width); `medium` is the default.\"\n },\n {\n name: \"appearance\",\n group: \"appearance\",\n kind: \"multiple\",\n values: [\"basic\"],\n // each word draws itself: no key after it\n classes: {},\n replaces: [{ from: \"basic\", value: \"basic\" }],\n description: \"The look: `basic`, no box: light text straight on the dimmer. Old name: `basic`.\"\n },\n { name: \"inverted\", group: \"appearance\", kind: \"keyOnly\", description: \"The dark scheme.\" },\n { name: \"fullscreen\", group: \"appearance\", kind: \"keyOnly\", description: \"Nearly the whole viewport wide.\" },\n {\n name: \"overlay\",\n group: \"appearance\",\n kind: \"keyOnly\",\n description: \"With `fullscreen`: covers the whole viewport, edge to edge (`overlay fullscreen`).\"\n },\n {\n name: \"scrolling\",\n group: \"layout\",\n kind: \"keyOnly\",\n description: \"Scrolls inside itself when taller than the viewport.\"\n },\n {\n name: \"vertical-align\",\n group: \"layout\",\n kind: \"verticalAlign\",\n values: [\"top\", \"bottom\"],\n description: \"Pinned near the `top` or `bottom` of the viewport instead of centred (`top aligned`).\"\n },\n {\n name: \"closable\",\n group: \"behaviour\",\n kind: \"boolean\",\n description:\n \"Shows a close icon (Fomantic's `closeIcon` setting). `closable=\\\"false\\\"` is also Fomantic's `closable: \" +\n 'false` setting: no icon AND `closedby=\"none\"` (Escape and the dimmer do nothing), unless `closedby` is ' +\n \"set, which wins for dismissal. Absent: no icon, dismissed by `closedby` (default `any`).\"\n },\n {\n name: \"closedby\",\n group: \"behaviour\",\n kind: \"enum\",\n values: [\"any\", \"closerequest\", \"none\"],\n default: \"any\",\n property: \"closedBy\",\n description:\n \"What dismisses it, as `<dialog closedby>` (Fomantic's `closable` setting, in three steps): `any` -- \" +\n \"Escape or a click on the dimmer (default); `closerequest` -- Escape only; `none` -- only its own \" +\n 'buttons. Read when it opens; when set, it wins over `closable=\"false\"`.'\n },\n {\n name: \"heading\",\n replaces: [\"header\"],\n group: \"name\",\n kind: \"string\",\n description:\n \"Shorthand for a header; a slotted `<ui-header>` is the rich version (and names the dialog). Its old name was `header`.\"\n },\n {\n name: \"content\",\n group: \"content\",\n kind: \"string\",\n description: \"Shorthand for a content block of text; a slotted `<ui-content>` is the rich version.\"\n }\n ],\n events: [\n {\n name: \"ui-opening\",\n detail: \"{ visible: true, originalEvent?: Event }\",\n cancelable: true,\n description: \"About to show (a person's action, not a `visible` write); `preventDefault()` keeps it hidden.\"\n },\n {\n name: \"ui-opened\",\n detail: \"{ visible: true }\",\n description: \"Shown, its entry transition finished (Fomantic's `onVisible`).\"\n },\n {\n name: \"ui-closing\",\n detail: \"{ visible: false, reason: ModalCloseReason, originalEvent?: Event }\",\n cancelable: true,\n description:\n \"About to hide: Escape, the dimmer, the close icon, approve or deny. `preventDefault()` keeps it shown.\"\n },\n {\n name: \"ui-closed\",\n detail: \"{ visible: false }\",\n description: \"Hidden, its exit transition finished (Fomantic's `onHidden`).\"\n },\n {\n name: \"ui-approving\",\n detail: \"{ action: Element, originalEvent?: Event }\",\n cancelable: true,\n description:\n 'An approve button (`.approve` / `.ok` / `.positive`, `<ui-button color=\"positive\">`) was activated; ' +\n \"`preventDefault()` keeps the modal shown (Fomantic's `onApprove` returning `false`).\"\n },\n {\n name: \"ui-denying\",\n detail: \"{ action: Element, originalEvent?: Event }\",\n cancelable: true,\n description:\n 'A deny button (`.deny` / `.cancel` / `.negative`, `<ui-button color=\"negative\">`) was activated; ' +\n \"`preventDefault()` keeps the modal shown.\"\n }\n ],\n slots: [\n {\n name: \"\",\n description: \"Content parts: `<ui-header>`, `<ui-content>` (`image`, `scrolling`), `<ui-actions>` with buttons.\"\n }\n ],\n parts: [\n { name: \"modal\", description: \"The `<dialog>` box; its `::backdrop` is the dimmer.\" },\n { name: \"header\", description: \"The `header` shorthand.\" },\n { name: \"content\", description: \"The `content` shorthand.\" },\n { name: \"close\", description: \"The close icon of a `closable` modal.\" }\n ],\n states: [],\n texts: [\n { key: \"close\", text: \"Close\", description: \"Accessible name of the close icon.\" },\n { key: \"ok\", text: \"OK\", description: \"Approve button of `UI.modals.confirm()` / `alert()` / `prompt()`.\" },\n { key: \"cancel\", text: \"Cancel\", description: \"Deny button of `UI.modals.confirm()` / `prompt()`.\" }\n ],\n ownsParts: [\"header\", \"content\", \"description\", \"actions\"]\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-modal>`: port of Fomantic's `modal.less` + `modal.variables`; the dimmer is the dialog's `::backdrop`\n * (`dimmer.variables`' page dimmer colour), not a `ui-dimmer`.\n * - Shadow markup contract: `<dialog class=\"ui [size] [keyOnly ...] [top | bottom aligned] modal\" part=\"modal\">`,\n * opened with `showModal()` (focus trap, `inert` page, top layer), holding in order:\n * - `<div class=\"header\" part=\"header\">` -- the `header` shorthand\n * - `<div class=\"content\" part=\"content\">` -- the `content` shorthand\n * - the default `<slot>`: `<ui-header>`, `<ui-content>`, `<ui-actions>` ... parts\n * - `closable`: `<button type=\"button\" class=\"close icon\" part=\"close\" aria-label=\"...\">svg</button>`, LAST in\n * the DOM (so initial focus lands in the content) but drawn top right\n * - The dialog is the box AND its scroll container (`overflow: auto`, `max-height`): a modal taller than the\n * viewport scrolls inside itself, where Fomantic's scrolled the dimmer. Its rounded corners clip the parts.\n * - Close icon: INSIDE the box (Fomantic's tablet / fullscreen / `inside` placement) for the element --\n * the dialog's scroll box would clip it outside; static markup keeps Fomantic's outside placement on computers.\n * - Widths: Fomantic's responsive widths times the size ratio (`--_modal-ratio`, mini 0.4 ... massive 1.8),\n * by viewport breakpoints (a modal is viewport-level). Text size never scales with `size`.\n * - Motion: the box scales and fades in from `@starting-style` and out while `display` / `overlay` transition\n * (`allow-discrete`) keep it in the top layer; the `::backdrop` fades with it. Reduced motion shortens both.\n * - Public tokens (`--ui-modal-*`, the theming surface) are NEVER declared here: the token block reads each\n * through a private alias, `--_ui-modal-radius: var(--ui-modal-radius, var(--ui-radius))`,\n * and every rule reads the alias. So a value set on `:root`, an ancestor, the DOM element,\n * `::part(modal)` or in the app stylesheet reaches the box (`notes/theming.md` \"Component tokens\").\n * - responsive defaults (the width, the aligned margin) change a private DEFAULT (`--_modal-width`) per\n * breakpoint, never the alias, so a page's value holds on every screen; `fullscreen` swaps the alias\n * - OWNER side: a modal owns `header`, `content`, `description` and `actions` (`ownsParts`).\n * Slotted parts style themselves from `UIParts.css` (context `in-modal`), reading what the root declares:\n * - `--_ui-modal-basic` (`0` / `1`), on EVERY root\n * - the aliases of the look tokens the modal VARIES, on EVERY root: `--_ui-modal-header-size` (per size),\n * `--_ui-modal-header-color`, `--_ui-modal-header-background`, `--_ui-modal-content-background`,\n * `--_ui-modal-actions-background` (`basic` writes them) and `--_ui-modal-radius`; so a page sets them on\n * the modal or above it, not on the part\n * - `--ui-inverted` (`0` / `1`) with `color-scheme`: an inverted modal re-resolves its parts' `light-dark()`\n * tokens to the dark scheme\n * - the root's `<slot>` resets the colour remap and `--ui-scale`, so a large modal doesn't enlarge its buttons\n * - NOTE: left out, on purpose:\n * - `legacy` (margin positioning), `.ui.loading.modal`, `.dimmer` children: script states `<dialog>` replaces\n * - `.ui.inverted.dimmer > .modal` couplings: the dimmer is the `::backdrop`; theme it with the shared\n * `--ui-dimmer-background` (every dimmer) or `--ui-modal-dimmer-background` / `--ui-modal-dimmer-filter`\n * (modals only, e.g. `var(--ui-dimmer-blur)` for Fomantic's blurring dimmer)\n * - `resizable scrolling content`: a table variation's coupling, not a modal one\n */\n\n@layer ui.components.modal.types, ui.components.modal.content, ui.components.modal.variations, ui.components.modal.states;\n\n/* Breakpoints (`@custom-media`), inlined at build time. */\n@import \"../../styles/media.css\";\n\n/*******************************\n Modal\n*******************************/\n\n@layer ui.components.modal.types {\n /* DOM element: no box of its own; the dialog is in the top layer while open. */\n :host {\n display: contents;\n }\n\n /* Tokens: one private alias per `modal.variables` entry that still matters, from the global tokens. */\n .ui.modal {\n --_ui-modal-background: var(--ui-modal-background, var(--ui-surface));\n --_ui-modal-color: var(--ui-modal-color, var(--ui-text-color));\n --_ui-modal-radius: var(--ui-modal-radius, var(--ui-radius));\n --_ui-modal-shadow: var(--ui-modal-shadow, 1px 3px 3px 0 oklch(0 0 0 / 0.2), 1px 3px 15px 2px oklch(0 0 0 / 0.2));\n /* The shared dimmer token (`UIDimmer.css`), so a theme styles this `::backdrop` and `<ui-dimmer>` at once. */\n --_ui-modal-dimmer-background: var(--ui-modal-dimmer-background, var(--ui-dimmer-background, oklch(0 0 0 / 0.85)));\n --_ui-modal-duration: var(--ui-modal-duration, var(--ui-duration-slow));\n --_ui-modal-close-size: var(--ui-modal-close-size, 1.25em);\n --_ui-modal-close-hitbox: var(--ui-modal-close-hitbox, 2.25em);\n --_ui-modal-close-opacity: var(--ui-modal-close-opacity, 0.8);\n --_ui-modal-inner-close-top: var(--ui-modal-inner-close-top, 1.0625em);\n --_ui-modal-inner-close-right: var(--ui-modal-inner-close-right, 1em);\n /* The dialog's width; its default depends on the screen and the size (\"Responsive widths\" below), a value\n set from outside holds on every screen. */\n --_ui-modal-width: var(--ui-modal-width, var(--_modal-width));\n /* Gap to the viewport's edge of a `top aligned` / `bottom aligned` modal; default 5vh, 1em on phones. */\n --_ui-modal-aligned-margin: var(--ui-modal-aligned-margin, var(--_modal-aligned-margin));\n --_modal-ratio: 1;\n --_modal-width: 95%;\n --_modal-aligned-margin: 5vh;\n /* Owner tokens (`UIParts.css`): declared on every root; `basic` writes the look ones. */\n --_ui-modal-basic: 0;\n --_ui-modal-header-size: var(--ui-modal-header-size, 1.42857em);\n --_ui-modal-header-color: var(--ui-modal-header-color, var(--ui-text-dark));\n --_ui-modal-header-background: var(--ui-modal-header-background, var(--ui-surface));\n --_ui-modal-content-background: var(--ui-modal-content-background, var(--ui-surface));\n --_ui-modal-actions-background: var(--ui-modal-actions-background, var(--ui-surface-muted));\n --ui-inverted: 0;\n position: absolute;\n z-index: var(--ui-z-modal);\n box-sizing: border-box;\n display: none;\n flex: 0 0 auto;\n width: var(--_ui-modal-width);\n max-width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n border-radius: var(--_ui-modal-radius);\n outline: none;\n background: var(--_ui-modal-background);\n box-shadow: var(--_ui-modal-shadow);\n color: var(--_ui-modal-color);\n font-family: var(--ui-font-family);\n font-size: var(--ui-font-size);\n line-height: var(--ui-line-height);\n text-align: start;\n transform-origin: 50% 25%;\n user-select: text;\n }\n\n /* The element's `<dialog>`: fixed in the top layer, centred, its own scroll box. */\n dialog.ui.modal {\n position: fixed;\n inset: 0;\n max-height: calc(100dvh - 2em);\n margin: auto;\n overflow: auto;\n overscroll-behavior: contain;\n opacity: 1;\n transform: none;\n transition:\n opacity var(--_ui-modal-duration) var(--ui-ease),\n transform var(--_ui-modal-duration) var(--ui-ease),\n display var(--_ui-modal-duration) allow-discrete,\n overlay var(--_ui-modal-duration) allow-discrete;\n }\n dialog.ui.modal[open] {\n display: block;\n }\n dialog.ui.modal:not([open]) {\n opacity: 0;\n transform: scale(0.8);\n }\n @starting-style {\n dialog.ui.modal[open] {\n opacity: 0;\n transform: scale(0.8);\n }\n }\n\n /* The dimmer. */\n dialog.ui.modal::backdrop {\n background: var(--_ui-modal-dimmer-background);\n backdrop-filter: var(--ui-modal-dimmer-filter, none);\n opacity: 1;\n transition:\n opacity var(--_ui-modal-duration) var(--ui-ease),\n display var(--_ui-modal-duration) allow-discrete,\n overlay var(--_ui-modal-duration) allow-discrete;\n }\n dialog.ui.modal:not([open])::backdrop {\n opacity: 0;\n }\n @starting-style {\n dialog.ui.modal[open]::backdrop {\n opacity: 0;\n }\n }\n /* `reset.css`'s reduced-motion block reaches the dialog, not its `::backdrop`. */\n @media (prefers-reduced-motion: reduce) {\n dialog.ui.modal::backdrop {\n transition-duration: 0.01ms;\n }\n }\n\n /* What the modal hands its content: not its size remap (a large modal is WIDER, not bigger text). */\n .ui.modal slot {\n --ui-color: initial;\n --ui-color-text: initial;\n --ui-color-header: initial;\n --ui-color-border: initial;\n --ui-color-background: initial;\n --ui-color-inverted: initial;\n --ui-color-on: initial;\n --ui-color-inverted-on: initial;\n --ui-scale: initial;\n }\n\n /* Static markup's outer corners (the dialog clips its own). */\n .ui.modal > :first-child:not(.close),\n .ui.modal > .close:first-child + * {\n border-start-start-radius: var(--_ui-modal-radius);\n border-start-end-radius: var(--_ui-modal-radius);\n }\n .ui.modal > :last-child {\n border-end-start-radius: var(--_ui-modal-radius);\n border-end-end-radius: var(--_ui-modal-radius);\n }\n}\n\n/*******************************\n Content\n*******************************/\n\n@layer ui.components.modal.content {\n /* Close: outside the box, top right, on the dimmer (static markup on computers). */\n .ui.modal > .close {\n position: absolute;\n top: calc(-0.25em - var(--_ui-modal-close-hitbox));\n right: calc(-0.25em - var(--_ui-modal-close-hitbox));\n z-index: 1;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--_ui-modal-close-hitbox);\n height: var(--_ui-modal-close-hitbox);\n margin: 0;\n padding: 0;\n border: none;\n border-radius: var(--ui-radius);\n background: none;\n color: var(--ui-text-inverted-color);\n font-size: var(--_ui-modal-close-size);\n opacity: var(--_ui-modal-close-opacity);\n cursor: var(--ui-control-cursor);\n }\n .ui.modal > .close > svg {\n width: 1em;\n height: 1em;\n }\n .ui.modal > .close:is(:hover, :focus-visible) {\n opacity: 1;\n }\n .ui.modal > .close:focus-visible {\n outline: var(--ui-focus-width) solid var(--ui-focus-color);\n outline-offset: calc(var(--ui-focus-width) * -1);\n }\n /* Inside the box: the element's dialog always; static markup below computers, fullscreen, or `inside`. */\n dialog.ui.modal > .close,\n .ui.modal > .close.inside,\n .ui.fullscreen.modal > .close {\n top: var(--_ui-modal-inner-close-top);\n right: var(--_ui-modal-inner-close-right);\n color: var(--_ui-modal-color);\n font-size: 1em;\n }\n @media (--ui-mobile), (--ui-tablet) {\n .ui.modal > .close {\n top: var(--_ui-modal-inner-close-top);\n right: var(--_ui-modal-inner-close-right);\n color: var(--_ui-modal-color);\n font-size: 1em;\n }\n }\n /* The header shorthand makes room for it. */\n .ui.modal:has(> .close) > .header {\n padding-inline-end: calc(var(--_ui-modal-close-hitbox) * 1.2);\n }\n\n /* Header (the shorthand, or static `.header`) */\n .ui.modal > .header {\n display: block;\n margin: 0;\n padding: 0.875em 1.05em;\n border-bottom: var(--ui-border-width) solid var(--ui-border-color);\n background: var(--_ui-modal-header-background);\n box-shadow: none;\n color: var(--_ui-modal-header-color);\n font-family: var(--ui-font-family-heading);\n }\n .ui.modal > .header:not(.ui) {\n font-size: var(--_ui-modal-header-size);\n font-weight: var(--ui-font-weight-bold);\n line-height: var(--ui-line-height-heading);\n }\n\n /* Content */\n .ui.modal > .content {\n box-sizing: border-box;\n display: block;\n width: 100%;\n padding: var(--ui-modal-content-padding, 1.5em);\n background: var(--_ui-modal-content-background);\n font-size: 1em;\n line-height: 1.4;\n }\n .ui.modal > .image.content {\n display: flex;\n flex-direction: row;\n }\n .ui.modal > .content > .image {\n display: block;\n flex: 0 1 auto;\n align-self: start;\n max-width: 100%;\n }\n .ui.modal > .content > .description {\n display: block;\n flex: 1 0 auto;\n align-self: start;\n min-width: 0;\n }\n .ui.modal > .content > :is(.icon, .image) + .description {\n flex: auto;\n width: auto;\n min-width: auto;\n padding-inline-start: var(--ui-modal-description-distance, 2em);\n }\n .ui.modal > .scrolling.content {\n max-height: var(--ui-modal-scrolling-height, calc(80dvh - 10em));\n overflow: auto;\n overscroll-behavior: none;\n }\n\n /* Actions */\n .ui.modal > .actions {\n padding: var(--ui-modal-actions-padding, 1em);\n border-top: var(--ui-border-width) solid var(--ui-border-color);\n background: var(--_ui-modal-actions-background);\n text-align: right;\n }\n .ui.modal .actions > .button:not(.fluid) {\n margin-inline-start: var(--ui-modal-button-distance, 0.75em);\n }\n .ui.modal > .left.actions {\n text-align: left;\n }\n .ui.modal > .left.actions > .button:not(.fluid) {\n margin-inline: 0.5em;\n }\n .ui.modal > :is(.centered, [class*=\"center aligned\"]) {\n text-align: center;\n }\n .ui.modal > :is(.centered, [class*=\"center aligned\"]).actions > .button:not(.fluid) {\n margin-inline: 0.5em;\n }\n\n /* Mobile: tighter header and content, stacked image content and buttons. */\n @media (--ui-mobile) {\n .ui.modal > .header {\n padding: 0.525em 0.7em;\n }\n .ui.modal > .content {\n display: block;\n padding: 1em;\n }\n .ui.modal .image.content {\n flex-direction: column;\n }\n .ui.modal > .content > .image {\n display: block;\n max-width: 100%;\n margin: 0 auto;\n padding: 0 0 1em;\n text-align: center;\n }\n .ui.modal > .content > .description,\n .ui.modal > .content > :is(.icon, .image) + .description {\n display: block;\n width: 100%;\n margin: 0;\n padding: 1em 0;\n }\n .ui.modal > .actions {\n padding: 1em 1em 0;\n }\n .ui.modal .actions > :is(.buttons, .button) {\n margin-bottom: 1em;\n }\n }\n}\n\n/*******************************\n Variations\n*******************************/\n\n@layer ui.components.modal.variations {\n /* ## Size: a width ratio and a header size; text stays the page's size. */\n .ui.mini.modal {\n --_modal-ratio: 0.4;\n --_ui-modal-header-size: 1.3em;\n }\n .ui.tiny.modal {\n --_modal-ratio: 0.6;\n --_ui-modal-header-size: 1.3em;\n }\n .ui.small.modal {\n --_modal-ratio: 0.8;\n --_ui-modal-header-size: 1.3em;\n }\n .ui.large.modal {\n --_modal-ratio: 1.2;\n --_ui-modal-header-size: 1.6em;\n }\n .ui.big.modal {\n --_modal-ratio: 1.4;\n --_ui-modal-header-size: 1.6em;\n }\n .ui.huge.modal {\n --_modal-ratio: 1.6;\n --_ui-modal-header-size: 1.6em;\n }\n .ui.massive.modal {\n --_modal-ratio: 1.8;\n --_ui-modal-header-size: 1.8em;\n }\n\n /*\n * Responsive widths (Fomantic's `@mobileWidth` ... `@widescreenMonitorWidth`); tablets never grow past 88%.\n * - The width's DEFAULT (`--_modal-width`), not the alias: a page's `--ui-modal-width` holds on every screen.\n */\n @media (--ui-tablet) {\n .ui.modal {\n --_modal-width: calc(88% * min(var(--_modal-ratio), 1));\n }\n }\n @media (--ui-computer) {\n .ui.modal {\n --_modal-width: calc(850px * var(--_modal-ratio));\n }\n }\n @media (--ui-large-monitor) {\n .ui.modal {\n --_modal-width: calc(900px * var(--_modal-ratio));\n }\n }\n @media (--ui-widescreen) {\n .ui.modal {\n --_modal-width: calc(950px * var(--_modal-ratio));\n }\n }\n\n /* ## Fullscreen: nearly the whole width; `overlay fullscreen` edge to edge, full height. */\n .ui.fullscreen.modal {\n --_ui-modal-width: 95%;\n }\n dialog.ui.fullscreen.modal {\n margin-block: 1em;\n }\n .ui.overlay.fullscreen.modal {\n --_ui-modal-width: 100%;\n border-radius: 0;\n }\n dialog.ui.overlay.fullscreen.modal {\n height: 100dvh;\n max-height: 100dvh;\n margin: 0;\n }\n\n /* ## Aligned: pinned near the top or bottom instead of centred. */\n dialog.ui[class*=\"top aligned\"].modal {\n margin-block: var(--_ui-modal-aligned-margin) auto;\n }\n dialog.ui[class*=\"bottom aligned\"].modal {\n margin-block: auto var(--_ui-modal-aligned-margin);\n }\n @media (--ui-mobile) {\n .ui.modal {\n --_modal-aligned-margin: 1em;\n }\n }\n\n /* ## Scrolling: capped by the viewport, scrolls inside (the dialog's own scroll box). */\n dialog.ui.scrolling.modal {\n max-height: calc(100dvh - 4em);\n }\n\n /* ## Basic: no box, light text on the dimmer. */\n .ui.basic.modal {\n --_ui-modal-basic: 1;\n --_ui-modal-background: transparent;\n --_ui-modal-color: var(--ui-text-inverted-color);\n --_ui-modal-header-color: var(--ui-text-inverted-color);\n --_ui-modal-header-background: transparent;\n --_ui-modal-content-background: transparent;\n --_ui-modal-actions-background: transparent;\n border-radius: 0;\n box-shadow: none;\n }\n .ui.basic.modal > .header {\n border-bottom: none;\n }\n .ui.basic.modal > .actions {\n border-top: none;\n }\n .ui.basic.modal > .close {\n top: 1em;\n right: 1.5em;\n color: var(--ui-text-inverted-color);\n }\n\n /* ## Inverted: the dark scheme; parts re-resolve their tokens from it. */\n .ui.inverted.modal {\n --ui-inverted: 1;\n --ui-scheme: dark;\n color-scheme: dark;\n }\n}\n\n/*******************************\n States\n*******************************/\n\n@layer ui.components.modal.states {\n /* Shown (static markup; the element's dialog shows while `[open]`). */\n .ui.active.modal {\n display: block;\n }\n}\n","import { E } from \"spell/ui/core\"\nimport { modalVocabulary } from \"./UIModal.en\"\nimport { DialogComponent } from \"./DialogComponent\"\nimport type { Vocabulary } from \"./UIModal.types\"\n\nimport modalCSS from \"./UIModal.css?inline\"\n\n/****************\n * ### `UIModal`\n * The component behind `<ui-modal>`:\n * a modal dialog, a shadow `<dialog class=\"ui … modal\" part=\"modal\">` shown with `showModal()`.\n *\n * - The browser gives it the focus trap, the `inert` page, the top layer and the `::backdrop`:\n * the dimmer, themed by the shared `--ui-dimmer-*` tokens. No `<ui-dimmer>` element.\n * - All of its behaviour is `DialogComponent`'s, which `<ui-flyout>` shares:\n * this class only names and styles it.\n * - shared: `visible` / `hidden`, `closedby`, approve / deny, the close icon, invoker commands, its name\n * - `UI.modals.confirm()` / `alert()` / `prompt()` draw one of these (`ModalDialogs`, registered by the barrel).\n ****************/\nexport class UIModal extends DialogComponent<Vocabulary> {\n @E.proto static vocabulary = modalVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { modal: modalCSS },\n // the sheet's own transition is Fomantic's `scale`: faded in from 80%\n animation: \"scale\"\n } satisfies Partial<E.ElementSetup>\n @E.proto static rootPart = \"modal\"\n @E.proto static overlayKind = \"modal\" as const\n @E.proto static shownClass = \"active\"\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIModal extends E.AttributeValues<typeof modalVocabulary> {}\n","import { E, UI, UIT } from \"spell/ui/core\"\nimport { modalVocabulary } from \"./UIModal.en\"\nimport { type Vocabulary } from \"./UIModal.types\"\n\n/****************\n * ### `ModalDialogs`\n * The dialogs behind `UI.modals.confirm()` / `alert()` / `prompt()` (Fomantic's `$.modal('confirm', …)`):\n * a `<ui-modal>` built for the call, appended to `<body>`, shown (`visible`), and removed once hidden.\n *\n * - Markup: `<ui-modal size=\"tiny\" closedby=\"closerequest\" heading=\"title\">` holding\n * - a `<ui-content>`: the message as a `<p>`, or for `prompt()` a `<label>` around it and an `<input>`\n * - `<ui-actions>`: a deny button (`cancel`, first: it takes the initial focus, the least destructive choice)\n * and a primary approve button.\n * - Escape denies (`closedby=\"closerequest\"`: no dimmer clicks, so a stray click can't answer).\n * - The promise settles once the modal is HIDDEN (`ui-closed`), so a caller can open the next dialog straight away.\n * - Button texts: `okText` / `cancelText`, else the translated `ok` / `cancel` texts (`UI.i18n`).\n * - Everything is light DOM built with `createElement` / `textContent`: never `innerHTML` with caller text.\n * - Other families' tags (`<ui-content>`, `<ui-actions>`, `<ui-button>`) are looked up at CALL time,\n * by class noun, in the vocabulary registry (`UI.vocabulary`).\n * - Why: importing their vocabulary files would reach into other families' files,\n * which `AGENTS.md` keeps behind `spell/ui/core`.\n * - The family barrel imports `parts` and `button`, so both are defined before any dialog opens.\n * - Registered by the family barrel as `UI.modals`' provider; the runtime never imports it.\n ****************/\nexport class ModalDialogs implements E.ModalProvider {\n /** Page the dialogs are made in; a test passes its own. */\n readonly document: Document\n\n constructor({ document = globalThis.document }: ModalDialogsProps = {}) {\n this.document = document\n }\n\n /** Ask a yes / no question: resolves `true` on approve, `false` on deny or Escape. */\n confirm(options: E.ModalOptions): Promise<boolean> {\n return this.run(options, { canDeny: true }, (isApproved) => isApproved)\n }\n\n /** Tell `options.message`: resolves once the dialog has hidden, however it closed. */\n alert(options: E.ModalOptions): Promise<void> {\n return this.run(options, { canDeny: false }, () => undefined)\n }\n\n /** Ask for one line of text: resolves with it on approve, `undefined` on deny or Escape. */\n prompt(options: E.ModalOptions): Promise<string | undefined> {\n return this.run(options, { canDeny: true, input: options.value ?? \"\" }, (isApproved, value) =>\n isApproved ? value : undefined\n )\n }\n\n /**\n * Build, open and await one dialog; `result()` turns \"approved?\" and the input's value into the answer.\n * - SIDE EFFECT: a `<ui-modal>` in `<body>` until it has hidden.\n * - Throws when the parts or `<ui-button>` aren't registered (`tagFor()`).\n */\n private run<T>(\n options: E.ModalOptions,\n { canDeny, input }: { canDeny: boolean; input?: string },\n result: (isApproved: boolean, value: string) => T\n ): Promise<T> {\n const modal = this.document.createElement(modalVocabulary.tag) as HTMLElement & { visible: boolean }\n modal.setAttribute(SIZE, TINY)\n modal.setAttribute(\"closedby\", \"closerequest\")\n if (options.title) modal.setAttribute(UIT.HEADING, options.title)\n else modal.setAttribute(\"aria-label\", options.message)\n const content = this.document.createElement(ModalDialogs.tagFor(UIT.CONTENT))\n const field = input === undefined ? undefined : this.input(input)\n content.append(field ? this.label(options.message, field) : this.paragraph(options.message))\n const actions = this.document.createElement(ModalDialogs.tagFor(ACTIONS))\n if (canDeny) actions.append(this.button(options.cancelText ?? UI.i18n.t(CANCEL), CANCEL))\n const approve = this.button(options.okText ?? UI.i18n.t(OK), APPROVE_CLASS)\n approve.setAttribute(COLOR, PRIMARY)\n actions.append(approve)\n modal.append(content, actions)\n field?.addEventListener(\"keydown\", (event) => {\n if (event.key === UIT.Key.enter) approve.click()\n })\n this.document.body.append(modal)\n modal.visible = true\n return new Promise<T>((resolve) => {\n let isApproved = false\n modal.addEventListener(APPROVE_EVENT, () => (isApproved = true))\n modal.addEventListener(\n HIDE_EVENT,\n () => {\n modal.remove()\n resolve(result(isApproved, field?.value ?? \"\"))\n },\n { once: true }\n )\n })\n }\n\n /** The message as a paragraph. */\n private paragraph(message: string): HTMLParagraphElement {\n const paragraph = this.document.createElement(\"p\")\n paragraph.textContent = message\n return paragraph\n }\n\n /** `prompt()`'s text input, focused when the dialog opens. */\n private input(value: string): HTMLInputElement {\n const input = this.document.createElement(\"input\")\n input.type = \"text\"\n input.value = value\n input.autofocus = true\n return input\n }\n\n /** The message as the input's `<label>`, in the opt-in native look (`native.css`). */\n private label(message: string, input: HTMLInputElement): HTMLLabelElement {\n const label = this.document.createElement(\"label\")\n label.className = NATIVE_LOOK\n label.style.cssText = LABEL_LAYOUT\n label.append(message, input)\n return label\n }\n\n /** A `<ui-button>` with Fomantic's action class (`approve` / `cancel`). */\n private button(text: string, actionClass: string): HTMLElement {\n const button = this.document.createElement(ModalDialogs.tagFor(UIT.BUTTON))\n button.className = actionClass\n button.textContent = text\n return button\n }\n\n /**\n * Canonical tag of the registered component whose class noun is `noun` (`button` => `ui-button`).\n * - Throws when none is registered: a dialog built from undefined elements would look right and not work.\n * - Static: it reads only the page-wide vocabulary registry.\n */\n private static tagFor(noun: string): string {\n for (const vocabulary of UI.vocabulary.vocabularies.values()) if (vocabulary.noun === noun) return vocabulary.tag\n throw new Error(\n `UI.modals: no component with the class noun \"${noun}\" is registered; ` +\n `import its family (\\`spell/ui/components/ui-parts\\`, \\`ui-button\\`) before opening a dialog`\n )\n }\n}\n\n/** Constructor props for `ModalDialogs`. */\nexport type ModalDialogsProps = {\n /** page to build in. Default: the global `document`. */\n document?: Document\n}\n\n/** An approve element was activated: the dialog answers yes. */\nconst APPROVE_EVENT: E.EventName<Vocabulary> = \"ui-approving\"\n\n/** Hidden: the call settles. */\nconst HIDE_EVENT: E.EventName<Vocabulary> = \"ui-closed\"\n\n/** `<ui-modal>` width attribute (canonical name). */\nconst SIZE = \"size\"\n\n/** The dialogs' width. */\nconst TINY = \"tiny\"\n\n/** Class noun of the actions part (`<ui-actions>`). */\nconst ACTIONS = \"actions\"\n\n/** `<ui-button>` colour of the approve button. */\nconst PRIMARY = \"primary\"\n\n/** `<ui-button>`'s `color`, which `PRIMARY` is a value of (epic `ui-gaps` P4). */\nconst COLOR = \"color\"\n\n/** Fomantic's approve class of a button. */\nconst APPROVE_CLASS = \"approve\"\n\n/** Fomantic's deny class of a button, and the text key of its label. */\nconst CANCEL = \"cancel\"\n\n/** Text key of the approve button's label. */\nconst OK = \"ok\"\n\n/** `native.css`'s opt-in class, for the prompt's input. */\nconst NATIVE_LOOK = \"ui-native\"\n\n/** The prompt's label: message above a full-width input. */\nconst LABEL_LAYOUT = \"display: grid; gap: 0.5em\"\n","/**\n * The modal family: defines `<ui-modal>` and exports its component, `UIModal`.\n * - SIDE EFFECTS:\n * - defines `<ui-modal>`, the owner of the `header`, `content`, `description` and `actions` parts,\n * and those parts and `<ui-button>` too (`UI.modals.*` builds its dialogs from them)\n * - registers `ModalDialogs` as `UI.modals`' provider once the runtime has loaded,\n * so `UI.modals.confirm()` / `alert()` / `prompt()` work\n * - Also exports `DialogComponent`, the base `<ui-flyout>` (`spell/ui/components/ui-flyout`) builds on.\n * - Also the library's `spell/ui/ui-modal` entry (its size is in `notes/report.md`).\n */\n\nimport { E, UI } from \"spell/ui/core\"\nimport { DialogComponent } from \"./DialogComponent\"\nimport { UIModal } from \"./UIModal\"\nimport { ModalDialogs } from \"./ModalDialogs\"\n\nimport \"spell/ui/components/ui-parts\"\nimport \"spell/ui/components/ui-button\"\n\nUIModal.define()\nif (E.isBrowser()) void UI.load().then(() => UI.modals.register(new ModalDialogs()))\n\nexport { DialogComponent, UIModal, ModalDialogs }\nexport type { DialogAttributes } from \"./UIModal.types\"\n"],"mappings":";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CACf;EACF,CAAC;CACH;CAGA,UAAkB,GAAuC;EACvD,IAAMe,IAAY,KAAK,SAAS,cAAc,GAAG;EAEjD,OADA,EAAU,cAAcC,GACjBD;CACT;CAGA,MAAc,GAAiC;EAC7C,IAAMd,IAAQ,KAAK,SAAS,cAAc,OAAO;EAIjD,OAHA,EAAM,OAAO,QACb,EAAM,QAAQN,GACd,EAAM,YAAY,IACXM;CACT;CAGA,MAAc,GAAiB,GAA2C;EACxE,IAAMlD,IAAQ,KAAK,SAAS,cAAc,OAAO;EAIjD,OAHA,EAAM,YAAYkE,IAClB,EAAM,MAAM,UAAUC,IACtBnE,EAAM,OAAOiE,GAASf,CAAK,GACpBlD;CACT;CAGA,OAAe,GAAc,GAAkC;EAC7D,IAAMoE,IAAS,KAAK,SAAS,cAAc,aAAa,OAAO3I,EAAU,CAAC;EAG1E,OAFA,EAAO,YAAY4I,GACnB,EAAO,cAAcC,GACdF;CACT;CAOA,OAAe,OAAO,GAAsB;EAC1C,KAAK,IAAMG,KAAcnF,EAAG,WAAW,aAAa,OAAO,GAAG,IAAImF,EAAW,SAASC,GAAM,OAAOD,EAAW;EAC9G,MAAU,MACR,iDAAiDC,EAAK,8GAExD;CACF;AACF,GASMZ,KAAyC,gBAGzCC,KAAsC,aAGtCf,KAAO,QAGPC,KAAO,QAGPK,KAAU,WAGVO,KAAU,WAGVD,KAAQ,SAGRD,KAAgB,WAGhBH,IAAS,UAGTE,KAAK,MAGLU,KAAc,aAGdC,KAAe;AChKrB5B,EAAQ,OAAO,GACX7G,GAAY,KAAG0D,EAAQ,KAAK,CAAC,CAAC,WAAWA,EAAG,OAAO,SAAS,IAAIoD,EAAa,CAAC,CAAC"}
package/dist/ui-nag.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import "./rolldown-runtime-CYGlBXrH.js";
2
- import { Bt as e, CloseButton as t, DOMElement as n, Disclosure as r, Ft as i, It as a, Lt as o, Rt as s, UI as c, UIComponent as l, Vt as u, after as d, cssState as f, kt as p, on as m, onChange as h, proto as g, protoMerged as _, state as v, untracked as y, zt as b } from "./core.js";
2
+ import { Bt as e, CloseButton as t, DOMElement as n, Disclosure as r, Ht as i, Lt as a, Rt as o, UI as s, UIComponent as c, Ut as l, Vt as u, after as d, cssState as f, jt as p, on as m, onChange as h, proto as g, protoMerged as _, state as v, untracked as y, zt as b } from "./core.js";
3
3
  import { className as x, effect as S, getOwner as C, insert as w, isServer as T, readShallow as E, ref as D, setAttribute as O, template as k } from "@solidjs/web";
4
4
  //#region src/components/ui-nag/UINag.en.ts
5
5
  var A = {
6
6
  tag: "ui-nag",
7
+ icon: "bell outline",
7
8
  topics: [
8
9
  "notifications",
9
10
  "messages",
@@ -248,9 +249,9 @@ var A = {
248
249
  expiryDate(e) {
249
250
  if (e && Number.isFinite(e)) return new Date(Date.now() + e * P).toUTCString();
250
251
  }
251
- }, j = "ExpirationDate", M = "/", N = "; ", P = 864e5, F = "@layer ui.components.nag.types{:host{display:contents}.ui.nag{--_ui-nag-background:var(--ui-nag-background,oklch(42% 0 0));--_ui-nag-color:var(--ui-nag-color,var(--ui-text-inverted-color));--_ui-nag-title-color:var(--ui-nag-title-color,oklch(100% 0 0));--_ui-nag-close-color:var(--ui-nag-close-color,oklch(100% 0 0));--_ui-nag-inverted-background:var(--ui-nag-inverted-background,var(--ui-surface-strong));--_ui-nag-inverted-color:var(--ui-nag-inverted-color,var(--ui-text-color));--_ui-nag-inverted-title-color:var(--ui-nag-inverted-title-color,var(--ui-text-muted));--_ui-nag-opacity:var(--ui-nag-opacity,.95);--_ui-nag-padding:var(--ui-nag-padding,.75em 1em);--_ui-nag-shadow:var(--ui-nag-shadow,0 1px 2px 0 oklch(0% 0 0/.2));--_ui-nag-radius:var(--ui-nag-radius,var(--ui-radius));--_ui-nag-z-index:var(--ui-nag-z-index,999);--_ui-nag-title-margin:var(--ui-nag-title-margin,0 .5em);--_ui-nag-close-right:var(--ui-nag-close-right,1em);--_ui-nag-close-opacity:var(--ui-nag-close-opacity,.7);--_ui-nag-duration:var(--ui-nag-duration,var(--ui-duration-normal));--ui-animation-duration:var(--ui-duration-slower);z-index:var(--_ui-nag-z-index);box-sizing:border-box;width:100%;min-height:0;padding:var(--_ui-nag-padding);border-radius:0 0 var(--_ui-nag-radius) var(--_ui-nag-radius);background:var(--ui-color,var(--_ui-nag-background));box-shadow:var(--_ui-nag-shadow);color:var(--ui-color-on,var(--_ui-nag-color));font-size:calc(var(--ui-font-size) * var(--ui-scale,1));line-height:var(--ui-line-height);text-align:center;opacity:var(--_ui-nag-opacity);transition:background var(--_ui-nag-duration) var(--ui-ease);margin:0;display:block;position:relative;top:0;left:0}.ui.nag:not(.overlay,.fixed){border-radius:var(--_ui-nag-radius)}}@layer ui.components.nag.content{.ui.nag>.title,.ui.nag ::slotted(.title){margin:var(--_ui-nag-title-margin);color:var(--ui-color-on,var(--_ui-nag-title-color));display:inline-block}.ui.nag>.close.icon{top:50%;right:var(--_ui-nag-close-right);border-radius:var(--ui-radius-s);width:1.5em;height:1.5em;color:var(--ui-color-on,var(--_ui-nag-close-color));font:inherit;opacity:var(--_ui-nag-close-opacity);cursor:pointer;transition:opacity var(--_ui-nag-duration) var(--ui-ease);background:0 0;border:0;justify-content:center;align-items:center;margin:-.75em 0 0;padding:.25em;display:inline-flex;position:absolute}.ui.nag>.close.icon>svg{width:1em;height:1em}.ui.nag:has(>.close.icon){padding-inline-end:calc(var(--_ui-nag-close-right) + 2em)}}@layer ui.components.nag.variations{.ui.overlay.nag{position:absolute}.ui.fixed.nag{position:fixed}.ui.bottom.nag{border-radius:var(--_ui-nag-radius) var(--_ui-nag-radius) 0 0;top:auto;bottom:0}.ui.bottom.nag:not(.overlay,.fixed){border-radius:var(--_ui-nag-radius)}.ui.inverted.nag{background:var(--ui-color-background,var(--_ui-nag-inverted-background));color:var(--ui-color-text,var(--_ui-nag-inverted-color))}.ui.inverted.nag>.title,.ui.inverted.nag ::slotted(.title),.ui.inverted.nag>.close.icon{color:var(--ui-color-text,var(--_ui-nag-inverted-title-color))}.ui.huge.nag,.ui.massive.nag{line-height:1}}@layer ui.components.nag.states{.ui.nag:hover,.ui.nag>.close.icon:hover,.ui.nag>.close.icon:focus-visible{opacity:1}}", I = /* @__PURE__ */ k("<div><slot>"), L, R, z, B, V, H, U, W, G, K, DOMNagElement = class extends n {
252
+ }, j = "ExpirationDate", M = "/", N = "; ", P = 864e5, F = "@layer ui.components.nag.types{:host{display:contents}.ui.nag{--_ui-nag-background:var(--ui-nag-background,oklch(42% 0 0));--_ui-nag-color:var(--ui-nag-color,var(--ui-text-inverted-color));--_ui-nag-title-color:var(--ui-nag-title-color,oklch(100% 0 0));--_ui-nag-close-color:var(--ui-nag-close-color,oklch(100% 0 0));--_ui-nag-inverted-background:var(--ui-nag-inverted-background,var(--ui-surface-strong));--_ui-nag-inverted-color:var(--ui-nag-inverted-color,var(--ui-text-color));--_ui-nag-inverted-title-color:var(--ui-nag-inverted-title-color,var(--ui-text-muted));--_ui-nag-opacity:var(--ui-nag-opacity,.95);--_ui-nag-padding:var(--ui-nag-padding,.75em 1em);--_ui-nag-shadow:var(--ui-nag-shadow,0 1px 2px 0 oklch(0% 0 0/.2));--_ui-nag-radius:var(--ui-nag-radius,var(--ui-radius));--_ui-nag-z-index:var(--ui-nag-z-index,999);--_ui-nag-title-margin:var(--ui-nag-title-margin,0 .5em);--_ui-nag-close-right:var(--ui-nag-close-right,1em);--_ui-nag-close-opacity:var(--ui-nag-close-opacity,.7);--_ui-nag-duration:var(--ui-nag-duration,var(--ui-duration-normal));--ui-animation-duration:var(--ui-duration-slower);z-index:var(--_ui-nag-z-index);box-sizing:border-box;width:100%;min-height:0;padding:var(--_ui-nag-padding);border-radius:0 0 var(--_ui-nag-radius) var(--_ui-nag-radius);background:var(--ui-color,var(--_ui-nag-background));box-shadow:var(--_ui-nag-shadow);color:var(--ui-color-on,var(--_ui-nag-color));font-size:calc(var(--ui-font-size) * var(--ui-scale,1));line-height:var(--ui-line-height);text-align:center;opacity:var(--_ui-nag-opacity);transition:background var(--_ui-nag-duration) var(--ui-ease);margin:0;display:block;position:relative;top:0;left:0}.ui.nag:not(.overlay,.fixed){border-radius:var(--_ui-nag-radius)}}@layer ui.components.nag.content{.ui.nag>.title,.ui.nag ::slotted(.title){margin:var(--_ui-nag-title-margin);color:var(--ui-color-on,var(--_ui-nag-title-color));display:inline-block}.ui.nag>.close.icon{top:50%;right:var(--_ui-nag-close-right);border-radius:var(--ui-radius-s);width:1.5em;height:1.5em;color:var(--ui-color-on,var(--_ui-nag-close-color));font:inherit;opacity:var(--_ui-nag-close-opacity);cursor:var(--ui-control-cursor);transition:opacity var(--_ui-nag-duration) var(--ui-ease);background:0 0;border:0;justify-content:center;align-items:center;margin:-.75em 0 0;padding:.25em;display:inline-flex;position:absolute}.ui.nag>.close.icon>svg{width:1em;height:1em}.ui.nag:has(>.close.icon){padding-inline-end:calc(var(--_ui-nag-close-right) + 2em)}}@layer ui.components.nag.variations{.ui.overlay.nag{position:absolute}.ui.fixed.nag{position:fixed}.ui.bottom.nag{border-radius:var(--_ui-nag-radius) var(--_ui-nag-radius) 0 0;top:auto;bottom:0}.ui.bottom.nag:not(.overlay,.fixed){border-radius:var(--_ui-nag-radius)}.ui.inverted.nag{background:var(--ui-color-background,var(--_ui-nag-inverted-background));color:var(--ui-color-text,var(--_ui-nag-inverted-color))}.ui.inverted.nag>.title,.ui.inverted.nag ::slotted(.title),.ui.inverted.nag>.close.icon{color:var(--ui-color-text,var(--_ui-nag-inverted-title-color))}.ui.huge.nag,.ui.massive.nag{line-height:1}}@layer ui.components.nag.states{.ui.nag:hover,.ui.nag>.close.icon:hover,.ui.nag>.close.icon:focus-visible{opacity:1}}", I = /* @__PURE__ */ k("<div><slot>"), L, R, z, B, V, H, U, W, G, K, DOMNagElement = class extends n {
252
253
  static {
253
- s(this, "DOMNagElement");
254
+ e(this, "DOMNagElement");
254
255
  }
255
256
  close() {
256
257
  return this.component?.close() ?? !1;
@@ -264,29 +265,29 @@ var A = {
264
265
  get dismissed() {
265
266
  return this.component?.isDismissed ?? !1;
266
267
  }
267
- }, q = class _UINag extends (W = l, U = [g], H = [_], V = [f("dismissed"), v], B = [y], z = [h("isConnected", "isReady")], R = [y], L = [m("command")], W) {
268
+ }, q = class _UINag extends (W = c, U = [g], H = [_], V = [f("dismissed"), v], B = [y], z = [h("isConnected", "isReady")], R = [y], L = [m("command")], W) {
268
269
  constructor(...n) {
269
- super(...n), u(G, 5, this), b(this, K, u(G, 8, this, this.isHiddenByStorage)), u(G, 11, this), e(this, "root"), e(this, "displayTimer"), e(this, "hasShown", !1), e(this, "isClosing", !1), e(this, "disclosure", new r({
270
+ super(...n), l(G, 5, this), u(this, K, l(G, 8, this, this.isHiddenByStorage)), l(G, 11, this), i(this, "root"), i(this, "displayTimer"), i(this, "hasShown", !1), i(this, "isClosing", !1), i(this, "disclosure", new r({
270
271
  component: this,
271
272
  kept: {
272
- isOpen: /* @__PURE__ */ s(() => !this.isClosing && !this.domElement.hidden, "isOpen"),
273
- setOpen: /* @__PURE__ */ s((e) => {
273
+ isOpen: /* @__PURE__ */ e(() => !this.isClosing && !this.domElement.hidden, "isOpen"),
274
+ setOpen: /* @__PURE__ */ e((e) => {
274
275
  e || this.startClosing();
275
276
  }, "setOpen")
276
277
  },
277
- detail: /* @__PURE__ */ s((e, t) => ({
278
+ detail: /* @__PURE__ */ e((e, t) => ({
278
279
  reason: this.closeReason,
279
280
  originalEvent: t
280
281
  }), "detail"),
281
- afterDetail: /* @__PURE__ */ s(() => ({ reason: this.closeReason }), "afterDetail")
282
- })), e(this, "closeReason", "dismiss"), e(this, "onCloseIcon", /* @__PURE__ */ s((e) => {
282
+ afterDetail: /* @__PURE__ */ e(() => ({ reason: this.closeReason }), "afterDetail")
283
+ })), i(this, "closeReason", "dismiss"), i(this, "onCloseIcon", /* @__PURE__ */ e((e) => {
283
284
  e.stopPropagation(), this.close("close", e);
284
- }, "onCloseIcon")), e(this, "closeButton", new t({
285
+ }, "onCloseIcon")), i(this, "closeButton", new t({
285
286
  owner: this,
286
- shows: /* @__PURE__ */ s(() => !!this.closable, "shows"),
287
- label: /* @__PURE__ */ s(() => this.translationForKey("close"), "label"),
287
+ shows: /* @__PURE__ */ e(() => !!this.closable, "shows"),
288
+ label: /* @__PURE__ */ e(() => this.translationForKey("close"), "label"),
288
289
  part: this.partForName("close"),
289
- onClick: /* @__PURE__ */ s((e) => this.onCloseIcon(e), "onClick")
290
+ onClick: /* @__PURE__ */ e((e) => this.onCloseIcon(e), "onClick")
290
291
  })), !T && this.isHiddenByDismissal && (this.domElement.hidden = !0), this.domElement.addReleaseCallback(() => this.displayTimer?.cancel());
291
292
  }
292
293
  get isDismissed() {
@@ -322,7 +323,7 @@ var A = {
322
323
  let e = this.displayTime ?? 0;
323
324
  e > 0 && (this.displayTimer = d(e / 1e3, () => this.close("timeout")));
324
325
  let t = this.root;
325
- (t ? c.transitions.animate({
326
+ (t ? s.transitions.animate({
326
327
  element: t,
327
328
  name: Y,
328
329
  direction: "in"
@@ -340,7 +341,7 @@ var A = {
340
341
  let e = this.closeReason;
341
342
  this.isClosing = !0, this.displayTimer?.cancel(), e !== "timeout" && (this.dismissalStore?.dismiss(), this.isHiddenByDismissal = !0);
342
343
  let t = this.root;
343
- (t ? c.transitions.animate({
344
+ (t ? s.transitions.animate({
344
345
  element: t,
345
346
  name: Y,
346
347
  direction: "out"
@@ -363,10 +364,10 @@ var A = {
363
364
  }), t;
364
365
  }
365
366
  };
366
- G = o(W), K = /* @__PURE__ */ new WeakMap(), i(G, 4, "isHiddenByDismissal", V, q, K), i(G, 2, "dismissalStore", B, q), i(G, 1, "onConnectedChanged", z, q), i(G, 1, "appear", R, q), i(G, 1, "onCommand", L, q), i(G, 13, "vocabulary", U, q), i(G, 13, "elementSetup", H, q), a(G, q), s(q, "UINag"), e(q, "vocabulary", u(G, 12, q, A)), u(G, 15, q), e(q, "elementSetup", u(G, 16, q, {
367
+ G = b(W), K = /* @__PURE__ */ new WeakMap(), a(G, 4, "isHiddenByDismissal", V, q, K), a(G, 2, "dismissalStore", B, q), a(G, 1, "onConnectedChanged", z, q), a(G, 1, "appear", R, q), a(G, 1, "onCommand", L, q), a(G, 13, "vocabulary", U, q), a(G, 13, "elementSetup", H, q), o(G, q), e(q, "UINag"), i(q, "vocabulary", l(G, 12, q, A)), l(G, 15, q), i(q, "elementSetup", l(G, 16, q, {
367
368
  styleSheets: { nag: F },
368
369
  DOMElement: DOMNagElement
369
- })), u(G, 19, q);
370
+ })), l(G, 19, q);
370
371
  var J = q, Y = "slide-down", X = "cookie", Z = "dismiss", Q = 30;
371
372
  //#endregion
372
373
  //#region src/components/ui-nag/index.ts