spell-ui 0.8.8 → 0.8.10

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 (1167) hide show
  1. package/README-components.md +9 -3
  2. package/README-frameworks.md +5 -5
  3. package/README-migrating.md +2 -2
  4. package/README.md +5 -5
  5. package/dist/{CodeEngine-GL9EzwF1.js → CodeEngine-B684vKxR.js} +39 -100
  6. package/dist/{CodeEngine-GL9EzwF1.js.map → CodeEngine-B684vKxR.js.map} +1 -1
  7. package/dist/{Dragging-CMZoLEWQ.js → Dragging-B93hbRxF.js} +17 -15
  8. package/dist/Dragging-B93hbRxF.js.map +1 -0
  9. package/dist/{MarkdownEngine-CW1WGqNp.js → MarkdownEngine-D1jqcFeU.js} +11 -72
  10. package/dist/{MarkdownEngine-CW1WGqNp.js.map → MarkdownEngine-D1jqcFeU.js.map} +1 -1
  11. package/dist/MarkdownSanitizer-CqsWivYJ.js +866 -0
  12. package/dist/MarkdownSanitizer-CqsWivYJ.js.map +1 -0
  13. package/dist/{PrefStore-Qv0e5y04.js → PrefStore-Di83C0bY.js} +13 -9
  14. package/dist/PrefStore-Di83C0bY.js.map +1 -0
  15. package/dist/ScrollingRow-DkOtx2QK.js +89 -0
  16. package/dist/ScrollingRow-DkOtx2QK.js.map +1 -0
  17. package/dist/{SitePages-CciwREek.js → SitePages-B3zd5Zgu.js} +37 -10
  18. package/dist/SitePages-B3zd5Zgu.js.map +1 -0
  19. package/dist/SlottedItems-DWfAZYqM.js +88 -0
  20. package/dist/SlottedItems-DWfAZYqM.js.map +1 -0
  21. package/dist/{TemporalPolyfill-D9mr7_wA.js → TemporalPolyfill-Bv_c_xa0.js} +7 -12
  22. package/dist/{TemporalPolyfill-D9mr7_wA.js.map → TemporalPolyfill-Bv_c_xa0.js.map} +1 -1
  23. package/dist/{ThemeDraft-B7NPif4d.js → ThemeDraft-CyX3YA_L.js} +41 -43
  24. package/dist/{ThemeDraft-B7NPif4d.js.map → ThemeDraft-CyX3YA_L.js.map} +1 -1
  25. package/dist/{TreeMeasure-BVJeGb1L.js → TreeMeasure-BK74uexu.js} +3 -4
  26. package/dist/{TreeMeasure-BVJeGb1L.js.map → TreeMeasure-BK74uexu.js.map} +1 -1
  27. package/dist/UIButton-BmIiXYDC.js +5 -0
  28. package/dist/UIButton-BmIiXYDC.js.map +1 -0
  29. package/dist/UIGrid-2ZUA1YEc.js +200 -0
  30. package/dist/UIGrid-2ZUA1YEc.js.map +1 -0
  31. package/dist/{UIInput-BodVbUoQ.js → UIInput-B3K0w4ow.js} +2 -3
  32. package/dist/UIInput-B3K0w4ow.js.map +1 -0
  33. package/dist/{UIKeys-Rh_gUZjP.js → UIKeys-DmXvyJuU.js} +12 -12
  34. package/dist/UIKeys-DmXvyJuU.js.map +1 -0
  35. package/dist/{UILabel-DgJUBzB_.js → UILabel-pCjKxQlQ.js} +2 -3
  36. package/dist/UILabel-pCjKxQlQ.js.map +1 -0
  37. package/dist/UIMenu-CqURPocK.js +42 -0
  38. package/dist/UIMenu-CqURPocK.js.map +1 -0
  39. package/dist/{UIRuntime-KH309p5B.js → UIRuntime-BXutHphM.js} +253 -239
  40. package/dist/UIRuntime-BXutHphM.js.map +1 -0
  41. package/dist/{UISegment-CMMIW7cZ.js → UISegment-BF4Tgy2D.js} +2 -3
  42. package/dist/UISegment-BF4Tgy2D.js.map +1 -0
  43. package/dist/_spell-element/UIComponent.d.ts +8 -0
  44. package/dist/_spell-element/vocabulary.types.d.ts +20 -2
  45. package/dist/_util/Dragging.d.ts +14 -2
  46. package/dist/_util/dom.d.ts +12 -8
  47. package/dist/_util/measures/Dimension.d.ts +1 -1
  48. package/dist/_util/persist/PrefStore.d.ts +7 -2
  49. package/dist/_util/persist/persist.types.d.ts +6 -0
  50. package/dist/_util/platform.d.ts +54 -0
  51. package/dist/_util/string.d.ts +25 -0
  52. package/dist/api.js +2 -3
  53. package/dist/api.js.map +1 -1
  54. package/dist/{apple.palette-B4ivrNlM.js → apple.palette-YLjENwUt.js} +2 -3
  55. package/dist/apple.palette-YLjENwUt.js.map +1 -0
  56. package/dist/{classic-DCTQrteU.js → classic-BHyJFvQa.js} +2 -3
  57. package/dist/classic-BHyJFvQa.js.map +1 -0
  58. package/dist/components/ComponentDefinitions.d.ts +55 -8
  59. package/dist/components/components.es.d.ts +2 -1
  60. package/dist/components/components.planned.d.ts +1 -1
  61. package/dist/components/components.types.d.ts +22 -0
  62. package/dist/components/ui-accordion/UIAccordion.d.ts +1 -0
  63. package/dist/components/ui-accordion/UIAccordion.en.d.ts +1 -0
  64. package/dist/components/ui-action/UIAction.d.ts +38 -1
  65. package/dist/components/ui-action/UIAction.en.d.ts +17 -8
  66. package/dist/components/ui-action/UIAction.es.d.ts +1 -0
  67. package/dist/components/ui-ad/UIAd.d.ts +1 -0
  68. package/dist/components/ui-ad/UIAd.en.d.ts +1 -0
  69. package/dist/components/ui-app-menu/UIAppMenu.d.ts +41 -0
  70. package/dist/components/ui-app-menu/UIAppMenu.en.d.ts +294 -0
  71. package/dist/components/ui-app-menu/UIAppMenu.es.d.ts +35 -0
  72. package/dist/components/ui-app-menu/index.d.ts +2 -0
  73. package/dist/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
  74. package/dist/components/ui-breadcrumbs/UIBreadcrumb.en.d.ts +1 -0
  75. package/dist/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
  76. package/dist/components/ui-breadcrumbs/UIBreadcrumbs.en.d.ts +1 -0
  77. package/dist/components/ui-button/UIButton.d.ts +5 -4
  78. package/dist/components/ui-button/UIButton.en.d.ts +4 -3
  79. package/dist/components/ui-button/UIButton.fallback.d.ts +4 -3
  80. package/dist/components/ui-button/UIButton.types.d.ts +1 -1
  81. package/dist/components/ui-button/UIButtons.d.ts +7 -5
  82. package/dist/components/ui-button/UIButtons.en.d.ts +5 -3
  83. package/dist/components/ui-button/UIButtons.es.d.ts +1 -0
  84. package/dist/components/ui-button/UIOr.d.ts +1 -0
  85. package/dist/components/ui-button/UIOr.en.d.ts +1 -0
  86. package/dist/components/ui-calendar/UICalendar.d.ts +1 -0
  87. package/dist/components/ui-calendar/UICalendar.en.d.ts +1 -0
  88. package/dist/components/ui-calendar/UICalendar.fallback.d.ts +1 -0
  89. package/dist/components/ui-card/UICard.d.ts +1 -0
  90. package/dist/components/ui-card/UICard.en.d.ts +1 -0
  91. package/dist/components/ui-card/UICards.d.ts +1 -0
  92. package/dist/components/ui-card/UICards.en.d.ts +1 -0
  93. package/dist/components/ui-checkbox/UICheckbox.d.ts +1 -0
  94. package/dist/components/ui-checkbox/UICheckbox.en.d.ts +1 -0
  95. package/dist/components/ui-checkbox/UICheckbox.fallback.d.ts +1 -0
  96. package/dist/components/ui-checkbox/UIRadio.d.ts +1 -0
  97. package/dist/components/ui-checkbox/UIRadio.en.d.ts +1 -0
  98. package/dist/components/ui-code/CodeHighlighter.d.ts +7 -3
  99. package/dist/components/ui-code/UICode.d.ts +12 -1
  100. package/dist/components/ui-code/UICode.en.d.ts +1 -0
  101. package/dist/components/ui-code/UICode.types.d.ts +9 -0
  102. package/dist/components/ui-comment/UIComment.d.ts +1 -0
  103. package/dist/components/ui-comment/UIComment.en.d.ts +1 -0
  104. package/dist/components/ui-comment/UIComments.d.ts +1 -0
  105. package/dist/components/ui-comment/UIComments.en.d.ts +1 -0
  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 +54 -1
  109. package/dist/components/ui-container/UIContainer.en.d.ts +40 -1
  110. package/dist/components/ui-container/UIContainer.es.d.ts +1 -0
  111. package/dist/components/ui-device/UIDevice.d.ts +234 -0
  112. package/dist/components/ui-device/UIDevice.en.d.ts +126 -0
  113. package/dist/components/ui-device/UIDevice.es.d.ts +52 -0
  114. package/dist/components/ui-device/index.d.ts +1 -0
  115. package/dist/components/ui-diagram/UIDiagram.d.ts +1 -0
  116. package/dist/components/ui-diagram/UIDiagram.en.d.ts +1 -0
  117. package/dist/components/ui-diagram/UIDiagramNode.d.ts +1 -0
  118. package/dist/components/ui-diagram/UIDiagramNode.en.d.ts +1 -0
  119. package/dist/components/ui-dimension/UIDimension.d.ts +1 -0
  120. package/dist/components/ui-dimension/UIDimension.en.d.ts +1 -0
  121. package/dist/components/ui-dimmer/UIDimmer.d.ts +1 -0
  122. package/dist/components/ui-dimmer/UIDimmer.en.d.ts +1 -0
  123. package/dist/components/ui-divider/UIDivider.d.ts +1 -0
  124. package/dist/components/ui-divider/UIDivider.en.d.ts +1 -0
  125. package/dist/components/ui-dropdown/SlottedItems.d.ts +9 -1
  126. package/dist/components/ui-dropdown/UIDropdown.d.ts +1 -0
  127. package/dist/components/ui-dropdown/UIDropdown.en.d.ts +1 -0
  128. package/dist/components/ui-dropdown/UIDropdown.fallback.d.ts +1 -0
  129. package/dist/components/ui-embed/UIEmbed.d.ts +1 -0
  130. package/dist/components/ui-embed/UIEmbed.en.d.ts +1 -0
  131. package/dist/components/ui-emoji/UIEmoji.d.ts +1 -0
  132. package/dist/components/ui-emoji/UIEmoji.en.d.ts +1 -0
  133. package/dist/components/ui-example/UIExample.en.d.ts +1 -0
  134. package/dist/components/ui-feed/UIFeed.d.ts +1 -0
  135. package/dist/components/ui-feed/UIFeed.en.d.ts +1 -0
  136. package/dist/components/ui-feed/UIFeedEvent.d.ts +1 -0
  137. package/dist/components/ui-feed/UIFeedEvent.en.d.ts +1 -0
  138. package/dist/components/ui-flag/UIFlag.d.ts +1 -0
  139. package/dist/components/ui-flag/UIFlag.en.d.ts +1 -0
  140. package/dist/components/ui-flyout/UIFlyout.d.ts +1 -0
  141. package/dist/components/ui-flyout/UIFlyout.en.d.ts +1 -0
  142. package/dist/components/ui-form/UIField.d.ts +11 -4
  143. package/dist/components/ui-form/UIField.en.d.ts +3 -2
  144. package/dist/components/ui-form/UIFields.d.ts +1 -0
  145. package/dist/components/ui-form/UIFields.en.d.ts +1 -0
  146. package/dist/components/ui-form/UIForm.d.ts +1 -0
  147. package/dist/components/ui-form/UIForm.en.d.ts +1 -0
  148. package/dist/components/ui-form/UIRepeat.d.ts +1 -0
  149. package/dist/components/ui-form/UIRepeat.en.d.ts +1 -0
  150. package/dist/components/ui-grid/UIColumn.d.ts +4 -3
  151. package/dist/components/ui-grid/UIColumn.en.d.ts +4 -3
  152. package/dist/components/ui-grid/UIGrid.d.ts +1 -0
  153. package/dist/components/ui-grid/UIGrid.en.d.ts +1 -0
  154. package/dist/components/ui-grid/UIRow.d.ts +1 -0
  155. package/dist/components/ui-grid/UIRow.en.d.ts +1 -0
  156. package/dist/components/ui-icon/UIIcon.d.ts +1 -0
  157. package/dist/components/ui-icon/UIIcon.en.d.ts +1 -0
  158. package/dist/components/ui-icon/UIIcons.d.ts +1 -0
  159. package/dist/components/ui-icon/UIIcons.en.d.ts +1 -0
  160. package/dist/components/ui-icon-picker/UIIconPicker.d.ts +5 -1
  161. package/dist/components/ui-icon-picker/UIIconPicker.en.d.ts +1 -0
  162. package/dist/components/ui-icon-picker/UIIconPicker.fallback.d.ts +1 -0
  163. package/dist/components/ui-image/UIImage.d.ts +1 -0
  164. package/dist/components/ui-image/UIImage.en.d.ts +1 -0
  165. package/dist/components/ui-image/UIImages.d.ts +1 -0
  166. package/dist/components/ui-image/UIImages.en.d.ts +1 -0
  167. package/dist/components/ui-include/UIInclude.d.ts +1 -0
  168. package/dist/components/ui-include/UIInclude.en.d.ts +1 -0
  169. package/dist/components/ui-input/UIInput.d.ts +1 -0
  170. package/dist/components/ui-input/UIInput.en.d.ts +1 -0
  171. package/dist/components/ui-input/UIInput.fallback.d.ts +1 -0
  172. package/dist/components/ui-input/UITextarea.d.ts +1 -0
  173. package/dist/components/ui-input/UITextarea.en.d.ts +1 -0
  174. package/dist/components/ui-item/UIItem.d.ts +19 -8
  175. package/dist/components/ui-item/UIItem.en.d.ts +2 -1
  176. package/dist/components/ui-items/UIItems.d.ts +1 -0
  177. package/dist/components/ui-items/UIItems.en.d.ts +1 -0
  178. package/dist/components/ui-json/UIJson.d.ts +1 -0
  179. package/dist/components/ui-json/UIJson.en.d.ts +1 -0
  180. package/dist/components/ui-keys/UIKeys.d.ts +1 -0
  181. package/dist/components/ui-keys/UIKeys.en.d.ts +1 -0
  182. package/dist/components/ui-label/UILabel.d.ts +3 -2
  183. package/dist/components/ui-label/UILabel.en.d.ts +3 -2
  184. package/dist/components/ui-label/UILabels.d.ts +1 -0
  185. package/dist/components/ui-label/UILabels.en.d.ts +1 -0
  186. package/dist/components/ui-list/UIList.d.ts +1 -0
  187. package/dist/components/ui-list/UIList.en.d.ts +1 -0
  188. package/dist/components/ui-loader/UILoader.d.ts +1 -0
  189. package/dist/components/ui-loader/UILoader.en.d.ts +1 -0
  190. package/dist/components/ui-markdown/MarkdownBox.d.ts +7 -2
  191. package/dist/components/ui-markdown/MarkdownFormats.d.ts +9 -4
  192. package/dist/components/ui-markdown/UIMarkdown.en.d.ts +5 -0
  193. package/dist/components/ui-markdown/UIMarkdown.es.d.ts +1 -0
  194. package/dist/components/ui-menu/ScrollingRow.d.ts +19 -1
  195. package/dist/components/ui-menu/SegmentedThumb.d.ts +8 -1
  196. package/dist/components/ui-menu/SubMenuAim.d.ts +115 -0
  197. package/dist/components/ui-menu/TitleFit.d.ts +16 -1
  198. package/dist/components/ui-menu/UIMenu.d.ts +112 -9
  199. package/dist/components/ui-menu/UIMenu.en.d.ts +3 -2
  200. package/dist/components/ui-menu/UISubmenu.d.ts +261 -0
  201. package/dist/components/ui-menu/UISubmenu.en.d.ts +102 -0
  202. package/dist/components/ui-menu/UISubmenu.es.d.ts +21 -0
  203. package/dist/components/ui-menu/index.d.ts +3 -1
  204. package/dist/components/ui-message/UIMessage.d.ts +3 -2
  205. package/dist/components/ui-message/UIMessage.en.d.ts +4 -3
  206. package/dist/components/ui-modal/ModalDialogs.d.ts +36 -2
  207. package/dist/components/ui-modal/UIModal.d.ts +1 -0
  208. package/dist/components/ui-modal/UIModal.en.d.ts +1 -0
  209. package/dist/components/ui-nag/UINag.d.ts +1 -0
  210. package/dist/components/ui-nag/UINag.en.d.ts +1 -0
  211. package/dist/components/ui-page/UIPage.d.ts +1 -0
  212. package/dist/components/ui-page/UIPage.en.d.ts +1 -0
  213. package/dist/components/ui-page-layout/UIPageLayout.d.ts +311 -0
  214. package/dist/components/ui-page-layout/UIPageLayout.en.d.ts +99 -0
  215. package/dist/components/ui-page-layout/UIPageLayout.es.d.ts +38 -0
  216. package/dist/components/ui-page-layout/index.d.ts +1 -0
  217. package/dist/components/ui-panel/ScrollShades.d.ts +38 -0
  218. package/dist/components/ui-panel/UIPanel.d.ts +21 -2
  219. package/dist/components/ui-panel/UIPanel.en.d.ts +68 -61
  220. package/dist/components/ui-parts/UIActions.d.ts +1 -0
  221. package/dist/components/ui-parts/UIActions.en.d.ts +1 -0
  222. package/dist/components/ui-parts/UIAuthor.d.ts +1 -0
  223. package/dist/components/ui-parts/UIAuthor.en.d.ts +1 -0
  224. package/dist/components/ui-parts/UIAvatar.d.ts +11 -2
  225. package/dist/components/ui-parts/UIAvatar.en.d.ts +3 -2
  226. package/dist/components/ui-parts/UIContent.d.ts +1 -0
  227. package/dist/components/ui-parts/UIContent.en.d.ts +1 -0
  228. package/dist/components/ui-parts/UIDate.d.ts +1 -0
  229. package/dist/components/ui-parts/UIDate.en.d.ts +1 -0
  230. package/dist/components/ui-parts/UIDescription.d.ts +1 -0
  231. package/dist/components/ui-parts/UIDescription.en.d.ts +1 -0
  232. package/dist/components/ui-parts/UIDetail.d.ts +1 -0
  233. package/dist/components/ui-parts/UIDetail.en.d.ts +1 -0
  234. package/dist/components/ui-parts/UIExtra.d.ts +1 -0
  235. package/dist/components/ui-parts/UIExtra.en.d.ts +1 -0
  236. package/dist/components/ui-parts/UIHeader.d.ts +16 -5
  237. package/dist/components/ui-parts/UIHeader.en.d.ts +9 -5
  238. package/dist/components/ui-parts/UIMeta.d.ts +1 -0
  239. package/dist/components/ui-parts/UIMeta.en.d.ts +1 -0
  240. package/dist/components/ui-parts/UIParts.types.d.ts +23 -7
  241. package/dist/components/ui-parts/UISummary.d.ts +1 -0
  242. package/dist/components/ui-parts/UISummary.en.d.ts +1 -0
  243. package/dist/components/ui-parts/UITitle.d.ts +1 -0
  244. package/dist/components/ui-parts/UITitle.en.d.ts +1 -0
  245. package/dist/components/ui-parts/UIValue.d.ts +1 -0
  246. package/dist/components/ui-parts/UIValue.en.d.ts +1 -0
  247. package/dist/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
  248. package/dist/components/ui-placeholder/UIPlaceholder.en.d.ts +1 -0
  249. package/dist/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
  250. package/dist/components/ui-placeholder/UIPlaceholderHeader.en.d.ts +1 -0
  251. package/dist/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
  252. package/dist/components/ui-placeholder/UIPlaceholderImage.en.d.ts +1 -0
  253. package/dist/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
  254. package/dist/components/ui-placeholder/UIPlaceholderLine.en.d.ts +1 -0
  255. package/dist/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
  256. package/dist/components/ui-placeholder/UIPlaceholderParagraph.en.d.ts +1 -0
  257. package/dist/components/ui-popup/UIPopup.d.ts +21 -3
  258. package/dist/components/ui-popup/UIPopup.en.d.ts +1 -0
  259. package/dist/components/ui-progress/UIProgress.d.ts +3 -2
  260. package/dist/components/ui-progress/UIProgress.en.d.ts +4 -3
  261. package/dist/components/ui-property-editor/UIProperty.d.ts +47 -13
  262. package/dist/components/ui-property-editor/UIProperty.en.d.ts +1 -0
  263. package/dist/components/ui-property-editor/UIPropertyEditor.d.ts +14 -1
  264. package/dist/components/ui-property-editor/UIPropertyEditor.en.d.ts +1 -0
  265. package/dist/components/ui-property-editor/UIPropertyEditor.types.d.ts +7 -1
  266. package/dist/components/ui-property-editor/UIPropertyGroup.d.ts +15 -6
  267. package/dist/components/ui-property-editor/UIPropertyGroup.en.d.ts +1 -0
  268. package/dist/components/ui-quote/UIQuote.d.ts +1 -0
  269. package/dist/components/ui-quote/UIQuote.en.d.ts +1 -0
  270. package/dist/components/ui-rail/UIRail.d.ts +4 -3
  271. package/dist/components/ui-rail/UIRail.en.d.ts +4 -3
  272. package/dist/components/ui-rating/UIRating.d.ts +1 -0
  273. package/dist/components/ui-rating/UIRating.en.d.ts +1 -0
  274. package/dist/components/ui-rating/UIRating.fallback.d.ts +1 -0
  275. package/dist/components/ui-reveal/UIReveal.d.ts +1 -0
  276. package/dist/components/ui-reveal/UIReveal.en.d.ts +1 -0
  277. package/dist/components/ui-root/UIRoot.en.d.ts +1 -0
  278. package/dist/components/ui-search/UISearch.d.ts +1 -0
  279. package/dist/components/ui-search/UISearch.en.d.ts +1 -0
  280. package/dist/components/ui-search/UISearch.fallback.d.ts +1 -0
  281. package/dist/components/ui-section/UISection.d.ts +3 -2
  282. package/dist/components/ui-section/UISection.en.d.ts +3 -2
  283. package/dist/components/ui-section/UISections.d.ts +1 -0
  284. package/dist/components/ui-section/UISections.en.d.ts +1 -0
  285. package/dist/components/ui-segment/UISegment.d.ts +9 -10
  286. package/dist/components/ui-segment/UISegment.en.d.ts +10 -11
  287. package/dist/components/ui-segment/UISegments.d.ts +1 -0
  288. package/dist/components/ui-segment/UISegments.en.d.ts +1 -0
  289. package/dist/components/ui-select/UISelect.d.ts +1 -0
  290. package/dist/components/ui-select/UISelect.en.d.ts +1 -0
  291. package/dist/components/ui-select/UISelect.fallback.d.ts +1 -0
  292. package/dist/components/ui-shape/UIShape.d.ts +1 -0
  293. package/dist/components/ui-shape/UIShape.en.d.ts +1 -0
  294. package/dist/components/ui-shape/UISide.d.ts +1 -0
  295. package/dist/components/ui-shape/UISide.en.d.ts +1 -0
  296. package/dist/components/ui-sidebar/UIPushable.d.ts +1 -0
  297. package/dist/components/ui-sidebar/UIPushable.en.d.ts +1 -0
  298. package/dist/components/ui-sidebar/UIPusher.d.ts +1 -0
  299. package/dist/components/ui-sidebar/UIPusher.en.d.ts +1 -0
  300. package/dist/components/ui-sidebar/UISidebar.d.ts +1 -0
  301. package/dist/components/ui-sidebar/UISidebar.en.d.ts +1 -0
  302. package/dist/components/ui-sides/UISides.d.ts +1 -0
  303. package/dist/components/ui-sides/UISides.en.d.ts +1 -0
  304. package/dist/components/ui-sides/UISides.fallback.d.ts +1 -0
  305. package/dist/components/ui-site-breadcrumbs/UISiteBreadcrumbs.d.ts +118 -0
  306. package/dist/components/ui-site-breadcrumbs/UISiteBreadcrumbs.en.d.ts +49 -0
  307. package/dist/components/ui-site-breadcrumbs/UISiteBreadcrumbs.es.d.ts +22 -0
  308. package/dist/components/ui-site-breadcrumbs/index.d.ts +1 -0
  309. package/dist/components/ui-site-nav/SitePages.d.ts +26 -3
  310. package/dist/components/ui-site-nav/UISiteNav.d.ts +43 -5
  311. package/dist/components/ui-site-nav/UISiteNav.en.d.ts +10 -1
  312. package/dist/components/ui-site-nav-button/UISiteNavButton.d.ts +63 -0
  313. package/dist/components/ui-site-nav-button/UISiteNavButton.en.d.ts +173 -0
  314. package/dist/components/ui-site-nav-button/UISiteNavButton.es.d.ts +20 -0
  315. package/dist/components/ui-site-nav-button/index.d.ts +1 -0
  316. package/dist/components/ui-site-tabs/UISiteTabs.d.ts +21 -6
  317. package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +1 -0
  318. package/dist/components/ui-slider/UISlider.d.ts +1 -0
  319. package/dist/components/ui-slider/UISlider.en.d.ts +1 -0
  320. package/dist/components/ui-slider/UISlider.fallback.d.ts +1 -0
  321. package/dist/components/ui-space/UISpace.d.ts +1 -0
  322. package/dist/components/ui-space/UISpace.en.d.ts +1 -0
  323. package/dist/components/ui-split-panel/UISplitPanel.d.ts +43 -7
  324. package/dist/components/ui-split-panel/UISplitPanel.en.d.ts +2 -1
  325. package/dist/components/ui-stack/UIStack.d.ts +1 -0
  326. package/dist/components/ui-stack/UIStack.en.d.ts +1 -0
  327. package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
  328. package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
  329. package/dist/components/ui-statistic/UIStatistics.d.ts +1 -0
  330. package/dist/components/ui-statistic/UIStatistics.en.d.ts +1 -0
  331. package/dist/components/ui-step/UIStep.d.ts +1 -0
  332. package/dist/components/ui-step/UIStep.en.d.ts +1 -0
  333. package/dist/components/ui-step/UISteps.d.ts +3 -2
  334. package/dist/components/ui-step/UISteps.en.d.ts +3 -2
  335. package/dist/components/ui-sticky/UISticky.d.ts +1 -0
  336. package/dist/components/ui-sticky/UISticky.en.d.ts +1 -0
  337. package/dist/components/ui-tab/UITab.d.ts +3 -2
  338. package/dist/components/ui-tab/UITab.en.d.ts +4 -3
  339. package/dist/components/ui-tab/UITabs.d.ts +5 -4
  340. package/dist/components/ui-tab/UITabs.en.d.ts +4 -3
  341. package/dist/components/ui-table/TableGrammar.d.ts +2 -2
  342. package/dist/components/ui-table/UICell.d.ts +1 -0
  343. package/dist/components/ui-table/UICell.en.d.ts +1 -0
  344. package/dist/components/ui-table/UITable.d.ts +7 -6
  345. package/dist/components/ui-table/UITable.en.d.ts +7 -6
  346. package/dist/components/ui-terms/UITerm.d.ts +1 -0
  347. package/dist/components/ui-terms/UITerm.en.d.ts +1 -0
  348. package/dist/components/ui-terms/UITerms.d.ts +1 -0
  349. package/dist/components/ui-terms/UITerms.en.d.ts +1 -0
  350. package/dist/components/ui-text/UILink.d.ts +1 -0
  351. package/dist/components/ui-text/UILink.en.d.ts +1 -0
  352. package/dist/components/ui-text/UIText.d.ts +2 -1
  353. package/dist/components/ui-text/UIText.en.d.ts +2 -1
  354. package/dist/components/ui-theme-editor/BenchAddress.d.ts +9 -0
  355. package/dist/components/ui-theme-editor/UIColorChip.d.ts +1 -0
  356. package/dist/components/ui-theme-editor/UIColorChip.en.d.ts +1 -0
  357. package/dist/components/ui-theme-editor/UIThemeEditor.d.ts +1 -0
  358. package/dist/components/ui-theme-editor/UIThemeEditor.en.d.ts +1 -0
  359. package/dist/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
  360. package/dist/components/ui-theme-editor/UIThemeToken.en.d.ts +1 -0
  361. package/dist/components/ui-theme-menu/UIThemeMenu.d.ts +37 -15
  362. package/dist/components/ui-theme-menu/UIThemeMenu.en.d.ts +3 -2
  363. package/dist/components/ui-toast/UIToast.d.ts +1 -0
  364. package/dist/components/ui-toast/UIToast.en.d.ts +1 -0
  365. package/dist/components/ui-toc/UIToc.d.ts +1 -0
  366. package/dist/components/ui-toc/UIToc.en.d.ts +1 -0
  367. package/dist/components/ui-toolbar/UIToolbar.d.ts +134 -1
  368. package/dist/components/ui-toolbar/UIToolbar.en.d.ts +75 -42
  369. package/dist/components/ui-toolbar/UIToolbar.es.d.ts +5 -0
  370. package/dist/components/ui-transition/UITransition.d.ts +1 -0
  371. package/dist/components/ui-transition/UITransition.en.d.ts +1 -0
  372. package/dist/components/ui-tree/UITree.d.ts +102 -2
  373. package/dist/components/ui-tree/UITree.en.d.ts +14 -1
  374. package/dist/components/ui-tree/UITree.es.d.ts +3 -0
  375. package/dist/components/ui-tree/UITreeItem.d.ts +21 -2
  376. package/dist/components/ui-tree/UITreeItem.en.d.ts +5 -1
  377. package/dist/components/ui-tree/UITreeItem.es.d.ts +1 -0
  378. package/dist/components/ui-tree-diagram/UITreeDiagram.d.ts +1 -0
  379. package/dist/components/ui-tree-diagram/UITreeDiagram.en.d.ts +1 -0
  380. package/dist/components/ui-tree-diagram/UITreeNode.d.ts +1 -0
  381. package/dist/components/ui-tree-diagram/UITreeNode.en.d.ts +1 -0
  382. package/dist/components/ui-video/UIAudio.d.ts +1 -0
  383. package/dist/components/ui-video/UIAudio.en.d.ts +1 -0
  384. package/dist/components/ui-video/UIVideo.d.ts +1 -0
  385. package/dist/components/ui-video/UIVideo.en.d.ts +1 -0
  386. package/dist/components/ui-visibility/UIVisibility.d.ts +1 -0
  387. package/dist/components/ui-visibility/UIVisibility.en.d.ts +1 -0
  388. package/dist/components/ui-zoom/UIZoom.d.ts +1 -0
  389. package/dist/components/ui-zoom/UIZoom.en.d.ts +1 -0
  390. package/dist/{components.es-BOa_7gFF.js → components.es-DEa8Ep42.js} +265 -77
  391. package/dist/components.es-DEa8Ep42.js.map +1 -0
  392. package/dist/core.js +884 -806
  393. package/dist/core.js.map +1 -1
  394. package/dist/{crisp-VfYZlTph.js → crisp-DIpY320U.js} +3 -4
  395. package/dist/crisp-DIpY320U.js.map +1 -0
  396. package/dist/crisp.theme-Ir9p4BDC.js +5 -0
  397. package/dist/crisp.theme-Ir9p4BDC.js.map +1 -0
  398. package/dist/{dark-CbUdPe0a.js → dark-B5s4QbmU.js} +2 -3
  399. package/dist/dark-B5s4QbmU.js.map +1 -0
  400. package/dist/{dist-BLYIGZVK.js → dist-BQT4KajA.js} +34 -80
  401. package/dist/dist-BQT4KajA.js.map +1 -0
  402. package/dist/docs-components/docs-components.types.d.ts +6 -0
  403. package/dist/docs-components/ui-docs-palette/UIDocsPalette.d.ts +180 -0
  404. package/dist/docs-components/ui-docs-palette/UIDocsPalette.en.d.ts +88 -0
  405. package/dist/docs-components/ui-docs-palette/UIDocsPalette.types.d.ts +5 -0
  406. package/dist/docs-components/ui-docs-palette/index.d.ts +2 -0
  407. package/dist/docs-components/ui-docs-tokens/UIDocsTokens.d.ts +23 -0
  408. package/dist/docs-components/ui-docs-tokens/UIDocsTokens.en.d.ts +5 -1
  409. package/dist/elements/PartComponent.d.ts +5 -0
  410. package/dist/elements/PopoverPanel.d.ts +12 -1
  411. package/dist/elements/Validator.d.ts +1 -1
  412. package/dist/emoji/cldr/{0-DSUpV2d7.js → 0-B6B0nyLW.js} +2 -3
  413. package/dist/emoji/cldr/0-B6B0nyLW.js.map +1 -0
  414. package/dist/emoji/cldr/{a-D_oB4vJ-.js → a-C12vpdzK.js} +2 -3
  415. package/dist/emoji/cldr/a-C12vpdzK.js.map +1 -0
  416. package/dist/emoji/cldr/{b-DX0W0Mda.js → b-BGkQUJ8v.js} +2 -3
  417. package/dist/emoji/cldr/b-BGkQUJ8v.js.map +1 -0
  418. package/dist/emoji/cldr/{c-DUHidpE9.js → c-DtqAfVnG.js} +2 -3
  419. package/dist/emoji/cldr/c-DtqAfVnG.js.map +1 -0
  420. package/dist/emoji/cldr/{d-CiCXZXay.js → d-B5SNGAad.js} +2 -3
  421. package/dist/emoji/cldr/d-B5SNGAad.js.map +1 -0
  422. package/dist/emoji/cldr/{e-DILJo3Ri.js → e-CMUDvE48.js} +2 -3
  423. package/dist/emoji/cldr/e-CMUDvE48.js.map +1 -0
  424. package/dist/emoji/cldr/{f-ByGFLyOq.js → f-Dfhd9bp8.js} +2 -3
  425. package/dist/emoji/cldr/f-Dfhd9bp8.js.map +1 -0
  426. package/dist/emoji/cldr/{g-BZ0FRsud.js → g-VpFllv6y.js} +2 -3
  427. package/dist/emoji/cldr/g-VpFllv6y.js.map +1 -0
  428. package/dist/emoji/cldr/{h-jtLdvRXQ.js → h-CE6GevC3.js} +2 -3
  429. package/dist/emoji/cldr/h-CE6GevC3.js.map +1 -0
  430. package/dist/emoji/cldr/{i-DcbJ5utE.js → i-BUPzV8pA.js} +2 -3
  431. package/dist/emoji/cldr/i-BUPzV8pA.js.map +1 -0
  432. package/dist/emoji/cldr/{j-BuEqP5nz.js → j-BFAg68Ig.js} +2 -3
  433. package/dist/emoji/cldr/j-BFAg68Ig.js.map +1 -0
  434. package/dist/emoji/cldr/{k-P1J6Gvze.js → k-jnBMfMlM.js} +2 -3
  435. package/dist/emoji/cldr/k-jnBMfMlM.js.map +1 -0
  436. package/dist/emoji/cldr/{l-28XcbsPr.js → l-ClLOCfnc.js} +2 -3
  437. package/dist/emoji/cldr/l-ClLOCfnc.js.map +1 -0
  438. package/dist/emoji/cldr/{m-DKgGJ8rW.js → m-p358YNne.js} +2 -3
  439. package/dist/emoji/cldr/m-p358YNne.js.map +1 -0
  440. package/dist/emoji/cldr/{n-DmPLP4F3.js → n-DOh1UxA2.js} +2 -3
  441. package/dist/emoji/cldr/n-DOh1UxA2.js.map +1 -0
  442. package/dist/emoji/cldr/{o-f98nt3s7.js → o-D_nTGMIR.js} +2 -3
  443. package/dist/emoji/cldr/o-D_nTGMIR.js.map +1 -0
  444. package/dist/emoji/cldr/{p-CxnsOTOt.js → p-BA8Ct3hE.js} +2 -3
  445. package/dist/emoji/cldr/p-BA8Ct3hE.js.map +1 -0
  446. package/dist/emoji/cldr/{r-D0GPRJ-Q.js → r-BFZ26mlC.js} +2 -3
  447. package/dist/emoji/cldr/r-BFZ26mlC.js.map +1 -0
  448. package/dist/emoji/cldr/{s-DcFuepnw.js → s-CIZH91hj.js} +2 -3
  449. package/dist/emoji/cldr/s-CIZH91hj.js.map +1 -0
  450. package/dist/emoji/cldr/{t-BvHgGpUr.js → t-qg9oQuYr.js} +2 -3
  451. package/dist/emoji/cldr/t-qg9oQuYr.js.map +1 -0
  452. package/dist/emoji/cldr/{u-ChFYHtUf.js → u-CN-QpqjC.js} +2 -3
  453. package/dist/emoji/cldr/u-CN-QpqjC.js.map +1 -0
  454. package/dist/emoji/cldr/{v-WmX3nWtZ.js → v-CO_76wOC.js} +2 -3
  455. package/dist/emoji/cldr/v-CO_76wOC.js.map +1 -0
  456. package/dist/emoji/cldr/{w-BPySQUWW.js → w-DOQn50Cw.js} +2 -3
  457. package/dist/emoji/cldr/w-DOQn50Cw.js.map +1 -0
  458. package/dist/emoji/cldr/x-DddFDGbR.js +5 -0
  459. package/dist/emoji/cldr/x-DddFDGbR.js.map +1 -0
  460. package/dist/emoji/cldr/{y-zB_yhTFg.js → y-auUWML2r.js} +2 -3
  461. package/dist/emoji/cldr/y-auUWML2r.js.map +1 -0
  462. package/dist/emoji/cldr/{z-BgJ94Cap.js → z-BYAp28d6.js} +2 -3
  463. package/dist/emoji/cldr/z-BYAp28d6.js.map +1 -0
  464. package/dist/emoji/fomantic/0-BdzcjXW3.js +9 -0
  465. package/dist/emoji/fomantic/0-BdzcjXW3.js.map +1 -0
  466. package/dist/emoji/fomantic/{a-CrqYlC21.js → a-R3ZJ-207.js} +2 -3
  467. package/dist/emoji/fomantic/a-R3ZJ-207.js.map +1 -0
  468. package/dist/emoji/fomantic/{b-DneVHRdQ.js → b-NF1y0dRD.js} +2 -3
  469. package/dist/emoji/fomantic/b-NF1y0dRD.js.map +1 -0
  470. package/dist/emoji/fomantic/{c-ClxKRuir.js → c-CuIzdNXI.js} +2 -3
  471. package/dist/emoji/fomantic/c-CuIzdNXI.js.map +1 -0
  472. package/dist/emoji/fomantic/{d-Djqs_y4s.js → d-CuS9uvGS.js} +2 -3
  473. package/dist/emoji/fomantic/d-CuS9uvGS.js.map +1 -0
  474. package/dist/emoji/fomantic/{e-CuF-jOQd.js → e-S2pyUDgP.js} +2 -3
  475. package/dist/emoji/fomantic/e-S2pyUDgP.js.map +1 -0
  476. package/dist/emoji/fomantic/{f-D8VglrJ4.js → f-DnHzZwKR.js} +2 -3
  477. package/dist/emoji/fomantic/f-DnHzZwKR.js.map +1 -0
  478. package/dist/emoji/fomantic/{g-Du_HFl6U.js → g-CdqbF8yB.js} +2 -3
  479. package/dist/emoji/fomantic/g-CdqbF8yB.js.map +1 -0
  480. package/dist/emoji/fomantic/{h-CLE5tHnM.js → h-Dgmy17VC.js} +2 -3
  481. package/dist/emoji/fomantic/h-Dgmy17VC.js.map +1 -0
  482. package/dist/emoji/fomantic/{i-BjOsrQDZ.js → i-BCe1z6Es.js} +2 -3
  483. package/dist/emoji/fomantic/i-BCe1z6Es.js.map +1 -0
  484. package/dist/emoji/fomantic/{j-CyUDXKCu.js → j-D39udLwj.js} +2 -3
  485. package/dist/emoji/fomantic/j-D39udLwj.js.map +1 -0
  486. package/dist/emoji/fomantic/{k-Clypg4R8.js → k-KDlJnEWX.js} +2 -3
  487. package/dist/emoji/fomantic/k-KDlJnEWX.js.map +1 -0
  488. package/dist/emoji/fomantic/{l-DvLPdBh-.js → l-rVE39-7Z.js} +2 -3
  489. package/dist/emoji/fomantic/l-rVE39-7Z.js.map +1 -0
  490. package/dist/emoji/fomantic/{m-B1lIb1kP.js → m-Bys5Cs9k.js} +2 -3
  491. package/dist/emoji/fomantic/m-Bys5Cs9k.js.map +1 -0
  492. package/dist/emoji/fomantic/{n-Bgpp_ht5.js → n-DzPz1atY.js} +2 -3
  493. package/dist/emoji/fomantic/n-DzPz1atY.js.map +1 -0
  494. package/dist/emoji/fomantic/{o-BhYZzpjp.js → o-lKtDGpuN.js} +2 -3
  495. package/dist/emoji/fomantic/o-lKtDGpuN.js.map +1 -0
  496. package/dist/emoji/fomantic/{p-VLL0GK3m.js → p-DUvy18Aa.js} +2 -3
  497. package/dist/emoji/fomantic/p-DUvy18Aa.js.map +1 -0
  498. package/dist/emoji/fomantic/q-WtSN0kE7.js +5 -0
  499. package/dist/emoji/fomantic/q-WtSN0kE7.js.map +1 -0
  500. package/dist/emoji/fomantic/{r-Bd1DjkkI.js → r-Dm_1szGZ.js} +2 -3
  501. package/dist/emoji/fomantic/r-Dm_1szGZ.js.map +1 -0
  502. package/dist/emoji/fomantic/{s-Bqatw1W7.js → s-LPRU4KZk.js} +2 -3
  503. package/dist/emoji/fomantic/s-LPRU4KZk.js.map +1 -0
  504. package/dist/emoji/fomantic/{t-Bs7IFhv3.js → t-iQksEIKb.js} +2 -3
  505. package/dist/emoji/fomantic/t-iQksEIKb.js.map +1 -0
  506. package/dist/emoji/fomantic/{u-M6GfYC-U.js → u-CkDd-u7Y.js} +2 -3
  507. package/dist/emoji/fomantic/u-CkDd-u7Y.js.map +1 -0
  508. package/dist/emoji/fomantic/{v-BKHNqkn0.js → v-C83uQ5pk.js} +2 -3
  509. package/dist/emoji/fomantic/v-C83uQ5pk.js.map +1 -0
  510. package/dist/emoji/fomantic/{w-B_XvIu7h.js → w-D_redhGe.js} +2 -3
  511. package/dist/emoji/fomantic/w-D_redhGe.js.map +1 -0
  512. package/dist/emoji/fomantic/x-eI_dPUEx.js +8 -0
  513. package/dist/emoji/fomantic/x-eI_dPUEx.js.map +1 -0
  514. package/dist/emoji/fomantic/{y-DPZaoIla.js → y-CO_6qz-J.js} +2 -3
  515. package/dist/emoji/fomantic/y-CO_6qz-J.js.map +1 -0
  516. package/dist/emoji/fomantic/{z-FH-kPXch.js → z-C-wWxD0a.js} +2 -3
  517. package/dist/emoji/fomantic/z-C-wWxD0a.js.map +1 -0
  518. package/dist/forms.js +65 -75
  519. package/dist/forms.js.map +1 -1
  520. package/dist/fruity-CsfZNeXb.js +5 -0
  521. package/dist/fruity-CsfZNeXb.js.map +1 -0
  522. package/dist/{fruity.theme-CbC7Jyvk.js → fruity.theme-BL7cCZUQ.js} +3 -4
  523. package/dist/fruity.theme-BL7cCZUQ.js.map +1 -0
  524. package/dist/glass-BCK30hpe.js +5 -0
  525. package/dist/glass-BCK30hpe.js.map +1 -0
  526. package/dist/glass.theme-C7QSRB7b.js +5 -0
  527. package/dist/glass.theme-C7QSRB7b.js.map +1 -0
  528. package/dist/hot.js +18 -32
  529. package/dist/hot.js.map +1 -1
  530. package/dist/index.d.ts +5 -0
  531. package/dist/index.js +95 -90
  532. package/dist/jsx.d.ts +3869 -715
  533. package/dist/matrix-DEnqBfwC.js +5 -0
  534. package/dist/matrix-DEnqBfwC.js.map +1 -0
  535. package/dist/matrix.theme-YV6_nvXv.js +5 -0
  536. package/dist/matrix.theme-YV6_nvXv.js.map +1 -0
  537. package/dist/{merlot-DOXLuUaU.js → merlot-DFa6kDbA.js} +3 -4
  538. package/dist/merlot-DFa6kDbA.js.map +1 -0
  539. package/dist/merlot.theme-B1K8nn2u.js +5 -0
  540. package/dist/merlot.theme-B1K8nn2u.js.map +1 -0
  541. package/dist/{midnight-BxlTQSfw.js → midnight-q0-3-V6U.js} +3 -4
  542. package/dist/midnight-q0-3-V6U.js.map +1 -0
  543. package/dist/midnight.theme-C7M02wTD.js +5 -0
  544. package/dist/midnight.theme-C7M02wTD.js.map +1 -0
  545. package/dist/mockup-D0vovNO7.js +5 -0
  546. package/dist/mockup-D0vovNO7.js.map +1 -0
  547. package/dist/mockup.theme-C92r9NI0.js +5 -0
  548. package/dist/mockup.theme-C92r9NI0.js.map +1 -0
  549. package/dist/{paper-M61nUilz.js → paper-DPxolmdy.js} +3 -4
  550. package/dist/paper-DPxolmdy.js.map +1 -0
  551. package/dist/paper.theme-BAKk3DY1.js +5 -0
  552. package/dist/paper.theme-BAKk3DY1.js.map +1 -0
  553. package/dist/{persist.types-D2m6wD-S.js → persist.types-D7N7GewC.js} +2 -3
  554. package/dist/persist.types-D7N7GewC.js.map +1 -0
  555. package/dist/{pop-CxXfytjk.js → pop-Dw_6k177.js} +3 -4
  556. package/dist/pop-Dw_6k177.js.map +1 -0
  557. package/dist/pop.theme-Cw-yD0MO.js +5 -0
  558. package/dist/pop.theme-Cw-yD0MO.js.map +1 -0
  559. package/dist/property/PropertyEditorPages.d.ts +1 -1
  560. package/dist/property/PropertyLayouts.d.ts +119 -0
  561. package/dist/property/PropertySchemas.d.ts +5 -1
  562. package/dist/property/index.d.ts +2 -0
  563. package/dist/{rolldown-runtime-CYGlBXrH.js → rolldown-runtime-c6e9CmGy.js} +2 -3
  564. package/dist/runtime/Browser.d.ts +7 -0
  565. package/dist/runtime/DataTooltips.d.ts +2 -0
  566. package/dist/runtime/Keyboard.d.ts +4 -1
  567. package/dist/runtime/Toasts.d.ts +10 -0
  568. package/dist/runtime/runtime.types.d.ts +47 -0
  569. package/dist/{search-CzSzx7bX.js → search-C2Rq9HF1.js} +1 -2
  570. package/dist/search-C2Rq9HF1.js.map +1 -0
  571. package/dist/spell-CB-MivSX.js +5 -0
  572. package/dist/spell-CB-MivSX.js.map +1 -0
  573. package/dist/spell.theme-CUoc5rTq.js +5 -0
  574. package/dist/spell.theme-CUoc5rTq.js.map +1 -0
  575. package/dist/styles/StyleGenerator.d.ts +7 -0
  576. package/dist/styles/styles.en.d.ts +27 -18
  577. package/dist/{styles.en-CUUxNwHo.js → styles.en-DZlSJiOR.js} +21 -21
  578. package/dist/styles.en-DZlSJiOR.js.map +1 -0
  579. package/dist/styles.js +9 -10
  580. package/dist/styles.js.map +1 -1
  581. package/dist/ui-accordion.editor-BP8uQGGU.js +5 -0
  582. package/dist/ui-accordion.editor-BP8uQGGU.js.map +1 -0
  583. package/dist/ui-accordion.js +59 -60
  584. package/dist/ui-accordion.js.map +1 -1
  585. package/dist/ui-action.editor-m5R5N5Wy.js +5 -0
  586. package/dist/ui-action.editor-m5R5N5Wy.js.map +1 -0
  587. package/dist/ui-action.js +73 -45
  588. package/dist/ui-action.js.map +1 -1
  589. package/dist/ui-actions.editor-Buc3N2ik.js +5 -0
  590. package/dist/ui-actions.editor-Buc3N2ik.js.map +1 -0
  591. package/dist/ui-ad.editor-BHTDuSii.js +5 -0
  592. package/dist/ui-ad.editor-BHTDuSii.js.map +1 -0
  593. package/dist/ui-ad.js +8 -9
  594. package/dist/ui-ad.js.map +1 -1
  595. package/dist/ui-app-menu.editor-DxPPnMUT.js +5 -0
  596. package/dist/ui-app-menu.editor-DxPPnMUT.js.map +1 -0
  597. package/dist/ui-app-menu.js +89 -0
  598. package/dist/ui-app-menu.js.map +1 -0
  599. package/dist/ui-audio.editor-Y6WeqLRh.js +5 -0
  600. package/dist/ui-audio.editor-Y6WeqLRh.js.map +1 -0
  601. package/dist/ui-author.editor-Bmf-rEXY.js +5 -0
  602. package/dist/ui-author.editor-Bmf-rEXY.js.map +1 -0
  603. package/dist/ui-avatar.editor-CSU6snQz.js +5 -0
  604. package/dist/ui-avatar.editor-CSU6snQz.js.map +1 -0
  605. package/dist/ui-breadcrumb.editor-N1-8OzDq.js +5 -0
  606. package/dist/ui-breadcrumb.editor-N1-8OzDq.js.map +1 -0
  607. package/dist/ui-breadcrumbs.editor-Mml0fUR_.js +5 -0
  608. package/dist/ui-breadcrumbs.editor-Mml0fUR_.js.map +1 -0
  609. package/dist/ui-breadcrumbs.js +18 -17
  610. package/dist/ui-breadcrumbs.js.map +1 -1
  611. package/dist/ui-button.editor-BV9Bh_xf.js +5 -0
  612. package/dist/ui-button.editor-BV9Bh_xf.js.map +1 -0
  613. package/dist/ui-button.js +157 -156
  614. package/dist/ui-button.js.map +1 -1
  615. package/dist/ui-buttons.editor-CSsEIo2s.js +5 -0
  616. package/dist/ui-buttons.editor-CSsEIo2s.js.map +1 -0
  617. package/dist/ui-calendar.editor-TsP8a97s.js +5 -0
  618. package/dist/ui-calendar.editor-TsP8a97s.js.map +1 -0
  619. package/dist/ui-calendar.js +148 -157
  620. package/dist/ui-calendar.js.map +1 -1
  621. package/dist/ui-card.editor-BBZj9e03.js +5 -0
  622. package/dist/ui-card.editor-BBZj9e03.js.map +1 -0
  623. package/dist/ui-card.js +70 -70
  624. package/dist/ui-card.js.map +1 -1
  625. package/dist/ui-cards.editor-Hrmldr4q.js +5 -0
  626. package/dist/ui-cards.editor-Hrmldr4q.js.map +1 -0
  627. package/dist/ui-cell.editor-Dmz_mwJ0.js +5 -0
  628. package/dist/ui-cell.editor-Dmz_mwJ0.js.map +1 -0
  629. package/dist/ui-checkbox.editor-DnOz9r6d.js +5 -0
  630. package/dist/ui-checkbox.editor-DnOz9r6d.js.map +1 -0
  631. package/dist/ui-checkbox.js +49 -48
  632. package/dist/ui-checkbox.js.map +1 -1
  633. package/dist/ui-code.editor-Drr_FVB6.js +5 -0
  634. package/dist/ui-code.editor-Drr_FVB6.js.map +1 -0
  635. package/dist/ui-code.js +116 -79
  636. package/dist/ui-code.js.map +1 -1
  637. package/dist/ui-color-chip.editor-B3zV8FkB.js +5 -0
  638. package/dist/ui-color-chip.editor-B3zV8FkB.js.map +1 -0
  639. package/dist/ui-column.editor-hdUb-qwT.js +5 -0
  640. package/dist/ui-column.editor-hdUb-qwT.js.map +1 -0
  641. package/dist/ui-comment.editor-DJpE_8tz.js +5 -0
  642. package/dist/ui-comment.editor-DJpE_8tz.js.map +1 -0
  643. package/dist/ui-comment.js +15 -14
  644. package/dist/ui-comment.js.map +1 -1
  645. package/dist/ui-comments.editor-GFJN6l3Q.js +5 -0
  646. package/dist/ui-comments.editor-GFJN6l3Q.js.map +1 -0
  647. package/dist/ui-components.editor-BKFXnARt.js +5 -0
  648. package/dist/ui-components.editor-BKFXnARt.js.map +1 -0
  649. package/dist/ui-components.js +12 -13
  650. package/dist/ui-components.js.map +1 -1
  651. package/dist/ui-container.editor-CBNhNkRm.js +5 -0
  652. package/dist/ui-container.editor-CBNhNkRm.js.map +1 -0
  653. package/dist/ui-container.js +106 -21
  654. package/dist/ui-container.js.map +1 -1
  655. package/dist/ui-content.editor-B78lxK3P.js +5 -0
  656. package/dist/ui-content.editor-B78lxK3P.js.map +1 -0
  657. package/dist/ui-date.editor-PHEnU7QX.js +5 -0
  658. package/dist/ui-date.editor-PHEnU7QX.js.map +1 -0
  659. package/dist/ui-description.editor-DWFDJ9mV.js +5 -0
  660. package/dist/ui-description.editor-DWFDJ9mV.js.map +1 -0
  661. package/dist/ui-detail.editor-wliuVbx3.js +5 -0
  662. package/dist/ui-detail.editor-wliuVbx3.js.map +1 -0
  663. package/dist/ui-device.editor-kl48NVma.js +5 -0
  664. package/dist/ui-device.editor-kl48NVma.js.map +1 -0
  665. package/dist/ui-device.js +436 -0
  666. package/dist/ui-device.js.map +1 -0
  667. package/dist/ui-diagram-node.editor-6FyjT7oj.js +5 -0
  668. package/dist/ui-diagram-node.editor-6FyjT7oj.js.map +1 -0
  669. package/dist/ui-diagram.editor-Dn3ef-J9.js +5 -0
  670. package/dist/ui-diagram.editor-Dn3ef-J9.js.map +1 -0
  671. package/dist/ui-diagram.js +128 -129
  672. package/dist/ui-diagram.js.map +1 -1
  673. package/dist/ui-dimension.editor-BEXGKcCB.js +5 -0
  674. package/dist/ui-dimension.editor-BEXGKcCB.js.map +1 -0
  675. package/dist/ui-dimension.js +111 -12
  676. package/dist/ui-dimension.js.map +1 -1
  677. package/dist/ui-dimmer.editor-D14xzXIe.js +5 -0
  678. package/dist/ui-dimmer.editor-D14xzXIe.js.map +1 -0
  679. package/dist/ui-dimmer.js +29 -30
  680. package/dist/ui-dimmer.js.map +1 -1
  681. package/dist/ui-divider.editor-D6ozEXjx.js +5 -0
  682. package/dist/ui-divider.editor-D6ozEXjx.js.map +1 -0
  683. package/dist/ui-divider.js +9 -10
  684. package/dist/ui-divider.js.map +1 -1
  685. package/dist/ui-dropdown.editor-OFDGi1oz.js +5 -0
  686. package/dist/ui-dropdown.editor-OFDGi1oz.js.map +1 -0
  687. package/dist/ui-dropdown.js +155 -156
  688. package/dist/ui-dropdown.js.map +1 -1
  689. package/dist/ui-embed.editor-DHsrjw1j.js +5 -0
  690. package/dist/ui-embed.editor-DHsrjw1j.js.map +1 -0
  691. package/dist/ui-embed.js +23 -24
  692. package/dist/ui-embed.js.map +1 -1
  693. package/dist/ui-emoji.editor-DUL230Hi.js +5 -0
  694. package/dist/ui-emoji.editor-DUL230Hi.js.map +1 -0
  695. package/dist/ui-emoji.js +63 -64
  696. package/dist/ui-emoji.js.map +1 -1
  697. package/dist/ui-event.editor-Bk17y7wW.js +5 -0
  698. package/dist/ui-event.editor-Bk17y7wW.js.map +1 -0
  699. package/dist/ui-example.editor-D46Vnctp.js +5 -0
  700. package/dist/ui-example.editor-D46Vnctp.js.map +1 -0
  701. package/dist/ui-example.js +67 -74
  702. package/dist/ui-example.js.map +1 -1
  703. package/dist/ui-extra.editor-rX6sfH2e.js +5 -0
  704. package/dist/ui-extra.editor-rX6sfH2e.js.map +1 -0
  705. package/dist/ui-feed.editor-B7ycWh1b.js +5 -0
  706. package/dist/ui-feed.editor-B7ycWh1b.js.map +1 -0
  707. package/dist/ui-feed.js +26 -25
  708. package/dist/ui-feed.js.map +1 -1
  709. package/dist/ui-field.editor-Bz9xyCVv.js +5 -0
  710. package/dist/ui-field.editor-Bz9xyCVv.js.map +1 -0
  711. package/dist/ui-fields.editor-BUtW4NTk.js +5 -0
  712. package/dist/ui-fields.editor-BUtW4NTk.js.map +1 -0
  713. package/dist/ui-flag.editor-DNfdXo7y.js +5 -0
  714. package/dist/ui-flag.editor-DNfdXo7y.js.map +1 -0
  715. package/dist/ui-flag.js +13 -14
  716. package/dist/ui-flag.js.map +1 -1
  717. package/dist/ui-flyout.editor-b7UJYiV9.js +5 -0
  718. package/dist/ui-flyout.editor-b7UJYiV9.js.map +1 -0
  719. package/dist/ui-flyout.js +10 -11
  720. package/dist/ui-flyout.js.map +1 -1
  721. package/dist/ui-form.editor-BJC3WhNf.js +5 -0
  722. package/dist/ui-form.editor-BJC3WhNf.js.map +1 -0
  723. package/dist/ui-form.js +199 -195
  724. package/dist/ui-form.js.map +1 -1
  725. package/dist/ui-grid.editor-DVn2YIBW.js +5 -0
  726. package/dist/ui-grid.editor-DVn2YIBW.js.map +1 -0
  727. package/dist/ui-grid.js +43 -234
  728. package/dist/ui-grid.js.map +1 -1
  729. package/dist/ui-header.editor-meOjCASK.js +5 -0
  730. package/dist/ui-header.editor-meOjCASK.js.map +1 -0
  731. package/dist/ui-icon-picker.editor-vFPbT9Kh.js +5 -0
  732. package/dist/ui-icon-picker.editor-vFPbT9Kh.js.map +1 -0
  733. package/dist/ui-icon-picker.js +64 -69
  734. package/dist/ui-icon-picker.js.map +1 -1
  735. package/dist/ui-icon.editor-DoKK49PD.js +5 -0
  736. package/dist/ui-icon.editor-DoKK49PD.js.map +1 -0
  737. package/dist/ui-icon.js +15 -14
  738. package/dist/ui-icon.js.map +1 -1
  739. package/dist/ui-icons.editor-CSD6fOVt.js +5 -0
  740. package/dist/ui-icons.editor-CSD6fOVt.js.map +1 -0
  741. package/dist/ui-image.editor-D4ZUC_Ka.js +5 -0
  742. package/dist/ui-image.editor-D4ZUC_Ka.js.map +1 -0
  743. package/dist/ui-image.js +26 -26
  744. package/dist/ui-image.js.map +1 -1
  745. package/dist/ui-images.editor-Cb0D3vnI.js +5 -0
  746. package/dist/ui-images.editor-Cb0D3vnI.js.map +1 -0
  747. package/dist/ui-include.editor-CZcsVJbH.js +5 -0
  748. package/dist/ui-include.editor-CZcsVJbH.js.map +1 -0
  749. package/dist/ui-include.js +21 -22
  750. package/dist/ui-include.js.map +1 -1
  751. package/dist/ui-input.editor-budoNoB0.js +5 -0
  752. package/dist/ui-input.editor-budoNoB0.js.map +1 -0
  753. package/dist/ui-input.js +131 -130
  754. package/dist/ui-input.js.map +1 -1
  755. package/dist/ui-item.editor-BlWp1HXu.js +5 -0
  756. package/dist/ui-item.editor-BlWp1HXu.js.map +1 -0
  757. package/dist/ui-item.js +127 -113
  758. package/dist/ui-item.js.map +1 -1
  759. package/dist/ui-items.editor-GOul3Xss.js +5 -0
  760. package/dist/ui-items.editor-GOul3Xss.js.map +1 -0
  761. package/dist/ui-items.js +11 -12
  762. package/dist/ui-items.js.map +1 -1
  763. package/dist/ui-json.editor-BgZbrB_W.js +5 -0
  764. package/dist/ui-json.editor-BgZbrB_W.js.map +1 -0
  765. package/dist/ui-json.js +18 -19
  766. package/dist/ui-json.js.map +1 -1
  767. package/dist/ui-keys.editor-BI9EDtS4.js +5 -0
  768. package/dist/ui-keys.editor-BI9EDtS4.js.map +1 -0
  769. package/dist/ui-keys.js +2 -3
  770. package/dist/ui-label.editor-BVUYLSUs.js +5 -0
  771. package/dist/ui-label.editor-BVUYLSUs.js.map +1 -0
  772. package/dist/ui-label.js +22 -22
  773. package/dist/ui-label.js.map +1 -1
  774. package/dist/ui-labels.editor-BWJth86p.js +5 -0
  775. package/dist/ui-labels.editor-BWJth86p.js.map +1 -0
  776. package/dist/ui-link.editor-CpI53scP.js +5 -0
  777. package/dist/ui-link.editor-CpI53scP.js.map +1 -0
  778. package/dist/ui-list.editor-DhBZIkAa.js +5 -0
  779. package/dist/ui-list.editor-DhBZIkAa.js.map +1 -0
  780. package/dist/ui-list.js +9 -10
  781. package/dist/ui-list.js.map +1 -1
  782. package/dist/ui-loader.editor-BJlvmP7S.js +5 -0
  783. package/dist/ui-loader.editor-BJlvmP7S.js.map +1 -0
  784. package/dist/ui-loader.js +10 -11
  785. package/dist/ui-loader.js.map +1 -1
  786. package/dist/ui-markdown.editor-DPVKyxXa.js +5 -0
  787. package/dist/ui-markdown.editor-DPVKyxXa.js.map +1 -0
  788. package/dist/ui-markdown.js +208 -154
  789. package/dist/ui-markdown.js.map +1 -1
  790. package/dist/ui-menu.editor-DJ3PhWtK.js +5 -0
  791. package/dist/ui-menu.editor-DJ3PhWtK.js.map +1 -0
  792. package/dist/ui-menu.js +815 -223
  793. package/dist/ui-menu.js.map +1 -1
  794. package/dist/ui-message.editor-vfT0pyu5.js +5 -0
  795. package/dist/ui-message.editor-vfT0pyu5.js.map +1 -0
  796. package/dist/ui-message.js +32 -33
  797. package/dist/ui-message.js.map +1 -1
  798. package/dist/ui-meta.editor-Bk5m43-E.js +5 -0
  799. package/dist/ui-meta.editor-Bk5m43-E.js.map +1 -0
  800. package/dist/ui-modal.editor-CkkJRgab.js +5 -0
  801. package/dist/ui-modal.editor-CkkJRgab.js.map +1 -0
  802. package/dist/ui-modal.js +132 -96
  803. package/dist/ui-modal.js.map +1 -1
  804. package/dist/ui-nag.editor-BJ3Ia2Bi.js +5 -0
  805. package/dist/ui-nag.editor-BJ3Ia2Bi.js.map +1 -0
  806. package/dist/ui-nag.js +23 -24
  807. package/dist/ui-nag.js.map +1 -1
  808. package/dist/ui-or.editor-BfBLNVgm.js +5 -0
  809. package/dist/ui-or.editor-BfBLNVgm.js.map +1 -0
  810. package/dist/ui-page-layout.editor-xtQW0FZk.js +5 -0
  811. package/dist/ui-page-layout.editor-xtQW0FZk.js.map +1 -0
  812. package/dist/ui-page-layout.js +363 -0
  813. package/dist/ui-page-layout.js.map +1 -0
  814. package/dist/ui-page.editor-Bd5mzlj7.js +5 -0
  815. package/dist/ui-page.editor-Bd5mzlj7.js.map +1 -0
  816. package/dist/ui-page.js +11 -12
  817. package/dist/ui-page.js.map +1 -1
  818. package/dist/ui-panel.editor-BCUkdr4S.js +5 -0
  819. package/dist/ui-panel.editor-BCUkdr4S.js.map +1 -0
  820. package/dist/ui-panel.js +105 -27
  821. package/dist/ui-panel.js.map +1 -1
  822. package/dist/ui-parts.js +108 -66
  823. package/dist/ui-parts.js.map +1 -1
  824. package/dist/ui-placeholder-header.editor-CJNO08Ax.js +5 -0
  825. package/dist/ui-placeholder-header.editor-CJNO08Ax.js.map +1 -0
  826. package/dist/ui-placeholder-image.editor-DctJiCNv.js +5 -0
  827. package/dist/ui-placeholder-image.editor-DctJiCNv.js.map +1 -0
  828. package/dist/ui-placeholder-line.editor-DcxH7mOo.js +5 -0
  829. package/dist/ui-placeholder-line.editor-DcxH7mOo.js.map +1 -0
  830. package/dist/ui-placeholder-paragraph.editor-C4rww_tp.js +5 -0
  831. package/dist/ui-placeholder-paragraph.editor-C4rww_tp.js.map +1 -0
  832. package/dist/ui-placeholder.editor-Bc0CYlZZ.js +5 -0
  833. package/dist/ui-placeholder.editor-Bc0CYlZZ.js.map +1 -0
  834. package/dist/ui-placeholder.js +23 -19
  835. package/dist/ui-placeholder.js.map +1 -1
  836. package/dist/ui-popup.editor-ByUi4CYs.js +5 -0
  837. package/dist/ui-popup.editor-ByUi4CYs.js.map +1 -0
  838. package/dist/ui-popup.js +107 -100
  839. package/dist/ui-popup.js.map +1 -1
  840. package/dist/ui-progress.editor-DX0IjhxZ.js +5 -0
  841. package/dist/ui-progress.editor-DX0IjhxZ.js.map +1 -0
  842. package/dist/ui-progress.js +23 -24
  843. package/dist/ui-progress.js.map +1 -1
  844. package/dist/ui-property-editor.editor-pS6tCPPT.js +5 -0
  845. package/dist/ui-property-editor.editor-pS6tCPPT.js.map +1 -0
  846. package/dist/ui-property-editor.js +649 -277
  847. package/dist/ui-property-editor.js.map +1 -1
  848. package/dist/ui-property-group.editor-BlpUMVlr.js +5 -0
  849. package/dist/ui-property-group.editor-BlpUMVlr.js.map +1 -0
  850. package/dist/ui-property.editor-BC-jtjjt.js +5 -0
  851. package/dist/ui-property.editor-BC-jtjjt.js.map +1 -0
  852. package/dist/ui-pushable.editor-8_EmUD9x.js +5 -0
  853. package/dist/ui-pushable.editor-8_EmUD9x.js.map +1 -0
  854. package/dist/ui-pusher.editor-CiCX6-1J.js +5 -0
  855. package/dist/ui-pusher.editor-CiCX6-1J.js.map +1 -0
  856. package/dist/ui-quote.editor-BvmAjmo9.js +5 -0
  857. package/dist/ui-quote.editor-BvmAjmo9.js.map +1 -0
  858. package/dist/ui-quote.js +8 -9
  859. package/dist/ui-quote.js.map +1 -1
  860. package/dist/ui-radio.editor-DPzActfO.js +5 -0
  861. package/dist/ui-radio.editor-DPzActfO.js.map +1 -0
  862. package/dist/ui-rail.editor-DRfVH4P2.js +5 -0
  863. package/dist/ui-rail.editor-DRfVH4P2.js.map +1 -0
  864. package/dist/ui-rail.js +11 -12
  865. package/dist/ui-rail.js.map +1 -1
  866. package/dist/ui-rating.editor-C19syymj.js +5 -0
  867. package/dist/ui-rating.editor-C19syymj.js.map +1 -0
  868. package/dist/ui-rating.js +40 -49
  869. package/dist/ui-rating.js.map +1 -1
  870. package/dist/ui-repeat.editor-DEf-bFGj.js +5 -0
  871. package/dist/ui-repeat.editor-DEf-bFGj.js.map +1 -0
  872. package/dist/ui-reveal.editor-D7pDOaen.js +5 -0
  873. package/dist/ui-reveal.editor-D7pDOaen.js.map +1 -0
  874. package/dist/ui-reveal.js +10 -11
  875. package/dist/ui-reveal.js.map +1 -1
  876. package/dist/ui-root.editor-CAokPDVa.js +5 -0
  877. package/dist/ui-root.editor-CAokPDVa.js.map +1 -0
  878. package/dist/ui-root.js +205 -102
  879. package/dist/ui-root.js.map +1 -1
  880. package/dist/ui-row.editor-C00Z6Jl5.js +5 -0
  881. package/dist/ui-row.editor-C00Z6Jl5.js.map +1 -0
  882. package/dist/ui-search.editor-CtzfYgNu.js +5 -0
  883. package/dist/ui-search.editor-CtzfYgNu.js.map +1 -0
  884. package/dist/ui-search.js +143 -146
  885. package/dist/ui-search.js.map +1 -1
  886. package/dist/ui-section.editor-DmNICxCs.js +5 -0
  887. package/dist/ui-section.editor-DmNICxCs.js.map +1 -0
  888. package/dist/ui-section.js +74 -73
  889. package/dist/ui-section.js.map +1 -1
  890. package/dist/ui-sections.editor-BxXECGv9.js +5 -0
  891. package/dist/ui-sections.editor-BxXECGv9.js.map +1 -0
  892. package/dist/ui-segment.editor-CebyLPFn.js +5 -0
  893. package/dist/ui-segment.editor-CebyLPFn.js.map +1 -0
  894. package/dist/ui-segment.js +43 -43
  895. package/dist/ui-segment.js.map +1 -1
  896. package/dist/ui-segments.editor-CSumzMa5.js +5 -0
  897. package/dist/ui-segments.editor-CSumzMa5.js.map +1 -0
  898. package/dist/ui-select.editor-wAcZzvU7.js +5 -0
  899. package/dist/ui-select.editor-wAcZzvU7.js.map +1 -0
  900. package/dist/ui-select.js +86 -87
  901. package/dist/ui-select.js.map +1 -1
  902. package/dist/ui-shape.editor-By9-8aD2.js +5 -0
  903. package/dist/ui-shape.editor-By9-8aD2.js.map +1 -0
  904. package/dist/ui-shape.js +39 -38
  905. package/dist/ui-shape.js.map +1 -1
  906. package/dist/ui-side.editor-CFSqGHGH.js +5 -0
  907. package/dist/ui-side.editor-CFSqGHGH.js.map +1 -0
  908. package/dist/ui-sidebar.editor-DWFPQcXv.js +5 -0
  909. package/dist/ui-sidebar.editor-DWFPQcXv.js.map +1 -0
  910. package/dist/ui-sidebar.js +79 -77
  911. package/dist/ui-sidebar.js.map +1 -1
  912. package/dist/ui-sides.editor-CONIJ1r3.js +5 -0
  913. package/dist/ui-sides.editor-CONIJ1r3.js.map +1 -0
  914. package/dist/ui-sides.js +25 -26
  915. package/dist/ui-sides.js.map +1 -1
  916. package/dist/ui-site-breadcrumbs.editor-Dmc4qziE.js +5 -0
  917. package/dist/ui-site-breadcrumbs.editor-Dmc4qziE.js.map +1 -0
  918. package/dist/ui-site-breadcrumbs.js +143 -0
  919. package/dist/ui-site-breadcrumbs.js.map +1 -0
  920. package/dist/ui-site-nav-button.editor-6J-zJLtZ.js +5 -0
  921. package/dist/ui-site-nav-button.editor-6J-zJLtZ.js.map +1 -0
  922. package/dist/ui-site-nav-button.js +113 -0
  923. package/dist/ui-site-nav-button.js.map +1 -0
  924. package/dist/ui-site-nav.editor-CKEsOGCX.js +5 -0
  925. package/dist/ui-site-nav.editor-CKEsOGCX.js.map +1 -0
  926. package/dist/ui-site-nav.js +133 -97
  927. package/dist/ui-site-nav.js.map +1 -1
  928. package/dist/ui-site-tabs.editor-DDvQfH6S.js +5 -0
  929. package/dist/ui-site-tabs.editor-DDvQfH6S.js.map +1 -0
  930. package/dist/ui-site-tabs.js +53 -48
  931. package/dist/ui-site-tabs.js.map +1 -1
  932. package/dist/ui-slider.editor-BEaasx5Q.js +5 -0
  933. package/dist/ui-slider.editor-BEaasx5Q.js.map +1 -0
  934. package/dist/ui-slider.js +37 -38
  935. package/dist/ui-slider.js.map +1 -1
  936. package/dist/ui-space.editor-s-XVWFBN.js +5 -0
  937. package/dist/ui-space.editor-s-XVWFBN.js.map +1 -0
  938. package/dist/ui-space.js +9 -10
  939. package/dist/ui-space.js.map +1 -1
  940. package/dist/ui-split-panel.editor-Cvy5W7nk.js +5 -0
  941. package/dist/ui-split-panel.editor-Cvy5W7nk.js.map +1 -0
  942. package/dist/ui-split-panel.js +107 -68
  943. package/dist/ui-split-panel.js.map +1 -1
  944. package/dist/ui-stack.editor-D69Fky6H.js +5 -0
  945. package/dist/ui-stack.editor-D69Fky6H.js.map +1 -0
  946. package/dist/ui-stack.js +12 -13
  947. package/dist/ui-stack.js.map +1 -1
  948. package/dist/ui-statistic.editor-CBzYqbQ5.js +5 -0
  949. package/dist/ui-statistic.editor-CBzYqbQ5.js.map +1 -0
  950. package/dist/ui-statistic.js +28 -27
  951. package/dist/ui-statistic.js.map +1 -1
  952. package/dist/ui-statistics.editor-fzh3uk_b.js +5 -0
  953. package/dist/ui-statistics.editor-fzh3uk_b.js.map +1 -0
  954. package/dist/ui-step.editor-CYmNXrk_.js +5 -0
  955. package/dist/ui-step.editor-CYmNXrk_.js.map +1 -0
  956. package/dist/ui-step.js +62 -61
  957. package/dist/ui-step.js.map +1 -1
  958. package/dist/ui-steps.editor-BkMIrUrj.js +5 -0
  959. package/dist/ui-steps.editor-BkMIrUrj.js.map +1 -0
  960. package/dist/ui-sticky.editor-D7R1AlJv.js +5 -0
  961. package/dist/ui-sticky.editor-D7R1AlJv.js.map +1 -0
  962. package/dist/ui-sticky.js +10 -11
  963. package/dist/ui-sticky.js.map +1 -1
  964. package/dist/ui-submenu.editor-NdjS0em-.js +5 -0
  965. package/dist/ui-submenu.editor-NdjS0em-.js.map +1 -0
  966. package/dist/ui-summary.editor-CCHS1mVz.js +5 -0
  967. package/dist/ui-summary.editor-CCHS1mVz.js.map +1 -0
  968. package/dist/ui-tab.editor-DCS-gCZV.js +5 -0
  969. package/dist/ui-tab.editor-DCS-gCZV.js.map +1 -0
  970. package/dist/ui-tab.js +115 -117
  971. package/dist/ui-tab.js.map +1 -1
  972. package/dist/ui-table.editor-DJvfg9oG.js +5 -0
  973. package/dist/ui-table.editor-DJvfg9oG.js.map +1 -0
  974. package/dist/ui-table.js +272 -272
  975. package/dist/ui-table.js.map +1 -1
  976. package/dist/ui-tabs.editor-waeMoFNM.js +5 -0
  977. package/dist/ui-tabs.editor-waeMoFNM.js.map +1 -0
  978. package/dist/ui-term.editor-BMCF3jBM.js +5 -0
  979. package/dist/ui-term.editor-BMCF3jBM.js.map +1 -0
  980. package/dist/ui-terms.editor-BLfVVsjI.js +5 -0
  981. package/dist/ui-terms.editor-BLfVVsjI.js.map +1 -0
  982. package/dist/ui-terms.js +13 -12
  983. package/dist/ui-terms.js.map +1 -1
  984. package/dist/ui-text.editor-B6AENK13.js +5 -0
  985. package/dist/ui-text.editor-B6AENK13.js.map +1 -0
  986. package/dist/ui-text.js +37 -36
  987. package/dist/ui-text.js.map +1 -1
  988. package/dist/ui-textarea.editor-C25lVwrF.js +5 -0
  989. package/dist/ui-textarea.editor-C25lVwrF.js.map +1 -0
  990. package/dist/ui-theme-editor.editor-CQGAgy-Q.js +5 -0
  991. package/dist/ui-theme-editor.editor-CQGAgy-Q.js.map +1 -0
  992. package/dist/ui-theme-editor.js +448 -461
  993. package/dist/ui-theme-editor.js.map +1 -1
  994. package/dist/{ui-theme-menu-CuIjr8Ou.js → ui-theme-menu-BZYUMrHe.js} +356 -352
  995. package/dist/ui-theme-menu-BZYUMrHe.js.map +1 -0
  996. package/dist/ui-theme-menu.editor-DNeI-hxN.js +5 -0
  997. package/dist/ui-theme-menu.editor-DNeI-hxN.js.map +1 -0
  998. package/dist/ui-theme-token.editor-C2YAdEye.js +5 -0
  999. package/dist/ui-theme-token.editor-C2YAdEye.js.map +1 -0
  1000. package/dist/ui-title.editor-40PZSOpn.js +5 -0
  1001. package/dist/ui-title.editor-40PZSOpn.js.map +1 -0
  1002. package/dist/ui-toast.editor-BDmIUsU_.js +5 -0
  1003. package/dist/ui-toast.editor-BDmIUsU_.js.map +1 -0
  1004. package/dist/ui-toast.js +125 -128
  1005. package/dist/ui-toast.js.map +1 -1
  1006. package/dist/ui-toc.editor-D_S1KFY_.js +5 -0
  1007. package/dist/ui-toc.editor-D_S1KFY_.js.map +1 -0
  1008. package/dist/ui-toc.js +52 -53
  1009. package/dist/ui-toc.js.map +1 -1
  1010. package/dist/ui-toolbar.editor-CNQ8nJmR.js +5 -0
  1011. package/dist/ui-toolbar.editor-CNQ8nJmR.js.map +1 -0
  1012. package/dist/ui-toolbar.js +254 -50
  1013. package/dist/ui-toolbar.js.map +1 -1
  1014. package/dist/ui-transition.editor-8SQkDkZ6.js +5 -0
  1015. package/dist/ui-transition.editor-8SQkDkZ6.js.map +1 -0
  1016. package/dist/ui-transition.js +13 -14
  1017. package/dist/ui-transition.js.map +1 -1
  1018. package/dist/ui-tree-diagram.editor-DkEK8i7J.js +5 -0
  1019. package/dist/ui-tree-diagram.editor-DkEK8i7J.js.map +1 -0
  1020. package/dist/ui-tree-diagram.js +128 -127
  1021. package/dist/ui-tree-diagram.js.map +1 -1
  1022. package/dist/ui-tree-item.editor-C4fuAlbJ.js +5 -0
  1023. package/dist/ui-tree-item.editor-C4fuAlbJ.js.map +1 -0
  1024. package/dist/ui-tree-node.editor-CB1z_w9F.js +5 -0
  1025. package/dist/ui-tree-node.editor-CB1z_w9F.js.map +1 -0
  1026. package/dist/ui-tree.editor-BoQztwdz.js +5 -0
  1027. package/dist/ui-tree.editor-BoQztwdz.js.map +1 -0
  1028. package/dist/ui-tree.js +393 -134
  1029. package/dist/ui-tree.js.map +1 -1
  1030. package/dist/ui-value.editor-CYak24cr.js +5 -0
  1031. package/dist/ui-value.editor-CYak24cr.js.map +1 -0
  1032. package/dist/ui-video.editor-CuWtFVjR.js +5 -0
  1033. package/dist/ui-video.editor-CuWtFVjR.js.map +1 -0
  1034. package/dist/ui-video.js +15 -14
  1035. package/dist/ui-video.js.map +1 -1
  1036. package/dist/ui-visibility.editor-Crx0DTlv.js +5 -0
  1037. package/dist/ui-visibility.editor-Crx0DTlv.js.map +1 -0
  1038. package/dist/ui-visibility.js +25 -26
  1039. package/dist/ui-visibility.js.map +1 -1
  1040. package/dist/ui-zoom.editor-DZ3HsWV4.js +5 -0
  1041. package/dist/ui-zoom.editor-DZ3HsWV4.js.map +1 -0
  1042. package/dist/ui-zoom.js +82 -83
  1043. package/dist/ui-zoom.js.map +1 -1
  1044. package/dist/util/TopLayerTip.d.ts +11 -2
  1045. package/dist/vocabulary/SharedVocabulary.d.ts +2 -0
  1046. package/dist/vocabulary/SharedVocabulary.es.d.ts +1 -0
  1047. package/dist/vocabulary/help.generated.d.ts +11 -0
  1048. package/dist/vocabulary/partsOfSpeech.generated.d.ts +6 -0
  1049. package/package.json +3 -3
  1050. package/dist/Dragging-CMZoLEWQ.js.map +0 -1
  1051. package/dist/MarkdownSanitizer-zTnnbrLe.js +0 -884
  1052. package/dist/MarkdownSanitizer-zTnnbrLe.js.map +0 -1
  1053. package/dist/PrefStore-Qv0e5y04.js.map +0 -1
  1054. package/dist/ScrollingRow-7n7Z-HIE.js +0 -88
  1055. package/dist/ScrollingRow-7n7Z-HIE.js.map +0 -1
  1056. package/dist/SitePages-CciwREek.js.map +0 -1
  1057. package/dist/SlottedItems-Du3aJwG1.js +0 -80
  1058. package/dist/SlottedItems-Du3aJwG1.js.map +0 -1
  1059. package/dist/UIButton-DFEds67r.js +0 -6
  1060. package/dist/UIButton-DFEds67r.js.map +0 -1
  1061. package/dist/UIInput-BodVbUoQ.js.map +0 -1
  1062. package/dist/UIKeys-Rh_gUZjP.js.map +0 -1
  1063. package/dist/UILabel-DgJUBzB_.js.map +0 -1
  1064. package/dist/UIMenu-zdcAtwTa.js +0 -42
  1065. package/dist/UIMenu-zdcAtwTa.js.map +0 -1
  1066. package/dist/UIRuntime-KH309p5B.js.map +0 -1
  1067. package/dist/UISegment-CMMIW7cZ.js.map +0 -1
  1068. package/dist/apple.palette-B4ivrNlM.js.map +0 -1
  1069. package/dist/classic-DCTQrteU.js.map +0 -1
  1070. package/dist/components.es-BOa_7gFF.js.map +0 -1
  1071. package/dist/crisp-VfYZlTph.js.map +0 -1
  1072. package/dist/crisp.theme-DRiePRdf.js +0 -6
  1073. package/dist/crisp.theme-DRiePRdf.js.map +0 -1
  1074. package/dist/dark-CbUdPe0a.js.map +0 -1
  1075. package/dist/dist-BLYIGZVK.js.map +0 -1
  1076. package/dist/emoji/cldr/0-DSUpV2d7.js.map +0 -1
  1077. package/dist/emoji/cldr/a-D_oB4vJ-.js.map +0 -1
  1078. package/dist/emoji/cldr/b-DX0W0Mda.js.map +0 -1
  1079. package/dist/emoji/cldr/c-DUHidpE9.js.map +0 -1
  1080. package/dist/emoji/cldr/d-CiCXZXay.js.map +0 -1
  1081. package/dist/emoji/cldr/e-DILJo3Ri.js.map +0 -1
  1082. package/dist/emoji/cldr/f-ByGFLyOq.js.map +0 -1
  1083. package/dist/emoji/cldr/g-BZ0FRsud.js.map +0 -1
  1084. package/dist/emoji/cldr/h-jtLdvRXQ.js.map +0 -1
  1085. package/dist/emoji/cldr/i-DcbJ5utE.js.map +0 -1
  1086. package/dist/emoji/cldr/j-BuEqP5nz.js.map +0 -1
  1087. package/dist/emoji/cldr/k-P1J6Gvze.js.map +0 -1
  1088. package/dist/emoji/cldr/l-28XcbsPr.js.map +0 -1
  1089. package/dist/emoji/cldr/m-DKgGJ8rW.js.map +0 -1
  1090. package/dist/emoji/cldr/n-DmPLP4F3.js.map +0 -1
  1091. package/dist/emoji/cldr/o-f98nt3s7.js.map +0 -1
  1092. package/dist/emoji/cldr/p-CxnsOTOt.js.map +0 -1
  1093. package/dist/emoji/cldr/r-D0GPRJ-Q.js.map +0 -1
  1094. package/dist/emoji/cldr/s-DcFuepnw.js.map +0 -1
  1095. package/dist/emoji/cldr/t-BvHgGpUr.js.map +0 -1
  1096. package/dist/emoji/cldr/u-ChFYHtUf.js.map +0 -1
  1097. package/dist/emoji/cldr/v-WmX3nWtZ.js.map +0 -1
  1098. package/dist/emoji/cldr/w-BPySQUWW.js.map +0 -1
  1099. package/dist/emoji/cldr/x-SC3r1n9O.js +0 -6
  1100. package/dist/emoji/cldr/x-SC3r1n9O.js.map +0 -1
  1101. package/dist/emoji/cldr/y-zB_yhTFg.js.map +0 -1
  1102. package/dist/emoji/cldr/z-BgJ94Cap.js.map +0 -1
  1103. package/dist/emoji/fomantic/0-CGf6gC3a.js +0 -10
  1104. package/dist/emoji/fomantic/0-CGf6gC3a.js.map +0 -1
  1105. package/dist/emoji/fomantic/a-CrqYlC21.js.map +0 -1
  1106. package/dist/emoji/fomantic/b-DneVHRdQ.js.map +0 -1
  1107. package/dist/emoji/fomantic/c-ClxKRuir.js.map +0 -1
  1108. package/dist/emoji/fomantic/d-Djqs_y4s.js.map +0 -1
  1109. package/dist/emoji/fomantic/e-CuF-jOQd.js.map +0 -1
  1110. package/dist/emoji/fomantic/f-D8VglrJ4.js.map +0 -1
  1111. package/dist/emoji/fomantic/g-Du_HFl6U.js.map +0 -1
  1112. package/dist/emoji/fomantic/h-CLE5tHnM.js.map +0 -1
  1113. package/dist/emoji/fomantic/i-BjOsrQDZ.js.map +0 -1
  1114. package/dist/emoji/fomantic/j-CyUDXKCu.js.map +0 -1
  1115. package/dist/emoji/fomantic/k-Clypg4R8.js.map +0 -1
  1116. package/dist/emoji/fomantic/l-DvLPdBh-.js.map +0 -1
  1117. package/dist/emoji/fomantic/m-B1lIb1kP.js.map +0 -1
  1118. package/dist/emoji/fomantic/n-Bgpp_ht5.js.map +0 -1
  1119. package/dist/emoji/fomantic/o-BhYZzpjp.js.map +0 -1
  1120. package/dist/emoji/fomantic/p-VLL0GK3m.js.map +0 -1
  1121. package/dist/emoji/fomantic/q-CKrtMwhc.js +0 -6
  1122. package/dist/emoji/fomantic/q-CKrtMwhc.js.map +0 -1
  1123. package/dist/emoji/fomantic/r-Bd1DjkkI.js.map +0 -1
  1124. package/dist/emoji/fomantic/s-Bqatw1W7.js.map +0 -1
  1125. package/dist/emoji/fomantic/t-Bs7IFhv3.js.map +0 -1
  1126. package/dist/emoji/fomantic/u-M6GfYC-U.js.map +0 -1
  1127. package/dist/emoji/fomantic/v-BKHNqkn0.js.map +0 -1
  1128. package/dist/emoji/fomantic/w-B_XvIu7h.js.map +0 -1
  1129. package/dist/emoji/fomantic/x-CG1_nzCF.js +0 -9
  1130. package/dist/emoji/fomantic/x-CG1_nzCF.js.map +0 -1
  1131. package/dist/emoji/fomantic/y-DPZaoIla.js.map +0 -1
  1132. package/dist/emoji/fomantic/z-FH-kPXch.js.map +0 -1
  1133. package/dist/fruity-BRVlgJZd.js +0 -6
  1134. package/dist/fruity-BRVlgJZd.js.map +0 -1
  1135. package/dist/fruity.theme-CbC7Jyvk.js.map +0 -1
  1136. package/dist/glass-x9tbbwVq.js +0 -6
  1137. package/dist/glass-x9tbbwVq.js.map +0 -1
  1138. package/dist/glass.theme-24wY2wH9.js +0 -6
  1139. package/dist/glass.theme-24wY2wH9.js.map +0 -1
  1140. package/dist/matrix-QY2gWbJ0.js +0 -6
  1141. package/dist/matrix-QY2gWbJ0.js.map +0 -1
  1142. package/dist/matrix.theme-_8xtwhDq.js +0 -6
  1143. package/dist/matrix.theme-_8xtwhDq.js.map +0 -1
  1144. package/dist/merlot-DOXLuUaU.js.map +0 -1
  1145. package/dist/merlot.theme-S-QnNGsw.js +0 -6
  1146. package/dist/merlot.theme-S-QnNGsw.js.map +0 -1
  1147. package/dist/midnight-BxlTQSfw.js.map +0 -1
  1148. package/dist/midnight.theme-wXbqRYLy.js +0 -6
  1149. package/dist/midnight.theme-wXbqRYLy.js.map +0 -1
  1150. package/dist/mockup-83ELBuVr.js +0 -6
  1151. package/dist/mockup-83ELBuVr.js.map +0 -1
  1152. package/dist/mockup.theme-DmpBgGBl.js +0 -6
  1153. package/dist/mockup.theme-DmpBgGBl.js.map +0 -1
  1154. package/dist/paper-M61nUilz.js.map +0 -1
  1155. package/dist/paper.theme-B8R5Jn5H.js +0 -6
  1156. package/dist/paper.theme-B8R5Jn5H.js.map +0 -1
  1157. package/dist/persist.types-D2m6wD-S.js.map +0 -1
  1158. package/dist/pop-CxXfytjk.js.map +0 -1
  1159. package/dist/pop.theme-CXzv8B9x.js +0 -6
  1160. package/dist/pop.theme-CXzv8B9x.js.map +0 -1
  1161. package/dist/search-CzSzx7bX.js.map +0 -1
  1162. package/dist/spell-By5Y3jKP.js +0 -6
  1163. package/dist/spell-By5Y3jKP.js.map +0 -1
  1164. package/dist/spell.theme-DxGj7qHx.js +0 -6
  1165. package/dist/spell.theme-DxGj7qHx.js.map +0 -1
  1166. package/dist/styles.en-CUUxNwHo.js.map +0 -1
  1167. package/dist/ui-theme-menu-CuIjr8Ou.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-theme-menu-CuIjr8Ou.js","names":["schemeOf","_init","E.state","E.once","E.beforeNextPaint","__name","<span slot=\"trigger\" class={CHOSEN_CLASS}>\n {HueDropdown.dot(chosen, options.noneColors)}\n <span class={NAME_CLASS}>{chosen() ? options.nameFor(chosen()!) : options.noneLabel()}</span>\n </span>","<ui-item value={NONE_VALUE}>\n {HueDropdown.dot(() => undefined, options.noneColors)}\n {options.noneLabel()}\n </ui-item>","<For each={options.hues()}>\n {(hue) => (\n <ui-item value={hue}>\n {HueDropdown.dot(() => hue)}\n {options.nameFor(hue)}\n </ui-item>\n )}\n </For>","<ui-item value={hue}>\n {HueDropdown.dot(() => hue)}\n {options.nameFor(hue)}\n </ui-item>","class={DROPDOWN_CLASS}","size={options.size}","value={chosen() ?? NONE_VALUE}","aria-label={options.label()}","class={CHOSEN_CLASS}","class={NAME_CLASS}","<ui-dropdown\n part={options.part}\n class={DROPDOWN_CLASS}\n selection=\"\"\n fluid=\"\"\n size={options.size}\n value={chosen() ?? NONE_VALUE}\n aria-label={options.label()}\n on-ui-changed={(event) => {\n event.stopPropagation()\n const value = String(event.detail.value)\n options.onPick(value === NONE_VALUE ? undefined : (value as UIT.ThemeHue), event)\n }}\n >\n <span slot=\"trigger\" class={CHOSEN_CLASS}>\n {HueDropdown.dot(chosen, options.noneColors)}\n <span class={NAME_CLASS}>{chosen() ? options.nameFor(chosen()!) : options.noneLabel()}</span>\n </span>\n <ui-item value={NONE_VALUE}>\n {HueDropdown.dot(() => undefined, options.noneColors)}\n {options.noneLabel()}\n </ui-item>\n <For each={options.hues()}>\n {(hue) => (\n <ui-item value={hue}>\n {HueDropdown.dot(() => hue)}\n {options.nameFor(hue)}\n </ui-item>\n )}\n </For>\n </ui-dropdown>","style={hue() ? `--_hue: var(--ui-${hue()})` : halves()}","<span\n class={[DOT_CLASS, hue() ?? (halves() ? HALVES_CLASS : NONE_CLASS)]}\n style={hue() ? `--_hue: var(--ui-${hue()})` : halves()}\n aria-hidden=\"true\"\n />","_tmpl$","_tmpl$2","_tmpl$3","hueDropdownCSS","_$getOwner","_$memo","_$createComponent","_$readShallow","NAME_CLASS","_$setAttribute","<Show when={this.shownControls === \"theme\"}>{this.dropdown()}</Show>","this","<div class={this.rootClass} part={this.partForName(\"controls\")}>\n <Show when={this.shownControls === \"theme\"}>{this.dropdown()}</Show>\n <Show when={this.shownControls === \"both\"}>{this.palette()}</Show>\n <Show when={this.shownControls === \"scheme\"}>{this.schemeButton()}</Show>\n <Show when={this.isMenu}>{this.panel()}</Show>\n </div>","<Show when={this.shownControls === \"both\"}>{this.palette()}</Show>","<Show when={this.shownControls === \"scheme\"}>{this.schemeButton()}</Show>","<Show when={this.isMenu}>{this.panel()}</Show>","part={this.partForName(\"controls\")}","<For each={ShownSchemes}>\n {(scheme) => <span class={[scheme, GLYPH_CLASS]} aria-hidden=\"true\">\n <ui-icon name={SCHEME_ICONS[scheme]} padding=\"none\" />\n </span>}\n </For>","each={ShownSchemes}","name={SCHEME_ICONS[scheme]}","part={this.partForName(\"scheme\")}","aria-label={next()}","class={[PALETTE_CLASS, BUTTON_CLASS]}","part={this.partForName(\"palette\")}","aria-label={label()}","class={GLYPH_CLASS}","ref={(popup) => this.wireOverlay(popup)}","class={OVERLAY_CLASS}","aria-label={this.translationForKey(\"overlayName\")}","for={IDS.palette}","class={this.isOpen ? MUTED_CLASS : void 0}","<div class={PANEL_CLASS}>\n {this.schemes()}\n <div class={DIVIDER_CLASS} role=\"separator\" />\n <div class={HEADING_CLASS} id={IDS.heading}>\n {this.translationForKey(\"themeName\")}\n </div>\n <div\n class={MENU_CLASS}\n part={this.partForName(\"menu\")}\n role={MENU_ROLES.menu}\n aria-labelledby={IDS.heading}\n onKeyDown={(event) => this.onMenuKey(event)}\n >\n <For each={this.themeMenu.entries}>{(entry) => this.entry(entry)}</For>\n </div>\n <Show when={ThemePreference.tintsFor(this.chosenTheme).length}>\n <div class={DIVIDER_CLASS} role=\"separator\" />\n </Show>\n {this.tints()}\n <Show when={this.benchAddress}>\n <div class={DIVIDER_CLASS} role=\"separator\" />\n <a\n class={BENCH_CLASS}\n part={this.partForName(\"bench\")}\n href={this.benchAddress}\n target={BENCH_TARGET}\n rel=\"noopener\"\n title={this.translationForKey(\"benchTip\")}\n >\n <ui-icon name={BENCH_ICON} aria-hidden=\"true\" padding=\"none\" />\n <span class={NAME_CLASS}>{this.translationForKey(\"bench\")}</span>\n </a>\n </Show>\n <slot name={this.slotForName(\"end\")} />\n </div>","<For each={this.themeMenu.entries}>{(entry) => this.entry(entry)}</For>","<Show when={ThemePreference.tintsFor(this.chosenTheme).length}>\n <div class={DIVIDER_CLASS} role=\"separator\" />\n </Show>","<div class={DIVIDER_CLASS} role=\"separator\" />","<Show when={this.benchAddress}>\n <div class={DIVIDER_CLASS} role=\"separator\" />\n <a\n class={BENCH_CLASS}\n part={this.partForName(\"bench\")}\n href={this.benchAddress}\n target={BENCH_TARGET}\n rel=\"noopener\"\n title={this.translationForKey(\"benchTip\")}\n >\n <ui-icon name={BENCH_ICON} aria-hidden=\"true\" padding=\"none\" />\n <span class={NAME_CLASS}>{this.translationForKey(\"bench\")}</span>\n </a>\n </Show>","part={this.partForName(\"bench\")}","href={this.benchAddress}","title={this.translationForKey(\"benchTip\")}","class={NAME_CLASS}","class={DIVIDER_CLASS}","class={HEADING_CLASS}","id={IDS.heading}","class={MENU_CLASS}","part={this.partForName(\"menu\")}","role={MENU_ROLES.menu}","aria-labelledby={IDS.heading}","name={this.slotForName(\"end\")}","<Show when={tints().length}>\n <div class={HEADING_CLASS}>{this.translationForKey(\"tintName\")}</div>\n <div class={TINTS_CLASS}>\n {HueDropdown.draw({\n part: this.partForName(\"tints\"),\n size: TINT_SIZE,\n value: /* @__PURE__ */ __name(() => this.chosen.tint, \"value\"),\n hues: tints,\n nameFor: /* @__PURE__ */ __name((hue) => this.translationForKey(hue), \"nameFor\"),\n noneLabel: /* @__PURE__ */ __name(() => this.translationForKey(\"noTint\"), \"noneLabel\"),\n label: /* @__PURE__ */ __name(() => this.translationForKey(\"tintName\"), \"label\"),\n onPick: /* @__PURE__ */ __name((tint, event) => void this.chooseTint(tint, event), \"onPick\")\n })}\n </div>\n </Show>","<For each={SchemeChoices}>\n {(scheme) => {\n const isChosen = /* @__PURE__ */ __name(() => this.chosen.scheme === scheme, \"isChosen\");\n return <button\n type=\"button\"\n class={[SCHEME_OPTION_CLASS, { checked: isChosen() }]}\n part={this.partForName(\"scheme-option\")}\n role={SCHEME_ROLES.item}\n value={scheme}\n aria-checked={isChosen() ? \"true\" : \"false\"}\n tabindex={isChosen() ? 0 : -1}\n onClick={(event) => this.chooseScheme(scheme, event)}\n >\n <ui-icon name={SCHEME_CHOICE_ICONS[scheme]} aria-hidden=\"true\" padding=\"none\" />\n <span class={NAME_CLASS}>{this.translationForKey(SCHEME_TEXTS[scheme])}</span>\n </button>;\n }}\n </For>","each={SchemeChoices}","part={this.partForName(\"scheme-option\")}","role={SCHEME_ROLES.item}","aria-checked={isChosen() ? \"true\" : \"false\"}","tabindex={isChosen() ? 0 : -1}","name={SCHEME_CHOICE_ICONS[scheme]}","<button\n type=\"button\"\n class={[SCHEME_OPTION_CLASS, { checked: isChosen() }]}\n part={this.partForName(\"scheme-option\")}\n role={SCHEME_ROLES.item}\n value={scheme}\n aria-checked={isChosen() ? \"true\" : \"false\"}\n tabindex={isChosen() ? 0 : -1}\n onClick={(event) => this.chooseScheme(scheme, event)}\n >\n <ui-icon name={SCHEME_CHOICE_ICONS[scheme]} aria-hidden=\"true\" padding=\"none\" />\n <span class={NAME_CLASS}>{this.translationForKey(SCHEME_TEXTS[scheme])}</span>\n </button>","part={this.partForName(\"schemes\")}","role={SCHEME_ROLES.group}","aria-label={this.translationForKey(\"schemeName\")}","<div\n class={SCHEMES_CLASS}\n part={this.partForName(\"schemes\")}\n role={SCHEME_ROLES.group}\n aria-label={this.translationForKey(\"schemeName\")}\n onKeyDown={(event) => this.onSchemeKey(event)}\n >\n <For each={SchemeChoices}>\n {(scheme) => {\n const isChosen = /* @__PURE__ */ __name(() => this.chosen.scheme === scheme, \"isChosen\");\n return <button\n type=\"button\"\n class={[SCHEME_OPTION_CLASS, { checked: isChosen() }]}\n part={this.partForName(\"scheme-option\")}\n role={SCHEME_ROLES.item}\n value={scheme}\n aria-checked={isChosen() ? \"true\" : \"false\"}\n tabindex={isChosen() ? 0 : -1}\n onClick={(event) => this.chooseScheme(scheme, event)}\n >\n <ui-icon name={SCHEME_CHOICE_ICONS[scheme]} aria-hidden=\"true\" padding=\"none\" />\n <span class={NAME_CLASS}>{this.translationForKey(SCHEME_TEXTS[scheme])}</span>\n </button>;\n }}\n </For>\n </div>","<Show when={entry.description}>\n <span class={UIT.DESCRIPTION}>{entry.description}</span>\n </Show>","<span class={UIT.DESCRIPTION}>{entry.description}</span>","part={this.partForName(\"option\")}","role={MENU_ROLES.item}","value={entry.value}","aria-checked={isChecked() ? \"true\" : \"false\"}","tabindex={(this.tabStopTheme ?? this.chosenTheme) === entry.value ? 0 : -1}","class={CHECK_CLASS}","<button\n type=\"button\"\n class={[OPTION_CLASS, { checked: isChecked() }]}\n part={this.partForName(\"option\")}\n role={MENU_ROLES.item}\n value={entry.value}\n aria-checked={isChecked() ? \"true\" : \"false\"}\n tabindex={(this.tabStopTheme ?? this.chosenTheme) === entry.value ? 0 : -1}\n onClick={(event) => this.onOptionClick(entry.value, event)}\n >\n <span class={CHECK_CLASS} aria-hidden=\"true\">\n <ui-icon name={CHECK_ICON} padding=\"none\" />\n </span>\n <span class={NAME_CLASS}>{entry.text}</span>\n <Show when={entry.description}>\n <span class={UIT.DESCRIPTION}>{entry.description}</span>\n </Show>\n </button>","ref={(dropdown) => dropdown.addEventListener(\"ui-changed\", (event) => this.onDropdownChange(event))}","<Show when={this.compact} fallback={label()}>\n <ui-icon name={PALETTE_ICON} aria-hidden=\"true\" />\n </Show>","<ui-icon name={PALETTE_ICON} aria-hidden=\"true\" />","<For each={this.themeMenu.entries}>\n {(entry) => \"type\" in entry ? <ui-item kind={entry.type}>{entry.text}</ui-item> : <ui-item value={entry.value} description={entry.description}>\n {entry.text}\n </ui-item>}\n </For>","description={entry.description}","<ui-dropdown\n part={this.partForName(\"theme\")}\n class={{ [COMPACT]: !!this.compact }}\n floating=\"\"\n scrolling=\"\"\n button=\"\"\n padding={this.compact ? \"compact\" : void 0}\n inverted={this.inverted ? \"\" : void 0}\n size={this.size}\n label={this.translationForKey(\"themeName\")}\n title={this.compact ? label() : void 0}\n aria-label={this.compact ? label() : void 0}\n value={this.chosenTheme}\n ref={(dropdown) => dropdown.addEventListener(\"ui-changed\", (event) => this.onDropdownChange(event))}\n >\n <div slot=\"header\" class={TINTS_HEADER_CLASS}>\n {this.tints()}\n </div>\n <span slot=\"trigger\">\n <Show when={this.compact} fallback={label()}>\n <ui-icon name={PALETTE_ICON} aria-hidden=\"true\" />\n </Show>\n </span>\n <For each={this.themeMenu.entries}>\n {(entry) => \"type\" in entry ? <ui-item kind={entry.type}>{entry.text}</ui-item> : <ui-item value={entry.value} description={entry.description}>\n {entry.text}\n </ui-item>}\n </For>\n <Show when={this.benchAddress}>\n <ui-item kind=\"divider\" />\n <ui-item value={BENCH_VALUE} icon={BENCH_ICON} title={this.translationForKey(\"benchTip\")}>\n {this.translationForKey(\"bench\")}\n </ui-item>\n </Show>\n </ui-dropdown>","<Show when={this.benchAddress}>\n <ui-item kind=\"divider\" />\n <ui-item value={BENCH_VALUE} icon={BENCH_ICON} title={this.translationForKey(\"benchTip\")}>\n {this.translationForKey(\"bench\")}\n </ui-item>\n </Show>","class={{ [COMPACT]: !!this.compact }}","padding={this.compact ? \"compact\" : void 0}","inverted={this.inverted ? \"\" : void 0}","size={this.size}","label={this.translationForKey(\"themeName\")}","title={this.compact ? label() : void 0}","aria-label={this.compact ? label() : void 0}","value={this.chosenTheme}","class={TINTS_HEADER_CLASS}","E.UIComponent","E.proto","E.protoMerged","E.state","E.cssState","E.whileConnected","E.derived","E.untracked","_$createComponent","_$readShallow","_$setAttribute","_$getOwner","UIT.HEADER","UIT.DESCRIPTION","__name","themeMenuCSS","_$delegateEvents","__exportAll","__name","__name$1","HEADER","__publicField","__decorateElement","ThemeHues","__decoratorMetadata","__runInitializers","__privateAdd","ThemeNames","DESCRIPTION","__decoratorStart","PrefPlace","PrefStore","OLD_COLOR_SCHEME_KEYS","DARK_QUERY","COLOR_SCHEME_KEY","ColorSchemeNames","PREF_SAVED_PAGE_EVENT","COLOR_SCHEME_CLASSES","getOwner$1","ADDRESS_PARAM","BOTH","NOT_READ","ColorScheme","scheme","root","search","value","classes","os","listener","event","found","key","store","method","ServerPlace","SERVER_URL","url","fetch","input","init","body","prefix","response","path","error","values","AFTER_OPEN_MS","MOST_WAIT_MS","address","props","text","socket","hasOpened","message","wait","after","EDITS_SHEET","DEFAULT_BASE","GLASS_THEMES","WALLPAPER_THEME","TEXT_SIZES","PAGE_MESSAGE","SavedTheme","kept","LIST_KEY","theme","id","name","list","choices","at","taken","count","call","UI","themes","base","styles","css","old","OLD_KEY","Warnings","SchemeChoices","TINTS_LEFT_OUT","DEFAULT_THEME","THEME_STORE","SCHEME_SWITCHING","THEME_KEYS","OLD_THEME_KEYS","_watch_dec","_followSpace_dec","_current_dec","_init$1","_current","ADDRESS_PARAMS","state","once","_ThemePreference","keptIn","tint","allowed","leftOut","hue","TINT_SEPARATOR","next","saved","params","pick","chosen","LIVE_CHANNEL","data","change","beforeNextPaint","known","mine","n","ThemeDraft","now","isKnown","ThemePreference","HueDropdown_default","_tmpl$$1","_tmpl$2$1","_tmpl$3$1","HueDropdown","NONE_VALUE","options","_el$","_el$2","_el$3","_el$4","_el$5","_el$6","setAttribute","insert","_c$","memo","createComponent","For","_el$7","_el$8","_el$9","effect","readShallow","DROPDOWN_CLASS","CHOSEN_CLASS","NAME_CLASS$1","_p$","className","t","i","s","light","dark","noneColors","_el$10","DOT_CLASS","HALVES_CLASS","NONE_CLASS","style","BenchAddress","PARAMS","pages","SCHEMES","ON","view","href","page","isOn","spells","DESCRIPTIONS","MINE_PREFIX","title","themeMenuVocabulary","UIThemeMenu_default","_tmpl$","_tmpl$2","_tmpl$3","_tmpl$4","_tmpl$5","_tmpl$6","_tmpl$7","_tmpl$8","_tmpl$9","_tmpl$10","_tmpl$11","_tmpl$12","_tmpl$13","_tmpl$14","_tmpl$15","_tmpl$16","_tmpl$17","_focusChosen_dec","_tabStopTheme_dec","_isOpen_dec","_isMenu_dec","_themeMenu_dec","_myThemes_dec","_followPreference_dec","_followsSystem_dec","_isDark_dec","_osScheme_dec","_chosen_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_chosen","_osScheme","_myThemes","_isOpen","_tabStopTheme","_UIThemeMenu","UIComponent","proto","protoMerged","cssState","whileConnected","derived","untracked","isServer","SERVER_CHOICE","applied","given","NO_BENCH","WORKTREE_ROOT","BENCH_PATH","BENCH_PLACES","pattern","DEFAULT_BENCH_PAGE","BENCH_TARGET","detail","_self$","Show","_self$2","ShownSchemes","GLYPH_CLASS","SCHEME_ICONS","SCHEME_CLASS","BUTTON_CLASS","a","MINI","TIP_POSITION","_v$","label","SCHEME_TEXTS","_self$3","_el$11","_el$12","PALETTE_ICON","IDS","PALETTE_CLASS","o","_el$13","ref","popup","OVERLAY_CLASS","e","_el$14","MUTED_CLASS","_self$4","_el$15","_el$16","_el$17","_el$18","_el$20","_el$21","_el$26","entry","_el$19","DIVIDER_CLASS","_$p","_el$22","_el$23","_el$24","_el$25","_o$","BENCH_ICON","BENCH_CLASS","NAME_CLASS","claimElement","PANEL_CLASS","HEADING_CLASS","MENU_CLASS","MENU_ROLES","h","r","tints","_self$5","_el$27","_el$28","TINT_SIZE","TINTS_CLASS","_self$6","_el$29","isChosen","_el$30","_el$31","_el$32","SCHEME_OPTION_CLASS","SCHEME_ROLES","SCHEME_CHOICE_ICONS","SCHEMES_CLASS","SCHEME_SELECTOR","index","_el$33","_el$34","isChecked","_self$7","_el$35","_el$36","_el$37","_el$38","CHECK_ICON","_el$39","OPTION_CLASS","CHECK_CLASS","_self$8","_el$40","_el$41","_el$42","_el$44","_el$47","dropdown","_el$43","_el$48","_el$49","_el$45","_el$46","BENCH_VALUE","COMPACT","TINTS_HEADER_CLASS","ITEM_SELECTOR","row","rows","each","UIThemeMenu","delegateEvents","ui_theme_menu_exports"],"sources":["../../src/util/persist/ColorScheme.ts","../../src/util/persist/WaitedOnPlace.ts","../../src/util/persist/ServerPlace.ts","../../src/util/ReconnectingSocket.ts","../src/components/ui-theme-editor/UIThemeEditor.types.ts","../src/components/ui-theme-editor/SavedTheme.ts","../src/components/ui-theme-menu/UIThemeMenu.types.ts","../src/components/ui-theme-menu/ThemePreference.ts","../src/components/ui-theme-menu/HueDropdown.css?inline","../src/components/ui-theme-menu/HueDropdown.tsx","../src/components/ui-theme-editor/BenchAddress.ts","../src/components/ui-theme-menu/ThemeMenu.ts","../src/components/ui-theme-menu/UIThemeMenu.en.ts","../src/components/ui-theme-menu/UIThemeMenu.css?inline","../src/components/ui-theme-menu/UIThemeMenu.tsx","../src/components/ui-theme-menu/index.ts"],"sourcesContent":["import {\n COLOR_SCHEME_CLASSES,\n COLOR_SCHEME_KEY,\n ColorSchemeNames,\n DARK_QUERY,\n OLD_COLOR_SCHEME_KEYS,\n type ColorSchemeChange,\n type ColorSchemeName\n} from \"./persist.types\"\nimport { PrefStore } from \"./PrefStore\"\n\n/** The query parameter a page's address says its scheme in: `?scheme=dark`. */\nconst ADDRESS_PARAM = \"scheme\"\n\n/** The theme bench's `?scheme=both`: no scheme of the page's own, and no warning. */\nconst BOTH = \"both\"\n\n/** `ColorScheme.addressed` before the address is read. */\nconst NOT_READ = Symbol(\"not read\")\n\n/****************\n * ### `ColorScheme`\n * The light / dark choice a person makes once, for every Spell site: remembered, shown on the page, and followed.\n * - Kept under ONE key (`COLOR_SCHEME_KEY`), through a `PrefStore`: `light`, `dark`, or nothing to follow the OS.\n * - The keys it lived under before are moved over once (`OLD_COLOR_SCHEME_KEYS`).\n * - Shown as `ui-light` / `ui-dark` on `<html>` (`COLOR_SCHEME_CLASSES`: Spell UI's tokens follow them)\n * AND as inline `color-scheme`: for pages without Spell UI's sheets, and `light-dark()`.\n * - Followed: the OS switching, and another tab choosing (`watch()`).\n * - A page's ADDRESS can say it for one visit: `?scheme=light` or `?scheme=dark` wins over the one kept, and is never\n * kept; choosing one (`choose()`) drops it. Any other value is ignored, with a warning (`both`, the theme bench's,\n * silently).\n * - So every Spell page opens in the scheme a link asks for (the theme bench's ↗; Spell UI's `ThemePreference`\n * reads `?theme=` beside it).\n * - Its users:\n * - the site header on the docs, epic pages and saga pages (the kit's `SiteHeader`), a sun / moon button\n * - Spell UI's `ThemePreference`, which keeps a theme beside it and calls following the OS `system`\n * - the editor app's code colours (`CodeThemes`), which only read it\n * - Static only: one per page.\n * - Safe outside a browser (a server drawing a page): nothing chosen, the OS light, nothing applied.\n * - NEVER throws: storage that fails is `PrefStore`'s, which logs and forgets.\n ****************/\nexport class ColorScheme {\n /**\n * The scheme chosen, or `undefined`: follow the OS.\n * - The address's (`?scheme=dark`) first, for this visit, until one is chosen here.\n * - SIDE EFFECT: while nothing's kept, moves an old key's scheme over, once (`OLD_COLOR_SCHEME_KEYS`).\n */\n static chosen(): ColorSchemeName | undefined {\n return ColorScheme.fromAddress() ?? schemeOf(PrefStore.getAt(COLOR_SCHEME_KEY)) ?? ColorScheme.moveOldKeys()\n }\n\n /** Remember `scheme` (`undefined`: follow the OS again), and show it on the page (`apply()`). */\n static choose(scheme: ColorSchemeName | undefined): void {\n ColorScheme.addressed = undefined\n PrefStore.setAt(COLOR_SCHEME_KEY, scheme)\n ColorScheme.apply(scheme)\n }\n\n /**\n * Remember `scheme`, chosen somewhere else (`undefined`: follow the OS), and show what this page should now:\n * the address's scheme still wins for this visit, unlike `choose()`.\n * - e.g. Spell UI's `ThemePreference`, taking the person's scheme from their space, or another page's pick\n */\n static remember(scheme: ColorSchemeName | undefined): void {\n PrefStore.setAt(COLOR_SCHEME_KEY, scheme)\n ColorScheme.apply(ColorScheme.chosen())\n }\n\n /**\n * Show `scheme` on `root` (default `<html>`): its class (the other one off) and the same inline `color-scheme`.\n * - `undefined`: neither, so the page's own `color-scheme` (`light dark`) follows the OS\n */\n static apply(scheme: ColorSchemeName | undefined, root?: HTMLElement): void {\n root ??= globalThis.document?.documentElement\n if (!root) return\n root.classList.toggle(COLOR_SCHEME_CLASSES.light, scheme === \"light\")\n root.classList.toggle(COLOR_SCHEME_CLASSES.dark, scheme === \"dark\")\n if (scheme) root.style.colorScheme = scheme\n else root.style.removeProperty(\"color-scheme\")\n }\n\n /** Read the address's `?scheme=` again, next time it's asked for (tests, and `ThemePreference.reset()`). */\n static rereadAddress(): void {\n ColorScheme.addressed = NOT_READ\n }\n\n /** The address's scheme for this visit (`?scheme=`); `NOT_READ` until first asked, `undefined`: none, or chosen since. */\n private static addressed: ColorSchemeName | undefined | typeof NOT_READ = NOT_READ\n\n /** The address's scheme (`addressed`), read on first use; a value that's neither scheme is ignored, warned. */\n private static fromAddress(): ColorSchemeName | undefined {\n if (ColorScheme.addressed !== NOT_READ) return ColorScheme.addressed\n const search = globalThis.location?.search ?? \"\"\n const value = new URLSearchParams(search).get(ADDRESS_PARAM) || undefined\n const scheme = schemeOf(value)\n // `both`: the theme bench's light and dark side by side (its `BenchAddress`), no one scheme for the page\n if (value && !scheme && value !== BOTH)\n console.warn(`ColorScheme: the address's scheme \\`${value}\\` is neither light nor dark; ignored`)\n return (ColorScheme.addressed = scheme)\n }\n\n /** The scheme the OS asks for (`DARK_QUERY`); `light` where there's no `matchMedia` (a server). */\n static osScheme(): ColorSchemeName {\n return typeof matchMedia === \"function\" && matchMedia(DARK_QUERY).matches ? \"dark\" : \"light\"\n }\n\n /**\n * The scheme `classes` (`<html>`'s) force, or `undefined` when neither class is on (the page follows the OS).\n * - Why: a page may switch its own scheme (the editor app's pill), so what it SHOWS is read from `<html>`.\n */\n static forcedBy(classes: { contains(token: string): boolean }): ColorSchemeName | undefined {\n if (classes.contains(COLOR_SCHEME_CLASSES.dark)) return \"dark\"\n if (classes.contains(COLOR_SCHEME_CLASSES.light)) return \"light\"\n return undefined\n }\n\n /** The scheme the page shows: what `<html>`'s classes force, else the one chosen, else the OS's. */\n static shown(): ColorSchemeName {\n const root = globalThis.document?.documentElement\n return (root && ColorScheme.forcedBy(root.classList)) ?? ColorScheme.chosen() ?? ColorScheme.osScheme()\n }\n\n /**\n * Call `listener` when the scheme a page should show may have changed; returns the stop.\n * - `os`: the OS switched\n * - `chosen`: another tab chose (a `storage` event): applied here first, so the listener only re-draws\n * - Outside a browser: never called.\n */\n static watch(listener: (change: ColorSchemeChange) => void): () => void {\n if (typeof window === \"undefined\" || typeof matchMedia !== \"function\") return () => {}\n const os = matchMedia(DARK_QUERY)\n const onOs = () => listener(\"os\")\n const onStorage = (event: StorageEvent) => {\n // `null`: the other tab cleared all its storage\n if (event.key !== COLOR_SCHEME_KEY && event.key !== null) return\n ColorScheme.apply(ColorScheme.chosen())\n listener(\"chosen\")\n }\n os.addEventListener(\"change\", onOs)\n window.addEventListener(\"storage\", onStorage)\n return () => {\n os.removeEventListener(\"change\", onOs)\n window.removeEventListener(\"storage\", onStorage)\n }\n }\n\n /**\n * Move the scheme from its old keys (`OLD_COLOR_SCHEME_KEYS`):\n * the first valid one is kept under `COLOR_SCHEME_KEY`, and every old key removed, so this runs once.\n * - Returns the scheme moved, else `undefined`.\n */\n private static moveOldKeys(): ColorSchemeName | undefined {\n let found: ColorSchemeName | undefined\n for (const key of OLD_COLOR_SCHEME_KEYS) {\n found ??= schemeOf(PrefStore.getAt(key))\n PrefStore.setAt(key, undefined)\n }\n if (found) PrefStore.setAt(COLOR_SCHEME_KEY, found)\n return found\n }\n}\n\n/** `value` when it's a scheme (`light` / `dark`), else `undefined`. */\nfunction schemeOf(value: unknown): ColorSchemeName | undefined {\n return ColorSchemeNames.includes(value as ColorSchemeName) ? (value as ColorSchemeName) : undefined\n}\n","import { PrefPlace } from \"./PrefPlace\"\n\n/****************\n * ### `WaitedOnPlace`\n * A `PrefPlace` whose every read must be waited on:\n * the browser's database (`DatabasePlace`), a server (`ServerPlace`).\n * - A quick read (`read()`, `keys()`) throws `TypeError`, naming `load()`: `PrefStore` refuses one first.\n * - A quick write (`write()`, `remove()`) is done later, without waiting: a failure is logged by `save()`.\n * - A subclass writes the waited-on methods:\n * `load()`, `save()`, `loadKeys()`, `removeUnder()`, and `update()` when it can do it in one step.\n ****************/\nexport abstract class WaitedOnPlace extends PrefPlace {\n readonly isAsync = true\n\n /** throws `TypeError`: use `load()` */\n read(store: string): unknown {\n throw this.quickReadError(\"read\", store)\n }\n\n /** throws `TypeError`: use `loadKeys()` */\n keys(store: string): string[] {\n throw this.quickReadError(\"keys\", store)\n }\n\n /** `save()`, not waited on. */\n write(store: string, key: string, value: unknown): void {\n void this.save(store, key, value)\n }\n\n /** `save()` of nothing, not waited on. */\n remove(store: string, key: string): void {\n void this.save(store, key, undefined)\n }\n\n abstract override load(store: string, key: string): Promise<unknown>\n abstract override save(store: string, key: string, value: unknown): Promise<void>\n abstract override loadKeys(store: string): Promise<string[]>\n abstract override removeUnder(store: string, prefix: string): Promise<void>\n\n /** The `TypeError` a quick read throws, naming what to use instead. */\n private quickReadError(method: string, store: string): TypeError {\n return new TypeError(\n `PrefPlace.${method}(): \\`${store}\\` keeps its values in ${this.description}, which must be waited on; ` +\n \"use `load()` or `loadKeys()`\"\n )\n }\n}\n","import type { PrefForgetRequest, PrefKeysAnswer, PrefLoadAnswer, PrefSaveRequest } from \"./persist.types\"\nimport { WaitedOnPlace } from \"./WaitedOnPlace\"\n\n/****************\n * ### `ServerPlace`\n * A waited-on `PrefPlace` on a server: a person's preferences follow them to every browser they use.\n * - It speaks a small protocol under its URL, `/api/prefs` by default:\n * four requests, written out above `PrefLoadAnswer` (\"The server's protocol\").\n * - spell-app's spaces answer it on the page server, keeping each store in the person's space (`__prefs/`).\n * - Values travel as JSON: plain data only (no `Blob`, no `Date`).\n * - Each request is its own: `PrefStore.update()` reads, then saves, one at a time in this page.\n * - NEVER throws when the server fails (offline, refused, an error): it logs, and a read answers `undefined`.\n * - `ServerPlace.shared`: the one on the page server's `/api/prefs`, which every store on the page uses.\n ****************/\nexport class ServerPlace extends WaitedOnPlace {\n readonly description = \"the server\"\n /** Where it asks: `/api/prefs`, or a test server's. */\n readonly url: string\n\n constructor({ url = SERVER_URL, fetch }: ServerPlaceProps = {}) {\n super()\n this.url = url.replace(/\\/+$/, \"\")\n this.fetch = fetch ?? ((input, init) => globalThis.fetch(input, init))\n }\n\n /**\n * The one on the page server's `/api/prefs`, made on first use.\n * - STATIC: one server answers every store on the page.\n */\n static get shared(): ServerPlace {\n return (ServerPlace._shared ??= new ServerPlace())\n }\n private static _shared: ServerPlace | undefined\n\n ////////////////\n // ## Waited on\n ////////////////\n\n async load(store: string, key: string): Promise<unknown> {\n const answer = await this.ask<PrefLoadAnswer>(\"load\", store, key, `load?${query({ store, key })}`)\n return answer?.value\n }\n\n async save(store: string, key: string, value: unknown): Promise<void> {\n const body: PrefSaveRequest = value === undefined ? { store, key } : { store, key, value }\n await this.ask<PrefLoadAnswer>(\"save\", store, key, \"save\", body)\n }\n\n async loadKeys(store: string): Promise<string[]> {\n const answer = await this.ask<PrefKeysAnswer>(\"loadKeys\", store, \"\", `keys?${query({ store, under: \"\" })}`)\n return answer?.keys ?? []\n }\n\n async removeUnder(store: string, prefix: string): Promise<void> {\n const body: PrefForgetRequest = { store, under: prefix }\n await this.ask<PrefKeysAnswer>(\"removeUnder\", store, prefix, \"forget\", body)\n }\n\n ////////////////\n // ## Asking\n ////////////////\n\n /** Fetches: `ServerPlaceProps.fetch`. */\n private fetch: typeof globalThis.fetch\n\n /**\n * Ask the server for `path` (under `url`): a GET, or with `body`, a POST of it as JSON.\n * - Its answer's JSON; a failure (offline, an error status) is logged, and answers `undefined`.\n */\n private async ask<T>(\n method: string,\n store: string,\n key: string,\n path: string,\n body?: object\n ): Promise<T | undefined> {\n try {\n const response = await this.fetch(`${this.url}/${path}`, {\n method: body ? \"POST\" : \"GET\",\n headers: body ? { \"Content-Type\": \"application/json\" } : undefined,\n body: body ? JSON.stringify(body) : undefined\n })\n if (!response.ok) throw new Error(`${response.status} ${response.statusText}: ${await response.text()}`)\n return (await response.json()) as T\n } catch (error) {\n console.error(`ServerPlace.${method}(): ${this.url} refused \\`${store}\\` \\`${key}\\`:`)\n console.error(error)\n return undefined\n }\n }\n}\n\n/** Props for a `ServerPlace`. */\nexport type ServerPlaceProps = {\n /** Where to ask: default `/api/prefs`, the page server's. */\n url?: string\n /** How to ask: default the browser's `fetch`; a test's stand-in. */\n fetch?: typeof globalThis.fetch\n}\n\n/** The page server's prefs: spell-app's spaces answer it. */\nconst SERVER_URL = \"/api/prefs\"\n\n/** `values` as a query string. */\nfunction query(values: Record<string, string>): string {\n return new URLSearchParams(values).toString()\n}\n","import { after, type CancelablePromise } from \"./timing\"\n\n/** How long after an open socket closes it tries again, ms. */\nconst AFTER_OPEN_MS = 1000\n\n/** The longest it waits between tries, ms. */\nconst MOST_WAIT_MS = 10_000\n\n/****************\n * ### `ReconnectingSocket`\n * A websocket that comes back: it opens, and when it closes it tries again, until `close()`.\n *\n * ```ts\n * new ReconnectingSocket(\"/api/server/live\", { onMessage: (text) => heard(JSON.parse(text)) })\n * ```\n *\n * - A relative address is read against this page's, and `http` becomes `ws`.\n * - The address can be a function, asked each try: an address that says where to carry on from.\n * - Closed after it had opened: it tries again after `firstWait` ms.\n * - A try that failed: it waits twice as long each time, up to 10s.\n * - `send()` with no socket open answers false, and sends nothing: what to do about it is the caller's.\n * - No `WebSocket` in this browser or program: it does nothing, quietly.\n * - NOT `spell/server`'s `liveClient`, which is served to pages as one function's text, so it can import nothing.\n * - Imports only `timing`, and goes in no barrel: a page takes it by file (`spell/util/ReconnectingSocket`).\n ****************/\nexport class ReconnectingSocket {\n /** The socket now, once one is opening. */\n private socket: WebSocket | undefined\n /** The next try. */\n private retry: CancelablePromise<void> | undefined\n /** It was told to stop: no more tries. */\n private isStopped = false\n /** How long the next failed try waits, ms. */\n private wait: number\n\n constructor(\n private readonly address: string | URL | (() => string | URL),\n private readonly props: ReconnectingSocketProps = {}\n ) {\n this.wait = props.firstWait ?? AFTER_OPEN_MS\n this.open()\n }\n\n /** Is a socket open now? */\n get isOpen(): boolean {\n return this.socket?.readyState === 1\n }\n\n /** Send `text`, if a socket is open. Answers whether it went: never throws. */\n send(text: string): boolean {\n if (!this.isOpen) return false\n this.socket!.send(text)\n return true\n }\n\n /** Stop: the socket closes, and no more tries. */\n close(): void {\n this.isStopped = true\n this.retry?.cancel()\n this.retry = undefined\n this.socket?.close()\n }\n\n /** Open a socket, and hear it. */\n private open(): void {\n if (this.isStopped || typeof WebSocket === \"undefined\") return\n const address = socketAddressOf(typeof this.address === \"function\" ? this.address() : this.address)\n const socket = this.props.protocols ? new WebSocket(address, [...this.props.protocols]) : new WebSocket(address)\n this.socket = socket\n let hasOpened = false\n socket.addEventListener(\"open\", () => {\n hasOpened = true\n this.wait = this.props.firstWait ?? AFTER_OPEN_MS\n this.props.onOpen?.()\n })\n socket.addEventListener(\"message\", (message: MessageEvent<string>) => this.props.onMessage?.(message.data))\n socket.addEventListener(\"close\", () => {\n if (this.socket === socket) this.socket = undefined\n if (hasOpened) this.props.onClose?.()\n if (this.isStopped) return\n const wait = this.wait\n this.wait = Math.min(wait * 2, MOST_WAIT_MS)\n this.retry = after(wait / 1000, () => this.open())\n })\n }\n}\n\n/** Constructor props of a `ReconnectingSocket`. */\nexport type ReconnectingSocketProps = {\n /** Hear a text message. */\n onMessage?: (text: string) => void\n /** A socket opened: the first time, and each time it comes back. */\n onOpen?: () => void\n /** A socket that had opened closed. */\n onClose?: () => void\n /** How long the first try after a close waits, ms; default 1s. */\n firstWait?: number\n /** The sub-protocols it offers the server, as `new WebSocket()` takes them. */\n protocols?: readonly string[]\n}\n\n/** `address` as a socket's: read against this page's, with its scheme turned from `http` to `ws`. */\nfunction socketAddressOf(address: string | URL): URL {\n const url = new URL(address, typeof location === \"undefined\" ? undefined : location.href)\n url.protocol = url.protocol.replace(/^http/, \"ws\")\n return url\n}\n","/**\n * The `ui-theme-editor` family's shared pieces: what its component, `ThemeDraft`, `ThemeTokens`, `PageBridge` and\n * `SavedTheme` share.\n * - Pure data, at the bottom of the folder's imports (`import type` only): node loads it (`yarn site:data`),\n * and `PageBridge`, which the editor app imports, reads it.\n * - The choices themselves (`ThemeChoices`, `ThemeHues` ...) are `UIT`'s: an event's `detail` names them.\n */\n\nimport type * as UIT from \"spell/ui/components/components.types\"\nimport type { themeEditorVocabulary } from \"./UIThemeEditor.en\"\n\n////////////////\n// ## Element\n////////////////\n\n/** `themeEditorVocabulary`'s type. */\nexport type ThemeEditorVocabulary = typeof themeEditorVocabulary\n\n/** A text key of `<ui-theme-editor>` (`themeEditorVocabulary.texts`). */\nexport type ThemeEditorTextKey = ThemeEditorVocabulary[\"texts\"][number][\"key\"]\n\n/** Looks up a text by key, with `{param}`s filled in (the component's `translationForKey()`). */\nexport type ThemeEditorText = (key: ThemeEditorTextKey, params?: Record<string, string | number>) => string\n\n////////////////\n// ## The page\n////////////////\n\n/**\n * `UI.styles` name of the edited theme's sheet: on the page, after the theme it changes (`UI.themes`' slots).\n * - ONE per page: the live editor's, else the theme kept in the browser (`SavedTheme.restore()`).\n */\nexport const EDITS_SHEET = \"theme-edits\"\n\n/** The theme an editor starts from when the page has none applied (Owen, 2026-10-23: \"fruity by default\"). */\nexport const DEFAULT_BASE = \"fruity\"\n\n/**\n * The GLASS themes: the bases with glass of their own (`--glass-surface*`, `--glass-blur`), which the Glass choice\n * changes.\n * - Glass the base, Fruity on it (`fruity.css` imports `glass.css`; epic `debut` P17, J88).\n * - Read by the editor (does it offer the Glass choice?) and `ThemeDraft` (does it write the glass tokens?).\n */\nexport const GLASS_THEMES: readonly string[] = [\"glass\", \"fruity\"]\n\n/**\n * The theme with a wallpaper of its own (`--glass-wallpaper`), which the Background choice tints too: Fruity.\n * - Glass's page is one solid colour: there the choice tints the page alone.\n */\nexport const WALLPAPER_THEME = \"fruity\"\n\n/** The text sizes an editor offers, in px. */\nexport const TEXT_SIZES = { min: 12, max: 20, step: 1 } as const\n\n////////////////\n// ## The pages it previews\n////////////////\n\n/**\n * A real page the editor previews in a frame, wearing the theme being made (its `pages`, handed in by the page that\n * shows it: Spell UI names none).\n * - `url`: the page's address; `undefined` while the host finds it, `\"\"` when it can't be reached (`note` says why)\n * - `width`: the window width it's drawn at, px: the frame is scaled down to its cell, so the page lays out as on a\n * desk (Phone: `PHONE_WIDTH`, every page)\n * - `ownPrefix`: the start of the page's OWN tokens, which no theme file holds (the Spell editor's `--spell-`):\n * the editor shows those it declares in a group of their own, and copies them as a rule for the page's sheet\n * - `fullView`: ask the page for its full view (`PageMessage.fullMonty`): the Spell editor's Debug, side bars,\n * a card picked\n */\nexport type PreviewPage = {\n id: string\n /** its title, over its frames */\n label: string\n url?: string\n /** said in its frame when `url` is `\"\"` */\n note?: string\n width: number\n reach: PageReach\n /** its icon, where the token column says which pages read a token */\n icon: string\n ownPrefix?: string\n fullView?: boolean\n}\n\n/**\n * How the editor reaches a framed page:\n * - `same origin`: served beside the editor, so it's changed directly (`PageBridge`'s functions)\n * - `messages`: another origin (the Spell editor app, on its own port), so through messages its\n * `PageBridge.listen()` takes; a pair's dark half is at this machine's other name (`127.0.0.1` for `localhost`),\n * another origin again, so the two keep their own schemes\n */\nexport type PageReach = \"same origin\" | \"messages\"\n\n/** The width every page is drawn at in Phone, px: a phone's. */\nexport const PHONE_WIDTH = 390\n\n/**\n * Which schemes show, frames and token values alike (Owen: \"Light\" \"Dark\" \"Both\"): one, or both side by side\n * (a pair of frames per page).\n */\nexport type PageSchemes = \"light\" | \"dark\" | \"both\"\n\n/** Where the pages are drawn: at their desk width, or a phone's. */\nexport type PageDevice = \"desk\" | \"phone\"\n\n/** One frame of a page: its light or its dark one. */\nexport type PageSlot = \"light\" | \"dark\"\n\n/** A frame's key: its page's id and its slot (`editor:dark`). */\nexport type FrameKey = `${string}:${PageSlot}`\n\n////////////////\n// ## Messages\n////////////////\n\n/** Every message's `type`, both ways: a page ignores any other (the value is the theme bench's, which began it). */\nexport const PAGE_MESSAGE = \"spell-theme-bench\"\n\n/** Light, dark, or the OS's. */\nexport type PageScheme = \"light\" | \"dark\" | \"system\"\n\n/**\n * The editor to a framed page: any of these, each applied as it comes.\n * - `theme`, `scheme`: wear them, as the page's own menu would, but never remembered: the page's own choice stays\n * - `css`: the theme being made, a sheet laid over everything the page has (`\"\"`: none)\n * - `fullMonty`: the page's full view: the Spell editor's Debug, every side bar, the Inspector's cards, a part picked\n * - `ask`: reply with what the page's sheets read and declare, and the tokens' values now (`PageReply`)\n */\nexport type PageMessage = {\n type: typeof PAGE_MESSAGE\n theme?: string\n scheme?: PageScheme\n css?: string\n fullMonty?: boolean\n ask?: { id: number; tokens: readonly string[] }\n}\n\n/**\n * A framed page to the editor.\n * - `hello`: it's listening (sent once, as it starts): the editor answers with everything\n * - `reply`: the answer to an `ask`, by its id\n */\nexport type PageReply = {\n type: typeof PAGE_MESSAGE\n hello?: boolean\n reply?: number\n look?: PageLook\n}\n\n/**\n * What a page's sheets say about the tokens, as `PageBridge.look()` reads it.\n * - `reads`: every token some rule reads (`var(--x)`), on the page and in every shadow root\n * - `declares`: every token some rule sets (`--x:`)\n * - `overrides`: every token some rule sets on an element below `<html>`:\n * there, a value set on `:root` (a theme's, the editor's) doesn't reach\n * - `values`: each asked token's value on `<html>` now, as the page computes it (`\"\"`: not set)\n */\nexport type PageLook = {\n reads: readonly string[]\n declares: readonly string[]\n overrides: readonly string[]\n values: Readonly<Record<string, string>>\n}\n\n////////////////\n// ## Tokens\n////////////////\n\n/** A token set by hand: one value for both schemes, or one per scheme (a half left out keeps the theme's own). */\nexport type TokenEdit = UIT.ThemeTokenEdit\n\n/** Every token set by hand, by its CSS name (`--ui-radius-l`). */\nexport type TokenEdits = Readonly<Record<string, TokenEdit>>\n\n/** What kind of control a token gets, from its value. */\nexport type TokenKind = \"color\" | \"length\" | \"text\"\n\n////////////////\n// ## A token's row\n////////////////\n\n/**\n * What `<ui-theme-token>` draws for one token, as the editor works it out: its name, where its value comes from,\n * its value in each scheme shown, and what its drawer offers.\n * - Data in, events out (`ui-changed`, `ui-command`): the row decides nothing about the theme.\n */\nexport type TokenRow = {\n /** its CSS name: `--ui-highlight` */\n token: string\n /** its short name in the tree: `highlight` */\n label: string\n /** its name's tooltip: its CSS name, its place, who points at it */\n nameTip: string\n /** the schemes shown, light first */\n schemes: readonly (\"light\" | \"dark\")[]\n /** its value in each scheme */\n values: Readonly<Record<\"light\" | \"dark\", TokenValue>>\n /** ● this theme sets it (its file, a Basic, by hand); else ○, from what it builds on */\n isHere: boolean\n /** set by hand in the editor */\n isTuned: boolean\n /** light and dark apart: each scheme its own value */\n isSplit: boolean\n /** its drawer is open */\n isOpen: boolean\n /** the mark's tooltip: \"Set here: ...\", \"From Glass: ...\" */\n markTip: string\n /** its Reset's label; `undefined`: nothing to reset */\n resetLabel?: string\n /** a pointer's target, while it points at another token: its place, and that token */\n pointer?: { place: string; token?: string }\n /** the pages that read it: each page's icon, its tip, whether it also sets it on its own elements */\n readers: readonly { id: string; icon: string; tip: string; overrides: boolean }[]\n /** what a mix's colours and a pointer may be: the theme's colour tokens, by place (the drawer's selects) */\n options?: readonly { place: string; label: string }[]\n}\n\n/** A token's value in one scheme, as its row shows it. */\nexport type TokenValue = {\n /** the value as the page shows it: a colour for its chip, else its text */\n text: string\n /** what kind of value: a chip, a length (a slider in the drawer), or text */\n kind: TokenKind\n /** a colour's hex and opacity, for the drawer's picker */\n hex?: string\n opacity?: number\n /** a mix (`color-mix()`): its base, what's mixed in and how much; each colour by place, and as shown */\n mix?: {\n base: string\n baseColor: string\n mixin: string\n mixinColor: string\n amount: number\n }\n}\n","// Import directly: in `core`'s util barrel it cost every page 1.9 kB\nimport { PrefStore } from \"spell/util/persist/PrefStore\"\nimport { E, UI, UIT } from \"spell/ui/core\"\nimport { EDITS_SHEET } from \"./UIThemeEditor.types\"\n\n/****************\n * ### `SavedTheme`\n * The themes a person made in the theme editor and saved by name: \"My themes\" (epic `debut` P25), kept in this\n * browser, put back on any page that picks one.\n * - Each one (`MyTheme`): an id, made once when it's first saved and never changed (a rename changes only its name:\n * WWOD §3, names aren't ids), its name, what the editor made (`UIT.ThemeChoices`) and the sheet made from it.\n * - The sheet is kept too, so a page wears it without the editor's texts or code (`ThemeDraft`, `ThemeFile`).\n * - Any number: `save()` adds one or writes one back by its id, `remove()` deletes one.\n * - The one theme a browser kept before P25 (`OLD_KEY`) opens as the first of them, named after its base\n * (`My Fruity`), once.\n * - Picked in the theme menu as `mine:<id>` (`ThemePreference`): `wear()` puts its base theme on, then its sheet,\n * the same two steps the editor takes, so it looks as it did there.\n * - Kept in `localStorage` (`LIST_KEY`), through `PrefStore`: a private window or blocked storage keeps them for this\n * page only. Export and import carry one to another browser (the editor's).\n * - Static: one list per browser.\n * - Imported by its file (`spell/ui/components/ui-theme-editor/SavedTheme`) by the theme menu and the Spell editor:\n * the family's barrel would load the editor too.\n ****************/\nexport class SavedTheme {\n /** The theme menu's prefix for one of My themes: `mine:<id>`. */\n static readonly PREFIX = \"mine:\"\n\n /** Every saved theme, oldest first; the one kept before P25 moved in first, once. */\n static get list(): readonly MyTheme[] {\n SavedTheme.moveOldTheme()\n const kept = PrefStore.getAt(LIST_KEY)\n return Array.isArray(kept) ? kept.filter(isMyTheme) : []\n }\n\n /** The saved theme with id `id`; `undefined`: none (deleted since). */\n static get(id: string): MyTheme | undefined {\n return SavedTheme.list.find((theme) => theme.id === id)\n }\n\n /** The saved theme a theme menu's name names (`mine:<id>`); `undefined`: another theme, or one deleted since. */\n static picked(name: string | undefined): MyTheme | undefined {\n return name?.startsWith(SavedTheme.PREFIX) ? SavedTheme.get(name.slice(SavedTheme.PREFIX.length)) : undefined\n }\n\n /** The theme menu's name for saved theme `theme`: `mine:<id>`. */\n static pickName(theme: Pick<MyTheme, \"id\">): string {\n return `${SavedTheme.PREFIX}${theme.id}`\n }\n\n /**\n * Save `theme`: a new one (no `id`), its id made now; else written back in its place, by its id.\n * - Returns it as kept.\n * - NEVER throws: blocked storage keeps it for this page only.\n */\n static save({ id, name, choices, css }: SavedThemeInput): MyTheme {\n const list = [...SavedTheme.list]\n const theme: MyTheme = { id: id ?? SavedTheme.newId(), name, choices: { ...choices, name }, css }\n const at = list.findIndex((kept) => kept.id === theme.id)\n if (at === -1) list.push(theme)\n else list[at] = theme\n PrefStore.setAt(LIST_KEY, list)\n return theme\n }\n\n /** Delete saved theme `id`. NEVER throws. */\n static remove(id: string): void {\n PrefStore.setAt(\n LIST_KEY,\n SavedTheme.list.filter((theme) => theme.id !== id)\n )\n }\n\n /** `name`, or with \" 2\", \" 3\" ... after it when a saved theme has it already (an import's, epic `debut` P25). */\n static freeName(name: string): string {\n const taken = new Set(SavedTheme.list.map((theme) => theme.name))\n if (!taken.has(name)) return name\n let count = 2\n while (taken.has(`${name} ${count}`)) count++\n return `${name} ${count}`\n }\n\n ////////////////\n // ## On the page\n ////////////////\n\n /**\n * Wear theme `base` on the page, then `css` over it (`EDITS_SHEET`): what the editor makes, or a saved theme.\n * - SIDE EFFECT: page-wide, every element on the page follows; replaces the sheet worn before.\n * - Calls racing: the LAST one wins (`putOnPage()` counts too), even when an earlier base loads later.\n * - Throws a `TypeError` when `base` isn't a theme (`UI.themes.apply()`).\n */\n static async wear(base: string, css: string): Promise<void> {\n const call = ++SavedTheme.calls\n const { themes, styles } = await UI.load()\n if (themes.current !== base) await themes.apply(base)\n if (call === SavedTheme.calls) styles.register(EDITS_SHEET, css, { page: true })\n }\n\n /**\n * Put `css` on the page as the edited theme's sheet, at once (`\"\"`: none); a pending `wear()` won't land.\n * - SIDE EFFECT: page-wide. The runtime must be in (`UI.styles`).\n */\n static putOnPage(css: string): void {\n SavedTheme.calls++\n UI.styles.register(EDITS_SHEET, css, { page: true })\n }\n\n /** Counts `wear()` and `putOnPage()` calls: only the last one's sheet lands. */\n private static calls = 0\n\n ////////////////\n // ## Internals\n ////////////////\n\n /** A new theme's id: the time and a few random letters, base 36. */\n private static newId(): string {\n return `${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`\n }\n\n /**\n * The one theme kept before P25 (`OLD_KEY`), moved in as the first of My themes, named after its base (`My Fruity`);\n * the old key forgotten, so this runs once.\n */\n private static moveOldTheme(): void {\n const old = PrefStore.getAt(OLD_KEY) as Partial<MyTheme> | undefined\n if (old === undefined) return\n PrefStore.setAt(OLD_KEY, undefined)\n if (typeof old.css !== \"string\" || typeof old.choices?.base !== \"string\") return\n const name = `My ${UIT.ThemeNames.titleOf(old.choices.base)}`\n const kept = PrefStore.getAt(LIST_KEY)\n const list = Array.isArray(kept) ? kept.filter(isMyTheme) : []\n PrefStore.setAt(LIST_KEY, [\n { id: SavedTheme.newId(), name, choices: { ...old.choices, name }, css: old.css },\n ...list\n ])\n E.Warnings.devWarn(\"SavedTheme\", `the theme kept in this browser is now \"${name}\", the first of My themes`)\n }\n}\n\n/** One of My themes: a theme the person made and saved by name. */\nexport type MyTheme = {\n /** made once, when it's first saved, and never changed: what the menu remembers (`mine:<id>`) */\n id: string\n /** what people call it; a rename changes only this */\n name: string\n /** what the editor made: its base theme, tint and colours ... */\n choices: UIT.ThemeChoices\n /** the sheet made from it, worn over its base */\n css: string\n}\n\n/** What `SavedTheme.save()` takes: a theme, its `id` when it's one already saved. */\nexport type SavedThemeInput = Omit<MyTheme, \"id\"> & { id?: string }\n\n/** Whether `value` reads as one of My themes. */\nfunction isMyTheme(value: unknown): value is MyTheme {\n const theme = value as Partial<MyTheme> | undefined\n return (\n typeof theme?.id === \"string\" &&\n typeof theme.name === \"string\" &&\n typeof theme.css === \"string\" &&\n typeof theme.choices?.base === \"string\"\n )\n}\n\n/** The `localStorage` key of My themes. */\nconst LIST_KEY = \"spell-ui:themes\"\n\n/** The key of the ONE theme a browser kept before P25. */\nconst OLD_KEY = \"spell-ui:theme\"\n","/**\n * The types and constants of the theme menu's family: what the component (`UIThemeMenu`),\n * its list (`ThemeMenu`) and the remembered pick (`ThemePreference`) share.\n * - Pure data: `import type` only (and one key, from a file with no code), so node can load it (`yarn site:data`).\n * A constant only one class reads sits below that class.\n */\n\n// Import directly: the scheme's key, with no pref store\nimport { COLOR_SCHEME_KEY } from \"spell/util/persist/persist.types\"\nimport type { UIT } from \"spell/ui/core\"\nimport type { themeMenuVocabulary } from \"./UIThemeMenu.en\"\n\n////////////////\n// ## Element\n////////////////\n\n/** `themeMenuVocabulary`'s type. */\nexport type ThemeMenuVocabulary = typeof themeMenuVocabulary\n\n/** A text key of `<ui-theme-menu>` (`themeMenuVocabulary.texts`). */\nexport type ThemeMenuTextKey = ThemeMenuVocabulary[\"texts\"][number][\"key\"]\n\n/** Looks up a text by key, with `{param}`s filled in (the component's `translationForKey()`). */\nexport type ThemeMenuText = (key: ThemeMenuTextKey, params?: Record<string, string | number>) => string\n\n/** `show`: which controls render. */\nexport type ThemeMenuShow = \"both\" | \"theme\" | \"scheme\" | \"menu\"\n\n/** `ui-changed`'s detail. */\nexport type ThemeMenuChange = {\n /** the theme chosen, a `UI.themes` name */\n theme: string\n /** its tint, one of Spell UI's colours; none: the theme as it is */\n tint?: UIT.ThemeHue\n /** the chosen scheme; `system`: following the OS */\n scheme: SchemeChoice\n /** the scheme the page shows: `scheme`, or the OS's while following it */\n shown: ShownScheme\n /** what the viewer did */\n originalEvent?: Event\n}\n\n////////////////\n// ## The theme and scheme chosen\n////////////////\n\n/**\n * Every colour scheme the menu offers (`ThemePreference`), in the order it shows them:\n * - `light` / `dark`: `ui-light` / `ui-dark` on `<html>`, and the same `color-scheme` inline\n * - `system`: neither, so `color-scheme: light dark` follows the OS\n */\nexport const SchemeChoices = [\"light\", \"dark\", \"system\"] as const\n/** One of `SchemeChoices`, e.g. `\"system\"`. */\nexport type SchemeChoice = (typeof SchemeChoices)[number]\n\n/** The scheme the page SHOWS: `system` resolved through the OS (`prefers-color-scheme`). */\nexport type ShownScheme = Exclude<SchemeChoice, \"system\">\n\n/** The theme, its tint and the scheme chosen now (`ThemePreference.chosen`). */\nexport type ThemeAndScheme = {\n /** a `UI.themes` name, one of `UI.themes.own` (`spell`, `fruity` ...) */\n readonly theme: string\n /** the chosen scheme; `system` follows the OS */\n readonly scheme: SchemeChoice\n /** the theme's tint (epic `debut` P23): one of Spell UI's colours; none: the theme as it is */\n readonly tint?: UIT.ThemeHue\n}\n\n/**\n * The tints a theme leaves out of its row, by theme: each a colour that can't read on it, light or dark, as its\n * primary or its page (`colors.contrast.test.ts` works them out, and fails while this differs).\n */\nexport const TINTS_LEFT_OUT: Readonly<Record<string, readonly UIT.ThemeHue[]>> = {}\n\n/** The theme a person who never picked one sees, in every place: Glass (epic `debut` Q39). */\nexport const DEFAULT_THEME = \"glass\"\n\n/**\n * Where a page keeps the person's theme and scheme (`ThemePreference.keptIn`):\n * - `space`: their space, through the page server (`THEME_STORE`), with this browser's copy for first paint\n * - `browser`: this browser alone (the read-only public build, with no page server)\n */\nexport type ThemeKeptIn = \"space\" | \"browser\"\n\n/**\n * The store the person's theme and scheme are kept in, in their space: `@spell/owen@/__prefs/spell-site.json5`,\n * keys `theme` and `scheme` (`light`, `dark` or `system`).\n * - The same store the browser's copy names (`THEME_KEYS`): `spell-site:theme`, `spell-site:scheme`.\n */\nexport const THEME_STORE = \"spell-site\"\n\n/**\n * `<html>` class `ThemePreference.applyScheme()` sets for one frame:\n * a theme turns transitions off under it (`spell.css`), so a scheme switch doesn't animate every colour.\n */\nexport const SCHEME_SWITCHING = \"ui-scheme-switching\"\n\n/**\n * `localStorage` keys of the browser's copy of the theme and scheme chosen (`ThemePreference`):\n * what the page draws before the person's space answers, and all there is without one.\n * - `scheme`: the kit's ONE key for every Spell site (`COLOR_SCHEME_KEY`, kept by `ColorScheme`):\n * `light` / `dark`, absent for `system` (follow the OS).\n * `<spell-site-header>` on the docs, epic pages and saga pages reads and writes it too.\n * - `theme`: a `UI.themes` name, absent for `DEFAULT_THEME`; every place's (epic `debut` P21).\n */\nexport const THEME_KEYS = { scheme: COLOR_SCHEME_KEY, theme: `${THEME_STORE}:theme` } as const\n\n/**\n * Each place's own theme key before epic `debut` P21: moved to `THEME_KEYS.theme` once, the first one found,\n * then every one removed (`ThemePreference`).\n * - Spell UI's pages', the epic pages', the editor's\n */\nexport const OLD_THEME_KEYS = [\"spell-ui-site:theme\", \"spell-epic:theme\", \"spell-app:theme\"] as const\n","// Import directly: in `core`'s util barrel the pref store cost every page 1.9 kB\nimport { ColorScheme } from \"spell/util/persist/ColorScheme\"\nimport { PrefStore } from \"spell/util/persist/PrefStore\"\nimport { ServerPlace } from \"spell/util/persist/ServerPlace\"\n// Import directly: only a page the page server didn't serve opens one\nimport { ReconnectingSocket } from \"spell/util/ReconnectingSocket\"\nimport {\n COLOR_SCHEME_KEY,\n OLD_COLOR_SCHEME_KEYS,\n PREF_SAVED_EVENT,\n PREF_SAVED_PAGE_EVENT,\n type PrefSaved\n} from \"spell/util/persist/persist.types\"\nimport { E, UI, UIT, type Themes } from \"spell/ui/core\"\n// Import directly: My themes, without the editor\nimport { SavedTheme } from \"spell/ui/components/ui-theme-editor/SavedTheme\"\nimport {\n DEFAULT_THEME,\n OLD_THEME_KEYS,\n SCHEME_SWITCHING,\n TINTS_LEFT_OUT,\n SchemeChoices,\n THEME_KEYS,\n THEME_STORE,\n type SchemeChoice,\n type ShownScheme,\n type ThemeAndScheme,\n type ThemeKeptIn\n} from \"./UIThemeMenu.types\"\n\n/** The query parameters a page's address says its theme and scheme in (`?theme=glass&scheme=dark`). */\nconst ADDRESS_PARAMS = { theme: \"theme\", scheme: \"scheme\" } as const\n\n/****************\n * ### `ThemePreference`\n * The theme (`UI.themes`) and colour scheme a person chose, re-applied on every page: ONE choice for every docs\n * page, and one for the editor (epic `debut` P21; the editor apart since epic `epic-engine` I204, Owen: \"the epic\n * engine pages should not share the theme with the running app\").\n * - `<ui-theme-menu>` changes it; a page's entry calls `restore()` once (Spell UI's site: `site/_src/site.ts`).\n * - Every docs page shares one: the epic pages and guides, Spell UI's, App UI's and the brand's pages. Pick a theme\n * in any one, and every other draws in it.\n * - The editor and its notebooks keep their own (`keepIn(..., \"spell-app\")`), the same way, in a store of their own.\n * - Kept in the person's SPACE (Owen: \"Take from user preference in space\"): the store `spell-site`\n * (`THEME_STORE`), a file beside their other preferences, `@spell/owen@/__prefs/spell-site.json5`:\n * `{ theme: \"glass\", scheme: \"dark\" }`, through the page server (`ServerPlace`, `/api/prefs`).\n * - `keptIn`: `space` on a page served by a page server that keeps them (`SPELL_SERVER.prefs`: the kit's, with the\n * app's routes), or one that says so (`keepIn()`: the editor, whose dev server passes `/api` on); else\n * `browser`, where the browser's copy (below) is all there is: the read-only public build, and a server with no\n * prefs (spell-epic's own, a demo check's), whose pages never ask it\n * - A change reaches open pages at once: the page server tells every page over its live channel\n * (`PREF_SAVED_EVENT`), and each asks again when it comes back into view.\n * - A same-origin FRAME of another page (the theme editor's previews, the brand index's thumbnails) keeps it in the\n * browser, never following the space: its framer dresses it.\n * - The browser's copy, `localStorage` (`THEME_KEYS`), through `PrefStore`: the last value seen,\n * so the page draws the right theme and scheme before the space answers. The space's value always wins.\n * - The old keys, each place's own before P21 (`OLD_THEME_KEYS`), are moved over once, and from there into the\n * space when it holds nothing yet.\n * - Theme: `DEFAULT_THEME` (Glass, epic `debut` Q39) until the person picks another,\n * one of Spell's own themes (`UI.themes.own`), in a tint (`glass:pink`, P23), or one of My themes (`mine:<id>`,\n * `SavedTheme`, P25): its base, then its sheet; one deleted since: the default.\n * - A theme remembered under its old name comes back as its new one (`studio` as `merlot`, `UIT.ThemeNames`).\n * - Any other name no longer in the set (Plain, Classic, a Fomantic theme, before epic `debut` P17):\n * the default, and forgotten.\n * - Scheme: the kit's `ColorScheme` (`spell/util/persist`), the one choice every Spell site shares\n * with `<spell-site-header>` on the docs, epic pages and saga pages:\n * its key, its old keys moved once, `ui-light` / `ui-dark` and inline `color-scheme` on `<html>`.\n * - Here, following the OS is called `system`.\n * - For the frame it switches in, `SCHEME_SWITCHING` is on `<html>` too:\n * a theme can turn transitions off under it.\n * - `system` follows the OS: `shownScheme()` resolves it (`ColorScheme.osScheme()`),\n * and `subscribe()`d listeners hear when the OS switches (the icon showing the scheme stays right).\n * - Other tabs' switches arrive the same way (`ColorScheme.watch()`).\n * - Before first paint: a module script runs too late,\n * so pages inline `HEAD_SCRIPT` in `<head>` (the page template, `templates/spell-ui-docs.html`).\n * - It re-applies the SCHEME synchronously.\n * - The THEME can't be: its sheet is a lazy chunk.\n * `restore()` starts that load as the site bundle evaluates, alongside the families' own chunks,\n * so it usually lands with their first render; page text may flash the default theme for a frame.\n * - Several menus on one page (the top bar's, a components page's masthead's)\n * stay in step through `subscribe()`.\n * - A nested `<ui-root theme>` draws its own scheme inside it, and never reads or writes this choice.\n * - Imports the core entry (`UI`, `spell/ui/core`), which the site entry loads anyway;\n * the runtime chunk (`UI.themes`) loads only to apply a theme.\n * - Static only: one theme and scheme per page.\n * - A page's ADDRESS can say its theme and scheme for this load: `?theme=glass&scheme=dark` (Owen: \"Have a\n * `?theme=x` for all pages which sets this?\"; `addressWith()` writes one, as the theme bench's ↗ does).\n * - It wins over the remembered choice, but is NEVER stored: the next page without it shows the remembered one,\n * and picking from the menu stores the pick as ever (and wins from then on).\n * - `theme`: a theme of the set, or one of its old names (`studio`); any other is ignored, with a warning.\n * - `scheme`: `light` or `dark`, read by `ColorScheme` (so the site header follows it too); any other is\n * ignored, with a warning. `HEAD_SCRIPT` reads it too.\n ****************/\nexport class ThemePreference {\n /** The theme a person who never picked one sees: `DEFAULT_THEME`, Glass, in every place. */\n static readonly defaultTheme: string = DEFAULT_THEME\n\n /**\n * Where the person's choice is kept: their `space` (and this browser's copy), or this `browser` alone.\n * - Until `keepIn()` says: `space` on a page served by a server that keeps them (`SPELL_SERVER.prefs`), else `browser`;\n * and `browser` in a same-origin frame of another page (the class doc), whose framer dresses it.\n */\n static get keptIn(): ThemeKeptIn {\n return (ThemePreference.kept ??= ThemePreference.serverKeepsPrefs && !isSameOriginFrame() ? \"space\" : \"browser\")\n }\n\n /**\n * Say where this page keeps the person's choice: e.g. the editor, which the page server didn't serve but whose\n * `/api` reaches it, `ThemePreference.keepIn(\"space\")`; its read-only public build, `\"browser\"`.\n * - `store`: the space's store it's kept in, default `THEME_STORE`, every docs page's; the editor keeps its own\n * (`\"spell-app\"`), so its theme and the docs pages' are two choices (Owen, 2026-11-03, epic `epic-engine` I204:\n * \"the epic engine pages should not share the theme with the running app\")\n * - Call before `restore()`.\n */\n static keepIn(keptIn: ThemeKeptIn, store: string = THEME_STORE): void {\n ThemePreference.kept = keptIn\n ThemePreference.store = store\n ThemePreference.spaced = undefined\n }\n\n /**\n * Inline `<head>` script re-applying the stored scheme before first paint, as `applyScheme()` does.\n * - The page template (`templates/spell-ui-docs.html`) inlines it, in `<head>` before the stylesheet `<link>`.\n * - ES5, no dependencies, never throws: so it reads the key raw, not through `PrefStore`,\n * whose text it matches (a scheme is kept as `dark`, unquoted).\n * - Reads the old keys too (`OLD_COLOR_SCHEME_KEYS`) while the new one is absent: `restore()` moves them over.\n * - Its keys are `ColorScheme`'s own constants; every page that inlines it holds a copy of its text.\n * - The address's `?scheme=light|dark` first, as `read()` takes it.\n */\n static readonly HEAD_SCRIPT =\n `try{var l=localStorage,d=document.documentElement,s=(/[?&]${ADDRESS_PARAMS.scheme}=(light|dark)(&|$)/.exec(location.search)||[])[1]||` +\n [COLOR_SCHEME_KEY, ...OLD_COLOR_SCHEME_KEYS].map((key) => `l.getItem(${JSON.stringify(key)})`).join(\"||\") +\n `;if(s===\"light\"||s===\"dark\"){d.classList.add(\"ui-\"+s);d.style.colorScheme=s}}catch(e){}`\n\n /** The theme and scheme chosen now: stored on first read, then kept in memory. */\n static get chosen(): ThemeAndScheme {\n return (ThemePreference.current ??= ThemePreference.read())\n }\n\n /** The scheme the OS asks for (`ColorScheme.osScheme()`); `light` where there's no `matchMedia` (a server). */\n static osScheme(): ShownScheme {\n return ColorScheme.osScheme()\n }\n\n /** The scheme the page SHOWS: the chosen one, or while following the OS, the OS's. */\n static shownScheme(scheme: SchemeChoice = ThemePreference.chosen.scheme): ShownScheme {\n return scheme === \"system\" ? ThemePreference.osScheme() : scheme\n }\n\n /**\n * Choose theme `name`: remember it, tell subscribers, apply it.\n * - Resolves once its sheets are registered.\n * - An old name is taken as its new one; a name no longer in the set is forgotten, for the default theme.\n */\n static async setTheme(name: string): Promise<void> {\n const tint = ThemePreference.tintFor(name, ThemePreference.chosen.tint)\n ThemePreference.update({ ...ThemePreference.chosen, theme: name, tint })\n ThemePreference.remember(name, tint)\n await ThemePreference.applyTheme(name)\n }\n\n /**\n * Choose tint `tint` for the theme chosen (`undefined`: none, the theme as it is): remember it with the theme as\n * one name (`glass:pink`), tell subscribers, wear it (epic `debut` P23).\n * - A tint the theme leaves out (`ThemePreference.tintsFor()`): none.\n * - Resolves once its sheet is on.\n */\n static async setTint(tint: UIT.ThemeHue | undefined): Promise<void> {\n const { theme } = ThemePreference.chosen\n const allowed = ThemePreference.tintFor(theme, tint)\n ThemePreference.update({ ...ThemePreference.chosen, tint: allowed })\n ThemePreference.remember(theme, allowed)\n await ThemePreference.applyTheme(theme)\n }\n\n /**\n * The tints theme `theme` offers: every one of Spell UI's colours (`UIT.ThemeHues`), by its own name, but those\n * that can't read on it, light or dark (`TINTS_LEFT_OUT`, from the contrast test).\n */\n static tintsFor(theme: string): readonly UIT.ThemeHue[] {\n // one of My themes: its colours are its own (epic `debut` P25)\n if (theme.startsWith(SavedTheme.PREFIX)) return []\n const leftOut = TINTS_LEFT_OUT[theme] ?? []\n return UIT.ThemeHues.filter((hue) => !leftOut.includes(hue))\n }\n\n /**\n * The text a theme and its tint are kept as: `glass:pink`; no tint, `glass` alone.\n * - and `pickOf()` reads one back\n */\n static pickText(theme: string, tint?: UIT.ThemeHue): string {\n return tint ? `${theme}${TINT_SEPARATOR}${tint}` : theme\n }\n\n /** A kept pick's theme and tint: `glass:pink` => `{ theme: \"glass\", tint: \"pink\" }`; a tint that isn't one, none. */\n static pickOf(text: string): { theme: string; tint?: UIT.ThemeHue } {\n if (text.startsWith(SavedTheme.PREFIX)) return { theme: text }\n const [theme = \"\", tint] = text.split(TINT_SEPARATOR)\n return UIT.ThemeHues.includes(tint as UIT.ThemeHue) ? { theme, tint: tint as UIT.ThemeHue } : { theme }\n }\n\n /** Choose colour scheme `scheme` (`system`: follow the OS): remember it, tell subscribers, show it on `<html>`. */\n static setScheme(scheme: SchemeChoice): void {\n ThemePreference.update({ ...ThemePreference.chosen, scheme })\n ThemePreference.withoutTransitions(document.documentElement)\n ColorScheme.choose(chosenFor(scheme))\n ThemePreference.saveToSpace(\"scheme\", scheme)\n }\n\n /** Flip the scheme the page shows, light <-> dark, and remember it (no longer following the OS). Returns it. */\n static flipScheme(): ShownScheme {\n const next = ThemePreference.shownScheme() === \"dark\" ? \"light\" : \"dark\"\n ThemePreference.setScheme(next)\n return next\n }\n\n /**\n * Show `scheme` on `root` (default `<html>`):\n * its `ui-light` / `ui-dark` class (the other one off) and the same inline `color-scheme`; `system`: neither.\n * - SIDE EFFECT: `SCHEME_SWITCHING` on `root` until the frame after next (`withoutTransitions()`).\n */\n static applyScheme(scheme: SchemeChoice, root: HTMLElement = document.documentElement): void {\n ThemePreference.withoutTransitions(root)\n ColorScheme.apply(chosenFor(scheme), root)\n }\n\n /**\n * Re-apply the stored theme and scheme: the scheme at once, the theme once its sheets load. Call once per page.\n * - Then asks the person's space (`keptIn`), and wears what it says, if that's another.\n * - SIDE EFFECTS: from then on, follows\n * - the OS's scheme and other tabs' switches (`watch()`)\n * - the space: every page's pick, as the page server tells it, and on coming back into view (`followSpace()`)\n */\n static async restore(): Promise<void> {\n const { theme, scheme } = ThemePreference.chosen\n ThemePreference.applyScheme(scheme)\n ThemePreference.watch()\n ThemePreference.followSpace()\n await ThemePreference.applyTheme(theme)\n await ThemePreference.askSpace()\n }\n\n /**\n * Take the person's choice from their space: wear its theme and scheme, where they're not the ones shown.\n * - The space holding nothing yet: what this browser had (its copy, or a place's old key) is saved there, once.\n * - Resolves once it's worn; nothing when this page keeps its choice in the browser (`keptIn`).\n * - NEVER throws: a space that can't be reached (`ServerPlace` logs) leaves the browser's copy.\n */\n static async askSpace(): Promise<void> {\n const store = ThemePreference.spaceStore\n if (!store) return\n try {\n const [theme, scheme] = await Promise.all([store.load(\"theme\"), store.load(\"scheme\")])\n // the space holds nothing yet: this browser's pick, if it made one, moves there (the old keys' too)\n if (theme === undefined) ThemePreference.saveToSpace(\"theme\", ThemePreference.picked())\n if (scheme === undefined) ThemePreference.saveToSpace(\"scheme\", schemeOf(PrefStore.getAt(COLOR_SCHEME_KEY)))\n await ThemePreference.took({ theme, scheme })\n } catch (error) {\n console.error(\"ThemePreference.askSpace(): couldn't wear the space's theme\", error)\n }\n }\n\n /**\n * Call `listener` with the theme and scheme on every change --\n * and when the OS switches scheme, since the scheme the page shows changed (`shownScheme()`);\n * returns the unsubscribe.\n * - SIDE EFFECT: starts watching the OS and other tabs (`watch()`), once.\n */\n static subscribe(listener: (chosen: ThemeAndScheme) => void): () => void {\n ThemePreference.watch()\n ThemePreference.listeners.add(listener)\n return () => {\n ThemePreference.listeners.delete(listener)\n }\n }\n\n /**\n * The OS switched scheme: tell listeners, since the scheme the page shows changed while following it.\n * - Called by the `prefers-color-scheme` watch (`watch()`); public for tests, which can't switch the OS.\n */\n static osChanged(): void {\n ThemePreference.tell(ThemePreference.chosen)\n }\n\n /**\n * Make this page wear theme `name` itself, whatever is chosen, from now on; `undefined`: the one chosen again.\n * - Its menu still chooses, and remembers, for what the page shows of OTHER places, never for the page itself.\n * - e.g. the theme editor (`<ui-theme-editor>`, epic `debut` P24): its own bar and column stay Fruity while it\n * previews pages in another theme (Owen, Q40: \"Make outer theme \\\"fruity\\\"\"); framed, the Spell editor wears\n * the theme previewed in it, never remembered.\n * - The scheme isn't worn: the page still shows the one chosen.\n */\n static async wear(name: string | undefined): Promise<void> {\n ThemePreference.worn = name\n await ThemePreference.applyTheme(ThemePreference.chosen.theme)\n }\n\n /**\n * `address` with `theme` and `scheme` in its query (`?theme=glass&scheme=dark`): a page opened at it shows in\n * them, whatever its viewer chose there, without storing them (see the class doc).\n * - A relative `address` is read against this page's; what comes back is a full one.\n */\n static addressWith(address: string, { theme, scheme }: { theme?: string; scheme?: ShownScheme }): string {\n const url = new URL(address, typeof location === \"undefined\" ? \"http://localhost\" : location.href)\n if (theme) url.searchParams.set(ADDRESS_PARAMS.theme, theme)\n if (scheme) url.searchParams.set(ADDRESS_PARAMS.scheme, scheme)\n return url.href\n }\n\n /**\n * Another page saved the person's pick (`PrefSaved`, from the page server's live channel):\n * wear it, if it's the theme or scheme and not the one shown.\n * - Public for tests and for a page with no live client of its own; `followSpace()` calls it.\n * - NEVER throws.\n */\n static async heard(saved: PrefSaved): Promise<void> {\n if (saved.store !== ThemePreference.store) return\n if (saved.key === \"theme\" || saved.key === \"scheme\") await ThemePreference.took({ [saved.key]: saved.value })\n }\n\n /** Forget the in-memory theme and scheme, the address's and where they're kept (tests): the next read goes back to them. */\n static reset(): void {\n ThemePreference.current = undefined\n ThemePreference.store = THEME_STORE\n ThemePreference.addressed = undefined\n ThemePreference.kept = undefined\n ThemePreference.spaced = undefined\n ColorScheme.rereadAddress()\n }\n\n ////////////////\n // ## Internals\n ////////////////\n\n /** The theme and scheme in memory; `undefined` until first read. */\n @E.state private static accessor current: ThemeAndScheme | undefined = undefined\n\n /** The theme this page's address says (`?theme=`), read once; never stored. Its scheme is `ColorScheme`'s. */\n private static addressed: { theme?: string } | undefined\n\n /** The address's theme, read on first use. */\n private static get fromAddress(): { theme?: string } {\n if (ThemePreference.addressed) return ThemePreference.addressed\n const params = new URLSearchParams(typeof location === \"undefined\" ? \"\" : location.search)\n return (ThemePreference.addressed = { theme: params.get(ADDRESS_PARAMS.theme) || undefined })\n }\n\n /** One of My themes' sheets is on the page, put there by `applyTheme()`: taken off when another theme's chosen. */\n private static isWearingMine = false\n\n /** The theme the page wears whatever is chosen (`wear()`); `undefined`: the one chosen. */\n private static worn: string | undefined\n\n /** Where the choice is kept, once said (`keepIn()`) or first read (`keptIn`). */\n private static kept: ThemeKeptIn | undefined\n\n /** The space's store the choice is kept in (`keepIn()`): every docs page's, unless the page says another. */\n private static store = THEME_STORE\n\n /** The space's store, made on first use (`spaceStore`); `null`: none on this page. */\n private static spaced: PrefStore | null | undefined\n\n /** Did the page server serve this page? It says so in `window.SPELL_SERVER`. */\n private static get servedPage(): boolean {\n return typeof window !== \"undefined\" && !!(window as { SPELL_SERVER?: unknown }).SPELL_SERVER\n }\n\n /**\n * Does the server that served this page keep the person's prefs (`/api/prefs`)? It says so in\n * `window.SPELL_SERVER.prefs` (the app's route module); a server without them never gets asked.\n */\n private static get serverKeepsPrefs(): boolean {\n return typeof window !== \"undefined\" && !!(window as { SPELL_SERVER?: { prefs?: boolean } }).SPELL_SERVER?.prefs\n }\n\n /** The person's store in their space (`store`, `ServerPlace`), or `undefined`: kept in the browser. */\n private static get spaceStore(): PrefStore | undefined {\n if (ThemePreference.spaced === undefined)\n ThemePreference.spaced =\n ThemePreference.keptIn === \"space\" ? new PrefStore(ThemePreference.store, { place: ServerPlace.shared }) : null\n return ThemePreference.spaced ?? undefined\n }\n\n /** Keep theme `theme` and tint `tint` as this browser's copy, and in the space: one text (`pickText()`). */\n private static remember(theme: string, tint: UIT.ThemeHue | undefined): void {\n const text = ThemePreference.pickText(theme, tint)\n PrefStore.setAt(THEME_KEYS.theme, text === ThemePreference.defaultTheme ? undefined : text)\n ThemePreference.saveToSpace(\"theme\", text)\n }\n\n /** `tint`, if theme `theme` offers it (`tintsFor()`); else none. */\n private static tintFor(theme: string, tint: UIT.ThemeHue | undefined): UIT.ThemeHue | undefined {\n return tint && ThemePreference.tintsFor(theme).includes(tint) ? tint : undefined\n }\n\n /**\n * Keep `value` at `key` in the person's space, when this page keeps its choice there.\n * - Not waited on: the page already shows it. NEVER throws: `ServerPlace` logs a failure.\n */\n private static saveToSpace(key: \"theme\" | \"scheme\", value: string | undefined): void {\n const store = ThemePreference.spaceStore\n if (!store || value === undefined) return\n // not waited on: the page already wears it; the page server tells the other pages\n void store.save(key, value).catch((error: unknown) => console.error(\"ThemePreference: couldn't save\", error))\n }\n\n /**\n * Wear `theme` and `scheme`, from the space or another page, where they're readable and not what's shown:\n * kept as this browser's copy too. `undefined`: that one's unchanged.\n * - The address's theme and scheme still win for this visit.\n */\n private static async took({ theme, scheme }: { theme?: unknown; scheme?: unknown }): Promise<void> {\n if (isSchemeChoice(scheme) && scheme !== ThemePreference.chosen.scheme) {\n ThemePreference.withoutTransitions(document.documentElement)\n ColorScheme.remember(chosenFor(scheme))\n ThemePreference.update({ ...ThemePreference.chosen, scheme: ColorScheme.chosen() ?? \"system\" })\n }\n if (typeof theme !== \"string\" || !theme) return\n PrefStore.setAt(THEME_KEYS.theme, theme === ThemePreference.defaultTheme ? undefined : theme)\n const pick = ThemePreference.pickOf(theme)\n const { chosen } = ThemePreference\n if (ThemePreference.fromAddress.theme || (pick.theme === chosen.theme && pick.tint === chosen.tint)) return\n ThemePreference.update({ ...chosen, ...pick, tint: pick.tint })\n await ThemePreference.applyTheme(pick.theme)\n }\n\n /**\n * Follow the space, once per page: every page's pick as the page server tells it, and the space again each time\n * the page comes back into view (a message missed while asleep).\n * - A page the page server served hears it from its live client (`PREF_SAVED_PAGE_EVENT`);\n * one it didn't (the editor) opens the live channel itself (`listenLive()`).\n * - Page-wide for the page's life: nothing to undo.\n */\n @E.once private static followSpace(): void {\n if (!ThemePreference.spaceStore || typeof document === \"undefined\") return\n if (ThemePreference.servedPage)\n addEventListener(\n PREF_SAVED_PAGE_EVENT,\n (event) => void ThemePreference.heard((event as CustomEvent<PrefSaved>).detail)\n )\n else ThemePreference.listenLive()\n document.addEventListener(\"visibilitychange\", () => {\n if (document.visibilityState === \"visible\") void ThemePreference.askSpace()\n })\n }\n\n /**\n * Open the page server's live channel (`/api/server/live`) and hear its saved prefs: for a page it didn't serve,\n * whose `/api` reaches it (the editor's dev server passes the socket on).\n * - Closed (the server restarted): it comes back by itself (`ReconnectingSocket`).\n */\n private static listenLive(): void {\n new ReconnectingSocket(LIVE_CHANNEL, {\n onMessage(text) {\n const { event, data } = JSON.parse(text) as { event: string; data: PrefSaved }\n if (event === PREF_SAVED_EVENT) void ThemePreference.heard(data)\n }\n })\n }\n\n /** `subscribe()`d listeners. */\n private static readonly listeners = new Set<(chosen: ThemeAndScheme) => void>()\n\n /**\n * Once per page, through `ColorScheme.watch()`:\n * - tell listeners when the OS switches scheme (the shown scheme changed while following it)\n * - take other tabs' scheme switches: ColorScheme applied it, this keeps the pair in step\n * - page-wide for the page's life: nothing to undo\n */\n @E.once private static watch(): void {\n ColorScheme.watch((change) => {\n if (change === \"os\") return ThemePreference.osChanged()\n ThemePreference.update({ ...ThemePreference.chosen, scheme: ColorScheme.chosen() ?? \"system\" })\n })\n }\n\n /**\n * Put `SCHEME_SWITCHING` on `root` until the frame after next:\n * the first frame paints the new scheme with transitions off, the second turns them back on.\n * - A second switch meanwhile just ends it a frame early.\n */\n private static withoutTransitions(root: Element): void {\n if (typeof requestAnimationFrame !== \"function\") return\n root.classList.add(SCHEME_SWITCHING)\n E.beforeNextPaint(() => E.beforeNextPaint(() => root.classList.remove(SCHEME_SWITCHING)))\n }\n\n /** Set the theme and scheme in memory and tell subscribers, if they changed. */\n private static update(chosen: ThemeAndScheme): void {\n const old = ThemePreference.chosen\n ThemePreference.current = chosen\n if (old.theme === chosen.theme && old.scheme === chosen.scheme && old.tint === chosen.tint) return\n ThemePreference.tell(chosen)\n }\n\n /** Call every listener with `chosen`. */\n private static tell(chosen: ThemeAndScheme): void {\n for (const listener of [...ThemePreference.listeners]) listener(chosen)\n }\n\n /**\n * Apply theme `name` with `UI.themes` (the runtime loaded now, if need be), in the tint chosen; the one worn\n * instead, if any (`wear()`), as it is.\n * - Only a theme of the set (`UI.themes.own`):\n * an old name is chosen again as its new one, anything else as the default theme.\n * - The tint's sheet is the theme editor's (`ThemeDraft.tintCss()`), loaded only when one is chosen.\n */\n private static async applyTheme(name: string): Promise<void> {\n const { themes } = await UI.load()\n const known = ThemePreference.knownName(themes, name)\n if (known !== name && name === ThemePreference.fromAddress.theme)\n return ThemePreference.applyAddressed(themes, name)\n if (known !== name) return ThemePreference.setTheme(known)\n // one of My themes (`mine:<id>`, epic `debut` P25): its base, then its sheet\n const mine = ThemePreference.worn ? undefined : SavedTheme.picked(name)\n if (mine) {\n ThemePreference.isWearingMine = true\n return SavedTheme.wear(mine.choices.base, mine.css)\n }\n if (ThemePreference.isWearingMine) {\n ThemePreference.isWearingMine = false\n SavedTheme.putOnPage(\"\")\n }\n const { tint } = ThemePreference.chosen\n if (ThemePreference.worn || !tint) return themes.apply(ThemePreference.worn ?? name)\n const { ThemeDraft } = await import(\"spell/ui/components/ui-theme-editor/ThemeDraft\")\n await themes.apply(name, { tint: ThemeDraft.tintCss(name, tint) })\n }\n\n /**\n * The address's theme, `name`, isn't one of the set as it's written: its new name, if it's an old one; else\n * ignored, with a warning, for the remembered theme. Neither is stored.\n */\n private static async applyAddressed(themes: Themes, name: string): Promise<void> {\n const now = UIT.ThemeNames.nameNow(themes, name)\n const isKnown = themes.own.includes(now)\n if (!isKnown) E.Warnings.warn(\"ThemePreference\", `the address's theme \\`${name}\\` isn't a theme; ignored`)\n ThemePreference.addressed = { ...ThemePreference.fromAddress, theme: isKnown ? now : undefined }\n const theme = ThemePreference.read().theme\n ThemePreference.update({ ...ThemePreference.chosen, theme })\n await ThemePreference.applyTheme(theme)\n }\n\n /**\n * `name` as a theme of the set: itself, its new name (`studio` => `merlot`),\n * or, no longer a theme (`classic`, a Fomantic theme), the default theme.\n */\n private static knownName(themes: Themes, name: string): string {\n if (SavedTheme.picked(name)) return name\n const now = UIT.ThemeNames.nameNow(themes, name)\n return themes.own.includes(now) ? now : ThemePreference.defaultTheme\n }\n\n /**\n * The theme and scheme: the address's, else the stored ones (the scheme's, `ColorScheme`'s); anything unreadable is the default (`defaultTheme`,\n * `system`).\n */\n private static read(): ThemeAndScheme {\n const { theme, tint } = ThemePreference.pickOf(ThemePreference.fromAddress.theme || ThemePreference.stored().theme)\n return { theme, scheme: ColorScheme.chosen() ?? \"system\", ...(tint && { tint }) }\n }\n\n /**\n * The theme this browser's copy holds (`THEME_KEYS.theme`), else the default.\n * - SIDE EFFECT: while it holds none, moves an old key's theme over, once (`OLD_THEME_KEYS`).\n */\n private static stored(): { theme: string } {\n return { theme: ThemePreference.picked() ?? ThemePreference.defaultTheme }\n }\n\n /** The theme this browser's copy holds, an old key's moved over first (`stored()`); `undefined`: none picked. */\n private static picked(): string | undefined {\n return textAt(THEME_KEYS.theme) ?? ThemePreference.moveOldKeys()\n }\n\n /**\n * Move the theme from each place's old key (`OLD_THEME_KEYS`):\n * the first one found is kept under `THEME_KEYS.theme`, and every old key removed, so this runs once.\n * - Returns the theme moved, else `undefined`.\n */\n private static moveOldKeys(): string | undefined {\n let found: string | undefined\n for (const key of OLD_THEME_KEYS) {\n found ??= textAt(key)\n PrefStore.setAt(key, undefined)\n }\n if (found) PrefStore.setAt(THEME_KEYS.theme, found)\n return found\n }\n}\n\n/** What joins a theme and its tint, kept as one text: `glass:pink` (`ThemePreference.pickText()`). */\nconst TINT_SEPARATOR = \":\"\n\n/** The page server's live channel, as a page it didn't serve opens it (the kit's `LiveReload.events`). */\nconst LIVE_CHANNEL = \"/api/server/live\"\n\n/** The text kept at `key` (`spell-site:theme`), or `undefined`: none, or not text. */\nfunction textAt(key: string): string | undefined {\n const value = PrefStore.getAt(key)\n return typeof value === \"string\" && value ? value : undefined\n}\n\n/** `value` when it's a scheme kept in the browser (`light` / `dark`), else `undefined`: following the OS. */\nfunction schemeOf(value: unknown): ShownScheme | undefined {\n return value === \"light\" || value === \"dark\" ? value : undefined\n}\n\n/** Is `value` a scheme choice (`light`, `dark`, `system`)? */\nfunction isSchemeChoice(value: unknown): value is SchemeChoice {\n return SchemeChoices.includes(value as SchemeChoice)\n}\n\n/**\n * Is this page in a frame of a page on its own origin (the theme editor's previews)? Its framer dresses it.\n * - A cross-origin framer (VS Code's side bar) can't be read: not one.\n */\nfunction isSameOriginFrame(): boolean {\n try {\n return typeof window !== \"undefined\" && window.parent !== window && !!window.frameElement\n } catch {\n return false\n }\n}\n\n/** `scheme` as `ColorScheme` keeps it: `system` is nothing chosen. */\nfunction chosenFor(scheme: SchemeChoice): ShownScheme | undefined {\n return scheme === \"system\" ? undefined : scheme\n}\n","/*\n * The dots of `HueDropdown` (epic `debut` I94): Spell UI's colours as a `<ui-dropdown>`, each option a dot and a name.\n * - Adopted by its owners' shadow roots (the theme menu, the theme editor), where the dropdown's options live:\n * `<span class=\"hue-dot <hue> | none | halves\">`, in each `<ui-item>` and in the button (`.hue-chosen`).\n * - A dot in its hue (`--_hue`); none: a slashed circle (Owen: \"(/) is 'None'\"), or the theme's own colour in\n * light and dark halves (`--_hue-light`, `--_hue-dark`).\n */\n\n@layer ui.components.hue-dropdown.content {\n .hue-dot {\n display: inline-block;\n flex: none;\n box-sizing: border-box;\n inline-size: 0.875em;\n block-size: 0.875em;\n margin-inline-end: 0.5em;\n border-radius: 50%;\n background: var(--_hue);\n box-shadow: inset 0 0 0 1px light-dark(#0000001f, #ffffff38);\n /* measured: its centre on the line box's, beside the name (an option's row; the button centres it by flex) */\n vertical-align: -0.055em;\n }\n\n /* none, in the theme's own colour: its light and dark halves */\n .hue-dot.halves {\n background: linear-gradient(90deg, var(--_hue-light) 50%, var(--_hue-dark) 50%);\n }\n\n /* none, with no colour: a slashed circle */\n .hue-dot.none {\n background: linear-gradient(135deg, transparent 43%, var(--ui-text-muted) 43% 57%, transparent 57%);\n box-shadow: inset 0 0 0 1.5px var(--ui-text-muted);\n }\n\n /* the button: the chosen dot and name on one line */\n .hue-chosen {\n display: inline-flex;\n align-items: center;\n min-width: 0;\n }\n .hue-chosen > .hue-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import { For } from \"solid-js\"\nimport type { JSX } from \"@solidjs/web\"\n\nimport type { UIT } from \"spell/ui/core\"\n\nimport hueDropdownCSS from \"./HueDropdown.css?inline\"\n\n/****************\n * ### `HueDropdown`\n * Spell UI's colours as ONE `<ui-dropdown>`: each option a small dot in its colour, then its name; none first\n * (epic `debut` I94; Owen: \"Single dropdown menu with colors inside options. (/) is 'None'\").\n * - Its users: the theme menu's Tint, and the theme editor's colour rows (Primary, Secondary, Background).\n * It replaced `<ui-hue-swatches>`, a row of round swatches, in both.\n * - The first option is none: a slashed circle, or the theme's own colour (`noneColors`: its light and dark\n * halves); then each hue of `hues`, by its own name.\n * - The dropdown's button shows the chosen option the same way: its dot, then its name.\n * - Picking calls `onPick` with the hue (`undefined`: none); the dropdown's own `ui-changed` stops here.\n * - STATIC, no element of its own: its owner draws it in ITS shadow root (`draw()`), so the owner's style sheets\n * hold `HueDropdown.css` (the dots); its family imports `<ui-dropdown>` and `<ui-item>`.\n * - Not a function component: Spell UI's component folders draw only from classes (the lint guard).\n ****************/\nexport class HueDropdown {\n /** The dots' style sheet, for the owner's `elementSetup.styleSheets`. */\n static readonly css = hueDropdownCSS\n\n /** The value of its first option, None: no colour chosen (a property's `default` beside it). */\n static get noneValue(): string {\n return NONE_VALUE\n }\n\n /** The dropdown, its button and its options; `options`' functions are read where they're drawn, so they follow. */\n static draw(options: HueDropdownOptions): JSX.Element {\n const chosen = () => options.hues().find((hue) => hue === options.value())\n return (\n <ui-dropdown\n part={options.part}\n class={DROPDOWN_CLASS}\n selection=\"\"\n fluid=\"\"\n size={options.size}\n value={chosen() ?? NONE_VALUE}\n aria-label={options.label()}\n on-ui-changed={(event) => {\n event.stopPropagation()\n const value = String(event.detail.value)\n options.onPick(value === NONE_VALUE ? undefined : (value as UIT.ThemeHue), event)\n }}\n >\n <span slot=\"trigger\" class={CHOSEN_CLASS}>\n {HueDropdown.dot(chosen, options.noneColors)}\n <span class={NAME_CLASS}>{chosen() ? options.nameFor(chosen()!) : options.noneLabel()}</span>\n </span>\n <ui-item value={NONE_VALUE}>\n {HueDropdown.dot(() => undefined, options.noneColors)}\n {options.noneLabel()}\n </ui-item>\n <For each={options.hues()}>\n {(hue) => (\n <ui-item value={hue}>\n {HueDropdown.dot(() => hue)}\n {options.nameFor(hue)}\n </ui-item>\n )}\n </For>\n </ui-dropdown>\n )\n }\n\n /** One dot: `hue()` in its colour; none (`undefined`) in the theme's own halves, or a slashed circle. */\n private static dot(\n hue: () => UIT.ThemeHue | undefined,\n noneColors?: () => readonly string[] | undefined\n ): JSX.Element {\n const halves = () => {\n const [light, dark = light] = noneColors?.() ?? []\n return light ? `--_hue-light: ${light}; --_hue-dark: ${dark}` : undefined\n }\n return (\n <span\n class={[DOT_CLASS, hue() ?? (halves() ? HALVES_CLASS : NONE_CLASS)]}\n style={hue() ? `--_hue: var(--ui-${hue()})` : halves()}\n aria-hidden=\"true\"\n />\n )\n }\n}\n\n/** What `HueDropdown.draw()` draws: functions, read where they're drawn, so the dropdown follows them. */\nexport type HueDropdownOptions = {\n /** The hue chosen; `undefined` (or one not offered): none. */\n value: () => UIT.ThemeHue | undefined\n /** The hues offered, in order. */\n hues: () => readonly UIT.ThemeHue[]\n /** A hue's name, in the page's language (`Pink`). */\n nameFor: (hue: UIT.ThemeHue) => string\n /** The first option's name: what no colour means here (`None`, `Theme's own · #7c55e6`). */\n noneLabel: () => string\n /** The first option's colour, light and dark (`#7c55e6`, `#b39cff`): the theme's own; none: a slashed circle. */\n noneColors?: () => readonly string[] | undefined\n /** The dropdown's accessible name. */\n label: () => string\n /** A hue was picked (`undefined`: none), with the dropdown's `ui-changed`. */\n onPick: (hue: UIT.ThemeHue | undefined, event: Event) => void\n /** The dropdown's `part`. */\n part?: string\n /** The dropdown's `size` (`small`). Default: the dropdown's own. */\n size?: JSX.IntrinsicElements[\"ui-dropdown\"][\"size\"]\n}\n\n/** The none option's value: never a hue's name. */\nconst NONE_VALUE = \"none\"\n\n/** The dropdown's class word. */\nconst DROPDOWN_CLASS = \"hue-dropdown\"\n\n/** The class word of the button's content: the chosen option's dot and name. */\nconst CHOSEN_CLASS = \"hue-chosen\"\n\n/** The class word of the chosen option's name, in the button. */\nconst NAME_CLASS = \"hue-name\"\n\n/** A dot's class word. */\nconst DOT_CLASS = \"hue-dot\"\n\n/** The none dot with no colour: a slashed circle. */\nconst NONE_CLASS = \"none\"\n\n/** The none dot in the theme's own colour, light and dark halves. */\nconst HALVES_CLASS = \"halves\"\n","import type { PageDevice, PageSchemes } from \"./UIThemeEditor.types\"\n\n/****************\n * ### `BenchAddress`\n * The theme editor's view, kept in its page's ADDRESS (Owen: \"state of top tabs should be reflected in the URL bar,\n * so I can copy/paste the URL to someone else to look\"): `?theme=glass&scheme=both&swap=1&pages=epic,app&phone=1`.\n * - `theme`: the theme it builds on; the page's own theme menu reads the same one (`ThemePreference`)\n * - `scheme`: `light`, `dark` or `both`; `swap=1`: ⇄ on (with `both`)\n * - `pages`: the pages shown, in their order in the grid; `phone=1`: Phone on\n * - Read once, as the editor starts: what it says wins over what's remembered in the browser, and is never stored.\n * - Written with `history.replaceState()` as the view changes: no reload, no step in the history.\n * Other parameters in the address stay as they are.\n * - Static and DOM-only: no Solid, so it's read in the editor's field initializers.\n ****************/\nexport class BenchAddress {\n /** What this page's address says of the view; each part `undefined` where it says nothing (or on a server). */\n static read(): BenchView {\n if (typeof location === \"undefined\") return {}\n const params = new URLSearchParams(location.search)\n const scheme = params.get(PARAMS.scheme)\n const pages = params.get(PARAMS.pages)\n return {\n theme: params.get(PARAMS.theme) || undefined,\n schemes: SCHEMES.includes(scheme as PageSchemes) ? (scheme as PageSchemes) : undefined,\n isSwapped: params.has(PARAMS.swap) ? params.get(PARAMS.swap) === ON : undefined,\n pages: pages ? pages.split(\",\").filter(Boolean) : undefined,\n device: params.has(PARAMS.phone) ? (params.get(PARAMS.phone) === ON ? \"phone\" : \"desk\") : undefined\n }\n }\n\n /**\n * Put `view` in this page's address, in place (\\`history.replaceState()\\`); the same address again: nothing.\n * - Off switches are left out (`swap`, `phone`), so a link stays short.\n */\n static write(view: Required<BenchView>): void {\n if (typeof location === \"undefined\") return\n const url = new URL(location.href)\n url.searchParams.set(PARAMS.theme, view.theme)\n url.searchParams.set(PARAMS.scheme, view.schemes)\n BenchAddress.setOn(url, PARAMS.swap, view.isSwapped && view.schemes === \"both\")\n url.searchParams.set(PARAMS.pages, view.pages.join(\",\"))\n BenchAddress.setOn(url, PARAMS.phone, view.device === \"phone\")\n // commas read better than `%2C` in a link people copy\n const href = url.href.replace(/%2C/g, \",\")\n if (href !== location.href) history.replaceState(history.state, \"\", href)\n }\n\n /**\n * `address` opening the theme bench with only page `page` shown (\\`pages=app\\`), whatever else it says.\n * - The theme menu's Theme bench: \"start with only the section you came from visible\" (Owen).\n */\n static withPage(address: string, page: string): string {\n const url = new URL(address, typeof location === \"undefined\" ? \"http://localhost\" : location.href)\n url.searchParams.set(PARAMS.pages, page)\n return url.href\n }\n\n /** `name=1` on `url` while `isOn`, else none. */\n private static setOn(url: URL, name: string, isOn: boolean): void {\n if (isOn) url.searchParams.set(name, ON)\n else url.searchParams.delete(name)\n }\n}\n\n/** The view an address says: each part, or `undefined` where it says nothing. */\nexport type BenchView = {\n /** the theme it builds on */\n theme?: string\n /** Light, Dark or Both */\n schemes?: PageSchemes\n /** ⇄ */\n isSwapped?: boolean\n /** the pages shown, by id, in their order */\n pages?: string[]\n /** desk or phone */\n device?: PageDevice\n}\n\n/** The address's parameters. */\nconst PARAMS = { theme: \"theme\", scheme: \"scheme\", swap: \"swap\", pages: \"pages\", phone: \"phone\" } as const\n\n/** A switch that's on: `swap=1`. */\nconst ON = \"1\"\n\n/** The schemes the address may say. */\nconst SCHEMES: readonly PageSchemes[] = [\"light\", \"dark\", \"both\"]\n","import { type E, UIT } from \"spell/ui/core\"\nimport type { MyTheme } from \"spell/ui/components/ui-theme-editor/SavedTheme\"\nimport type { ThemeMenuText, ThemeMenuTextKey } from \"./UIThemeMenu.types\"\n\n/****************\n * ### `ThemeMenu`\n * What `<ui-theme-menu>` lists, and its text: plain data, no Solid, which tests drive directly.\n * - Entries: Spell's own themes (`UI.themes.own`: Spell, Glass, Fruity, Merlot, Paper, Midnight, Crisp, Pop, Matrix, Mockup), in that order,\n * each with its one-line description.\n * - Nothing else since epic `debut` P17: no Plain, no Classic, no Fomantic theme\n * (those are archived, `src/styles/themes/archive/`).\n * - Titles: `UIT.ThemeNames.titleOf()`, the theme editor's Start from's too.\n * - One per state of its inputs: the element remakes it when they change.\n ****************/\nexport class ThemeMenu {\n /** The themes to list (`UI.themes.own`). */\n readonly themes: readonly string[]\n\n /** Looks up the component's strings. */\n readonly text: ThemeMenuText\n\n /** My themes, the ones the person saved (`SavedTheme.list`), listed first. */\n readonly mine: readonly MyTheme[]\n\n constructor({ themes, text, mine = [] }: ThemeMenuProps) {\n this.themes = themes\n this.text = text\n this.mine = mine\n }\n\n /**\n * The list's entries: My themes first, under their heading, when there's one (epic `debut` P25, Owen's C6:\n * \"My themes, above spell's\"); then one per theme of Spell's, its title and description.\n * - One of My themes is `mine:<id>`, described by the theme it builds on.\n */\n get entries(): E.MenuEntry[] {\n const spells: E.MenuEntry[] = this.themes.map((name) => {\n const key = DESCRIPTIONS[name]\n return { value: name, text: this.titleFor(name), ...(key && { description: this.text(key) }) }\n })\n if (!this.mine.length) return spells\n const mine: E.MenuEntry[] = this.mine.map((theme) => ({\n value: `${MINE_PREFIX}${theme.id}`,\n text: theme.name,\n description: this.pickTitleFor(theme.choices.base, theme.choices.primary)\n }))\n return [{ type: \"header\", text: this.text(\"myThemes\") }, ...mine, { type: \"divider\", text: \"\" }, ...spells]\n }\n\n /** Display title of theme `name`: `merlot` => `Merlot`; one of My themes (`mine:<id>`), its name. */\n titleFor(name: string): string {\n if (name.startsWith(MINE_PREFIX)) {\n const theme = this.mine.find((kept) => `${MINE_PREFIX}${kept.id}` === name)\n if (theme) return theme.name\n }\n return UIT.ThemeNames.titleOf(name)\n }\n\n /** Theme `theme` in tint `tint`, as people read it: `Glass - Pink`; no tint, `Glass` (epic `debut` P23). */\n pickTitleFor(theme: string, tint?: UIT.ThemeHue): string {\n const title = this.titleFor(theme)\n return tint ? this.text(\"tinted\", { title, tint: this.text(tint) }) : title\n }\n\n /** The dropdown's text for chosen theme `theme` in tint `tint`: `Merlot theme`, `Glass - Pink theme`. */\n labelFor(theme: string, tint?: UIT.ThemeHue): string {\n return this.text(\"themeLabel\", { title: this.pickTitleFor(theme, tint) })\n }\n}\n\n/** Props of `new ThemeMenu()`. */\nexport type ThemeMenuProps = {\n /** the themes to list (`UI.themes.own`) */\n themes: readonly string[]\n /** the component's texts (`translationForKey()`) */\n text: ThemeMenuText\n /** My themes (`SavedTheme.list`): listed first; none, by default */\n mine?: readonly MyTheme[]\n}\n\n/** The prefix of one of My themes' names in the list: `mine:<id>` (`SavedTheme.PREFIX`; data, so it's here too). */\nconst MINE_PREFIX = \"mine:\"\n\n/**\n * Each theme's one-line description, by its text key.\n * - A theme of `UI.themes.own` that isn't here shows its title alone.\n */\nconst DESCRIPTIONS: Readonly<Record<string, ThemeMenuTextKey>> = {\n spell: \"spellDescription\",\n glass: \"glassDescription\",\n fruity: \"fruityDescription\",\n merlot: \"merlotDescription\",\n paper: \"paperDescription\",\n midnight: \"midnightDescription\",\n crisp: \"crispDescription\",\n pop: \"popDescription\",\n matrix: \"matrixDescription\",\n mockup: \"mockupDescription\"\n}\n","/**\n * The English vocabulary of `<ui-theme-menu>`: every name the tag uses.\n * - Its tag, attributes, events, slots, parts, states and texts.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Class words: `inverted` (`ui inverted themes`), for dark backgrounds.\n * - Pure data: `import type` only, so node loads it (`yarn site:data`, `yarn gen:root`).\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `themeMenuVocabulary`\n * The names of `<ui-theme-menu>`, a page's theme and light / dark, remembered per viewer:\n * - a palette button opening a small overlay with Light | Dark | Auto and Spell's themes\n * - or a theme dropdown, for a page's masthead\n * - or a sun / moon button alone\n * - or that overlay's panel alone, drawn in place in a sub-menu of another menu\n ****************/\nexport const themeMenuVocabulary = {\n tag: \"ui-theme-menu\",\n icon: \"palette\",\n topics: [\"controls\", \"selection\", \"menus\"],\n aka: [\"theme picker\", \"theme switcher\", \"dark mode toggle\", \"colour scheme\", \"appearance\", \"skin\"],\n skeleton: \"inline 5 x 2.25\",\n noun: \"themes\",\n description:\n \"A theme menu switches the page between light and dark, and picks its theme from Spell's own, and remembers \" +\n \"both for the next page.\",\n attributes: [\n {\n name: \"show\",\n kind: \"enum\",\n values: [\"both\", \"theme\", \"scheme\", \"menu\"],\n default: \"both\",\n description:\n \"Which controls to show: `both` (the palette button, whose overlay picks the theme and light / dark), \" +\n \"`scheme` (a light / dark button alone), `theme` (a theme dropdown) or `menu` (the overlay's panel alone, drawn \" +\n \"in place: the body of a sub-menu in another menu, which calls `focusChosen()` as it opens it).\"\n },\n {\n name: \"size\",\n kind: \"size\",\n description: \"Size of the buttons (or the dropdown), `mini` ... `massive`; `medium` is the default.\"\n },\n {\n name: \"inverted\",\n kind: \"keyOnly\",\n description: \"For dark backgrounds (a dark header or side panel): light buttons, an inverted dropdown.\"\n },\n {\n name: \"compact\",\n kind: \"keyOnly\",\n description:\n 'With `show=\"theme\"`: the dropdown is an icon-only palette button, its text (`Spell theme`) its tooltip ' +\n \"and name, for a masthead's row of icon buttons.\"\n },\n {\n name: \"bench\",\n kind: \"string\",\n description:\n \"Where the site with the theme bench starts (`http://127.0.0.1:4747`), for its Theme bench row, which opens \" +\n \"Spell UI's theme bench page there in a new window, in the theme chosen; none given: this page's own site; \" +\n \"`none`: no row.\"\n },\n {\n name: \"bench-page\",\n kind: \"string\",\n description:\n \"Which of the theme bench's pages it opens showing alone (`app`, `epic`, `ui`, `notebook`): the place \" +\n \"this menu is on; none given: read from the page's address, else `app`.\"\n }\n ],\n events: [\n {\n name: \"ui-changed\",\n detail:\n \"{ theme: string, tint?: string, scheme: 'light' | 'dark' | 'system', shown: 'light' | 'dark', originalEvent?: Event }\",\n description:\n \"The viewer picked a theme, a tint or a scheme here; `theme` is a `UI.themes` name, `tint` one of Spell UI's \" +\n \"colours (none: the theme as it is); \" +\n \"`scheme` is `system` while following the OS, and `shown` the scheme the page shows. Fired after the \" +\n \"choice is stored and while its sheets load.\"\n }\n ],\n slots: [\n {\n name: \"end\",\n description:\n \"At the foot of the palette's panel, under the themes and Theme bench: a row of the page's own, \" +\n \"e.g. the Spell editor's 'Edit theme...'. Styled as a theme's row. Not in the theme list's arrow keys.\"\n }\n ],\n parts: [\n { name: \"controls\", description: \"The wrapper around the controls.\" },\n {\n name: \"scheme\",\n description: 'The light / dark `<button>` (`show=\"scheme\"`): a sun or a moon, the scheme the page shows.'\n },\n { name: \"palette\", description: \"The `<button>` opening the overlay.\" },\n { name: \"overlay\", description: 'The overlay, a `<ui-popup open-on=\"click\">`; its box is `::part(popup)`.' },\n { name: \"menu\", description: \"The overlay's theme list (`role=menu`).\" },\n { name: \"option\", description: \"One theme in the list (`role=menuitemradio`).\" },\n { name: \"schemes\", description: \"The overlay's Light | Dark | Auto control (`role=radiogroup`).\" },\n { name: \"scheme-option\", description: \"One choice in it (`role=radio`): an icon and its name.\" },\n { name: \"tip\", description: 'A button\\'s tooltip, a `<ui-popup inverted size=\"mini\">`.' },\n { name: \"theme\", description: 'The theme `<ui-dropdown>` (`show=\"theme\"`).' },\n { name: \"bench\", description: \"The overlay's Theme bench row, a link opening it in a new window.\" },\n {\n name: \"tints\",\n description:\n \"Tint's dropdown, under the themes (`<ui-dropdown>`): None first, then every colour the chosen theme takes, \" +\n \"each a dot and its name.\"\n }\n ],\n states: [\n { name: \"dark\", description: \"The page shows the dark scheme (chosen, or the OS's while following it).\" },\n { name: \"following\", description: \"The scheme follows the OS (nothing chosen, or Auto).\" },\n { name: \"open\", description: \"The overlay is open.\" },\n { name: \"menu\", description: 'It draws its panel in place, inside a host\\'s menu (`show=\"menu\"`).' }\n ],\n texts: [\n { key: \"themeLabel\", text: \"{title} theme\", description: \"The dropdown's text: the chosen theme.\" },\n {\n key: \"themeName\",\n text: \"Theme\",\n description: \"Accessible name of the theme dropdown, and the overlay's header.\"\n },\n { key: \"spellDescription\", text: \"The Spell brand\", description: \"Under `Spell` in the list.\" },\n {\n key: \"glassDescription\",\n text: \"Translucent glass on a solid page\",\n description: \"Under `Glass` in the list.\"\n },\n { key: \"fruityDescription\", text: \"Glass on a pastel wallpaper\", description: \"Under `Fruity` in the list.\" },\n { key: \"merlotDescription\", text: \"A wine-dark studio\", description: \"Under `Merlot` in the list.\" },\n { key: \"paperDescription\", text: \"Warm and bookish, for reading\", description: \"Under `Paper` in the list.\" },\n { key: \"midnightDescription\", text: \"Dark first, calm and glowing\", description: \"Under `Midnight` in the list.\" },\n {\n key: \"crispDescription\",\n text: \"High contrast, for anyone who needs it\",\n description: \"Under `Crisp` in the list.\"\n },\n { key: \"popDescription\", text: \"Playful and colourful\", description: \"Under `Pop` in the list.\" },\n { key: \"matrixDescription\", text: \"A dark ops console\", description: \"Under `Matrix` in the list.\" },\n { key: \"mockupDescription\", text: \"A hand-drawn sketch\", description: \"Under `Mockup` in the list.\" },\n { key: \"toDark\", text: \"Switch to dark\", description: \"The light / dark button's name, while the page is light.\" },\n { key: \"toLight\", text: \"Switch to light\", description: \"The light / dark button's name, while the page is dark.\" },\n {\n key: \"palette\",\n text: \"Theme and light / dark: {title}, {scheme}\",\n description:\n \"The palette button's name and tooltip: the chosen theme and scheme (`light`, `dark` or `auto`'s text).\"\n },\n { key: \"overlayName\", text: \"Theme and colour scheme\", description: \"Accessible name of the overlay.\" },\n { key: \"schemeName\", text: \"Light or dark\", description: \"Accessible name of the overlay's scheme control.\" },\n { key: \"light\", text: \"Light\", description: \"The scheme control's light choice.\" },\n { key: \"dark\", text: \"Dark\", description: \"The scheme control's dark choice.\" },\n { key: \"auto\", text: \"Auto\", description: \"The scheme control's choice that follows the device's scheme.\" },\n { key: \"bench\", text: \"Theme bench\", description: \"The row opening the theme bench.\" },\n {\n key: \"benchTip\",\n text: \"Open the theme bench in a new window, in this theme\",\n description: \"Its tooltip.\"\n },\n {\n key: \"tinted\",\n text: \"{title} - {tint}\",\n description:\n \"A theme in a tint (epic `debut` P23), in the dropdown's text and the palette's name: `Glass - Pink`.\"\n },\n {\n key: \"myThemes\",\n text: \"My themes\",\n description: \"The heading of the themes the person saved, above Spell's (epic `debut` P25).\"\n },\n { key: \"tintName\", text: \"Tint\", description: \"Tint's heading, and its dropdown's accessible name.\" },\n { key: \"noTint\", text: \"None\", description: \"Tint's first option: the theme as it is.\" },\n { key: \"red\", text: \"Red\", description: \"A tint's name: the colour's.\" },\n { key: \"orange\", text: \"Orange\", description: \"A tint's name: the colour's.\" },\n { key: \"yellow\", text: \"Yellow\", description: \"A tint's name: the colour's.\" },\n { key: \"olive\", text: \"Olive\", description: \"A tint's name: the colour's.\" },\n { key: \"green\", text: \"Green\", description: \"A tint's name: the colour's.\" },\n { key: \"teal\", text: \"Teal\", description: \"A tint's name: the colour's.\" },\n { key: \"blue\", text: \"Blue\", description: \"A tint's name: the colour's.\" },\n { key: \"violet\", text: \"Violet\", description: \"A tint's name: the colour's.\" },\n { key: \"purple\", text: \"Purple\", description: \"A tint's name: the colour's.\" },\n { key: \"pink\", text: \"Pink\", description: \"A tint's name: the colour's.\" },\n { key: \"brown\", text: \"Brown\", description: \"A tint's name: the colour's.\" },\n { key: \"grey\", text: \"Grey\", description: \"A tint's name: the colour's.\" },\n { key: \"black\", text: \"Black\", description: \"A tint's name: the colour's.\" }\n ]\n} as const satisfies E.ComponentVocabulary\n","/*\n * The style sheet of `<ui-theme-menu>`: a page's theme and light / dark.\n * Compact by default: one quiet icon button, its overlay a small brand-styled panel\n * (the Spell design system's icon buttons, segmented controls and menus).\n * - It styles the component's shadow DOM: `<div class=\"ui [size] [inverted] themes\" part=\"controls\">`,\n * holding by `show`:\n * - `both`: `<button class=\"palette button\" part=\"palette\">`, then `<ui-popup class=\"overlay\" part=\"overlay\">`,\n * its tooltip `<ui-popup part=\"tip\">`\n * - the overlay's slotted `.panel`:\n * - `.schemes` (`role=radiogroup`) of three `<button class=\"choice [checked]\" role=\"radio\">`\n * (an icon, `.name`): Light | Dark | Auto, a segmented control\n * - a `.divider`, then `.heading`\n * - a `.menu` of `<button class=\"option [checked]\" role=\"menuitemradio\">` rows\n * (`.check`, `.name`, `.description`), with `.header` / `.divider` rows\n * - a `.divider`, then Tint: a `.heading` over `.tints`, ONE `<ui-dropdown class=\"hue-dropdown\" part=\"tints\">`\n * of the colours, each a dot and its name, None first (epic `debut` P23, I94; its dots: `HueDropdown.css`)\n * - a `.divider`, then `<a class=\"bench\" part=\"bench\">` (Theme bench), unless `bench=\"none\"`\n * - the `end` slot's rows, the page's own\n * - `scheme`: `<button class=\"scheme light|dark button\" part=\"scheme\">`,\n * holding `.light.glyph` (sun) and `.dark.glyph` (moon), stacked; the one matching the button's scheme shows.\n * Then its tooltip\n * - `theme`: the theme `<ui-dropdown part=\"theme\">` alone; its look is the dropdown's own, its menu's header Tint\n * (`.tints-header`: its heading and dropdown)\n * - `menu`: the overlay's `.panel` alone, drawn in place in a host's menu (`:state(menu)`):\n * no box of its own (the host's menu gives it), the rows in the host's text size\n * - Colours are foundation tokens (`--ui-surface`, `--ui-primary` ...), so every theme restyles it,\n * the Spell theme into the brand.\n * - The overlay's box is `<ui-popup>`'s `::part(popup)`, restyled with plain properties\n * (a sheet never declares another family's tokens).\n * - Public tokens (`--ui-theme-menu-*`) are never declared: each is read through a private alias\n * (`notes/theming.md` \"Component tokens\").\n */\n\n@layer ui.components.theme-menu.types, ui.components.theme-menu.content, ui.components.theme-menu.variations, ui.components.theme-menu.states;\n\n@layer ui.components.theme-menu.types {\n :host {\n display: inline-block;\n vertical-align: middle;\n }\n\n .ui.themes {\n /* Space between the controls. */\n --_ui-theme-menu-gap: var(--ui-theme-menu-gap, 0.25em);\n /* Diameter of the round buttons: 28px at 16px, a page header's other icon buttons. */\n --_ui-theme-menu-button-size: var(--ui-theme-menu-button-size, 1.75em);\n /* Width of the palette's overlay. */\n --_ui-theme-menu-overlay-width: var(--ui-theme-menu-overlay-width, 17em);\n /* Corner radius of the overlay; its rows round to a bit less, so they nest. */\n --_ui-theme-menu-overlay-radius: var(--ui-theme-menu-overlay-radius, 14px);\n /*\n * Corners of a row inside the overlay (a theme, the Light | Dark | Auto track): the overlay's,\n * inside its 1px border and its padding (`0.375em` of its text), so they nest\n */\n --_theme-menu-row-radius: calc(var(--_ui-theme-menu-overlay-radius) - 1px - 0.375em);\n /* How long the sun / moon swap takes. */\n --_ui-theme-menu-swap-duration: var(--ui-theme-menu-swap-duration, 280ms);\n /* The chosen scheme's raised key in the segmented control: its drop shadow. */\n --_ui-theme-menu-choice-shadow: var(--ui-theme-menu-choice-shadow, 0 1px 2px oklch(0 0 0 / 0.16));\n /* Ink of the `inverted` buttons (for dark backgrounds): their fill, ring and icon are it, translucent. */\n --_ui-theme-menu-inverted-ink: var(--ui-theme-menu-inverted-ink, oklch(1 0 0));\n\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--_ui-theme-menu-gap);\n font-size: calc(var(--ui-font-size) * var(--ui-scale, 1));\n }\n}\n\n@layer ui.components.theme-menu.content {\n /* Tint's dropdown, under its heading: as far in as the theme rows' names */\n .panel > .tints {\n margin: 0 0.5em 0.25em;\n }\n\n /* ... and in the theme dropdown's menu, at its top */\n .tints-header {\n padding: 0.25em 0.75em 0.5em;\n }\n .tints-header > .heading {\n padding-inline: 0;\n }\n\n /* The dropdown takes what's left on a narrow row. */\n [part~=\"theme\"] {\n flex: 0 1 auto;\n min-width: 0;\n }\n\n /*\n * ## Round icon buttons (`.palette`, `.scheme`): quiet, as a page header's other icons\n * no fill or ring at rest, a faint fill under the pointer\n * (Owen: \"lose ring around hamburger, search, pallette icons\")\n */\n\n .button {\n position: relative;\n display: inline-grid;\n flex: none;\n place-items: center;\n box-sizing: border-box;\n width: var(--_ui-theme-menu-button-size);\n height: var(--_ui-theme-menu-button-size);\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: 50%;\n background: transparent;\n color: var(--ui-text-muted);\n font: inherit;\n line-height: 1;\n cursor: var(--ui-control-cursor);\n -webkit-tap-highlight-color: transparent;\n }\n .button:hover {\n background: color-mix(in oklab, currentColor 10%, transparent);\n color: var(--ui-text-color);\n }\n .button:focus-visible {\n outline: var(--ui-focus-width, 2px) solid var(--ui-focus-color);\n outline-offset: var(--ui-focus-offset, 2px);\n }\n .button:active {\n scale: 0.94;\n }\n .glyph {\n display: grid;\n grid-area: 1 / 1;\n place-items: center;\n width: 1em;\n height: 1em;\n font-size: 1em;\n pointer-events: none;\n }\n\n /* The scheme button: both glyphs stacked, the shown scheme's in front; the other shrunk, faded and blurred. */\n .scheme .glyph {\n opacity: 0;\n scale: 0.25;\n filter: blur(4px);\n }\n .light.button .light.glyph,\n .dark.button .dark.glyph {\n opacity: 1;\n scale: 1;\n filter: blur(0);\n }\n\n /* ## The overlay: a small rounded panel on the page's surface */\n\n .overlay::part(popup) {\n box-sizing: border-box;\n width: var(--_ui-theme-menu-overlay-width);\n max-width: calc(100vw - 16px);\n padding: 0.375em;\n border: 1px solid var(--ui-border-color);\n border-radius: var(--_ui-theme-menu-overlay-radius);\n background: var(--ui-surface);\n box-shadow: var(--ui-shadow-floating);\n color: var(--ui-text-color);\n font-size: calc(var(--ui-font-size) * 0.875);\n line-height: 1.3;\n transform-origin: top right;\n }\n .panel {\n display: flex;\n flex-direction: column;\n gap: 1px;\n }\n .heading,\n .menu > .header {\n padding: 0.5em 0.75em 0.375em;\n color: var(--ui-text-muted);\n font-family: var(--ui-font-family-mono, ui-monospace, monospace);\n font-size: 0.75em;\n font-weight: 500;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n }\n .menu > .header {\n padding-top: 0.25em;\n }\n .menu {\n display: flex;\n flex-direction: column;\n gap: 1px;\n max-height: min(24em, 55vh);\n overflow-y: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n }\n .divider {\n flex: none;\n height: 1px;\n margin: 0.375em 0.5em;\n background: var(--ui-border-color);\n }\n /* Theme bench, then the `end` slot's rows, the page's own: a theme's row each, the first under a divider. */\n .panel > .bench,\n .panel > slot::slotted(*) {\n /* a theme's row's columns: its icon where a row's check is, its words where its name is */\n display: grid;\n grid-template-columns: 1.125em minmax(0, 1fr);\n column-gap: 0.5em;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n margin: 0;\n padding: 0.5em 0.625em;\n border: 0;\n border-radius: var(--_theme-menu-row-radius);\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: start;\n cursor: var(--ui-control-cursor);\n }\n /* the divider above the first, as `.divider` draws one: inset 0.5em, 0.375em from what's above and below */\n .panel:not(:has(> .bench)) > slot::slotted(:first-child) {\n margin-block-start: 0.375em;\n padding-block-start: calc(0.5em + 0.375em);\n background-image: linear-gradient(var(--ui-border-color), var(--ui-border-color));\n background-position: center top;\n background-size: calc(100% - 1em) 1px;\n background-repeat: no-repeat;\n }\n .panel > .bench {\n text-decoration: none;\n }\n .panel > .bench > ui-icon {\n --ui-icon-width: 1.125em;\n --ui-icon-distance: 0;\n }\n .panel > .bench:hover,\n .panel > slot::slotted(:hover) {\n background-color: var(--ui-surface-muted);\n }\n\n /*\n * Light | Dark | Auto: three keys on a sunken track, the chosen one raised.\n * - the track as far in as the theme rows (the overlay's padding), so its corners nest in the overlay's\n */\n .schemes {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 2px;\n margin: 0 0 0.125em;\n padding: 2px;\n border-radius: var(--_theme-menu-row-radius);\n background: var(--ui-surface-strong);\n }\n .choice {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.375em;\n box-sizing: border-box;\n min-width: 0;\n margin: 0;\n padding: 0.4em 0.375em;\n border: 0;\n border-radius: calc(var(--_theme-menu-row-radius) - 2px);\n background: transparent;\n color: var(--ui-text-muted);\n font: inherit;\n font-weight: 500;\n cursor: var(--ui-control-cursor);\n }\n .choice:hover {\n color: var(--ui-text-color);\n }\n .choice:focus-visible {\n outline: 2px solid var(--ui-focus-color);\n outline-offset: -2px;\n }\n .choice > .name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* One theme: check, name, and the one-line description under it. */\n .option {\n box-sizing: border-box;\n width: 100%;\n margin: 0;\n padding: 0.5em 0.625em;\n border: 0;\n border-radius: var(--_theme-menu-row-radius);\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: start;\n cursor: var(--ui-control-cursor);\n }\n .option {\n display: grid;\n grid-template-columns: 1.125em minmax(0, 1fr);\n column-gap: 0.5em;\n align-items: center;\n }\n .option:hover {\n background: var(--ui-surface-muted);\n }\n /* A thin ring inside the row: the theme's focus width (3px in Spell) is too heavy on a small list. */\n .option:focus-visible {\n outline: 2px solid var(--ui-focus-color);\n outline-offset: -2px;\n }\n .option > .check {\n display: grid;\n place-items: center;\n color: var(--ui-primary-text);\n font-size: 0.857em;\n opacity: 0;\n }\n /* Beside both lines of a described row (an undescribed one stays one line). */\n .option:has(> .description) > .check {\n grid-row: 1 / span 2;\n }\n .option > .name {\n grid-column: 2;\n overflow: hidden;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .option > .description {\n grid-column: 2;\n color: var(--ui-text-muted);\n font-size: 0.857em;\n }\n\n /* Tooltips: the palette's hides while its overlay is open. */\n [part~=\"tip\"].muted {\n display: none;\n }\n}\n\n@layer ui.components.theme-menu.variations {\n /* For dark backgrounds: white ink, quiet as the plain buttons; a faint white fill under the pointer. */\n .ui.inverted.themes .button {\n color: oklch(from var(--_ui-theme-menu-inverted-ink) l c h / 0.8);\n }\n .ui.inverted.themes .button:hover {\n background: oklch(from var(--_ui-theme-menu-inverted-ink) l c h / 0.14);\n color: var(--_ui-theme-menu-inverted-ink);\n }\n}\n\n@layer ui.components.theme-menu.states {\n .option.checked {\n background: color-mix(in oklch, var(--ui-primary) 10%, transparent);\n }\n .option.checked:hover {\n background: color-mix(in oklch, var(--ui-primary) 15%, transparent);\n }\n .option.checked > .check {\n opacity: 1;\n }\n .option.checked > .name {\n color: var(--ui-primary-text);\n }\n .choice.checked {\n background: var(--ui-surface);\n box-shadow:\n var(--_ui-theme-menu-choice-shadow),\n inset 0 0 0 1px var(--ui-border-color);\n color: var(--ui-text-color);\n }\n\n /*\n * Motion: the sun / moon swap, the scheme keys, the buttons' press.\n * - The swap is interfaces.dev's: scale 0.25 -> 1, opacity, blur 4px -> 0, the old one reversed.\n * - Named properties only; none at all under reduced motion.\n * - The swap's `!important`: the Spell theme turns EVERY transition off for the frame a scheme switch lands in\n * (`html.ui-scheme-switching`, `transition: none !important` in `ui.theme`),\n * which is exactly the frame this swap starts in.\n * An `!important` in an EARLIER layer wins over a later layer's, so this one keeps it;\n * `reset.css`'s reduced-motion `!important` sits earlier still, and still wins.\n */\n @media (prefers-reduced-motion: no-preference) {\n .scheme .glyph {\n transition:\n opacity var(--_ui-theme-menu-swap-duration) var(--ui-ease-out, ease-out),\n scale var(--_ui-theme-menu-swap-duration) var(--ui-ease-out, ease-out),\n filter var(--_ui-theme-menu-swap-duration) var(--ui-ease-out, ease-out) !important;\n }\n .button {\n transition:\n background-color var(--ui-duration-fast, 100ms) ease-out,\n box-shadow var(--ui-duration-fast, 100ms) ease-out,\n color var(--ui-duration-fast, 100ms) ease-out,\n scale var(--ui-duration-fast, 100ms) ease-out;\n }\n .option {\n transition: background-color var(--ui-duration-fast, 100ms) ease-out;\n }\n .choice {\n transition:\n background-color var(--ui-duration-normal, 200ms) ease-out,\n box-shadow var(--ui-duration-normal, 200ms) ease-out,\n color var(--ui-duration-fast, 100ms) ease-out;\n }\n }\n}\n\n/*\n * `show=\"menu\"`: the panel in place, the body of a host menu's sub-menu\n * - as wide as the host gives it, in its text size; no padding, border or shadow: the host's box has them\n * - the rows' corners as in the overlay\n */\n@layer ui.components.theme-menu.variations {\n :host(:state(menu)) {\n display: block;\n }\n :host(:state(menu)) .ui.themes {\n display: block;\n font-size: inherit;\n line-height: 1.3;\n }\n}\n\n/*\n * `compact`: the theme dropdown as an icon-only palette button,\n * the quiet round icon button of a masthead's row: no caret, no fill until hovered\n * - The dropdown's box is a button (`UIButton.css`), so it takes the button's tokens.\n */\n@layer ui.components.theme-menu.variations {\n [part~=\"theme\"].compact {\n --ui-button-background: transparent;\n --ui-button-background-hover: color-mix(in oklab, currentColor 10%, transparent);\n --ui-button-background-down: color-mix(in oklab, currentColor 16%, transparent);\n --ui-button-color: var(--ui-text-muted);\n --ui-button-color-hover: var(--ui-text-color);\n --ui-button-padding-block: 0.55em;\n --ui-button-padding-inline: 0.55em;\n --ui-button-radius: 50%;\n --ui-button-box-shadow: none;\n }\n [part~=\"theme\"].compact::part(icon) {\n display: none;\n }\n}\n","import { For, Show } from \"solid-js\"\nimport { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UI, UIT } from \"spell/ui/core\"\n// Import directly: the theme editor's barrel would load the editor\nimport { BenchAddress } from \"spell/ui/components/ui-theme-editor/BenchAddress\"\nimport { ThemeMenu } from \"./ThemeMenu\"\nimport { ThemePreference } from \"./ThemePreference\"\nimport { HueDropdown } from \"./HueDropdown\"\n// Import directly: My themes, without the editor\nimport { SavedTheme, type MyTheme } from \"spell/ui/components/ui-theme-editor/SavedTheme\"\nimport {\n DEFAULT_THEME,\n SchemeChoices,\n type SchemeChoice,\n type ShownScheme,\n type ThemeAndScheme,\n type ThemeMenuChange,\n type ThemeMenuShow,\n type ThemeMenuText,\n type ThemeMenuVocabulary\n} from \"./UIThemeMenu.types\"\nimport { themeMenuVocabulary } from \"./UIThemeMenu.en\"\n\nimport themeMenuCSS from \"./UIThemeMenu.css?inline\"\n\n/****************\n * ### `<ui-theme-menu>`\n * The component behind `<ui-theme-menu>`: a page's theme and light / dark, picked from Spell's own themes.\n * - Every place shows the same menu (epic `debut` P17): the editor, the epic pages and guides, Spell UI's pages.\n * One pick for all of them, kept in the person's space (`ThemePreference`, epic `debut` P21).\n *\n * - Its shadow DOM: `<div class=\"ui [size] [inverted] themes\" part=\"controls\">`, holding by `show`:\n * - `both` (the default): ONE round icon button, compact enough for a side column or a phone's top bar\n * - `<button part=\"palette\">` opens `<ui-popup part=\"overlay\" open-on=\"click\">`, a small panel with\n * - Light | Dark | Auto, a segmented control (`role=radiogroup` of `radio`s, `part=\"schemes\"`):\n * the scheme the viewer CHOSE, Auto while it follows the OS\n * - the theme list (`role=menu` of `menuitemradio`s, the chosen one checked):\n * Spell's own themes (`UI.themes.own`), each with its one-line description (`ThemeMenu`)\n * - under a divider, \"Theme bench\" (`<a part=\"bench\">`): the theme bench, in a new window, in the theme\n * chosen (`bench`; Owen: \"Add \\\"theme bench\\\" link to theme dropdown, opens in new window\")\n * - the `end` slot's rows, the page's own (the Spell editor's \"Edit theme...\")\n * - its tooltip, `<ui-popup part=\"tip\" inverted size=\"mini\">` (hidden while the overlay is open)\n * - Until epic `debut` (Owen, 2026-10-23: \"Merge day/night buttons into the theme picker\") a sun / moon\n * button stood beside it, and the overlay had a \"Match system\" switch.\n * - `scheme`: the sun / moon button alone, `<button part=\"scheme\">`, with its tooltip:\n * a sun on a light page, a moon on a dark one (the scheme the page SHOWS: the OS's, while following it).\n * - A click flips it and stores it (no longer following the OS).\n * - The icons cross-fade: the new one grows from a quarter, un-blurring; the old one the reverse.\n * - `theme`: a theme `<ui-dropdown part=\"theme\" floating scrolling button>`, for a page's masthead.\n * - Its rows are `<ui-item>` children; its text goes in its `trigger` slot.\n * - Its last, under a divider: Theme bench, opening it as the palette's row does (not a theme: never chosen).\n * - `menu`: the overlay's panel alone, drawn in place, for a sub-menu of another menu (an epic page's gear menu).\n * - Light | Dark | Auto, the theme list, Theme bench (unless `bench=\"none\"`) and the `end` slot, as in the overlay\n * - No palette button, no overlay, no tooltip: the host's menu gives the box, its border and shadow.\n * - The host calls `focusChosen()` as it opens the sub-menu.\n * - ArrowLeft / ArrowRight / Escape in the list are left to the host (closing its sub-menu).\n * - `:state(menu)`; the rows take the host's text size.\n * - The theme bench is Spell UI's docs page, on the site `bench` names (the Spell editor: the page server's\n * address), else this page's own (a worktree's pages: the worktree's bench); `bench=\"none\"`: no row.\n * - It's opened with the theme chosen in its address (`ThemePreference.addressWith()`), so it opens as this page\n * shows, and only the bench's page for this place on (`pages=epic`, `benchPageId`; `BenchAddress.withPage()`).\n * - The theme and scheme themselves are `ThemePreference`'s\n * (one pair per page, remembered per viewer, the scheme shared with every Spell site's header).\n * - Picking calls `ThemePreference.setTheme()` / `setScheme()` / `flipScheme()`,\n * then fires ONE `ui-changed` (the dropdown's own is stopped).\n * - Every menu on the page follows any menu's change, and the OS's while following it\n * (`subscribe()`, while connected).\n * - Keyboard, in the overlay: focus moves to the chosen theme as it opens.\n * - In the theme list: arrows / Home / End move (one tab stop, a roving `tabindex`);\n * Enter / Space / a click pick (the overlay stays open, to compare)\n * - Shift+Tab reaches the scheme control: arrows move AND choose, as in any radio group (one tab stop)\n * - Escape closes the overlay, and focus goes back to the palette button (`UI.overlays`).\n * - Its shadow DOM is built of `<ui-popup>`, `<ui-icon>`, `<ui-dropdown>` and `<ui-item>`, which its barrel imports.\n * - Reads the themes and their titles from Spell UI's theme list (`UI.themes`), never a site's data:\n * so it works on any page.\n ****************/\nexport class UIThemeMenu extends E.UIComponent<ThemeMenuVocabulary> {\n @E.proto static vocabulary = themeMenuVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { \"theme-menu\": themeMenuCSS, \"hue-dropdown\": HueDropdown.css },\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n ////////////////\n // ## The theme and scheme chosen\n ////////////////\n\n /**\n * The page's theme and scheme, as last chosen by any menu.\n * - A copy of `ThemePreference.chosen`, kept in step by `follow()`: that one isn't reactive.\n */\n @E.state accessor chosen: ThemeAndScheme = isServer ? SERVER_CHOICE : ThemePreference.chosen\n\n /** The scheme the OS asks for: what the page shows while following it; a copy, as `chosen`. */\n @E.state accessor osScheme: ShownScheme = isServer ? \"light\" : ThemePreference.osScheme()\n\n /** The scheme the page shows: the chosen one, or the OS's while following it. */\n get shownScheme(): ShownScheme {\n const { scheme } = this.chosen\n return scheme === \"system\" ? this.osScheme : scheme\n }\n\n /** The chosen theme's name. */\n get chosenTheme(): string {\n return this.chosen.theme\n }\n\n /** The page shows the dark scheme: `:state(dark)`. */\n @E.cssState(\"dark\")\n get isDark(): boolean {\n return this.shownScheme === \"dark\"\n }\n\n /** The scheme follows the OS: `:state(following)`. */\n @E.cssState(\"following\")\n get followsSystem(): boolean {\n return this.chosen.scheme === \"system\"\n }\n\n /**\n * Follow `ThemePreference` while connected:\n * catch up on connect (another menu, or the OS, may have changed them meanwhile),\n * unsubscribe on disconnect.\n */\n @E.whileConnected\n protected followPreference() {\n this.follow(ThemePreference.chosen)\n return ThemePreference.subscribe((chosen) => this.follow(chosen))\n }\n\n /** Take `chosen`, the OS's scheme and My themes now. */\n private follow(chosen: ThemeAndScheme): void {\n this.chosen = chosen\n this.osScheme = ThemePreference.osScheme()\n this.myThemes = SavedTheme.list\n }\n\n /** My themes (`SavedTheme.list`), listed first (epic `debut` P25): read again on connect, on change, as it opens. */\n @E.state accessor myThemes: readonly MyTheme[] = isServer ? [] : SavedTheme.list\n\n ////////////////\n // ## Choosing\n ////////////////\n\n /** Choose theme `name`, as the viewer did with `event`. */\n async chooseTheme(name: string, event?: Event): Promise<void> {\n const applied = ThemePreference.setTheme(name)\n this.emitChange(event)\n await applied\n }\n\n /** Choose tint `tint` for the theme chosen (`undefined`: none), as the viewer did with `event`. */\n async chooseTint(tint: UIT.ThemeHue | undefined, event?: Event): Promise<void> {\n if (tint === ThemePreference.chosen.tint) return\n const applied = ThemePreference.setTint(tint)\n this.emitChange(event)\n await applied\n }\n\n /** Flip the scheme the page shows, light <-> dark, as the viewer did with `event`. */\n flipScheme(event?: Event): void {\n ThemePreference.flipScheme()\n this.emitChange(event)\n }\n\n /** Choose scheme `scheme` (`system`: follow the OS), as the viewer did with `event`; the same one again: nothing. */\n chooseScheme(scheme: SchemeChoice, event?: Event): void {\n if (scheme === ThemePreference.chosen.scheme) return\n ThemePreference.setScheme(scheme)\n this.emitChange(event)\n }\n\n ////////////////\n // ## The theme bench\n ////////////////\n\n /** The theme bench's address, with the theme chosen in it; `undefined`: no row (`bench=\"none\"`, or a server). */\n get benchAddress(): string | undefined {\n const given = this.bench as string | undefined\n if (given === NO_BENCH || isServer) return undefined\n const site = given?.replace(/\\/$/, \"\") ?? WORKTREE_ROOT.exec(location.pathname)?.[0] ?? \"\"\n const address = site + BENCH_PATH\n return BenchAddress.withPage(ThemePreference.addressWith(address, { theme: this.chosenTheme }), this.benchPageId)\n }\n\n /**\n * The bench's page for the place this menu is on, shown alone as the bench opens (Owen: \"start with only the\n * section you came from visible ... Default to `app`\"): `bench-page`, else from this page's address.\n * - an epic page (`/epics/`): `epic`; Spell UI's docs (`/components/`): `ui`; the Spell UI site's notebooks\n * (`/guides/SpellUI`): `notebook`; anywhere else: `app`\n */\n get benchPageId(): string {\n const given = this.benchPageAttribute\n if (given) return given\n const path = isServer ? \"\" : location.pathname\n return BENCH_PLACES.find(([pattern]) => pattern.test(path))?.[1] ?? DEFAULT_BENCH_PAGE\n }\n\n /** `bench-page`, as written. */\n private get benchPageAttribute(): string | undefined {\n return (this.attributes[\"bench-page\"] ?? undefined) || undefined\n }\n\n /** Open the theme bench in a new window. */\n openBench(): void {\n const address = this.benchAddress\n if (address) window.open(address, BENCH_TARGET, \"noopener\")\n }\n\n /** Fire `ui-changed` with the theme and scheme now. */\n private emitChange(originalEvent?: Event): void {\n const { theme, scheme, tint } = ThemePreference.chosen\n const detail: ThemeMenuChange = {\n theme,\n ...(tint && { tint }),\n scheme,\n shown: ThemePreference.shownScheme(),\n originalEvent\n }\n this.send(\"ui-changed\", detail)\n }\n\n ////////////////\n // ## The theme menu\n ////////////////\n\n /** `translationForKey()` as a plain function, for `ThemeMenu`. */\n readonly texts: ThemeMenuText = (key, params) => this.translationForKey(key, params)\n\n /**\n * What the list / dropdown shows: Spell's own themes (`UI.themes.own`).\n * - Read only once the runtime has loaded (`render()` waits for it): `UI.themes` exists only then.\n */\n @E.derived\n get themeMenu(): ThemeMenu {\n return new ThemeMenu({ themes: UI.themes.own, text: this.texts, mine: this.myThemes })\n }\n\n /**\n * Which controls show: `show`, else `both`.\n * - Not `this.show` alone: an empty or unknown `show` converts to `undefined`, which shows `both`.\n */\n private get shownControls(): ThemeMenuShow {\n return (this.show as ThemeMenuShow | undefined) ?? \"both\"\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n render(): JSX.Element {\n return (\n <div class={this.rootClass} part={this.partForName(\"controls\")}>\n <Show when={this.shownControls === \"theme\"}>{this.dropdown()}</Show>\n <Show when={this.shownControls === \"both\"}>{this.palette()}</Show>\n <Show when={this.shownControls === \"scheme\"}>{this.schemeButton()}</Show>\n <Show when={this.isMenu}>{this.panel()}</Show>\n </div>\n )\n }\n\n /** It draws its panel in place, in a host's menu (`show=\"menu\"`): `:state(menu)`. */\n @E.cssState(\"menu\")\n get isMenu(): boolean {\n return this.shownControls === \"menu\"\n }\n\n /** The sun / moon button and its tooltip. */\n private schemeButton(): JSX.Element {\n const next = () =>\n this.shownScheme === \"dark\" ? this.translationForKey(\"toLight\") : this.translationForKey(\"toDark\")\n return (\n <>\n <button\n type=\"button\"\n class={[\n SCHEME_CLASS,\n BUTTON_CLASS,\n { light: this.shownScheme === \"light\", dark: this.shownScheme === \"dark\" }\n ]}\n part={this.partForName(\"scheme\")}\n aria-label={next()}\n onClick={(event) => this.flipScheme(event)}\n >\n <For each={ShownSchemes}>\n {(scheme) => (\n <span class={[scheme, GLYPH_CLASS]} aria-hidden=\"true\">\n <ui-icon name={SCHEME_ICONS[scheme]} padding=\"none\" />\n </span>\n )}\n </For>\n </button>\n <ui-popup part={this.partForName(\"tip\")} inverted=\"\" size={MINI} position={TIP_POSITION}>\n {next()}\n </ui-popup>\n </>\n )\n }\n\n /** The palette button, its tooltip and the overlay. */\n private palette(): JSX.Element {\n const label = () =>\n this.translationForKey(\"palette\", {\n title: this.themeMenu.pickTitleFor(this.chosenTheme, this.chosen.tint),\n scheme: this.translationForKey(SCHEME_TEXTS[this.chosen.scheme])\n })\n return (\n <>\n <button\n type=\"button\"\n id={IDS.palette}\n class={[PALETTE_CLASS, BUTTON_CLASS]}\n part={this.partForName(\"palette\")}\n aria-label={label()}\n >\n <span class={GLYPH_CLASS} aria-hidden=\"true\">\n <ui-icon name={PALETTE_ICON} padding=\"none\" />\n </span>\n </button>\n <ui-popup\n part={this.partForName(\"overlay\")}\n class={OVERLAY_CLASS}\n open-on=\"click\"\n appearance=\"basic\"\n position=\"bottom right\"\n aria-label={this.translationForKey(\"overlayName\")}\n ref={(popup: HTMLElement) => this.wireOverlay(popup)}\n >\n {this.panel()}\n </ui-popup>\n <ui-popup\n part={this.partForName(\"tip\")}\n for={IDS.palette}\n inverted=\"\"\n size={MINI}\n position={TIP_POSITION}\n class={this.isOpen ? MUTED_CLASS : undefined}\n >\n {label()}\n </ui-popup>\n </>\n )\n }\n\n /**\n * The panel: Light | Dark | Auto, the theme list, Theme bench and the `end` slot.\n * - The overlay's content (`both`), or drawn in place in a host's menu (`menu`).\n */\n private panel(): JSX.Element {\n return (\n <div class={PANEL_CLASS}>\n {this.schemes()}\n <div class={DIVIDER_CLASS} role=\"separator\" />\n <div class={HEADING_CLASS} id={IDS.heading}>\n {this.translationForKey(\"themeName\")}\n </div>\n <div\n class={MENU_CLASS}\n part={this.partForName(\"menu\")}\n role={MENU_ROLES.menu}\n aria-labelledby={IDS.heading}\n onKeyDown={(event) => this.onMenuKey(event)}\n >\n <For each={this.themeMenu.entries}>{(entry) => this.entry(entry)}</For>\n </div>\n <Show when={ThemePreference.tintsFor(this.chosenTheme).length}>\n <div class={DIVIDER_CLASS} role=\"separator\" />\n </Show>\n {this.tints()}\n <Show when={this.benchAddress}>\n <div class={DIVIDER_CLASS} role=\"separator\" />\n <a\n class={BENCH_CLASS}\n part={this.partForName(\"bench\")}\n href={this.benchAddress}\n target={BENCH_TARGET}\n rel=\"noopener\"\n title={this.translationForKey(\"benchTip\")}\n >\n <ui-icon name={BENCH_ICON} aria-hidden=\"true\" padding=\"none\" />\n <span class={NAME_CLASS}>{this.translationForKey(\"bench\")}</span>\n </a>\n </Show>\n <slot name={this.slotForName(\"end\")} />\n </div>\n )\n }\n\n /**\n * Tint (epic `debut` P23): a header, as the themes' \"Theme\", over ONE dropdown of the colours the theme chosen\n * takes (`ThemePreference.tintsFor()`), each a dot and its name, None first (`HueDropdown`).\n * - Owen (epic `debut` I94): \"Should have section header `Tint` like `Theme`. Single dropdown menu with colors\n * inside options. (/) is 'None'.\" Until then, a row of round swatches (`<ui-hue-swatches>`).\n * - One of My themes: its colours are its own, no Tint.\n */\n private tints(): JSX.Element {\n const tints = () => ThemePreference.tintsFor(this.chosenTheme)\n return (\n <Show when={tints().length}>\n <div class={HEADING_CLASS}>{this.translationForKey(\"tintName\")}</div>\n <div class={TINTS_CLASS}>\n {HueDropdown.draw({\n part: this.partForName(\"tints\"),\n size: TINT_SIZE,\n value: () => this.chosen.tint,\n hues: tints,\n nameFor: (hue) => this.translationForKey(hue),\n noneLabel: () => this.translationForKey(\"noTint\"),\n label: () => this.translationForKey(\"tintName\"),\n onPick: (tint, event) => void this.chooseTint(tint, event)\n })}\n </div>\n </Show>\n )\n }\n\n /** Light | Dark | Auto: the overlay's segmented control, a radio group (arrows move and choose). */\n private schemes(): JSX.Element {\n return (\n <div\n class={SCHEMES_CLASS}\n part={this.partForName(\"schemes\")}\n role={SCHEME_ROLES.group}\n aria-label={this.translationForKey(\"schemeName\")}\n onKeyDown={(event) => this.onSchemeKey(event)}\n >\n <For each={SchemeChoices}>\n {(scheme) => {\n const isChosen = () => this.chosen.scheme === scheme\n return (\n <button\n type=\"button\"\n class={[SCHEME_OPTION_CLASS, { checked: isChosen() }]}\n part={this.partForName(\"scheme-option\")}\n role={SCHEME_ROLES.item}\n value={scheme}\n aria-checked={isChosen() ? \"true\" : \"false\"}\n tabindex={isChosen() ? 0 : -1}\n onClick={(event) => this.chooseScheme(scheme, event)}\n >\n <ui-icon name={SCHEME_CHOICE_ICONS[scheme]} aria-hidden=\"true\" padding=\"none\" />\n <span class={NAME_CLASS}>{this.translationForKey(SCHEME_TEXTS[scheme])}</span>\n </button>\n )\n }}\n </For>\n </div>\n )\n }\n\n /**\n * Arrow keys in the scheme control: move AND choose, wrapping, as in any radio group; Home / End to the ends.\n * - The chosen scheme is the tab stop, drawn by `schemes()` (`tabindex: \"left alone\"`).\n */\n private onSchemeKey(event: KeyboardEvent): void {\n UI.focus.arrowKey(event, {\n container: event.currentTarget as HTMLElement,\n items: SCHEME_SELECTOR,\n orientation: \"both\",\n tabindex: \"left alone\",\n onChange: (_option, index) => this.chooseScheme(SchemeChoices[index]!, event)\n })\n }\n\n /** One row of the overlay's list: a theme (or a divider or a header, which `ThemeMenu` lists none of today). */\n private entry(entry: E.MenuEntry): JSX.Element {\n if (\"type\" in entry) {\n return entry.type === \"divider\" ? (\n <div class={DIVIDER_CLASS} role=\"separator\" />\n ) : (\n <div class={UIT.HEADER}>{entry.text}</div>\n )\n }\n const isChecked = () => this.chosenTheme === entry.value\n return (\n <button\n type=\"button\"\n class={[OPTION_CLASS, { checked: isChecked() }]}\n part={this.partForName(\"option\")}\n role={MENU_ROLES.item}\n value={entry.value}\n aria-checked={isChecked() ? \"true\" : \"false\"}\n tabindex={(this.tabStopTheme ?? this.chosenTheme) === entry.value ? 0 : -1}\n onClick={(event) => this.onOptionClick(entry.value, event)}\n >\n <span class={CHECK_CLASS} aria-hidden=\"true\">\n <ui-icon name={CHECK_ICON} padding=\"none\" />\n </span>\n <span class={NAME_CLASS}>{entry.text}</span>\n <Show when={entry.description}>\n <span class={UIT.DESCRIPTION}>{entry.description}</span>\n </Show>\n </button>\n )\n }\n\n /**\n * The theme `<ui-dropdown>` (`show=\"theme\"`).\n * - `compact`: an icon-only palette button, its text (`Spell theme`) its tooltip and name\n * (Owen, 2026-10-23: \"'1 theme' button should be palette icon\")\n */\n private dropdown(): JSX.Element {\n const label = () => this.themeMenu.labelFor(this.chosenTheme, this.chosen.tint)\n return (\n <ui-dropdown\n part={this.partForName(\"theme\")}\n class={{ [COMPACT]: !!this.compact }}\n floating=\"\"\n scrolling=\"\"\n button=\"\"\n padding={this.compact ? \"compact\" : undefined}\n inverted={this.inverted ? \"\" : undefined}\n size={this.size}\n label={this.translationForKey(\"themeName\")}\n title={this.compact ? label() : undefined}\n aria-label={this.compact ? label() : undefined}\n value={this.chosenTheme}\n ref={(dropdown: HTMLElement) =>\n dropdown.addEventListener(\"ui-changed\", (event) => this.onDropdownChange(event))\n }\n >\n <div slot=\"header\" class={TINTS_HEADER_CLASS}>\n {this.tints()}\n </div>\n <span slot=\"trigger\">\n <Show when={this.compact} fallback={label()}>\n <ui-icon name={PALETTE_ICON} aria-hidden=\"true\"></ui-icon>\n </Show>\n </span>\n <For each={this.themeMenu.entries}>\n {(entry) =>\n \"type\" in entry ? (\n <ui-item kind={entry.type}>{entry.text}</ui-item>\n ) : (\n <ui-item value={entry.value} description={entry.description}>\n {entry.text}\n </ui-item>\n )\n }\n </For>\n <Show when={this.benchAddress}>\n <ui-item kind=\"divider\"></ui-item>\n <ui-item value={BENCH_VALUE} icon={BENCH_ICON} title={this.translationForKey(\"benchTip\")}>\n {this.translationForKey(\"bench\")}\n </ui-item>\n </Show>\n </ui-dropdown>\n )\n }\n\n /**\n * The dropdown's `ui-changed`: stop it (the DOM element fires its own), and choose its value;\n * Theme bench: open it, and show the theme chosen again.\n */\n private onDropdownChange(event: Event): void {\n event.stopPropagation()\n const { value } = (event as CustomEvent<{ value: string }>).detail\n if (value !== BENCH_VALUE) return void this.chooseTheme(value, event)\n this.openBench()\n ;(event.currentTarget as HTMLElement & { value: string }).value = this.chosenTheme\n }\n\n ////////////////\n // ## The overlay\n ////////////////\n\n /** The overlay is open: `:state(open)`; hides the palette's tooltip. */\n @E.cssState(\"open\")\n @E.state\n accessor isOpen = false\n\n /**\n * The theme row holding the list's one tab stop (roving `tabindex`): a menu value; `undefined`: the chosen one.\n */\n @E.state accessor tabStopTheme: string | undefined = undefined\n\n /**\n * A theme row's click (or Enter / Space): choose it, keep the tab stop on it; the overlay stays open.\n * - Compared with `ThemePreference.chosen`, never `chosenTheme`:\n * a click right after another reads that one's value before the write lands.\n */\n private onOptionClick(value: string, event: Event): void {\n this.tabStopTheme = value\n if (value !== ThemePreference.chosen.theme) void this.chooseTheme(value, event)\n }\n\n /**\n * Arrow keys, Home and End in the theme list: move focus between rows, wrapping, and the tab stop with it.\n * - The tab stop is drawn by `entry()` (`tabindex: \"left alone\"`).\n */\n private onMenuKey(event: KeyboardEvent): void {\n UI.focus.arrowKey(event, {\n container: event.currentTarget as HTMLElement,\n items: ITEM_SELECTOR,\n orientation: \"vertical\",\n tabindex: \"left alone\",\n onChange: (row) => (this.tabStopTheme = (row as HTMLButtonElement).value)\n })\n }\n\n /** The list's theme rows, in order. */\n private rows(): HTMLButtonElement[] {\n return [...(this.domElement.shadowRoot?.querySelectorAll<HTMLButtonElement>(ITEM_SELECTOR) ?? [])]\n }\n\n /**\n * Follow the overlay: `isOpen` from its `ui-opening` / `ui-closing`,\n * and focus the chosen theme once it shows (`toggle`), its tab stop reset to it.\n */\n private wireOverlay(popup: HTMLElement): void {\n // the overlay's own, never a dropdown's inside it (Tint's) bubbling up\n popup.addEventListener(\"ui-opening\", (event) => {\n if (event.defaultPrevented || event.target !== popup) return\n this.isOpen = true\n // a theme saved in the editor since: listed as it opens\n this.myThemes = SavedTheme.list\n })\n popup.addEventListener(\"ui-closing\", (event) => {\n if (!event.defaultPrevented && event.target === popup) this.isOpen = false\n })\n popup.addEventListener(\"toggle\", (event) => {\n if ((event as ToggleEvent).newState === \"open\" && event.target === popup) this.focusChosen()\n })\n }\n\n /**\n * Focus the chosen theme's row (else the first), the list's tab stop reset to it.\n * - The overlay calls it as it opens; a host's menu as it opens its sub-menu (`show=\"menu\"`).\n */\n @E.untracked\n focusChosen(): void {\n this.tabStopTheme = undefined\n const rows = this.rows()\n ;(rows.find((each) => each.value === this.chosenTheme) ?? rows[0])?.focus()\n }\n}\n\n/** The vocabulary getters, typed (`UIComponent`'s doc). */\nexport interface UIThemeMenu extends E.AttributeValues<ThemeMenuVocabulary> {}\n\n/** The schemes a page shows, in the button's glyph order: each glyph is a class word and a `SCHEME_ICONS` key. */\nconst ShownSchemes = [\"light\", \"dark\"] as const satisfies readonly ShownScheme[]\n\n/**\n * Icon the scheme button shows for the scheme the page SHOWS (`fomantic` pack).\n * - the OUTLINE sun: the solid one reads as a cog at 14px\n */\nconst SCHEME_ICONS: Readonly<Record<ShownScheme, string>> = { light: \"sun outline\", dark: \"moon\" }\n\n/** Icon of each choice in the overlay's scheme control (`fomantic` pack): Auto a half-filled circle. */\nconst SCHEME_CHOICE_ICONS: Readonly<Record<SchemeChoice, string>> = {\n light: \"sun outline\",\n dark: \"moon\",\n system: \"adjust\"\n}\n\n/** Text key naming each scheme: the control's choices, and the palette's name. */\nconst SCHEME_TEXTS = { light: \"light\", dark: \"dark\", system: \"auto\" } as const satisfies Record<SchemeChoice, string>\n\n/** Icon of the button opening the overlay (`fomantic` pack). */\nconst PALETTE_ICON = \"palette\"\n\n/** The theme bench's page, from a site's root: Spell UI's docs page (`ui/docs/theme-bench.html`). */\nconst BENCH_PATH = \"/components/ui/theme-bench.html\"\n\n/** A worktree's site on the page server: `/worktrees/<name>`, where its pages start. */\nconst WORKTREE_ROOT = /^\\/worktrees\\/[^/]+/\n\n/** Where a page is, by its path => the theme bench's page for it; first match wins. */\nconst BENCH_PLACES: readonly (readonly [RegExp, string])[] = [\n [/\\/epics\\//, \"epic\"],\n [/\\/guides\\/SpellUI(\\/|$)/, \"notebook\"],\n [/\\/components\\//, \"ui\"]\n]\n\n/** The bench's page for anywhere else: the app. */\nconst DEFAULT_BENCH_PAGE = \"app\"\n\n/** `bench`'s value for no Theme bench row. */\nconst NO_BENCH = \"none\"\n\n/** Where the theme bench opens: a new window. */\nconst BENCH_TARGET = \"_blank\"\n\n/** The dropdown's Theme bench row's value: never a theme's name. */\nconst BENCH_VALUE = \"theme bench\"\n\n/** Icon of the Theme bench row (`fomantic` pack). */\nconst BENCH_ICON = \"external alternate\"\n\n/** Class word of the overlay's Theme bench row. */\nconst BENCH_CLASS = \"bench\"\n\n/** The class word of the box round the Tint dropdown, in the panel and the theme dropdown's header. */\nconst TINTS_CLASS = \"tints\"\n\n/** `size` of the Tint dropdown: the panel's small rows. */\nconst TINT_SIZE = \"small\" as const\n\n/** The box round Tint in the theme dropdown's header. */\nconst TINTS_HEADER_CLASS = \"tints-header\"\n\n/** Icon marking the chosen theme in the overlay's list (`fomantic` pack). */\nconst CHECK_ICON = \"check\"\n\n/** What a server render shows: no storage there. */\nconst SERVER_CHOICE: ThemeAndScheme = { theme: DEFAULT_THEME, scheme: \"system\" }\n\n/** Shadow-root ids: the palette button (its tooltip's `for`) and the overlay's header (its list's name). */\nconst IDS = { palette: \"palette\", heading: \"themes-heading\" } as const\n\n/** ARIA of the overlay's theme list: a menu of radio items (arrows move, Enter / Space / click picks). */\nconst MENU_ROLES = { menu: \"menu\", item: \"menuitemradio\" } as const\n\n/** ARIA of the overlay's scheme control: a radio group (arrows move and choose). */\nconst SCHEME_ROLES = { group: \"radiogroup\", item: \"radio\" } as const\n\n/** A theme row of the overlay's list. */\nconst ITEM_SELECTOR = `[role=\"${MENU_ROLES.item}\"]`\n\n/** A choice of the overlay's scheme control, in `SchemeChoices` order. */\nconst SCHEME_SELECTOR = `[role=\"${SCHEME_ROLES.item}\"]`\n\n/** Where the buttons' tooltips show. */\nconst TIP_POSITION = \"bottom center\"\n\n/** `size` of the tooltips. */\nconst MINI = \"mini\"\n\n/** Class word of the round buttons. */\nconst BUTTON_CLASS = \"button\"\n\n/** Class word of the light / dark button. */\nconst SCHEME_CLASS = \"scheme\"\n\n/** Class word of the palette button. */\nconst PALETTE_CLASS = \"palette\"\n\n/** Class word of a `compact` theme dropdown: an icon-only palette button. */\nconst COMPACT = \"compact\"\n\n/** Class word of a button's icon box. */\nconst GLYPH_CLASS = \"glyph\"\n\n/** Class word of the overlay's `<ui-popup>`. */\nconst OVERLAY_CLASS = \"overlay\"\n\n/**\n * Class word of the palette's tooltip while its overlay is open: it never shows then.\n * - Not `hidden`: on a `<ui-popup>` that's whether it shows (the shared `visible` / `hidden`),\n * which its trigger sets again on the next hover.\n */\nconst MUTED_CLASS = \"muted\"\n\n/** Class word of the overlay's content. */\nconst PANEL_CLASS = \"panel\"\n\n/** Class word of the overlay's header. */\nconst HEADING_CLASS = \"heading\"\n\n/** Class word of the overlay's theme list. */\nconst MENU_CLASS = \"menu\"\n\n/** Class word of a divider in the overlay. */\nconst DIVIDER_CLASS = \"divider\"\n\n/** Class word of the overlay's scheme control. */\nconst SCHEMES_CLASS = \"schemes\"\n\n/** Class word of one choice in the scheme control. */\nconst SCHEME_OPTION_CLASS = \"choice\"\n\n/** Class word of a row's or a choice's name. */\nconst NAME_CLASS = \"name\"\n\n/** Class word of a theme row. */\nconst OPTION_CLASS = \"option\"\n\n/** Class word of a theme row's check mark. */\nconst CHECK_CLASS = \"check\"\n","/**\n * The theme menu's family: defines `<ui-theme-menu>`, and exports its component, `UIThemeMenu`,\n * its list (`ThemeMenu`), the remembered theme, tint and scheme (`ThemePreference`),\n * and `HueDropdown`, the colours as a dropdown (its Tint, and the theme editor's colour rows).\n * - The docs site's own widget until epic `debut` P17 made it a real element:\n * every place shows it (the editor, the epic pages and guides, Spell UI's pages).\n * - SIDE EFFECT: importing it defines the tag, and the widgets its shadow DOM is built of:\n * `<ui-popup>` (the overlay and the tooltips), `<ui-icon>` (sun, moon, palette, check),\n * `<ui-dropdown>` and `<ui-item>` (its rows, `show=\"theme\"`).\n * A `<ui-root>` only loads what's in the page's light DOM, so a family that is built of other widgets\n * imports them itself.\n * - It applies themes through the runtime (`UI.themes`, in the runtime's chunk),\n * and every theme sheet stays its own lazy chunk, fetched on `apply()`.\n * - A page that only restores the remembered theme (no menu yet) imports `ThemePreference` by its file,\n * `spell/ui/components/ui-theme-menu/ThemePreference`: this barrel would define the menu too.\n */\n\nimport { UIThemeMenu } from \"./UIThemeMenu\"\nimport { HueDropdown } from \"./HueDropdown\"\nimport { ThemeMenu } from \"./ThemeMenu\"\nimport { ThemePreference } from \"./ThemePreference\"\n\nimport \"spell/ui/components/ui-dropdown\"\nimport \"spell/ui/components/ui-item\"\nimport \"spell/ui/components/ui-popup\"\nimport \"spell/ui/components/ui-icon\"\n\nUIThemeMenu.define()\n\nexport { UIThemeMenu, HueDropdown, ThemeMenu, ThemePreference }\nexport type { SchemeChoice, ShownScheme, ThemeAndScheme, ThemeMenuChange } from \"./UIThemeMenu.types\"\n"],"mappings":";;;;;;;;;;;AAYA,IAAMgJ,KAAgB,UAGhBC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