spell-ui 0.8.6 → 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 +13 -3
  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 +22 -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 +530 -24
  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 +124 -92
  621. package/dist/ui-section.js.map +1 -1
  622. package/dist/ui-segment.js +15 -12
  623. package/dist/ui-segment.js.map +1 -1
  624. package/dist/ui-select.js +83 -81
  625. package/dist/ui-select.js.map +1 -1
  626. package/dist/ui-shape.js +86 -58
  627. package/dist/ui-shape.js.map +1 -1
  628. package/dist/ui-sidebar.js +59 -56
  629. package/dist/ui-sidebar.js.map +1 -1
  630. package/dist/ui-sides.js +325 -0
  631. package/dist/ui-sides.js.map +1 -0
  632. package/dist/ui-site-nav.js +329 -0
  633. package/dist/ui-site-nav.js.map +1 -0
  634. package/dist/ui-site-tabs.js +177 -0
  635. package/dist/ui-site-tabs.js.map +1 -0
  636. package/dist/ui-slider.js +84 -81
  637. package/dist/ui-slider.js.map +1 -1
  638. package/dist/ui-space.js +7 -6
  639. package/dist/ui-space.js.map +1 -1
  640. package/dist/ui-split-panel.js +298 -0
  641. package/dist/ui-split-panel.js.map +1 -0
  642. package/dist/ui-stack.js +47 -23
  643. package/dist/ui-stack.js.map +1 -1
  644. package/dist/ui-statistic.js +15 -13
  645. package/dist/ui-statistic.js.map +1 -1
  646. package/dist/ui-step.js +31 -29
  647. package/dist/ui-step.js.map +1 -1
  648. package/dist/ui-sticky.js +7 -6
  649. package/dist/ui-sticky.js.map +1 -1
  650. package/dist/ui-tab.js +230 -138
  651. package/dist/ui-tab.js.map +1 -1
  652. package/dist/ui-table.js +724 -162
  653. package/dist/ui-table.js.map +1 -1
  654. package/dist/ui-terms.js +12 -10
  655. package/dist/ui-terms.js.map +1 -1
  656. package/dist/ui-text.js +53 -28
  657. package/dist/ui-text.js.map +1 -1
  658. package/dist/ui-theme-editor.js +1018 -1545
  659. package/dist/ui-theme-editor.js.map +1 -1
  660. package/dist/ui-theme-menu-CuIjr8Ou.js +1493 -0
  661. package/dist/ui-theme-menu-CuIjr8Ou.js.map +1 -0
  662. package/dist/ui-toast.js +45 -44
  663. package/dist/ui-toast.js.map +1 -1
  664. package/dist/ui-toc.js +75 -74
  665. package/dist/ui-toc.js.map +1 -1
  666. package/dist/ui-toolbar.js +51 -73
  667. package/dist/ui-toolbar.js.map +1 -1
  668. package/dist/ui-transition.js +12 -11
  669. package/dist/ui-transition.js.map +1 -1
  670. package/dist/ui-tree-diagram.js +676 -197
  671. package/dist/ui-tree-diagram.js.map +1 -1
  672. package/dist/ui-tree.js +625 -0
  673. package/dist/ui-tree.js.map +1 -0
  674. package/dist/ui-video.js +13 -11
  675. package/dist/ui-video.js.map +1 -1
  676. package/dist/ui-visibility.js +26 -25
  677. package/dist/ui-visibility.js.map +1 -1
  678. package/dist/ui-zoom.js +79 -78
  679. package/dist/ui-zoom.js.map +1 -1
  680. package/dist/util/TopLayerTip.d.ts +28 -0
  681. package/dist/util/index.d.ts +5 -2
  682. package/dist/vocabulary/DefaultValues.d.ts +34 -0
  683. package/dist/vocabulary/SharedVocabulary.d.ts +4 -0
  684. package/dist/vocabulary/SharedVocabulary.es.d.ts +7 -0
  685. package/dist/vocabulary/ValueSets.d.ts +18 -0
  686. package/dist/vocabulary/Vocabulary.d.ts +1 -0
  687. package/dist/vocabulary/defaults.generated.d.ts +6 -0
  688. package/dist/vocabulary/index.d.ts +1 -0
  689. package/package.json +1 -1
  690. package/dist/MarkdownEngine-CbuT9Mjc.js.map +0 -1
  691. package/dist/PrefStore-CeaTtjTz.js.map +0 -1
  692. package/dist/UIButton-XkfGqgh6.js +0 -6
  693. package/dist/UIButton-XkfGqgh6.js.map +0 -1
  694. package/dist/UIInput-BUudZstW.js +0 -6
  695. package/dist/UIInput-BUudZstW.js.map +0 -1
  696. package/dist/UIKeys-DJF2TIKE.js.map +0 -1
  697. package/dist/UILabel-C1jy3Yl8.js +0 -6
  698. package/dist/UILabel-C1jy3Yl8.js.map +0 -1
  699. package/dist/UIMenu-Btd-8V3A.js +0 -42
  700. package/dist/UIMenu-Btd-8V3A.js.map +0 -1
  701. package/dist/UIRuntime-BBuehGly.js.map +0 -1
  702. package/dist/components.es-DmLzT-Bq.js.map +0 -1
  703. package/dist/crisp-CoZRRDuQ.js +0 -6
  704. package/dist/fruity-CQFYeRlh.js +0 -6
  705. package/dist/fruity-CQFYeRlh.js.map +0 -1
  706. package/dist/fruity.theme-BJcMiPl1.js.map +0 -1
  707. package/dist/glass-CAfW11kL.js +0 -6
  708. package/dist/glass-CAfW11kL.js.map +0 -1
  709. package/dist/glass.theme-DQcBbtCW.js +0 -6
  710. package/dist/glass.theme-DQcBbtCW.js.map +0 -1
  711. package/dist/matrix-CqA59hiF.js +0 -6
  712. package/dist/matrix.theme-jqQZjcq3.js.map +0 -1
  713. package/dist/midnight-BnoVOrhC.js +0 -6
  714. package/dist/paper-CynH8ZuT.js +0 -6
  715. package/dist/persist.types-CsZxS8TG.js +0 -9
  716. package/dist/persist.types-CsZxS8TG.js.map +0 -1
  717. package/dist/pop-D2i9V_rG.js +0 -6
  718. package/dist/spell-BFtLICm7.js +0 -6
  719. package/dist/spell.theme-B7AU7SQX.js.map +0 -1
  720. package/dist/styles.en-RLpYiO5_.js.map +0 -1
  721. package/dist/ui-theme-menu-DyKZygpV.js +0 -921
  722. package/dist/ui-theme-menu-DyKZygpV.js.map +0 -1
@@ -1,10 +1,12 @@
1
1
  import { i as e } from "./rolldown-runtime-CYGlBXrH.js";
2
- import { Bt as t, ClipboardCopy as n, Ct as r, DOMElement as i, Dt as a, Et as o, Ft as s, It as c, Lt as l, Rt as u, St as d, Tt as f, UI as p, UIComponent as m, Vt as h, Warnings as g, after as ee, afterSolidUpdate as _, cssState as v, derived as y, lazy as te, onChange as ne, once as re, proto as ie, protoMerged as ae, soon as oe, state as b, untracked as x, whileConnected as se, wt as ce, zt as S } from "./core.js";
2
+ import { Bt as t, ClipboardCopy as n, DOMElement as r, Dt as i, Et as a, Ht as o, Lt as s, Ot as c, Rt as l, Tt as u, UI as d, UIComponent as f, Ut as p, Vt as m, Warnings as h, after as g, afterSolidUpdate as ee, cssState as _, derived as v, kt as y, lazy as te, onChange as b, once as x, proto as ne, protoMerged as re, soon as ie, state as S, untracked as C, whileConnected as ae, wt as oe, zt as se } from "./core.js";
3
3
  import "./ui-button.js";
4
4
  import "./ui-item.js";
5
+ import "./ui-dropdown.js";
5
6
  import "./ui-icon.js";
6
7
  import "./ui-label.js";
7
8
  import "./ui-parts.js";
9
+ import { t as w } from "./PrefStore-Qv0e5y04.js";
8
10
  import "./ui-message.js";
9
11
  import "./ui-input.js";
10
12
  import "./ui-checkbox.js";
@@ -16,30 +18,25 @@ import "./ui-slider.js";
16
18
  import "./ui-section.js";
17
19
  import "./ui-property-editor.js";
18
20
  import "./ui-code.js";
