spell-ui 0.8.5 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (722) hide show
  1. package/README-components.md +14 -6
  2. package/README-frameworks.md +22 -12
  3. package/README-migrating.md +7 -6
  4. package/README-runtime.md +14 -13
  5. package/README-site.md +11 -11
  6. package/README-themes.md +38 -11
  7. package/README.md +61 -73
  8. package/dist/Dragging-CMZoLEWQ.js +169 -0
  9. package/dist/Dragging-CMZoLEWQ.js.map +1 -0
  10. package/dist/{MarkdownEngine-CbuT9Mjc.js → MarkdownEngine-CW1WGqNp.js} +122 -100
  11. package/dist/MarkdownEngine-CW1WGqNp.js.map +1 -0
  12. package/dist/{PrefStore-CeaTtjTz.js → PrefStore-Qv0e5y04.js} +22 -22
  13. package/dist/PrefStore-Qv0e5y04.js.map +1 -0
  14. package/dist/ScrollingRow-7n7Z-HIE.js +88 -0
  15. package/dist/ScrollingRow-7n7Z-HIE.js.map +1 -0
  16. package/dist/SitePages-CciwREek.js +51 -0
  17. package/dist/SitePages-CciwREek.js.map +1 -0
  18. package/dist/{SlottedItems-Ch0tzzlL.js → SlottedItems-Du3aJwG1.js} +22 -22
  19. package/dist/{SlottedItems-Ch0tzzlL.js.map → SlottedItems-Du3aJwG1.js.map} +1 -1
  20. package/dist/ThemeDraft-B7NPif4d.js +805 -0
  21. package/dist/ThemeDraft-B7NPif4d.js.map +1 -0
  22. package/dist/TreeMeasure-BVJeGb1L.js +42 -0
  23. package/dist/TreeMeasure-BVJeGb1L.js.map +1 -0
  24. package/dist/UIButton-DFEds67r.js +6 -0
  25. package/dist/UIButton-DFEds67r.js.map +1 -0
  26. package/dist/UIInput-BodVbUoQ.js +6 -0
  27. package/dist/UIInput-BodVbUoQ.js.map +1 -0
  28. package/dist/{UIKeys-DJF2TIKE.js → UIKeys-Rh_gUZjP.js} +10 -9
  29. package/dist/UIKeys-Rh_gUZjP.js.map +1 -0
  30. package/dist/UILabel-DgJUBzB_.js +6 -0
  31. package/dist/UILabel-DgJUBzB_.js.map +1 -0
  32. package/dist/UIMenu-zdcAtwTa.js +42 -0
  33. package/dist/UIMenu-zdcAtwTa.js.map +1 -0
  34. package/dist/{UIRuntime-BBuehGly.js → UIRuntime-KH309p5B.js} +398 -207
  35. package/dist/UIRuntime-KH309p5B.js.map +1 -0
  36. package/dist/_spell-element/DOMElement.d.ts +62 -5
  37. package/dist/_spell-element/MoveAndResize.d.ts +75 -0
  38. package/dist/_spell-element/UIComponent.d.ts +42 -0
  39. package/dist/_spell-element/elements.types.d.ts +47 -0
  40. package/dist/_spell-element/index.d.ts +1 -0
  41. package/dist/_spell-element/vocabulary.types.d.ts +34 -2
  42. package/dist/{runtime → _util}/Api.d.ts +14 -4
  43. package/dist/_util/Dragging.d.ts +148 -0
  44. package/dist/_util/ListSelection.d.ts +46 -0
  45. package/dist/{util → _util}/LoadOnce.d.ts +9 -1
  46. package/dist/_util/ReconnectingSocket.d.ts +51 -0
  47. package/dist/_util/diagram/DiagramColumns.d.ts +14 -0
  48. package/dist/_util/diagram/DiagramLayout.d.ts +119 -0
  49. package/dist/_util/diagram/DiagramSVG.d.ts +17 -0
  50. package/dist/_util/dom.d.ts +10 -0
  51. package/dist/_util/fetching.d.ts +92 -0
  52. package/dist/_util/measures/Dimension.d.ts +63 -0
  53. package/dist/_util/measures/MeasureSystem.d.ts +66 -0
  54. package/dist/_util/measures/dimensions.generated.d.ts +16 -0
  55. package/dist/_util/persist/ColorScheme.d.ts +6 -0
  56. package/dist/_util/persist/ServerPlace.d.ts +42 -0
  57. package/dist/_util/persist/WaitedOnPlace.d.ts +27 -0
  58. package/dist/_util/persist/persist.types.d.ts +21 -2
  59. package/dist/_util/timing.d.ts +10 -1
  60. package/dist/api.js +8 -7
  61. package/dist/api.js.map +1 -1
  62. package/dist/components/ComponentDefinitions.d.ts +29 -0
  63. package/dist/components/components.es.d.ts +13 -0
  64. package/dist/components/components.types.d.ts +113 -8
  65. package/dist/components/ui-accordion/UIAccordion.d.ts +1 -0
  66. package/dist/components/ui-accordion/UIAccordion.en.d.ts +1 -0
  67. package/dist/components/ui-action/UIAction.en.d.ts +5 -1
  68. package/dist/components/ui-ad/UIAd.d.ts +1 -0
  69. package/dist/components/ui-ad/UIAd.en.d.ts +1 -0
  70. package/dist/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
  71. package/dist/components/ui-breadcrumbs/UIBreadcrumb.en.d.ts +1 -0
  72. package/dist/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
  73. package/dist/components/ui-breadcrumbs/UIBreadcrumbs.en.d.ts +1 -0
  74. package/dist/components/ui-button/UIButton.d.ts +8 -3
  75. package/dist/components/ui-button/UIButton.en.d.ts +9 -4
  76. package/dist/components/ui-button/UIButton.es.d.ts +6 -0
  77. package/dist/components/ui-button/UIButton.fallback.d.ts +8 -3
  78. package/dist/components/ui-button/UIButtons.d.ts +1 -0
  79. package/dist/components/ui-button/UIButtons.en.d.ts +1 -0
  80. package/dist/components/ui-button/UIOr.d.ts +1 -0
  81. package/dist/components/ui-button/UIOr.en.d.ts +1 -0
  82. package/dist/components/ui-calendar/UICalendar.d.ts +6 -0
  83. package/dist/components/ui-calendar/UICalendar.en.d.ts +6 -0
  84. package/dist/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
  85. package/dist/components/ui-card/CardClicks.d.ts +40 -0
  86. package/dist/components/ui-card/UICard.d.ts +41 -0
  87. package/dist/components/ui-card/UICard.en.d.ts +49 -0
  88. package/dist/components/ui-card/UICard.es.d.ts +1 -0
  89. package/dist/components/ui-card/UICards.d.ts +31 -0
  90. package/dist/components/ui-card/UICards.en.d.ts +31 -0
  91. package/dist/components/ui-card/UICards.es.d.ts +8 -0
  92. package/dist/components/ui-checkbox/CheckControl.d.ts +7 -0
  93. package/dist/components/ui-checkbox/UICheckbox.d.ts +7 -0
  94. package/dist/components/ui-checkbox/UICheckbox.en.d.ts +7 -0
  95. package/dist/components/ui-checkbox/UICheckbox.es.d.ts +1 -0
  96. package/dist/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
  97. package/dist/components/ui-checkbox/UICheckbox.types.d.ts +5 -0
  98. package/dist/components/ui-checkbox/UIRadio.d.ts +8 -0
  99. package/dist/components/ui-checkbox/UIRadio.en.d.ts +6 -0
  100. package/dist/components/ui-code/UICode.en.d.ts +1 -0
  101. package/dist/components/ui-comment/UIComment.d.ts +1 -0
  102. package/dist/components/ui-comment/UIComment.en.d.ts +1 -0
  103. package/dist/components/ui-comment/UIComments.d.ts +1 -0
  104. package/dist/components/ui-comment/UIComments.en.d.ts +1 -0
  105. package/dist/components/ui-components/PackHotSwap.d.ts +17 -1
  106. package/dist/components/ui-components/UIComponents.d.ts +1 -0
  107. package/dist/components/ui-components/UIComponents.en.d.ts +1 -0
  108. package/dist/components/ui-container/UIContainer.d.ts +11 -0
  109. package/dist/components/ui-container/UIContainer.en.d.ts +7 -0
  110. package/dist/components/ui-container/UIContainer.es.d.ts +1 -0
  111. package/dist/components/ui-diagram/UIDiagram.d.ts +268 -0
  112. package/dist/components/ui-diagram/UIDiagram.en.d.ts +106 -0
  113. package/dist/components/ui-diagram/UIDiagram.es.d.ts +37 -0
  114. package/dist/components/ui-diagram/UIDiagramNode.d.ts +98 -0
  115. package/dist/components/ui-diagram/UIDiagramNode.en.d.ts +38 -0
  116. package/dist/components/ui-diagram/UIDiagramNode.es.d.ts +16 -0
  117. package/dist/components/ui-diagram/index.d.ts +8 -0
  118. package/dist/components/ui-dimension/UIDimension.d.ts +81 -0
  119. package/dist/components/ui-dimension/UIDimension.en.d.ts +54 -0
  120. package/dist/components/ui-dimension/UIDimension.es.d.ts +22 -0
  121. package/dist/components/ui-dimension/index.d.ts +2 -0
  122. package/dist/components/ui-dimmer/UIDimmer.d.ts +6 -1
  123. package/dist/components/ui-dimmer/UIDimmer.en.d.ts +1 -0
  124. package/dist/components/ui-dimmer/UIDimmer.es.d.ts +1 -1
  125. package/dist/components/ui-divider/UIDivider.d.ts +2 -0
  126. package/dist/components/ui-divider/UIDivider.en.d.ts +2 -0
  127. package/dist/components/ui-divider/UIDivider.es.d.ts +1 -0
  128. package/dist/components/ui-dropdown/UIDropdown.d.ts +6 -0
  129. package/dist/components/ui-dropdown/UIDropdown.en.d.ts +6 -0
  130. package/dist/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
  131. package/dist/components/ui-embed/UIEmbed.d.ts +1 -0
  132. package/dist/components/ui-embed/UIEmbed.en.d.ts +1 -0
  133. package/dist/components/ui-emoji/UIEmoji.d.ts +1 -0
  134. package/dist/components/ui-emoji/UIEmoji.en.d.ts +1 -0
  135. package/dist/components/ui-example/UIExample.en.d.ts +4 -2
  136. package/dist/components/ui-example/UIExample.es.d.ts +3 -2
  137. package/dist/components/ui-feed/UIFeed.d.ts +1 -0
  138. package/dist/components/ui-feed/UIFeed.en.d.ts +1 -0
  139. package/dist/components/ui-feed/UIFeedEvent.d.ts +1 -0
  140. package/dist/components/ui-feed/UIFeedEvent.en.d.ts +1 -0
  141. package/dist/components/ui-flag/UIFlag.d.ts +1 -0
  142. package/dist/components/ui-flag/UIFlag.en.d.ts +1 -0
  143. package/dist/components/ui-flyout/UIFlyout.d.ts +1 -0
  144. package/dist/components/ui-flyout/UIFlyout.en.d.ts +1 -0
  145. package/dist/components/ui-form/FormBinding.d.ts +13 -1
  146. package/dist/components/ui-form/FormFields.d.ts +4 -4
  147. package/dist/components/ui-form/UIField.d.ts +30 -3
  148. package/dist/components/ui-form/UIField.en.d.ts +9 -0
  149. package/dist/components/ui-form/UIField.es.d.ts +6 -0
  150. package/dist/components/ui-form/UIFields.d.ts +1 -0
  151. package/dist/components/ui-form/UIFields.en.d.ts +1 -0
  152. package/dist/components/ui-form/UIForm.d.ts +15 -0
  153. package/dist/components/ui-form/UIForm.en.d.ts +6 -0
  154. package/dist/components/ui-form/UIRepeat.d.ts +1 -0
  155. package/dist/components/ui-form/UIRepeat.en.d.ts +1 -0
  156. package/dist/components/ui-form/index.d.ts +2 -1
  157. package/dist/components/ui-grid/UIColumn.d.ts +1 -0
  158. package/dist/components/ui-grid/UIColumn.en.d.ts +1 -0
  159. package/dist/components/ui-grid/UIGrid.d.ts +1 -0
  160. package/dist/components/ui-grid/UIGrid.en.d.ts +1 -0
  161. package/dist/components/ui-grid/UIRow.d.ts +1 -0
  162. package/dist/components/ui-grid/UIRow.en.d.ts +1 -0
  163. package/dist/components/ui-icon/UIIcon.d.ts +3 -2
  164. package/dist/components/ui-icon/UIIcon.en.d.ts +3 -2
  165. package/dist/components/ui-icon/UIIcons.d.ts +1 -0
  166. package/dist/components/ui-icon/UIIcons.en.d.ts +1 -0
  167. package/dist/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
  168. package/dist/components/ui-icon-picker/UIIconPicker.en.d.ts +6 -0
  169. package/dist/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
  170. package/dist/components/ui-image/UIImage.d.ts +34 -0
  171. package/dist/components/ui-image/UIImage.en.d.ts +23 -0
  172. package/dist/components/ui-image/UIImage.es.d.ts +2 -0
  173. package/dist/components/ui-image/UIImages.d.ts +1 -0
  174. package/dist/components/ui-image/UIImages.en.d.ts +1 -0
  175. package/dist/components/ui-include/UIInclude.d.ts +1 -0
  176. package/dist/components/ui-include/UIInclude.en.d.ts +1 -0
  177. package/dist/components/ui-input/TextControl.d.ts +7 -0
  178. package/dist/components/ui-input/UIInput.d.ts +22 -3
  179. package/dist/components/ui-input/UIInput.en.d.ts +9 -2
  180. package/dist/components/ui-input/UIInput.es.d.ts +2 -0
  181. package/dist/components/ui-input/UIInput.fallback.d.ts +9 -2
  182. package/dist/components/ui-input/UITextarea.d.ts +20 -0
  183. package/dist/components/ui-input/UITextarea.en.d.ts +15 -0
  184. package/dist/components/ui-input/UITextarea.es.d.ts +4 -0
  185. package/dist/components/ui-item/UIItem.d.ts +27 -4
  186. package/dist/components/ui-item/UIItem.en.d.ts +5 -1
  187. package/dist/components/ui-items/UIItems.d.ts +1 -0
  188. package/dist/components/ui-items/UIItems.en.d.ts +1 -0
  189. package/dist/components/ui-json/JsonChild.d.ts +30 -0
  190. package/dist/components/ui-json/UIJson.d.ts +128 -0
  191. package/dist/components/ui-json/UIJson.en.d.ts +71 -0
  192. package/dist/components/ui-json/UIJson.es.d.ts +12 -0
  193. package/dist/components/ui-json/index.d.ts +3 -0
  194. package/dist/components/ui-keys/UIKeys.d.ts +1 -0
  195. package/dist/components/ui-keys/UIKeys.en.d.ts +1 -0
  196. package/dist/components/ui-label/UILabel.d.ts +2 -0
  197. package/dist/components/ui-label/UILabel.en.d.ts +2 -0
  198. package/dist/components/ui-label/UILabel.es.d.ts +1 -0
  199. package/dist/components/ui-label/UILabels.d.ts +1 -0
  200. package/dist/components/ui-label/UILabels.en.d.ts +1 -0
  201. package/dist/components/ui-list/UIList.d.ts +2 -0
  202. package/dist/components/ui-list/UIList.en.d.ts +2 -0
  203. package/dist/components/ui-list/UIList.es.d.ts +1 -0
  204. package/dist/components/ui-loader/UILoader.d.ts +1 -0
  205. package/dist/components/ui-loader/UILoader.en.d.ts +1 -0
  206. package/dist/components/ui-markdown/MarkdownBox.d.ts +143 -0
  207. package/dist/components/ui-markdown/MarkdownEngine.d.ts +14 -2
  208. package/dist/components/ui-markdown/MarkdownFormats.d.ts +95 -0
  209. package/dist/components/ui-markdown/MarkdownSource.d.ts +57 -0
  210. package/dist/components/ui-markdown/UIMarkdown.d.ts +126 -6
  211. package/dist/components/ui-markdown/UIMarkdown.en.d.ts +111 -8
  212. package/dist/components/ui-markdown/UIMarkdown.es.d.ts +29 -1
  213. package/dist/components/ui-markdown/UIMarkdown.types.d.ts +26 -0
  214. package/dist/components/ui-menu/ScrollingRow.d.ts +79 -0
  215. package/dist/components/ui-menu/TitleFit.d.ts +3 -0
  216. package/dist/components/ui-menu/UIMenu.d.ts +97 -4
  217. package/dist/components/ui-menu/UIMenu.en.d.ts +50 -1
  218. package/dist/components/ui-menu/UIMenu.es.d.ts +4 -0
  219. package/dist/components/ui-message/UIMessage.d.ts +2 -0
  220. package/dist/components/ui-message/UIMessage.en.d.ts +2 -0
  221. package/dist/components/ui-message/UIMessage.es.d.ts +1 -0
  222. package/dist/components/ui-modal/UIModal.d.ts +1 -0
  223. package/dist/components/ui-modal/UIModal.en.d.ts +1 -0
  224. package/dist/components/ui-nag/UINag.d.ts +1 -0
  225. package/dist/components/ui-nag/UINag.en.d.ts +1 -0
  226. package/dist/components/ui-page/UIPage.d.ts +15 -0
  227. package/dist/components/ui-page/UIPage.en.d.ts +15 -0
  228. package/dist/components/ui-page/UIPage.es.d.ts +1 -0
  229. package/dist/components/ui-panel/UIPanel.d.ts +6 -0
  230. package/dist/components/ui-panel/UIPanel.en.d.ts +33 -20
  231. package/dist/components/ui-parts/UIActions.d.ts +1 -0
  232. package/dist/components/ui-parts/UIActions.en.d.ts +1 -0
  233. package/dist/components/ui-parts/UIAuthor.d.ts +1 -0
  234. package/dist/components/ui-parts/UIAuthor.en.d.ts +1 -0
  235. package/dist/components/ui-parts/UIAvatar.d.ts +1 -0
  236. package/dist/components/ui-parts/UIAvatar.en.d.ts +1 -0
  237. package/dist/components/ui-parts/UIContent.d.ts +1 -0
  238. package/dist/components/ui-parts/UIContent.en.d.ts +1 -0
  239. package/dist/components/ui-parts/UIDate.d.ts +1 -0
  240. package/dist/components/ui-parts/UIDate.en.d.ts +1 -0
  241. package/dist/components/ui-parts/UIDescription.d.ts +1 -0
  242. package/dist/components/ui-parts/UIDescription.en.d.ts +1 -0
  243. package/dist/components/ui-parts/UIDetail.d.ts +1 -0
  244. package/dist/components/ui-parts/UIDetail.en.d.ts +1 -0
  245. package/dist/components/ui-parts/UIExtra.d.ts +1 -0
  246. package/dist/components/ui-parts/UIExtra.en.d.ts +1 -0
  247. package/dist/components/ui-parts/UIHeader.d.ts +3 -1
  248. package/dist/components/ui-parts/UIHeader.en.d.ts +3 -1
  249. package/dist/components/ui-parts/UIMeta.d.ts +1 -0
  250. package/dist/components/ui-parts/UIMeta.en.d.ts +1 -0
  251. package/dist/components/ui-parts/UIParts.types.d.ts +15 -1
  252. package/dist/components/ui-parts/UISummary.d.ts +1 -0
  253. package/dist/components/ui-parts/UISummary.en.d.ts +1 -0
  254. package/dist/components/ui-parts/UITitle.d.ts +1 -0
  255. package/dist/components/ui-parts/UITitle.en.d.ts +1 -0
  256. package/dist/components/ui-parts/UIValue.d.ts +1 -0
  257. package/dist/components/ui-parts/UIValue.en.d.ts +1 -0
  258. package/dist/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
  259. package/dist/components/ui-placeholder/UIPlaceholder.en.d.ts +1 -0
  260. package/dist/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
  261. package/dist/components/ui-placeholder/UIPlaceholderHeader.en.d.ts +1 -0
  262. package/dist/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
  263. package/dist/components/ui-placeholder/UIPlaceholderImage.en.d.ts +1 -0
  264. package/dist/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
  265. package/dist/components/ui-placeholder/UIPlaceholderLine.en.d.ts +1 -0
  266. package/dist/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
  267. package/dist/components/ui-placeholder/UIPlaceholderParagraph.en.d.ts +1 -0
  268. package/dist/components/ui-popup/UIPopup.d.ts +30 -3
  269. package/dist/components/ui-popup/UIPopup.en.d.ts +7 -0
  270. package/dist/components/ui-popup/UIPopup.es.d.ts +1 -0
  271. package/dist/components/ui-progress/UIProgress.d.ts +2 -0
  272. package/dist/components/ui-progress/UIProgress.en.d.ts +2 -0
  273. package/dist/components/ui-progress/UIProgress.es.d.ts +1 -0
  274. package/dist/components/ui-property-editor/UIProperty.d.ts +132 -5
  275. package/dist/components/ui-property-editor/UIProperty.en.d.ts +11 -44
  276. package/dist/components/ui-property-editor/UIProperty.es.d.ts +4 -0
  277. package/dist/components/ui-property-editor/UIPropertyEditor.d.ts +38 -0
  278. package/dist/components/ui-property-editor/UIPropertyEditor.en.d.ts +1 -0
  279. package/dist/components/ui-property-editor/UIPropertyEditor.es.d.ts +4 -0
  280. package/dist/components/ui-property-editor/UIPropertyEditor.types.d.ts +33 -0
  281. package/dist/components/ui-property-editor/UIPropertyGroup.d.ts +12 -0
  282. package/dist/components/ui-property-editor/UIPropertyGroup.en.d.ts +2 -0
  283. package/dist/components/ui-property-editor/UIPropertyGroup.es.d.ts +9 -0
  284. package/dist/components/ui-property-editor/index.d.ts +1 -0
  285. package/dist/components/ui-quote/UIQuote.d.ts +1 -0
  286. package/dist/components/ui-quote/UIQuote.en.d.ts +1 -0
  287. package/dist/components/ui-rail/UIRail.d.ts +1 -0
  288. package/dist/components/ui-rail/UIRail.en.d.ts +1 -0
  289. package/dist/components/ui-rating/UIRating.d.ts +6 -0
  290. package/dist/components/ui-rating/UIRating.en.d.ts +6 -0
  291. package/dist/components/ui-rating/UIRating.fallback.d.ts +6 -0
  292. package/dist/components/ui-reveal/UIReveal.d.ts +1 -0
  293. package/dist/components/ui-reveal/UIReveal.en.d.ts +1 -0
  294. package/dist/components/ui-root/UIRoot.d.ts +18 -3
  295. package/dist/components/ui-root/UIRoot.en.d.ts +15 -0
  296. package/dist/components/ui-root/UIRoot.es.d.ts +1 -0
  297. package/dist/components/ui-search/UISearch.d.ts +48 -7
  298. package/dist/components/ui-search/UISearch.en.d.ts +13 -1
  299. package/dist/components/ui-search/UISearch.es.d.ts +1 -0
  300. package/dist/components/ui-search/UISearch.fallback.d.ts +13 -1
  301. package/dist/components/ui-section/UISection.d.ts +30 -1
  302. package/dist/components/ui-section/UISection.en.d.ts +10 -0
  303. package/dist/components/ui-section/UISection.es.d.ts +1 -0
  304. package/dist/components/ui-section/UISections.d.ts +1 -0
  305. package/dist/components/ui-section/UISections.en.d.ts +1 -0
  306. package/dist/components/ui-segment/UISegment.d.ts +2 -0
  307. package/dist/components/ui-segment/UISegment.en.d.ts +2 -0
  308. package/dist/components/ui-segment/UISegment.es.d.ts +1 -0
  309. package/dist/components/ui-segment/UISegments.d.ts +1 -0
  310. package/dist/components/ui-segment/UISegments.en.d.ts +1 -0
  311. package/dist/components/ui-select/UISelect.d.ts +6 -0
  312. package/dist/components/ui-select/UISelect.en.d.ts +6 -0
  313. package/dist/components/ui-select/UISelect.fallback.d.ts +6 -0
  314. package/dist/components/ui-shape/UIShape.d.ts +23 -2
  315. package/dist/components/ui-shape/UIShape.en.d.ts +8 -0
  316. package/dist/components/ui-shape/UIShape.es.d.ts +1 -0
  317. package/dist/components/ui-shape/UISide.d.ts +4 -0
  318. package/dist/components/ui-shape/UISide.en.d.ts +4 -0
  319. package/dist/components/ui-sidebar/UIPushable.d.ts +1 -0
  320. package/dist/components/ui-sidebar/UIPushable.en.d.ts +1 -0
  321. package/dist/components/ui-sidebar/UIPusher.d.ts +1 -0
  322. package/dist/components/ui-sidebar/UIPusher.en.d.ts +1 -0
  323. package/dist/components/ui-sidebar/UISidebar.d.ts +1 -0
  324. package/dist/components/ui-sidebar/UISidebar.en.d.ts +1 -0
  325. package/dist/components/ui-sides/UISides.d.ts +209 -0
  326. package/dist/components/ui-sides/UISides.en.d.ts +122 -0
  327. package/dist/components/ui-sides/UISides.es.d.ts +30 -0
  328. package/dist/components/ui-sides/UISides.fallback.d.ts +134 -0
  329. package/dist/components/ui-sides/index.d.ts +2 -0
  330. package/dist/components/ui-site-nav/SitePages.d.ts +53 -0
  331. package/dist/components/ui-site-nav/UISiteNav.d.ts +207 -0
  332. package/dist/components/ui-site-nav/UISiteNav.en.d.ts +87 -0
  333. package/dist/components/ui-site-nav/UISiteNav.es.d.ts +29 -0
  334. package/dist/components/ui-site-nav/index.d.ts +1 -0
  335. package/dist/components/ui-site-tabs/UISiteTabs.d.ts +126 -0
  336. package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +49 -0
  337. package/dist/components/ui-site-tabs/UISiteTabs.es.d.ts +18 -0
  338. package/dist/components/ui-site-tabs/index.d.ts +1 -0
  339. package/dist/components/ui-slider/UISlider.d.ts +7 -0
  340. package/dist/components/ui-slider/UISlider.en.d.ts +7 -0
  341. package/dist/components/ui-slider/UISlider.es.d.ts +1 -0
  342. package/dist/components/ui-slider/UISlider.fallback.d.ts +7 -0
  343. package/dist/components/ui-space/UISpace.d.ts +1 -0
  344. package/dist/components/ui-space/UISpace.en.d.ts +1 -0
  345. package/dist/components/ui-split-panel/UISplitPanel.d.ts +175 -0
  346. package/dist/components/ui-split-panel/UISplitPanel.en.d.ts +74 -0
  347. package/dist/components/ui-split-panel/UISplitPanel.es.d.ts +25 -0
  348. package/dist/components/ui-split-panel/index.d.ts +2 -0
  349. package/dist/components/ui-stack/UIStack.d.ts +31 -5
  350. package/dist/components/ui-stack/UIStack.en.d.ts +15 -3
  351. package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
  352. package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
  353. package/dist/components/ui-statistic/UIStatistics.d.ts +1 -0
  354. package/dist/components/ui-statistic/UIStatistics.en.d.ts +1 -0
  355. package/dist/components/ui-step/UIStep.d.ts +1 -0
  356. package/dist/components/ui-step/UIStep.en.d.ts +1 -0
  357. package/dist/components/ui-step/UISteps.d.ts +1 -0
  358. package/dist/components/ui-step/UISteps.en.d.ts +1 -0
  359. package/dist/components/ui-sticky/UISticky.d.ts +4 -0
  360. package/dist/components/ui-sticky/UISticky.en.d.ts +1 -0
  361. package/dist/components/ui-tab/UITab.d.ts +8 -0
  362. package/dist/components/ui-tab/UITab.en.d.ts +1 -0
  363. package/dist/components/ui-tab/UITabs.d.ts +107 -16
  364. package/dist/components/ui-tab/UITabs.en.d.ts +40 -1
  365. package/dist/components/ui-tab/UITabs.es.d.ts +4 -0
  366. package/dist/components/ui-table/TableEditing.d.ts +77 -0
  367. package/dist/components/ui-table/UICell.d.ts +1 -0
  368. package/dist/components/ui-table/UICell.en.d.ts +1 -0
  369. package/dist/components/ui-table/UITable.d.ts +145 -5
  370. package/dist/components/ui-table/UITable.en.d.ts +19 -0
  371. package/dist/components/ui-table/UITable.es.d.ts +3 -0
  372. package/dist/components/ui-terms/UITerm.d.ts +1 -0
  373. package/dist/components/ui-terms/UITerm.en.d.ts +1 -0
  374. package/dist/components/ui-terms/UITerms.d.ts +1 -0
  375. package/dist/components/ui-terms/UITerms.en.d.ts +1 -0
  376. package/dist/components/ui-text/UILink.d.ts +11 -0
  377. package/dist/components/ui-text/UILink.en.d.ts +4 -0
  378. package/dist/components/ui-text/UIText.d.ts +7 -0
  379. package/dist/components/ui-text/UIText.en.d.ts +7 -0
  380. package/dist/components/ui-text/UIText.es.d.ts +2 -0
  381. package/dist/components/ui-theme-editor/SavedTheme.d.ts +55 -43
  382. package/dist/components/ui-theme-editor/ThemeDraft.d.ts +15 -0
  383. package/dist/components/ui-theme-editor/UIColorChip.d.ts +1 -0
  384. package/dist/components/ui-theme-editor/UIColorChip.en.d.ts +1 -0
  385. package/dist/components/ui-theme-editor/UIThemeEditor.d.ts +157 -26
  386. package/dist/components/ui-theme-editor/UIThemeEditor.en.d.ts +79 -6
  387. package/dist/components/ui-theme-editor/UIThemeEditor.es.d.ts +20 -2
  388. package/dist/components/ui-theme-editor/UIThemeEditor.types.d.ts +0 -2
  389. package/dist/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
  390. package/dist/components/ui-theme-editor/UIThemeToken.en.d.ts +1 -0
  391. package/dist/components/ui-theme-menu/HueDropdown.d.ts +47 -0
  392. package/dist/components/ui-theme-menu/ThemeMenu.d.ts +18 -7
  393. package/dist/components/ui-theme-menu/ThemePreference.d.ts +145 -36
  394. package/dist/components/ui-theme-menu/UIThemeMenu.d.ts +118 -7
  395. package/dist/components/ui-theme-menu/UIThemeMenu.en.d.ts +82 -2
  396. package/dist/components/ui-theme-menu/UIThemeMenu.es.d.ts +21 -1
  397. package/dist/components/ui-theme-menu/UIThemeMenu.types.d.ts +36 -8
  398. package/dist/components/ui-theme-menu/index.d.ts +2 -1
  399. package/dist/components/ui-toast/UIToast.d.ts +1 -0
  400. package/dist/components/ui-toast/UIToast.en.d.ts +1 -0
  401. package/dist/components/ui-toc/UIToc.d.ts +1 -0
  402. package/dist/components/ui-toc/UIToc.en.d.ts +1 -0
  403. package/dist/components/ui-toolbar/UIToolbar.d.ts +13 -10
  404. package/dist/components/ui-toolbar/UIToolbar.en.d.ts +138 -84
  405. package/dist/components/ui-toolbar/UIToolbar.es.d.ts +2 -0
  406. package/dist/components/ui-transition/UITransition.d.ts +1 -0
  407. package/dist/components/ui-transition/UITransition.en.d.ts +1 -0
  408. package/dist/components/ui-tree/UITree.d.ts +162 -0
  409. package/dist/components/ui-tree/UITree.en.d.ts +88 -0
  410. package/dist/components/ui-tree/UITree.es.d.ts +35 -0
  411. package/dist/components/ui-tree/UITreeItem.d.ts +204 -0
  412. package/dist/components/ui-tree/UITreeItem.en.d.ts +142 -0
  413. package/dist/components/ui-tree/UITreeItem.es.d.ts +32 -0
  414. package/dist/components/ui-tree/index.d.ts +3 -0
  415. package/dist/components/ui-tree-diagram/TreeData.d.ts +3 -12
  416. package/dist/components/ui-tree-diagram/TreeLayout.d.ts +54 -21
  417. package/dist/components/ui-tree-diagram/TreeMeasure.d.ts +36 -0
  418. package/dist/components/ui-tree-diagram/UITreeDiagram.d.ts +152 -27
  419. package/dist/components/ui-tree-diagram/UITreeDiagram.en.d.ts +47 -7
  420. package/dist/components/ui-tree-diagram/UITreeDiagram.es.d.ts +12 -1
  421. package/dist/components/ui-tree-diagram/UITreeDiagram.types.d.ts +66 -21
  422. package/dist/components/ui-tree-diagram/UITreeNode.d.ts +148 -0
  423. package/dist/components/ui-tree-diagram/UITreeNode.en.d.ts +69 -0
  424. package/dist/components/ui-tree-diagram/UITreeNode.es.d.ts +21 -0
  425. package/dist/components/ui-tree-diagram/index.d.ts +4 -2
  426. package/dist/components/ui-video/UIAudio.d.ts +1 -0
  427. package/dist/components/ui-video/UIAudio.en.d.ts +1 -0
  428. package/dist/components/ui-video/UIVideo.d.ts +1 -0
  429. package/dist/components/ui-video/UIVideo.en.d.ts +1 -0
  430. package/dist/components/ui-visibility/UIVisibility.d.ts +1 -0
  431. package/dist/components/ui-visibility/UIVisibility.en.d.ts +1 -0
  432. package/dist/components/ui-zoom/UIZoom.d.ts +1 -0
  433. package/dist/components/ui-zoom/UIZoom.en.d.ts +1 -0
  434. package/dist/{components.es-DmLzT-Bq.js → components.es-BOa_7gFF.js} +498 -109
  435. package/dist/components.es-BOa_7gFF.js.map +1 -0
  436. package/dist/core.d.ts +3 -1
  437. package/dist/core.js +1082 -511
  438. package/dist/core.js.map +1 -1
  439. package/dist/crisp-VfYZlTph.js +6 -0
  440. package/dist/{crisp-CoZRRDuQ.js.map → crisp-VfYZlTph.js.map} +1 -1
  441. package/dist/docs-components/index.d.ts +1 -0
  442. package/dist/docs-components/ui-docs-index/UIDocsIndex.d.ts +89 -0
  443. package/dist/docs-components/ui-docs-index/UIDocsIndex.en.d.ts +43 -0
  444. package/dist/docs-components/ui-docs-index/index.d.ts +2 -0
  445. package/dist/docs-components/ui-docs-nav/UIDocsNav.d.ts +54 -87
  446. package/dist/docs-components/ui-docs-nav/UIDocsNav.types.d.ts +2 -29
  447. package/dist/docs-components/ui-docs-search/SearchIndex.d.ts +8 -2
  448. package/dist/docs-components/ui-docs-search/UIDocsSearch.d.ts +10 -0
  449. package/dist/docs-components/ui-docs-search/UIDocsSearch.en.d.ts +5 -0
  450. package/dist/elements/AddressParameter.d.ts +87 -0
  451. package/dist/elements/DOMFormControl.d.ts +5 -0
  452. package/dist/elements/FormComponent.d.ts +32 -0
  453. package/dist/elements/LoadableBody.d.ts +6 -1
  454. package/dist/elements/LoadableComponent.d.ts +10 -1
  455. package/dist/elements/RootSettings.d.ts +43 -6
  456. package/dist/elements/SpellUISettings.d.ts +1 -0
  457. package/dist/elements/StickyWatch.d.ts +20 -0
  458. package/dist/elements/elements.types.d.ts +15 -0
  459. package/dist/elements/index.d.ts +2 -0
  460. package/dist/forms.js +93 -63
  461. package/dist/forms.js.map +1 -1
  462. package/dist/fruity-BRVlgJZd.js +6 -0
  463. package/dist/fruity-BRVlgJZd.js.map +1 -0
  464. package/dist/{fruity.theme-BJcMiPl1.js → fruity.theme-CbC7Jyvk.js} +2 -2
  465. package/dist/fruity.theme-CbC7Jyvk.js.map +1 -0
  466. package/dist/glass-x9tbbwVq.js +6 -0
  467. package/dist/glass-x9tbbwVq.js.map +1 -0
  468. package/dist/glass.theme-24wY2wH9.js +6 -0
  469. package/dist/glass.theme-24wY2wH9.js.map +1 -0
  470. package/dist/hot.js +536 -26
  471. package/dist/hot.js.map +1 -1
  472. package/dist/index.d.ts +8 -0
  473. package/dist/index.js +91 -81
  474. package/dist/jsx.d.ts +21149 -10377
  475. package/dist/matrix-QY2gWbJ0.js +6 -0
  476. package/dist/{matrix-CqA59hiF.js.map → matrix-QY2gWbJ0.js.map} +1 -1
  477. package/dist/{matrix.theme-jqQZjcq3.js → matrix.theme-_8xtwhDq.js} +2 -2
  478. package/dist/matrix.theme-_8xtwhDq.js.map +1 -0
  479. package/dist/midnight-BxlTQSfw.js +6 -0
  480. package/dist/{midnight-BnoVOrhC.js.map → midnight-BxlTQSfw.js.map} +1 -1
  481. package/dist/mockup-83ELBuVr.js +6 -0
  482. package/dist/mockup-83ELBuVr.js.map +1 -0
  483. package/dist/mockup.theme-DmpBgGBl.js +6 -0
  484. package/dist/mockup.theme-DmpBgGBl.js.map +1 -0
  485. package/dist/paper-M61nUilz.js +6 -0
  486. package/dist/{paper-CynH8ZuT.js.map → paper-M61nUilz.js.map} +1 -1
  487. package/dist/persist.types-D2m6wD-S.js +9 -0
  488. package/dist/persist.types-D2m6wD-S.js.map +1 -0
  489. package/dist/pop-CxXfytjk.js +6 -0
  490. package/dist/{pop-D2i9V_rG.js.map → pop-CxXfytjk.js.map} +1 -1
  491. package/dist/runtime/DataTooltips.d.ts +75 -0
  492. package/dist/runtime/PropertyControls.d.ts +15 -1
  493. package/dist/runtime/Sources.d.ts +16 -4
  494. package/dist/runtime/Styles.d.ts +11 -0
  495. package/dist/runtime/Themes.d.ts +10 -4
  496. package/dist/runtime/UIRuntime.d.ts +4 -1
  497. package/dist/runtime/index.d.ts +1 -1
  498. package/dist/runtime/runtime.types.d.ts +18 -85
  499. package/dist/spell-By5Y3jKP.js +6 -0
  500. package/dist/{spell-BFtLICm7.js.map → spell-By5Y3jKP.js.map} +1 -1
  501. package/dist/{spell.theme-B7AU7SQX.js → spell.theme-DxGj7qHx.js} +2 -2
  502. package/dist/spell.theme-DxGj7qHx.js.map +1 -0
  503. package/dist/styles/CodeThemeFile.d.ts +73 -0
  504. package/dist/styles/StyleGenerator.d.ts +6 -0
  505. package/dist/styles/styles.en.d.ts +141 -3
  506. package/dist/styles/styles.types.d.ts +2 -0
  507. package/dist/{styles.en-RLpYiO5_.js → styles.en-CUUxNwHo.js} +71 -14
  508. package/dist/styles.en-CUUxNwHo.js.map +1 -0
  509. package/dist/styles.js +13 -13
  510. package/dist/styles.js.map +1 -1
  511. package/dist/ui-accordion.js +54 -53
  512. package/dist/ui-accordion.js.map +1 -1
  513. package/dist/ui-action.js +20 -19
  514. package/dist/ui-action.js.map +1 -1
  515. package/dist/ui-ad.js +5 -4
  516. package/dist/ui-ad.js.map +1 -1
  517. package/dist/ui-breadcrumbs.js +15 -13
  518. package/dist/ui-breadcrumbs.js.map +1 -1
  519. package/dist/ui-button.js +132 -125
  520. package/dist/ui-button.js.map +1 -1
  521. package/dist/ui-calendar.js +208 -206
  522. package/dist/ui-calendar.js.map +1 -1
  523. package/dist/ui-card.js +260 -98
  524. package/dist/ui-card.js.map +1 -1
  525. package/dist/ui-checkbox.js +95 -81
  526. package/dist/ui-checkbox.js.map +1 -1
  527. package/dist/ui-code.js +25 -24
  528. package/dist/ui-code.js.map +1 -1
  529. package/dist/ui-comment.js +14 -12
  530. package/dist/ui-comment.js.map +1 -1
  531. package/dist/ui-components.js +7 -6
  532. package/dist/ui-components.js.map +1 -1
  533. package/dist/ui-container.js +24 -12
  534. package/dist/ui-container.js.map +1 -1
  535. package/dist/ui-diagram.js +1328 -0
  536. package/dist/ui-diagram.js.map +1 -0
  537. package/dist/ui-dimension.js +779 -0
  538. package/dist/ui-dimension.js.map +1 -0
  539. package/dist/ui-dimmer.js +36 -34
  540. package/dist/ui-dimmer.js.map +1 -1
  541. package/dist/ui-divider.js +7 -5
  542. package/dist/ui-divider.js.map +1 -1
  543. package/dist/ui-dropdown.js +107 -105
  544. package/dist/ui-dropdown.js.map +1 -1
  545. package/dist/ui-embed.js +36 -35
  546. package/dist/ui-embed.js.map +1 -1
  547. package/dist/ui-emoji.js +10 -9
  548. package/dist/ui-emoji.js.map +1 -1
  549. package/dist/ui-example.js +63 -61
  550. package/dist/ui-example.js.map +1 -1
  551. package/dist/ui-feed.js +12 -10
  552. package/dist/ui-feed.js.map +1 -1
  553. package/dist/ui-flag.js +10 -9
  554. package/dist/ui-flag.js.map +1 -1
  555. package/dist/ui-flyout.js +7 -6
  556. package/dist/ui-flyout.js.map +1 -1
  557. package/dist/ui-form.js +244 -162
  558. package/dist/ui-form.js.map +1 -1
  559. package/dist/ui-grid.js +21 -18
  560. package/dist/ui-grid.js.map +1 -1
  561. package/dist/ui-icon-picker.js +46 -44
  562. package/dist/ui-icon-picker.js.map +1 -1
  563. package/dist/ui-icon.js +17 -14
  564. package/dist/ui-icon.js.map +1 -1
  565. package/dist/ui-image.js +93 -55
  566. package/dist/ui-image.js.map +1 -1
  567. package/dist/ui-include.js +18 -17
  568. package/dist/ui-include.js.map +1 -1
  569. package/dist/ui-input.js +154 -112
  570. package/dist/ui-input.js.map +1 -1
  571. package/dist/ui-item.js +152 -102
  572. package/dist/ui-item.js.map +1 -1
  573. package/dist/ui-items.js +9 -8
  574. package/dist/ui-items.js.map +1 -1
  575. package/dist/ui-json.js +115 -0
  576. package/dist/ui-json.js.map +1 -0
  577. package/dist/ui-keys.js +1 -1
  578. package/dist/ui-label.js +18 -15
  579. package/dist/ui-label.js.map +1 -1
  580. package/dist/ui-list.js +7 -5
  581. package/dist/ui-list.js.map +1 -1
  582. package/dist/ui-loader.js +7 -6
  583. package/dist/ui-loader.js.map +1 -1
  584. package/dist/ui-markdown.js +975 -83
  585. package/dist/ui-markdown.js.map +1 -1
  586. package/dist/ui-menu.js +329 -196
  587. package/dist/ui-menu.js.map +1 -1
  588. package/dist/ui-message.js +20 -18
  589. package/dist/ui-message.js.map +1 -1
  590. package/dist/ui-modal.js +46 -45
  591. package/dist/ui-modal.js.map +1 -1
  592. package/dist/ui-nag.js +19 -18
  593. package/dist/ui-nag.js.map +1 -1
  594. package/dist/ui-page.js +8 -7
  595. package/dist/ui-page.js.map +1 -1
  596. package/dist/ui-panel.js +28 -17
  597. package/dist/ui-panel.js.map +1 -1
  598. package/dist/ui-parts.js +66 -52
  599. package/dist/ui-parts.js.map +1 -1
  600. package/dist/ui-placeholder.js +21 -16
  601. package/dist/ui-placeholder.js.map +1 -1
  602. package/dist/ui-popup.js +113 -84
  603. package/dist/ui-popup.js.map +1 -1
  604. package/dist/ui-progress.js +9 -7
  605. package/dist/ui-progress.js.map +1 -1
  606. package/dist/ui-property-editor.js +706 -203
  607. package/dist/ui-property-editor.js.map +1 -1
  608. package/dist/ui-quote.js +5 -4
  609. package/dist/ui-quote.js.map +1 -1
  610. package/dist/ui-rail.js +5 -4
  611. package/dist/ui-rail.js.map +1 -1
  612. package/dist/ui-rating.js +31 -29
  613. package/dist/ui-rating.js.map +1 -1
  614. package/dist/ui-reveal.js +7 -6
  615. package/dist/ui-reveal.js.map +1 -1
  616. package/dist/ui-root.js +324 -158
  617. package/dist/ui-root.js.map +1 -1
  618. package/dist/ui-search.js +210 -168
  619. package/dist/ui-search.js.map +1 -1
  620. package/dist/ui-section.js +167 -130
  621. package/dist/ui-section.js.map +1 -1
  622. package/dist/ui-segment.js +15 -12
  623. package/dist/ui-segment.js.map +1 -1
  624. package/dist/ui-select.js +83 -81
  625. package/dist/ui-select.js.map +1 -1
  626. package/dist/ui-shape.js +86 -58
  627. package/dist/ui-shape.js.map +1 -1
  628. package/dist/ui-sidebar.js +59 -56
  629. package/dist/ui-sidebar.js.map +1 -1
  630. package/dist/ui-sides.js +325 -0
  631. package/dist/ui-sides.js.map +1 -0
  632. package/dist/ui-site-nav.js +329 -0
  633. package/dist/ui-site-nav.js.map +1 -0
  634. package/dist/ui-site-tabs.js +177 -0
  635. package/dist/ui-site-tabs.js.map +1 -0
  636. package/dist/ui-slider.js +84 -81
  637. package/dist/ui-slider.js.map +1 -1
  638. package/dist/ui-space.js +7 -6
  639. package/dist/ui-space.js.map +1 -1
  640. package/dist/ui-split-panel.js +298 -0
  641. package/dist/ui-split-panel.js.map +1 -0
  642. package/dist/ui-stack.js +47 -23
  643. package/dist/ui-stack.js.map +1 -1
  644. package/dist/ui-statistic.js +15 -13
  645. package/dist/ui-statistic.js.map +1 -1
  646. package/dist/ui-step.js +31 -29
  647. package/dist/ui-step.js.map +1 -1
  648. package/dist/ui-sticky.js +7 -6
  649. package/dist/ui-sticky.js.map +1 -1
  650. package/dist/ui-tab.js +230 -138
  651. package/dist/ui-tab.js.map +1 -1
  652. package/dist/ui-table.js +724 -162
  653. package/dist/ui-table.js.map +1 -1
  654. package/dist/ui-terms.js +12 -10
  655. package/dist/ui-terms.js.map +1 -1
  656. package/dist/ui-text.js +53 -28
  657. package/dist/ui-text.js.map +1 -1
  658. package/dist/ui-theme-editor.js +1018 -1545
  659. package/dist/ui-theme-editor.js.map +1 -1
  660. package/dist/ui-theme-menu-CuIjr8Ou.js +1493 -0
  661. package/dist/ui-theme-menu-CuIjr8Ou.js.map +1 -0
  662. package/dist/ui-toast.js +45 -44
  663. package/dist/ui-toast.js.map +1 -1
  664. package/dist/ui-toc.js +75 -74
  665. package/dist/ui-toc.js.map +1 -1
  666. package/dist/ui-toolbar.js +51 -73
  667. package/dist/ui-toolbar.js.map +1 -1
  668. package/dist/ui-transition.js +12 -11
  669. package/dist/ui-transition.js.map +1 -1
  670. package/dist/ui-tree-diagram.js +676 -197
  671. package/dist/ui-tree-diagram.js.map +1 -1
  672. package/dist/ui-tree.js +625 -0
  673. package/dist/ui-tree.js.map +1 -0
  674. package/dist/ui-video.js +13 -11
  675. package/dist/ui-video.js.map +1 -1
  676. package/dist/ui-visibility.js +26 -25
  677. package/dist/ui-visibility.js.map +1 -1
  678. package/dist/ui-zoom.js +79 -78
  679. package/dist/ui-zoom.js.map +1 -1
  680. package/dist/util/TopLayerTip.d.ts +28 -0
  681. package/dist/util/index.d.ts +5 -2
  682. package/dist/vocabulary/DefaultValues.d.ts +34 -0
  683. package/dist/vocabulary/SharedVocabulary.d.ts +4 -0
  684. package/dist/vocabulary/SharedVocabulary.es.d.ts +7 -0
  685. package/dist/vocabulary/ValueSets.d.ts +18 -0
  686. package/dist/vocabulary/Vocabulary.d.ts +1 -0
  687. package/dist/vocabulary/defaults.generated.d.ts +6 -0
  688. package/dist/vocabulary/index.d.ts +1 -0
  689. package/package.json +1 -1
  690. package/dist/MarkdownEngine-CbuT9Mjc.js.map +0 -1
  691. package/dist/PrefStore-CeaTtjTz.js.map +0 -1
  692. package/dist/UIButton-XkfGqgh6.js +0 -6
  693. package/dist/UIButton-XkfGqgh6.js.map +0 -1
  694. package/dist/UIInput-BUudZstW.js +0 -6
  695. package/dist/UIInput-BUudZstW.js.map +0 -1
  696. package/dist/UIKeys-DJF2TIKE.js.map +0 -1
  697. package/dist/UILabel-C1jy3Yl8.js +0 -6
  698. package/dist/UILabel-C1jy3Yl8.js.map +0 -1
  699. package/dist/UIMenu-Btd-8V3A.js +0 -42
  700. package/dist/UIMenu-Btd-8V3A.js.map +0 -1
  701. package/dist/UIRuntime-BBuehGly.js.map +0 -1
  702. package/dist/components.es-DmLzT-Bq.js.map +0 -1
  703. package/dist/crisp-CoZRRDuQ.js +0 -6
  704. package/dist/fruity-CQFYeRlh.js +0 -6
  705. package/dist/fruity-CQFYeRlh.js.map +0 -1
  706. package/dist/fruity.theme-BJcMiPl1.js.map +0 -1
  707. package/dist/glass-CAfW11kL.js +0 -6
  708. package/dist/glass-CAfW11kL.js.map +0 -1
  709. package/dist/glass.theme-DQcBbtCW.js +0 -6
  710. package/dist/glass.theme-DQcBbtCW.js.map +0 -1
  711. package/dist/matrix-CqA59hiF.js +0 -6
  712. package/dist/matrix.theme-jqQZjcq3.js.map +0 -1
  713. package/dist/midnight-BnoVOrhC.js +0 -6
  714. package/dist/paper-CynH8ZuT.js +0 -6
  715. package/dist/persist.types-CsZxS8TG.js +0 -9
  716. package/dist/persist.types-CsZxS8TG.js.map +0 -1
  717. package/dist/pop-D2i9V_rG.js +0 -6
  718. package/dist/spell-BFtLICm7.js +0 -6
  719. package/dist/spell.theme-B7AU7SQX.js.map +0 -1
  720. package/dist/styles.en-RLpYiO5_.js.map +0 -1
  721. package/dist/ui-theme-menu-DyKZygpV.js +0 -921
  722. package/dist/ui-theme-menu-DyKZygpV.js.map +0 -1