19
- import { t as C } from "./PrefStore-CeaTtjTz.js";
20
- import { a as le, i as ue } from "./ui-theme-menu-DyKZygpV.js";
21
- import { k as w } from "./styles.en-RLpYiO5_.js";
22
- import { For as T, Show as E } from "solid-js";
23
- import { claimElement as de, className as D, createComponent as O, delegateEvents as fe, effect as k, getOwner as A, insert as j, isServer as M, memo as N, readShallow as P, ref as F, setAttribute as I, style as L, template as R } from "@solidjs/web";
24
- //#region src/components/ui-theme-editor/UIThemeEditor.types.ts
25
- var pe = "theme-edits", me = ["glass", "fruity"], he = {
26
- min: 12,
27
- max: 20,
28
- step: 1
29
- }, ge = "spell-theme-bench", _e = class PageBridge {
21
+ import { i as ce, r as T, t as E } from "./ThemeDraft-B7NPif4d.js";
22
+ import { a as le, c as ue, d as de, f as fe, i as pe, l as me, o as he, s as D, u as ge } from "./ui-theme-menu-CuIjr8Ou.js";
23
+ import { For as O, Show as k } from "solid-js";
24
+ import { claimElement as _e, className as A, createComponent as j, delegateEvents as ve, effect as M, getOwner as N, insert as P, isServer as F, memo as I, readShallow as L, ref as R, setAttribute as z, style as ye, template as B } from "@solidjs/web";
25
+ //#region src/components/ui-theme-editor/PageBridge.ts
26
+ var be = class PageBridge {
30
27
  static applyCss(e, t) {
31
- let n = e.getElementById(ye);
28
+ let n = e.getElementById(Se);
32
29
  if (!t) {
33
30
  n?.remove();
34
31
  return;
35
32
  }
36
- n || (n = e.createElement("style"), n.id = ye), n !== e.head.lastElementChild && e.head.append(n), n.textContent !== t && (n.textContent = t);
33
+ n || (n = e.createElement("style"), n.id = Se), n !== e.head.lastElementChild && e.head.append(n), n.textContent !== t && (n.textContent = t);
37
34
  }
38
35
  static pinScheme(e, t) {
39
36
  let n = e.defaultView;
40
37
  if (!n) return;
41
- let r = !ve.has(n);
42
- ve.set(n, t), PageBridge.showScheme(e, t), r && n.addEventListener("storage", () => oe(() => PageBridge.showScheme(e, ve.get(n))));
38
+ let r = !xe.has(n);
39
+ xe.set(n, t), PageBridge.showScheme(e, t), r && n.addEventListener("storage", () => ie(() => PageBridge.showScheme(e, xe.get(n))));
43
40
  }
44
41
  static showScheme(e, t) {
45
42
  let n = e.documentElement;
@@ -65,7 +62,7 @@ var pe = "theme-edits", me = ["glass", "fruity"], he = {
65
62
  static collect(e, t, n, r = !1) {
66
63
  for (let i of e) {
67
64
  if (isStyleRule(i)) {
68
- for (let e of i.style.cssText.matchAll(be)) t.reads.add(e[1]);
65
+ for (let e of i.style.cssText.matchAll(Ce)) t.reads.add(e[1]);
69
66
  let e = [...i.style].filter((e) => e.startsWith("--"));
70
67
  for (let n of e) t.declares.add(n);
71
68
  if (e.length && !r && PageBridge.isBelowRoot(i.selectorText, n)) for (let n of e) t.overrides.add(n);
@@ -74,7 +71,7 @@ var pe = "theme-edits", me = ["glass", "fruity"], he = {
74
71
  }
75
72
  }
76
73
  static isBelowRoot(e, t) {
77
- let n = e.split(",").filter((e) => !xe.test(e.trim()));
74
+ let n = e.split(",").filter((e) => !we.test(e.trim()));
78
75
  return n.length ? t.some((e) => {
79
76
  try {
80
77
  return !!e.querySelector(n.join(","));
@@ -86,12 +83,12 @@ var pe = "theme-edits", me = ["glass", "fruity"], he = {
86
83
  static listen(e) {
87
84
  let onMessage = (t) => {
88
85
  let n = t.data;
89
- n?.type === "spell-theme-bench" && Se.test(t.origin) && PageBridge.take(n, e).then((e) => {
86
+ n?.type === "spell-theme-bench" && Te.test(t.origin) && PageBridge.take(n, e).then((e) => {
90
87
  e && t.source?.postMessage(e, t.origin);
91
88
  });
92
89
  };
93
90
  return window.addEventListener("message", onMessage), window.parent !== window && window.parent.postMessage({
94
- type: ge,
91
+ type: de,
95
92
  hello: !0
96
93
  }, "*"), () => window.removeEventListener("message", onMessage);
97
94
  }
@@ -104,7 +101,7 @@ var pe = "theme-edits", me = ["glass", "fruity"], he = {
104
101
  }
105
102
  };
106
103
  if (e.theme !== void 0 && await run("theme", () => t.theme(e.theme)), e.scheme !== void 0 && await run("scheme", () => t.scheme(e.scheme)), e.fullMonty && await run("full view", () => t.fullMonty?.()), e.css !== void 0 && await run("tuning", () => PageBridge.applyCss(document, e.css)), e.ask) return {
107
- type: ge,
104
+ type: de,
108
105
  reply: e.ask.id,
109
106
  look: PageBridge.look(document, e.ask.tokens)
110
107
  };
@@ -125,814 +122,11 @@ var pe = "theme-edits", me = ["glass", "fruity"], he = {
125
122
  for (let t of PageBridge.deepAll(e, "*")) t.shadowRoot && add(t.shadowRoot);
126
123
  return t;
127
124
  }
128
- }, ve = /* @__PURE__ */ new WeakMap(), ye = "ui-theme-editor-sheet", be = /var\(\s*(--[\w-]+)/g, xe = /^(?::root|html)(?:[.:[][^\s>+~]*)?$/;
125
+ }, xe = /* @__PURE__ */ new WeakMap(), Se = "ui-theme-editor-sheet", Ce = /var\(\s*(--[\w-]+)/g, we = /^(?::root|html)(?:[.:[][^\s>+~]*)?$/;
129
126
  function isStyleRule(e) {
130
127
  return "selectorText" in e && "style" in e;
131
128
  }
132
- var Se = /^https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/, z = class SavedTheme {
133
- static get has() {
134
- return SavedTheme.read() !== void 0;
135
- }
136
- static get choices() {
137
- return SavedTheme.read()?.choices;
138
- }
139
- static get css() {
140
- return SavedTheme.read()?.css;
141
- }
142
- static save(e, t) {
143
- let n = {
144
- choices: e,
145
- css: t
146
- };
147
- C.setAt(Ce, n);
148
- }
149
- static forget() {
150
- C.setAt(Ce, void 0);
151
- }
152
- static async restore() {
153
- let e = SavedTheme.read();
154
- if (!e) return !1;
155
- let { themes: t } = await p.load(), n = a.nameNow(t, e.choices.base);
156
- n !== e.choices.base && SavedTheme.save({
157
- ...e.choices,
158
- base: n
159
- }, e.css);
160
- try {
161
- await SavedTheme.wear(n, e.css);
162
- } catch (t) {
163
- return g.warn("SavedTheme", `the kept theme's base \`${e.choices.base}\` is gone; forgetting it`, t), SavedTheme.forget(), !1;
164
- }
165
- return !0;
166
- }
167
- static async follow(e) {
168
- let t = SavedTheme.read(), { themes: n, styles: r } = await p.load(), i = t && a.nameNow(n, t.choices.base) === e ? t.css : "";
169
- (i || r.has("theme-edits")) && r.register(pe, i, { page: !0 });
170
- }
171
- static async wear(e, t) {
172
- let n = ++SavedTheme.calls, { themes: r, styles: i } = await p.load();
173
- r.current !== e && await r.apply(e), n === SavedTheme.calls && i.register(pe, t, { page: !0 });
174
- }
175
- static putOnPage(e) {
176
- SavedTheme.calls++, p.styles.register(pe, e, { page: !0 });
177
- }
178
- static calls = 0;
179
- static read() {
180
- let e = C.getAt(Ce);
181
- return typeof e?.css == "string" && typeof e.choices?.base == "string" ? e : void 0;
182
- }
183
- }, Ce = "spell-ui:theme", B = class ThemeFile {
184
- name;
185
- kind;
186
- data;
187
- themes;
188
- palettes;
189
- constructor({ name: e, data: t, kind: n = "theme", themes: r = {}, palettes: i = {} }) {
190
- this.name = e, this.data = t, this.kind = n, this.themes = r, this.palettes = i;
191
- }
192
- get fileName() {
193
- return `${this.name}.${this.kind}.json5`;
194
- }
195
- get sheetPath() {
196
- return this.kind === "palette" ? `${Te}/${this.name}.css` : `${this.name}.css`;
197
- }
198
- css() {
199
- let e = this.declarations(), t = this.imports().map((e) => `@import "${e}";`);
200
- return [
201
- `/* GENERATED by \`yarn gen:styles\` from \`${this.fileName}\`: edit that file, never this sheet. */`,
202
- "",
203
- ...t.length ? [...t, ""] : [],
204
- "@layer ui.theme {",
205
- " :root {",
206
- ...e.map(([e, t]) => ` ${e}: ${t};`),
207
- " }",
208
- "}",
209
- ""
210
- ].join("\n");
211
- }
212
- overlayCss({ important: e = !1, comments: t = [] } = {}) {
213
- let n = this.declarations(), r = t.length ? `/* ${t.join("\n ")} */\n` : "";
214
- if (!n.length) return r;
215
- let i = e ? " !important" : "";
216
- return `${r}@layer ui.app {\n :root {\n${n.map(([e, t]) => ` ${e}: ${t}${i};`).join("\n")}\n }\n}\n`;
217
- }
218
- imports() {
219
- let { extends: e, palette: t, rules: n = [] } = this.data, r = this.kind === "palette" ? "../" : "./";
220
- return this.kind === "palette" && (e || t) && this.fail("a palette builds on nothing: no `extends`, no `palette`"), e && this.themeData(e), t && this.paletteData(t), [
221
- ...e ? [`./${e}.css`] : [],
222
- ...t ? [`./${Te}/${t}.css`] : [],
223
- ...n.map((e) => `${r}${Ee}/${e}.css`)
224
- ];
225
- }
226
- declarations() {
227
- let e = [];
228
- for (let [t, n] of Object.entries(this.data)) De.has(t) || (t === V ? this.componentDeclarations(n, e) : t === we ? this.ownDeclarations(n, e) : this.groupDeclarations(n, w, [t], e));
229
- return e;
230
- }
231
- values(e = /* @__PURE__ */ new Set()) {
232
- e.has(this.name) && this.fail(`it extends itself, through ${[...e].join(" > ")}`);
233
- let t = /* @__PURE__ */ new Map(), { extends: n, palette: r } = this.data, i = [...n ? [this.sibling(n, "theme", this.themeData(n))] : [], ...r ? [this.sibling(r, "palette", this.paletteData(r))] : []];
234
- for (let n of i) for (let [r, i] of n.values(/* @__PURE__ */ new Set([...e, this.name]))) t.set(r, i);
235
- for (let [e, n] of this.declarations()) t.set(e, n);
236
- return t;
237
- }
238
- groupDeclarations(e, t, n, r) {
239
- let i = t[n.at(-1)];
240
- if (i === void 0 && this.fail(`\`${n.join(".")}\` is no name in the theme tree; ${this.holds(t, n.slice(0, -1))}`), ThemeFile.isLeaf(i)) {
241
- r.push(...this.leafDeclarations(i, e, n));
242
- return;
243
- }
244
- ThemeFile.isGroup(e) || this.fail(`\`${n.join(".")}\` is a group, not a value; ${this.holds(i, n)}`);
245
- for (let [t, a] of Object.entries(e)) this.groupDeclarations(a, i, [...n, t], r);
246
- }
247
- leafDeclarations(e, t, n) {
248
- let r = this.valueText(t, n);
249
- return typeof e == "string" ? [[e, typeof r == "string" ? r : `light-dark(${r.light}, ${r.dark})`]] : [[e.light, typeof r == "string" ? r : r.light], [e.dark, typeof r == "string" ? r : r.dark]];
250
- }
251
- componentDeclarations(e, t) {
252
- for (let [n, r] of this.entriesOf(e, [V])) for (let [e, i] of this.entriesOf(r, [V, n])) {
253
- let r = `--ui-${n}-${e}`, a = Ae.get(r);
254
- a && this.fail(`\`${V}.${n}.${e}\` sets ${r}, which belongs in \`${a}\``), t.push(...this.leafDeclarations(r, i, [
255
- V,
256
- n,
257
- e
258
- ]));
259
- }
260
- }
261
- ownDeclarations(e, t) {
262
- let n = this.owners();
263
- for (let [r, i] of this.entriesOf(e, [we])) n.some((e) => r.startsWith(`${e}-`)) || this.fail(`\`${we}.${r}\` isn't the theme's: its name starts with ${n.map((e) => `\`${e}-\``).join(" or ")}`), t.push(...this.leafDeclarations(`--${r}`, i, [we, r]));
264
- }
265
- owners() {
266
- let e = [this.name];
267
- for (let t = this.data.extends; t && !e.includes(t); t = this.themes[t]?.extends) e.push(t);
268
- return e;
269
- }
270
- valueText(e, t) {
271
- return ThemeFile.isPair(e) ? {
272
- light: this.text(e.light, t),
273
- dark: this.text(e.dark, t)
274
- } : this.text(e, t);
275
- }
276
- text(e, t) {
277
- if (typeof e == "number") return String(e);
278
- typeof e != "string" && this.fail(`\`${t.join(".")}\` is a value: CSS text, a number, or \`{ "light": ..., "dark": ... }\``);
279
- let n = Oe.exec(e);
280
- return n && this.fail(`\`${t.join(".")}\` writes \`${n[0]}\`: write it as hex, \`${ThemeFile.hexOf(n)}\``), e.replace(ke, (e, n) => `var(${this.tokenAt(n, t)})`);
281
- }
282
- tokenAt(e, t) {
283
- let [n, ...r] = e.split(".");
284
- if (n === we && r.length === 1) return `--${r[0]}`;
285
- if (n === V && r.length === 2) return `--ui-${r[0]}-${r[1]}`;
286
- let i = w;
287
- for (let t of e.split(".")) i = ThemeFile.isGroup(i) ? i[t] : void 0;
288
- if (typeof i == "string") return i;
289
- this.fail(`\`${t.join(".")}\` points at \`{${e}}\`, ` + (i ? "a pair or a group, not one token" : "which is no name in the theme tree"));
290
- }
291
- static hexOf([, ...e]) {
292
- let [t, n, r, i] = e, a = [
293
- t,
294
- n,
295
- r
296
- ].map(Number);
297
- return i !== void 0 && a.push(Math.round(Number(i) * 255)), `#${a.map((e) => e.toString(16).padStart(2, "0")).join("")}`;
298
- }
299
- themeData(e) {
300
- let t = this.themes[e];
301
- return t || this.fail(`it extends \`${e}\`, but no \`${e}.theme.json5\` exists`), t;
302
- }
303
- paletteData(e) {
304
- let t = this.palettes[e];
305
- return t || this.fail(`its palette is \`${e}\`, but no \`${Te}/${e}.palette.json5\` exists`), t;
306
- }
307
- sibling(e, t, n) {
308
- return new ThemeFile({
309
- name: e,
310
- kind: t,
311
- data: n,
312
- themes: this.themes,
313
- palettes: this.palettes
314
- });
315
- }
316
- entriesOf(e, t) {
317
- return ThemeFile.isGroup(e) || this.fail(`\`${t.join(".")}\` is a group: names and their values`), Object.entries(e);
318
- }
319
- holds(e, t) {
320
- let n = t.length ? `\`${t.join(".")}\`` : "the top level", r = Object.keys(e);
321
- return t.length || r.push(V, we), `${n} holds: ${r.join(", ")}`;
322
- }
323
- fail(e) {
324
- throw TypeError(`ThemeFile: ${this.fileName}: ${e}`);
325
- }
326
- static isLeaf(e) {
327
- return typeof e == "string" || ThemeFile.isTokenPair(e);
328
- }
329
- static isTokenPair(e) {
330
- return ThemeFile.isPair(e);
331
- }
332
- static isPair(e) {
333
- return ThemeFile.isGroup(e) ? Object.keys(e).length === 2 && "light" in e && "dark" in e : !1;
334
- }
335
- static isGroup(e) {
336
- return typeof e == "object" && !!e && !Array.isArray(e);
337
- }
338
- static schema() {
339
- let e = { $ref: "#/definitions/value" }, group = (t) => ({
340
- type: "object",
341
- additionalProperties: !1,
342
- properties: Object.fromEntries(Object.entries(t).map(([t, n]) => [t, ThemeFile.isLeaf(n) ? e : group(n)]))
343
- });
344
- return {
345
- $schema: "http://json-schema.org/draft-07/schema#",
346
- title: "Spell UI theme",
347
- description: "A theme's values in nested groups (spell-ui's themeTree); `yarn gen:styles` writes its sheet.",
348
- type: "object",
349
- additionalProperties: !1,
350
- properties: {
351
- $schema: { type: "string" },
352
- title: {
353
- type: "string",
354
- description: "its name, for a theme a person names"
355
- },
356
- extends: {
357
- type: "string",
358
- description: "the theme it builds on"
359
- },
360
- palette: {
361
- type: "string",
362
- description: "the palette whose hues it borrows"
363
- },
364
- rules: {
365
- type: "array",
366
- items: { type: "string" },
367
- description: "its rules sheets, in themes/rules/"
368
- },
369
- ...group(w).properties,
370
- components: {
371
- type: "object",
372
- description: "a family's own tokens, under its name: menu > radius is --ui-menu-radius",
373
- additionalProperties: {
374
- type: "object",
375
- additionalProperties: e
376
- }
377
- },
378
- own: {
379
- type: "object",
380
- description: "the theme's private tokens: glass-blur is --glass-blur",
381
- additionalProperties: e
382
- }
383
- },
384
- definitions: { value: {
385
- description: "CSS text (a \"{group.name}\" points at another value), a number, or one per scheme",
386
- oneOf: [
387
- { type: "string" },
388
- { type: "number" },
389
- {
390
- type: "object",
391
- additionalProperties: !1,
392
- required: ["light", "dark"],
393
- properties: {
394
- light: { type: ["string", "number"] },
395
- dark: { type: ["string", "number"] }
396
- }
397
- }
398
- ]
399
- } }
400
- };
401
- }
402
- static sheets({ themes: e, palettes: t }) {
403
- let n = [...Object.entries(t).map(([n, r]) => new ThemeFile({
404
- name: n,
405
- data: r,
406
- kind: "palette",
407
- themes: e,
408
- palettes: t
409
- })), ...Object.entries(e).map(([n, r]) => new ThemeFile({
410
- name: n,
411
- data: r,
412
- themes: e,
413
- palettes: t
414
- }))];
415
- return Object.fromEntries(n.map((e) => [e.sheetPath, e.css()]));
416
- }
417
- }, V = "components", we = "own", Te = "palettes", Ee = "rules", De = /* @__PURE__ */ new Set([
418
- "$schema",
419
- "title",
420
- "extends",
421
- "palette",
422
- "rules"
423
- ]), Oe = /rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:\/\s*([\d.]+)\s*)?\)/, ke = /\{([\w.-]+)\}/g, Ae = (() => {
424
- let e = /* @__PURE__ */ new Map(), walk = (t, n) => {
425
- for (let [r, i] of Object.entries(t)) if (typeof i == "string") e.set(i, [...n, r].join("."));
426
- else if (B.isTokenPair(i)) for (let t of [i.light, i.dark]) e.set(t, [...n, r].join("."));
427
- else walk(i, [...n, r]);
428
- };
429
- return walk(w, []), e;
430
- })(), H = class ThemeTokens {
431
- themes;
432
- palettes;
433
- constructor({ themes: e, palettes: t }) {
434
- this.themes = e, this.palettes = t;
435
- }
436
- static async load() {
437
- let { default: t } = await import("./dist-BLYIGZVK.js").then((t) => /* @__PURE__ */ e(t.default, 1)), parse = async (e) => Object.fromEntries(await Promise.all(Object.entries(e).map(async ([e, n]) => [nameOf(e), t.parse(await n())]))), [n, r] = await Promise.all([parse(He), parse(Ue)]);
438
- return new ThemeTokens({
439
- themes: n,
440
- palettes: r
441
- });
442
- }
443
- static forScheme(e, t) {
444
- return pickScheme(e, t);
445
- }
446
- get names() {
447
- return Object.keys(this.themes).sort();
448
- }
449
- groupsFor(e, t = {}) {
450
- return [
451
- {
452
- place: Le,
453
- tokens: this.ownTokens(e)
454
- },
455
- ...Object.entries(w).map(([e, t]) => ({
456
- place: e,
457
- tokens: tokensUnder(t)
458
- })),
459
- {
460
- place: Ie,
461
- tokens: this.componentTokens()
462
- },
463
- ...Object.entries(t).map(([e, t]) => ({
464
- place: `${Re}.${e}`,
465
- tokens: [...t].sort(byName)
466
- }))
467
- ].filter((e) => e.tokens.length);
468
- }
469
- pathOf(e, t) {
470
- if (t.startsWith(`${Re}.`)) return e.replace(/^--[a-z]+-/, "").split("-");
471
- let n = this.placeOf(e);
472
- return (n.startsWith(`${t}.`) ? n.slice(t.length + 1) : n.slice(n.lastIndexOf(".") + 1)).split(/[.-]/).filter(Boolean);
473
- }
474
- placeOf(e) {
475
- let t = Me.get(e);
476
- if (t) return t;
477
- let n = this.families.find((t) => e.startsWith(`--ui-${t}-`));
478
- return n ? `${Ie}.${n}.${e.slice(`--ui-${n}-`.length)}` : `${Le}.${e.slice(2)}`;
479
- }
480
- static halfOf(e) {
481
- let t = e.slice(e.lastIndexOf(".") + 1);
482
- return je.has(e.slice(0, e.lastIndexOf("."))) && (t === "light" || t === "dark") ? t : void 0;
483
- }
484
- valueIn(e, t) {
485
- return this.valuesOf(e).get(t);
486
- }
487
- asWritten(e) {
488
- return e.replace(Be, (e, t) => {
489
- let n = Me.get(t);
490
- return n ? ThemeTokens.halfOf(n) ? e : `{${n}}` : this.families.find((e) => t.startsWith(`--ui-${e}-`)) ? `{${this.placeOf(t)}}` : e;
491
- });
492
- }
493
- writtenIn(e, t) {
494
- let n = this.themes[e];
495
- for (let e of t.split(".")) n = B.isGroup(n) ? n[e] : void 0;
496
- return n;
497
- }
498
- sourceOf(e, t, n) {
499
- let r = this.placeOf(t), i = ThemeTokens.halfOf(r);
500
- for (let t of this.chainOf(e)) {
501
- let e = this.writtenAt(t.data, i ? r.slice(0, r.lastIndexOf(".")) : r);
502
- if (e === void 0 || (B.isPair(e) && (e = e[i ?? n]), typeof e != "string" && typeof e != "number")) continue;
503
- let a = String(e), o = Pe.exec(a)?.[1], s = o ? "pointer" : Fe.test(a) ? "derived" : "plain";
504
- return {
505
- setBy: t.name,
506
- written: a,
507
- kind: s,
508
- pointer: o
509
- };
510
- }
511
- return { kind: "plain" };
512
- }
513
- tokenAt(e) {
514
- let [t, ...n] = e.split(".");
515
- return t === Le && n.length === 1 ? `--${n[0]}` : t === Ie && n.length === 2 ? `--ui-${n[0]}-${n[1]}` : Ne.get(e);
516
- }
517
- chainOf(e) {
518
- let t = [];
519
- for (let n = e, r = 0; n && r <= ze; r++) {
520
- let e = this.themes[n];
521
- if (!e) break;
522
- t.push({
523
- name: n,
524
- data: e
525
- }), e.palette && this.palettes[e.palette] && t.push({
526
- name: e.palette,
527
- data: this.palettes[e.palette]
528
- }), n = e.extends;
529
- }
530
- return t;
531
- }
532
- writtenAt(e, t) {
533
- let n = e;
534
- for (let e of t.split(".")) n = B.isGroup(n) ? n[e] : void 0;
535
- return n;
536
- }
537
- valuesOf(e) {
538
- let t = this.cache.get(e);
539
- if (!t) {
540
- let n = this.themes[e];
541
- t = n ? new B({
542
- name: e,
543
- data: n,
544
- themes: this.themes,
545
- palettes: this.palettes
546
- }).values() : /* @__PURE__ */ new Map(), this.cache.set(e, t);
547
- }
548
- return t;
549
- }
550
- cache = /* @__PURE__ */ new Map();
551
- get families() {
552
- return this.familyNames ??= [...new Set(Object.values(this.themes).flatMap((e) => Object.keys(e.components ?? {})))].sort((e, t) => t.length - e.length), this.familyNames;
553
- }
554
- familyNames;
555
- componentTokens() {
556
- let e = /* @__PURE__ */ new Set();
557
- for (let t of Object.values(this.themes)) for (let [n, r] of Object.entries(t.components ?? {})) for (let t of Object.keys(r ?? {})) e.add(`--ui-${n}-${t}`);
558
- return [...e].sort(byName);
559
- }
560
- ownTokens(e) {
561
- let t = /* @__PURE__ */ new Set();
562
- for (let n = e, r = 0; n && r <= ze; r++) {
563
- let e = this.themes[n];
564
- for (let n of Object.keys(e?.own ?? {})) t.add(`--${n}`);
565
- n = e?.extends;
566
- }
567
- return [...t].sort(byName);
568
- }
569
- };
570
- function nameOf(e) {
571
- return e.replace(/^.*\//, "").replace(/\.(?:theme|palette)\.json5$/, "");
572
- }
573
- function tokensUnder(e) {
574
- return typeof e == "string" ? [e] : B.isTokenPair(e) ? [e.light, e.dark] : Object.values(e).flatMap((e) => tokensUnder(e));
575
- }
576
- function pickScheme(e, t) {
577
- let n = e;
578
- for (let e = n.indexOf(Ve); e >= 0; e = n.indexOf(Ve)) {
579
- let r = e + Ve.length, [i, a, o] = splitPair(n, r);
580
- if (o < 0) break;
581
- n = n.slice(0, e) + (t === "light" ? i : a).trim() + n.slice(o + 1);
582
- }
583
- return n;
584
- }
585
- function splitPair(e, t) {
586
- let n = 0, r = -1;
587
- for (let i = t; i < e.length; i++) {
588
- let a = e[i];
589
- if (a === "(") n++;
590
- else if (a === ")") {
591
- if (n === 0) return r < 0 ? [
592
- e.slice(t, i),
593
- e.slice(t, i),
594
- i
595
- ] : [
596
- e.slice(t, r),
597
- e.slice(r + 1, i),
598
- i
599
- ];
600
- n--;
601
- } else a === "," && n === 0 && r < 0 && (r = i);
602
- }
603
- return [
604
- "",
605
- "",
606
- -1
607
- ];
608
- }
609
- function byName(e, t) {
610
- return e.localeCompare(t, "en", { numeric: !0 });
611
- }
612
- var je = /* @__PURE__ */ new Set(), Me = (() => {
613
- let e = /* @__PURE__ */ new Map(), walk = (t, n) => {
614
- for (let [r, i] of Object.entries(t)) {
615
- let t = [...n, r].join(".");
616
- typeof i == "string" ? e.set(i, t) : B.isTokenPair(i) ? (je.add(t), e.set(i.light, `${t}.light`), e.set(i.dark, `${t}.dark`)) : walk(i, [...n, r]);
617
- }
618
- };
619
- return walk(w, []), e;
620
- })(), Ne = new Map([...Me].map(([e, t]) => [t, e])), Pe = /^\{([\w.-]+)\}$/, Fe = /\{[\w.-]+\}|var\(|color-mix\(|\bfrom\b|calc\(/, Ie = "components", Le = "own", Re = "page", ze = 12, Be = /var\(\s*(--[\w-]+)\s*\)/g, Ve = "light-dark(", He = /* #__PURE__ */ Object.assign({
621
- "../../styles/themes/crisp.theme.json5": () => import("./crisp.theme-DRiePRdf.js").then((e) => e.default),
622
- "../../styles/themes/fruity.theme.json5": () => import("./fruity.theme-BJcMiPl1.js").then((e) => e.default),
623
- "../../styles/themes/glass.theme.json5": () => import("./glass.theme-DQcBbtCW.js").then((e) => e.default),
624
- "../../styles/themes/matrix.theme.json5": () => import("./matrix.theme-jqQZjcq3.js").then((e) => e.default),
625
- "../../styles/themes/merlot.theme.json5": () => import("./merlot.theme-S-QnNGsw.js").then((e) => e.default),
626
- "../../styles/themes/midnight.theme.json5": () => import("./midnight.theme-wXbqRYLy.js").then((e) => e.default),
627
- "../../styles/themes/paper.theme.json5": () => import("./paper.theme-B8R5Jn5H.js").then((e) => e.default),
628
- "../../styles/themes/pop.theme.json5": () => import("./pop.theme-CXzv8B9x.js").then((e) => e.default),
629
- "../../styles/themes/spell.theme.json5": () => import("./spell.theme-B7AU7SQX.js").then((e) => e.default)
630
- }), Ue = /* #__PURE__ */ Object.assign({ "../../styles/themes/palettes/apple.palette.json5": () => import("./apple.palette-B4ivrNlM.js").then((e) => e.default) }), U = class ThemeDraft {
631
- choices;
632
- files;
633
- text;
634
- ownPrefixes;
635
- constructor({ choices: e, files: t, text: n, ownPrefixes: r = [] }) {
636
- this.choices = e, this.files = t, this.text = n, this.ownPrefixes = r;
637
- }
638
- get slug() {
639
- return this.choices.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "theme";
640
- }
641
- get fileName() {
642
- return `${this.slug}.theme.json5`;
643
- }
644
- get hasChanges() {
645
- return Object.keys(this.basics).length > 0 || Object.keys(this.choices.tokens ?? {}).length > 0;
646
- }
647
- get tokens() {
648
- return this.choices.tokens ?? {};
649
- }
650
- get data() {
651
- let e = this.files;
652
- if (!e) return;
653
- let t = {
654
- title: this.choices.name,
655
- extends: this.choices.base
656
- };
657
- mergeInto(t, structuredClone(this.basics));
658
- for (let [n, r] of Object.entries(this.tokens)) {
659
- if (this.isPageToken(n)) continue;
660
- let i = e.placeOf(n), a = H.halfOf(i);
661
- if (a) {
662
- let e = i.slice(0, i.lastIndexOf("."));
663
- setAt(t, e, {
664
- ...getAt(t, e) ?? this.basePair(e),
665
- [a]: ThemeDraft.hex(valueOf(r, a))
666
- });
667
- } else setAt(t, i, this.fileValue(n, i, r));
668
- }
669
- return t;
670
- }
671
- sets(e) {
672
- if (this.tokens[e]) return !0;
673
- let t = this.files;
674
- if (!t) return !1;
675
- let n = t.placeOf(e), r = H.halfOf(n) ? n.slice(0, n.lastIndexOf(".")) : n;
676
- return getAt(this.basics, r) !== void 0;
677
- }
678
- get basics() {
679
- return this.basicsCache ??= this.basicsData, this.basicsCache;
680
- }
681
- basicsCache;
682
- get css() {
683
- return this.sheet({ important: !1 });
684
- }
685
- get frameCss() {
686
- return this.hasChanges ? [this.sheet({
687
- important: !0,
688
- comments: !1
689
- }), this.pageCss].filter(Boolean).join("\n") : "";
690
- }
691
- get changes() {
692
- let e = this.data;
693
- if (!e) return "";
694
- let t = [`// ${this.fileName}: ${this.text("fileMade", { base: this.choices.base })}`, `// ${this.text("fileMerge", { base: this.choices.base })}`], n = this.pageCss;
695
- return `${t.join("\n")}\n${JSON.stringify(e, void 0, 2)}\n${n ? `\n${n}` : ""}`;
696
- }
697
- sheet({ important: e, comments: t = !0 }) {
698
- let n = this.data;
699
- if (!n) return "";
700
- let { base: r } = this.choices;
701
- try {
702
- return new B({
703
- name: this.slug,
704
- data: n,
705
- themes: this.files.themes,
706
- palettes: this.files.palettes
707
- }).overlayCss({
708
- important: e,
709
- comments: t ? [`${this.fileName} -- ${this.text("sheetMade")}`, this.text("sheetBase", { base: r })] : []
710
- });
711
- } catch (e) {
712
- return g.warn("<ui-theme-editor>", "the theme file was refused", e), "";
713
- }
714
- }
715
- get pageCss() {
716
- let e = Object.entries(this.tokens).filter(([e]) => this.isPageToken(e)).map(([e, t]) => {
717
- let n = "both" in t ? t.both : `light-dark(${valueOf(t, "light")}, ${valueOf(t, "dark")})`;
718
- return ` ${e}: ${ThemeDraft.hex(n)} !important;`;
719
- });
720
- return e.length ? `/* ${this.text("pageOwnSheet")} */\n:root {\n${e.join("\n")}\n}\n` : "";
721
- }
722
- isPageToken(e) {
723
- return this.ownPrefixes.some((t) => e.startsWith(t));
724
- }
725
- fileValue(e, t, n) {
726
- if ("both" in n) return ThemeDraft.hex(n.both);
727
- let r = this.files, i = r.writtenIn(this.choices.base, t), half = (t) => {
728
- let a = n[t];
729
- if (a !== void 0) return ThemeDraft.hex(a);
730
- if (B.isPair(i)) return i[t];
731
- if (i !== void 0) return i;
732
- let o = r.valueIn(this.choices.base, e);
733
- return o === void 0 ? ThemeDraft.hex(n.light ?? n.dark) : r.asWritten(H.forScheme(o, t));
734
- };
735
- return {
736
- light: half("light"),
737
- dark: half("dark")
738
- };
739
- }
740
- basePair(e) {
741
- let t = this.files, n = t.writtenIn(this.choices.base, e);
742
- if (B.isPair(n)) return {
743
- light: String(n.light),
744
- dark: String(n.dark)
745
- };
746
- let tokenOf = (n) => [...Object.keys(this.tokens), ...pairTokensOf(e)].find((r) => t.placeOf(r) === `${e}.${n}`), value = (e) => {
747
- let n = tokenOf(e);
748
- return n && t.valueIn(this.choices.base, n) || "initial";
749
- };
750
- return {
751
- light: value("light"),
752
- dark: value("dark")
753
- };
754
- }
755
- get basicsData() {
756
- let { primary: e, secondary: t, background: n, headingFont: r, bodyFont: i, textSize: a, corners: o, depth: s, glass: c, base: l } = this.choices, u = {};
757
- if (e && (setAt(u, "brand.primary", {
758
- ...hueRole(e),
759
- text: We,
760
- header: Ge,
761
- background: Ke
762
- }), setAt(u, "surfaces.highlight", "color-mix(in oklab, {brand.primary.color} 16%, transparent)"), setAt(u, "brand.focus.color", "{brand.primary.color}"), setAt(u, "brand.focus.border", qe), setAt(u, "components.menu.active-background", "color-mix(in oklab, {brand.primary.color} 14%, transparent)"), setAt(u, "components.menu.active-color", "{brand.primary.text}")), t && setAt(u, "brand.secondary", hueRole(t)), n && (setAt(u, "surfaces.page", {
763
- light: `oklch(from var(--ui-${n}-on-light) 0.965 min(c, 0.025) h)`,
764
- dark: `oklch(from var(--ui-${n}-on-dark) 0.17 min(c, 0.03) h)`
765
- }), l === "fruity" && setAt(u, "own.glass-wallpaper", ThemeDraft.wallpaper(n))), i && setAt(u, "typography.family.body", Je[i]), r && setAt(u, "typography.family.heading", Je[r]), a && setAt(u, "typography.size", `${a}px`), o) {
766
- let [e, t, n, r, i] = Ye[o];
767
- setAt(u, "radii", {
768
- default: "{radii.m}",
769
- s: e,
770
- m: t,
771
- l: n
772
- }), setAt(u, "components.label.radius", i), setAt(u, "components.modal.radius", r);
773
- for (let [e, t] of Xe) setAt(u, `components.${e}.radius`, `{radii.${t}}`);
774
- }
775
- if (s) {
776
- let [e, t] = Ze[s];
777
- setAt(u, "shadows.raised", e), setAt(u, "shadows.floating", t), setAt(u, "shadows.floating-hover", "{shadows.floating}"), setAt(u, "shadows.overlay", "{shadows.floating}"), setAt(u, "components.card.shadow", "{shadows.raised}"), setAt(u, "components.card.hover-shadow", "{shadows.floating}"), setAt(u, "components.segment.shadow", "{shadows.raised}");
778
- }
779
- if (c && me.includes(l)) {
780
- let [e, t, n] = Qe[c];
781
- setAt(u, "own.glass-surface", e), setAt(u, "own.glass-surface-strong", t), setAt(u, "own.glass-blur", n);
782
- }
783
- return u;
784
- }
785
- static cornersOf(e) {
786
- return d.find((t) => {
787
- let [n, r, i] = Ye[t];
788
- return same(e.s, n) && same(e.m, r) && same(e.l, i);
789
- });
790
- }
791
- static depthOf(e, t) {
792
- return r.find((n) => same(e, Ze[n][0]) && same(t, Ze[n][1]));
793
- }
794
- static glassOf(e, t, n) {
795
- return f.find((r) => {
796
- let [i, a, o] = Qe[r];
797
- return same(e, i) && same(t, a) && same(n, o);
798
- });
799
- }
800
- static fontStack(e) {
801
- return Je[e].replace($e, (e, t) => `var(--ui-font-family-${t.split(".").at(-1)})`);
802
- }
803
- static hex(e) {
804
- return e.replace(et, (...e) => {
805
- let [t, n, r, i, a] = e, o = a === void 0 ? void 0 : a.endsWith("%") ? parseFloat(a) / 100 : Number(a), s = Object.assign([
806
- t,
807
- n,
808
- r,
809
- i,
810
- o === void 0 ? void 0 : String(o)
811
- ], {
812
- index: 0,
813
- input: t
814
- }), c = B.hexOf(s);
815
- return o === 1 ? c.slice(0, 7) : c;
816
- });
817
- }
818
- static wallpaper(e) {
819
- let wash = (t, n, r) => `light-dark(oklch(from var(--ui-${e}-on-light) ${n} min(c, 0.09) calc(h + ${t})), oklch(from var(--ui-${e}-on-dark) ${r} min(c, 0.11) calc(h + ${t})))`;
820
- return `radial-gradient(at 12% 18%, ${wash(0, .84, .36)} 0, transparent 46%), radial-gradient(at 88% 10%, ${wash(40, .9, .33)} 0, transparent 42%), radial-gradient(at 72% 92%, ${wash(-40, .88, .32)} 0, transparent 46%)`;
821
- }
822
- };
823
- function same(e, t) {
824
- return e !== void 0 && e.replace(/\s+/g, "").toLowerCase() === t.replace(/\s+/g, "").toLowerCase();
825
- }
826
- function valueOf(e, t) {
827
- return "both" in e ? e.both : e[t] ?? e[t === "light" ? "dark" : "light"];
828
- }
829
- function hueRole(e) {
830
- return {
831
- color: `{hues.${e}.color}`,
832
- inverted: `{hues.${e}.inverted}`,
833
- on: `{hues.${e}.on}`,
834
- "inverted-on": `{hues.${e}.inverted-on}`
835
- };
836
- }
837
- function pairTokensOf(e) {
838
- let t = e.split(".").at(-1) === "ink" ? "ink" : e.split(".").at(-2);
839
- return [`--ui-${t}-on-light`, `--ui-${t}-on-dark`];
840
- }
841
- function getAt(e, t) {
842
- let n = e;
843
- for (let e of t.split(".")) n = B.isGroup(n) ? n[e] : void 0;
844
- return n;
845
- }
846
- function setAt(e, t, n) {
847
- let r = t.split("."), i = e;
848
- for (let e of r.slice(0, -1)) B.isGroup(i[e]) || (i[e] = {}), i = i[e];
849
- i[r.at(-1)] = n;
850
- }
851
- function mergeInto(e, t) {
852
- for (let [n, r] of Object.entries(t)) B.isGroup(r) && !B.isPair(r) && B.isGroup(e[n]) ? mergeInto(e[n], r) : e[n] = B.isGroup(r) && !B.isPair(r) ? structuredClone(r) : r;
853
- }
854
- var We = {
855
- light: "oklch(from {brand.primary.color} min(l, 0.5) c h)",
856
- dark: "oklch(from {brand.primary.color} max(l, 0.78) c h)"
857
- }, Ge = {
858
- light: "oklch(from {brand.primary.color} min(l, 0.45) c h)",
859
- dark: "oklch(from {brand.primary.color} max(l, 0.85) c h)"
860
- }, Ke = {
861
- light: "oklch(from {brand.primary.color} 0.96 calc(c * 0.25) h)",
862
- dark: "oklch(from {brand.primary.color} 0.28 calc(c * 0.35) h)"
863
- }, qe = {
864
- light: "oklch(from {brand.primary.color} calc(l + 0.18) calc(c * 0.5) h)",
865
- dark: "oklch(from {brand.primary.color} calc(l - 0.1) calc(c * 0.7) h)"
866
- }, Je = {
867
- system: "-apple-system, BlinkMacSystemFont, system-ui, \"Segoe UI\", \"Noto Sans\", Ubuntu, Cantarell, sans-serif",
868
- rounded: "{typography.family.rounded}",
869
- serif: "{typography.family.serif}",
870
- georgia: "Georgia, \"DejaVu Serif\", \"Noto Serif\", serif",
871
- humanist: "Optima, Candara, \"Noto Sans\", \"Segoe UI\", sans-serif",
872
- verdana: "Verdana, \"DejaVu Sans\", \"Bitstream Vera Sans\", sans-serif",
873
- mono: "ui-monospace, \"SF Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace"
874
- }, Ye = {
875
- sharp: [
876
- "3px",
877
- "4px",
878
- "6px",
879
- "8px",
880
- "3px"
881
- ],
882
- soft: [
883
- "5px",
884
- "7px",
885
- "10px",
886
- "12px",
887
- "4px"
888
- ],
889
- round: [
890
- "8px",
891
- "10px",
892
- "14px",
893
- "18px",
894
- "6px"
895
- ],
896
- pill: [
897
- "9999px",
898
- "14px",
899
- "20px",
900
- "24px",
901
- "9999px"
902
- ]
903
- }, Xe = [
904
- ["button", "s"],
905
- ["input", "m"],
906
- ["dropdown", "m"],
907
- ["menu", "m"],
908
- ["message", "m"],
909
- ["popup", "m"],
910
- ["card", "l"],
911
- ["segment", "l"],
912
- ["section", "l"],
913
- ["panel", "l"],
914
- ["toast", "l"]
915
- ], Ze = {
916
- flat: ["0 0 0 1px light-dark(#0000000f, #ffffff14)", "0 0 0 1px light-dark(#00000014, #ffffff1a), 0 4px 12px light-dark(#00000014, #00000059)"],
917
- soft: ["0 1px 2px light-dark(#281e500f, #00000040), 0 8px 30px light-dark(#281e501f, #00000059)", "0 2px 4px light-dark(#281e500f, #0000004d), 0 16px 40px light-dark(#281e5029, #00000073)"],
918
- lifted: ["0 2px 4px light-dark(#281e5014, #0000004d), 0 14px 40px light-dark(#281e5033, #00000080)", "0 4px 8px light-dark(#281e501a, #00000059), 0 28px 64px light-dark(#281e5042, #00000099)"]
919
- }, Qe = {
920
- clear: [
921
- "light-dark(#ffffff40, #26243047)",
922
- "light-dark(#ffffff66, #1e1c2666)",
923
- "blur(18px) saturate(1.8)"
924
- ],
925
- frosted: [
926
- "light-dark(#ffffff73, #26243073)",
927
- "light-dark(#ffffff9e, #1e1c2694)",
928
- "blur(28px) saturate(1.7)"
929
- ],
930
- solid: [
931
- "light-dark(#ffffffe6, #262430eb)",
932
- "light-dark(#fffffff7, #1e1c26f7)",
933
- "none"
934
- ]
935
- }, $e = /\{([\w.-]+)\}/g, et = /rgba?\(\s*(\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)\s*(?:[/,]\s*([\d.]+%?)\s*)?\)/g;
129
+ var Te = /^https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/;
936
130
  //#endregion
937
131
  //#region ../src/util/color.ts
938
132
  function rgbToHex({ r: e, g: t, b: n, alpha: r }) {
@@ -947,7 +141,7 @@ function byte(e) {
947
141
  }
948
142
  //#endregion
949
143
  //#region src/components/ui-theme-editor/TokenColor.ts
950
- var W = class TokenColor {
144
+ var V = class TokenColor {
951
145
  static isColor(e) {
952
146
  return !!e && !e.includes("var(") && CSS.supports("color", e);
953
147
  }
@@ -971,7 +165,7 @@ var W = class TokenColor {
971
165
  static paint(e, t) {
972
166
  let n = TokenColor.canvas();
973
167
  if (!n || !e) return;
974
- n.clearRect(0, 0, 1, 1), t && (n.fillStyle = t, n.fillRect(0, 0, 1, 1)), n.fillStyle = tt, n.fillStyle = e, n.fillRect(0, 0, 1, 1);
168
+ n.clearRect(0, 0, 1, 1), t && (n.fillStyle = t, n.fillRect(0, 0, 1, 1)), n.fillStyle = Ee, n.fillStyle = e, n.fillRect(0, 0, 1, 1);
975
169
  let [r, i, a, o] = n.getImageData(0, 0, 1, 1).data;
976
170
  return {
977
171
  red: r,
@@ -993,7 +187,7 @@ var W = class TokenColor {
993
187
  }
994
188
  return TokenColor.context;
995
189
  }
996
- }, tt = "#000000", nt = class TokenTree {
190
+ }, Ee = "#000000", De = class TokenTree {
997
191
  nodes;
998
192
  roots;
999
193
  constructor({ groups: e, pathOf: t, labelOf: n }) {
@@ -1044,8 +238,9 @@ var W = class TokenColor {
1044
238
  };
1045
239
  return t.set(r, o), o;
1046
240
  }
1047
- }, rt = {
241
+ }, Oe = {
1048
242
  tag: "ui-theme-editor",
243
+ icon: "palette",
1049
244
  topics: [
1050
245
  "forms",
1051
246
  "controls",
@@ -1083,7 +278,7 @@ var W = class TokenColor {
1083
278
  group: "content",
1084
279
  kind: "json",
1085
280
  reflect: !1,
1086
- description: "PROPERTY: the real pages to preview, each in a frame wearing the theme as it changes (`PreviewPage[]`: `id`, `label`, `url`, `width`, `reach`, `themeKey`, `icon` ...). None: a sample app, and the page itself wears the theme."
281
+ description: "PROPERTY: the real pages to preview, each in a frame wearing the theme as it changes (`PreviewPage[]`: `id`, `label`, `url`, `width`, `reach`, `icon` ...). None: a sample app, and the page itself wears the theme."
1087
282
  }
1088
283
  ],
1089
284
  events: [
@@ -1099,8 +294,8 @@ var W = class TokenColor {
1099
294
  },
1100
295
  {
1101
296
  name: "ui-saved",
1102
- detail: "{ value?: ThemeChoices, css: string }",
1103
- description: "Stop using forgot the theme kept in this browser (`SavedTheme`), which the Spell editor wore over its base; `value` is never sent now."
297
+ detail: "{ value?: ThemeChoices, css: string, id?: string }",
298
+ description: "Save, Save as new, Import or Delete changed My themes (`SavedTheme`, epic `debut` P25): `value` and `css` the theme saved, `id` its id; a delete sends neither."
1104
299
  }
1105
300
  ],
1106
301
  slots: [],
@@ -1473,15 +668,100 @@ var W = class TokenColor {
1473
668
  description: "A glass choice."
1474
669
  },
1475
670
  {
1476
- key: "forget",
1477
- text: "Stop using",
1478
- description: "The button that forgets the kept theme."
671
+ key: "save",
672
+ text: "Save",
673
+ description: "The button that saves the theme by its name, as one of My themes."
1479
674
  },
1480
675
  {
1481
- key: "forgetTip",
1482
- text: "Forget the theme kept in this browser: the Spell editor stops wearing it",
676
+ key: "saveTip",
677
+ text: "Save it by its name, as one of My themes: it shows in every theme menu",
1483
678
  description: "Its tooltip."
1484
679
  },
680
+ {
681
+ key: "saveAs",
682
+ text: "Save as new",
683
+ description: "The button that saves a copy, a new one of My themes."
684
+ },
685
+ {
686
+ key: "saveAsTip",
687
+ text: "Save a copy as a new one of My themes, leaving the one you opened as it was",
688
+ description: "Its tooltip."
689
+ },
690
+ {
691
+ key: "remove",
692
+ text: "Delete",
693
+ description: "The button that deletes the one of My themes being edited."
694
+ },
695
+ {
696
+ key: "removeTip",
697
+ text: "Delete this one of My themes, after asking",
698
+ description: "Its tooltip."
699
+ },
700
+ {
701
+ key: "removeAsk",
702
+ text: "Delete “{name}” from My themes?",
703
+ description: "What Delete asks first."
704
+ },
705
+ {
706
+ key: "exportTheme",
707
+ text: "Export",
708
+ description: "The link that downloads the theme as a theme file."
709
+ },
710
+ {
711
+ key: "exportTip",
712
+ text: "Download it as a theme file, {file}, to import in another browser",
713
+ description: "Its tooltip."
714
+ },
715
+ {
716
+ key: "importTheme",
717
+ text: "Import",
718
+ description: "The file picker that adds a theme file to My themes."
719
+ },
720
+ {
721
+ key: "importTip",
722
+ text: "Add a theme file (.theme.json5) to My themes",
723
+ description: "Its tooltip."
724
+ },
725
+ {
726
+ key: "importBad",
727
+ text: "{file} isn't a theme file: {problem}",
728
+ description: "Said when an imported file isn't a theme."
729
+ },
730
+ {
731
+ key: "myThemes",
732
+ text: "My themes",
733
+ description: "The group of the themes saved by name, in Start from and Open."
734
+ },
735
+ {
736
+ key: "openMine",
737
+ text: "Open one of My themes",
738
+ description: "The select that opens one of My themes, to change in place."
739
+ },
740
+ {
741
+ key: "editing",
742
+ text: "Editing “{name}”: Save writes it back",
743
+ description: "Says which of My themes is open."
744
+ },
745
+ {
746
+ key: "intoSpellUi",
747
+ text: "Save into Spell UI",
748
+ description: "The Spell admin's button that adds the theme to Spell's own."
749
+ },
750
+ {
751
+ key: "intoSpellUiTip",
752
+ text: "Write it as one of Spell's own themes: a theme file and its sheet in Spell UI's themes folder, and in the theme list",
753
+ description: "Its tooltip."
754
+ },
755
+ {
756
+ key: "intoSpellUiDone",
757
+ text: "Saved into Spell UI as {file}: reload to see it among Spell's themes",
758
+ description: "Said once it's written."
759
+ },
760
+ {
761
+ key: "intoSpellUiAsk",
762
+ text: "Spell UI has a theme named {name} already. Write over it?",
763
+ description: "Asked before writing over one."
764
+ },
1485
765
  {
1486
766
  key: "startOver",
1487
767
  text: "Start over",
@@ -1717,6 +997,11 @@ var W = class TokenColor {
1717
997
  text: "Shadows",
1718
998
  description: "Group: `shadows`."
1719
999
  },
1000
+ {
1001
+ key: "groupCode",
1002
+ text: "Code",
1003
+ description: "Group: `code`, the code's colours (epic `debut` P22)."
1004
+ },
1720
1005
  {
1721
1006
  key: "groupMotion",
1722
1007
  text: "Motion",
@@ -1998,9 +1283,9 @@ var W = class TokenColor {
1998
1283
  description: "Name of the sample progress bar."
1999
1284
  }
2000
1285
  ]
2001
- }, it = "@layer ui.components.theme-editor.types{:host{--_ui-theme-editor-side-width:var(--ui-theme-editor-side-width,440px);--_ui-theme-editor-gap:var(--ui-theme-editor-gap,12px);display:block;container-type:inline-size}.theme-editor{gap:var(--_ui-theme-editor-gap);box-sizing:border-box;height:100%;color:var(--ui-text-color);font-family:var(--ui-font-family);grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);display:grid}.theme-editor.paged{min-height:640px}.body{grid-template-columns:minmax(0, 1fr) var(--_ui-theme-editor-side-width);gap:var(--_ui-theme-editor-gap);min-height:0;display:grid}@container (width<960px){.body{grid-template-columns:minmax(0,1fr)}}}@layer ui.components.theme-editor.content{.bar{border-radius:var(--ui-radius-l,12px);background:var(--ui-bar-background,var(--ui-surface));min-width:0;backdrop-filter:var(--ui-bar-filter,none);box-shadow:var(--ui-shadow-subtle,none);align-items:center;gap:14px;padding:8px 12px;display:flex}.title{flex:none;align-items:center;gap:10px;display:flex}.title ui-icon{color:var(--ui-primary);font-size:1.4em}.title h1{font-family:var(--ui-font-family-heading,inherit);white-space:nowrap;margin:0;font-size:1.1em;line-height:1.2}.tools-wrap{flex:auto;min-width:0;display:flex;position:relative}.tools{--_fade-start:0px;--_fade-end:0px;mask-image:linear-gradient(to right, transparent, #000 var(--_fade-start), #000 calc(100% - var(--_fade-end)), transparent);scrollbar-width:none;--ui-menu-margin:0;flex:auto;align-items:center;gap:10px;min-width:0;display:flex;overflow-x:auto}.tools>*,.page-toggles{margin-inline-start:auto}.toggle::part(item){color:var(--ui-text-muted)}.toggle.on::part(item){color:var(--ui-text-color);background:color-mix(in oklab, var(--ui-text-color) 9%, transparent);box-shadow:inset 0 1px 3px #00000047, inset 0 0 0 1px color-mix(in oklab, var(--ui-text-color) 12%, transparent)}.more-start .tools{--_fade-start:40px}.more-end .tools{--_fade-end:40px}.edge{z-index:1;width:26px;color:var(--ui-text-muted);cursor:pointer;background:0 0;border:0;place-items:center;padding:0;display:inline-grid;position:absolute;inset-block:0}.edge.start{inset-inline-start:0}.edge.end{inset-inline-end:0}.edge[hidden]{display:none}.edge:hover{color:var(--ui-link,var(--ui-primary))}.edge ui-icon{--ui-icon-width:auto;margin:0}.bar-toggle{--ui-button-radius:9999px;--ui-button-background:transparent}.bar-toggle[aria-pressed=true]{--ui-button-background:var(--ui-menu-segmented-active-background,var(--ui-surface-strong))}.pages{gap:var(--_ui-theme-editor-gap);grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr);min-height:0;display:grid}.pages.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pages.grid>.page.wide{grid-column:1/-1}.page{border-radius:var(--ui-radius-l,12px);background:var(--ui-surface);border:1px solid var(--ui-border-color);min-height:0;box-shadow:var(--ui-shadow-raised,none);grid-template-rows:auto minmax(0,1fr);gap:6px;margin:0;padding:6px;display:grid}.page[hidden]{display:none}@container (width<960px){.pages,.pages.grid{grid-template-columns:minmax(0,1fr);grid-auto-rows:70vh}.page-path{display:none}}.page-head{border-radius:calc(var(--ui-radius-l,12px) - 6px);cursor:grab;align-items:center;gap:8px;min-width:0;padding:2px 6px;display:flex}.page-head:focus-visible{outline:2px solid var(--ui-focus-color,var(--ui-primary));outline-offset:1px}.pages.dragging iframe{pointer-events:none}.page{position:relative}.page.drop-before:after,.page.drop-after:after{content:\"\";background:var(--ui-primary);pointer-events:none;border-radius:2px;width:4px;position:absolute;inset-block:0}.page.drop-before:after{inset-inline-start:calc(-1 * var(--_ui-theme-editor-gap) / 2 - 2px)}.page.drop-after:after{inset-inline-end:calc(-1 * var(--_ui-theme-editor-gap) / 2 - 2px)}.page-icon{--ui-icon-width:auto;color:var(--ui-primary-text,var(--ui-primary));margin:0}.page-title{white-space:nowrap;font-weight:600}.page-path{text-overflow:ellipsis;white-space:nowrap;color:var(--ui-text-muted);margin-inline-end:auto;font-size:.8em;overflow:hidden}.page-tool{color:var(--ui-text-muted);display:inline-flex}.frames{grid-template-columns:minmax(0,1fr);gap:6px;min-height:0;display:grid}.frames.both{grid-template-columns:repeat(2,minmax(0,1fr))}.frames.dark-first .frame.dark{order:-1}.frame{grid-template-rows:minmax(0,1fr);min-height:0;display:grid}.viewport{border-radius:calc(var(--ui-radius-l,12px) - 6px);background:var(--ui-background);min-height:0;position:relative;overflow:hidden}.viewport.phone{background:var(--ui-surface-muted,var(--ui-background))}.viewport iframe{transform-origin:0 0;background:var(--ui-background);border:0;position:absolute;inset:0 auto auto 0}.viewport:not(.loaded) iframe{visibility:hidden}.viewport .note{margin:1.5em}.previews{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));align-content:start;gap:1em;display:grid}.sample{border-radius:var(--ui-radius-l,14px);color:var(--ui-text-color);font-family:var(--ui-font-family);background-color:var(--ui-background);background-image:var(--ui-bar-wallpaper,none);box-shadow:0 0 0 1px var(--ui-border-color);--ui-card-margin-block:0;--ui-progress-margin:0;--ui-message-margin:0;--ui-message-icon-size:1.25em;flex-direction:column;gap:.9em;padding:1.1em;display:flex}.sample[hidden]{display:none}.sample-head{justify-content:space-between;align-items:center;gap:.75em;display:flex}.sample-scheme{font:600 .7em/1 var(--ui-font-family-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--ui-text-muted)}.sample-title{font:700 1.45em/1.15 var(--ui-font-family-heading);color:var(--ui-text-dark);margin-block-start:.2em}.sample-badge{border-radius:var(--ui-radius-m,10px);background:var(--ui-primary-background);block-size:2.4em;inline-size:2.4em;color:var(--ui-primary-text);place-items:center;display:grid}.habits{flex-direction:column;gap:.6em;margin-block:.6em .9em;display:flex}.add{gap:.5em;display:flex}.add>ui-input{flex:1;min-inline-size:0}.sample-row{--ui-button-margin-inline:0;flex-wrap:wrap;align-items:center;gap:.5em;display:flex}.side{overscroll-behavior:contain;border-radius:var(--ui-radius-l,12px);background:var(--ui-surface);border:1px solid var(--ui-border-color);min-height:0;box-shadow:var(--ui-shadow-raised,none);flex-direction:column;gap:10px;padding:12px;display:flex;overflow-y:auto}.actions{--ui-button-margin-inline:0;flex-wrap:wrap;gap:.5em;display:flex}.note{color:var(--ui-text-muted);margin:.5em 0}.properties{padding:4px 8px 8px;display:block}.file{min-width:0;font-family:var(--ui-font-family-mono);color:var(--ui-text-muted);white-space:nowrap;text-overflow:ellipsis;flex:auto;font-size:.8em;overflow:hidden}.group::part(heading){white-space:nowrap}.changes ui-code{--ui-code-font-size:.8em;--ui-code-line-height:1.55}.changes .note{padding-inline:8px}.properties ui-item{white-space:nowrap}.swatches{grid-auto-columns:minmax(0,22px);grid-auto-flow:column;gap:4px;margin-inline:-4px;padding:4px;display:grid}.swatch{aspect-ratio:1;background:var(--_swatch);cursor:pointer;inline-size:100%;transition:transform var(--ui-duration-fast,.1s);border:0;border-radius:50%;padding:0;box-shadow:inset 0 0 0 1px light-dark(#0000001f,#ffffff38)}.swatch:hover{transform:scale(1.12)}.swatch.own{--_swatch:var(--_own-light);background:linear-gradient(90deg, var(--_own-light) 50%, var(--_own-dark) 50%)}.swatch[aria-checked=true]{box-shadow:0 0 0 2px var(--ui-surface,white), 0 0 0 4px var(--_swatch,var(--ui-text-muted))}.swatch:focus-visible{outline:var(--ui-focus-width,2px) solid var(--ui-focus-color);outline-offset:4px}.basics,.tokens{flex-direction:column;gap:10px;display:flex}.group{--ui-section-margin:0;--ui-section-content-padding:0;border-radius:calc(var(--ui-radius-l,12px) - 4px);border:1px solid var(--ui-border-color-internal,var(--ui-border-color));background:color-mix(in oklab, var(--ui-surface) 55%, transparent);display:block;overflow:clip}.group::part(title){background:linear-gradient(var(--ui-section-title-background,var(--ui-surface-strong)), var(--ui-section-title-background,var(--ui-surface-strong))), linear-gradient(var(--ui-surface), var(--ui-surface)), var(--ui-background);border-block-end:1px solid var(--ui-border-color-internal,var(--ui-border-color));padding:6px 8px}.group::part(heading){font-size:1em}.branch{--ui-section-margin:0;--ui-section-content-padding:0;border-inline-start:1px solid var(--ui-border-color-internal,var(--ui-border-color));margin-inline-start:12px;display:block}.branch::part(title){background:linear-gradient(var(--ui-surface), var(--ui-surface)), var(--ui-background);padding:4px 8px}.branch::part(heading){font-size:.85em;font-weight:600;font-family:var(--ui-font-family-mono,monospace)}.mark{text-align:center;flex:none;width:1em;font-size:.8em;line-height:1}.mark.set{color:var(--ui-primary-text,var(--ui-primary))}.mark.from{color:var(--ui-text-muted)}.group-count{color:var(--ui-text-muted);white-space:nowrap;font-size:.75em}.chip{--ui-button-radius:9999px;flex:none}.chip[aria-pressed=true]{--ui-button-background:var(--ui-primary-background,var(--ui-surface-strong))}.marks-legend{color:var(--ui-text-muted);margin:0;padding-inline:8px;font-size:.75em}.marks-legend .mark{display:inline-block}.side-head{z-index:calc(var(--ui-z-sticky,10) + 10);background:linear-gradient(var(--ui-surface), var(--ui-surface)), var(--ui-background);border-block-end:1px solid var(--ui-border-color-internal,var(--ui-border-color));gap:8px;margin:0 -12px;padding:12px 12px 6px;display:grid;position:sticky;top:-12px;container-type:scroll-state}@container scroll-state(stuck:top){.side-head:after{content:\"\";pointer-events:none;background:linear-gradient(#0000001f,#0000);height:10px;position:absolute;inset:100% 0 auto}}.tokens-bar{align-items:center;gap:2px;display:flex}.tokens-bar .tokens-title{margin-inline-end:auto}.head-tool{--ui-button-background:transparent;--ui-button-radius:.45em}.head-tool[aria-pressed=true]{--ui-button-background:var(--ui-menu-segmented-active-background,var(--ui-surface-strong))}.info-pane{gap:4px;display:grid}.half-dot{box-sizing:border-box;border:1.5px solid var(--ui-warning-text,#b45309);background:linear-gradient(90deg, var(--ui-warning-text,#b45309) 50%, var(--ui-surface) 50%);border-radius:50%;width:9px;height:9px;display:inline-block}.tokens-title{font-family:var(--ui-font-family-heading,inherit);margin:0;font-size:1em}.find-row{align-items:center;gap:6px;display:flex}.find-row .find{flex:auto;min-width:0}.toggle-all{width:1.9em;height:1.9em;color:var(--ui-text-muted);cursor:pointer;background:0 0;border:none;border-radius:.45em;flex:none;place-items:center;padding:0;display:inline-grid}.toggle-all:hover{color:var(--ui-link,var(--ui-primary));background:color-mix(in oklab, currentColor 10%, transparent)}.toggle-all:focus-visible{outline:2px solid var(--ui-focus-color,var(--ui-link));outline-offset:1px}.chevrons{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:1em;height:1em;display:block}.legend{color:var(--ui-text-muted);flex-wrap:wrap;align-items:center;gap:4px 10px;padding-inline:8px;font-size:.75em;display:flex}.legend-label{font-weight:600}.legend-item{white-space:nowrap;align-items:center;gap:4px;display:inline-flex}.legend-item.overrides{flex-basis:100%}.legend-item ui-icon{--ui-icon-width:auto;color:var(--ui-primary-text,var(--ui-primary));margin:0}.probe{width:0;height:0;position:absolute;overflow:hidden}.probe.ui-light{color-scheme:light}.probe.ui-dark{color-scheme:dark}}", at = /* @__PURE__ */ R("<div class=pages>"), ot = /* @__PURE__ */ R("<div class=\"ui theme-editor\"><div class=body><!><!></div><div class=\"probe ui-light\"aria-hidden=true></div><div class=\"probe ui-dark\"aria-hidden=true>"), st = /* @__PURE__ */ R("<ui-button class=\"bar-toggle phone\"size=small icon=\"mobile alternate\">", 1), ct = /* @__PURE__ */ R("<header class=bar><div class=title><ui-icon name=swatchbook aria-hidden=true></ui-icon><h1></h1></div><div class=tools-wrap><div class=tools><!><!><!></div><!>", 1), lt = /* @__PURE__ */ R("<ui-item class=toggle icon=\"exchange alternate\">", 1), ut = /* @__PURE__ */ R("<ui-menu class=schemes-group appearance=\"segmented link\"size=small><!><!>", 1), dt = /* @__PURE__ */ R("<ui-item>", 1), ft = /* @__PURE__ */ R("<ui-menu class=page-toggles appearance=\"segmented link\"size=small>", 1), pt = /* @__PURE__ */ R("<ui-item class=toggle>", 1), mt = /* @__PURE__ */ R("<button type=button><ui-icon aria-hidden=true>", 1), ht = /* @__PURE__ */ R("<ui-menu appearance=\"segmented link\"size=small>", 1), gt = /* @__PURE__ */ R("<a class=page-tool target=_blank><ui-icon name=\"external alternate\"appearance=link aria-hidden=true>", 1), _t = /* @__PURE__ */ R("<figure class=page><figcaption class=page-head draggable=true tabindex=0><ui-icon class=page-icon aria-hidden=true></ui-icon><span class=page-title></span><code class=page-path></code><ui-icon class=page-tool name=redo link appearance=link></ui-icon></figcaption><div>", 1), vt = /* @__PURE__ */ R("<iframe>"), yt = /* @__PURE__ */ R("<p class=\"note loading\">"), bt = /* @__PURE__ */ R("<div><div class=viewport>"), xt = /* @__PURE__ */ R("<p class=note>"), St = /* @__PURE__ */ R("<div class=previews><!><!>"), Ct = /* @__PURE__ */ R("<div><div class=sample-head><div><div class=sample-scheme></div><div class=sample-title></div></div><span class=sample-badge><ui-icon name=seedling aria-hidden=true></ui-icon></span></div><ui-card fluid><ui-content><ui-header></ui-header><div class=habits><ui-checkbox selected></ui-checkbox><ui-checkbox></ui-checkbox><ui-checkbox></ui-checkbox></div><div class=add><ui-input></ui-input><ui-button icon=plus color=primary></ui-button></div></ui-content></ui-card><div class=sample-row><ui-button size=small color=secondary></ui-button><ui-button size=small appearance=basic></ui-button><ui-label size=small color=primary></ui-label><ui-checkbox appearance=toggle selected></ui-checkbox></div><ui-message color=primary><ui-icon slot=icon name=bolt></ui-icon><b></b> </ui-message><ui-progress value=66>", 1), wt = /* @__PURE__ */ R("<aside class=side><!><!><!><!>"), Tt = /* @__PURE__ */ R("<ui-button size=small appearance=basic>", 1), Et = /* @__PURE__ */ R("<div class=actions><ui-button size=small appearance=basic>", 1), Dt = /* @__PURE__ */ R("<section class=basics><div class=side-head><header class=tokens-bar><h2 class=tokens-title></h2></header></div><!><!><!><!>"), Ot = /* @__PURE__ */ R("<ui-property name=name><ui-input size=small fluid>", 1), kt = /* @__PURE__ */ R("<ui-property name=base><ui-select size=small fluid>", 1), At = /* @__PURE__ */ R("<ui-section class=group collapsible level=3 sticky><ui-property-editor class=properties>", 1), jt = /* @__PURE__ */ R("<ui-property><div class=swatches role=radiogroup><!><!>", 1), Mt = /* @__PURE__ */ R("<button type=button role=radio>"), Nt = /* @__PURE__ */ R("<ui-property><ui-select size=small fluid><ui-item>", 1), Pt = /* @__PURE__ */ R("<ui-property name=textSize><ui-slider>", 1), Ft = /* @__PURE__ */ R("<ui-property><ui-menu appearance=\"segmented link\"align=fluid size=small>", 1), It = /* @__PURE__ */ R("<ui-button slot=actions size=mini appearance=\"circular basic\">", 1), Lt = /* @__PURE__ */ R("<div class=find-row><ui-input class=find size=small icon=search fluid></ui-input><ui-button class=chip size=mini appearance=basic> <!>", 1), Rt = /* @__PURE__ */ R("<div class=info-pane><p class=marks-legend> <b></b> · <span class=\"mark set\"></span> <!> <span class=\"mark from\"></span> <!> <span class=source-mark></span> <!> <span class=source-mark></span> <!>"), zt = /* @__PURE__ */ R("<section class=tokens><div class=\"side-head tokens-head\"><header class=tokens-bar><h2 class=tokens-title></h2><!><!><!></header><!><!>"), Bt = /* @__PURE__ */ R("<span slot=actions class=group-count>"), Vt = /* @__PURE__ */ R("<ui-section collapsible sticky><!><!>", 1), Ht = /* @__PURE__ */ R("<ui-theme-token>", 1), Ut = /* @__PURE__ */ R("<ui-button class=head-tool size=mini>", 1), Wt = /* @__PURE__ */ R("<button type=button class=toggle-all><svg class=chevrons viewBox=\"0 0 16 16\"aria-hidden=true><path>"), Gt = /* @__PURE__ */ R("<div class=legend aria-hidden=true><span class=legend-label></span><span class=\"legend-item overrides\"><span class=half-dot>"), Kt = /* @__PURE__ */ R("<span class=legend-item><ui-icon>", 1), qt = /* @__PURE__ */ R("<ui-code language=javascript wrap>", 1), Jt = /* @__PURE__ */ R("<ui-section class=\"group changes\"collapsible level=2 sticky><span slot=actions class=file></span><ui-button slot=actions class=copy size=mini>", 1), Yt, Xt, Zt, Qt, G, $t, en, tn, nn, rn, an, on, sn, cn, ln, un, dn, fn, pn, mn, hn, gn, _n, vn, yn, bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn, An, jn, Mn, Nn, Pn, Fn, In, Ln, Rn, zn, Bn, Vn, Hn, Un, Wn, Gn, Kn, qn, Jn, Yn, Xn, Zn, Qn, $n, er, tr, nr, rr, ir, ar, or, K, sr, cr, lr, ur, dr, fr, pr, mr, hr, gr, _r, vr, yr, br, xr, Sr, Cr, wr, Tr, Er, Dr, Or, kr, q = class _DOMThemeEditorElement extends (Qt = i, Zt = [x], Xt = [x], Yt = [x], Qt) {
1286
+ }, ke = "@layer ui.components.theme-editor.types{:host{--_ui-theme-editor-side-width:var(--ui-theme-editor-side-width,440px);--_ui-theme-editor-gap:var(--ui-theme-editor-gap,12px);display:block;container-type:inline-size}.theme-editor{gap:var(--_ui-theme-editor-gap);box-sizing:border-box;height:100%;color:var(--ui-text-color);font-family:var(--ui-font-family);grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);display:grid}.theme-editor.paged{min-height:640px}.body{grid-template-columns:minmax(0, 1fr) var(--_ui-theme-editor-side-width);gap:var(--_ui-theme-editor-gap);min-height:0;display:grid}@container (width<960px){.body{grid-template-columns:minmax(0,1fr)}}}@layer ui.components.theme-editor.content{.bar{border-radius:var(--ui-radius-l,12px);background:var(--ui-bar-background,var(--ui-surface));min-width:0;backdrop-filter:var(--ui-bar-filter,none);box-shadow:var(--ui-shadow-subtle,none);align-items:center;gap:14px;padding:8px 12px;display:flex}.title{flex:none;align-items:center;gap:10px;display:flex}.title ui-icon{color:var(--ui-primary);font-size:1.4em}.title h1{font-family:var(--ui-font-family-heading,inherit);white-space:nowrap;margin:0;font-size:1.1em;line-height:1.2}.tools-wrap{flex:auto;min-width:0;display:flex;position:relative}.tools{--_fade-start:0px;--_fade-end:0px;mask-image:linear-gradient(to right, transparent, #000 var(--_fade-start), #000 calc(100% - var(--_fade-end)), transparent);scrollbar-width:none;--ui-menu-margin:0;flex:auto;align-items:center;gap:10px;min-width:0;display:flex;overflow-x:auto}.page-toggles{margin-inline-start:auto}.bar{--_pressed-background:var(--ui-menu-segmented-active-background,var(--ui-surface-strong));--_pressed-shadow:inset 0 1px 3px #00000047, inset 0 0 0 1px color-mix(in oklab, var(--ui-text-color) 12%, transparent)}.toggle::part(item){color:var(--ui-text-muted)}.toggle.on::part(item){color:var(--ui-menu-segmented-active-color,var(--ui-text-color));background:var(--_pressed-background);box-shadow:var(--_pressed-shadow)}.more-start .tools{--_fade-start:40px}.more-end .tools{--_fade-end:40px}.edge{z-index:1;width:26px;color:var(--ui-text-muted);cursor:var(--ui-control-cursor);background:0 0;border:0;place-items:center;padding:0;display:inline-grid;position:absolute;inset-block:0}.edge.start{inset-inline-start:0}.edge.end{inset-inline-end:0}.edge[hidden]{display:none}.edge:hover{color:var(--ui-link,var(--ui-primary))}.edge ui-icon{--ui-icon-width:auto;margin:0}.bar-toggle{--ui-button-radius:9999px;--ui-button-background:transparent}.bar-toggle[aria-pressed=true]{--ui-button-background:var(--_pressed-background)}.bar-toggle[aria-pressed=true]::part(button){box-shadow:var(--_pressed-shadow)}.pages{gap:var(--_ui-theme-editor-gap);grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr);min-height:0;display:grid}.pages.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pages.grid>.page.wide{grid-column:1/-1}.page{border-radius:var(--ui-radius-l,12px);background:var(--ui-surface);border:1px solid var(--ui-border-color);min-height:0;box-shadow:var(--ui-shadow-raised,none);grid-template-rows:auto minmax(0,1fr);gap:6px;margin:0;padding:6px;display:grid}.page[hidden]{display:none}@container (width<960px){.pages,.pages.grid{grid-template-columns:minmax(0,1fr);grid-auto-rows:70vh}.page-path{display:none}}.page-head{border-radius:calc(var(--ui-radius-l,12px) - 6px);cursor:grab;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;min-width:0;padding:2px 6px;display:flex}.page-head:focus-visible{outline:2px solid var(--ui-focus-color,var(--ui-primary));outline-offset:1px}.pages.dragging iframe{pointer-events:none}.page{position:relative}.page.drop-before:after,.page.drop-after:after{content:\"\";background:var(--ui-primary);pointer-events:none;border-radius:2px;width:4px;position:absolute;inset-block:0}.page.drop-before:after{inset-inline-start:calc(-1 * var(--_ui-theme-editor-gap) / 2 - 2px)}.page.drop-after:after{inset-inline-end:calc(-1 * var(--_ui-theme-editor-gap) / 2 - 2px)}.page-icon{--ui-icon-width:auto;color:var(--ui-primary-text,var(--ui-primary));margin:0}.page-title{white-space:nowrap;font-weight:600}.page-path{text-overflow:ellipsis;white-space:nowrap;color:var(--ui-text-muted);margin-inline-end:auto;font-size:.8em;overflow:hidden}.page-tool{color:var(--ui-text-muted);display:inline-flex}.frames{grid-template-columns:minmax(0,1fr);gap:6px;min-height:0;display:grid}.frames.both{grid-template-columns:repeat(2,minmax(0,1fr))}.frames.dark-first .frame.dark{order:-1}.frame{grid-template-rows:minmax(0,1fr);min-height:0;display:grid}.viewport{border-radius:calc(var(--ui-radius-l,12px) - 6px);background:var(--ui-background);min-height:0;position:relative;overflow:hidden}.viewport.phone{background:var(--ui-surface-muted,var(--ui-background))}.viewport iframe{transform-origin:0 0;background:var(--ui-background);border:0;position:absolute;inset:0 auto auto 0}.viewport:not(.loaded) iframe{visibility:hidden}.viewport .note{margin:1.5em}.previews{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));align-content:start;gap:1em;display:grid}.sample{border-radius:var(--ui-radius-l,14px);color:var(--ui-text-color);font-family:var(--ui-font-family);background-color:var(--ui-background);background-image:var(--ui-bar-wallpaper,none);box-shadow:0 0 0 1px var(--ui-border-color);--ui-card-margin-block:0;--ui-progress-margin:0;--ui-message-margin:0;--ui-message-icon-size:1.25em;flex-direction:column;gap:.9em;padding:1.1em;display:flex}.sample[hidden]{display:none}.sample-head{justify-content:space-between;align-items:center;gap:.75em;display:flex}.sample-scheme{font:600 .7em/1 var(--ui-font-family-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--ui-text-muted)}.sample-title{font:700 1.45em/1.15 var(--ui-font-family-heading);color:var(--ui-text-dark);margin-block-start:.2em}.sample-badge{border-radius:var(--ui-radius-m,10px);background:var(--ui-primary-background);block-size:2.4em;inline-size:2.4em;color:var(--ui-primary-text);place-items:center;display:grid}.habits{flex-direction:column;gap:.6em;margin-block:.6em .9em;display:flex}.add{gap:.5em;display:flex}.add>ui-input{flex:1;min-inline-size:0}.sample-row{--ui-button-margin-inline:0;flex-wrap:wrap;align-items:center;gap:.5em;display:flex}.side{overscroll-behavior:contain;border-radius:var(--ui-radius-l,12px);background:var(--ui-surface);border:1px solid var(--ui-border-color);min-height:0;box-shadow:var(--ui-shadow-raised,none);flex-direction:column;gap:10px;padding:12px;display:flex;overflow-y:auto}.actions{--ui-button-margin-inline:0;flex-wrap:wrap;gap:.5em;display:flex}.note{color:var(--ui-text-muted);margin:.5em 0}.properties{padding:4px 8px 8px;display:block}.file{min-width:0;font-family:var(--ui-font-family-mono);color:var(--ui-text-muted);white-space:nowrap;text-overflow:ellipsis;flex:auto;font-size:.8em;overflow:hidden}.group::part(heading){white-space:nowrap}.changes ui-code{--ui-code-font-size:.8em;--ui-code-line-height:1.55}.changes .note{padding-inline:8px}.properties ui-item{white-space:nowrap}.basics,.tokens{flex-direction:column;gap:10px;display:flex}.group{--ui-section-margin:0;--ui-section-content-padding:0;border-radius:calc(var(--ui-radius-l,12px) - 4px);border:1px solid var(--ui-border-color-internal,var(--ui-border-color));background:color-mix(in oklab, var(--ui-surface) 55%, transparent);display:block;overflow:clip}.group::part(title){background:linear-gradient(var(--ui-section-title-background,var(--ui-surface-strong)), var(--ui-section-title-background,var(--ui-surface-strong))), linear-gradient(var(--ui-surface), var(--ui-surface)), var(--ui-background);border-block-end:1px solid var(--ui-border-color-internal,var(--ui-border-color));padding:6px 8px}.group::part(heading){font-size:1em}.branch{--ui-section-margin:0;--ui-section-content-padding:0;border-inline-start:1px solid var(--ui-border-color-internal,var(--ui-border-color));margin-inline-start:12px;display:block}.branch::part(title){background:linear-gradient(var(--ui-surface), var(--ui-surface)), var(--ui-background);padding:4px 8px}.branch::part(heading){font-size:.85em;font-weight:600;font-family:var(--ui-font-family-mono,monospace)}.mark{text-align:center;flex:none;width:1em;font-size:.8em;line-height:1}.mark.set{color:var(--ui-primary-text,var(--ui-primary))}.mark.from{color:var(--ui-text-muted)}.group-count{color:var(--ui-text-muted);white-space:nowrap;font-size:.75em}.chip{--ui-button-radius:9999px;flex:none}.chip[aria-pressed=true]{--ui-button-background:var(--ui-primary-background,var(--ui-surface-strong))}.marks-legend{color:var(--ui-text-muted);margin:0;padding-inline:8px;font-size:.75em}.marks-legend .mark{display:inline-block}.side-head{z-index:calc(var(--ui-z-sticky,10) + 10);background:linear-gradient(var(--ui-surface), var(--ui-surface)), var(--ui-background);border-block-end:1px solid var(--ui-border-color-internal,var(--ui-border-color));gap:8px;margin:0 -12px;padding:12px 12px 6px;display:grid;position:sticky;top:-12px;container-type:scroll-state}@container scroll-state(stuck:top){.side-head:after{content:\"\";pointer-events:none;background:linear-gradient(#0000001f,#0000);height:10px;position:absolute;inset:100% 0 auto}}.tokens-bar{align-items:center;gap:2px;display:flex}.tokens-bar .tokens-title{margin-inline-end:auto}.head-tool{--ui-button-background:transparent;--ui-button-radius:.45em}.head-tool[aria-pressed=true]{--ui-button-background:var(--ui-menu-segmented-active-background,var(--ui-surface-strong))}.info-pane{gap:4px;display:grid}.half-dot{box-sizing:border-box;border:1.5px solid var(--ui-warning-text,#b45309);background:linear-gradient(90deg, var(--ui-warning-text,#b45309) 50%, var(--ui-surface) 50%);border-radius:50%;width:9px;height:9px;display:inline-block}.tokens-title{font-family:var(--ui-font-family-heading,inherit);margin:0;font-size:1em}.find-row{align-items:center;gap:6px;display:flex}.find-row .find{flex:auto;min-width:0}.toggle-all{width:1.9em;height:1.9em;color:var(--ui-text-muted);cursor:var(--ui-control-cursor);background:0 0;border:none;border-radius:.45em;flex:none;place-items:center;padding:0;display:inline-grid}.toggle-all:hover{color:var(--ui-link,var(--ui-primary));background:color-mix(in oklab, currentColor 10%, transparent)}.toggle-all:focus-visible{outline:2px solid var(--ui-focus-color,var(--ui-link));outline-offset:1px}.chevrons{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:1em;height:1em;display:block}.legend{color:var(--ui-text-muted);flex-wrap:wrap;align-items:center;gap:4px 10px;padding-inline:8px;font-size:.75em;display:flex}.legend-label{font-weight:600}.legend-item{white-space:nowrap;align-items:center;gap:4px;display:inline-flex}.legend-item.overrides{flex-basis:100%}.legend-item ui-icon{--ui-icon-width:auto;color:var(--ui-primary-text,var(--ui-primary));margin:0}.probe{width:0;height:0;position:absolute;overflow:hidden}.probe.ui-light{color-scheme:light}.probe.ui-dark{color-scheme:dark}}", Ae = /* @__PURE__ */ B("<div class=pages>"), je = /* @__PURE__ */ B("<div class=\"ui theme-editor\"><div class=body><!><!></div><div class=\"probe ui-light\"aria-hidden=true></div><div class=\"probe ui-dark\"aria-hidden=true>"), Me = /* @__PURE__ */ B("<ui-button class=\"bar-toggle phone\"size=small icon=\"mobile alternate\">", 1), Ne = /* @__PURE__ */ B("<header class=bar><div class=title><ui-icon name=swatchbook aria-hidden=true></ui-icon><h1></h1></div><div class=tools-wrap><div class=tools><!><!><!></div><!>", 1), Pe = /* @__PURE__ */ B("<ui-item class=toggle icon=\"exchange alternate\">", 1), Fe = /* @__PURE__ */ B("<ui-menu class=schemes-group appearance=\"segmented link header\"size=small><!><!>", 1), H = /* @__PURE__ */ B("<ui-item>", 1), Ie = /* @__PURE__ */ B("<ui-menu class=page-toggles appearance=\"segmented link header\"choose=many size=small>", 1), Le = /* @__PURE__ */ B("<button type=button><ui-icon aria-hidden=true>", 1), Re = /* @__PURE__ */ B("<ui-menu appearance=\"segmented link\"size=small>", 1), ze = /* @__PURE__ */ B("<a class=page-tool target=_blank><ui-icon name=\"external alternate\"appearance=link aria-hidden=true>", 1), Be = /* @__PURE__ */ B("<figure class=page><figcaption class=page-head draggable=true tabindex=0><ui-icon class=page-icon aria-hidden=true></ui-icon><span class=page-title></span><code class=page-path></code><ui-icon class=page-tool name=redo link appearance=link></ui-icon></figcaption><div>", 1), Ve = /* @__PURE__ */ B("<iframe>"), He = /* @__PURE__ */ B("<p class=\"note loading\">"), Ue = /* @__PURE__ */ B("<div><div class=viewport>"), U = /* @__PURE__ */ B("<p class=note>"), We = /* @__PURE__ */ B("<div class=previews><!><!>"), Ge = /* @__PURE__ */ B("<div><div class=sample-head><div><div class=sample-scheme></div><div class=sample-title></div></div><span class=sample-badge><ui-icon name=seedling aria-hidden=true></ui-icon></span></div><ui-card fluid><ui-content><ui-header></ui-header><div class=habits><ui-checkbox selected></ui-checkbox><ui-checkbox></ui-checkbox><ui-checkbox></ui-checkbox></div><div class=add><ui-input></ui-input><ui-button icon=plus color=primary></ui-button></div></ui-content></ui-card><div class=sample-row><ui-button size=small color=secondary></ui-button><ui-button size=small appearance=basic></ui-button><ui-label size=small color=primary></ui-label><ui-checkbox appearance=toggle selected></ui-checkbox></div><ui-message color=primary><ui-icon slot=icon name=bolt></ui-icon><b></b> </ui-message><ui-progress value=66>", 1), Ke = /* @__PURE__ */ B("<aside class=side><!><!><!><!>"), qe = /* @__PURE__ */ B("<ui-button size=small icon=\"trash alternate outline\"appearance=basic>", 1), Je = /* @__PURE__ */ B("<ui-select size=small>", 1), Ye = /* @__PURE__ */ B("<ui-button size=small icon=upload appearance=basic>", 1), Xe = /* @__PURE__ */ B("<div class=actions><ui-button size=small appearance=basic></ui-button><ui-button size=small icon=save color=primary></ui-button><ui-button size=small icon=\"copy outline\"appearance=basic></ui-button><ui-button size=small icon=download appearance=basic></ui-button><ui-button size=small icon=upload appearance=basic></ui-button><input type=file class=import-file accept=.json5,.json hidden><!><!><!><!><!>", 1), Ze = /* @__PURE__ */ B("<p class=\"note error\">"), Qe = /* @__PURE__ */ B("<section class=basics><div class=side-head><header class=tokens-bar><h2 class=tokens-title></h2></header></div><!><!><!><!>"), $e = /* @__PURE__ */ B("<ui-property name=name width=1/2><ui-input size=small fluid>", 1), et = /* @__PURE__ */ B("<ui-item kind=header>", 1), tt = /* @__PURE__ */ B("<ui-property name=base width=1/2><ui-select size=small fluid><!><!>", 1), nt = /* @__PURE__ */ B("<ui-section class=group collapsible level=3 sticky><ui-property-editor class=properties compact show-defaults>", 1), rt = /* @__PURE__ */ B("<ui-property>", 1), it = /* @__PURE__ */ B("<ui-property width=1/2><ui-select size=small fluid><ui-item>", 1), at = /* @__PURE__ */ B("<ui-property name=textSize><ui-slider>", 1), ot = /* @__PURE__ */ B("<ui-property><ui-menu appearance=\"segmented link\"align=fluid size=small>", 1), st = /* @__PURE__ */ B("<ui-button slot=actions size=mini appearance=\"circular basic\">", 1), ct = /* @__PURE__ */ B("<div class=find-row><ui-input class=find size=small icon=search fluid></ui-input><ui-button class=chip size=mini appearance=basic> <!>", 1), lt = /* @__PURE__ */ B("<div class=info-pane><p class=marks-legend> <b></b> · <span class=\"mark set\"></span> <!> <span class=\"mark from\"></span> <!> <span class=source-mark></span> <!> <span class=source-mark></span> <!>"), ut = /* @__PURE__ */ B("<section class=tokens><div class=\"side-head tokens-head\"><header class=tokens-bar><h2 class=tokens-title></h2><!><!><!></header><!><!>"), dt = /* @__PURE__ */ B("<span slot=actions class=group-count>"), ft = /* @__PURE__ */ B("<ui-section collapsible sticky><!><!>", 1), pt = /* @__PURE__ */ B("<ui-theme-token>", 1), mt = /* @__PURE__ */ B("<ui-button class=head-tool size=mini>", 1), ht = /* @__PURE__ */ B("<button type=button class=toggle-all><svg class=chevrons viewBox=\"0 0 16 16\"aria-hidden=true><path>"), gt = /* @__PURE__ */ B("<div class=legend aria-hidden=true><span class=legend-label></span><span class=\"legend-item overrides\"><span class=half-dot>"), _t = /* @__PURE__ */ B("<span class=legend-item><ui-icon>", 1), vt = /* @__PURE__ */ B("<ui-code language=javascript wrap>", 1), yt = /* @__PURE__ */ B("<ui-section class=\"group changes\"collapsible level=2 sticky><span slot=actions class=file></span><ui-button slot=actions class=copy size=mini>", 1), bt, xt, St, Ct, W, wt, Tt, Et, Dt, Ot, kt, At, jt, Mt, Nt, Pt, Ft, It, Lt, Rt, zt, Bt, Vt, Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt, $t, en, tn, nn, rn, an, on, sn, cn, ln, un, dn, fn, pn, mn, hn, gn, _n, vn, yn, bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn, An, jn, Mn, Nn, Pn, Fn, In, Ln, Rn, zn, Bn, Vn, Hn, G, Un, Wn, Gn, Kn, qn, Jn, Yn, Xn, Zn, Qn, $n, er, tr, nr, rr, ir, ar, or, sr, cr, lr, ur, dr, fr, pr, mr, hr, K = class _DOMThemeEditorElement extends (Ct = r, St = [C], xt = [C], bt = [C], Ct) {
2002
1287
  constructor() {
2003
- super(...arguments), h(G, 5, this);
1288
+ super(...arguments), p(W, 5, this);
2004
1289
  }
2005
1290
  get theme() {
2006
1291
  return this.component?.theme;
@@ -2012,30 +1297,30 @@ var W = class TokenColor {
2012
1297
  return this.component?.draft.changes;
2013
1298
  }
2014
1299
  };
2015
- G = l(Qt), s(G, 2, "theme", Zt, q), s(G, 2, "css", Xt, q), s(G, 2, "changes", Yt, q), c(G, q), u(q, "DOMThemeEditorElement");
2016
- var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr = [b], nr = [b], tr = [b], er = [re], $n = [y], Qn = [v("changed")], Zn = [x], Xn = [x], Yn = [x], Jn = [x], qn = [x], Kn = [ne("isConnected", "isReady", "hasPages")], Gn = [ne("draft", "isConnected", "isReady", "hasPages")], Wn = [ne("baseTheme", "scheme", { defer: !0 })], Un = [b], Hn = [x], Vn = [x], Bn = [se], zn = [b], Rn = [b], Ln = [b], In = [x], Fn = [x], Pn = [x], Nn = [b], Mn = [x], jn = [b], An = [b], kn = [x], On = [ne("hasPages", "isConnected", "baseTheme", "schemes", "isSwapped", "shownPageIds", "device")], Dn = [b], En = [b], Tn = [b], wn = [y], Cn = [x], Sn = [x], xn = [x], bn = [b], yn = [te], vn = [b], _n = [y], gn = [b], hn = [b], mn = [x], pn = [b], fn = [y], dn = [y], un = [x], ln = [x], cn = [b], sn = [b], on = [b], an = [b], rn = [x], nn = [x], tn = [b], en = [x], $t = [x], or) {
1300
+ W = se(Ct), s(W, 2, "theme", St, K), s(W, 2, "css", xt, K), s(W, 2, "changes", bt, K), l(W, K), t(K, "DOMThemeEditorElement");
1301
+ var gr = K, q = class _UIThemeEditor extends (Hn = f, Vn = [ne], Bn = [re], zn = [S], Rn = [S], Ln = [S], In = [x], Fn = [v], Pn = [_("changed")], Nn = [C], Mn = [C], jn = [C], An = [C], kn = [C], On = [b("isConnected", "isReady", "hasPages")], Dn = [b("draft", "isConnected", "isReady", "hasPages")], En = [b("baseTheme", "scheme", { defer: !0 })], Tn = [S], wn = [S], Cn = [C], Sn = [C], xn = [C], bn = [C], yn = [C], vn = [v], _n = [S], gn = [C], hn = [S], mn = [S], pn = [ae], fn = [C], dn = [C], un = [ae], ln = [S], cn = [S], sn = [S], on = [C], an = [C], rn = [S], nn = [C], tn = [S], en = [S], $t = [C], Qt = [b("hasPages", "isConnected", "baseTheme", "schemes", "isSwapped", "shownPageIds", "device")], Zt = [S], Xt = [S], Yt = [S], Jt = [v], qt = [C], Kt = [C], Gt = [C], Wt = [S], Ut = [te], Ht = [S], Vt = [v], Bt = [S], zt = [S], Rt = [C], Lt = [S], It = [v], Ft = [v], Pt = [C], Nt = [C], Mt = [S], jt = [S], At = [S], kt = [S], Ot = [C], Dt = [C], Et = [S], Tt = [C], wt = [C], Hn) {
2017
1302
  constructor() {
2018
- super(...arguments), h(K, 5, this), t(this, "addressed", M ? {} : ue.read()), S(this, sr, h(K, 8, this)), h(K, 11, this), t(this, "keptAtStart", M ? void 0 : C.getAt(Fr) ?? z.choices), S(this, cr, h(K, 12, this)), h(K, 15, this), S(this, lr, h(K, 16, this)), h(K, 19, this), S(this, ur, h(K, 20, this, M ? void 0 : z.css)), h(K, 23, this), t(this, "clipboard", new n({ seconds: xi })), S(this, dr, h(K, 24, this, M ? [] : C.getAt(Lr) ?? [])), h(K, 27, this), S(this, fr, h(K, 28, this, M ? [] : C.getAt(Rr) ?? [])), h(K, 31, this), S(this, pr, h(K, 32, this, this.addressed.pages)), h(K, 35, this), S(this, mr, h(K, 36, this, M ? "both" : this.addressed.schemes ?? C.getAt(Ur) ?? "both")), h(K, 39, this), S(this, hr, h(K, 40, this, this.addressed.device ?? "desk")), h(K, 43, this), S(this, gr, h(K, 44, this, M ? !1 : this.addressed.isSwapped ?? C.getAt(Br) === !0)), h(K, 47, this), S(this, _r, h(K, 48, this, {})), h(K, 51, this), S(this, vr, h(K, 52, this, {})), h(K, 55, this), S(this, yr, h(K, 56, this, {})), h(K, 59, this), t(this, "frames", /* @__PURE__ */ new Map()), t(this, "begun", /* @__PURE__ */ new Set()), t(this, "asked", 0), S(this, br, h(K, 60, this, {
1303
+ super(...arguments), p(G, 5, this), o(this, "addressed", F ? {} : pe.read()), m(this, Un, p(G, 8, this)), p(G, 11, this), o(this, "keptAtStart", F ? void 0 : w.getAt(xr)), m(this, Wn, p(G, 12, this)), p(G, 15, this), m(this, Gn, p(G, 16, this)), p(G, 19, this), m(this, Kn, p(G, 20, this, F ? [] : D.list)), p(G, 23, this), m(this, qn, p(G, 24, this, F ? void 0 : w.getAt(Sr))), p(G, 27, this), o(this, "exportUrl"), m(this, Jn, p(G, 28, this)), p(G, 31, this), m(this, Yn, p(G, 32, this, !1)), p(G, 35, this), m(this, Xn, p(G, 36, this)), p(G, 39, this), o(this, "clipboard", new n({ seconds: ui })), m(this, Zn, p(G, 40, this, F ? [] : w.getAt(Tr) ?? [])), p(G, 43, this), m(this, Qn, p(G, 44, this, F ? [] : w.getAt(Er) ?? [])), p(G, 47, this), m(this, $n, p(G, 48, this, this.addressed.pages)), p(G, 51, this), m(this, er, p(G, 52, this, F ? "both" : this.addressed.schemes ?? w.getAt(jr) ?? "both")), p(G, 55, this), m(this, tr, p(G, 56, this, this.addressed.device ?? "desk")), p(G, 59, this), m(this, nr, p(G, 60, this, F ? !1 : this.addressed.isSwapped ?? w.getAt(Or) === !0)), p(G, 63, this), m(this, rr, p(G, 64, this, {})), p(G, 67, this), m(this, ir, p(G, 68, this, {})), p(G, 71, this), m(this, ar, p(G, 72, this, {})), p(G, 75, this), o(this, "frames", /* @__PURE__ */ new Map()), o(this, "begun", /* @__PURE__ */ new Set()), o(this, "asked", 0), m(this, or, p(G, 76, this, {
2019
1304
  basics: 0,
2020
1305
  tokens: 0,
2021
1306
  top: 0
2022
- })), h(K, 63, this), t(this, "heads", /* @__PURE__ */ new Map()), S(this, xr, h(K, 64, this, "")), h(K, 67, this), S(this, Sr, h(K, 68, this, M ? {} : C.getAt(Ir) ?? {})), h(K, 71, this), t(this, "branchSections", /* @__PURE__ */ new Map()), S(this, Cr, h(K, 72, this, !1)), h(K, 75, this), S(this, wr, h(K, 76, this, !1)), h(K, 79, this), t(this, "probes", {}), t(this, "text", /* @__PURE__ */ u((e, t) => this.isReady ? this.translationForKey(e, t) : "", "text")), S(this, Tr, h(K, 80, this, {
1307
+ })), p(G, 79, this), o(this, "heads", /* @__PURE__ */ new Map()), m(this, sr, p(G, 80, this, "")), p(G, 83, this), m(this, cr, p(G, 84, this, F ? {} : w.getAt(wr) ?? {})), p(G, 87, this), o(this, "branchSections", /* @__PURE__ */ new Map()), m(this, lr, p(G, 88, this, !1)), p(G, 91, this), m(this, ur, p(G, 92, this, !1)), p(G, 95, this), o(this, "probes", {}), o(this, "text", /* @__PURE__ */ t((e, t) => this.isReady ? this.translationForKey(e, t) : "", "text")), m(this, dr, p(G, 96, this, {
2023
1308
  start: !1,
2024
1309
  end: !1
2025
- })), h(K, 83, this), t(this, "toolsBox"), S(this, Er, h(K, 84, this)), h(K, 87, this), S(this, Dr, h(K, 88, this)), h(K, 91, this), S(this, Or, h(K, 92, this, M ? {
1310
+ })), p(G, 99, this), o(this, "toolsBox"), m(this, fr, p(G, 100, this)), p(G, 103, this), m(this, pr, p(G, 104, this)), p(G, 107, this), m(this, mr, p(G, 108, this, F ? {
2026
1311
  search: !1,
2027
1312
  info: !1
2028
1313
  } : {
2029
1314
  search: !1,
2030
1315
  info: !1,
2031
- ...C.getAt(pi)
2032
- })), h(K, 95, this), t(this, "findInput"), S(this, kr, h(K, 96, this)), h(K, 99, this);
1316
+ ...w.getAt(ti)
1317
+ })), p(G, 111, this), o(this, "findInput"), m(this, hr, p(G, 112, this)), p(G, 115, this);
2033
1318
  }
2034
1319
  get theme() {
2035
1320
  return this.edited ?? this.startingTheme;
2036
1321
  }
2037
1322
  get startingTheme() {
2038
- let e = this.value, t = this.addressed.theme, n = t ?? this.base ?? (this.isReady ? p.themes.current : void 0) ?? "fruity";
1323
+ let e = this.value, t = this.addressed.theme, n = t ?? this.base ?? (this.isReady ? d.themes.current : void 0) ?? "fruity";
2039
1324
  if (e && typeof e == "object") return {
2040
1325
  ...e,
2041
1326
  name: e.name ?? this.text("defaultName"),
@@ -2052,13 +1337,13 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2052
1337
  }
2053
1338
  async loadFiles() {
2054
1339
  try {
2055
- this.files = await H.load();
1340
+ this.files = await T.load();
2056
1341
  } catch (e) {
2057
1342
  this.filesError = String(e);
2058
1343
  }
2059
1344
  }
2060
1345
  get draft() {
2061
- return new U({
1346
+ return new E({
2062
1347
  choices: this.theme,
2063
1348
  files: this.files,
2064
1349
  text: this.text,
@@ -2084,7 +1369,7 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2084
1369
  });
2085
1370
  }
2086
1371
  keepDraft(e) {
2087
- this.edited = e, C.setAt(Fr, e), this.send("ui-changed", {
1372
+ this.edited = e, w.setAt(xr, e), this.send("ui-changed", {
2088
1373
  value: e,
2089
1374
  css: this.draft.css
2090
1375
  });
@@ -2121,23 +1406,23 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2121
1406
  let t = this.tokenEdits[e];
2122
1407
  if (t) return !("both" in t);
2123
1408
  let n = this.nowOf(e);
2124
- return H.forScheme(n, "light") !== H.forScheme(n, "dark");
1409
+ return T.forScheme(n, "light") !== T.forScheme(n, "dark");
2125
1410
  }
2126
1411
  onShown(e, t, n) {
2127
1412
  if (!e || !t) return;
2128
- if (this.loadFiles(), n) return le.wear(Pr), () => void le.wear(void 0);
2129
- let r = p.themes.current, i = p.styles.sheet(pe), a = i ? [...i.cssRules].map((e) => e.cssText).join("\n") : "";
1413
+ if (this.loadFiles(), n) return he.wear(br), () => void he.wear(void 0);
1414
+ let r = d.themes.current, i = d.styles.sheet(me), a = i ? [...i.cssRules].map((e) => e.cssText).join("\n") : "";
2130
1415
  return () => {
2131
- z.putOnPage(a), p.themes.current !== r && p.themes.apply(r).catch((e) => {
2132
- g.warn("<ui-theme-editor>", `can't put the page's theme \`${r}\` back`, e);
1416
+ D.putOnPage(a), d.themes.current !== r && d.themes.apply(r).catch((e) => {
1417
+ h.warn("<ui-theme-editor>", `can't put the page's theme \`${r}\` back`, e);
2133
1418
  });
2134
1419
  };
2135
1420
  }
2136
1421
  onDraftChanged(e, t, n, r) {
2137
1422
  if (t && n) {
2138
1423
  if (!r) {
2139
- z.wear(e.choices.base, e.css).catch((t) => {
2140
- g.warn("<ui-theme-editor>", `can't apply the theme on \`${e.choices.base}\``, t);
1424
+ D.wear(e.choices.base, e.css).catch((t) => {
1425
+ h.warn("<ui-theme-editor>", `can't apply the theme on \`${e.choices.base}\``, t);
2141
1426
  });
2142
1427
  return;
2143
1428
  }
@@ -2158,13 +1443,128 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2158
1443
  get baseTheme() {
2159
1444
  return this.theme.base;
2160
1445
  }
2161
- forget() {
2162
- z.forget(), this.savedCss = void 0, this.send("ui-saved", { css: "" });
1446
+ get editing() {
1447
+ return this.myThemes.find((e) => e.id === this.editingId);
1448
+ }
1449
+ save() {
1450
+ let e = this.editing?.id, t = this.theme.name.trim() || D.freeName(this.text("defaultName"));
1451
+ return this.keep(D.save({
1452
+ id: e,
1453
+ name: t,
1454
+ choices: {
1455
+ ...this.theme,
1456
+ name: t
1457
+ },
1458
+ css: this.draft.css
1459
+ }));
1460
+ }
1461
+ saveAsNew() {
1462
+ let e = D.freeName(this.theme.name.trim() || this.text("defaultName"));
1463
+ return this.keep(D.save({
1464
+ name: e,
1465
+ choices: {
1466
+ ...this.theme,
1467
+ name: e
1468
+ },
1469
+ css: this.draft.css
1470
+ }));
1471
+ }
1472
+ async remove() {
1473
+ let e = this.editing;
1474
+ e && await d.modals.confirm(this.text("removeAsk", { name: e.name })) && (D.remove(e.id), this.myThemes = D.list, this.setEditing(void 0), this.send("ui-saved", { css: "" }));
1475
+ }
1476
+ open(e) {
1477
+ let t = D.get(e);
1478
+ t && (this.setEditing(e), this.keepDraft({
1479
+ ...t.choices,
1480
+ name: t.name
1481
+ }));
1482
+ }
1483
+ startFrom(e) {
1484
+ let t = D.get(e);
1485
+ t && (this.setEditing(void 0), this.keepDraft({
1486
+ ...t.choices,
1487
+ name: D.freeName(t.name)
1488
+ }));
1489
+ }
1490
+ get exportText() {
1491
+ let e = this.draft.data;
1492
+ return e ? `// ${this.draft.fileName}: ${this.text("fileMade", { base: this.baseTheme })}
1493
+ ${JSON.stringify(e, void 0, 2)}
1494
+ ` : "";
1495
+ }
1496
+ get exportHref() {
1497
+ this.exportUrl && URL.revokeObjectURL(this.exportUrl);
1498
+ let e = this.exportText;
1499
+ return this.exportUrl = e && !F ? URL.createObjectURL(new Blob([e], { type: "text/plain" })) : void 0, this.exportUrl ?? "";
1500
+ }
1501
+ async importFile(t) {
1502
+ this.importError = void 0;
1503
+ try {
1504
+ let n = this.files ?? await T.load(), { default: r } = await import("./dist-BLYIGZVK.js").then((t) => /* @__PURE__ */ e(t.default, 1)), i = r.parse(await t.text()), a = t.name.replace(/\.theme\.json5$|\.json5?$/, ""), o = new ce({
1505
+ name: a,
1506
+ data: i,
1507
+ themes: n.themes,
1508
+ palettes: n.palettes
1509
+ }).declarations(), s = typeof i.extends == "string" && d.themes.own.includes(i.extends) ? i.extends : ue, c = D.freeName(typeof i.title == "string" && i.title ? i.title : a), l = {
1510
+ name: c,
1511
+ base: s,
1512
+ tokens: Object.fromEntries(o.map(([e, t]) => [e, { both: t }]))
1513
+ }, u = new E({
1514
+ choices: l,
1515
+ files: n,
1516
+ text: this.text
1517
+ }).css, f = this.keep(D.save({
1518
+ name: c,
1519
+ choices: l,
1520
+ css: u
1521
+ }));
1522
+ this.keepDraft(f.choices);
1523
+ } catch (e) {
1524
+ this.importError = this.text("importBad", {
1525
+ file: t.name,
1526
+ problem: String(e.message ?? e)
1527
+ });
1528
+ }
1529
+ }
1530
+ keep(e) {
1531
+ return this.myThemes = D.list, this.setEditing(e.id), this.edited = {
1532
+ ...this.theme,
1533
+ name: e.name
1534
+ }, w.setAt(xr, this.edited), this.send("ui-saved", {
1535
+ value: e.choices,
1536
+ css: e.css,
1537
+ id: e.id
1538
+ }), e;
1539
+ }
1540
+ setEditing(e) {
1541
+ this.editingId = e, w.setAt(Sr, e);
1542
+ }
1543
+ askSpellUi() {
1544
+ F || location.protocol === "file:" || fetch(Cr).then(async (e) => e.ok ? await e.json() : {}).then(({ allowed: e }) => this.canSaveIntoSpellUi = e === !0).catch(() => this.canSaveIntoSpellUi = !1);
1545
+ }
1546
+ async saveIntoSpellUi(e = !1) {
1547
+ let t = {
1548
+ name: this.draft.slug,
1549
+ text: this.exportText,
1550
+ overwrite: e
1551
+ };
1552
+ try {
1553
+ let n = await fetch(Cr, {
1554
+ method: "POST",
1555
+ headers: { "content-type": "application/json" },
1556
+ body: JSON.stringify(t)
1557
+ }), r = await n.json().catch(() => ({}));
1558
+ if (n.status === 409 && !e) return await d.modals.confirm(this.text("intoSpellUiAsk", { name: this.draft.slug })) ? this.saveIntoSpellUi(!0) : void 0;
1559
+ this.spellUiNote = n.ok ? this.text("intoSpellUiDone", { file: r.file ?? this.draft.fileName }) : r.error ?? `${n.status} ${n.statusText}`;
1560
+ } catch (e) {
1561
+ this.spellUiNote = String(e);
1562
+ }
2163
1563
  }
2164
1564
  async copy() {
2165
1565
  let e = this.draft.changes;
2166
1566
  if (!await this.clipboard.copy(e)) {
2167
- g.warn("<ui-theme-editor>", "the clipboard refused the theme file");
1567
+ h.warn("<ui-theme-editor>", "the clipboard refused the theme file");
2168
1568
  return;
2169
1569
  }
2170
1570
  this.send("ui-copied", { text: e });
@@ -2186,17 +1586,17 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2186
1586
  return [...new Set(this.pageList.flatMap((e) => e.ownPrefix ? [e.ownPrefix] : []))];
2187
1587
  }
2188
1588
  listenToPages() {
2189
- let e = /* @__PURE__ */ u((e) => this.onPageMessage(e), "onMessage");
1589
+ let e = /* @__PURE__ */ t((e) => this.onPageMessage(e), "onMessage");
2190
1590
  return window.addEventListener("message", e), () => window.removeEventListener("message", e);
2191
1591
  }
2192
1592
  get shownSchemes() {
2193
- return this.schemes === "both" ? Hr : [this.schemes];
1593
+ return this.schemes === "both" ? Ar : [this.schemes];
2194
1594
  }
2195
1595
  get scheme() {
2196
1596
  return this.schemes === "dark" ? "dark" : "light";
2197
1597
  }
2198
1598
  get orderedPageIds() {
2199
- let e = /* @__PURE__ */ u((e) => e.filter((e) => this.pageIds.includes(e)), "known");
1599
+ let e = /* @__PURE__ */ t((e) => e.filter((e) => this.pageIds.includes(e)), "known");
2200
1600
  return [.../* @__PURE__ */ new Set([
2201
1601
  ...e(this.addressedPages ?? []),
2202
1602
  ...e(this.pageOrder),
@@ -2204,12 +1604,12 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2204
1604
  ])];
2205
1605
  }
2206
1606
  get shownPageIds() {
2207
- let e = this.addressedPages, t = /* @__PURE__ */ u((t) => e ? e.includes(t) : !this.hiddenPages.includes(t), "isShown"), n = this.orderedPageIds.filter(t);
2208
- return n.length ? n : this.orderedPageIds;
1607
+ let e = this.addressedPages, n = /* @__PURE__ */ t((t) => e ? e.includes(t) : !this.hiddenPages.includes(t), "isShown"), r = this.orderedPageIds.filter(n);
1608
+ return r.length ? r : this.orderedPageIds;
2209
1609
  }
2210
1610
  showPages(e, t) {
2211
1611
  let n = e.filter((e) => !t.includes(e));
2212
- this.addressedPages = void 0, this.pageOrder = e, this.hiddenPages = n, C.setAt(Rr, [...e]), C.setAt(Lr, n.length ? n : void 0);
1612
+ this.addressedPages = void 0, this.pageOrder = e, this.hiddenPages = n, w.setAt(Er, [...e]), w.setAt(Tr, n.length ? n : void 0);
2213
1613
  }
2214
1614
  movePage(e, t, n) {
2215
1615
  if (e === t) return;
@@ -2223,25 +1623,21 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2223
1623
  isPageShown(e) {
2224
1624
  return this.shownPageIds.includes(e);
2225
1625
  }
2226
- togglePage(e) {
2227
- let t = this.shownPageIds, n = t.includes(e);
2228
- n && t.length === 1 || this.showPages(this.orderedPageIds, n ? t.filter((t) => t !== e) : [...t, e]);
2229
- }
2230
1626
  isPageWide(e) {
2231
1627
  let t = this.shownPageIds, n = t.indexOf(e);
2232
1628
  return t.length === 1 || t.length % 2 == 1 && n === t.length - 1;
2233
1629
  }
2234
1630
  showSchemes(e) {
2235
- this.schemes = e, C.setAt(Ur, e === "both" ? void 0 : e);
1631
+ this.schemes = e, w.setAt(jr, e === "both" ? void 0 : e);
2236
1632
  }
2237
1633
  swap() {
2238
- this.isSwapped = !this.isSwapped, C.setAt(Br, this.isSwapped || void 0);
1634
+ this.isSwapped = !this.isSwapped, w.setAt(Or, this.isSwapped || void 0);
2239
1635
  }
2240
1636
  isDarkFirst(e) {
2241
1637
  return (!this.isPageWide(e) && this.shownPageIds.indexOf(e) % 2 == 1) !== this.isSwapped;
2242
1638
  }
2243
1639
  onViewChanged(e, t, n, r, i, a, o) {
2244
- e && t && ue.write({
1640
+ e && t && pe.write({
2245
1641
  theme: n,
2246
1642
  schemes: r,
2247
1643
  isSwapped: i,
@@ -2284,13 +1680,13 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2284
1680
  return r?.url ? r.reach === "messages" && n === "dark" ? otherLoopback(r.url) : r.url : r?.url;
2285
1681
  }
2286
1682
  onPageLoaded(e) {
2287
- this.pageOf(splitKey(e)[0])?.reach === "same origin" && this.dress(e, Nr).then(() => this.markLoaded(e, !0)), ee(Si, () => this.markLoaded(e, !0));
1683
+ this.pageOf(splitKey(e)[0])?.reach === "same origin" && this.dress(e, yr).then(() => this.markLoaded(e, !0)), g(di, () => this.markLoaded(e, !0));
2288
1684
  }
2289
1685
  onPageMessage(e) {
2290
1686
  let t = e.data;
2291
1687
  if (t?.type !== "spell-theme-bench") return;
2292
1688
  let n = this.frameKeys.find((t) => this.frames.get(t)?.contentWindow === e.source);
2293
- n && (t.hello && this.dress(n, Nr), t.look && this.took(n, t.look));
1689
+ n && (t.hello && this.dress(n, yr), t.look && this.took(n, t.look));
2294
1690
  }
2295
1691
  took(e, t) {
2296
1692
  let [n, r] = splitKey(e), i = this.pageOf(n);
@@ -2309,15 +1705,15 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2309
1705
  if (i.reach === "messages") return this.post(e, i, a.contentWindow, t);
2310
1706
  let o = a.contentWindow, s = a.contentDocument;
2311
1707
  if (s?.documentElement) try {
2312
- t.theme && (o.localStorage.setItem(i.themeKey, this.baseTheme), await (await _UIThemeEditor.runtimeOf(o))?.themes.apply(this.baseTheme)), t.scheme && _e.pinScheme(s, this.schemeOf(r)), t.css && _e.applyCss(s, this.draft.frameCss), t.look && this.took(e, _e.look(s, this.tokenList));
1708
+ t.theme && await (await _UIThemeEditor.runtimeOf(o))?.themes.apply(this.baseTheme), t.scheme && be.pinScheme(s, this.schemeOf(r)), t.css && be.applyCss(s, this.draft.frameCss), t.look && this.took(e, be.look(s, this.tokenList));
2313
1709
  } catch (t) {
2314
- g.warn("<ui-theme-editor>", `can't dress the ${e} page`, t);
1710
+ h.warn("<ui-theme-editor>", `can't dress the ${e} page`, t);
2315
1711
  }
2316
1712
  }
2317
1713
  post(e, t, n, r) {
2318
1714
  let i = this.urlOf(e);
2319
1715
  if (!i || _UIThemeEditor.isBlank(n)) return;
2320
- let a = splitKey(e)[1], o = { type: ge };
1716
+ let a = splitKey(e)[1], o = { type: de };
2321
1717
  r.theme && (o.theme = this.baseTheme), r.scheme && (o.scheme = this.schemeOf(a)), r.css && (o.css = this.draft.frameCss), r.fullMonty && t.fullView && (o.fullMonty = !0), r.look && (o.ask = {
2322
1718
  id: ++this.asked,
2323
1719
  tokens: this.tokenList
@@ -2328,23 +1724,23 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2328
1724
  }
2329
1725
  static isBlank(e) {
2330
1726
  try {
2331
- return e.location.href === Wr;
1727
+ return e.location.href === Mr;
2332
1728
  } catch {
2333
1729
  return !1;
2334
1730
  }
2335
1731
  }
2336
1732
  static async runtimeOf(e) {
2337
- for (let t = 0; t < wi; t++) {
2338
- let t = e.UI ?? e.SpellUI?.packModules?.[Mr]?.UI;
1733
+ for (let t = 0; t < pi; t++) {
1734
+ let t = e.UI ?? e.SpellUI?.packModules?.[vr]?.UI;
2339
1735
  if (t?.load) return await t.load(), t;
2340
- await ee(Ci, () => void 0);
1736
+ await g(fi, () => void 0);
2341
1737
  }
2342
1738
  }
2343
1739
  watchCell(e, t) {
2344
- M || (t.dataset.frame = e, this.resizer.observe(t));
1740
+ F || (t.dataset.frame = e, this.resizer.observe(t));
2345
1741
  }
2346
1742
  watchHead(e, t) {
2347
- this.heads.set(e, t), !M && (t.dataset.head = e, this.resizer.observe(t));
1743
+ this.heads.set(e, t), !F && (t.dataset.head = e, this.resizer.observe(t));
2348
1744
  }
2349
1745
  measureHeads() {
2350
1746
  let e = { ...this.headBottom };
@@ -2390,39 +1786,39 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2390
1786
  return e;
2391
1787
  }
2392
1788
  get groups() {
2393
- let e = this.files, t = e?.groupsFor(this.baseTheme, this.pageTokens) ?? [], n = this.filter.trim().toLowerCase(), r = this.isSetHereOnly ? t.map((e) => ({
1789
+ let e = this.files, n = e?.groupsFor(this.baseTheme, this.pageTokens) ?? [], r = this.filter.trim().toLowerCase(), i = this.isSetHereOnly ? n.map((e) => ({
2394
1790
  ...e,
2395
1791
  tokens: e.tokens.filter((e) => this.isSetHere(e))
2396
- })).filter((e) => e.tokens.length) : t;
2397
- if (!n || !e) return r;
2398
- let i = /* @__PURE__ */ u((t, r) => t.includes(n) || [r, ...e.pathOf(t, r)].join(" ").includes(n), "matches");
2399
- return r.map((e) => ({
1792
+ })).filter((e) => e.tokens.length) : n;
1793
+ if (!r || !e) return i;
1794
+ let a = /* @__PURE__ */ t((t, n) => t.includes(r) || [n, ...e.pathOf(t, n)].join(" ").includes(r), "matches");
1795
+ return i.map((e) => ({
2400
1796
  ...e,
2401
- tokens: e.tokens.filter((t) => i(t, e.place))
1797
+ tokens: e.tokens.filter((t) => a(t, e.place))
2402
1798
  })).filter((e) => e.tokens.length);
2403
1799
  }
2404
1800
  get tree() {
2405
1801
  let e = this.files;
2406
- return new nt({
1802
+ return new De({
2407
1803
  groups: this.groups,
2408
- pathOf: /* @__PURE__ */ u((t, n) => e?.pathOf(t, n) ?? [t], "pathOf"),
2409
- labelOf: /* @__PURE__ */ u((e) => this.groupLabel(e), "labelOf")
1804
+ pathOf: /* @__PURE__ */ t((t, n) => e?.pathOf(t, n) ?? [t], "pathOf"),
1805
+ labelOf: /* @__PURE__ */ t((e) => this.groupLabel(e), "labelOf")
2410
1806
  });
2411
1807
  }
2412
1808
  groupLabel(e) {
2413
- return e.startsWith(Jr) ? this.text("pageOwn", { page: this.pageOf(e.slice(Jr.length))?.label ?? e }) : this.text(Yr[e] ?? "groupOwn");
1809
+ return e.startsWith(Ir) ? this.text("pageOwn", { page: this.pageOf(e.slice(Ir.length))?.label ?? e }) : this.text(Lr[e] ?? "groupOwn");
2414
1810
  }
2415
1811
  isBranchOpen(e) {
2416
- return this.filter.trim() ? !this.isFilterFolded : this.folds[e] ?? e === qr;
1812
+ return this.filter.trim() ? !this.isFilterFolded : this.folds[e] ?? e === Fr;
2417
1813
  }
2418
1814
  get branchIds() {
2419
- let e = [], t = /* @__PURE__ */ u((n, r) => {
2420
- if (r || n.children.length) {
2421
- e.push(n.id);
2422
- for (let e of n.children) t(e, !1);
1815
+ let e = [], n = /* @__PURE__ */ t((t, r) => {
1816
+ if (r || t.children.length) {
1817
+ e.push(t.id);
1818
+ for (let e of t.children) n(e, !1);
2423
1819
  }
2424
1820
  }, "walk");
2425
- for (let e of this.tree.roots) t(e, !0);
1821
+ for (let e of this.tree.roots) n(e, !0);
2426
1822
  return e;
2427
1823
  }
2428
1824
  get isAllOpen() {
@@ -2433,13 +1829,13 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2433
1829
  this.filter.trim() && (this.isFilterFolded = !e), this.folds = {
2434
1830
  ...this.folds,
2435
1831
  ...Object.fromEntries(this.branchIds.map((t) => [t, e]))
2436
- }, C.setAt(Ir, this.folds);
1832
+ }, w.setAt(wr, this.folds);
2437
1833
  }
2438
1834
  onBranchFolded(e, t) {
2439
1835
  e.detail.section !== this.branchSections.get(t) || this.filter.trim() || this.folds[t] !== e.detail.open && (this.folds = {
2440
1836
  ...this.folds,
2441
1837
  [t]: e.detail.open
2442
- }, C.setAt(Ir, this.folds));
1838
+ }, w.setAt(wr, this.folds));
2443
1839
  }
2444
1840
  get tokenList() {
2445
1841
  return (this.files?.groupsFor(this.baseTheme, this.pageTokens) ?? []).flatMap((e) => e.tokens);
@@ -2449,7 +1845,7 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2449
1845
  return e ? new Map(this.tokenList.map((t) => [t, e.sourceOf(this.baseTheme, t, this.scheme)])) : /* @__PURE__ */ new Map();
2450
1846
  }
2451
1847
  sourceOf(e) {
2452
- return this.sources.get(e) ?? ri;
1848
+ return this.sources.get(e) ?? Gr;
2453
1849
  }
2454
1850
  isSetHere(e) {
2455
1851
  return this.draft.sets(e) || this.sourceOf(e).setBy === this.baseTheme;
@@ -2458,7 +1854,7 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2458
1854
  return this.files?.themes[this.baseTheme]?.extends;
2459
1855
  }
2460
1856
  get parentTitle() {
2461
- return this.parentTheme ? a.titleOf(this.parentTheme) : this.text("foundation");
1857
+ return this.parentTheme ? y.titleOf(this.parentTheme) : this.text("foundation");
2462
1858
  }
2463
1859
  get pointedAt() {
2464
1860
  let e = /* @__PURE__ */ new Map();
@@ -2471,19 +1867,19 @@ var Ar = q, J = class _UIThemeEditor extends (or = m, ar = [ie], ir = [ae], rr =
2471
1867
  ${this.text("usedBy", { tokens: n.join(", ") })}` : ""}`;
2472
1868
  }
2473
1869
  setHere(e) {
2474
- let t = /* @__PURE__ */ u((t) => this.kindOf(e, t) === "color" || this.sourceOf(e).kind !== "plain" ? W.join(this.colorOf(e, t).hex, this.colorOf(e, t).opacity) : this.valueOf(e, t), "now"), [n, r] = [t("light"), t("dark")];
1870
+ let n = /* @__PURE__ */ t((t) => this.kindOf(e, t) === "color" || this.sourceOf(e).kind !== "plain" ? V.join(this.colorOf(e, t).hex, this.colorOf(e, t).opacity) : this.valueOf(e, t), "now"), [r, i] = [n("light"), n("dark")];
2475
1871
  this.choose({ tokens: {
2476
1872
  ...this.tokenEdits,
2477
- [e]: n === r ? { both: n } : {
2478
- light: n,
2479
- dark: r
1873
+ [e]: r === i ? { both: r } : {
1874
+ light: r,
1875
+ dark: i
2480
1876
  }
2481
1877
  } });
2482
1878
  }
2483
1879
  backToParent(e) {
2484
1880
  let t = this.files, n = this.parentTheme;
2485
1881
  if (!t || !n) return;
2486
- let [r, i] = ii.map((r) => t.sourceOf(n, e, r).written ?? "");
1882
+ let [r, i] = Kr.map((r) => t.sourceOf(n, e, r).written ?? "");
2487
1883
  (r || i) && this.choose({ tokens: {
2488
1884
  ...this.tokenEdits,
2489
1885
  [e]: r === i ? { both: r } : {
@@ -2493,11 +1889,11 @@ ${this.text("usedBy", { tokens: n.join(", ") })}` : ""}`;
2493
1889
  } });
2494
1890
  }
2495
1891
  nowOf(e) {
2496
- if (!this.hasPages) return M || !this.isReady ? "" : (this.draft, getComputedStyle(document.documentElement).getPropertyValue(e).trim());
1892
+ if (!this.hasPages) return F || !this.isReady ? "" : (this.draft, getComputedStyle(document.documentElement).getPropertyValue(e).trim());
2497
1893
  let t = this.pagesValueOf(e);
2498
1894
  if (t) return t;
2499
1895
  let n = this.files?.valueIn(this.baseTheme, e);
2500
- return n ? n.replace(Xr, (e, t) => this.pagesValueOf(t) || e) : "";
1896
+ return n ? n.replace(Rr, (e, t) => this.pagesValueOf(t) || e) : "";
2501
1897
  }
2502
1898
  pagesValueOf(e) {
2503
1899
  let t = this.pageList.find((t) => t.ownPrefix && e.startsWith(t.ownPrefix)), n = [
@@ -2513,22 +1909,22 @@ ${this.text("usedBy", { tokens: n.join(", ") })}` : ""}`;
2513
1909
  }
2514
1910
  valueOf(e, t = this.scheme) {
2515
1911
  let n = this.tokenEdits[e];
2516
- return (n && ("both" in n ? n.both : n[t])) ?? H.forScheme(this.nowOf(e), t);
1912
+ return (n && ("both" in n ? n.both : n[t])) ?? T.forScheme(this.nowOf(e), t);
2517
1913
  }
2518
1914
  kindOf(e, t = this.scheme) {
2519
1915
  let n = this.valueOf(e, t);
2520
- return W.isColor(n) ? "color" : gi.test(n) ? "length" : "text";
1916
+ return V.isColor(n) ? "color" : ii.test(n) ? "length" : "text";
2521
1917
  }
2522
1918
  colorOf(e, t = this.scheme) {
2523
- return this.probes[t] && W.split(this.valueOf(e, t), this.probes[t]) || {
2524
- hex: vi,
2525
- opacity: _i
1919
+ return this.probes[t] && V.split(this.valueOf(e, t), this.probes[t]) || {
1920
+ hex: oi,
1921
+ opacity: ai
2526
1922
  };
2527
1923
  }
2528
1924
  render() {
2529
1925
  let e = this;
2530
- var t = ot(), n = t.firstChild, r = n.firstChild, i = r.nextSibling, a = n.nextSibling, o = a.nextSibling, s = stopInner;
2531
- return typeof s == "function" || Array.isArray(s) ? F(() => s, t) : stopInner = t, j(t, () => e.bar(), n), j(n, O(E, {
1926
+ var t = je(), n = t.firstChild, r = n.firstChild, i = r.nextSibling, a = n.nextSibling, o = a.nextSibling, s = stopInner;
1927
+ return typeof s == "function" || Array.isArray(s) ? R(() => s, t) : stopInner = t, P(t, () => e.bar(), n), P(n, j(k, {
2532
1928
  get when() {
2533
1929
  return e.hasPages;
2534
1930
  },
@@ -2536,137 +1932,134 @@ ${this.text("usedBy", { tokens: n.join(", ") })}` : ""}`;
2536
1932
  return e.samples();
2537
1933
  },
2538
1934
  get children() {
2539
- var t = at();
2540
- return j(t, O(T, {
1935
+ var t = Ae();
1936
+ return P(t, j(O, {
2541
1937
  get each() {
2542
1938
  return e.pageIds;
2543
1939
  },
2544
1940
  children: (t) => e.page(t)
2545
- })), k(() => ({
1941
+ })), M(() => ({
2546
1942
  e: e.shownPageIds.length > 1,
2547
1943
  t: !!e.draggedPage,
2548
1944
  a: e.partForName("pages")
2549
1945
  }), ({ e, t: n, a: r }, i) => {
2550
- e !== i?.e && t.classList.toggle("grid", e), n !== i?.t && t.classList.toggle("dragging", n), r !== i?.a && I(t, "part", r);
1946
+ e !== i?.e && t.classList.toggle("grid", e), n !== i?.t && t.classList.toggle("dragging", n), r !== i?.a && z(t, "part", r);
2551
1947
  }), t;
2552
1948
  }
2553
- }), r), j(n, () => e.side(), i), F(() => (t) => e.probes.light = t, a), F(() => (t) => e.probes.dark = t, o), k(() => ({
1949
+ }), r), P(n, () => e.side(), i), R(() => (t) => e.probes.light = t, a), R(() => (t) => e.probes.dark = t, o), M(() => ({
2554
1950
  e: !!e.hasPages,
2555
1951
  t: e.partForName("editor")
2556
1952
  }), ({ e, t: n }, r) => {
2557
- e !== r?.e && t.classList.toggle("paged", e), n !== r?.t && I(t, "part", n);
1953
+ e !== r?.e && t.classList.toggle("paged", e), n !== r?.t && z(t, "part", n);
2558
1954
  }), t;
2559
1955
  }
2560
1956
  bar() {
2561
- let e = this.text, t = this;
2562
- var n = ct(), r = n.firstChild, i = r.firstChild, o = i.nextSibling, s = r.nextSibling, c = s.firstChild, l = c.firstChild, d = l.nextSibling, f = d.nextSibling, p = c.nextSibling;
2563
- return i._$owner = A(), j(o, () => e("label")), j(s, () => t.edgeButton("start"), c), c.addEventListener("scroll", () => t.measureTools()), F(() => (e) => t.watchTools(e), c), j(c, () => t.menu("theme", t.bases, t.baseTheme, (e) => t.choose({ base: e }), {
2564
- labelOf: a.titleOf,
2565
- tipOf: /* @__PURE__ */ u((t) => e("themeTip", { theme: a.titleOf(t) }), "tipOf")
2566
- }), l), j(c, () => t.schemesGroup(), d), j(c, O(E, {
1957
+ let e = this.text, n = this;
1958
+ var r = Ne(), i = r.firstChild, a = i.firstChild, o = a.nextSibling, s = i.nextSibling, c = s.firstChild, l = c.firstChild, u = l.nextSibling, d = u.nextSibling, f = c.nextSibling;
1959
+ return a._$owner = N(), P(o, () => e("label")), P(s, () => n.edgeButton("start"), c), c.addEventListener("scroll", () => n.measureTools()), R(() => (e) => n.watchTools(e), c), P(c, () => n.menu("theme", n.bases, n.baseTheme, (e) => n.choose({ base: e }), {
1960
+ labelOf: y.titleOf,
1961
+ tipOf: /* @__PURE__ */ t((t) => e("themeTip", { theme: y.titleOf(t) }), "tipOf")
1962
+ }), l), P(c, () => n.schemesGroup(), u), P(c, j(k, {
2567
1963
  get when() {
2568
- return t.hasPages;
1964
+ return n.hasPages;
2569
1965
  },
2570
1966
  get children() {
2571
- return [N(() => t.pageToggles()), (() => {
2572
- var n = st();
2573
- return n._$$click = () => t.device = t.device === "phone" ? "desk" : "phone", n._$owner = A(), k(() => ({
2574
- e: t.device === "phone" ? "true" : "false",
1967
+ return [I(() => n.pageToggles()), (() => {
1968
+ var t = Me();
1969
+ return t._$$click = () => n.device = n.device === "phone" ? "desk" : "phone", t._$owner = N(), M(() => ({
1970
+ e: n.device === "phone" ? "true" : "false",
2575
1971
  t: e("phone"),
2576
1972
  a: e("phoneTip")
2577
- }), ({ e, t, a: r }, i) => {
2578
- e !== i?.e && I(n, "aria-pressed", e), t !== i?.t && I(n, "aria-label", t), r !== i?.a && I(n, "title", r);
2579
- }), n;
1973
+ }), ({ e, t: n, a: r }, i) => {
1974
+ e !== i?.e && z(t, "aria-pressed", e), n !== i?.t && z(t, "aria-label", n), r !== i?.a && z(t, "title", r);
1975
+ }), t;
2580
1976
  })()];
2581
1977
  }
2582
- }), f), j(s, () => t.edgeButton("end"), p), k(() => ({
2583
- e: t.partForName("bar"),
1978
+ }), d), P(s, () => n.edgeButton("end"), f), M(() => ({
1979
+ e: n.partForName("bar"),
2584
1980
  t: e("lede"),
2585
- a: !!t.barMore.start,
2586
- o: !!t.barMore.end
2587
- }), ({ e, t, a: i, o: a }, o) => {
2588
- e !== o?.e && I(n, "part", e), t !== o?.t && I(r, "title", t), i !== o?.a && s.classList.toggle("more-start", i), a !== o?.o && s.classList.toggle("more-end", a);
2589
- }), n;
1981
+ a: !!n.barMore.start,
1982
+ o: !!n.barMore.end
1983
+ }), ({ e, t, a: n, o: a }, o) => {
1984
+ e !== o?.e && z(r, "part", e), t !== o?.t && z(i, "title", t), n !== o?.a && s.classList.toggle("more-start", n), a !== o?.o && s.classList.toggle("more-end", a);
1985
+ }), r;
2590
1986
  }
2591
1987
  schemesGroup() {
2592
- let e = this.text, t = /* @__PURE__ */ u((e) => {
1988
+ let e = this.text, n = /* @__PURE__ */ t((e) => {
2593
1989
  let { value: t } = e.detail;
2594
- if (t !== zr) return this.showSchemes(t);
1990
+ if (t !== Dr) return this.showSchemes(t);
2595
1991
  e.preventDefault(), this.swap();
2596
- }, "onChoosing"), n = this;
2597
- var r = ut(), i = r.firstChild, a = i.nextSibling;
2598
- return I(r, "on-ui-choosing", t), r._$owner = A(), j(r, O(T, {
2599
- each: Vr,
1992
+ }, "onChoosing"), r = this;
1993
+ var i = Fe(), a = i.firstChild, o = a.nextSibling;
1994
+ return z(i, "on-ui-choosing", n), i._$owner = N(), P(i, j(O, {
1995
+ each: kr,
2600
1996
  children: (t) => (() => {
2601
- var r = dt();
2602
- return I(r, "value", t), r._$owner = A(), j(r, () => e(t)), k(() => ({
2603
- e: n.schemes === t ? "" : void 0,
1997
+ var n = H();
1998
+ return z(n, "value", t), n._$owner = N(), P(n, () => e(t)), M(() => ({
1999
+ e: r.schemes === t ? "" : void 0,
2604
2000
  t: e(`${t}Tip`)
2605
- }), ({ e, t }, n) => {
2606
- e !== n?.e && I(r, "selected", e), t !== n?.t && I(r, "title", t);
2607
- }), r;
2001
+ }), ({ e, t }, r) => {
2002
+ e !== r?.e && z(n, "selected", e), t !== r?.t && z(n, "title", t);
2003
+ }), n;
2608
2004
  })()
2609
- }), i), j(r, O(E, {
2005
+ }), a), P(i, j(k, {
2610
2006
  get when() {
2611
- return N(() => !!n.hasPages)() ? n.schemes === "both" : n.hasPages;
2007
+ return I(() => !!r.hasPages)() ? r.schemes === "both" : r.hasPages;
2612
2008
  },
2613
2009
  get children() {
2614
- var t = lt();
2615
- return I(t, "value", zr), t._$owner = A(), k(() => ({
2616
- e: !!n.isSwapped,
2010
+ var t = Pe();
2011
+ return z(t, "value", Dr), t._$owner = N(), M(() => ({
2012
+ e: !!r.isSwapped,
2617
2013
  t: e("swap"),
2618
- a: n.isSwapped ? "true" : "false",
2619
- o: e(n.isSwapped ? "swappedTip" : "swapTip")
2014
+ a: r.isSwapped ? "true" : "false",
2015
+ o: e(r.isSwapped ? "swappedTip" : "swapTip")
2620
2016
  }), ({ e, t: n, a: r, o: i }, a) => {
2621
- e !== a?.e && t.classList.toggle("on", e), n !== a?.t && I(t, "aria-label", n), r !== a?.a && I(t, "aria-pressed", r), i !== a?.o && I(t, "title", i);
2017
+ e !== a?.e && t.classList.toggle("on", e), n !== a?.t && z(t, "aria-label", n), r !== a?.a && z(t, "aria-pressed", r), i !== a?.o && z(t, "title", i);
2622
2018
  }), t;
2623
2019
  }
2624
- }), a), k(() => e("schemes"), (e) => {
2625
- I(r, "aria-label", e);
2626
- }), r;
2020
+ }), o), M(() => e("schemes"), (e) => {
2021
+ z(i, "aria-label", e);
2022
+ }), i;
2627
2023
  }
2628
2024
  pageToggles() {
2629
- let e = this.text, t = /* @__PURE__ */ u((e) => {
2630
- e.preventDefault(), this.togglePage(e.detail.value);
2631
- }, "onChoosing"), n = this;
2632
- var r = ft();
2633
- return I(r, "on-ui-choosing", t), r._$owner = A(), j(r, O(T, {
2025
+ let e = this.text, n = this;
2026
+ var r = Ie();
2027
+ return z(r, "on-ui-changed", (e) => n.showPages(n.orderedPageIds, e.detail.values ?? [])), r._$owner = N(), P(r, j(O, {
2634
2028
  get each() {
2635
2029
  return n.orderedPageIds;
2636
2030
  },
2637
- children: (t) => {
2638
- let r = /* @__PURE__ */ u(() => n.pageOf(t)?.label ?? t, "label"), i = /* @__PURE__ */ u(() => n.isPageShown(t), "isShown");
2639
- var a = pt();
2640
- return I(a, "value", t), a._$owner = A(), j(a, r), k(() => ({
2641
- e: !!i(),
2642
- t: n.pageOf(t)?.icon ?? "file",
2643
- a: i() ? "true" : "false",
2644
- o: e(i() ? "hidePageTip" : "showPageTip", { page: r() })
2645
- }), ({ e, t, a: n, o: r }, i) => {
2646
- e !== i?.e && a.classList.toggle("on", e), t !== i?.t && I(a, "icon", t), n !== i?.a && I(a, "aria-pressed", n), r !== i?.o && I(a, "title", r);
2647
- }), a;
2031
+ children: (r) => {
2032
+ let i = /* @__PURE__ */ t(() => n.pageOf(r)?.label ?? r, "label"), a = /* @__PURE__ */ t(() => n.isPageShown(r), "isShown");
2033
+ var o = H();
2034
+ return z(o, "value", r), o._$owner = N(), P(o, i), M(() => ({
2035
+ e: n.pageOf(r)?.icon ?? "file",
2036
+ t: a() ? "" : void 0,
2037
+ a: e(a() ? "hidePageTip" : "showPageTip", { page: i() })
2038
+ }), ({ e, t, a: n }, r) => {
2039
+ e !== r?.e && z(o, "icon", e), t !== r?.t && z(o, "selected", t), n !== r?.a && z(o, "title", n);
2040
+ }), o;
2648
2041
  }
2649
- })), k(() => e("pages"), (e) => {
2650
- I(r, "aria-label", e);
2042
+ })), M(() => e("pages"), (e) => {
2043
+ z(r, "aria-label", e);
2651
2044
  }), r;
2652
2045
  }
2653
2046
  edgeButton(e) {
2654
- let t = /* @__PURE__ */ u(() => this.text(e === "start" ? "scrollBack" : "scrollOn"), "label"), n = this;
2655
- var r = mt(), i = r.firstChild;
2656
- return r._$$click = () => n.toolsBox?.scrollBy({
2657
- left: (e === "start" ? -1 : 1) * hi,
2047
+ let n = /* @__PURE__ */ t(() => this.text(e === "start" ? "scrollBack" : "scrollOn"), "label"), r = this;
2048
+ var i = Le(), a = i.firstChild;
2049
+ return i._$$click = () => r.toolsBox?.scrollBy({
2050
+ left: (e === "start" ? -1 : 1) * ri,
2658
2051
  behavior: "smooth"
2659
- }), I(i, "name", e === "start" ? "chevron left" : "chevron right"), i._$owner = A(), k(() => ({
2660
- e: P(["edge", e]),
2661
- t: !n.barMore[e],
2662
- a: t(),
2663
- o: t()
2664
- }), ({ e, t, a: n, o: i }, a) => {
2665
- D(r, e, a?.e), t !== a?.t && I(r, "hidden", t), n !== a?.a && I(r, "aria-label", n), i !== a?.o && I(r, "title", i);
2666
- }), r;
2052
+ }), z(a, "name", e === "start" ? "chevron left" : "chevron right"), a._$owner = N(), M(() => ({
2053
+ e: L(["edge", e]),
2054
+ t: !r.barMore[e],
2055
+ a: n(),
2056
+ o: n()
2057
+ }), ({ e, t, a: n, o: r }, a) => {
2058
+ A(i, e, a?.e), t !== a?.t && z(i, "hidden", t), n !== a?.a && z(i, "aria-label", n), r !== a?.o && z(i, "title", r);
2059
+ }), i;
2667
2060
  }
2668
2061
  watchTools(e) {
2669
- this.toolsBox = e, M || this.resizer.observe(e);
2062
+ this.toolsBox = e, F || this.resizer.observe(e);
2670
2063
  }
2671
2064
  measureTools() {
2672
2065
  let e = this.toolsBox;
@@ -2677,77 +2070,77 @@ ${this.text("usedBy", { tokens: n.join(", ") })}` : ""}`;
2677
2070
  end: n
2678
2071
  });
2679
2072
  }
2680
- menu(e, t, n, r, { labelOf: i = /* @__PURE__ */ u((e) => this.text(e), "labelOf"), tipOf: a }) {
2681
- let o = this;
2682
- var s = ht();
2683
- return I(s, "on-ui-choosing", (e) => r(e.detail.value)), s._$owner = A(), j(s, O(T, {
2684
- each: t,
2073
+ menu(e, n, r, i, { labelOf: a = /* @__PURE__ */ t((e) => this.text(e), "labelOf"), tipOf: o }) {
2074
+ let s = this;
2075
+ var c = Re();
2076
+ return z(c, "on-ui-choosing", (e) => i(e.detail.value)), c._$owner = N(), P(c, j(O, {
2077
+ each: n,
2685
2078
  children: (e) => (() => {
2686
- var t = dt();
2687
- return I(t, "value", e), I(t, "selected", n === e ? "" : void 0), t._$owner = A(), j(t, () => i(e)), k(() => a(e), (e) => {
2688
- I(t, "title", e);
2079
+ var t = H();
2080
+ return z(t, "value", e), z(t, "selected", r === e ? "" : void 0), t._$owner = N(), P(t, () => a(e)), M(() => o(e), (e) => {
2081
+ z(t, "title", e);
2689
2082
  }), t;
2690
2083
  })()
2691
- })), k(() => o.text(e), (e) => {
2692
- I(s, "aria-label", e);
2693
- }), s;
2084
+ })), M(() => s.text(e), (e) => {
2085
+ z(c, "aria-label", e);
2086
+ }), c;
2694
2087
  }
2695
2088
  get bases() {
2696
2089
  if (!this.isReady) return [this.baseTheme];
2697
- let e = [...p.themes.own];
2090
+ let e = [...d.themes.own];
2698
2091
  return e.includes(this.baseTheme) ? e : [...e, this.baseTheme];
2699
2092
  }
2700
2093
  page(e) {
2701
- let t = this.text, n = /* @__PURE__ */ u(() => this.pageOf(e), "page"), r = /* @__PURE__ */ u(() => this.schemes === "both" ? this.isDarkFirst(e) ? "dark" : "light" : this.shownSchemes[0], "firstScheme"), i = /* @__PURE__ */ u(() => this.urlOf(frameKey(e, r())), "url"), a = /* @__PURE__ */ u(() => {
2702
- let e = i();
2703
- return e ? le.addressWith(e, {
2094
+ let n = this.text, r = /* @__PURE__ */ t(() => this.pageOf(e), "page"), i = /* @__PURE__ */ t(() => this.schemes === "both" ? this.isDarkFirst(e) ? "dark" : "light" : this.shownSchemes[0], "firstScheme"), a = /* @__PURE__ */ t(() => this.urlOf(frameKey(e, i())), "url"), o = /* @__PURE__ */ t(() => {
2095
+ let e = a();
2096
+ return e ? he.addressWith(e, {
2704
2097
  theme: this.baseTheme,
2705
- scheme: r()
2098
+ scheme: i()
2706
2099
  }) : "";
2707
- }, "popout"), o = this;
2708
- var s = _t(), c = s.firstChild, l = c.firstChild, d = l.nextSibling, f = d.nextSibling, p = f.nextSibling, m = c.nextSibling;
2709
- return s.addEventListener("drop", (t) => o.onPageDrop(t, e)), s.addEventListener("dragover", (t) => o.onPageDragOver(t, e)), c._$$keydown = (t) => o.onPageHeadKey(t, e), c.addEventListener("dragend", () => o.endDrag()), c.addEventListener("dragstart", (t) => o.onPageDragStart(t, e)), l._$owner = A(), j(d, () => n()?.label), j(f, (() => {
2710
- var e = N(() => !!i());
2711
- return () => e() ? new URL(i(), M ? "http://localhost" : location.href).pathname : "";
2712
- })()), p._$$click = () => o.reload(e), p._$owner = A(), j(c, O(E, {
2100
+ }, "popout"), s = this;
2101
+ var c = Be(), l = c.firstChild, u = l.firstChild, d = u.nextSibling, f = d.nextSibling, p = f.nextSibling, m = l.nextSibling;
2102
+ return c.addEventListener("drop", (t) => s.onPageDrop(t, e)), c.addEventListener("dragover", (t) => s.onPageDragOver(t, e)), l._$$keydown = (t) => s.onPageHeadKey(t, e), l.addEventListener("dragend", () => s.endDrag()), l.addEventListener("dragstart", (t) => s.onPageDragStart(t, e)), u._$owner = N(), P(d, () => r()?.label), P(f, (() => {
2103
+ var e = I(() => !!a());
2104
+ return () => e() ? new URL(a(), F ? "http://localhost" : location.href).pathname : "";
2105
+ })()), p._$$click = () => s.reload(e), p._$owner = N(), P(l, j(k, {
2713
2106
  get when() {
2714
- return i();
2107
+ return a();
2715
2108
  },
2716
2109
  get children() {
2717
- var e = gt(), n = e.firstChild, r = A();
2718
- return n._$owner = A(), k(() => ({
2719
- e: a(),
2720
- t: t("openTip"),
2721
- a: t("open")
2110
+ var e = ze(), t = e.firstChild, r = N();
2111
+ return t._$owner = N(), M(() => ({
2112
+ e: o(),
2113
+ t: n("openTip"),
2114
+ a: n("open")
2722
2115
  }), ({ e: t, t: n, a: i }, a) => {
2723
- t !== a?.e && I(e, "href", t), n !== a?.t && I(e, "title", n), i !== a?.a && I(e, "aria-label", i), de(e, r);
2116
+ t !== a?.e && z(e, "href", t), n !== a?.t && z(e, "title", n), i !== a?.a && z(e, "aria-label", i), _e(e, r);
2724
2117
  }), e;
2725
2118
  }
2726
- }), null), j(m, O(T, {
2119
+ }), null), P(m, j(O, {
2727
2120
  get each() {
2728
- return o.slots;
2121
+ return s.slots;
2729
2122
  },
2730
- children: (t) => o.frame(frameKey(e, t))
2731
- })), k(() => ({
2732
- e: !!o.isPageWide(e),
2733
- t: o.dropAt?.id === e && o.dropAt.side === "before",
2734
- a: o.dropAt?.id === e && o.dropAt.side === "after",
2735
- o: o.partForName("page"),
2736
- i: !o.isPageShown(e),
2737
- n: `order: ${o.shownPageIds.indexOf(e)}`,
2738
- s: t("moveTip"),
2739
- h: n()?.icon ?? "file",
2740
- r: i() ?? "",
2741
- d: t("reload"),
2742
- l: t("reloadTip"),
2743
- u: P([
2123
+ children: (t) => s.frame(frameKey(e, t))
2124
+ })), M(() => ({
2125
+ e: !!s.isPageWide(e),
2126
+ t: s.dropAt?.id === e && s.dropAt.side === "before",
2127
+ a: s.dropAt?.id === e && s.dropAt.side === "after",
2128
+ o: s.partForName("page"),
2129
+ i: !s.isPageShown(e),
2130
+ n: `order: ${s.shownPageIds.indexOf(e)}`,
2131
+ s: n("moveTip"),
2132
+ h: r()?.icon ?? "file",
2133
+ r: a() ?? "",
2134
+ d: n("reload"),
2135
+ l: n("reloadTip"),
2136
+ u: L([
2744
2137
  "frames",
2745
- o.schemes,
2746
- { "dark-first": o.schemes === "both" && o.isDarkFirst(e) }
2138
+ s.schemes,
2139
+ { "dark-first": s.schemes === "both" && s.isDarkFirst(e) }
2747
2140
  ])
2748
- }), ({ e, t, a: n, o: r, i, n: a, s: o, h: u, r: d, d: h, l: g, u: ee }, _) => {
2749
- e !== _?.e && s.classList.toggle("wide", e), t !== _?.t && s.classList.toggle("drop-before", t), n !== _?.a && s.classList.toggle("drop-after", n), r !== _?.o && I(s, "part", r), i !== _?.i && I(s, "hidden", i), L(s, a, _?.n), o !== _?.s && I(c, "title", o), u !== _?.h && I(l, "name", u), d !== _?.r && I(f, "title", d), h !== _?.d && I(p, "label", h), g !== _?.l && I(p, "title", g), D(m, ee, _?.u);
2750
- }), s;
2141
+ }), ({ e, t, a: n, o: r, i, n: a, s: o, h: s, r: d, d: h, l: g, u: ee }, _) => {
2142
+ e !== _?.e && c.classList.toggle("wide", e), t !== _?.t && c.classList.toggle("drop-before", t), n !== _?.a && c.classList.toggle("drop-after", n), r !== _?.o && z(c, "part", r), i !== _?.i && z(c, "hidden", i), ye(c, a, _?.n), o !== _?.s && z(l, "title", o), s !== _?.h && z(u, "name", s), d !== _?.r && z(f, "title", d), h !== _?.d && z(p, "label", h), g !== _?.l && z(p, "title", g), A(m, ee, _?.u);
2143
+ }), c;
2751
2144
  }
2752
2145
  onPageDragStart(e, t) {
2753
2146
  this.draggedPage = t, e.dataTransfer?.setData("text/plain", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
@@ -2773,447 +2166,521 @@ ${this.text("usedBy", { tokens: n.join(", ") })}` : ""}`;
2773
2166
  !e.altKey || e.key !== "ArrowLeft" && e.key !== "ArrowRight" || (e.preventDefault(), this.movePageBy(t, e.key === "ArrowLeft" ? -1 : 1));
2774
2167
  }
2775
2168
  frame(e) {
2776
- let t = this.text, [n, r] = splitKey(e), i = /* @__PURE__ */ u(() => this.isTurnOf(e) ? this.urlOf(e) : void 0, "url"), a = /* @__PURE__ */ u(() => this.pageOf(n)?.label ?? n, "label"), o = /* @__PURE__ */ u(() => this.urlOf(e) === "" ? this.pageOf(n)?.note ?? t("unreachable") : t("loadingPage"), "note"), s = this;
2777
- var c = bt(), l = c.firstChild;
2778
- return F(() => (t) => s.watchCell(e, t), l), j(l, O(E, {
2169
+ let n = this.text, [r, i] = splitKey(e), a = /* @__PURE__ */ t(() => this.isTurnOf(e) ? this.urlOf(e) : void 0, "url"), o = /* @__PURE__ */ t(() => this.pageOf(r)?.label ?? r, "label"), s = /* @__PURE__ */ t(() => this.urlOf(e) === "" ? this.pageOf(r)?.note ?? n("unreachable") : n("loadingPage"), "note"), c = this;
2170
+ var l = Ue(), u = l.firstChild;
2171
+ return R(() => (t) => c.watchCell(e, t), u), P(u, j(k, {
2779
2172
  get when() {
2780
- return i();
2173
+ return a();
2781
2174
  },
2782
2175
  get fallback() {
2783
- var e = xt();
2784
- return j(e, o), e;
2176
+ var e = U();
2177
+ return P(e, s), e;
2785
2178
  },
2786
2179
  get children() {
2787
2180
  return [(() => {
2788
- var n = vt();
2789
- return n.addEventListener("load", () => s.onPageLoaded(e)), F(() => (t) => {
2790
- s.frames.set(e, t), s.begun.add(e);
2791
- }, n), k(() => ({
2792
- e: i(),
2793
- t: `${a()}, ${t(r)}`,
2794
- a: P(s.frameStyle(e))
2795
- }), ({ e, t, a: r }, i) => {
2796
- e !== i?.e && I(n, "src", e), t !== i?.t && I(n, "title", t), L(n, r, i?.a);
2797
- }), n;
2798
- })(), O(E, {
2181
+ var t = Ve();
2182
+ return t.addEventListener("load", () => c.onPageLoaded(e)), R(() => (t) => {
2183
+ c.frames.set(e, t), c.begun.add(e);
2184
+ }, t), M(() => ({
2185
+ e: a(),
2186
+ t: `${o()}, ${n(i)}`,
2187
+ a: L(c.frameStyle(e))
2188
+ }), ({ e, t: n, a: r }, i) => {
2189
+ e !== i?.e && z(t, "src", e), n !== i?.t && z(t, "title", n), ye(t, r, i?.a);
2190
+ }), t;
2191
+ })(), j(k, {
2799
2192
  get when() {
2800
- return !s.loaded[e];
2193
+ return !c.loaded[e];
2801
2194
  },
2802
2195
  get children() {
2803
- var e = yt();
2804
- return j(e, () => t("loadingPage")), e;
2196
+ var e = He();
2197
+ return P(e, () => n("loadingPage")), e;
2805
2198
  }
2806
2199
  })];
2807
2200
  }
2808
- })), k(() => ({
2809
- e: P(["frame", r]),
2810
- t: !!s.loaded[e],
2811
- a: s.device === "phone"
2201
+ })), M(() => ({
2202
+ e: L(["frame", i]),
2203
+ t: !!c.loaded[e],
2204
+ a: c.device === "phone"
2812
2205
  }), ({ e, t, a: n }, r) => {
2813
- D(c, e, r?.e), t !== r?.t && l.classList.toggle("loaded", t), n !== r?.a && l.classList.toggle("phone", n);
2814
- }), c;
2206
+ A(l, e, r?.e), t !== r?.t && u.classList.toggle("loaded", t), n !== r?.a && u.classList.toggle("phone", n);
2207
+ }), l;
2815
2208
  }
2816
2209
  samples() {
2817
2210
  let e = this;
2818
- var t = St(), n = t.firstChild, r = n.nextSibling;
2819
- return j(t, () => e.sampleApp("light"), n), j(t, () => e.sampleApp("dark"), r), k(() => e.partForName("preview"), (e) => {
2820
- I(t, "part", e);
2211
+ var t = We(), n = t.firstChild, r = n.nextSibling;
2212
+ return P(t, () => e.sampleApp("light"), n), P(t, () => e.sampleApp("dark"), r), M(() => e.partForName("preview"), (e) => {
2213
+ z(t, "part", e);
2821
2214
  }), t;
2822
2215
  }
2823
2216
  sampleApp(e) {
2824
2217
  let t = this.text, n = this;
2825
- var r = Ct(), i = r.firstChild, a = i.firstChild, o = a.firstChild, s = o.nextSibling, c = a.nextSibling.firstChild, l = i.nextSibling, u = l.firstChild, d = u.firstChild, f = d.nextSibling, p = f.firstChild, m = p.nextSibling, h = m.nextSibling, g = f.nextSibling.firstChild, ee = g.nextSibling, _ = l.nextSibling, v = _.firstChild, y = v.nextSibling, te = y.nextSibling, ne = te.nextSibling, re = _.nextSibling, ie = re.firstChild, ae = ie.nextSibling;
2826
- ae.nextSibling;
2827
- var oe = re.nextSibling;
2828
- return j(o, () => t(e)), j(s, () => t("appTitle")), c._$owner = A(), l._$owner = A(), u._$owner = A(), d._$owner = A(), j(d, () => t("today")), p._$owner = A(), j(p, () => t("habitWater")), m._$owner = A(), j(m, () => t("habitRead")), h._$owner = A(), j(h, () => t("habitMove")), g._$owner = A(), ee._$owner = A(), j(ee, () => t("add")), v._$owner = A(), j(v, () => t("secondary")), y._$owner = A(), j(y, () => t("basicButton")), te._$owner = A(), j(te, () => t("live")), ne._$owner = A(), j(ne, () => t("remind")), re._$owner = A(), ie._$owner = A(), j(ae, () => t("streak")), j(re, () => t("streakMore"), null), oe._$owner = A(), k(() => ({
2218
+ var r = Ge(), i = r.firstChild, a = i.firstChild, o = a.firstChild, s = o.nextSibling, c = a.nextSibling.firstChild, l = i.nextSibling, u = l.firstChild, d = u.firstChild, f = d.nextSibling, p = f.firstChild, m = p.nextSibling, h = m.nextSibling, g = f.nextSibling.firstChild, ee = g.nextSibling, _ = l.nextSibling, v = _.firstChild, y = v.nextSibling, te = y.nextSibling, b = te.nextSibling, x = _.nextSibling, ne = x.firstChild, re = ne.nextSibling;
2219
+ re.nextSibling;
2220
+ var ie = x.nextSibling;
2221
+ return P(o, () => t(e)), P(s, () => t("appTitle")), c._$owner = N(), l._$owner = N(), u._$owner = N(), d._$owner = N(), P(d, () => t("today")), p._$owner = N(), P(p, () => t("habitWater")), m._$owner = N(), P(m, () => t("habitRead")), h._$owner = N(), P(h, () => t("habitMove")), g._$owner = N(), ee._$owner = N(), P(ee, () => t("add")), v._$owner = N(), P(v, () => t("secondary")), y._$owner = N(), P(y, () => t("basicButton")), te._$owner = N(), P(te, () => t("live")), b._$owner = N(), P(b, () => t("remind")), x._$owner = N(), ne._$owner = N(), P(re, () => t("streak")), P(x, () => t("streakMore"), null), ie._$owner = N(), M(() => ({
2829
2222
  e: ["sample", `ui-${e}`],
2830
2223
  t: !n.shownSchemes.includes(e),
2831
2224
  a: t("newHabit"),
2832
2225
  o: t("newHabit"),
2833
2226
  i: t("progress")
2834
2227
  }), ({ e, t, a: n, o: i, i: a }, o) => {
2835
- D(r, e, o?.e), t !== o?.t && I(r, "hidden", t), n !== o?.a && I(g, "placeholder", n), i !== o?.o && I(g, "aria-label", i), a !== o?.i && I(oe, "aria-label", a);
2228
+ A(r, e, o?.e), t !== o?.t && z(r, "hidden", t), n !== o?.a && z(g, "placeholder", n), i !== o?.o && z(g, "aria-label", i), a !== o?.i && z(ie, "aria-label", a);
2836
2229
  }), r;
2837
2230
  }
2838
2231
  side() {
2839
2232
  let e = this;
2840
- var t = wt(), n = t.firstChild, r = n.nextSibling, i = r.nextSibling, a = i.nextSibling;
2841
- return j(t, () => e.actions(), n), j(t, () => e.basics(), r), j(t, () => e.tokens(), i), j(t, () => e.changesSection(), a), t;
2233
+ var t = Ke(), n = t.firstChild, r = n.nextSibling, i = r.nextSibling, a = i.nextSibling;
2234
+ return P(t, () => e.actions(), n), P(t, () => e.basics(), r), P(t, () => e.tokens(), i), P(t, () => e.changesSection(), a), t;
2842
2235
  }
2843
2236
  actions() {
2844
2237
  let e = this.text, t = this;
2845
- var n = Et(), r = n.firstChild;
2846
- return r._$$click = () => t.startOver(), I(r, "icon", Di), r._$owner = A(), j(r, () => e("startOver")), j(n, O(E, {
2238
+ var n = Xe(), r = n.firstChild, i = r.nextSibling, a = i.nextSibling, o = a.nextSibling, s = o.nextSibling, c = s.nextSibling, l = c.nextSibling, u = l.nextSibling, d = u.nextSibling, f = d.nextSibling, p = f.nextSibling;
2239
+ return r._$$click = () => t.startOver(), z(r, "icon", gi), r._$owner = N(), P(r, () => e("startOver")), i._$$click = () => t.save(), i._$owner = N(), P(i, () => e("save")), a._$$click = () => t.saveAsNew(), a._$owner = N(), P(a, () => e("saveAs")), P(n, j(k, {
2240
+ get when() {
2241
+ return t.editing;
2242
+ },
2243
+ get children() {
2244
+ var n = qe();
2245
+ return n._$$click = () => void t.remove(), n._$owner = N(), P(n, () => e("remove")), M(() => e("removeTip"), (e) => {
2246
+ z(n, "title", e);
2247
+ }), n;
2248
+ }
2249
+ }), o), o._$owner = N(), P(o, () => e("exportTheme")), s._$$click = (e) => e.currentTarget.nextElementSibling?.click(), s._$owner = N(), P(s, () => e("importTheme")), c.addEventListener("change", (e) => {
2250
+ let n = e.currentTarget, r = n.files?.[0];
2251
+ n.value = "", r && t.importFile(r);
2252
+ }), P(n, j(k, {
2253
+ get when() {
2254
+ return t.myThemes.length;
2255
+ },
2256
+ get children() {
2257
+ var n = Je();
2258
+ return z(n, "on-ui-changed", (e) => {
2259
+ let n = String(e.detail.value);
2260
+ n && n !== t.editingId && t.open(n);
2261
+ }), n._$owner = N(), P(n, j(O, {
2262
+ get each() {
2263
+ return t.myThemes;
2264
+ },
2265
+ children: (e) => (() => {
2266
+ var t = H();
2267
+ return t._$owner = N(), P(t, () => e.name), M(() => e.id, (e) => {
2268
+ z(t, "value", e);
2269
+ }), t;
2270
+ })()
2271
+ })), M(() => ({
2272
+ e: t.editingId ?? "",
2273
+ t: e("openMine"),
2274
+ a: e("openMine")
2275
+ }), ({ e, t, a: r }, i) => {
2276
+ e !== i?.e && z(n, "value", e), t !== i?.t && z(n, "placeholder", t), r !== i?.a && z(n, "aria-label", r);
2277
+ }), n;
2278
+ }
2279
+ }), l), P(n, j(k, {
2847
2280
  get when() {
2848
- return t.savedCss !== void 0;
2281
+ return t.canSaveIntoSpellUi;
2849
2282
  },
2850
2283
  get children() {
2851
- var n = Tt();
2852
- return n._$$click = () => t.forget(), n._$owner = A(), j(n, () => e("forget")), k(() => e("forgetTip"), (e) => {
2853
- I(n, "title", e);
2284
+ var n = Ye();
2285
+ return n._$$click = () => void t.saveIntoSpellUi(), n._$owner = N(), P(n, () => e("intoSpellUi")), M(() => e("intoSpellUiTip"), (e) => {
2286
+ z(n, "title", e);
2854
2287
  }), n;
2855
2288
  }
2856
- }), null), k(() => e("startOverTip"), (e) => {
2857
- I(r, "title", e);
2289
+ }), u), P(n, j(k, {
2290
+ get when() {
2291
+ return t.editing;
2292
+ },
2293
+ children: (t) => (() => {
2294
+ var n = U();
2295
+ return P(n, () => e("editing", { name: t().name })), n;
2296
+ })()
2297
+ }), d), P(n, j(k, {
2298
+ get when() {
2299
+ return t.importError;
2300
+ },
2301
+ children: (e) => (() => {
2302
+ var t = Ze();
2303
+ return P(t, e), t;
2304
+ })()
2305
+ }), f), P(n, j(k, {
2306
+ get when() {
2307
+ return t.spellUiNote;
2308
+ },
2309
+ children: (e) => (() => {
2310
+ var t = U();
2311
+ return P(t, e), t;
2312
+ })()
2313
+ }), p), M(() => ({
2314
+ e: e("startOverTip"),
2315
+ t: e("saveTip"),
2316
+ a: e("saveAsTip"),
2317
+ o: t.exportHref || void 0,
2318
+ i: t.draft.fileName,
2319
+ n: e("exportTip", { file: t.draft.fileName }),
2320
+ s: e("importTip"),
2321
+ h: e("importTheme")
2322
+ }), ({ e, t, a: n, o: l, i: u, n: d, s: f, h: p }, m) => {
2323
+ e !== m?.e && z(r, "title", e), t !== m?.t && z(i, "title", t), n !== m?.a && z(a, "title", n), l !== m?.o && z(o, "link", l), u !== m?.i && z(o, "download", u), d !== m?.n && z(o, "title", d), f !== m?.s && z(s, "title", f), p !== m?.h && z(c, "aria-label", p);
2858
2324
  }), n;
2859
2325
  }
2860
2326
  basics() {
2861
2327
  let e = this.text, t = this;
2862
- var n = Dt(), i = n.firstChild, o = i.firstChild.firstChild, s = i.nextSibling, c = s.nextSibling, l = c.nextSibling, u = l.nextSibling;
2863
- return F(() => (e) => t.watchHead("basics", e), i), j(o, () => e("basics")), j(n, () => t.basicsGroup("theme", e("theme"), [(() => {
2864
- var n = Ot(), r = n.firstChild;
2865
- return n._$owner = A(), I(r, "on-ui-typed", (e) => t.choose({ name: e.detail.value })), r._$owner = A(), k(() => ({
2328
+ var n = Qe(), r = n.firstChild, a = r.firstChild.firstChild, o = r.nextSibling, s = o.nextSibling, c = s.nextSibling, l = c.nextSibling;
2329
+ return R(() => (e) => t.watchHead("basics", e), r), P(a, () => e("basics")), P(n, () => t.basicsGroup("theme", e("theme"), [(() => {
2330
+ var n = $e(), r = n.firstChild;
2331
+ return n._$owner = N(), z(r, "on-ui-typed", (e) => t.choose({ name: e.detail.value })), r._$owner = N(), M(() => ({
2866
2332
  e: e("name"),
2867
2333
  t: e("nameTip"),
2868
2334
  a: t.theme.name,
2869
2335
  o: e("defaultName"),
2870
2336
  i: e("name")
2871
2337
  }), ({ e, t, a: i, o: a, i: o }, s) => {
2872
- e !== s?.e && I(n, "label", e), t !== s?.t && I(n, "description", t), i !== s?.a && I(r, "value", i), a !== s?.o && I(r, "placeholder", a), o !== s?.i && I(r, "aria-label", o);
2338
+ e !== s?.e && z(n, "label", e), t !== s?.t && z(n, "description", t), i !== s?.a && z(r, "value", i), a !== s?.o && z(r, "placeholder", a), o !== s?.i && z(r, "aria-label", o);
2873
2339
  }), n;
2874
2340
  })(), (() => {
2875
- var n = kt(), r = n.firstChild;
2876
- return n._$owner = A(), I(r, "on-ui-changed", (e) => t.choose({ base: String(e.detail.value) })), r._$owner = A(), j(r, O(T, {
2341
+ var n = tt(), r = n.firstChild, i = r.firstChild, a = i.nextSibling;
2342
+ return z(n, "default", ue), n._$owner = N(), z(r, "on-ui-changed", (e) => {
2343
+ let n = String(e.detail.value);
2344
+ n.startsWith(D.PREFIX) ? t.startFrom(n.slice(D.PREFIX.length)) : t.choose({ base: n });
2345
+ }), r._$owner = N(), P(r, j(O, {
2877
2346
  get each() {
2878
2347
  return t.bases;
2879
2348
  },
2880
2349
  children: (e) => (() => {
2881
- var t = dt();
2882
- return I(t, "value", e), t._$owner = A(), j(t, () => a.titleOf(e)), t;
2350
+ var t = H();
2351
+ return z(t, "value", e), t._$owner = N(), P(t, () => y.titleOf(e)), t;
2883
2352
  })()
2884
- })), k(() => ({
2353
+ }), i), P(r, j(k, {
2354
+ get when() {
2355
+ return t.myThemes.length;
2356
+ },
2357
+ get children() {
2358
+ return [(() => {
2359
+ var t = et();
2360
+ return t._$owner = N(), P(t, () => e("myThemes")), t;
2361
+ })(), j(O, {
2362
+ get each() {
2363
+ return t.myThemes;
2364
+ },
2365
+ children: (e) => (() => {
2366
+ var t = H();
2367
+ return t._$owner = N(), P(t, () => e.name), M(() => D.pickName(e), (e) => {
2368
+ z(t, "value", e);
2369
+ }), t;
2370
+ })()
2371
+ })];
2372
+ }
2373
+ }), a), M(() => ({
2885
2374
  e: e("base"),
2886
2375
  t: e("baseTip"),
2887
2376
  a: t.baseTheme,
2888
2377
  o: e("base")
2889
2378
  }), ({ e, t, a: i, o: a }, o) => {
2890
- e !== o?.e && I(n, "label", e), t !== o?.t && I(n, "description", t), i !== o?.a && I(r, "value", i), a !== o?.o && I(r, "aria-label", a);
2379
+ e !== o?.e && z(n, "label", e), t !== o?.t && z(n, "description", t), i !== o?.a && z(r, "value", i), a !== o?.o && z(r, "aria-label", a);
2891
2380
  }), n;
2892
- })()]), s), j(n, () => t.basicsGroup("color", e("color"), [
2893
- N(() => t.hueProperty("primary")),
2894
- N(() => t.hueProperty("secondary")),
2895
- N(() => t.hueProperty("background"))
2896
- ]), c), j(n, () => t.basicsGroup("type", e("type"), [
2897
- N(() => t.fontProperty("headingFont")),
2898
- N(() => t.fontProperty("bodyFont")),
2899
- N(() => t.sizeProperty())
2900
- ]), l), j(n, () => t.basicsGroup("shape", e("shape"), [
2901
- N(() => t.segmentedProperty("corners", d)),
2902
- N(() => t.segmentedProperty("depth", r)),
2903
- O(E, {
2381
+ })()]), o), P(n, () => t.basicsGroup("color", e("color"), [
2382
+ I(() => t.hueProperty("primary")),
2383
+ I(() => t.hueProperty("secondary")),
2384
+ I(() => t.hueProperty("background"))
2385
+ ]), s), P(n, () => t.basicsGroup("type", e("type"), [
2386
+ I(() => t.fontProperty("headingFont")),
2387
+ I(() => t.fontProperty("bodyFont")),
2388
+ I(() => t.sizeProperty())
2389
+ ]), c), P(n, () => t.basicsGroup("shape", e("shape"), [
2390
+ I(() => t.segmentedProperty("corners", oe)),
2391
+ I(() => t.segmentedProperty("depth", u)),
2392
+ j(k, {
2904
2393
  get when() {
2905
2394
  return t.hasGlass;
2906
2395
  },
2907
2396
  get children() {
2908
- return t.segmentedProperty("glass", f);
2397
+ return t.segmentedProperty("glass", i);
2909
2398
  }
2910
2399
  })
2911
- ]), u), k(() => ({
2400
+ ]), l), M(() => ({
2912
2401
  e: t.partForName("basics"),
2913
2402
  t: e("basics"),
2914
2403
  a: e("basicsTip")
2915
2404
  }), ({ e, t, a: r }, i) => {
2916
- e !== i?.e && I(n, "part", e), t !== i?.t && I(n, "aria-label", t), r !== i?.a && I(o, "title", r);
2405
+ e !== i?.e && z(n, "part", e), t !== i?.t && z(n, "aria-label", t), r !== i?.a && z(a, "title", r);
2917
2406
  }), n;
2918
2407
  }
2919
- basicsGroup(e, t, n) {
2920
- let r = `${ui}${e}`, i = /* @__PURE__ */ u((e) => {
2921
- e.detail.section === this.branchSections.get(r) && this.folds[r] !== e.detail.open && (this.folds = {
2408
+ basicsGroup(e, n, r) {
2409
+ let i = `${Qr}${e}`, a = /* @__PURE__ */ t((e) => {
2410
+ e.detail.section === this.branchSections.get(i) && this.folds[i] !== e.detail.open && (this.folds = {
2922
2411
  ...this.folds,
2923
- [r]: e.detail.open
2924
- }, C.setAt(Ir, this.folds));
2925
- }, "onFolded"), a = this;
2926
- var o = At(), s = o.firstChild;
2927
- return I(o, "label", t), I(o, "on-ui-opened", i), I(o, "on-ui-closed", i), F(() => (e) => a.branchSections.set(r, e), o), o._$owner = A(), s._$owner = A(), j(s, n), k(() => ({
2928
- e: a.headBottom.basics,
2929
- t: a.folds[r] ?? !0 ? "" : "false"
2412
+ [i]: e.detail.open
2413
+ }, w.setAt(wr, this.folds));
2414
+ }, "onFolded"), o = this;
2415
+ var s = nt(), c = s.firstChild;
2416
+ return z(s, "label", n), z(s, "on-ui-opened", a), z(s, "on-ui-closed", a), R(() => (e) => o.branchSections.set(i, e), s), s._$owner = N(), c._$owner = N(), P(c, r), M(() => ({
2417
+ e: o.headBottom.basics,
2418
+ t: o.folds[i] ?? !0 ? "" : "false"
2930
2419
  }), ({ e, t }, n) => {
2931
- e !== n?.e && I(o, "offset", e), t !== n?.t && I(o, "open", t);
2932
- }), o;
2420
+ e !== n?.e && z(s, "offset", e), t !== n?.t && z(s, "open", t);
2421
+ }), s;
2933
2422
  }
2934
2423
  get hasGlass() {
2935
- return me.includes(this.baseTheme);
2424
+ return ge.includes(this.baseTheme);
2936
2425
  }
2937
2426
  ownValue(e, t, n = 0) {
2938
2427
  let r = this.files?.valueIn(this.baseTheme, e) ?? this.pagesValueOf(e);
2939
2428
  if (!r) return "";
2940
- let i = r.replace(Xr, (e, r) => n > fi ? e : this.ownValue(r, t, n + 1) || e);
2941
- return H.forScheme(i, t);
2429
+ let i = r.replace(Rr, (e, r) => n > ei ? e : this.ownValue(r, t, n + 1) || e);
2430
+ return T.forScheme(i, t);
2942
2431
  }
2943
2432
  ownColors(e) {
2944
2433
  return this.shownSchemes.map((t) => {
2945
2434
  let n = this.probes[t], r = this.ownValue(e, t);
2946
2435
  return {
2947
2436
  scheme: t,
2948
- hex: n && r && W.split(r, n)?.hex || vi
2437
+ hex: n && r && V.split(r, n)?.hex || oi
2949
2438
  };
2950
2439
  });
2951
2440
  }
2952
2441
  ownFont(e) {
2953
- let t = this.ownValue(e, this.scheme), n = ce.find((e) => U.fontStack(e).replace(Xr, (e, t) => this.ownValue(t, "light") || e).replace(/\s+/g, "") === t.replace(/\s+/g, "")), r = t.split(",")[0]?.trim().replace(/["']/g, "") ?? "";
2442
+ let t = this.ownValue(e, this.scheme), n = a.find((e) => E.fontStack(e).replace(Rr, (e, t) => this.ownValue(t, "light") || e).replace(/\s+/g, "") === t.replace(/\s+/g, "")), r = t.split(",")[0]?.trim().replace(/["']/g, "") ?? "";
2954
2443
  return {
2955
2444
  stack: t,
2956
- name: n ? this.text(n) : di.test(r) ? this.text("system") : r
2445
+ name: n ? this.text(n) : $r.test(r) ? this.text("system") : r
2957
2446
  };
2958
2447
  }
2959
2448
  ownLabel(e) {
2960
2449
  return e ? `${this.text("own")} \xB7 ${e}` : this.text("own");
2961
2450
  }
2962
2451
  ownShape(e) {
2963
- let t = this.files;
2964
- if (!t) return;
2965
- let n = /* @__PURE__ */ u((e) => t.valueIn(this.baseTheme, e), "raw");
2966
- return e === "corners" ? U.cornersOf({
2967
- s: n("--ui-radius-s"),
2968
- m: n("--ui-radius-m"),
2969
- l: n("--ui-radius-l")
2970
- }) : e === "depth" ? U.depthOf(n("--ui-shadow-raised"), n("--ui-shadow-floating")) : U.glassOf(n("--glass-surface"), n("--glass-surface-strong"), n("--glass-blur"));
2452
+ let n = this.files;
2453
+ if (!n) return;
2454
+ let r = /* @__PURE__ */ t((e) => n.valueIn(this.baseTheme, e), "raw");
2455
+ return e === "corners" ? E.cornersOf({
2456
+ s: r("--ui-radius-s"),
2457
+ m: r("--ui-radius-m"),
2458
+ l: r("--ui-radius-l")
2459
+ }) : e === "depth" ? E.depthOf(r("--ui-shadow-raised"), r("--ui-shadow-floating")) : E.glassOf(r("--glass-surface"), r("--glass-surface-strong"), r("--glass-blur"));
2971
2460
  }
2972
2461
  ownShapeText(e) {
2973
2462
  return e === "corners" ? this.ownValue("--ui-radius", this.scheme) : "";
2974
2463
  }
2975
2464
  hueProperty(e) {
2976
- let t = this.text, n = /* @__PURE__ */ u(() => this.theme[e], "chosen"), r = /* @__PURE__ */ u(() => this.ownColors(ci[e]), "own"), i = /* @__PURE__ */ u(() => r().map((e) => e.hex).join(" / "), "ownText"), a = this;
2977
- var s = jt(), c = s.firstChild, l = c.firstChild, d = l.nextSibling;
2978
- return I(s, "name", e), s._$owner = A(), c._$$keydown = (t) => a.onSwatchKey(t, e), j(c, () => a.swatch(e, void 0, r, i), l), j(c, O(T, {
2979
- get each() {
2980
- return o;
2981
- },
2982
- children: (t) => a.swatch(e, t)
2983
- }), d), k(() => ({
2984
- e: t(e),
2985
- t: t(`${e}Tip`),
2986
- a: n() ? t(n()) : a.ownLabel(i()),
2987
- o: t(e)
2988
- }), ({ e, t, a: n, o: r }, i) => {
2989
- e !== i?.e && I(s, "label", e), t !== i?.t && I(s, "description", t), n !== i?.a && I(s, "output", n), r !== i?.o && I(c, "aria-label", r);
2465
+ let n = this.text, r = /* @__PURE__ */ t(() => this.theme[e], "chosen"), i = /* @__PURE__ */ t(() => this.ownColors(Xr[e]), "own"), a = /* @__PURE__ */ t(() => i().map((e) => e.hex).join(" / "), "ownText"), o = this;
2466
+ var s = rt();
2467
+ return z(s, "name", e), s._$owner = N(), P(s, () => le.draw({
2468
+ size: si,
2469
+ value: r,
2470
+ hues: /* @__PURE__ */ t(() => c, "hues"),
2471
+ nameFor: /* @__PURE__ */ t((e) => n(e), "nameFor"),
2472
+ noneLabel: /* @__PURE__ */ t(() => o.ownLabel(a()), "noneLabel"),
2473
+ noneColors: /* @__PURE__ */ t(() => i().map((e) => e.hex), "noneColors"),
2474
+ label: /* @__PURE__ */ t(() => n(e), "label"),
2475
+ onPick: /* @__PURE__ */ t((t) => o.choose({ [e]: t }), "onPick")
2476
+ })), M(() => ({
2477
+ e: n(e),
2478
+ t: n(`${e}Tip`),
2479
+ a: le.noneValue
2480
+ }), ({ e, t, a: n }, r) => {
2481
+ e !== r?.e && z(s, "label", e), t !== r?.t && z(s, "description", t), n !== r?.a && z(s, "default", n);
2990
2482
  }), s;
2991
2483
  }
2992
- swatch(e, t, n = () => [], r = () => "") {
2993
- let i = /* @__PURE__ */ u(() => t ? this.text(t) : this.ownLabel(r()), "name"), a = /* @__PURE__ */ u(() => this.theme[e] === t, "isChosen"), o = /* @__PURE__ */ u(() => {
2994
- if (t) return `--_swatch: var(--ui-${t})`;
2995
- let [e, r] = n();
2996
- return `--_own-light: ${e?.hex ?? vi}; --_own-dark: ${(r ?? e)?.hex ?? vi}`;
2997
- }, "style"), s = this;
2998
- var c = Mt();
2999
- return c._$$click = () => s.choose({ [e]: t }), I(c, "value", t ?? Y), k(() => ({
3000
- e: P(["swatch", t ?? Y]),
3001
- t: P(o()),
3002
- a: a() ? "true" : "false",
3003
- o: i(),
3004
- i: i(),
3005
- n: a() ? 0 : -1
3006
- }), ({ e, t, a: n, o: r, i, n: a }, o) => {
3007
- D(c, e, o?.e), L(c, t, o?.t), n !== o?.a && I(c, "aria-checked", n), r !== o?.o && I(c, "aria-label", r), i !== o?.i && I(c, "title", i), a !== o?.n && I(c, "tabindex", a);
3008
- }), c;
3009
- }
3010
- onSwatchKey(e, t) {
3011
- let n = [void 0, ...o];
3012
- p.focus.arrowKey(e, {
3013
- container: e.currentTarget,
3014
- items: "button",
3015
- orientation: "both",
3016
- tabindex: "left alone",
3017
- onChange: /* @__PURE__ */ u((e, r) => this.choose({ [t]: n[r] }), "onChange")
3018
- });
3019
- }
3020
2484
  fontProperty(e) {
3021
- let t = this.text, n = /* @__PURE__ */ u(() => this.theme[e], "chosen"), r = /* @__PURE__ */ u(() => this.ownFont(li[e]), "own"), i = this;
3022
- var a = Nt(), o = a.firstChild, s = o.firstChild;
3023
- return I(a, "name", e), a._$owner = A(), I(o, "on-ui-changed", (t) => {
2485
+ let n = this.text, r = /* @__PURE__ */ t(() => this.theme[e], "chosen"), i = /* @__PURE__ */ t(() => this.ownFont(Zr[e]), "own"), o = this;
2486
+ var s = it(), c = s.firstChild, l = c.firstChild;
2487
+ return z(s, "name", e), z(s, "default", J), s._$owner = N(), z(c, "on-ui-changed", (t) => {
3024
2488
  let n = String(t.detail.value);
3025
- i.choose({ [e]: n === Y ? void 0 : n });
3026
- }), o._$owner = A(), I(s, "value", Y), s._$owner = A(), j(s, () => i.ownLabel(r().name)), j(o, O(T, {
2489
+ o.choose({ [e]: n === J ? void 0 : n });
2490
+ }), c._$owner = N(), z(l, "value", J), l._$owner = N(), P(l, () => o.ownLabel(i().name)), P(c, j(O, {
3027
2491
  get each() {
3028
- return ce;
2492
+ return a;
3029
2493
  },
3030
2494
  children: (e) => (() => {
3031
- var n = dt();
3032
- return I(n, "value", e), n._$owner = A(), j(n, () => t(e)), k(() => `font-family: ${U.fontStack(e)}`, (e, t) => {
3033
- L(n, e, t);
3034
- }), n;
2495
+ var t = H();
2496
+ return z(t, "value", e), t._$owner = N(), P(t, () => n(e)), M(() => `font-family: ${E.fontStack(e)}`, (e, n) => {
2497
+ ye(t, e, n);
2498
+ }), t;
3035
2499
  })()
3036
- }), null), k(() => ({
3037
- e: t(e),
3038
- t: t(`${e}Tip`),
3039
- a: n() ?? Y,
3040
- o: t(e),
3041
- i: P(r().stack ? `font-family: ${r().stack}` : void 0)
3042
- }), ({ e, t, a: n, o: r, i }, c) => {
3043
- e !== c?.e && I(a, "label", e), t !== c?.t && I(a, "description", t), n !== c?.a && I(o, "value", n), r !== c?.o && I(o, "aria-label", r), L(s, i, c?.i);
3044
- }), a;
2500
+ }), null), M(() => ({
2501
+ e: n(e),
2502
+ t: n(`${e}Tip`),
2503
+ a: r() ?? J,
2504
+ o: n(e),
2505
+ i: L(i().stack ? `font-family: ${i().stack}` : void 0)
2506
+ }), ({ e, t, a: n, o: r, i }, a) => {
2507
+ e !== a?.e && z(s, "label", e), t !== a?.t && z(s, "description", t), n !== a?.a && z(c, "value", n), r !== a?.o && z(c, "aria-label", r), ye(l, i, a?.i);
2508
+ }), s;
3045
2509
  }
3046
2510
  sizeProperty() {
3047
- let e = this.text, t = /* @__PURE__ */ u(() => this.theme.textSize ?? this.baseTextSize, "size"), n = this;
3048
- var r = Pt(), i = r.firstChild;
3049
- return r._$owner = A(), j(r, O(E, {
2511
+ let e = this.text, n = /* @__PURE__ */ t(() => this.theme.textSize ?? this.baseTextSize, "size"), r = this;
2512
+ var i = at(), a = i.firstChild;
2513
+ return i._$owner = N(), P(i, j(k, {
3050
2514
  get when() {
3051
- return n.theme.textSize !== void 0;
2515
+ return r.theme.textSize !== void 0;
3052
2516
  },
3053
2517
  get children() {
3054
- return n.resetButton(() => n.choose({ textSize: void 0 }));
2518
+ return r.resetButton(() => r.choose({ textSize: void 0 }));
3055
2519
  }
3056
- }), i), I(i, "on-ui-moved", (e) => n.choose({ textSize: e.detail.value })), i._$owner = A(), k(() => ({
2520
+ }), a), z(a, "on-ui-moved", (e) => r.choose({ textSize: e.detail.value })), a._$owner = N(), M(() => ({
3057
2521
  e: e("textSize"),
3058
2522
  t: e("textSizeTip"),
3059
- a: n.theme.textSize === void 0 ? n.ownLabel(`${t()}px`) : `${t()}px`,
3060
- o: he.min,
3061
- i: he.max,
3062
- n: he.step,
3063
- s: t(),
3064
- h: e("textSize")
3065
- }), ({ e, t, a: n, o: a, i: o, n: s, s: c, h: l }, u) => {
3066
- e !== u?.e && I(r, "label", e), t !== u?.t && I(r, "description", t), n !== u?.a && I(r, "output", n), a !== u?.o && I(i, "min", a), o !== u?.i && I(i, "max", o), s !== u?.n && I(i, "step", s), c !== u?.s && I(i, "value", c), l !== u?.h && I(i, "aria-label", l);
3067
- }), r;
2523
+ a: String(r.baseTextSize),
2524
+ o: r.theme.textSize === void 0 ? r.ownLabel(`${n()}px`) : `${n()}px`,
2525
+ i: fe.min,
2526
+ n: fe.max,
2527
+ s: fe.step,
2528
+ h: n(),
2529
+ r: e("textSize")
2530
+ }), ({ e, t, a: n, o: r, i: o, n: s, s: c, h: l, r: u }, d) => {
2531
+ e !== d?.e && z(i, "label", e), t !== d?.t && z(i, "description", t), n !== d?.a && z(i, "default", n), r !== d?.o && z(i, "output", r), o !== d?.i && z(a, "min", o), s !== d?.n && z(a, "max", s), c !== d?.s && z(a, "step", c), l !== d?.h && z(a, "value", l), u !== d?.r && z(a, "aria-label", u);
2532
+ }), i;
3068
2533
  }
3069
2534
  get baseTextSize() {
3070
- let e = parseFloat(this.files?.valueIn(this.baseTheme, yi) ?? "");
3071
- return Number.isFinite(e) ? Math.round(e) : bi;
2535
+ let e = parseFloat(this.files?.valueIn(this.baseTheme, ci) ?? "");
2536
+ return Number.isFinite(e) ? Math.round(e) : li;
3072
2537
  }
3073
- segmentedProperty(e, t) {
3074
- let n = this.text, r = /* @__PURE__ */ u(() => this.theme[e], "chosen"), i = /* @__PURE__ */ u(() => this.ownShape(e), "own"), a = /* @__PURE__ */ u(() => i() ? [...t] : [Y, ...t], "shown"), o = /* @__PURE__ */ u(() => r() ?? i() ?? Y, "picked"), s = /* @__PURE__ */ u((t) => t === Y ? this.ownLabel(this.ownShapeText(e)) : n(t), "labelOf"), c = this;
3075
- var l = Ft(), d = l.firstChild;
3076
- return I(l, "name", e), l._$owner = A(), j(l, O(E, {
2538
+ segmentedProperty(e, n) {
2539
+ let r = this.text, i = /* @__PURE__ */ t(() => this.theme[e], "chosen"), a = /* @__PURE__ */ t(() => this.ownShape(e), "own"), o = /* @__PURE__ */ t(() => a() ? [...n] : [J, ...n], "shown"), s = /* @__PURE__ */ t(() => i() ?? a() ?? J, "picked"), c = /* @__PURE__ */ t((t) => t === J ? this.ownLabel(this.ownShapeText(e)) : r(t), "labelOf"), l = this;
2540
+ var u = ot(), d = u.firstChild;
2541
+ return z(u, "name", e), u._$owner = N(), P(u, j(k, {
3077
2542
  get when() {
3078
- return r() !== void 0;
2543
+ return i() !== void 0;
3079
2544
  },
3080
2545
  get children() {
3081
- return c.resetButton(() => c.choose({ [e]: void 0 }));
2546
+ return l.resetButton(() => l.choose({ [e]: void 0 }));
3082
2547
  }
3083
- }), d), I(d, "on-ui-choosing", (t) => {
2548
+ }), d), z(d, "name", e), z(d, "on-ui-choosing", (t) => {
3084
2549
  let n = t.detail.value;
3085
- c.choose({ [e]: n === Y ? void 0 : n });
3086
- }), d._$owner = A(), j(d, O(T, {
2550
+ l.choose({ [e]: n === J ? void 0 : n });
2551
+ }), d._$owner = N(), P(d, j(O, {
3087
2552
  get each() {
3088
- return a();
2553
+ return o();
3089
2554
  },
3090
2555
  children: (e) => (() => {
3091
- var t = dt();
3092
- return I(t, "value", e), t._$owner = A(), j(t, () => s(e)), k(() => o() === e ? "" : void 0, (e) => {
3093
- I(t, "selected", e);
2556
+ var t = H();
2557
+ return z(t, "value", e), t._$owner = N(), P(t, () => c(e)), M(() => s() === e ? "" : void 0, (e) => {
2558
+ z(t, "selected", e);
3094
2559
  }), t;
3095
2560
  })()
3096
- })), k(() => ({
3097
- e: n(e),
3098
- t: n(`${e}Tip`),
3099
- a: r() ? n(r()) : i() ? c.ownLabel(n(i())) : void 0,
3100
- o: i() ? "" : void 0,
3101
- i: n(e)
3102
- }), ({ e, t, a: n, o: r, i }, a) => {
3103
- e !== a?.e && I(l, "label", e), t !== a?.t && I(l, "description", t), n !== a?.a && I(l, "output", n), r !== a?.o && I(d, "equal", r), i !== a?.i && I(d, "aria-label", i);
3104
- }), l;
2561
+ })), M(() => ({
2562
+ e: r(e),
2563
+ t: r(`${e}Tip`),
2564
+ a: a() ?? J,
2565
+ o: i() ? r(i()) : a() ? l.ownLabel(r(a())) : void 0,
2566
+ i: s(),
2567
+ n: a() ? "" : void 0,
2568
+ s: r(e)
2569
+ }), ({ e, t, a: n, o: r, i, n: a, s: o }, s) => {
2570
+ e !== s?.e && z(u, "label", e), t !== s?.t && z(u, "description", t), n !== s?.a && z(u, "default", n), r !== s?.o && z(u, "output", r), i !== s?.i && z(d, "value", i), a !== s?.n && z(d, "equal", a), o !== s?.s && z(d, "aria-label", o);
2571
+ }), u;
3105
2572
  }
3106
2573
  resetButton(e) {
3107
2574
  let t = this;
3108
- var n = It();
3109
- return n._$$click = () => e(), I(n, "icon", Di), n._$owner = A(), k(() => ({
2575
+ var n = st();
2576
+ return n._$$click = () => e(), z(n, "icon", gi), n._$owner = N(), M(() => ({
3110
2577
  e: t.text("reset"),
3111
2578
  t: t.text("reset")
3112
2579
  }), ({ e, t }, r) => {
3113
- e !== r?.e && I(n, "aria-label", e), t !== r?.t && I(n, "title", t);
2580
+ e !== r?.e && z(n, "aria-label", e), t !== r?.t && z(n, "title", t);
3114
2581
  }), n;
3115
2582
  }
3116
2583
  tokens() {
3117
2584
  let e = this.text, t = this;
3118
- var n = zt(), r = n.firstChild, i = r.firstChild, o = i.firstChild, s = o.nextSibling, c = s.nextSibling, l = c.nextSibling, u = i.nextSibling, d = u.nextSibling;
3119
- return F(() => (e) => t.watchHead("tokens", e), r), j(o, () => e("themeTitle", { theme: a.titleOf(t.baseTheme) })), j(i, () => t.headButton("search", "search", e("searchTip")), s), j(i, () => t.toggleAllButton(), c), j(i, () => t.headButton("info", "info circle", e("infoTip")), l), j(r, O(E, {
2585
+ var n = ut(), r = n.firstChild, i = r.firstChild, a = i.firstChild, o = a.nextSibling, s = o.nextSibling, c = s.nextSibling, l = i.nextSibling, u = l.nextSibling;
2586
+ return R(() => (e) => t.watchHead("tokens", e), r), P(a, () => e("themeTitle", { theme: y.titleOf(t.baseTheme) })), P(i, () => t.headButton("search", "search", e("searchTip")), o), P(i, () => t.toggleAllButton(), s), P(i, () => t.headButton("info", "info circle", e("infoTip")), c), P(r, j(k, {
3120
2587
  get when() {
3121
2588
  return t.openRows.search;
3122
2589
  },
3123
2590
  get children() {
3124
- var n = Lt(), r = n.firstChild, i = r.nextSibling, a = i.firstChild, o = a.nextSibling;
3125
- return I(r, "on-ui-typed", (e) => {
2591
+ var n = ct(), r = n.firstChild, i = r.nextSibling, a = i.firstChild, o = a.nextSibling;
2592
+ return z(r, "on-ui-typed", (e) => {
3126
2593
  t.filter = e.detail.value, t.isFilterFolded = !1;
3127
- }), F(() => (e) => t.findInput = e, r), r._$owner = A(), i._$$click = () => t.isSetHereOnly = !t.isSetHereOnly, i._$owner = A(), j(i, $r, a), j(i, () => e("setHereOnly"), o), k(() => ({
2594
+ }), R(() => (e) => t.findInput = e, r), r._$owner = N(), i._$$click = () => t.isSetHereOnly = !t.isSetHereOnly, i._$owner = N(), P(i, Vr, a), P(i, () => e("setHereOnly"), o), M(() => ({
3128
2595
  e: e("find"),
3129
2596
  t: e("find"),
3130
2597
  a: t.filter,
3131
2598
  o: t.isSetHereOnly ? "true" : "false",
3132
2599
  i: e("setHereOnlyTip", { base: t.parentTitle })
3133
2600
  }), ({ e, t, a: n, o: a, i: o }, s) => {
3134
- e !== s?.e && I(r, "placeholder", e), t !== s?.t && I(r, "aria-label", t), n !== s?.a && I(r, "value", n), a !== s?.o && I(i, "aria-pressed", a), o !== s?.i && I(i, "title", o);
2601
+ e !== s?.e && z(r, "placeholder", e), t !== s?.t && z(r, "aria-label", t), n !== s?.a && z(r, "value", n), a !== s?.o && z(i, "aria-pressed", a), o !== s?.i && z(i, "title", o);
3135
2602
  }), n;
3136
2603
  }
3137
- }), u), j(r, O(E, {
2604
+ }), l), P(r, j(k, {
3138
2605
  get when() {
3139
- return N(() => !!t.openRows.info)() ? t.files : t.openRows.info;
2606
+ return I(() => !!t.openRows.info)() ? t.files : t.openRows.info;
3140
2607
  },
3141
2608
  get children() {
3142
- var n = Rt(), r = n.firstChild, i = r.firstChild, a = i.nextSibling, o = a.nextSibling.nextSibling, s = o.nextSibling.nextSibling, c = s.nextSibling.nextSibling, l = c.nextSibling.nextSibling, u = l.nextSibling.nextSibling, d = u.nextSibling.nextSibling, f = d.nextSibling.nextSibling, p = f.nextSibling.nextSibling;
3143
- return j(n, O(E, {
2609
+ var n = lt(), r = n.firstChild, i = r.firstChild, a = i.nextSibling, o = a.nextSibling.nextSibling, s = o.nextSibling.nextSibling, c = s.nextSibling.nextSibling, l = c.nextSibling.nextSibling, u = l.nextSibling.nextSibling, d = u.nextSibling.nextSibling, f = d.nextSibling.nextSibling, p = f.nextSibling.nextSibling;
2610
+ return P(n, j(k, {
3144
2611
  get when() {
3145
2612
  return t.hasPages;
3146
2613
  },
3147
2614
  get children() {
3148
2615
  return t.readersLegend();
3149
2616
  }
3150
- }), r), j(r, () => e("buildsOn"), i), j(a, () => t.parentTitle), j(o, $r), j(r, () => e("setHere"), s), j(c, ei), j(r, () => e("fromBase", { base: t.parentTitle }), l), j(u, ti), j(r, () => e("pointsAt"), d), j(f, ni), j(r, () => e("derived"), p), n;
2617
+ }), r), P(r, () => e("buildsOn"), i), P(a, () => t.parentTitle), P(o, Vr), P(r, () => e("setHere"), s), P(c, Hr), P(r, () => e("fromBase", { base: t.parentTitle }), l), P(u, Ur), P(r, () => e("pointsAt"), d), P(f, Wr), P(r, () => e("derived"), p), n;
3151
2618
  }
3152
- }), d), j(n, O(E, {
2619
+ }), u), P(n, j(k, {
3153
2620
  get when() {
3154
2621
  return t.files;
3155
2622
  },
3156
2623
  get fallback() {
3157
- var n = xt();
3158
- return j(n, (() => {
3159
- var n = N(() => !!t.filesError);
2624
+ var n = U();
2625
+ return P(n, (() => {
2626
+ var n = I(() => !!t.filesError);
3160
2627
  return () => n() ? e("failed", { error: t.filesError }) : e("loading");
3161
2628
  })()), n;
3162
2629
  },
3163
2630
  get children() {
3164
- return O(T, {
2631
+ return j(O, {
3165
2632
  get each() {
3166
2633
  return t.tree.roots.map((e) => e.id);
3167
2634
  },
3168
2635
  children: (e) => t.branch(e, !0)
3169
2636
  });
3170
2637
  }
3171
- }), null), k(() => ({
2638
+ }), null), M(() => ({
3172
2639
  e: t.partForName("tokens"),
3173
2640
  t: e("tokens"),
3174
2641
  a: e("tokensTip")
3175
2642
  }), ({ e, t, a: r }, i) => {
3176
- e !== i?.e && I(n, "part", e), t !== i?.t && I(n, "aria-label", t), r !== i?.a && I(o, "title", r);
2643
+ e !== i?.e && z(n, "part", e), t !== i?.t && z(n, "aria-label", t), r !== i?.a && z(a, "title", r);
3177
2644
  }), n;
3178
2645
  }
3179
- branch(e, t = !1) {
3180
- let n = /* @__PURE__ */ u(() => this.tree.nodes.get(e), "node"), r = /* @__PURE__ */ u(() => this.isBranchOpen(e), "isOpen"), i = /* @__PURE__ */ u((t) => this.onBranchFolded(t, e), "onFolded"), a = this;
3181
- var o = Vt(), s = o.firstChild, c = s.nextSibling;
3182
- return I(o, "level", t ? "3" : "4"), I(o, "on-ui-opened", i), I(o, "on-ui-closed", i), F(() => (t) => a.branchSections.set(e, t), o), o._$owner = A(), j(o, O(E, {
2646
+ branch(e, n = !1) {
2647
+ let r = /* @__PURE__ */ t(() => this.tree.nodes.get(e), "node"), i = /* @__PURE__ */ t(() => this.isBranchOpen(e), "isOpen"), a = /* @__PURE__ */ t((t) => this.onBranchFolded(t, e), "onFolded"), o = this;
2648
+ var s = ft(), c = s.firstChild, l = c.nextSibling;
2649
+ return z(s, "level", n ? "3" : "4"), z(s, "on-ui-opened", a), z(s, "on-ui-closed", a), R(() => (t) => o.branchSections.set(e, t), s), s._$owner = N(), P(s, j(k, {
3183
2650
  get when() {
3184
- return t && !e.startsWith(Jr);
2651
+ return n && !e.startsWith(Ir);
3185
2652
  },
3186
2653
  get children() {
3187
- var t = Bt();
3188
- return I(t, "title", e), j(t, () => a.groupCount(e)), t;
2654
+ var t = dt();
2655
+ return z(t, "title", e), P(t, () => o.groupCount(e)), t;
3189
2656
  }
3190
- }), s), j(o, O(E, {
2657
+ }), c), P(s, j(k, {
3191
2658
  get when() {
3192
- return r();
2659
+ return i();
3193
2660
  },
3194
2661
  get children() {
3195
- return [O(E, {
2662
+ return [j(k, {
3196
2663
  get when() {
3197
- return n()?.token;
2664
+ return r()?.token;
3198
2665
  },
3199
2666
  get children() {
3200
- return a.leaf(e);
2667
+ return o.leaf(e);
3201
2668
  }
3202
- }), O(T, {
2669
+ }), j(O, {
3203
2670
  get each() {
3204
- return n()?.children.map((e) => e.id) ?? [];
2671
+ return r()?.children.map((e) => e.id) ?? [];
3205
2672
  },
3206
- children: (e) => a.tree.nodes.get(e)?.children.length ? a.branch(e) : a.leaf(e)
2673
+ children: (e) => o.tree.nodes.get(e)?.children.length ? o.branch(e) : o.leaf(e)
3207
2674
  })];
3208
2675
  }
3209
- }), c), k(() => ({
3210
- e: P(t ? "group" : "branch"),
3211
- t: n()?.name ?? "",
3212
- a: t ? a.headBottom.tokens : void 0,
3213
- o: r() ? "" : "false"
2676
+ }), l), M(() => ({
2677
+ e: L(n ? "group" : "branch"),
2678
+ t: r()?.name ?? "",
2679
+ a: n ? o.headBottom.tokens : void 0,
2680
+ o: i() ? "" : "false"
3214
2681
  }), ({ e, t, a: n, o: r }, i) => {
3215
- D(o, e, i?.e), t !== i?.t && I(o, "label", t), n !== i?.a && I(o, "offset", n), r !== i?.o && I(o, "open", r);
3216
- }), o;
2682
+ A(s, e, i?.e), t !== i?.t && z(s, "label", t), n !== i?.a && z(s, "offset", n), r !== i?.o && z(s, "open", r);
2683
+ }), s;
3217
2684
  }
3218
2685
  groupCount(e) {
3219
2686
  let t = this.groups.find((t) => t.place === e)?.tokens ?? [], n = t.filter((e) => this.isSetHere(e)).length;
@@ -3224,44 +2691,44 @@ ${this.text("usedBy", { tokens: n.join(", ") })}` : ""}`;
3224
2691
  });
3225
2692
  }
3226
2693
  leaf(e) {
3227
- let t = /* @__PURE__ */ u(() => this.tree.nodes.get(e), "node"), n = t()?.token;
3228
- if (!n) return;
3229
- let r = this;
3230
- var i = Ht();
3231
- return I(i, "on-ui-changed", (e) => r.onRowChanged(e)), I(i, "on-ui-command", (e) => r.onRowCommand(e)), i._$owner = A(), k(() => r.rowOf(n, t()?.name ?? n), (e) => {
3232
- I(i, "row", e);
3233
- }), i;
2694
+ let n = /* @__PURE__ */ t(() => this.tree.nodes.get(e), "node"), r = n()?.token;
2695
+ if (!r) return;
2696
+ let i = this;
2697
+ var a = pt();
2698
+ return z(a, "on-ui-changed", (e) => i.onRowChanged(e)), z(a, "on-ui-command", (e) => i.onRowCommand(e)), a._$owner = N(), M(() => i.rowOf(r, n()?.name ?? r), (e) => {
2699
+ z(a, "row", e);
2700
+ }), a;
3234
2701
  }
3235
2702
  headButton(e, t, n) {
3236
2703
  let r = this;
3237
- var i = Ut();
3238
- return i._$$click = () => r.openRow(e, !r.openRows[e]), I(i, "icon", t), I(i, "aria-label", n), I(i, "title", n), i._$owner = A(), k(() => r.openRows[e] ? "true" : "false", (e) => {
3239
- I(i, "aria-pressed", e);
2704
+ var i = mt();
2705
+ return i._$$click = () => r.openRow(e, !r.openRows[e]), z(i, "icon", t), z(i, "aria-label", n), z(i, "title", n), i._$owner = N(), M(() => r.openRows[e] ? "true" : "false", (e) => {
2706
+ z(i, "aria-pressed", e);
3240
2707
  }), i;
3241
2708
  }
3242
2709
  openRow(e, t) {
3243
2710
  this.openRows[e] !== t && (this.openRows = {
3244
2711
  ...this.openRows,
3245
2712
  [e]: t
3246
- }, C.setAt(pi, this.openRows), e === "search" && (t ? _(() => this.findInput?.focus()) : (this.filter = "", this.isSetHereOnly = !1)));
2713
+ }, w.setAt(ti, this.openRows), e === "search" && (t ? ee(() => this.findInput?.focus()) : (this.filter = "", this.isSetHereOnly = !1)));
3247
2714
  }
3248
2715
  toggleAllButton() {
3249
- let e = /* @__PURE__ */ u(() => this.text(this.isAllOpen ? "collapseAll" : "expandAll"), "label"), t = this;
3250
- var n = Wt(), r = n.firstChild.firstChild;
3251
- return n._$$click = () => t.toggleAll(), k(() => ({
2716
+ let e = /* @__PURE__ */ t(() => this.text(this.isAllOpen ? "collapseAll" : "expandAll"), "label"), n = this;
2717
+ var r = ht(), i = r.firstChild.firstChild;
2718
+ return r._$$click = () => n.toggleAll(), M(() => ({
3252
2719
  e: e(),
3253
2720
  t: e(),
3254
- a: t.isAllOpen ? "true" : "false",
3255
- o: t.isAllOpen ? Qr : Zr
3256
- }), ({ e, t, a: i, o: a }, o) => {
3257
- e !== o?.e && I(n, "aria-label", e), t !== o?.t && I(n, "title", t), i !== o?.a && I(n, "aria-pressed", i), a !== o?.o && I(r, "d", a);
3258
- }), n;
2721
+ a: n.isAllOpen ? "true" : "false",
2722
+ o: n.isAllOpen ? Br : zr
2723
+ }), ({ e, t, a: n, o: a }, o) => {
2724
+ e !== o?.e && z(r, "aria-label", e), t !== o?.t && z(r, "title", t), n !== o?.a && z(r, "aria-pressed", n), a !== o?.o && z(i, "d", a);
2725
+ }), r;
3259
2726
  }
3260
2727
  showOnly(e) {
3261
2728
  this.filter = e, this.isFilterFolded = !1, this.isSetHereOnly = !1, this.openRow("search", !0);
3262
2729
  }
3263
- rowOf(e, t) {
3264
- let n = this.text, r = this.tokenEdits[e] !== void 0, i = this.isSetHere(e), a = !r && this.sourceOf(e).setBy === this.baseTheme && !this.draft.sets(e), o = oi.exec(this.writtenNow(e, this.scheme))?.[1], s = this.openToken === e, c = /* @__PURE__ */ u((t) => {
2730
+ rowOf(e, n) {
2731
+ let r = this.text, i = this.tokenEdits[e] !== void 0, a = this.isSetHere(e), o = !i && this.sourceOf(e).setBy === this.baseTheme && !this.draft.sets(e), s = Jr.exec(this.writtenNow(e, this.scheme))?.[1], c = this.openToken === e, l = /* @__PURE__ */ t((t) => {
3265
2732
  let n = this.kindOf(e, t), r = n === "color" ? this.colorOf(e, t) : void 0;
3266
2733
  return {
3267
2734
  text: this.valueOf(e, t),
@@ -3272,62 +2739,62 @@ ${this.text("usedBy", { tokens: n.join(", ") })}` : ""}`;
3272
2739
  }, "valueIn");
3273
2740
  return {
3274
2741
  token: e,
3275
- label: t,
2742
+ label: n,
3276
2743
  nameTip: this.nameTip(e),
3277
2744
  schemes: this.shownSchemes,
3278
2745
  values: {
3279
- light: c("light"),
3280
- dark: c("dark")
2746
+ light: l("light"),
2747
+ dark: l("dark")
3281
2748
  },
3282
- isHere: i,
3283
- isTuned: r,
2749
+ isHere: a,
2750
+ isTuned: i,
3284
2751
  isSplit: this.isSplit(e),
3285
- isOpen: s,
3286
- markTip: i ? n("setHereMark") : n("fromMark", { base: this.parentTitle }),
3287
- resetLabel: r ? n("reset") : a && this.parentTheme ? n("backToBase", { base: this.parentTitle }) : void 0,
3288
- pointer: o ? {
3289
- place: o,
3290
- token: this.files?.tokenAt(o)
2752
+ isOpen: c,
2753
+ markTip: a ? r("setHereMark") : r("fromMark", { base: this.parentTitle }),
2754
+ resetLabel: i ? r("reset") : o && this.parentTheme ? r("backToBase", { base: this.parentTitle }) : void 0,
2755
+ pointer: s ? {
2756
+ place: s,
2757
+ token: this.files?.tokenAt(s)
3291
2758
  } : void 0,
3292
2759
  readers: this.pageIds.filter((t) => this.readers[t]?.reads.has(e)).map((t) => {
3293
- let r = !!this.readers[t]?.overrides.has(e), i = n(r ? "overridesTip" : "readsTip", { place: this.pageOf(t)?.label ?? t });
2760
+ let n = !!this.readers[t]?.overrides.has(e), i = r(n ? "overridesTip" : "readsTip", { place: this.pageOf(t)?.label ?? t });
3294
2761
  return {
3295
2762
  id: t,
3296
2763
  icon: this.pageOf(t)?.icon ?? "file",
3297
2764
  tip: i,
3298
- overrides: r
2765
+ overrides: n
3299
2766
  };
3300
2767
  }),
3301
- options: s ? this.colorPlaces : void 0
2768
+ options: c ? this.colorPlaces : void 0
3302
2769
  };
3303
2770
  }
3304
2771
  writtenNow(e, t) {
3305
2772
  let n = this.tokenEdits[e];
3306
2773
  return n ? ("both" in n ? n.both : n[t]) ?? "" : this.draft.sets(e) ? "" : (t === this.scheme ? this.sourceOf(e) : this.files?.sourceOf(this.baseTheme, e, t))?.written ?? "";
3307
2774
  }
3308
- mixOf(e, t) {
3309
- let n = ai.exec(this.writtenNow(e, t));
3310
- if (!n) return;
3311
- let [, r, i, a] = n, o = /* @__PURE__ */ u((e) => {
3312
- let t = e.trim(), n = oi.exec(t)?.[1];
2775
+ mixOf(e, n) {
2776
+ let r = qr.exec(this.writtenNow(e, n));
2777
+ if (!r) return;
2778
+ let [, i, a, o] = r, s = /* @__PURE__ */ t((e) => {
2779
+ let t = e.trim(), n = Jr.exec(t)?.[1];
3313
2780
  if (n) return n;
3314
- let r = si.exec(t)?.[1];
2781
+ let r = Yr.exec(t)?.[1];
3315
2782
  return r ? this.files?.placeOf(r) ?? t : t;
3316
- }, "placeOf"), s = /* @__PURE__ */ u((e) => {
3317
- let n = this.files?.tokenAt(e);
3318
- return n ? this.valueOf(n, t) : e;
3319
- }, "colorAt"), [c, l] = [o(r), o(a)];
2783
+ }, "placeOf"), c = /* @__PURE__ */ t((e) => {
2784
+ let t = this.files?.tokenAt(e);
2785
+ return t ? this.valueOf(t, n) : e;
2786
+ }, "colorAt"), [l, u] = [s(i), s(o)];
3320
2787
  return {
3321
- mixin: c,
3322
- mixinColor: s(c),
3323
- base: l,
3324
- baseColor: s(l),
3325
- amount: i === void 0 ? mi : Number(i)
2788
+ mixin: l,
2789
+ mixinColor: c(l),
2790
+ base: u,
2791
+ baseColor: c(u),
2792
+ amount: a === void 0 ? ni : Number(a)
3326
2793
  };
3327
2794
  }
3328
2795
  get colorPlaces() {
3329
2796
  let e = this.files;
3330
- return e ? this.tokenList.filter((e) => this.kindOf(e) === "color").map((t) => e.placeOf(t)).filter((e) => !H.halfOf(e)).map((e) => ({
2797
+ return e ? this.tokenList.filter((e) => this.kindOf(e) === "color").map((t) => e.placeOf(t)).filter((e) => !T.halfOf(e)).map((e) => ({
3331
2798
  place: e,
3332
2799
  label: e
3333
2800
  })) : [];
@@ -3348,80 +2815,83 @@ ${this.text("usedBy", { tokens: n.join(", ") })}` : ""}`;
3348
2815
  }
3349
2816
  readersLegend() {
3350
2817
  let e = this.text, t = this;
3351
- var n = Gt(), r = n.firstChild, i = r.nextSibling;
3352
- return i.firstChild, j(r, () => e("readBy")), j(n, O(T, {
2818
+ var n = gt(), r = n.firstChild, i = r.nextSibling;
2819
+ return i.firstChild, P(r, () => e("readBy")), P(n, j(O, {
3353
2820
  get each() {
3354
2821
  return t.pageIds;
3355
2822
  },
3356
2823
  children: (e) => (() => {
3357
- var n = Kt(), r = n.firstChild;
3358
- return r._$owner = A(), j(n, () => t.pageOf(e)?.label, null), k(() => t.pageOf(e)?.icon ?? "file", (e) => {
3359
- I(r, "name", e);
2824
+ var n = _t(), r = n.firstChild;
2825
+ return r._$owner = N(), P(n, () => t.pageOf(e)?.label, null), M(() => t.pageOf(e)?.icon ?? "file", (e) => {
2826
+ z(r, "name", e);
3360
2827
  }), n;
3361
2828
  })()
3362
- }), i), j(i, () => e("overridesLegend"), null), k(() => e("overridesLegendTip"), (e) => {
3363
- I(i, "title", e);
2829
+ }), i), P(i, () => e("overridesLegend"), null), M(() => e("overridesLegendTip"), (e) => {
2830
+ z(i, "title", e);
3364
2831
  }), n;
3365
2832
  }
3366
2833
  changesSection() {
3367
2834
  let e = this.text, t = this;
3368
- var n = Jt(), r = n.firstChild, i = r.nextSibling;
3369
- return n._$owner = A(), j(r, () => t.draft.fileName), i._$$click = () => void t.copy(), i._$owner = A(), j(n, O(E, {
2835
+ var n = yt(), r = n.firstChild, i = r.nextSibling;
2836
+ return n._$owner = N(), P(r, () => t.draft.fileName), i._$$click = () => void t.copy(), i._$owner = N(), P(n, j(k, {
3370
2837
  get when() {
3371
2838
  return t.isChanged;
3372
2839
  },
3373
2840
  get fallback() {
3374
- var n = xt();
3375
- return j(n, () => e("noChanges", { base: a.titleOf(t.baseTheme) })), n;
2841
+ var n = U();
2842
+ return P(n, () => e("noChanges", { base: y.titleOf(t.baseTheme) })), n;
3376
2843
  },
3377
2844
  get children() {
3378
- var e = qt();
3379
- return e._$owner = A(), j(e, () => t.draft.changes), e;
2845
+ var e = vt();
2846
+ return e._$owner = N(), P(e, () => t.draft.changes), e;
3380
2847
  }
3381
- }), null), k(() => ({
2848
+ }), null), M(() => ({
3382
2849
  e: t.partForName("changes"),
3383
2850
  t: e("changes"),
3384
2851
  a: t.headBottom.top,
3385
- o: t.clipboard.isCopied ? Ti : Ei,
2852
+ o: t.clipboard.isCopied ? mi : hi,
3386
2853
  i: t.draft.changes ? void 0 : "",
3387
2854
  n: t.clipboard.isCopied ? e("copied") : e("copy"),
3388
2855
  s: t.clipboard.isCopied ? e("copied") : e("copy")
3389
2856
  }), ({ e, t, a: r, o: a, i: o, n: s, s: c }, l) => {
3390
- e !== l?.e && I(n, "part", e), t !== l?.t && I(n, "label", t), r !== l?.a && I(n, "offset", r), a !== l?.o && I(i, "icon", a), o !== l?.i && I(i, "disabled", o), s !== l?.n && I(i, "aria-label", s), c !== l?.s && I(i, "title", c);
2857
+ e !== l?.e && z(n, "part", e), t !== l?.t && z(n, "label", t), r !== l?.a && z(n, "offset", r), a !== l?.o && z(i, "icon", a), o !== l?.i && z(i, "disabled", o), s !== l?.n && z(i, "aria-label", s), c !== l?.s && z(i, "title", c);
3391
2858
  }), n;
3392
2859
  }
3393
2860
  };
3394
- K = l(or), sr = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), ur = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), fr = /* @__PURE__ */ new WeakMap(), pr = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), _r = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), yr = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), Sr = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), s(K, 4, "edited", rr, J, sr), s(K, 4, "files", nr, J, cr), s(K, 4, "filesError", tr, J, lr), s(K, 1, "loadFiles", er, J), s(K, 2, "draft", $n, J), s(K, 2, "isChanged", Qn, J), s(K, 1, "choose", Zn, J), s(K, 1, "startOver", Xn, J), s(K, 1, "tune", Yn, J), s(K, 1, "split", Jn, J), s(K, 1, "reset", qn, J), s(K, 1, "onShown", Kn, J), s(K, 1, "onDraftChanged", Gn, J), s(K, 1, "onBaseChanged", Wn, J), s(K, 4, "savedCss", Un, J, ur), s(K, 1, "forget", Hn, J), s(K, 1, "copy", Vn, J), s(K, 1, "listenToPages", Bn, J), s(K, 4, "hiddenPages", zn, J, dr), s(K, 4, "pageOrder", Rn, J, fr), s(K, 4, "addressedPages", Ln, J, pr), s(K, 1, "movePage", In, J), s(K, 1, "movePageBy", Fn, J), s(K, 1, "togglePage", Pn, J), s(K, 4, "schemes", Nn, J, mr), s(K, 1, "showSchemes", Mn, J), s(K, 4, "device", jn, J, hr), s(K, 4, "isSwapped", An, J, gr), s(K, 1, "swap", kn, J), s(K, 1, "onViewChanged", On, J), s(K, 4, "looks", Dn, J, _r), s(K, 4, "loaded", En, J, vr), s(K, 4, "cells", Tn, J, yr), s(K, 2, "readers", wn, J), s(K, 1, "onPageLoaded", Cn, J), s(K, 1, "onPageMessage", Sn, J), s(K, 1, "reload", xn, J), s(K, 4, "headBottom", bn, J, br), s(K, 2, "resizer", yn, J), s(K, 4, "filter", vn, J, xr), s(K, 2, "tree", _n, J), s(K, 4, "folds", gn, J, Sr), s(K, 4, "isFilterFolded", hn, J, Cr), s(K, 1, "toggleAll", mn, J), s(K, 4, "isSetHereOnly", pn, J, wr), s(K, 2, "sources", fn, J), s(K, 2, "pointedAt", dn, J), s(K, 1, "setHere", un, J), s(K, 1, "backToParent", ln, J), s(K, 4, "barMore", cn, J, Tr), s(K, 4, "draggedPage", sn, J, Er), s(K, 4, "dropAt", on, J, Dr), s(K, 4, "openRows", an, J, Or), s(K, 1, "openRow", rn, J), s(K, 1, "showOnly", nn, J), s(K, 4, "openToken", tn, J, kr), s(K, 1, "onRowCommand", en, J), s(K, 1, "onRowChanged", $t, J), s(K, 13, "vocabulary", ar, J), s(K, 13, "elementSetup", ir, J), c(K, J), u(J, "UIThemeEditor"), t(J, "vocabulary", h(K, 100, J, rt)), h(K, 103, J), t(J, "elementSetup", h(K, 104, J, {
3395
- styleSheets: { "theme-editor": it },
3396
- DOMElement: Ar,
2861
+ G = se(Hn), Un = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), ur = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), fr = /* @__PURE__ */ new WeakMap(), pr = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), s(G, 4, "edited", zn, q, Un), s(G, 4, "files", Rn, q, Wn), s(G, 4, "filesError", Ln, q, Gn), s(G, 1, "loadFiles", In, q), s(G, 2, "draft", Fn, q), s(G, 2, "isChanged", Pn, q), s(G, 1, "choose", Nn, q), s(G, 1, "startOver", Mn, q), s(G, 1, "tune", jn, q), s(G, 1, "split", An, q), s(G, 1, "reset", kn, q), s(G, 1, "onShown", On, q), s(G, 1, "onDraftChanged", Dn, q), s(G, 1, "onBaseChanged", En, q), s(G, 4, "myThemes", Tn, q, Kn), s(G, 4, "editingId", wn, q, qn), s(G, 1, "save", Cn, q), s(G, 1, "saveAsNew", Sn, q), s(G, 1, "remove", xn, q), s(G, 1, "open", bn, q), s(G, 1, "startFrom", yn, q), s(G, 2, "exportHref", vn, q), s(G, 4, "importError", _n, q, Jn), s(G, 1, "importFile", gn, q), s(G, 4, "canSaveIntoSpellUi", hn, q, Yn), s(G, 4, "spellUiNote", mn, q, Xn), s(G, 1, "askSpellUi", pn, q), s(G, 1, "saveIntoSpellUi", fn, q), s(G, 1, "copy", dn, q), s(G, 1, "listenToPages", un, q), s(G, 4, "hiddenPages", ln, q, Zn), s(G, 4, "pageOrder", cn, q, Qn), s(G, 4, "addressedPages", sn, q, $n), s(G, 1, "movePage", on, q), s(G, 1, "movePageBy", an, q), s(G, 4, "schemes", rn, q, er), s(G, 1, "showSchemes", nn, q), s(G, 4, "device", tn, q, tr), s(G, 4, "isSwapped", en, q, nr), s(G, 1, "swap", $t, q), s(G, 1, "onViewChanged", Qt, q), s(G, 4, "looks", Zt, q, rr), s(G, 4, "loaded", Xt, q, ir), s(G, 4, "cells", Yt, q, ar), s(G, 2, "readers", Jt, q), s(G, 1, "onPageLoaded", qt, q), s(G, 1, "onPageMessage", Kt, q), s(G, 1, "reload", Gt, q), s(G, 4, "headBottom", Wt, q, or), s(G, 2, "resizer", Ut, q), s(G, 4, "filter", Ht, q, sr), s(G, 2, "tree", Vt, q), s(G, 4, "folds", Bt, q, cr), s(G, 4, "isFilterFolded", zt, q, lr), s(G, 1, "toggleAll", Rt, q), s(G, 4, "isSetHereOnly", Lt, q, ur), s(G, 2, "sources", It, q), s(G, 2, "pointedAt", Ft, q), s(G, 1, "setHere", Pt, q), s(G, 1, "backToParent", Nt, q), s(G, 4, "barMore", Mt, q, dr), s(G, 4, "draggedPage", jt, q, fr), s(G, 4, "dropAt", At, q, pr), s(G, 4, "openRows", kt, q, mr), s(G, 1, "openRow", Ot, q), s(G, 1, "showOnly", Dt, q), s(G, 4, "openToken", Et, q, hr), s(G, 1, "onRowCommand", Tt, q), s(G, 1, "onRowChanged", wt, q), s(G, 13, "vocabulary", Vn, q), s(G, 13, "elementSetup", Bn, q), l(G, q), t(q, "UIThemeEditor"), o(q, "vocabulary", p(G, 116, q, Oe)), p(G, 119, q), o(q, "elementSetup", p(G, 120, q, {
2862
+ styleSheets: {
2863
+ "theme-editor": ke,
2864
+ "hue-dropdown": le.css
2865
+ },
2866
+ DOMElement: gr,
3397
2867
  delegatesFocus: !1
3398
- })), h(K, 107, J);
3399
- var jr = J, Mr = "spell/ui/core", Nr = {
2868
+ })), p(G, 123, q);
2869
+ var _r = q, vr = "spell/ui/core", yr = {
3400
2870
  theme: !0,
3401
2871
  scheme: !0,
3402
2872
  css: !0,
3403
2873
  fullMonty: !0,
3404
2874
  look: !0
3405
- }, Pr = "fruity", Fr = "spell-ui:theme-draft", Ir = "spell-ui:theme-editor-folds", Lr = "spell-ui:theme-editor-hidden-pages", Rr = "spell-ui:theme-editor-page-order", zr = "swap", Br = "spell-ui:theme-editor-swapped", Vr = [
2875
+ }, br = "fruity", xr = "spell-ui:theme-draft", Sr = "spell-ui:theme-editing", Cr = "/api/themes/spell-ui", wr = "spell-ui:theme-editor-folds", Tr = "spell-ui:theme-editor-hidden-pages", Er = "spell-ui:theme-editor-page-order", Dr = "swap", Or = "spell-ui:theme-editor-swapped", kr = [
3406
2876
  "light",
3407
2877
  "dark",
3408
2878
  "both"
3409
- ], Hr = ["light", "dark"], Ur = "spell-ui:theme-editor-schemes";
2879
+ ], Ar = ["light", "dark"], jr = "spell-ui:theme-editor-schemes";
3410
2880
  function frameKey(e, t) {
3411
2881
  return `${e}:${t}`;
3412
2882
  }
3413
- u(frameKey, "frameKey");
2883
+ t(frameKey, "frameKey");
3414
2884
  function splitKey(e) {
3415
2885
  let t = e.lastIndexOf(":");
3416
2886
  return [e.slice(0, t), e.slice(t + 1)];
3417
2887
  }
3418
- u(splitKey, "splitKey");
2888
+ t(splitKey, "splitKey");
3419
2889
  function otherLoopback(e) {
3420
2890
  let t = new URL(e, location.href);
3421
- return t.hostname = t.hostname === Gr ? Kr : Gr, t.href;
2891
+ return t.hostname = t.hostname === Nr ? Pr : Nr, t.href;
3422
2892
  }
3423
- u(otherLoopback, "otherLoopback");
3424
- var Wr = "about:blank", Gr = "localhost", Kr = "127.0.0.1", qr = "own", Jr = "page.", Yr = {
2893
+ t(otherLoopback, "otherLoopback");
2894
+ var Mr = "about:blank", Nr = "localhost", Pr = "127.0.0.1", Fr = "own", Ir = "page.", Lr = {
3425
2895
  own: "groupOwn",
3426
2896
  typography: "groupTypography",
3427
2897
  sizes: "groupSizes",
@@ -3434,16 +2904,17 @@ var Wr = "about:blank", Gr = "localhost", Kr = "127.0.0.1", qr = "own", Jr = "pa
3434
2904
  semantic: "groupSemantic",
3435
2905
  hues: "groupHues",
3436
2906
  shadows: "groupShadows",
2907
+ code: "groupCode",
3437
2908
  motion: "groupMotion",
3438
2909
  components: "groupComponents"
3439
- }, Xr = /var\(\s*(--[\w-]+)\s*(?:,[^()]*)?\)/g, Zr = "M4 3.5 8 7.5 12 3.5M4 7.5 8 11.5 12 7.5", Qr = "M4 8.5 8 4.5 12 8.5M4 12.5 8 8.5 12 12.5", $r = "●", ei = "○", ti = "↳", ni = "ƒ", ri = { kind: "plain" }, ii = ["light", "dark"], ai = /^color-mix\(in [\w-]+(?:\s+[\w-]+)?,\s*(.+?)(?:\s+([\d.]+)%)?\s*,\s*(.+?)(?:\s+[\d.]+%)?\s*\)$/, oi = /^\{([\w.-]+)\}$/, si = /^var\((--[\w-]+)\)$/, ci = {
2910
+ }, Rr = /var\(\s*(--[\w-]+)\s*(?:,[^()]*)?\)/g, zr = "M4 3.5 8 7.5 12 3.5M4 7.5 8 11.5 12 7.5", Br = "M4 8.5 8 4.5 12 8.5M4 12.5 8 8.5 12 12.5", Vr = "●", Hr = "○", Ur = "↳", Wr = "ƒ", Gr = { kind: "plain" }, Kr = ["light", "dark"], qr = /^color-mix\(in [\w-]+(?:\s+[\w-]+)?,\s*(.+?)(?:\s+([\d.]+)%)?\s*,\s*(.+?)(?:\s+[\d.]+%)?\s*\)$/, Jr = /^\{([\w.-]+)\}$/, Yr = /^var\((--[\w-]+)\)$/, Xr = {
3440
2911
  primary: "--ui-primary",
3441
2912
  secondary: "--ui-secondary",
3442
2913
  background: "--ui-background"
3443
- }, li = {
2914
+ }, Zr = {
3444
2915
  headingFont: "--ui-font-family-heading",
3445
2916
  bodyFont: "--ui-font-family"
3446
- }, ui = "basics.", di = /^(?:system-ui|-apple-system|BlinkMacSystemFont)$/i, fi = 8, pi = "spell-ui:theme-editor-head", mi = 50, hi = 240, gi = /^-?\d+(?:\.\d+)?px$/, _i = 100, vi = "#000000", Y = "own", yi = "--ui-font-size", bi = 16, xi = 1.5, Si = 12, Ci = .1, wi = 50, Ti = "check", Ei = "copy outline", Di = "undo", Oi = [
2917
+ }, Qr = "basics.", $r = /^(?:system-ui|-apple-system|BlinkMacSystemFont)$/i, ei = 8, ti = "spell-ui:theme-editor-head", ni = 50, ri = 240, ii = /^-?\d+(?:\.\d+)?px$/, ai = 100, oi = "#000000", J = "own", si = "small", ci = "--ui-font-size", li = 16, ui = 1.5, di = 12, fi = .1, pi = 50, mi = "check", hi = "copy outline", gi = "undo", _i = [
3447
2918
  "ui-changed",
3448
2919
  "ui-typed",
3449
2920
  "ui-moved",
@@ -3456,13 +2927,14 @@ var Wr = "about:blank", Gr = "localhost", Kr = "127.0.0.1", qr = "own", Jr = "pa
3456
2927
  "ui-closed"
3457
2928
  ];
3458
2929
  function stopInner(e) {
3459
- for (let t of Oi) e.addEventListener(t, (e) => e.stopPropagation());
2930
+ for (let t of _i) e.addEventListener(t, (e) => e.stopPropagation());
3460
2931
  }
3461
- u(stopInner, "stopInner"), fe(["click", "keydown"]);
2932
+ t(stopInner, "stopInner"), ve(["click", "keydown"]);
3462
2933
  //#endregion
3463
2934
  //#region src/components/ui-theme-editor/UIThemeToken.en.ts
3464
- var ki = {
2935
+ var vi = {
3465
2936
  tag: "ui-theme-token",
2937
+ icon: "tint",
3466
2938
  topics: ["forms", "controls"],
3467
2939
  aka: [
3468
2940
  "theme token",
@@ -3582,9 +3054,9 @@ var ki = {
3582
3054
  description: "`transparent`, as a mix's base."
3583
3055
  }
3584
3056
  ]
3585
- }, Ai = "@layer ui.components.theme-token.types{:host{--_ui-theme-token-gap:var(--ui-theme-token-gap,20px);display:block}}@layer ui.components.theme-token.content{.theme-token{gap:4px;padding:6px 8px;display:grid}:host(:not(:state(here))) .theme-token:not(:hover) :is(.name,.values,.pointer){opacity:.6}.head{align-items:center;gap:6px;min-height:24px;display:flex}.mark{text-align:center;flex:none;width:1em;font-size:.8em;line-height:1}.mark.set{color:var(--ui-primary-text,var(--ui-primary))}.mark.from{color:var(--ui-text-muted)}.name{min-width:0;font:inherit;font-family:var(--ui-font-family-mono,monospace);color:inherit;text-align:start;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background:0 0;border:0;margin-inline-end:auto;padding:0;font-size:.85em;overflow:hidden}.name:hover,.open .name{color:var(--ui-link,var(--ui-primary))}.name:focus-visible,.link:focus-visible{outline:2px solid var(--ui-focus-color,var(--ui-link));outline-offset:1px}.readers{flex:none;gap:2px;display:inline-flex}.reader{width:22px;height:22px;color:var(--ui-primary-text,var(--ui-primary));background:var(--ui-primary-background,transparent);border-radius:6px;justify-content:center;align-items:center;display:inline-flex;position:relative}.reader ui-icon{--ui-icon-width:auto;margin:0;font-size:.8em}.reader.overrides:after{content:\"\";box-sizing:border-box;border:1.5px solid var(--ui-warning-text,#b45309);background:linear-gradient(90deg, var(--ui-warning-text,#b45309) 50%, var(--ui-surface) 50%);border-radius:50%;width:9px;height:9px;position:absolute;inset:auto -2px -2px auto}.tool{opacity:.55;flex:none}.theme-token:hover .tool,.tool:focus-within{opacity:1}.values{align-items:center;gap:4px var(--_ui-theme-token-gap);flex-wrap:wrap;padding-inline-start:1.1em;display:flex}.value{align-items:center;gap:5px;min-width:0;display:inline-flex}.mix{color:var(--ui-text-muted);align-items:center;gap:5px;font-size:.85em;display:inline-flex}.amount{font-variant-numeric:tabular-nums;color:var(--ui-text-muted);font-size:.85em}.text{text-overflow:ellipsis;white-space:nowrap;font-size:.8em;overflow:hidden}.pointer{color:var(--ui-text-muted);align-items:baseline;gap:6px;padding-inline-start:1.1em;font-size:.8em;display:flex}.link{font:inherit;font-family:var(--ui-font-family-mono,monospace);color:var(--ui-link,var(--ui-primary));cursor:pointer;background:0 0;border:0;padding:0}.link:hover{text-decoration:underline}.drawer{background:var(--ui-surface-muted,transparent);border:1px solid var(--ui-border-color-internal,var(--ui-border-color));border-radius:8px;gap:8px;margin:0 8px 8px 1.6em;padding:10px;display:grid}.mix-editor,.pointer-editor{gap:8px;display:grid}.field{grid-template-columns:6em minmax(0,1fr);align-items:center;gap:8px;display:grid}.amount-field{grid-template-columns:6em minmax(0,1fr) 3em}.amount-field .amount{text-align:end}.field-label{color:var(--ui-text-muted);font-size:.8em;font-weight:600}.value-editor{grid-template-columns:minmax(0,1fr);align-items:center;gap:6px;display:grid}.value-editor.color{grid-template-columns:32px calc(8ch + 1.6em) minmax(0,1fr) 3.2em;gap:8px}.value-editor.apart{grid-template-columns:auto minmax(0,1fr)}.value-editor.color.apart{grid-template-columns:auto 32px calc(8ch + 1.6em) minmax(0,1fr) 3.2em}.value-editor.length.apart{grid-template-columns:auto 7em minmax(0,1fr)}.scheme{--ui-icon-width:1em;color:var(--ui-text-muted);margin:0}.value-editor.length{grid-template-columns:7em minmax(0,1fr)}.picker::part(control){block-size:28px;inline-size:32px}.hex::part(control){font-family:var(--ui-font-family-mono,monospace);padding-inline:.5em}.value-editor.length ui-input::part(control){text-align:end;font-variant-numeric:tabular-nums}.percent{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ui-text-muted);font-size:.85em}}", ji = /* @__PURE__ */ R("<div class=pointer><span class=pointer-mark aria-hidden=true>"), Mi = /* @__PURE__ */ R("<div class=\"ui theme-token\"><div class=values></div><!>"), Ni = /* @__PURE__ */ R("<ui-button class=tool size=mini appearance=basic>", 1), Pi = /* @__PURE__ */ R("<ui-button class=tool size=mini appearance=\"basic circular\"icon=columns>", 1), Fi = /* @__PURE__ */ R("<ui-button class=tool size=mini appearance=\"basic circular\"icon=undo>", 1), Ii = /* @__PURE__ */ R("<div class=head><span></span><button type=button class=name></button><!><!><span class=readers role=list>"), Li = /* @__PURE__ */ R("<span class=reader role=listitem><ui-icon aria-hidden=true>", 1), Ri = /* @__PURE__ */ R("<ui-color-chip>", 1), zi = /* @__PURE__ */ R("<span class=mix><span aria-hidden=true>=</span><ui-color-chip></ui-color-chip><span aria-hidden=true>+</span><ui-color-chip></ui-color-chip><span class=amount>%", 1), Bi = /* @__PURE__ */ R("<span>"), Vi = /* @__PURE__ */ R("<code class=text>"), Hi = /* @__PURE__ */ R("<button type=button class=link>"), Ui = /* @__PURE__ */ R("<div class=drawer>"), Wi = /* @__PURE__ */ R("<div class=mix-editor><label class=\"field amount-field\"><span class=field-label></span><ui-slider min=0 step=1></ui-slider><span class=amount>%</span></label><!><!>", 1), Gi = /* @__PURE__ */ R("<div class=pointer-editor><ui-button size=mini appearance=basic>", 1), Ki = /* @__PURE__ */ R("<label class=field><span class=field-label></span><ui-select size=small fluid><ui-item>", 1), qi = /* @__PURE__ */ R("<ui-item>", 1), Ji = /* @__PURE__ */ R("<ui-icon class=scheme>", 1), Yi = /* @__PURE__ */ R("<ui-input class=picker type=color size=small>", 1), Xi = /* @__PURE__ */ R("<ui-input class=hex size=small>", 1), Zi = /* @__PURE__ */ R("<ui-slider class=opacity min=0 step=1>", 1), Qi = /* @__PURE__ */ R("<span class=percent>%"), $i = /* @__PURE__ */ R("<div><!><!>"), ea = /* @__PURE__ */ R("<ui-input size=small fluid>", 1), ta = /* @__PURE__ */ R("<ui-slider min=0 step=1>", 1), na, ra, ia, aa, oa, sa, ca, X, Z = class _UIThemeToken extends (ca = m, sa = [ie], oa = [ae], aa = [v("here")], ia = [v("open")], ra = [x], na = [x], ca) {
3057
+ }, yi = "@layer ui.components.theme-token.types{:host{--_ui-theme-token-gap:var(--ui-theme-token-gap,20px);display:block}}@layer ui.components.theme-token.content{.theme-token{gap:4px;padding:6px 8px;display:grid}:host(:not(:state(here))) .theme-token:not(:hover) :is(.name,.values,.pointer){opacity:.6}.head{align-items:center;gap:6px;min-height:24px;display:flex}.mark{text-align:center;flex:none;width:1em;font-size:.8em;line-height:1}.mark.set{color:var(--ui-primary-text,var(--ui-primary))}.mark.from{color:var(--ui-text-muted)}.name{min-width:0;font:inherit;font-family:var(--ui-font-family-mono,monospace);color:inherit;text-align:start;text-overflow:ellipsis;white-space:nowrap;cursor:var(--ui-control-cursor);background:0 0;border:0;margin-inline-end:auto;padding:0;font-size:.85em;overflow:hidden}.name:hover,.open .name{color:var(--ui-link,var(--ui-primary))}.name:focus-visible,.link:focus-visible{outline:2px solid var(--ui-focus-color,var(--ui-link));outline-offset:1px}.readers{flex:none;gap:2px;display:inline-flex}.reader{width:22px;height:22px;color:var(--ui-primary-text,var(--ui-primary));background:var(--ui-primary-background,transparent);border-radius:6px;justify-content:center;align-items:center;display:inline-flex;position:relative}.reader ui-icon{--ui-icon-width:auto;margin:0;font-size:.8em}.reader.overrides:after{content:\"\";box-sizing:border-box;border:1.5px solid var(--ui-warning-text,#b45309);background:linear-gradient(90deg, var(--ui-warning-text,#b45309) 50%, var(--ui-surface) 50%);border-radius:50%;width:9px;height:9px;position:absolute;inset:auto -2px -2px auto}.tool{opacity:.55;flex:none}.theme-token:hover .tool,.tool:focus-within{opacity:1}.values{align-items:center;gap:4px var(--_ui-theme-token-gap);flex-wrap:wrap;padding-inline-start:1.1em;display:flex}.value{align-items:center;gap:5px;min-width:0;display:inline-flex}.mix{color:var(--ui-text-muted);align-items:center;gap:5px;font-size:.85em;display:inline-flex}.amount{font-variant-numeric:tabular-nums;color:var(--ui-text-muted);font-size:.85em}.text{text-overflow:ellipsis;white-space:nowrap;font-size:.8em;overflow:hidden}.pointer{color:var(--ui-text-muted);align-items:baseline;gap:6px;padding-inline-start:1.1em;font-size:.8em;display:flex}.link{font:inherit;font-family:var(--ui-font-family-mono,monospace);color:var(--ui-link,var(--ui-primary));cursor:var(--ui-control-cursor);background:0 0;border:0;padding:0}.link:hover{text-decoration:underline}.drawer{background:var(--ui-surface-muted,transparent);border:1px solid var(--ui-border-color-internal,var(--ui-border-color));border-radius:8px;gap:8px;margin:0 8px 8px 1.6em;padding:10px;display:grid}.mix-editor,.pointer-editor{gap:8px;display:grid}.field{grid-template-columns:6em minmax(0,1fr);align-items:center;gap:8px;display:grid}.amount-field{grid-template-columns:6em minmax(0,1fr) 3em}.amount-field .amount{text-align:end}.field-label{color:var(--ui-text-muted);font-size:.8em;font-weight:600}.value-editor{grid-template-columns:minmax(0,1fr);align-items:center;gap:6px;display:grid}.value-editor.color{grid-template-columns:32px calc(8ch + 1.6em) minmax(0,1fr) 3.2em;gap:8px}.value-editor.apart{grid-template-columns:auto minmax(0,1fr)}.value-editor.color.apart{grid-template-columns:auto 32px calc(8ch + 1.6em) minmax(0,1fr) 3.2em}.value-editor.length.apart{grid-template-columns:auto 7em minmax(0,1fr)}.scheme{--ui-icon-width:1em;color:var(--ui-text-muted);margin:0}.value-editor.length{grid-template-columns:7em minmax(0,1fr)}.picker::part(control){block-size:28px;inline-size:32px}.hex::part(control){font-family:var(--ui-font-family-mono,monospace);padding-inline:.5em}.value-editor.length ui-input::part(control){text-align:end;font-variant-numeric:tabular-nums}.percent{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ui-text-muted);font-size:.85em}}", bi = /* @__PURE__ */ B("<div class=pointer><span class=pointer-mark aria-hidden=true>"), xi = /* @__PURE__ */ B("<div class=\"ui theme-token\"><div class=values></div><!>"), Si = /* @__PURE__ */ B("<ui-button class=tool size=mini appearance=basic>", 1), Ci = /* @__PURE__ */ B("<ui-button class=tool size=mini appearance=\"basic circular\"icon=columns>", 1), wi = /* @__PURE__ */ B("<ui-button class=tool size=mini appearance=\"basic circular\"icon=undo>", 1), Ti = /* @__PURE__ */ B("<div class=head><span></span><button type=button class=name></button><!><!><span class=readers role=list>"), Ei = /* @__PURE__ */ B("<span class=reader role=listitem><ui-icon aria-hidden=true>", 1), Di = /* @__PURE__ */ B("<ui-color-chip>", 1), Oi = /* @__PURE__ */ B("<span class=mix><span aria-hidden=true>=</span><ui-color-chip></ui-color-chip><span aria-hidden=true>+</span><ui-color-chip></ui-color-chip><span class=amount>%", 1), ki = /* @__PURE__ */ B("<span>"), Ai = /* @__PURE__ */ B("<code class=text>"), ji = /* @__PURE__ */ B("<button type=button class=link>"), Mi = /* @__PURE__ */ B("<div class=drawer>"), Ni = /* @__PURE__ */ B("<div class=mix-editor><label class=\"field amount-field\"><span class=field-label></span><ui-slider min=0 step=1></ui-slider><span class=amount>%</span></label><!><!>", 1), Pi = /* @__PURE__ */ B("<div class=pointer-editor><ui-button size=mini appearance=basic>", 1), Fi = /* @__PURE__ */ B("<label class=field><span class=field-label></span><ui-select size=small fluid><ui-item>", 1), Ii = /* @__PURE__ */ B("<ui-item>", 1), Li = /* @__PURE__ */ B("<ui-icon class=scheme>", 1), Ri = /* @__PURE__ */ B("<ui-input class=picker type=color size=small>", 1), zi = /* @__PURE__ */ B("<ui-input class=hex size=small>", 1), Bi = /* @__PURE__ */ B("<ui-slider class=opacity min=0 step=1>", 1), Vi = /* @__PURE__ */ B("<span class=percent>%"), Hi = /* @__PURE__ */ B("<div><!><!>"), Ui = /* @__PURE__ */ B("<ui-input size=small fluid>", 1), Wi = /* @__PURE__ */ B("<ui-slider min=0 step=1>", 1), Gi, Ki, qi, Ji, Yi, Xi, Zi, Y, X = class _UIThemeToken extends (Zi = f, Xi = [ne], Yi = [re], Ji = [_("here")], qi = [_("open")], Ki = [C], Gi = [C], Zi) {
3586
3058
  constructor() {
3587
- super(...arguments), h(X, 5, this);
3059
+ super(...arguments), p(Y, 5, this);
3588
3060
  }
3589
3061
  get data() {
3590
3062
  let e = this.row;
@@ -3624,34 +3096,34 @@ var ki = {
3624
3096
  }
3625
3097
  render() {
3626
3098
  let e = this;
3627
- return O(E, {
3099
+ return j(k, {
3628
3100
  get when() {
3629
3101
  return e.data;
3630
3102
  },
3631
3103
  get children() {
3632
3104
  return [(() => {
3633
- var t = Mi(), n = t.firstChild, r = n.nextSibling;
3634
- return j(t, () => e.head(), n), j(n, O(T, {
3105
+ var t = xi(), n = t.firstChild, r = n.nextSibling;
3106
+ return P(t, () => e.head(), n), P(n, j(O, {
3635
3107
  get each() {
3636
3108
  return e.shownSchemes;
3637
3109
  },
3638
3110
  children: (t) => e.value(t)
3639
- })), j(t, O(E, {
3111
+ })), P(t, j(k, {
3640
3112
  get when() {
3641
- return N(() => !!e.data.pointer)() ? !e.isOpen : e.data.pointer;
3113
+ return I(() => !!e.data.pointer)() ? !e.isOpen : e.data.pointer;
3642
3114
  },
3643
3115
  get children() {
3644
- var t = ji(), n = t.firstChild;
3645
- return j(n, fa), j(t, () => e.link(e.data.pointer.place), null), t;
3116
+ var t = bi(), n = t.firstChild;
3117
+ return P(n, ta), P(t, () => e.link(e.data.pointer.place), null), t;
3646
3118
  }
3647
- }), r), k(() => ({
3119
+ }), r), M(() => ({
3648
3120
  e: !!e.isHere,
3649
3121
  t: !!e.isOpen,
3650
3122
  a: e.partForName("row")
3651
3123
  }), ({ e, t: n, a: r }, i) => {
3652
- e !== i?.e && t.classList.toggle("here", e), n !== i?.t && t.classList.toggle("open", n), r !== i?.a && I(t, "part", r);
3124
+ e !== i?.e && t.classList.toggle("here", e), n !== i?.t && t.classList.toggle("open", n), r !== i?.a && z(t, "part", r);
3653
3125
  }), t;
3654
- })(), O(E, {
3126
+ })(), j(k, {
3655
3127
  get when() {
3656
3128
  return e.isOpen;
3657
3129
  },
@@ -3663,230 +3135,230 @@ var ki = {
3663
3135
  });
3664
3136
  }
3665
3137
  head() {
3666
- let e = /* @__PURE__ */ u(() => this.data, "row"), t = /* @__PURE__ */ u((e, t) => this.text(e, t), "t"), n = this;
3667
- var r = Ii(), i = r.firstChild, a = i.nextSibling, o = a.nextSibling, s = o.nextSibling, c = s.nextSibling;
3668
- return j(i, () => e().isHere ? ua : da), a._$$click = () => n.command("open"), j(a, () => e().label), j(r, O(E, {
3138
+ let e = /* @__PURE__ */ t(() => this.data, "row"), n = /* @__PURE__ */ t((e, t) => this.text(e, t), "t"), r = this;
3139
+ var i = Ti(), a = i.firstChild, o = a.nextSibling, s = o.nextSibling, c = s.nextSibling, l = c.nextSibling;
3140
+ return P(a, () => e().isHere ? $i : ea), o._$$click = () => r.command("open"), P(o, () => e().label), P(i, j(k, {
3669
3141
  get when() {
3670
3142
  return !e().isHere;
3671
3143
  },
3672
3144
  get children() {
3673
- var e = Ni();
3674
- return e._$$click = () => n.command("set here"), e._$owner = A(), j(e, () => t("setHere")), k(() => t("setHereTip"), (t) => {
3675
- I(e, "title", t);
3145
+ var e = Si();
3146
+ return e._$$click = () => r.command("set here"), e._$owner = N(), P(e, () => n("setHere")), M(() => n("setHereTip"), (t) => {
3147
+ z(e, "title", t);
3676
3148
  }), e;
3677
3149
  }
3678
- }), o), j(r, O(E, {
3150
+ }), s), P(i, j(k, {
3679
3151
  get when() {
3680
- return N(() => !e().isSplit)() && !e().values.light.mix;
3152
+ return I(() => !e().isSplit)() && !e().values.light.mix;
3681
3153
  },
3682
3154
  get children() {
3683
- var e = Pi();
3684
- return e._$$click = () => n.command("split"), e._$owner = A(), k(() => ({
3685
- e: t("split"),
3686
- t: t("split")
3155
+ var e = Ci();
3156
+ return e._$$click = () => r.command("split"), e._$owner = N(), M(() => ({
3157
+ e: n("split"),
3158
+ t: n("split")
3687
3159
  }), ({ e: t, t: n }, r) => {
3688
- t !== r?.e && I(e, "aria-label", t), n !== r?.t && I(e, "title", n);
3160
+ t !== r?.e && z(e, "aria-label", t), n !== r?.t && z(e, "title", n);
3689
3161
  }), e;
3690
3162
  }
3691
- }), s), j(r, O(E, {
3163
+ }), c), P(i, j(k, {
3692
3164
  get when() {
3693
3165
  return e().resetLabel;
3694
3166
  },
3695
3167
  get children() {
3696
- var t = Fi();
3697
- return t._$$click = () => n.command("reset"), t._$owner = A(), k(() => ({
3168
+ var t = wi();
3169
+ return t._$$click = () => r.command("reset"), t._$owner = N(), M(() => ({
3698
3170
  e: e().resetLabel,
3699
3171
  t: e().resetLabel
3700
3172
  }), ({ e, t: n }, r) => {
3701
- e !== r?.e && I(t, "aria-label", e), n !== r?.t && I(t, "title", n);
3173
+ e !== r?.e && z(t, "aria-label", e), n !== r?.t && z(t, "title", n);
3702
3174
  }), t;
3703
3175
  }
3704
- }), c), j(c, O(T, {
3176
+ }), l), P(l, j(O, {
3705
3177
  get each() {
3706
3178
  return e().readers;
3707
3179
  },
3708
3180
  children: (e) => (() => {
3709
- var t = Li(), n = t.firstChild;
3710
- return n._$owner = A(), k(() => ({
3181
+ var t = Ei(), n = t.firstChild;
3182
+ return n._$owner = N(), M(() => ({
3711
3183
  e: !!e.overrides,
3712
3184
  t: e.tip,
3713
3185
  a: e.icon
3714
3186
  }), ({ e, t: r, a: i }, a) => {
3715
- e !== a?.e && t.classList.toggle("overrides", e), r !== a?.t && I(t, "title", r), i !== a?.a && I(n, "name", i);
3187
+ e !== a?.e && t.classList.toggle("overrides", e), r !== a?.t && z(t, "title", r), i !== a?.a && z(n, "name", i);
3716
3188
  }), t;
3717
3189
  })()
3718
- })), k(() => ({
3719
- e: P(["mark", e().isHere ? "set" : "from"]),
3190
+ })), M(() => ({
3191
+ e: L(["mark", e().isHere ? "set" : "from"]),
3720
3192
  t: e().markTip,
3721
3193
  a: e().markTip,
3722
3194
  o: e().nameTip,
3723
- i: t("edit", { token: e().token }),
3195
+ i: n("edit", { token: e().token }),
3724
3196
  n: e().isOpen ? "true" : "false",
3725
- s: t("readBy")
3726
- }), ({ e, t, a: n, o: r, i: o, n: s, s: l }, u) => {
3727
- D(i, e, u?.e), t !== u?.t && I(i, "title", t), n !== u?.a && I(i, "aria-label", n), r !== u?.o && I(a, "title", r), o !== u?.i && I(a, "aria-label", o), s !== u?.n && I(a, "aria-expanded", s), l !== u?.s && I(c, "aria-label", l);
3728
- }), r;
3197
+ s: n("readBy")
3198
+ }), ({ e, t, a: n, o: r, i, n: s, s: c }, u) => {
3199
+ A(a, e, u?.e), t !== u?.t && z(a, "title", t), n !== u?.a && z(a, "aria-label", n), r !== u?.o && z(o, "title", r), i !== u?.i && z(o, "aria-label", i), s !== u?.n && z(o, "aria-expanded", s), c !== u?.s && z(l, "aria-label", c);
3200
+ }), i;
3729
3201
  }
3730
3202
  value(e) {
3731
- let t = /* @__PURE__ */ u(() => this.data.values[e], "value"), n = this;
3732
- var r = Bi();
3733
- return j(r, O(E, {
3203
+ let n = /* @__PURE__ */ t(() => this.data.values[e], "value"), r = this;
3204
+ var i = ki();
3205
+ return P(i, j(k, {
3734
3206
  get when() {
3735
- return t().kind === "color";
3207
+ return n().kind === "color";
3736
3208
  },
3737
3209
  get fallback() {
3738
- var e = Vi();
3739
- return j(e, () => t().text), e;
3210
+ var e = Ai();
3211
+ return P(e, () => n().text), e;
3740
3212
  },
3741
3213
  get children() {
3742
3214
  return [(() => {
3743
- var r = Ri();
3744
- return I(r, "scheme", e), r._$owner = A(), k(() => ({
3745
- e: t().text,
3746
- t: n.text(e)
3747
- }), ({ e, t }, n) => {
3748
- e !== n?.e && I(r, "color", e), t !== n?.t && I(r, "label", t);
3749
- }), r;
3750
- })(), O(E, {
3215
+ var t = Di();
3216
+ return z(t, "scheme", e), t._$owner = N(), M(() => ({
3217
+ e: n().text,
3218
+ t: r.text(e)
3219
+ }), ({ e, t: n }, r) => {
3220
+ e !== r?.e && z(t, "color", e), n !== r?.t && z(t, "label", n);
3221
+ }), t;
3222
+ })(), j(k, {
3751
3223
  get when() {
3752
- return t().mix;
3224
+ return n().mix;
3753
3225
  },
3754
3226
  get children() {
3755
- var r = zi(), i = r.firstChild.nextSibling, a = i.nextSibling.nextSibling, o = a.nextSibling, s = o.firstChild;
3756
- return I(i, "scheme", e), i._$owner = A(), I(a, "scheme", e), a._$owner = A(), j(o, () => t().mix.amount, s), k(() => ({
3757
- e: t().mix.baseColor,
3758
- t: n.colorName(t().mix.base),
3759
- a: t().mix.mixinColor,
3760
- o: n.colorName(t().mix.mixin)
3227
+ var t = Oi(), i = t.firstChild.nextSibling, a = i.nextSibling.nextSibling, o = a.nextSibling, s = o.firstChild;
3228
+ return z(i, "scheme", e), i._$owner = N(), z(a, "scheme", e), a._$owner = N(), P(o, () => n().mix.amount, s), M(() => ({
3229
+ e: n().mix.baseColor,
3230
+ t: r.colorName(n().mix.base),
3231
+ a: n().mix.mixinColor,
3232
+ o: r.colorName(n().mix.mixin)
3761
3233
  }), ({ e, t, a: n, o: r }, o) => {
3762
- e !== o?.e && I(i, "color", e), t !== o?.t && I(i, "label", t), n !== o?.a && I(a, "color", n), r !== o?.o && I(a, "label", r);
3763
- }), r;
3234
+ e !== o?.e && z(i, "color", e), t !== o?.t && z(i, "label", t), n !== o?.a && z(a, "color", n), r !== o?.o && z(a, "label", r);
3235
+ }), t;
3764
3236
  }
3765
3237
  })];
3766
3238
  }
3767
- })), k(() => ({
3768
- e: P(["value", e]),
3769
- t: n.text(e)
3239
+ })), M(() => ({
3240
+ e: L(["value", e]),
3241
+ t: r.text(e)
3770
3242
  }), ({ e, t }, n) => {
3771
- D(r, e, n?.e), t !== n?.t && I(r, "title", t);
3772
- }), r;
3243
+ A(i, e, n?.e), t !== n?.t && z(i, "title", t);
3244
+ }), i;
3773
3245
  }
3774
3246
  colorName(e) {
3775
- return e === pa ? this.text("clear") : e;
3247
+ return e === na ? this.text("clear") : e;
3776
3248
  }
3777
3249
  link(e) {
3778
3250
  let t = this;
3779
- var n = Hi();
3780
- return n._$$click = () => t.command("show", e), j(n, e), n;
3251
+ var n = ji();
3252
+ return n._$$click = () => t.command("show", e), P(n, e), n;
3781
3253
  }
3782
3254
  drawer() {
3783
- let e = /* @__PURE__ */ u(() => this.data, "row"), t = /* @__PURE__ */ u(() => e().values[e().schemes[0] ?? "light"].mix, "mix"), n = this;
3784
- var r = Ui();
3785
- return j(r, O(E, {
3255
+ let e = /* @__PURE__ */ t(() => this.data, "row"), n = /* @__PURE__ */ t(() => e().values[e().schemes[0] ?? "light"].mix, "mix"), r = this;
3256
+ var i = Mi();
3257
+ return P(i, j(k, {
3786
3258
  get when() {
3787
- return t();
3259
+ return n();
3788
3260
  },
3789
3261
  get fallback() {
3790
- return O(E, {
3262
+ return j(k, {
3791
3263
  get when() {
3792
3264
  return e().pointer;
3793
3265
  },
3794
3266
  get fallback() {
3795
- return O(T, {
3267
+ return j(O, {
3796
3268
  get each() {
3797
- return n.shownSchemes;
3269
+ return r.shownSchemes;
3798
3270
  },
3799
- children: (e) => n.valueEditor(e)
3271
+ children: (e) => r.valueEditor(e)
3800
3272
  });
3801
3273
  },
3802
3274
  get children() {
3803
- return n.pointerEditor();
3275
+ return r.pointerEditor();
3804
3276
  }
3805
3277
  });
3806
3278
  },
3807
3279
  get children() {
3808
- return n.mixEditor();
3280
+ return r.mixEditor();
3809
3281
  }
3810
- })), k(() => n.partForName("drawer"), (e) => {
3811
- I(r, "part", e);
3812
- }), r;
3282
+ })), M(() => r.partForName("drawer"), (e) => {
3283
+ z(i, "part", e);
3284
+ }), i;
3813
3285
  }
3814
3286
  mixEditor() {
3815
- let e = /* @__PURE__ */ u((e) => this.text(e), "t"), t = /* @__PURE__ */ u(() => this.data.values[this.data.schemes[0] ?? "light"].mix, "mix"), n = /* @__PURE__ */ u((e) => {
3816
- let { base: n, mixin: r, amount: i } = {
3817
- ...t(),
3287
+ let e = /* @__PURE__ */ t((e) => this.text(e), "t"), n = /* @__PURE__ */ t(() => this.data.values[this.data.schemes[0] ?? "light"].mix, "mix"), r = /* @__PURE__ */ t((e) => {
3288
+ let { base: t, mixin: r, amount: i } = {
3289
+ ...n(),
3818
3290
  ...e
3819
3291
  };
3820
- this.change(`color-mix(in oklab, ${asWritten(r)} ${i}%, ${asWritten(n)})`);
3821
- }, "write"), r = this;
3822
- var i = Wi(), a = i.firstChild, o = a.firstChild, s = o.nextSibling, c = s.nextSibling, l = c.firstChild, d = a.nextSibling, f = d.nextSibling;
3823
- return j(o, () => e("amount")), I(s, "max", ma), I(s, "on-ui-moved", (e) => n({ amount: e.detail.value })), s._$owner = A(), j(c, () => t().amount, l), j(i, () => r.colorSelect(e("mixIn"), t().mixin, (e) => n({ mixin: e })), d), j(i, () => r.colorSelect(e("base"), t().base, (e) => n({ base: e })), f), k(() => ({
3824
- e: t().amount,
3292
+ this.change(`color-mix(in oklab, ${asWritten(r)} ${i}%, ${asWritten(t)})`);
3293
+ }, "write"), i = this;
3294
+ var a = Ni(), o = a.firstChild, s = o.firstChild, c = s.nextSibling, l = c.nextSibling, u = l.firstChild, d = o.nextSibling, f = d.nextSibling;
3295
+ return P(s, () => e("amount")), z(c, "max", Z), z(c, "on-ui-moved", (e) => r({ amount: e.detail.value })), c._$owner = N(), P(l, () => n().amount, u), P(a, () => i.colorSelect(e("mixIn"), n().mixin, (e) => r({ mixin: e })), d), P(a, () => i.colorSelect(e("base"), n().base, (e) => r({ base: e })), f), M(() => ({
3296
+ e: n().amount,
3825
3297
  t: e("amount")
3826
3298
  }), ({ e, t }, n) => {
3827
- e !== n?.e && I(s, "value", e), t !== n?.t && I(s, "aria-label", t);
3828
- }), i;
3299
+ e !== n?.e && z(c, "value", e), t !== n?.t && z(c, "aria-label", t);
3300
+ }), a;
3829
3301
  }
3830
3302
  pointerEditor() {
3831
- let e = /* @__PURE__ */ u((e) => this.text(e), "t"), t = this;
3832
- var n = Gi(), r = n.firstChild;
3833
- return j(n, () => t.colorSelect(e("pointsAt"), t.data.pointer.place, (e) => t.change(asWritten(e))), r), r._$$click = () => t.command("set here"), r._$owner = A(), j(r, () => e("setHere")), k(() => e("pointsAtTip"), (e) => {
3834
- I(n, "title", e);
3835
- }), n;
3303
+ let e = /* @__PURE__ */ t((e) => this.text(e), "t"), n = this;
3304
+ var r = Pi(), i = r.firstChild;
3305
+ return P(r, () => n.colorSelect(e("pointsAt"), n.data.pointer.place, (e) => n.change(asWritten(e))), i), i._$$click = () => n.command("set here"), i._$owner = N(), P(i, () => e("setHere")), M(() => e("pointsAtTip"), (e) => {
3306
+ z(r, "title", e);
3307
+ }), r;
3836
3308
  }
3837
3309
  colorSelect(e, t, n) {
3838
3310
  let r = this;
3839
- var i = Ki(), a = i.firstChild, o = a.nextSibling, s = o.firstChild;
3840
- return j(a, e), I(o, "value", t), I(o, "aria-label", e), I(o, "on-ui-changed", (e) => n(String(e.detail.value))), o._$owner = A(), I(s, "value", pa), s._$owner = A(), j(s, () => r.text("clear")), j(o, O(T, {
3311
+ var i = Fi(), a = i.firstChild, o = a.nextSibling, s = o.firstChild;
3312
+ return P(a, e), z(o, "value", t), z(o, "aria-label", e), z(o, "on-ui-changed", (e) => n(String(e.detail.value))), o._$owner = N(), z(s, "value", na), s._$owner = N(), P(s, () => r.text("clear")), P(o, j(O, {
3841
3313
  get each() {
3842
3314
  return r.data.options ?? [];
3843
3315
  },
3844
3316
  children: (e) => (() => {
3845
- var t = qi();
3846
- return t._$owner = A(), j(t, () => e.label), k(() => e.place, (e) => {
3847
- I(t, "value", e);
3317
+ var t = Ii();
3318
+ return t._$owner = N(), P(t, () => e.label), M(() => e.place, (e) => {
3319
+ z(t, "value", e);
3848
3320
  }), t;
3849
3321
  })()
3850
3322
  }), null), i;
3851
3323
  }
3852
3324
  valueEditor(e) {
3853
- let t = /* @__PURE__ */ u(() => this.data.values[e], "value"), n = /* @__PURE__ */ u(() => this.data.isSplit ? e : void 0, "forScheme"), r = /* @__PURE__ */ u(() => `${this.data.token}, ${this.text(e)}`, "name"), i = this;
3854
- var a = $i(), o = a.firstChild, s = o.nextSibling;
3855
- return j(a, O(E, {
3325
+ let n = /* @__PURE__ */ t(() => this.data.values[e], "value"), r = /* @__PURE__ */ t(() => this.data.isSplit ? e : void 0, "forScheme"), i = /* @__PURE__ */ t(() => `${this.data.token}, ${this.text(e)}`, "name"), a = this;
3326
+ var o = Hi(), s = o.firstChild, c = s.nextSibling;
3327
+ return P(o, j(k, {
3856
3328
  get when() {
3857
- return i.isApart;
3329
+ return a.isApart;
3858
3330
  },
3859
3331
  get children() {
3860
- var t = Ji();
3861
- return I(t, "name", e === "dark" ? "moon" : "sun"), t._$owner = A(), k(() => i.text(e), (e) => {
3862
- I(t, "aria-label", e);
3332
+ var t = Li();
3333
+ return z(t, "name", e === "dark" ? "moon" : "sun"), t._$owner = N(), M(() => a.text(e), (e) => {
3334
+ z(t, "aria-label", e);
3863
3335
  }), t;
3864
3336
  }
3865
- }), o), j(a, O(E, {
3337
+ }), s), P(o, j(k, {
3866
3338
  get when() {
3867
- return t().kind === "color";
3339
+ return n().kind === "color";
3868
3340
  },
3869
3341
  get fallback() {
3870
3342
  return [(() => {
3871
- var e = ea();
3872
- return I(e, "on-ui-changed", (e) => i.change(e.detail.value.trim(), n())), e._$owner = A(), k(() => ({
3873
- e: t().text,
3874
- t: `${r()}: ${i.text("value")}`
3343
+ var e = Ui();
3344
+ return z(e, "on-ui-changed", (e) => a.change(e.detail.value.trim(), r())), e._$owner = N(), M(() => ({
3345
+ e: n().text,
3346
+ t: `${i()}: ${a.text("value")}`
3875
3347
  }), ({ e: t, t: n }, r) => {
3876
- t !== r?.e && I(e, "value", t), n !== r?.t && I(e, "aria-label", n);
3348
+ t !== r?.e && z(e, "value", t), n !== r?.t && z(e, "aria-label", n);
3877
3349
  }), e;
3878
- })(), O(E, {
3350
+ })(), j(k, {
3879
3351
  get when() {
3880
- return t().kind === "length";
3352
+ return n().kind === "length";
3881
3353
  },
3882
3354
  get children() {
3883
- var e = ta();
3884
- return I(e, "on-ui-moved", (e) => i.change(`${e.detail.value}px`, n())), e._$owner = A(), k(() => ({
3885
- e: Math.max(ha, Math.ceil((parseFloat(t().text) || 0) * 2)),
3886
- t: parseFloat(t().text) || 0,
3887
- a: r()
3355
+ var e = Wi();
3356
+ return z(e, "on-ui-moved", (e) => a.change(`${e.detail.value}px`, r())), e._$owner = N(), M(() => ({
3357
+ e: Math.max(ra, Math.ceil((parseFloat(n().text) || 0) * 2)),
3358
+ t: parseFloat(n().text) || 0,
3359
+ a: i()
3888
3360
  }), ({ e: t, t: n, a: r }, i) => {
3889
- t !== i?.e && I(e, "max", t), n !== i?.t && I(e, "value", n), r !== i?.a && I(e, "aria-label", r);
3361
+ t !== i?.e && z(e, "max", t), n !== i?.t && z(e, "value", n), r !== i?.a && z(e, "aria-label", r);
3890
3362
  }), e;
3891
3363
  }
3892
3364
  })];
@@ -3894,69 +3366,70 @@ var ki = {
3894
3366
  get children() {
3895
3367
  return [
3896
3368
  (() => {
3897
- var e = Yi();
3898
- return I(e, "on-ui-typed", (e) => i.change(W.join(e.detail.value, t().opacity ?? ma), n())), e._$owner = A(), k(() => ({
3899
- e: t().hex ?? ga,
3900
- t: r()
3369
+ var e = Ri();
3370
+ return z(e, "on-ui-typed", (e) => a.change(V.join(e.detail.value, n().opacity ?? Z), r())), e._$owner = N(), M(() => ({
3371
+ e: n().hex ?? ia,
3372
+ t: i()
3901
3373
  }), ({ e: t, t: n }, r) => {
3902
- t !== r?.e && I(e, "value", t), n !== r?.t && I(e, "aria-label", n);
3374
+ t !== r?.e && z(e, "value", t), n !== r?.t && z(e, "aria-label", n);
3903
3375
  }), e;
3904
3376
  })(),
3905
3377
  (() => {
3906
- var e = Xi();
3907
- return I(e, "on-ui-changed", (e) => i.change(W.join(e.detail.value.trim(), t().opacity ?? ma), n())), e._$owner = A(), k(() => ({
3908
- e: t().hex ?? "",
3909
- t: `${r()}: ${i.text("value")}`
3378
+ var e = zi();
3379
+ return z(e, "on-ui-changed", (e) => a.change(V.join(e.detail.value.trim(), n().opacity ?? Z), r())), e._$owner = N(), M(() => ({
3380
+ e: n().hex ?? "",
3381
+ t: `${i()}: ${a.text("value")}`
3910
3382
  }), ({ e: t, t: n }, r) => {
3911
- t !== r?.e && I(e, "value", t), n !== r?.t && I(e, "aria-label", n);
3383
+ t !== r?.e && z(e, "value", t), n !== r?.t && z(e, "aria-label", n);
3912
3384
  }), e;
3913
3385
  })(),
3914
3386
  (() => {
3915
- var e = Zi();
3916
- return I(e, "max", ma), I(e, "on-ui-moved", (e) => i.change(W.join(t().hex ?? ga, e.detail.value), n())), e._$owner = A(), k(() => ({
3917
- e: t().opacity ?? ma,
3918
- t: `${r()}: ${i.text("alpha")}`
3387
+ var e = Bi();
3388
+ return z(e, "max", Z), z(e, "on-ui-moved", (e) => a.change(V.join(n().hex ?? ia, e.detail.value), r())), e._$owner = N(), M(() => ({
3389
+ e: n().opacity ?? Z,
3390
+ t: `${i()}: ${a.text("alpha")}`
3919
3391
  }), ({ e: t, t: n }, r) => {
3920
- t !== r?.e && I(e, "value", t), n !== r?.t && I(e, "aria-label", n);
3392
+ t !== r?.e && z(e, "value", t), n !== r?.t && z(e, "aria-label", n);
3921
3393
  }), e;
3922
3394
  })(),
3923
3395
  (() => {
3924
- var e = Qi(), n = e.firstChild;
3925
- return j(e, () => t().opacity ?? ma, n), e;
3396
+ var e = Vi(), t = e.firstChild;
3397
+ return P(e, () => n().opacity ?? Z, t), e;
3926
3398
  })()
3927
3399
  ];
3928
3400
  }
3929
- }), s), k(() => ({
3930
- e: P([
3401
+ }), c), M(() => ({
3402
+ e: L([
3931
3403
  "value-editor",
3932
- t().kind,
3933
- { apart: i.isApart }
3404
+ n().kind,
3405
+ { apart: a.isApart }
3934
3406
  ]),
3935
- t: i.text(e)
3407
+ t: a.text(e)
3936
3408
  }), ({ e, t }, n) => {
3937
- D(a, e, n?.e), t !== n?.t && I(a, "title", t);
3938
- }), a;
3409
+ A(o, e, n?.e), t !== n?.t && z(o, "title", t);
3410
+ }), o;
3939
3411
  }
3940
3412
  };
3941
- X = l(ca), s(X, 2, "isHere", aa, Z), s(X, 2, "isOpen", ia, Z), s(X, 1, "change", ra, Z), s(X, 1, "command", na, Z), s(X, 13, "vocabulary", sa, Z), s(X, 13, "elementSetup", oa, Z), c(X, Z), u(Z, "UIThemeToken"), t(Z, "vocabulary", h(X, 8, Z, ki)), h(X, 11, Z), t(Z, "elementSetup", h(X, 12, Z, {
3942
- styleSheets: { "theme-token": Ai },
3413
+ Y = se(Zi), s(Y, 2, "isHere", Ji, X), s(Y, 2, "isOpen", qi, X), s(Y, 1, "change", Ki, X), s(Y, 1, "command", Gi, X), s(Y, 13, "vocabulary", Xi, X), s(Y, 13, "elementSetup", Yi, X), l(Y, X), t(X, "UIThemeToken"), o(X, "vocabulary", p(Y, 8, X, vi)), p(Y, 11, X), o(X, "elementSetup", p(Y, 12, X, {
3414
+ styleSheets: { "theme-token": yi },
3943
3415
  delegatesFocus: !1
3944
- })), h(X, 15, Z);
3945
- var la = Z;
3416
+ })), p(Y, 15, X);
3417
+ var Qi = X;
3946
3418
  function sameValue(e, t) {
3947
3419
  return e.text === t.text && e.hex === t.hex && e.opacity === t.opacity && JSON.stringify(e.mix) === JSON.stringify(t.mix);
3948
3420
  }
3949
- u(sameValue, "sameValue");
3421
+ t(sameValue, "sameValue");
3950
3422
  function asWritten(e) {
3951
- return e === pa || !/^[\w-]+(?:\.[\w-]+)+$/.test(e) ? e : `{${e}}`;
3423
+ return e === na || !/^[\w-]+(?:\.[\w-]+)+$/.test(e) ? e : `{${e}}`;
3952
3424
  }
3953
- u(asWritten, "asWritten");
3954
- var ua = "●", da = "○", fa = "↳", pa = "transparent", ma = 100, ha = 48, ga = "#000000";
3955
- fe(["click"]);
3425
+ t(asWritten, "asWritten");
3426
+ var $i = "●", ea = "○", ta = "↳", na = "transparent", Z = 100, ra = 48, ia = "#000000";
3427
+ ve(["click"]);
3956
3428
  //#endregion
3957
3429
  //#region src/components/ui-theme-editor/UIColorChip.en.ts
3958
- var _a = {
3430
+ var aa = {
3959
3431
  tag: "ui-color-chip",
3432
+ icon: "tint",
3960
3433
  topics: ["media", "typography"],
3961
3434
  aka: [
3962
3435
  "color chip",
@@ -4002,31 +3475,31 @@ var _a = {
4002
3475
  }],
4003
3476
  states: [],
4004
3477
  texts: []
4005
- }, va = "@layer ui.components.color-chip.types{:host{vertical-align:middle;--_ui-color-chip-size:var(--ui-color-chip-size,1.4em);--_ui-color-chip-radius:var(--ui-color-chip-radius,.35em);line-height:0;display:inline-block}.color-chip{inline-size:var(--_ui-color-chip-size);block-size:var(--_ui-color-chip-size);border-radius:var(--_ui-color-chip-radius);background:linear-gradient(var(--_ui-color-chip-color), var(--_ui-color-chip-color)), repeating-conic-gradient(#c8c8c8 0 25%, #fff 0 50%) 0 0 / .6em .6em;display:inline-block;box-shadow:inset 0 0 0 1px light-dark(#00000024,#ffffff3d)}.color-chip.light{color-scheme:light}.color-chip.dark{color-scheme:dark}}", ya = /* @__PURE__ */ R("<span role=img>"), ba, xa, Sa, Q, $ = class _UIColorChip extends (Sa = m, xa = [ie], ba = [ae], Sa) {
3478
+ }, oa = "@layer ui.components.color-chip.types{:host{vertical-align:middle;--_ui-color-chip-size:var(--ui-color-chip-size,1.4em);--_ui-color-chip-radius:var(--ui-color-chip-radius,.35em);line-height:0;display:inline-block}.color-chip{inline-size:var(--_ui-color-chip-size);block-size:var(--_ui-color-chip-size);border-radius:var(--_ui-color-chip-radius);background:linear-gradient(var(--_ui-color-chip-color), var(--_ui-color-chip-color)), repeating-conic-gradient(#c8c8c8 0 25%, #fff 0 50%) 0 0 / .6em .6em;display:inline-block;box-shadow:inset 0 0 0 1px light-dark(#00000024,#ffffff3d)}.color-chip.light{color-scheme:light}.color-chip.dark{color-scheme:dark}}", sa = /* @__PURE__ */ B("<span role=img>"), ca, la, ua, Q, $ = class _UIColorChip extends (ua = f, la = [ne], ca = [re], ua) {
4006
3479
  get chipName() {
4007
3480
  return this.label || this.color || "";
4008
3481
  }
4009
3482
  render() {
4010
3483
  let e = this;
4011
- var t = ya();
4012
- return k(() => ({
4013
- e: P(["ui color-chip", e.scheme !== "auto" && e.scheme]),
3484
+ var t = sa();
3485
+ return M(() => ({
3486
+ e: L(["ui color-chip", e.scheme !== "auto" && e.scheme]),
4014
3487
  t: e.partForName("chip"),
4015
3488
  a: e.chipName,
4016
3489
  o: e.label && e.color ? `${e.label}: ${e.color}` : e.chipName,
4017
3490
  i: `--_ui-color-chip-color: ${e.color ?? "transparent"}`
4018
3491
  }), ({ e, t: n, a: r, o: i, i: a }, o) => {
4019
- D(t, e, o?.e), n !== o?.t && I(t, "part", n), r !== o?.a && I(t, "aria-label", r), i !== o?.o && I(t, "title", i), L(t, a, o?.i);
3492
+ A(t, e, o?.e), n !== o?.t && z(t, "part", n), r !== o?.a && z(t, "aria-label", r), i !== o?.o && z(t, "title", i), ye(t, a, o?.i);
4020
3493
  }), t;
4021
3494
  }
4022
3495
  };
4023
- Q = l(Sa), s(Q, 13, "vocabulary", xa, $), s(Q, 13, "elementSetup", ba, $), c(Q, $), u($, "UIColorChip"), t($, "vocabulary", h(Q, 8, $, _a)), h(Q, 11, $), t($, "elementSetup", h(Q, 12, $, {
4024
- styleSheets: { "color-chip": va },
3496
+ Q = se(ua), s(Q, 13, "vocabulary", la, $), s(Q, 13, "elementSetup", ca, $), l(Q, $), t($, "UIColorChip"), o($, "vocabulary", p(Q, 8, $, aa)), p(Q, 11, $), o($, "elementSetup", p(Q, 12, $, {
3497
+ styleSheets: { "color-chip": oa },
4025
3498
  delegatesFocus: !1
4026
- })), h(Q, 15, $);
4027
- var Ca = $;
4028
- jr.define(), la.define(), Ca.define();
3499
+ })), p(Q, 15, $);
3500
+ var da = $;
3501
+ _r.define(), Qi.define(), da.define();
4029
3502
  //#endregion
4030
- export { Ar as DOMThemeEditorElement, _e as PageBridge, z as SavedTheme, U as ThemeDraft, H as ThemeTokens, W as TokenColor, nt as TokenTree, jr as UIThemeEditor };
3503
+ export { gr as DOMThemeEditorElement, be as PageBridge, D as SavedTheme, E as ThemeDraft, T as ThemeTokens, V as TokenColor, De as TokenTree, _r as UIThemeEditor };
4031
3504
 
4032
3505
  //# sourceMappingURL=ui-theme-editor.js.map