@@ -0,0 +1,1493 @@
1
+ import { n as e, r as t } from "./rolldown-runtime-CYGlBXrH.js";
2
+ import { Bt as n, D as r, Ht as i, Lt as a, Ot as o, Rt as s, UI as c, UIComponent as l, Ut as u, Vt as d, Warnings as f, after as ee, beforeNextPaint as p, cssState as m, derived as te, kt as h, once as ne, p as re, proto as ie, protoMerged as ae, state as g, untracked as oe, whileConnected as se, zt as ce } from "./core.js";
3
+ import "./ui-item.js";
4
+ import "./ui-dropdown.js";
5
+ import "./ui-icon.js";
6
+ import { r as le, t as _ } from "./PrefStore-Qv0e5y04.js";
7
+ import "./ui-popup.js";
8
+ import { a as ue, i as de, n as v, r as fe, s as pe, t as y } from "./persist.types-D2m6wD-S.js";
9
+ import { For as b, Show as x } from "solid-js";
10
+ import { claimElement as me, className as S, createComponent as C, delegateEvents as he, effect as w, getOwner as T, insert as E, isServer as D, memo as ge, readShallow as O, ref as _e, setAttribute as k, style as ve, template as A } from "@solidjs/web";
11
+ //#region ../src/util/persist/ColorScheme.ts
12
+ var ye = "scheme", be = "both", xe = Symbol("not read"), j = class ColorScheme {
13
+ static chosen() {
14
+ return ColorScheme.fromAddress() ?? schemeOf$1(_.getAt("spell-site:scheme")) ?? ColorScheme.moveOldKeys();
15
+ }
16
+ static choose(e) {
17
+ ColorScheme.addressed = void 0, _.setAt(v, e), ColorScheme.apply(e);
18
+ }
19
+ static remember(e) {
20
+ _.setAt(v, e), ColorScheme.apply(ColorScheme.chosen());
21
+ }
22
+ static apply(e, t) {
23
+ t ??= globalThis.document?.documentElement, t && (t.classList.toggle(y.light, e === "light"), t.classList.toggle(y.dark, e === "dark"), e ? t.style.colorScheme = e : t.style.removeProperty("color-scheme"));
24
+ }
25
+ static rereadAddress() {
26
+ ColorScheme.addressed = xe;
27
+ }
28
+ static addressed = xe;
29
+ static fromAddress() {
30
+ if (ColorScheme.addressed !== xe) return ColorScheme.addressed;
31
+ let e = globalThis.location?.search ?? "", t = new URLSearchParams(e).get(ye) || void 0, n = schemeOf$1(t);
32
+ return t && !n && t !== be && console.warn(`ColorScheme: the address's scheme \`${t}\` is neither light nor dark; ignored`), ColorScheme.addressed = n;
33
+ }
34
+ static osScheme() {
35
+ return typeof matchMedia == "function" && matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
36
+ }
37
+ static forcedBy(e) {
38
+ if (e.contains(y.dark)) return "dark";
39
+ if (e.contains(y.light)) return "light";
40
+ }
41
+ static shown() {
42
+ let e = globalThis.document?.documentElement;
43
+ return (e && ColorScheme.forcedBy(e.classList)) ?? ColorScheme.chosen() ?? ColorScheme.osScheme();
44
+ }
45
+ static watch(e) {
46
+ if (typeof window > "u" || typeof matchMedia != "function") return () => {};
47
+ let t = matchMedia(de), onOs = () => e("os"), onStorage = (t) => {
48
+ (t.key === "spell-site:scheme" || t.key === null) && (ColorScheme.apply(ColorScheme.chosen()), e("chosen"));
49
+ };
50
+ return t.addEventListener("change", onOs), window.addEventListener("storage", onStorage), () => {
51
+ t.removeEventListener("change", onOs), window.removeEventListener("storage", onStorage);
52
+ };
53
+ }
54
+ static moveOldKeys() {
55
+ let e;
56
+ for (let t of ue) e ??= schemeOf$1(_.getAt(t)), _.setAt(t, void 0);
57
+ return e && _.setAt(v, e), e;
58
+ }
59
+ };
60
+ function schemeOf$1(e) {
61
+ return fe.includes(e) ? e : void 0;
62
+ }
63
+ t(schemeOf$1, "schemeOf");
64
+ //#endregion
65
+ //#region ../src/util/persist/WaitedOnPlace.ts
66
+ var WaitedOnPlace = class extends le {
67
+ isAsync = !0;
68
+ read(e) {
69
+ throw this.quickReadError("read", e);
70
+ }
71
+ keys(e) {
72
+ throw this.quickReadError("keys", e);
73
+ }
74
+ write(e, t, n) {
75
+ this.save(e, t, n);
76
+ }
77
+ remove(e, t) {
78
+ this.save(e, t, void 0);
79
+ }
80
+ quickReadError(e, t) {
81
+ return /* @__PURE__ */ TypeError(`PrefPlace.${e}(): \`${t}\` keeps its values in ${this.description}, which must be waited on; use \`load()\` or \`loadKeys()\``);
82
+ }
83
+ }, Se = class ServerPlace extends WaitedOnPlace {
84
+ description = "the server";
85
+ url;
86
+ constructor({ url: e = Ce, fetch: t } = {}) {
87
+ super(), this.url = e.replace(/\/+$/, ""), this.fetch = t ?? ((e, t) => globalThis.fetch(e, t));
88
+ }
89
+ static get shared() {
90
+ return ServerPlace._shared ??= new ServerPlace();
91
+ }
92
+ static _shared;
93
+ async load(e, t) {
94
+ return (await this.ask("load", e, t, `load?${query({
95
+ store: e,
96
+ key: t
97
+ })}`))?.value;
98
+ }
99
+ async save(e, t, n) {
100
+ let r = n === void 0 ? {
101
+ store: e,
102
+ key: t
103
+ } : {
104
+ store: e,
105
+ key: t,
106
+ value: n
107
+ };
108
+ await this.ask("save", e, t, "save", r);
109
+ }
110
+ async loadKeys(e) {
111
+ return (await this.ask("loadKeys", e, "", `keys?${query({
112
+ store: e,
113
+ under: ""
114
+ })}`))?.keys ?? [];
115
+ }
116
+ async removeUnder(e, t) {
117
+ let n = {
118
+ store: e,
119
+ under: t
120
+ };
121
+ await this.ask("removeUnder", e, t, "forget", n);
122
+ }
123
+ fetch;
124
+ async ask(e, t, n, r, i) {
125
+ try {
126
+ let e = await this.fetch(`${this.url}/${r}`, {
127
+ method: i ? "POST" : "GET",
128
+ headers: i ? { "Content-Type": "application/json" } : void 0,
129
+ body: i ? JSON.stringify(i) : void 0
130
+ });
131
+ if (!e.ok) throw Error(`${e.status} ${e.statusText}: ${await e.text()}`);
132
+ return await e.json();
133
+ } catch (r) {
134
+ console.error(`ServerPlace.${e}(): ${this.url} refused \`${t}\` \`${n}\`:`), console.error(r);
135
+ return;
136
+ }
137
+ }
138
+ }, Ce = "/api/prefs";
139
+ function query(e) {
140
+ return new URLSearchParams(e).toString();
141
+ }
142
+ //#endregion
143
+ //#region ../src/util/ReconnectingSocket.ts
144
+ var we = 1e3, Te = 1e4, ReconnectingSocket = class {
145
+ address;
146
+ props;
147
+ socket;
148
+ retry;
149
+ isStopped = !1;
150
+ wait;
151
+ constructor(e, t = {}) {
152
+ this.address = e, this.props = t, this.wait = t.firstWait ?? we, this.open();
153
+ }
154
+ get isOpen() {
155
+ return this.socket?.readyState === 1;
156
+ }
157
+ send(e) {
158
+ return this.isOpen ? (this.socket.send(e), !0) : !1;
159
+ }
160
+ close() {
161
+ this.isStopped = !0, this.retry?.cancel(), this.retry = void 0, this.socket?.close();
162
+ }
163
+ open() {
164
+ if (this.isStopped || typeof WebSocket > "u") return;
165
+ let e = socketAddressOf(typeof this.address == "function" ? this.address() : this.address), t = this.props.protocols ? new WebSocket(e, [...this.props.protocols]) : new WebSocket(e);
166
+ this.socket = t;
167
+ let n = !1;
168
+ t.addEventListener("open", () => {
169
+ n = !0, this.wait = this.props.firstWait ?? we, this.props.onOpen?.();
170
+ }), t.addEventListener("message", (e) => this.props.onMessage?.(e.data)), t.addEventListener("close", () => {
171
+ if (this.socket === t && (this.socket = void 0), n && this.props.onClose?.(), this.isStopped) return;
172
+ let e = this.wait;
173
+ this.wait = Math.min(e * 2, Te), this.retry = ee(e / 1e3, () => this.open());
174
+ });
175
+ }
176
+ };
177
+ function socketAddressOf(e) {
178
+ let t = new URL(e, typeof location > "u" ? void 0 : location.href);
179
+ return t.protocol = t.protocol.replace(/^http/, "ws"), t;
180
+ }
181
+ //#endregion
182
+ //#region src/components/ui-theme-editor/UIThemeEditor.types.ts
183
+ var M = "theme-edits", Ee = "fruity", De = ["glass", "fruity"], Oe = "fruity", ke = {
184
+ min: 12,
185
+ max: 20,
186
+ step: 1
187
+ }, Ae = "spell-theme-bench", N = class SavedTheme {
188
+ static PREFIX = "mine:";
189
+ static get list() {
190
+ SavedTheme.moveOldTheme();
191
+ let e = _.getAt(P);
192
+ return Array.isArray(e) ? e.filter(isMyTheme) : [];
193
+ }
194
+ static get(e) {
195
+ return SavedTheme.list.find((t) => t.id === e);
196
+ }
197
+ static picked(e) {
198
+ return e?.startsWith(SavedTheme.PREFIX) ? SavedTheme.get(e.slice(SavedTheme.PREFIX.length)) : void 0;
199
+ }
200
+ static pickName(e) {
201
+ return `${SavedTheme.PREFIX}${e.id}`;
202
+ }
203
+ static save({ id: e, name: t, choices: n, css: r }) {
204
+ let i = [...SavedTheme.list], a = {
205
+ id: e ?? SavedTheme.newId(),
206
+ name: t,
207
+ choices: {
208
+ ...n,
209
+ name: t
210
+ },
211
+ css: r
212
+ }, o = i.findIndex((e) => e.id === a.id);
213
+ return o === -1 ? i.push(a) : i[o] = a, _.setAt(P, i), a;
214
+ }
215
+ static remove(e) {
216
+ _.setAt(P, SavedTheme.list.filter((t) => t.id !== e));
217
+ }
218
+ static freeName(e) {
219
+ let t = new Set(SavedTheme.list.map((e) => e.name));
220
+ if (!t.has(e)) return e;
221
+ let n = 2;
222
+ for (; t.has(`${e} ${n}`);) n++;
223
+ return `${e} ${n}`;
224
+ }
225
+ static async wear(e, t) {
226
+ let n = ++SavedTheme.calls, { themes: r, styles: i } = await c.load();
227
+ r.current !== e && await r.apply(e), n === SavedTheme.calls && i.register(M, t, { page: !0 });
228
+ }
229
+ static putOnPage(e) {
230
+ SavedTheme.calls++, c.styles.register(M, e, { page: !0 });
231
+ }
232
+ static calls = 0;
233
+ static newId() {
234
+ return `${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`;
235
+ }
236
+ static moveOldTheme() {
237
+ let e = _.getAt(je);
238
+ if (e === void 0 || (_.setAt(je, void 0), typeof e.css != "string" || typeof e.choices?.base != "string")) return;
239
+ let t = `My ${h.titleOf(e.choices.base)}`, n = _.getAt(P), r = Array.isArray(n) ? n.filter(isMyTheme) : [];
240
+ _.setAt(P, [{
241
+ id: SavedTheme.newId(),
242
+ name: t,
243
+ choices: {
244
+ ...e.choices,
245
+ name: t
246
+ },
247
+ css: e.css
248
+ }, ...r]), f.devWarn("SavedTheme", `the theme kept in this browser is now "${t}", the first of My themes`);
249
+ }
250
+ };
251
+ function isMyTheme(e) {
252
+ let t = e;
253
+ return typeof t?.id == "string" && typeof t.name == "string" && typeof t.css == "string" && typeof t.choices?.base == "string";
254
+ }
255
+ var P = "spell-ui:themes", je = "spell-ui:theme", Me = [
256
+ "light",
257
+ "dark",
258
+ "system"
259
+ ], Ne = {}, Pe = "glass", F = "spell-site", Fe = "ui-scheme-switching", I = {
260
+ scheme: v,
261
+ theme: `${F}:theme`
262
+ }, Ie = [
263
+ "spell-ui-site:theme",
264
+ "spell-epic:theme",
265
+ "spell-app:theme"
266
+ ], Le, Re, ze, L, R, z = {
267
+ theme: "theme",
268
+ scheme: "scheme"
269
+ };
270
+ ze = [g], Re = [ne], Le = [ne];
271
+ var B = class _ThemePreference {
272
+ static get keptIn() {
273
+ return _ThemePreference.kept ??= _ThemePreference.serverKeepsPrefs && !isSameOriginFrame() ? "space" : "browser";
274
+ }
275
+ static keepIn(e, t = F) {
276
+ _ThemePreference.kept = e, _ThemePreference.store = t, _ThemePreference.spaced = void 0;
277
+ }
278
+ static get chosen() {
279
+ return _ThemePreference.current ??= _ThemePreference.read();
280
+ }
281
+ static osScheme() {
282
+ return j.osScheme();
283
+ }
284
+ static shownScheme(e = _ThemePreference.chosen.scheme) {
285
+ return e === "system" ? _ThemePreference.osScheme() : e;
286
+ }
287
+ static async setTheme(e) {
288
+ let t = _ThemePreference.tintFor(e, _ThemePreference.chosen.tint);
289
+ _ThemePreference.update({
290
+ ..._ThemePreference.chosen,
291
+ theme: e,
292
+ tint: t
293
+ }), _ThemePreference.remember(e, t), await _ThemePreference.applyTheme(e);
294
+ }
295
+ static async setTint(e) {
296
+ let { theme: t } = _ThemePreference.chosen, n = _ThemePreference.tintFor(t, e);
297
+ _ThemePreference.update({
298
+ ..._ThemePreference.chosen,
299
+ tint: n
300
+ }), _ThemePreference.remember(t, n), await _ThemePreference.applyTheme(t);
301
+ }
302
+ static tintsFor(e) {
303
+ if (e.startsWith(N.PREFIX)) return [];
304
+ let t = Ne[e] ?? [];
305
+ return o.filter((e) => !t.includes(e));
306
+ }
307
+ static pickText(e, t) {
308
+ return t ? `${e}${Be}${t}` : e;
309
+ }
310
+ static pickOf(e) {
311
+ if (e.startsWith(N.PREFIX)) return { theme: e };
312
+ let [t = "", n] = e.split(Be);
313
+ return o.includes(n) ? {
314
+ theme: t,
315
+ tint: n
316
+ } : { theme: t };
317
+ }
318
+ static setScheme(e) {
319
+ _ThemePreference.update({
320
+ ..._ThemePreference.chosen,
321
+ scheme: e
322
+ }), _ThemePreference.withoutTransitions(document.documentElement), j.choose(chosenFor(e)), _ThemePreference.saveToSpace("scheme", e);
323
+ }
324
+ static flipScheme() {
325
+ let e = _ThemePreference.shownScheme() === "dark" ? "light" : "dark";
326
+ return _ThemePreference.setScheme(e), e;
327
+ }
328
+ static applyScheme(e, t = document.documentElement) {
329
+ _ThemePreference.withoutTransitions(t), j.apply(chosenFor(e), t);
330
+ }
331
+ static async restore() {
332
+ let { theme: e, scheme: t } = _ThemePreference.chosen;
333
+ _ThemePreference.applyScheme(t), _ThemePreference.watch(), _ThemePreference.followSpace(), await _ThemePreference.applyTheme(e), await _ThemePreference.askSpace();
334
+ }
335
+ static async askSpace() {
336
+ let e = _ThemePreference.spaceStore;
337
+ if (e) try {
338
+ let [t, n] = await Promise.all([e.load("theme"), e.load("scheme")]);
339
+ t === void 0 && _ThemePreference.saveToSpace("theme", _ThemePreference.picked()), n === void 0 && _ThemePreference.saveToSpace("scheme", schemeOf(_.getAt(v))), await _ThemePreference.took({
340
+ theme: t,
341
+ scheme: n
342
+ });
343
+ } catch (e) {
344
+ console.error("ThemePreference.askSpace(): couldn't wear the space's theme", e);
345
+ }
346
+ }
347
+ static subscribe(e) {
348
+ return _ThemePreference.watch(), _ThemePreference.listeners.add(e), () => {
349
+ _ThemePreference.listeners.delete(e);
350
+ };
351
+ }
352
+ static osChanged() {
353
+ _ThemePreference.tell(_ThemePreference.chosen);
354
+ }
355
+ static async wear(e) {
356
+ _ThemePreference.worn = e, await _ThemePreference.applyTheme(_ThemePreference.chosen.theme);
357
+ }
358
+ static addressWith(e, { theme: t, scheme: n }) {
359
+ let r = new URL(e, typeof location > "u" ? "http://localhost" : location.href);
360
+ return t && r.searchParams.set(z.theme, t), n && r.searchParams.set(z.scheme, n), r.href;
361
+ }
362
+ static async heard(e) {
363
+ e.store === _ThemePreference.store && (e.key === "theme" || e.key === "scheme") && await _ThemePreference.took({ [e.key]: e.value });
364
+ }
365
+ static reset() {
366
+ _ThemePreference.current = void 0, _ThemePreference.store = F, _ThemePreference.addressed = void 0, _ThemePreference.kept = void 0, _ThemePreference.spaced = void 0, j.rereadAddress();
367
+ }
368
+ static get fromAddress() {
369
+ if (_ThemePreference.addressed) return _ThemePreference.addressed;
370
+ let e = new URLSearchParams(typeof location > "u" ? "" : location.search);
371
+ return _ThemePreference.addressed = { theme: e.get(z.theme) || void 0 };
372
+ }
373
+ static get servedPage() {
374
+ return typeof window < "u" && !!window.SPELL_SERVER;
375
+ }
376
+ static get serverKeepsPrefs() {
377
+ return typeof window < "u" && !!window.SPELL_SERVER?.prefs;
378
+ }
379
+ static get spaceStore() {
380
+ return _ThemePreference.spaced === void 0 && (_ThemePreference.spaced = _ThemePreference.keptIn === "space" ? new _(_ThemePreference.store, { place: Se.shared }) : null), _ThemePreference.spaced ?? void 0;
381
+ }
382
+ static remember(e, t) {
383
+ let n = _ThemePreference.pickText(e, t);
384
+ _.setAt(I.theme, n === _ThemePreference.defaultTheme ? void 0 : n), _ThemePreference.saveToSpace("theme", n);
385
+ }
386
+ static tintFor(e, t) {
387
+ return t && _ThemePreference.tintsFor(e).includes(t) ? t : void 0;
388
+ }
389
+ static saveToSpace(e, t) {
390
+ let n = _ThemePreference.spaceStore;
391
+ n && t !== void 0 && n.save(e, t).catch((e) => console.error("ThemePreference: couldn't save", e));
392
+ }
393
+ static async took({ theme: e, scheme: t }) {
394
+ if (isSchemeChoice(t) && t !== _ThemePreference.chosen.scheme && (_ThemePreference.withoutTransitions(document.documentElement), j.remember(chosenFor(t)), _ThemePreference.update({
395
+ ..._ThemePreference.chosen,
396
+ scheme: j.chosen() ?? "system"
397
+ })), typeof e != "string" || !e) return;
398
+ _.setAt(I.theme, e === _ThemePreference.defaultTheme ? void 0 : e);
399
+ let n = _ThemePreference.pickOf(e), { chosen: r } = _ThemePreference;
400
+ _ThemePreference.fromAddress.theme || n.theme === r.theme && n.tint === r.tint || (_ThemePreference.update({
401
+ ...r,
402
+ ...n,
403
+ tint: n.tint
404
+ }), await _ThemePreference.applyTheme(n.theme));
405
+ }
406
+ static followSpace() {
407
+ _ThemePreference.spaceStore && typeof document < "u" && (_ThemePreference.servedPage ? addEventListener(pe, (e) => void _ThemePreference.heard(e.detail)) : _ThemePreference.listenLive(), document.addEventListener("visibilitychange", () => {
408
+ document.visibilityState === "visible" && _ThemePreference.askSpace();
409
+ }));
410
+ }
411
+ static listenLive() {
412
+ new ReconnectingSocket(Ve, { onMessage(e) {
413
+ let { event: t, data: n } = JSON.parse(e);
414
+ t === "pref-saved" && _ThemePreference.heard(n);
415
+ } });
416
+ }
417
+ static watch() {
418
+ j.watch((e) => {
419
+ if (e === "os") return _ThemePreference.osChanged();
420
+ _ThemePreference.update({
421
+ ..._ThemePreference.chosen,
422
+ scheme: j.chosen() ?? "system"
423
+ });
424
+ });
425
+ }
426
+ static withoutTransitions(e) {
427
+ typeof requestAnimationFrame == "function" && (e.classList.add(Fe), p(() => p(() => e.classList.remove(Fe))));
428
+ }
429
+ static update(e) {
430
+ let t = _ThemePreference.chosen;
431
+ _ThemePreference.current = e, (t.theme !== e.theme || t.scheme !== e.scheme || t.tint !== e.tint) && _ThemePreference.tell(e);
432
+ }
433
+ static tell(e) {
434
+ for (let t of [..._ThemePreference.listeners]) t(e);
435
+ }
436
+ static async applyTheme(e) {
437
+ let { themes: t } = await c.load(), n = _ThemePreference.knownName(t, e);
438
+ if (n !== e && e === _ThemePreference.fromAddress.theme) return _ThemePreference.applyAddressed(t, e);
439
+ if (n !== e) return _ThemePreference.setTheme(n);
440
+ let r = _ThemePreference.worn ? void 0 : N.picked(e);
441
+ if (r) return _ThemePreference.isWearingMine = !0, N.wear(r.choices.base, r.css);
442
+ _ThemePreference.isWearingMine && (_ThemePreference.isWearingMine = !1, N.putOnPage(""));
443
+ let { tint: i } = _ThemePreference.chosen;
444
+ if (_ThemePreference.worn || !i) return t.apply(_ThemePreference.worn ?? e);
445
+ let { ThemeDraft: a } = await import("./ThemeDraft-B7NPif4d.js").then((e) => e.n);
446
+ await t.apply(e, { tint: a.tintCss(e, i) });
447
+ }
448
+ static async applyAddressed(e, t) {
449
+ let n = h.nameNow(e, t), r = e.own.includes(n);
450
+ r || f.warn("ThemePreference", `the address's theme \`${t}\` isn't a theme; ignored`), _ThemePreference.addressed = {
451
+ ..._ThemePreference.fromAddress,
452
+ theme: r ? n : void 0
453
+ };
454
+ let i = _ThemePreference.read().theme;
455
+ _ThemePreference.update({
456
+ ..._ThemePreference.chosen,
457
+ theme: i
458
+ }), await _ThemePreference.applyTheme(i);
459
+ }
460
+ static knownName(e, t) {
461
+ if (N.picked(t)) return t;
462
+ let n = h.nameNow(e, t);
463
+ return e.own.includes(n) ? n : _ThemePreference.defaultTheme;
464
+ }
465
+ static read() {
466
+ let { theme: e, tint: t } = _ThemePreference.pickOf(_ThemePreference.fromAddress.theme || _ThemePreference.stored().theme);
467
+ return {
468
+ theme: e,
469
+ scheme: j.chosen() ?? "system",
470
+ ...t && { tint: t }
471
+ };
472
+ }
473
+ static stored() {
474
+ return { theme: _ThemePreference.picked() ?? _ThemePreference.defaultTheme };
475
+ }
476
+ static picked() {
477
+ return textAt(I.theme) ?? _ThemePreference.moveOldKeys();
478
+ }
479
+ static moveOldKeys() {
480
+ let e;
481
+ for (let t of Ie) e ??= textAt(t), _.setAt(t, void 0);
482
+ return e && _.setAt(I.theme, e), e;
483
+ }
484
+ };
485
+ L = ce(null), R = /* @__PURE__ */ new WeakMap(), a(L, 12, "current", ze, B, R), a(L, 9, "followSpace", Re, B), a(L, 9, "watch", Le, B), s(L, B), u(L, 3, B), n(B, "ThemePreference"), i(B, "defaultTheme", Pe), i(B, "HEAD_SCRIPT", `try{var l=localStorage,d=document.documentElement,s=(/[?&]${z.scheme}=(light|dark)(&|$)/.exec(location.search)||[])[1]||` + [v, ...ue].map((e) => `l.getItem(${JSON.stringify(e)})`).join("||") + ";if(s===\"light\"||s===\"dark\"){d.classList.add(\"ui-\"+s);d.style.colorScheme=s}}catch(e){}"), d(B, R, u(L, 8, B)), u(L, 11, B), i(B, "addressed"), i(B, "isWearingMine", !1), i(B, "worn"), i(B, "kept"), i(B, "store", F), i(B, "spaced"), i(B, "listeners", /* @__PURE__ */ new Set());
486
+ var V = B, Be = ":", Ve = "/api/server/live";
487
+ function textAt(e) {
488
+ let t = _.getAt(e);
489
+ return typeof t == "string" && t ? t : void 0;
490
+ }
491
+ n(textAt, "textAt");
492
+ function schemeOf(e) {
493
+ return e === "light" || e === "dark" ? e : void 0;
494
+ }
495
+ n(schemeOf, "schemeOf");
496
+ function isSchemeChoice(e) {
497
+ return Me.includes(e);
498
+ }
499
+ n(isSchemeChoice, "isSchemeChoice");
500
+ function isSameOriginFrame() {
501
+ try {
502
+ return typeof window < "u" && window.parent !== window && !!window.frameElement;
503
+ } catch {
504
+ return !1;
505
+ }
506
+ }
507
+ n(isSameOriginFrame, "isSameOriginFrame");
508
+ function chosenFor(e) {
509
+ return e === "system" ? void 0 : e;
510
+ }
511
+ n(chosenFor, "chosenFor");
512
+ //#endregion
513
+ //#region src/components/ui-theme-menu/HueDropdown.css?inline
514
+ var He = "@layer ui.components.hue-dropdown.content{.hue-dot{box-sizing:border-box;background:var(--_hue);vertical-align:-.055em;border-radius:50%;flex:none;block-size:.875em;inline-size:.875em;margin-inline-end:.5em;display:inline-block;box-shadow:inset 0 0 0 1px light-dark(#0000001f,#ffffff38)}.hue-dot.halves{background:linear-gradient(90deg, var(--_hue-light) 50%, var(--_hue-dark) 50%)}.hue-dot.none{background:linear-gradient(135deg, transparent 43%, var(--ui-text-muted) 43% 57%, transparent 57%);box-shadow:inset 0 0 0 1.5px var(--ui-text-muted)}.hue-chosen{align-items:center;min-width:0;display:inline-flex}.hue-chosen>.hue-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}", Ue = /* @__PURE__ */ A("<ui-dropdown selection fluid><span slot=trigger><span></span></span><ui-item><!><!>", 1), We = /* @__PURE__ */ A("<ui-item><!><!>", 1), Ge = /* @__PURE__ */ A("<span aria-hidden=true>"), H = class HueDropdown {
515
+ static css = He;
516
+ static get noneValue() {
517
+ return U;
518
+ }
519
+ static draw(e) {
520
+ let chosen = () => e.hues().find((t) => t === e.value());
521
+ var t = Ue(), n = t.firstChild, r = n.firstChild, i = n.nextSibling, a = i.firstChild, o = a.nextSibling;
522
+ return k(t, "on-ui-changed", (t) => {
523
+ t.stopPropagation();
524
+ let n = String(t.detail.value);
525
+ e.onPick(n === U ? void 0 : n, t);
526
+ }), t._$owner = T(), E(n, () => HueDropdown.dot(chosen, e.noneColors), r), E(r, (() => {
527
+ var t = ge(() => !!chosen());
528
+ return () => t() ? e.nameFor(chosen()) : e.noneLabel();
529
+ })()), k(i, "value", U), i._$owner = T(), E(i, () => HueDropdown.dot(() => void 0, e.noneColors), a), E(i, () => e.noneLabel(), o), E(t, C(b, {
530
+ get each() {
531
+ return e.hues();
532
+ },
533
+ children: (t) => (() => {
534
+ var n = We(), r = n.firstChild, i = r.nextSibling;
535
+ return k(n, "value", t), n._$owner = T(), E(n, () => HueDropdown.dot(() => t), r), E(n, () => e.nameFor(t), i), n;
536
+ })()
537
+ }), null), w(() => ({
538
+ e: e.part,
539
+ t: O(Ke),
540
+ a: e.size,
541
+ o: chosen() ?? U,
542
+ i: e.label(),
543
+ n: O(qe),
544
+ s: O(Je)
545
+ }), ({ e, t: i, a, o, i: s, n: c, s: l }, u) => {
546
+ e !== u?.e && k(t, "part", e), S(t, i, u?.t), a !== u?.a && k(t, "size", a), o !== u?.o && k(t, "value", o), s !== u?.i && k(t, "aria-label", s), S(n, c, u?.n), S(r, l, u?.s);
547
+ }), t;
548
+ }
549
+ static dot(e, t) {
550
+ let halves = () => {
551
+ let [e, n = e] = t?.() ?? [];
552
+ return e ? `--_hue-light: ${e}; --_hue-dark: ${n}` : void 0;
553
+ };
554
+ var n = Ge();
555
+ return w(() => ({
556
+ e: O([Ye, e() ?? (halves() ? Ze : Xe)]),
557
+ t: O(e() ? `--_hue: var(--ui-${e()})` : halves())
558
+ }), ({ e, t }, r) => {
559
+ S(n, e, r?.e), ve(n, t, r?.t);
560
+ }), n;
561
+ }
562
+ }, U = "none", Ke = "hue-dropdown", qe = "hue-chosen", Je = "hue-name", Ye = "hue-dot", Xe = "none", Ze = "halves", Qe = class BenchAddress {
563
+ static read() {
564
+ if (typeof location > "u") return {};
565
+ let e = new URLSearchParams(location.search), t = e.get(W.scheme), n = e.get(W.pages);
566
+ return {
567
+ theme: e.get(W.theme) || void 0,
568
+ schemes: $e.includes(t) ? t : void 0,
569
+ isSwapped: e.has(W.swap) ? e.get(W.swap) === G : void 0,
570
+ pages: n ? n.split(",").filter(Boolean) : void 0,
571
+ device: e.has(W.phone) ? e.get(W.phone) === G ? "phone" : "desk" : void 0
572
+ };
573
+ }
574
+ static write(e) {
575
+ if (typeof location > "u") return;
576
+ let t = new URL(location.href);
577
+ t.searchParams.set(W.theme, e.theme), t.searchParams.set(W.scheme, e.schemes), BenchAddress.setOn(t, W.swap, e.isSwapped && e.schemes === "both"), t.searchParams.set(W.pages, e.pages.join(",")), BenchAddress.setOn(t, W.phone, e.device === "phone");
578
+ let n = t.href.replace(/%2C/g, ",");
579
+ n !== location.href && history.replaceState(history.state, "", n);
580
+ }
581
+ static withPage(e, t) {
582
+ let n = new URL(e, typeof location > "u" ? "http://localhost" : location.href);
583
+ return n.searchParams.set(W.pages, t), n.href;
584
+ }
585
+ static setOn(e, t, n) {
586
+ n ? e.searchParams.set(t, G) : e.searchParams.delete(t);
587
+ }
588
+ }, W = {
589
+ theme: "theme",
590
+ scheme: "scheme",
591
+ swap: "swap",
592
+ pages: "pages",
593
+ phone: "phone"
594
+ }, G = "1", $e = [
595
+ "light",
596
+ "dark",
597
+ "both"
598
+ ], ThemeMenu = class {
599
+ themes;
600
+ text;
601
+ mine;
602
+ constructor({ themes: e, text: t, mine: n = [] }) {
603
+ this.themes = e, this.text = t, this.mine = n;
604
+ }
605
+ get entries() {
606
+ let e = this.themes.map((e) => {
607
+ let t = tt[e];
608
+ return {
609
+ value: e,
610
+ text: this.titleFor(e),
611
+ ...t && { description: this.text(t) }
612
+ };
613
+ });
614
+ if (!this.mine.length) return e;
615
+ let t = this.mine.map((e) => ({
616
+ value: `${et}${e.id}`,
617
+ text: e.name,
618
+ description: this.pickTitleFor(e.choices.base, e.choices.primary)
619
+ }));
620
+ return [
621
+ {
622
+ type: "header",
623
+ text: this.text("myThemes")
624
+ },
625
+ ...t,
626
+ {
627
+ type: "divider",
628
+ text: ""
629
+ },
630
+ ...e
631
+ ];
632
+ }
633
+ titleFor(e) {
634
+ if (e.startsWith(et)) {
635
+ let t = this.mine.find((t) => `${et}${t.id}` === e);
636
+ if (t) return t.name;
637
+ }
638
+ return h.titleOf(e);
639
+ }
640
+ pickTitleFor(e, t) {
641
+ let n = this.titleFor(e);
642
+ return t ? this.text("tinted", {
643
+ title: n,
644
+ tint: this.text(t)
645
+ }) : n;
646
+ }
647
+ labelFor(e, t) {
648
+ return this.text("themeLabel", { title: this.pickTitleFor(e, t) });
649
+ }
650
+ }, et = "mine:", tt = {
651
+ spell: "spellDescription",
652
+ glass: "glassDescription",
653
+ fruity: "fruityDescription",
654
+ merlot: "merlotDescription",
655
+ paper: "paperDescription",
656
+ midnight: "midnightDescription",
657
+ crisp: "crispDescription",
658
+ pop: "popDescription",
659
+ matrix: "matrixDescription",
660
+ mockup: "mockupDescription"
661
+ }, nt = {
662
+ tag: "ui-theme-menu",
663
+ icon: "palette",
664
+ topics: [
665
+ "controls",
666
+ "selection",
667
+ "menus"
668
+ ],
669
+ aka: [
670
+ "theme picker",
671
+ "theme switcher",
672
+ "dark mode toggle",
673
+ "colour scheme",
674
+ "appearance",
675
+ "skin"
676
+ ],
677
+ skeleton: "inline 5 x 2.25",
678
+ noun: "themes",
679
+ description: "A theme menu switches the page between light and dark, and picks its theme from Spell's own, and remembers both for the next page.",
680
+ attributes: [
681
+ {
682
+ name: "show",
683
+ kind: "enum",
684
+ values: [
685
+ "both",
686
+ "theme",
687
+ "scheme",
688
+ "menu"
689
+ ],
690
+ default: "both",
691
+ description: "Which controls to show: `both` (the palette button, whose overlay picks the theme and light / dark), `scheme` (a light / dark button alone), `theme` (a theme dropdown) or `menu` (the overlay's panel alone, drawn in place: the body of a sub-menu in another menu, which calls `focusChosen()` as it opens it)."
692
+ },
693
+ {
694
+ name: "size",
695
+ kind: "size",
696
+ description: "Size of the buttons (or the dropdown), `mini` ... `massive`; `medium` is the default."
697
+ },
698
+ {
699
+ name: "inverted",
700
+ kind: "keyOnly",
701
+ description: "For dark backgrounds (a dark header or side panel): light buttons, an inverted dropdown."
702
+ },
703
+ {
704
+ name: "compact",
705
+ kind: "keyOnly",
706
+ description: "With `show=\"theme\"`: the dropdown is an icon-only palette button, its text (`Spell theme`) its tooltip and name, for a masthead's row of icon buttons."
707
+ },
708
+ {
709
+ name: "bench",
710
+ kind: "string",
711
+ description: "Where the site with the theme bench starts (`http://127.0.0.1:4747`), for its Theme bench row, which opens Spell UI's theme bench page there in a new window, in the theme chosen; none given: this page's own site; `none`: no row."
712
+ },
713
+ {
714
+ name: "bench-page",
715
+ kind: "string",
716
+ description: "Which of the theme bench's pages it opens showing alone (`app`, `epic`, `ui`, `notebook`): the place this menu is on; none given: read from the page's address, else `app`."
717
+ }
718
+ ],
719
+ events: [{
720
+ name: "ui-changed",
721
+ detail: "{ theme: string, tint?: string, scheme: 'light' | 'dark' | 'system', shown: 'light' | 'dark', originalEvent?: Event }",
722
+ description: "The viewer picked a theme, a tint or a scheme here; `theme` is a `UI.themes` name, `tint` one of Spell UI's colours (none: the theme as it is); `scheme` is `system` while following the OS, and `shown` the scheme the page shows. Fired after the choice is stored and while its sheets load."
723
+ }],
724
+ slots: [{
725
+ name: "end",
726
+ description: "At the foot of the palette's panel, under the themes and Theme bench: a row of the page's own, e.g. the Spell editor's 'Edit theme...'. Styled as a theme's row. Not in the theme list's arrow keys."
727
+ }],
728
+ parts: [
729
+ {
730
+ name: "controls",
731
+ description: "The wrapper around the controls."
732
+ },
733
+ {
734
+ name: "scheme",
735
+ description: "The light / dark `<button>` (`show=\"scheme\"`): a sun or a moon, the scheme the page shows."
736
+ },
737
+ {
738
+ name: "palette",
739
+ description: "The `<button>` opening the overlay."
740
+ },
741
+ {
742
+ name: "overlay",
743
+ description: "The overlay, a `<ui-popup open-on=\"click\">`; its box is `::part(popup)`."
744
+ },
745
+ {
746
+ name: "menu",
747
+ description: "The overlay's theme list (`role=menu`)."
748
+ },
749
+ {
750
+ name: "option",
751
+ description: "One theme in the list (`role=menuitemradio`)."
752
+ },
753
+ {
754
+ name: "schemes",
755
+ description: "The overlay's Light | Dark | Auto control (`role=radiogroup`)."
756
+ },
757
+ {
758
+ name: "scheme-option",
759
+ description: "One choice in it (`role=radio`): an icon and its name."
760
+ },
761
+ {
762
+ name: "tip",
763
+ description: "A button's tooltip, a `<ui-popup inverted size=\"mini\">`."
764
+ },
765
+ {
766
+ name: "theme",
767
+ description: "The theme `<ui-dropdown>` (`show=\"theme\"`)."
768
+ },
769
+ {
770
+ name: "bench",
771
+ description: "The overlay's Theme bench row, a link opening it in a new window."
772
+ },
773
+ {
774
+ name: "tints",
775
+ description: "Tint's dropdown, under the themes (`<ui-dropdown>`): None first, then every colour the chosen theme takes, each a dot and its name."
776
+ }
777
+ ],
778
+ states: [
779
+ {
780
+ name: "dark",
781
+ description: "The page shows the dark scheme (chosen, or the OS's while following it)."
782
+ },
783
+ {
784
+ name: "following",
785
+ description: "The scheme follows the OS (nothing chosen, or Auto)."
786
+ },
787
+ {
788
+ name: "open",
789
+ description: "The overlay is open."
790
+ },
791
+ {
792
+ name: "menu",
793
+ description: "It draws its panel in place, inside a host's menu (`show=\"menu\"`)."
794
+ }
795
+ ],
796
+ texts: [
797
+ {
798
+ key: "themeLabel",
799
+ text: "{title} theme",
800
+ description: "The dropdown's text: the chosen theme."
801
+ },
802
+ {
803
+ key: "themeName",
804
+ text: "Theme",
805
+ description: "Accessible name of the theme dropdown, and the overlay's header."
806
+ },
807
+ {
808
+ key: "spellDescription",
809
+ text: "The Spell brand",
810
+ description: "Under `Spell` in the list."
811
+ },
812
+ {
813
+ key: "glassDescription",
814
+ text: "Translucent glass on a solid page",
815
+ description: "Under `Glass` in the list."
816
+ },
817
+ {
818
+ key: "fruityDescription",
819
+ text: "Glass on a pastel wallpaper",
820
+ description: "Under `Fruity` in the list."
821
+ },
822
+ {
823
+ key: "merlotDescription",
824
+ text: "A wine-dark studio",
825
+ description: "Under `Merlot` in the list."
826
+ },
827
+ {
828
+ key: "paperDescription",
829
+ text: "Warm and bookish, for reading",
830
+ description: "Under `Paper` in the list."
831
+ },
832
+ {
833
+ key: "midnightDescription",
834
+ text: "Dark first, calm and glowing",
835
+ description: "Under `Midnight` in the list."
836
+ },
837
+ {
838
+ key: "crispDescription",
839
+ text: "High contrast, for anyone who needs it",
840
+ description: "Under `Crisp` in the list."
841
+ },
842
+ {
843
+ key: "popDescription",
844
+ text: "Playful and colourful",
845
+ description: "Under `Pop` in the list."
846
+ },
847
+ {
848
+ key: "matrixDescription",
849
+ text: "A dark ops console",
850
+ description: "Under `Matrix` in the list."
851
+ },
852
+ {
853
+ key: "mockupDescription",
854
+ text: "A hand-drawn sketch",
855
+ description: "Under `Mockup` in the list."
856
+ },
857
+ {
858
+ key: "toDark",
859
+ text: "Switch to dark",
860
+ description: "The light / dark button's name, while the page is light."
861
+ },
862
+ {
863
+ key: "toLight",
864
+ text: "Switch to light",
865
+ description: "The light / dark button's name, while the page is dark."
866
+ },
867
+ {
868
+ key: "palette",
869
+ text: "Theme and light / dark: {title}, {scheme}",
870
+ description: "The palette button's name and tooltip: the chosen theme and scheme (`light`, `dark` or `auto`'s text)."
871
+ },
872
+ {
873
+ key: "overlayName",
874
+ text: "Theme and colour scheme",
875
+ description: "Accessible name of the overlay."
876
+ },
877
+ {
878
+ key: "schemeName",
879
+ text: "Light or dark",
880
+ description: "Accessible name of the overlay's scheme control."
881
+ },
882
+ {
883
+ key: "light",
884
+ text: "Light",
885
+ description: "The scheme control's light choice."
886
+ },
887
+ {
888
+ key: "dark",
889
+ text: "Dark",
890
+ description: "The scheme control's dark choice."
891
+ },
892
+ {
893
+ key: "auto",
894
+ text: "Auto",
895
+ description: "The scheme control's choice that follows the device's scheme."
896
+ },
897
+ {
898
+ key: "bench",
899
+ text: "Theme bench",
900
+ description: "The row opening the theme bench."
901
+ },
902
+ {
903
+ key: "benchTip",
904
+ text: "Open the theme bench in a new window, in this theme",
905
+ description: "Its tooltip."
906
+ },
907
+ {
908
+ key: "tinted",
909
+ text: "{title} - {tint}",
910
+ description: "A theme in a tint (epic `debut` P23), in the dropdown's text and the palette's name: `Glass - Pink`."
911
+ },
912
+ {
913
+ key: "myThemes",
914
+ text: "My themes",
915
+ description: "The heading of the themes the person saved, above Spell's (epic `debut` P25)."
916
+ },
917
+ {
918
+ key: "tintName",
919
+ text: "Tint",
920
+ description: "Tint's heading, and its dropdown's accessible name."
921
+ },
922
+ {
923
+ key: "noTint",
924
+ text: "None",
925
+ description: "Tint's first option: the theme as it is."
926
+ },
927
+ {
928
+ key: "red",
929
+ text: "Red",
930
+ description: "A tint's name: the colour's."
931
+ },
932
+ {
933
+ key: "orange",
934
+ text: "Orange",
935
+ description: "A tint's name: the colour's."
936
+ },
937
+ {
938
+ key: "yellow",
939
+ text: "Yellow",
940
+ description: "A tint's name: the colour's."
941
+ },
942
+ {
943
+ key: "olive",
944
+ text: "Olive",
945
+ description: "A tint's name: the colour's."
946
+ },
947
+ {
948
+ key: "green",
949
+ text: "Green",
950
+ description: "A tint's name: the colour's."
951
+ },
952
+ {
953
+ key: "teal",
954
+ text: "Teal",
955
+ description: "A tint's name: the colour's."
956
+ },
957
+ {
958
+ key: "blue",
959
+ text: "Blue",
960
+ description: "A tint's name: the colour's."
961
+ },
962
+ {
963
+ key: "violet",
964
+ text: "Violet",
965
+ description: "A tint's name: the colour's."
966
+ },
967
+ {
968
+ key: "purple",
969
+ text: "Purple",
970
+ description: "A tint's name: the colour's."
971
+ },
972
+ {
973
+ key: "pink",
974
+ text: "Pink",
975
+ description: "A tint's name: the colour's."
976
+ },
977
+ {
978
+ key: "brown",
979
+ text: "Brown",
980
+ description: "A tint's name: the colour's."
981
+ },
982
+ {
983
+ key: "grey",
984
+ text: "Grey",
985
+ description: "A tint's name: the colour's."
986
+ },
987
+ {
988
+ key: "black",
989
+ text: "Black",
990
+ description: "A tint's name: the colour's."
991
+ }
992
+ ]
993
+ }, rt = "@layer ui.components.theme-menu.types{:host{vertical-align:middle;display:inline-block}.ui.themes{--_ui-theme-menu-gap:var(--ui-theme-menu-gap,.25em);--_ui-theme-menu-button-size:var(--ui-theme-menu-button-size,1.75em);--_ui-theme-menu-overlay-width:var(--ui-theme-menu-overlay-width,17em);--_ui-theme-menu-overlay-radius:var(--ui-theme-menu-overlay-radius,14px);--_theme-menu-row-radius:calc(var(--_ui-theme-menu-overlay-radius) - 1px - .375em);--_ui-theme-menu-swap-duration:var(--ui-theme-menu-swap-duration,.28s);--_ui-theme-menu-choice-shadow:var(--ui-theme-menu-choice-shadow,0 1px 2px oklch(0% 0 0/.16));--_ui-theme-menu-inverted-ink:var(--ui-theme-menu-inverted-ink,oklch(100% 0 0));align-items:center;gap:var(--_ui-theme-menu-gap);font-size:calc(var(--ui-font-size) * var(--ui-scale,1));flex-wrap:wrap;display:inline-flex}}@layer ui.components.theme-menu.content{.panel>.tints{margin:0 .5em .25em}.tints-header{padding:.25em .75em .5em}.tints-header>.heading{padding-inline:0}[part~=theme]{flex:0 auto;min-width:0}.button{box-sizing:border-box;width:var(--_ui-theme-menu-button-size);height:var(--_ui-theme-menu-button-size);color:var(--ui-text-muted);font:inherit;cursor:var(--ui-control-cursor);-webkit-tap-highlight-color:transparent;background:0 0;border:0;border-radius:50%;flex:none;place-items:center;margin:0;padding:0;line-height:1;display:inline-grid;position:relative}.button:hover{background:color-mix(in oklab, currentColor 10%, transparent);color:var(--ui-text-color)}.button:focus-visible{outline:var(--ui-focus-width,2px) solid var(--ui-focus-color);outline-offset:var(--ui-focus-offset,2px)}.button:active{scale:.94}.glyph{pointer-events:none;grid-area:1/1;place-items:center;width:1em;height:1em;font-size:1em;display:grid}.scheme .glyph{opacity:0;filter:blur(4px);scale:.25}.light.button .light.glyph,.dark.button .dark.glyph{opacity:1;filter:blur();scale:1}.overlay::part(popup){box-sizing:border-box;width:var(--_ui-theme-menu-overlay-width);border:1px solid var(--ui-border-color);border-radius:var(--_ui-theme-menu-overlay-radius);background:var(--ui-surface);max-width:calc(100vw - 16px);box-shadow:var(--ui-shadow-floating);color:var(--ui-text-color);font-size:calc(var(--ui-font-size) * .875);transform-origin:100% 0;padding:.375em;line-height:1.3}.panel{flex-direction:column;gap:1px;display:flex}.heading,.menu>.header{color:var(--ui-text-muted);font-family:var(--ui-font-family-mono,ui-monospace, monospace);letter-spacing:.08em;text-transform:uppercase;padding:.5em .75em .375em;font-size:.75em;font-weight:500}.menu>.header{padding-top:.25em}.menu{overscroll-behavior:contain;scrollbar-width:thin;flex-direction:column;gap:1px;max-height:min(24em,55vh);display:flex;overflow-y:auto}.divider{background:var(--ui-border-color);flex:none;height:1px;margin:.375em .5em}.panel>.bench,.panel>slot::slotted(*){box-sizing:border-box;border-radius:var(--_theme-menu-row-radius);width:100%;color:inherit;font:inherit;text-align:start;cursor:var(--ui-control-cursor);background:0 0;border:0;grid-template-columns:1.125em minmax(0,1fr);align-items:center;column-gap:.5em;margin:0;padding:.5em .625em;display:grid}.panel:not(:has(>.bench))>slot::slotted(:first-child){background-image:linear-gradient(var(--ui-border-color), var(--ui-border-color));background-position:top;background-repeat:no-repeat;background-size:calc(100% - 1em) 1px;margin-block-start:.375em;padding-block-start:.875em}.panel>.bench{text-decoration:none}.panel>.bench>ui-icon{--ui-icon-width:1.125em;--ui-icon-distance:0}.panel>.bench:hover,.panel>slot::slotted(:hover){background-color:var(--ui-surface-muted)}.schemes{border-radius:var(--_theme-menu-row-radius);background:var(--ui-surface-strong);grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;margin:0 0 .125em;padding:2px;display:grid}.choice{box-sizing:border-box;border-radius:calc(var(--_theme-menu-row-radius) - 2px);min-width:0;color:var(--ui-text-muted);font:inherit;cursor:var(--ui-control-cursor);background:0 0;border:0;justify-content:center;align-items:center;gap:.375em;margin:0;padding:.4em .375em;font-weight:500;display:flex}.choice:hover{color:var(--ui-text-color)}.choice:focus-visible{outline:2px solid var(--ui-focus-color);outline-offset:-2px}.choice>.name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.option{box-sizing:border-box;border-radius:var(--_theme-menu-row-radius);width:100%;color:inherit;font:inherit;text-align:start;cursor:var(--ui-control-cursor);background:0 0;border:0;grid-template-columns:1.125em minmax(0,1fr);align-items:center;column-gap:.5em;margin:0;padding:.5em .625em;display:grid}.option:hover{background:var(--ui-surface-muted)}.option:focus-visible{outline:2px solid var(--ui-focus-color);outline-offset:-2px}.option>.check{color:var(--ui-primary-text);opacity:0;place-items:center;font-size:.857em;display:grid}.option:has(>.description)>.check{grid-row:1/span 2}.option>.name{text-overflow:ellipsis;white-space:nowrap;grid-column:2;font-weight:500;overflow:hidden}.option>.description{color:var(--ui-text-muted);grid-column:2;font-size:.857em}[part~=tip].muted{display:none}}@layer ui.components.theme-menu.variations{.ui.inverted.themes .button{color:oklch(from var(--_ui-theme-menu-inverted-ink) l c h / .8)}.ui.inverted.themes .button:hover{background:oklch(from var(--_ui-theme-menu-inverted-ink) l c h / .14);color:var(--_ui-theme-menu-inverted-ink)}:host(:state(menu)){display:block}:host(:state(menu)) .ui.themes{font-size:inherit;line-height:1.3;display:block}[part~=theme].compact{--ui-button-background:transparent;--ui-button-background-hover:color-mix(in oklab, currentColor 10%, transparent);--ui-button-background-down:color-mix(in oklab, currentColor 16%, transparent);--ui-button-color:var(--ui-text-muted);--ui-button-color-hover:var(--ui-text-color);--ui-button-padding-block:.55em;--ui-button-padding-inline:.55em;--ui-button-radius:50%;--ui-button-box-shadow:none}[part~=theme].compact::part(icon){display:none}}@layer ui.components.theme-menu.states{.option.checked{background:color-mix(in oklch, var(--ui-primary) 10%, transparent)}.option.checked:hover{background:color-mix(in oklch, var(--ui-primary) 15%, transparent)}.option.checked>.check{opacity:1}.option.checked>.name{color:var(--ui-primary-text)}.choice.checked{background:var(--ui-surface);box-shadow:var(--_ui-theme-menu-choice-shadow), inset 0 0 0 1px var(--ui-border-color);color:var(--ui-text-color)}@media (prefers-reduced-motion:no-preference){.scheme .glyph{transition:opacity var(--_ui-theme-menu-swap-duration) var(--ui-ease-out,ease-out), scale var(--_ui-theme-menu-swap-duration) var(--ui-ease-out,ease-out), filter var(--_ui-theme-menu-swap-duration) var(--ui-ease-out,ease-out)!important}.button{transition:background-color var(--ui-duration-fast,.1s) ease-out, box-shadow var(--ui-duration-fast,.1s) ease-out, color var(--ui-duration-fast,.1s) ease-out, scale var(--ui-duration-fast,.1s) ease-out}.option{transition:background-color var(--ui-duration-fast,.1s) ease-out}.choice{transition:background-color var(--ui-duration-normal,.2s) ease-out, box-shadow var(--ui-duration-normal,.2s) ease-out, color var(--ui-duration-fast,.1s) ease-out}}}", it = /* @__PURE__ */ A("<div><!><!><!><!>"), at = /* @__PURE__ */ A("<button type=button>"), ot = /* @__PURE__ */ A("<ui-popup inverted>", 1), st = /* @__PURE__ */ A("<span aria-hidden=true><ui-icon padding=none>", 1), ct = /* @__PURE__ */ A("<button type=button><span aria-hidden=true><ui-icon padding=none>", 1), lt = /* @__PURE__ */ A("<ui-popup open-on=click appearance=basic position=\"bottom right\">", 1), K = /* @__PURE__ */ A("<div role=separator>"), ut = /* @__PURE__ */ A("<a rel=noopener><ui-icon aria-hidden=true padding=none></ui-icon><span>", 1), dt = /* @__PURE__ */ A("<div><div role=separator></div><div></div><div></div><!><!><slot>"), q = /* @__PURE__ */ A("<div>"), ft = /* @__PURE__ */ A("<button type=button><ui-icon aria-hidden=true padding=none></ui-icon><span>", 1), pt = /* @__PURE__ */ A("<span>"), mt = /* @__PURE__ */ A("<button type=button><span aria-hidden=true><ui-icon padding=none></ui-icon></span><span>", 1), ht = /* @__PURE__ */ A("<ui-icon aria-hidden=true>", 1), gt = /* @__PURE__ */ A("<ui-item kind=divider>", 1), J = /* @__PURE__ */ A("<ui-item>", 1), _t = /* @__PURE__ */ A("<ui-dropdown floating scrolling button><div slot=header></div><span slot=trigger></span><!><!>", 1), vt, yt, bt, xt, St, Ct, wt, Tt, Et, Dt, Ot, kt, At, Y, X, jt, Mt, Nt, Pt, Ft, Z = class _UIThemeMenu extends (Y = l, At = [ie], kt = [ae], Ot = [g], Dt = [g], Et = [m("dark")], Tt = [m("following")], wt = [se], Ct = [g], St = [te], xt = [m("menu")], bt = [m("open"), g], yt = [g], vt = [oe], Y) {
994
+ constructor() {
995
+ super(...arguments), u(X, 5, this), d(this, jt, u(X, 8, this, D ? tn : V.chosen)), u(X, 11, this), d(this, Mt, u(X, 12, this, D ? "light" : V.osScheme())), u(X, 15, this), d(this, Nt, u(X, 16, this, D ? [] : N.list)), u(X, 19, this), i(this, "texts", /* @__PURE__ */ n((e, t) => this.translationForKey(e, t), "texts")), d(this, Pt, u(X, 20, this, !1)), u(X, 23, this), d(this, Ft, u(X, 24, this)), u(X, 27, this);
996
+ }
997
+ get shownScheme() {
998
+ let { scheme: e } = this.chosen;
999
+ return e === "system" ? this.osScheme : e;
1000
+ }
1001
+ get chosenTheme() {
1002
+ return this.chosen.theme;
1003
+ }
1004
+ get isDark() {
1005
+ return this.shownScheme === "dark";
1006
+ }
1007
+ get followsSystem() {
1008
+ return this.chosen.scheme === "system";
1009
+ }
1010
+ followPreference() {
1011
+ return this.follow(V.chosen), V.subscribe((e) => this.follow(e));
1012
+ }
1013
+ follow(e) {
1014
+ this.chosen = e, this.osScheme = V.osScheme(), this.myThemes = N.list;
1015
+ }
1016
+ async chooseTheme(e, t) {
1017
+ let n = V.setTheme(e);
1018
+ this.emitChange(t), await n;
1019
+ }
1020
+ async chooseTint(e, t) {
1021
+ if (e === V.chosen.tint) return;
1022
+ let n = V.setTint(e);
1023
+ this.emitChange(t), await n;
1024
+ }
1025
+ flipScheme(e) {
1026
+ V.flipScheme(), this.emitChange(e);
1027
+ }
1028
+ chooseScheme(e, t) {
1029
+ e !== V.chosen.scheme && (V.setScheme(e), this.emitChange(t));
1030
+ }
1031
+ get benchAddress() {
1032
+ let e = this.bench;
1033
+ if (e === Kt || D) return;
1034
+ let t = (e?.replace(/\/$/, "") ?? Ut.exec(location.pathname)?.[0] ?? "") + Ht;
1035
+ return Qe.withPage(V.addressWith(t, { theme: this.chosenTheme }), this.benchPageId);
1036
+ }
1037
+ get benchPageId() {
1038
+ let e = this.benchPageAttribute;
1039
+ if (e) return e;
1040
+ let t = D ? "" : location.pathname;
1041
+ return Wt.find(([e]) => e.test(t))?.[1] ?? Gt;
1042
+ }
1043
+ get benchPageAttribute() {
1044
+ return (this.attributes["bench-page"] ?? void 0) || void 0;
1045
+ }
1046
+ openBench() {
1047
+ let e = this.benchAddress;
1048
+ e && window.open(e, qt, "noopener");
1049
+ }
1050
+ emitChange(e) {
1051
+ let { theme: t, scheme: n, tint: r } = V.chosen, i = {
1052
+ theme: t,
1053
+ ...r && { tint: r },
1054
+ scheme: n,
1055
+ shown: V.shownScheme(),
1056
+ originalEvent: e
1057
+ };
1058
+ this.send("ui-changed", i);
1059
+ }
1060
+ get themeMenu() {
1061
+ return new ThemeMenu({
1062
+ themes: c.themes.own,
1063
+ text: this.texts,
1064
+ mine: this.myThemes
1065
+ });
1066
+ }
1067
+ get shownControls() {
1068
+ return this.show ?? "both";
1069
+ }
1070
+ render() {
1071
+ let e = this;
1072
+ var t = it(), n = t.firstChild, r = n.nextSibling, i = r.nextSibling, a = i.nextSibling;
1073
+ return E(t, C(x, {
1074
+ get when() {
1075
+ return e.shownControls === "theme";
1076
+ },
1077
+ get children() {
1078
+ return e.dropdown();
1079
+ }
1080
+ }), n), E(t, C(x, {
1081
+ get when() {
1082
+ return e.shownControls === "both";
1083
+ },
1084
+ get children() {
1085
+ return e.palette();
1086
+ }
1087
+ }), r), E(t, C(x, {
1088
+ get when() {
1089
+ return e.shownControls === "scheme";
1090
+ },
1091
+ get children() {
1092
+ return e.schemeButton();
1093
+ }
1094
+ }), i), E(t, C(x, {
1095
+ get when() {
1096
+ return e.isMenu;
1097
+ },
1098
+ get children() {
1099
+ return e.panel();
1100
+ }
1101
+ }), a), w(() => ({
1102
+ e: O(e.rootClass),
1103
+ t: e.partForName("controls")
1104
+ }), ({ e, t: n }, r) => {
1105
+ S(t, e, r?.e), n !== r?.t && k(t, "part", n);
1106
+ }), t;
1107
+ }
1108
+ get isMenu() {
1109
+ return this.shownControls === "menu";
1110
+ }
1111
+ schemeButton() {
1112
+ let e = /* @__PURE__ */ n(() => this.shownScheme === "dark" ? this.translationForKey("toLight") : this.translationForKey("toDark"), "next"), t = this;
1113
+ return [(() => {
1114
+ var n = at();
1115
+ return n._$$click = (e) => t.flipScheme(e), E(n, C(b, {
1116
+ each: Lt,
1117
+ children: (e) => (() => {
1118
+ var t = st(), n = t.firstChild;
1119
+ return n._$owner = T(), w(() => ({
1120
+ e: O([e, pn]),
1121
+ t: Rt[e]
1122
+ }), ({ e, t: r }, i) => {
1123
+ S(t, e, i?.e), r !== i?.t && k(n, "name", r);
1124
+ }), t;
1125
+ })()
1126
+ })), w(() => ({
1127
+ e: O([
1128
+ un,
1129
+ ln,
1130
+ {
1131
+ light: t.shownScheme === "light",
1132
+ dark: t.shownScheme === "dark"
1133
+ }
1134
+ ]),
1135
+ t: t.partForName("scheme"),
1136
+ a: e()
1137
+ }), ({ e, t, a: r }, i) => {
1138
+ S(n, e, i?.e), t !== i?.t && k(n, "part", t), r !== i?.a && k(n, "aria-label", r);
1139
+ }), n;
1140
+ })(), (() => {
1141
+ var n = ot();
1142
+ return k(n, "size", cn), k(n, "position", sn), n._$owner = T(), E(n, e), w(() => t.partForName("tip"), (e) => {
1143
+ k(n, "part", e);
1144
+ }), n;
1145
+ })()];
1146
+ }
1147
+ palette() {
1148
+ let e = /* @__PURE__ */ n(() => this.translationForKey("palette", {
1149
+ title: this.themeMenu.pickTitleFor(this.chosenTheme, this.chosen.tint),
1150
+ scheme: this.translationForKey(Bt[this.chosen.scheme])
1151
+ }), "label"), t = this;
1152
+ return [
1153
+ (() => {
1154
+ var n = ct(), r = n.firstChild, i = r.firstChild;
1155
+ return k(i, "name", Vt), i._$owner = T(), w(() => ({
1156
+ e: Q.palette,
1157
+ t: O([dn, ln]),
1158
+ a: t.partForName("palette"),
1159
+ o: e(),
1160
+ i: O(pn)
1161
+ }), ({ e, t, a: i, o: a, i: o }, s) => {
1162
+ e !== s?.e && k(n, "id", e), S(n, t, s?.t), i !== s?.a && k(n, "part", i), a !== s?.o && k(n, "aria-label", a), S(r, o, s?.i);
1163
+ }), n;
1164
+ })(),
1165
+ (() => {
1166
+ var e = lt();
1167
+ return _e(() => (e) => t.wireOverlay(e), e), e._$owner = T(), E(e, () => t.panel()), w(() => ({
1168
+ e: t.partForName("overlay"),
1169
+ t: O(mn),
1170
+ a: t.translationForKey("overlayName")
1171
+ }), ({ e: t, t: n, a: r }, i) => {
1172
+ t !== i?.e && k(e, "part", t), S(e, n, i?.t), r !== i?.a && k(e, "aria-label", r);
1173
+ }), e;
1174
+ })(),
1175
+ (() => {
1176
+ var n = ot();
1177
+ return k(n, "size", cn), k(n, "position", sn), n._$owner = T(), E(n, e), w(() => ({
1178
+ e: t.partForName("tip"),
1179
+ t: Q.palette,
1180
+ a: O(t.isOpen ? hn : void 0)
1181
+ }), ({ e, t, a: r }, i) => {
1182
+ e !== i?.e && k(n, "part", e), t !== i?.t && k(n, "for", t), S(n, r, i?.a);
1183
+ }), n;
1184
+ })()
1185
+ ];
1186
+ }
1187
+ panel() {
1188
+ let e = this;
1189
+ var t = dt(), n = t.firstChild, r = n.nextSibling, i = r.nextSibling, a = i.nextSibling, o = a.nextSibling, s = o.nextSibling;
1190
+ return E(t, () => e.schemes(), n), E(r, () => e.translationForKey("themeName")), i._$$keydown = (t) => e.onMenuKey(t), E(i, C(b, {
1191
+ get each() {
1192
+ return e.themeMenu.entries;
1193
+ },
1194
+ children: (t) => e.entry(t)
1195
+ })), E(t, C(x, {
1196
+ get when() {
1197
+ return V.tintsFor(e.chosenTheme).length;
1198
+ },
1199
+ get children() {
1200
+ var e = K();
1201
+ return w(() => O($), (t, n) => {
1202
+ S(e, t, n);
1203
+ }), e;
1204
+ }
1205
+ }), a), E(t, () => e.tints(), o), E(t, C(x, {
1206
+ get when() {
1207
+ return e.benchAddress;
1208
+ },
1209
+ get children() {
1210
+ return [(() => {
1211
+ var e = K();
1212
+ return w(() => O($), (t, n) => {
1213
+ S(e, t, n);
1214
+ }), e;
1215
+ })(), (() => {
1216
+ var t = ut(), n = t.firstChild, r = n.nextSibling, i = T();
1217
+ return k(t, "target", qt), k(n, "name", Yt), n._$owner = T(), E(r, () => e.translationForKey("bench")), w(() => ({
1218
+ e: O(Xt),
1219
+ t: e.partForName("bench"),
1220
+ a: e.benchAddress,
1221
+ o: e.translationForKey("benchTip"),
1222
+ i: O(xn)
1223
+ }), ({ e, t: n, a, o, i: s }, c) => {
1224
+ S(t, e, c?.e), n !== c?.t && k(t, "part", n), a !== c?.a && k(t, "href", a), o !== c?.o && k(t, "title", o), S(r, s, c?.i), me(t, i);
1225
+ }), t;
1226
+ })()];
1227
+ }
1228
+ }), s), s._$owner = T(), w(() => ({
1229
+ e: O(gn),
1230
+ t: O($),
1231
+ a: O(_n),
1232
+ o: Q.heading,
1233
+ i: O(vn),
1234
+ n: e.partForName("menu"),
1235
+ s: nn.menu,
1236
+ h: Q.heading,
1237
+ r: e.slotForName("end")
1238
+ }), ({ e, t: a, a: o, o: c, i: l, n: u, s: d, h: f, r: ee }, p) => {
1239
+ S(t, e, p?.e), S(n, a, p?.t), S(r, o, p?.a), c !== p?.o && k(r, "id", c), S(i, l, p?.i), u !== p?.n && k(i, "part", u), d !== p?.s && k(i, "role", d), f !== p?.h && k(i, "aria-labelledby", f), ee !== p?.r && k(s, "name", ee);
1240
+ }), t;
1241
+ }
1242
+ tints() {
1243
+ let e = /* @__PURE__ */ n(() => V.tintsFor(this.chosenTheme), "tints"), t = this;
1244
+ return C(x, {
1245
+ get when() {
1246
+ return e().length;
1247
+ },
1248
+ get children() {
1249
+ return [(() => {
1250
+ var e = q();
1251
+ return E(e, () => t.translationForKey("tintName")), w(() => O(_n), (t, n) => {
1252
+ S(e, t, n);
1253
+ }), e;
1254
+ })(), (() => {
1255
+ var r = q();
1256
+ return E(r, () => H.draw({
1257
+ part: t.partForName("tints"),
1258
+ size: Qt,
1259
+ value: /* @__PURE__ */ n(() => t.chosen.tint, "value"),
1260
+ hues: e,
1261
+ nameFor: /* @__PURE__ */ n((e) => t.translationForKey(e), "nameFor"),
1262
+ noneLabel: /* @__PURE__ */ n(() => t.translationForKey("noTint"), "noneLabel"),
1263
+ label: /* @__PURE__ */ n(() => t.translationForKey("tintName"), "label"),
1264
+ onPick: /* @__PURE__ */ n((e, n) => void t.chooseTint(e, n), "onPick")
1265
+ })), w(() => O(Zt), (e, t) => {
1266
+ S(r, e, t);
1267
+ }), r;
1268
+ })()];
1269
+ }
1270
+ });
1271
+ }
1272
+ schemes() {
1273
+ let e = this;
1274
+ var t = q();
1275
+ return t._$$keydown = (t) => e.onSchemeKey(t), E(t, C(b, {
1276
+ each: Me,
1277
+ children: (t) => {
1278
+ let r = /* @__PURE__ */ n(() => e.chosen.scheme === t, "isChosen");
1279
+ var i = ft(), a = i.firstChild, o = a.nextSibling;
1280
+ return i._$$click = (n) => e.chooseScheme(t, n), k(i, "value", t), a._$owner = T(), E(o, () => e.translationForKey(Bt[t])), w(() => ({
1281
+ e: O([bn, { checked: r() }]),
1282
+ t: e.partForName("scheme-option"),
1283
+ a: rn.item,
1284
+ o: r() ? "true" : "false",
1285
+ i: r() ? 0 : -1,
1286
+ n: zt[t],
1287
+ s: O(xn)
1288
+ }), ({ e, t, a: n, o: r, i: s, n: c, s: l }, u) => {
1289
+ S(i, e, u?.e), t !== u?.t && k(i, "part", t), n !== u?.a && k(i, "role", n), r !== u?.o && k(i, "aria-checked", r), s !== u?.i && k(i, "tabindex", s), c !== u?.n && k(a, "name", c), S(o, l, u?.s);
1290
+ }), i;
1291
+ }
1292
+ })), w(() => ({
1293
+ e: O(yn),
1294
+ t: e.partForName("schemes"),
1295
+ a: rn.group,
1296
+ o: e.translationForKey("schemeName")
1297
+ }), ({ e, t: n, a: r, o: i }, a) => {
1298
+ S(t, e, a?.e), n !== a?.t && k(t, "part", n), r !== a?.a && k(t, "role", r), i !== a?.o && k(t, "aria-label", i);
1299
+ }), t;
1300
+ }
1301
+ onSchemeKey(e) {
1302
+ c.focus.arrowKey(e, {
1303
+ container: e.currentTarget,
1304
+ items: on,
1305
+ orientation: "both",
1306
+ tabindex: "left alone",
1307
+ onChange: /* @__PURE__ */ n((t, n) => this.chooseScheme(Me[n], e), "onChange")
1308
+ });
1309
+ }
1310
+ entry(e) {
1311
+ if ("type" in e) return e.type === "divider" ? (() => {
1312
+ var e = K();
1313
+ return w(() => O($), (t, n) => {
1314
+ S(e, t, n);
1315
+ }), e;
1316
+ })() : (() => {
1317
+ var t = q();
1318
+ return E(t, () => e.text), w(() => O(r), (e, n) => {
1319
+ S(t, e, n);
1320
+ }), t;
1321
+ })();
1322
+ let t = /* @__PURE__ */ n(() => this.chosenTheme === e.value, "isChecked"), i = this;
1323
+ var a = mt(), o = a.firstChild, s = o.firstChild, c = o.nextSibling;
1324
+ return a._$$click = (t) => i.onOptionClick(e.value, t), k(s, "name", en), s._$owner = T(), E(c, () => e.text), E(a, C(x, {
1325
+ get when() {
1326
+ return e.description;
1327
+ },
1328
+ get children() {
1329
+ var t = pt();
1330
+ return E(t, () => e.description), w(() => O(re), (e, n) => {
1331
+ S(t, e, n);
1332
+ }), t;
1333
+ }
1334
+ }), null), w(() => ({
1335
+ e: O([Sn, { checked: t() }]),
1336
+ t: i.partForName("option"),
1337
+ a: nn.item,
1338
+ o: e.value,
1339
+ i: t() ? "true" : "false",
1340
+ n: (i.tabStopTheme ?? i.chosenTheme) === e.value ? 0 : -1,
1341
+ s: O(Cn),
1342
+ h: O(xn)
1343
+ }), ({ e, t, a: n, o: r, i, n: s, s: l, h: u }, d) => {
1344
+ S(a, e, d?.e), t !== d?.t && k(a, "part", t), n !== d?.a && k(a, "role", n), r !== d?.o && k(a, "value", r), i !== d?.i && k(a, "aria-checked", i), s !== d?.n && k(a, "tabindex", s), S(o, l, d?.s), S(c, u, d?.h);
1345
+ }), a;
1346
+ }
1347
+ dropdown() {
1348
+ let e = /* @__PURE__ */ n(() => this.themeMenu.labelFor(this.chosenTheme, this.chosen.tint), "label"), t = this;
1349
+ var r = _t(), i = r.firstChild, a = i.nextSibling, o = a.nextSibling, s = o.nextSibling;
1350
+ return _e(() => (e) => e.addEventListener("ui-changed", (e) => t.onDropdownChange(e)), r), r._$owner = T(), E(i, () => t.tints()), E(a, C(x, {
1351
+ get when() {
1352
+ return t.compact;
1353
+ },
1354
+ get fallback() {
1355
+ return e();
1356
+ },
1357
+ get children() {
1358
+ var e = ht();
1359
+ return k(e, "name", Vt), e._$owner = T(), e;
1360
+ }
1361
+ })), E(r, C(b, {
1362
+ get each() {
1363
+ return t.themeMenu.entries;
1364
+ },
1365
+ children: (e) => "type" in e ? (() => {
1366
+ var t = J();
1367
+ return t._$owner = T(), E(t, () => e.text), w(() => e.type, (e) => {
1368
+ k(t, "kind", e);
1369
+ }), t;
1370
+ })() : (() => {
1371
+ var t = J();
1372
+ return t._$owner = T(), E(t, () => e.text), w(() => ({
1373
+ e: e.value,
1374
+ t: e.description
1375
+ }), ({ e, t: n }, r) => {
1376
+ e !== r?.e && k(t, "value", e), n !== r?.t && k(t, "description", n);
1377
+ }), t;
1378
+ })()
1379
+ }), o), E(r, C(x, {
1380
+ get when() {
1381
+ return t.benchAddress;
1382
+ },
1383
+ get children() {
1384
+ return [(() => {
1385
+ var e = gt();
1386
+ return e._$owner = T(), e;
1387
+ })(), (() => {
1388
+ var e = J();
1389
+ return k(e, "value", Jt), k(e, "icon", Yt), e._$owner = T(), E(e, () => t.translationForKey("bench")), w(() => t.translationForKey("benchTip"), (t) => {
1390
+ k(e, "title", t);
1391
+ }), e;
1392
+ })()];
1393
+ }
1394
+ }), s), w(() => ({
1395
+ e: t.partForName("theme"),
1396
+ t: { [fn]: !!t.compact },
1397
+ a: t.compact ? "compact" : void 0,
1398
+ o: t.inverted ? "" : void 0,
1399
+ i: t.size,
1400
+ n: t.translationForKey("themeName"),
1401
+ s: t.compact ? e() : void 0,
1402
+ h: t.compact ? e() : void 0,
1403
+ r: t.chosenTheme,
1404
+ d: O($t)
1405
+ }), ({ e, t, a: n, o: a, i: o, n: s, s: c, h: l, r: u, d }, f) => {
1406
+ e !== f?.e && k(r, "part", e), S(r, t, f?.t), n !== f?.a && k(r, "padding", n), a !== f?.o && k(r, "inverted", a), o !== f?.i && k(r, "size", o), s !== f?.n && k(r, "label", s), c !== f?.s && k(r, "title", c), l !== f?.h && k(r, "aria-label", l), u !== f?.r && k(r, "value", u), S(i, d, f?.d);
1407
+ }), r;
1408
+ }
1409
+ onDropdownChange(e) {
1410
+ e.stopPropagation();
1411
+ let { value: t } = e.detail;
1412
+ if (t !== Jt) return void this.chooseTheme(t, e);
1413
+ this.openBench(), e.currentTarget.value = this.chosenTheme;
1414
+ }
1415
+ onOptionClick(e, t) {
1416
+ this.tabStopTheme = e, e !== V.chosen.theme && this.chooseTheme(e, t);
1417
+ }
1418
+ onMenuKey(e) {
1419
+ c.focus.arrowKey(e, {
1420
+ container: e.currentTarget,
1421
+ items: an,
1422
+ orientation: "vertical",
1423
+ tabindex: "left alone",
1424
+ onChange: /* @__PURE__ */ n((e) => this.tabStopTheme = e.value, "onChange")
1425
+ });
1426
+ }
1427
+ rows() {
1428
+ return [...this.domElement.shadowRoot?.querySelectorAll(an) ?? []];
1429
+ }
1430
+ wireOverlay(e) {
1431
+ e.addEventListener("ui-opening", (t) => {
1432
+ t.defaultPrevented || t.target !== e || (this.isOpen = !0, this.myThemes = N.list);
1433
+ }), e.addEventListener("ui-closing", (t) => {
1434
+ !t.defaultPrevented && t.target === e && (this.isOpen = !1);
1435
+ }), e.addEventListener("toggle", (t) => {
1436
+ t.newState === "open" && t.target === e && this.focusChosen();
1437
+ });
1438
+ }
1439
+ focusChosen() {
1440
+ this.tabStopTheme = void 0;
1441
+ let e = this.rows();
1442
+ (e.find((e) => e.value === this.chosenTheme) ?? e[0])?.focus();
1443
+ }
1444
+ };
1445
+ X = ce(Y), jt = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), a(X, 4, "chosen", Ot, Z, jt), a(X, 4, "osScheme", Dt, Z, Mt), a(X, 2, "isDark", Et, Z), a(X, 2, "followsSystem", Tt, Z), a(X, 1, "followPreference", wt, Z), a(X, 4, "myThemes", Ct, Z, Nt), a(X, 2, "themeMenu", St, Z), a(X, 2, "isMenu", xt, Z), a(X, 4, "isOpen", bt, Z, Pt), a(X, 4, "tabStopTheme", yt, Z, Ft), a(X, 1, "focusChosen", vt, Z), a(X, 13, "vocabulary", At, Z), a(X, 13, "elementSetup", kt, Z), s(X, Z), n(Z, "UIThemeMenu"), i(Z, "vocabulary", u(X, 28, Z, nt)), u(X, 31, Z), i(Z, "elementSetup", u(X, 32, Z, {
1446
+ styleSheets: {
1447
+ "theme-menu": rt,
1448
+ "hue-dropdown": H.css
1449
+ },
1450
+ delegatesFocus: !1
1451
+ })), u(X, 35, Z);
1452
+ var It = Z, Lt = ["light", "dark"], Rt = {
1453
+ light: "sun outline",
1454
+ dark: "moon"
1455
+ }, zt = {
1456
+ light: "sun outline",
1457
+ dark: "moon",
1458
+ system: "adjust"
1459
+ }, Bt = {
1460
+ light: "light",
1461
+ dark: "dark",
1462
+ system: "auto"
1463
+ }, Vt = "palette", Ht = "/components/ui/theme-bench.html", Ut = /^\/worktrees\/[^/]+/, Wt = [
1464
+ [/\/epics\//, "epic"],
1465
+ [/\/guides\/SpellUI(\/|$)/, "notebook"],
1466
+ [/\/components\//, "ui"]
1467
+ ], Gt = "app", Kt = "none", qt = "_blank", Jt = "theme bench", Yt = "external alternate", Xt = "bench", Zt = "tints", Qt = "small", $t = "tints-header", en = "check", tn = {
1468
+ theme: Pe,
1469
+ scheme: "system"
1470
+ }, Q = {
1471
+ palette: "palette",
1472
+ heading: "themes-heading"
1473
+ }, nn = {
1474
+ menu: "menu",
1475
+ item: "menuitemradio"
1476
+ }, rn = {
1477
+ group: "radiogroup",
1478
+ item: "radio"
1479
+ }, an = `[role="${nn.item}"]`, on = `[role="${rn.item}"]`, sn = "bottom center", cn = "mini", ln = "button", un = "scheme", dn = "palette", fn = "compact", pn = "glyph", mn = "overlay", hn = "muted", gn = "panel", _n = "heading", vn = "menu", $ = "divider", yn = "schemes", bn = "choice", xn = "name", Sn = "option", Cn = "check";
1480
+ he(["click", "keydown"]);
1481
+ //#endregion
1482
+ //#region src/components/ui-theme-menu/index.ts
1483
+ var wn = /* @__PURE__ */ e({
1484
+ HueDropdown: () => H,
1485
+ ThemeMenu: () => ThemeMenu,
1486
+ ThemePreference: () => V,
1487
+ UIThemeMenu: () => It
1488
+ });
1489
+ It.define();
1490
+ //#endregion
1491
+ export { H as a, Ee as c, Ae as d, ke as f, Qe as i, M as l, It as n, V as o, Oe as p, ThemeMenu as r, N as s, wn as t, De as u };
1492
+
1493
+ //# sourceMappingURL=ui-theme-menu-CuIjr8Ou.js.map