spell-ui 0.8.6 → 0.8.8

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,12 +1,14 @@
1
1
  import "./rolldown-runtime-CYGlBXrH.js";
2
- import { Bt as e, Ft as t, IconGlyph as n, It as r, Lt as i, Rt as a, SlotContent as o, Vt as s, cssState as c, onChange as l, proto as u, protoMerged as d, scrollByRow as f, scrollEnds as p, state as m, untracked as h, zt as g } from "./core.js";
3
- import { UIMenu as _, t as v } from "./ui-menu.js";
4
- import { Show as y } from "solid-js";
5
- import { className as b, createComponent as x, delegateEvents as S, effect as C, getOwner as w, insert as T, readShallow as E, setAttribute as D, template as O } from "@solidjs/web";
2
+ import { Bt as e, Ht as t, Lt as n, Rt as r, SlotContent as i, Ut as a, cssState as o, onChange as s, proto as c, protoMerged as l, untracked as u, zt as d } from "./core.js";
3
+ import { UIMenu as f, t as p } from "./ui-menu.js";
4
+ import { n as m, r as h, t as g } from "./ScrollingRow-7n7Z-HIE.js";
5
+ import { Show as _ } from "solid-js";
6
+ import { className as v, createComponent as y, effect as b, getOwner as x, insert as S, readShallow as C, setAttribute as w, template as T } from "@solidjs/web";
6
7
  //#region src/components/ui-toolbar/UIToolbar.en.ts
7
- var k = {
8
- ...v,
8
+ var E = {
9
+ ...p,
9
10
  tag: "ui-toolbar",
11
+ icon: "tools",
10
12
  topics: [
11
13
  "menus",
12
14
  "navigation",
@@ -22,8 +24,14 @@ var k = {
22
24
  ],
23
25
  skeleton: "inline 24 x 2.5",
24
26
  description: "A toolbar is a horizontal menu whose items scroll sideways when they don't fit, with a button at each end while there's more to see that way; `shrinkable`, it fits their titles to its width instead. It takes every `<ui-menu>` attribute.",
27
+ attributes: [...p.attributes, {
28
+ name: "scroll-first",
29
+ group: "layout",
30
+ kind: "boolean",
31
+ description: "With `shrinkable`: once only its icons are left, they scroll with `‹` / `›`, no overflow button. With a `segmented` look too: when its items don't fit, they scroll with `‹` / `›` while there's `--ui-toolbar-scroll-min` (200px) to show them in; only then the dropdown. For a row of many, such as files."
32
+ }],
25
33
  slots: [
26
- ...v.slots,
34
+ ...p.slots,
27
35
  {
28
36
  name: "icon",
29
37
  description: "First, at the start: an icon or an icon button (a menu button)."
@@ -42,7 +50,7 @@ var k = {
42
50
  }
43
51
  ],
44
52
  parts: [
45
- ...v.parts,
53
+ ...p.parts,
46
54
  {
47
55
  name: "icon",
48
56
  description: "The `icon` slot's box."
@@ -72,12 +80,12 @@ var k = {
72
80
  description: "The `›` button, shown while there's more to scroll on to."
73
81
  }
74
82
  ],
75
- states: [...v.states, {
83
+ states: [...p.states, {
76
84
  name: "overflowing",
77
- description: "Its items don't all fit: they scroll sideways (never once `shrinkable`)."
85
+ description: "Its items don't all fit: they scroll sideways (once `shrinkable`, only with `scroll-first`)."
78
86
  }],
79
87
  texts: [
80
- ...v.texts,
88
+ ...p.texts,
81
89
  {
82
90
  key: "scrollStart",
83
91
  text: "Scroll back",
@@ -89,62 +97,53 @@ var k = {
89
97
  description: "Accessible name and tooltip of the `›` button."
90
98
  }
91
99
  ]
92
- }, A = "@layer ui.components.toolbar.types{:host(:not(:state(in-menu))){min-width:0;max-width:100%;display:block}.ui.toolbar{--_ui-toolbar-gap:var(--ui-toolbar-gap,.25em);--_ui-toolbar-button-size:var(--ui-toolbar-button-size,1.75em);--_ui-toolbar-button-background:var(--ui-toolbar-button-background,transparent);--_ui-toolbar-button-hover-background:var(--ui-toolbar-button-hover-background,oklch(from var(--ui-ink) l c h / .08));--_ui-toolbar-button-color:var(--ui-toolbar-button-color,var(--ui-text-muted));--_ui-toolbar-button-radius:var(--ui-toolbar-button-radius,50%);align-items:center;gap:var(--_ui-toolbar-gap);min-width:0;display:flex}.ui.toolbar>:is(.icon,.title,.center,.right){align-items:center;gap:var(--_ui-toolbar-gap);min-width:0;display:flex}.ui.toolbar>:is(.icon,.title,.right){flex:none}.ui.toolbar>.title{white-space:nowrap}.ui.toolbar>.center{flex:auto}.ui.toolbar>.right{margin-inline-start:auto}.ui.toolbar.empty>.ui.menu{display:none}.ui.toolbar>.ui.menu{--_ui-menu-item-flex:0 0 auto;overscroll-behavior-x:contain;scrollbar-width:none;flex-wrap:nowrap;flex:auto;min-width:0;max-width:100%;overflow-x:auto}.ui.toolbar>.ui.menu::-webkit-scrollbar{display:none}.ui.toolbar>.ui.segmented.menu:not([class*=fluid\\ aligned]){flex:0 auto}.ui.toolbar:has(>.ui.segmented.menu){--_ui-toolbar-button-radius:var(--ui-toolbar-button-radius,max(0px, var(--ui-menu-segmented-radius,var(--ui-menu-radius,var(--ui-radius))) - var(--ui-border-width) - var(--ui-menu-segmented-padding,0px)))}.ui.toolbar{position:relative}.ui.toolbar>.ui.menu{anchor-name:--ui-toolbar-menu;scroll-snap-type:x mandatory;scroll-padding-inline:var(--_ui-toolbar-button-size);--_toolbar-fade-start:0px;--_toolbar-fade-end:0px;--_toolbar-fade-in:0px;--_toolbar-fade-out:0px;mask-image:linear-gradient(to right, transparent var(--_toolbar-fade-start), #000 calc(var(--_toolbar-fade-start) + var(--_toolbar-fade-in)), #000 calc(100% - var(--_toolbar-fade-end) - var(--_toolbar-fade-out)), transparent calc(100% - var(--_toolbar-fade-end)))}.ui.toolbar>.ui.menu ::slotted(*){scroll-snap-align:start}.ui.toolbar:has(>.scroll.start[data-can])>.ui.menu{--_toolbar-fade-start:var(--_ui-toolbar-button-size);--_toolbar-fade-in:1em}.ui.toolbar:has(>.scroll.end[data-can])>.ui.menu{--_toolbar-fade-end:var(--_ui-toolbar-button-size);--_toolbar-fade-out:1em}.ui.toolbar>.scroll{position-anchor:--ui-toolbar-menu;top:anchor(center);z-index:1;width:var(--_ui-toolbar-button-size);height:var(--_ui-toolbar-button-size);border-radius:var(--_ui-toolbar-button-radius);font:inherit;color:var(--_ui-toolbar-button-color);background:var(--_ui-toolbar-button-background);cursor:pointer;border:0;flex:none;place-items:center;margin:0;padding:0;display:inline-grid;position:absolute;translate:0 -50%}.ui.toolbar>.scroll.start{left:anchor(left)}.ui.toolbar>.scroll.end{right:anchor(right)}.ui.toolbar>.scroll>svg{fill:currentColor;pointer-events:none;width:.875em;height:.875em}}@layer ui.components.toolbar.states{.ui.toolbar>.scroll[hidden]{display:none}.ui.toolbar>.scroll:not([data-can]){visibility:hidden}.ui.toolbar>.scroll:hover{color:var(--ui-text-color);background:var(--_ui-toolbar-button-hover-background)}.ui.toolbar>.scroll:focus-visible{outline:var(--ui-focus-width) solid var(--ui-focus-color);outline-offset:1px}}", j = /* @__PURE__ */ O("<div><!><!><!><!><!><!><!>"), M = /* @__PURE__ */ O("<div><slot>"), N = /* @__PURE__ */ O("<button type=button tabindex=-1>"), P, F, I, L, R, z, B, V, H, U, W, G = class _UIToolbar extends (V = _, B = [u], z = [d], R = [m], L = [m], I = [c("overflowing")], F = [l("isReady", "shrinkable")], P = [h], V) {
100
+ }, D = "@layer ui.components.toolbar.types{:host(:not(:state(in-menu))){min-width:0;max-width:100%;display:block}.ui.toolbar{--_ui-toolbar-gap:var(--ui-toolbar-gap,.25em);align-items:center;gap:var(--_ui-toolbar-gap);min-width:0;display:flex}.ui.toolbar>:is(.icon,.title,.center,.right){align-items:center;gap:var(--_ui-toolbar-gap);min-width:0;display:flex}.ui.toolbar>:is(.icon,.title,.right){flex:none}.ui.toolbar>.title{white-space:nowrap}.ui.toolbar>.center{flex:auto}.ui.toolbar>.right{margin-inline-start:auto}.ui.toolbar.empty>.ui.menu{display:none}.ui.toolbar>.ui.menu:not(.equal){--_ui-menu-item-flex:0 0 auto}.ui.toolbar>.ui.menu{--_menu-margin-top:0;--_menu-margin-bottom:0;flex:auto}.ui.toolbar>.ui.segmented.menu:not([class*=fluid\\ aligned]){flex:0 auto}.ui.toolbar>.ui.segmented.header.menu:not([class*=fluid\\ aligned]){--_ui-menu-item-flex:0 0 auto;flex:0 auto}.ui.toolbar:has(>.ui.segmented.header.menu)>.right{--ui-icon-width:auto;--ui-icon-distance:0;--ui-icon-link-opacity:1;gap:var(--ui-toolbar-header-action-gap,10px);color:var(--ui-text-muted);font-size:var(--ui-menu-segmented-header-font-size,13px);margin-inline-start:auto;padding-inline-start:8px}.ui.toolbar:has(>.ui.segmented.menu){--_ui-toolbar-button-radius:var(--ui-toolbar-button-radius,max(0px, var(--ui-menu-segmented-radius,var(--ui-menu-radius,var(--ui-radius))) - var(--ui-border-width) - var(--ui-menu-segmented-padding,0px)))}}", O = /* @__PURE__ */ T("<div><!><!><!><!><!><!><!>"), k = /* @__PURE__ */ T("<div><slot>"), A, j, M, N, P, F, I, L = class _UIToolbar extends (F = f, P = [c], N = [l], M = [o("overflowing")], j = [s("isReady", "shrinkable", "scrollFirst", "fitAnswer")], A = [u], F) {
93
101
  constructor() {
94
- super(...arguments), s(H, 5, this), g(this, U, s(H, 8, this, !1)), s(H, 11, this), g(this, W, s(H, 12, this, !1)), s(H, 15, this), e(this, "slots", new o(this.domElement));
102
+ super(...arguments), a(I, 5, this), t(this, "scrolling", new h({
103
+ owner: this,
104
+ canScroll: /* @__PURE__ */ e(() => !this.shrinkable || !!this.scrollFirst && !this.isDropdown, "canScroll")
105
+ })), t(this, "slots", new i(this.domElement));
95
106
  }
96
107
  get isOverflowing() {
97
- return this.canScrollStart || this.canScrollEnd;
108
+ return this.scrolling.isOverflowing;
109
+ }
110
+ get scrollsFirst() {
111
+ return !!this.scrollFirst;
98
112
  }
99
113
  onReadyToScroll(e) {
100
114
  let t = this.box;
101
- if (!e || !t) return;
102
- let n = new AbortController();
103
- t.addEventListener("scroll", () => this.measure(), {
104
- passive: !0,
105
- signal: n.signal
106
- });
107
- let r = new ResizeObserver(() => this.measure());
108
- r.observe(t);
109
- let i = t.querySelector("slot"), o = /* @__PURE__ */ a(() => {
110
- for (let e of i?.assignedElements() ?? []) r.observe(e);
111
- }, "watchItems");
112
- return o(), i?.addEventListener("slotchange", o, { signal: n.signal }), this.measure(), () => {
113
- n.abort(), r.disconnect();
114
- };
115
- }
116
- measure() {
117
- let e = this.box;
118
- if (!e) return;
119
- let t = !this.shrinkable, { start: n, end: r } = p(e);
120
- this.canScrollStart = t && n, this.canScrollEnd = t && r;
115
+ if (e && t) return this.scrolling.follow(t);
121
116
  }
122
117
  scrollByPage(e) {
123
- this.box && f(this.box, e);
118
+ this.scrolling.scrollByPage(e);
124
119
  }
125
120
  render() {
126
121
  let e = this;
127
- var t = j(), n = t.firstChild, r = n.nextSibling, i = r.nextSibling, a = i.nextSibling, o = a.nextSibling, s = o.nextSibling, c = s.nextSibling;
128
- return T(t, () => e.barSlot(ee), n), T(t, () => e.barSlot(te), r), T(t, () => e.barSlot(ne), i), T(t, () => e.scrollButton(Y), a), T(t, () => super.render(), o), T(t, () => e.scrollButton(X), s), T(t, () => e.barSlot(re), c), C(() => ({
129
- e: E([q, { [$]: !e.slots.hasContent("") }]),
122
+ var t = O(), n = t.firstChild, r = n.nextSibling, i = r.nextSibling, a = i.nextSibling, o = a.nextSibling, s = o.nextSibling, c = s.nextSibling;
123
+ return S(t, () => e.barSlot(H), n), S(t, () => e.barSlot(U), r), S(t, () => e.barSlot(W), i), S(t, () => e.scrolling.key(m), a), S(t, () => super.render(), o), S(t, () => e.scrolling.key("end"), s), S(t, () => e.barSlot(G), c), b(() => ({
124
+ e: C([
125
+ z,
126
+ B,
127
+ { [V]: !e.slots.hasContent("") }
128
+ ]),
130
129
  t: e.toolbarPart("toolbar")
131
130
  }), ({ e, t: n }, r) => {
132
- b(t, e, r?.e), n !== r?.t && D(t, "part", n);
131
+ v(t, e, r?.e), n !== r?.t && w(t, "part", n);
133
132
  }), t;
134
133
  }
135
134
  barSlot(e) {
136
135
  let t = this.slotForName(e), n = this;
137
- return x(y, {
136
+ return y(_, {
138
137
  get when() {
139
138
  return n.slots.hasContent(t);
140
139
  },
141
140
  get children() {
142
- var r = M(), i = r.firstChild;
143
- return D(i, "name", t), i._$owner = w(), C(() => ({
144
- e: E(e),
141
+ var r = k(), i = r.firstChild;
142
+ return w(i, "name", t), i._$owner = x(), b(() => ({
143
+ e: C(e),
145
144
  t: n.toolbarPart(e)
146
145
  }), ({ e, t }, n) => {
147
- b(r, e, n?.e), t !== n?.t && D(r, "part", t);
146
+ v(r, e, n?.e), t !== n?.t && w(r, "part", t);
148
147
  }), r;
149
148
  }
150
149
  });
@@ -152,38 +151,17 @@ var k = {
152
151
  toolbarPart(e) {
153
152
  return this.partForName(e);
154
153
  }
155
- scrollButton(e) {
156
- let t = e === Y, r = /* @__PURE__ */ a(() => this.translationForKey(t ? "scrollStart" : "scrollEnd"), "label"), i = new n({
157
- owner: this,
158
- name: /* @__PURE__ */ a(() => t ? Z : Q, "name")
159
- }), o = this;
160
- var s = N();
161
- return s._$$click = () => o.scrollByPage(t ? -1 : 1), T(s, x(y, {
162
- get when() {
163
- return i.svg;
164
- },
165
- children: (e) => e()
166
- })), C(() => ({
167
- e: `${J} ${e}`,
168
- t: o.toolbarPart(t ? "scroll-start" : "scroll-end"),
169
- a: r(),
170
- o: r(),
171
- i: !o.isOverflowing,
172
- n: (t ? o.canScrollStart : o.canScrollEnd) ? "" : void 0
173
- }), ({ e, t, a: n, o: r, i, n: a }, o) => {
174
- b(s, e, o?.e), t !== o?.t && D(s, "part", t), n !== o?.a && D(s, "aria-label", n), r !== o?.o && D(s, "title", r), i !== o?.i && D(s, "hidden", i), a !== o?.n && D(s, "data-can", a);
175
- }), s;
176
- }
177
154
  };
178
- H = i(V), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), t(H, 4, "canScrollStart", R, G, U), t(H, 4, "canScrollEnd", L, G, W), t(H, 2, "isOverflowing", I, G), t(H, 1, "onReadyToScroll", F, G), t(H, 1, "scrollByPage", P, G), t(H, 13, "vocabulary", B, G), t(H, 13, "elementSetup", z, G), r(H, G), a(G, "UIToolbar"), e(G, "vocabulary", s(H, 16, G, k)), s(H, 19, G), e(G, "elementSetup", s(H, 20, G, { styleSheets: {
179
- ..._.prototype.elementSetup.styleSheets,
180
- toolbar: A
181
- } })), s(H, 23, G);
182
- var K = G, q = "ui toolbar", J = "scroll", Y = "start", X = "end", Z = "chevron left", Q = "chevron right", $ = "empty", ee = "icon", te = "title", ne = "center", re = "right";
155
+ I = d(F), n(I, 2, "isOverflowing", M, L), n(I, 1, "onReadyToScroll", j, L), n(I, 1, "scrollByPage", A, L), n(I, 13, "vocabulary", P, L), n(I, 13, "elementSetup", N, L), r(I, L), e(L, "UIToolbar"), t(L, "vocabulary", a(I, 8, L, E)), a(I, 11, L), t(L, "elementSetup", a(I, 12, L, { styleSheets: {
156
+ ...f.prototype.elementSetup.styleSheets,
157
+ scrollingRow: g,
158
+ toolbar: D
159
+ } })), a(I, 15, L);
160
+ var R = L, z = "ui toolbar", B = "scrolling-row", V = "empty", H = "icon", U = "title", W = "center", G = "right";
183
161
  //#endregion
184
162
  //#region src/components/ui-toolbar/index.ts
185
- S(["click"]), K.define();
163
+ R.define();
186
164
  //#endregion
187
- export { K as UIToolbar };
165
+ export { R as UIToolbar };
188
166
 
189
167
  //# sourceMappingURL=ui-toolbar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui-toolbar.js","names":["this","<div class={[TOOLBAR_CLASS, { [EMPTY]: !this.slots.hasContent(\"\") }]} part={this.toolbarPart(\"toolbar\")}>\n {this.barSlot(ICON)}\n {this.barSlot(TITLE)}\n {this.barSlot(CENTER)}\n {this.scrollButton(START)}\n {super.render()}\n {this.scrollButton(END)}\n {this.barSlot(RIGHT)}\n </div>","part={this.toolbarPart(\"toolbar\")}","<Show when={this.slots.hasContent(slotName)}>\n <div class={name} part={this.toolbarPart(name)}>\n <slot name={slotName} />\n </div>\n </Show>","part={this.toolbarPart(name)}","<div class={name} part={this.toolbarPart(name)}>\n <slot name={slotName} />\n </div>","<Show when={glyph.svg}>{(svg) => svg()}</Show>","part={this.toolbarPart(isStart ? \"scroll-start\" : \"scroll-end\")}","aria-label={label()}","title={label()}","hidden={!this.isOverflowing}","data-can={(isStart ? this.canScrollStart : this.canScrollEnd) ? \"\" : void 0}","<button\n type=\"button\"\n class={`${SCROLL} ${end}`}\n part={this.toolbarPart(isStart ? \"scroll-start\" : \"scroll-end\")}\n tabindex=\"-1\"\n aria-label={label()}\n title={label()}\n hidden={!this.isOverflowing}\n data-can={(isStart ? this.canScrollStart : this.canScrollEnd) ? \"\" : void 0}\n onClick={() => this.scrollByPage(isStart ? -1 : 1)}\n >\n <Show when={glyph.svg}>{(svg) => svg()}</Show>\n </button>","E.proto","E.protoMerged","E.state","E.cssState","E.onChange","E.untracked","E.SlotContent","E.scrollEnds","_$readShallow","_$setAttribute","_$createComponent","_$getOwner","E.IconGlyph","__name","toolbarCSS","_$delegateEvents","__publicField","__decorateElement","__decoratorMetadata","__decoratorStart","__name$1","__runInitializers","__privateAdd","menuVocabulary","getOwner$1","toolbarVocabulary","UIToolbar_default","_tmpl$","_tmpl$2","_tmpl$3","_scrollByPage_dec","_onReadyToScroll_dec","_isOverflowing_dec","_canScrollEnd_dec","_canScrollStart_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_canScrollStart","_canScrollEnd","_UIToolbar","UIMenu","proto","protoMerged","state","cssState","onChange","untracked","SlotContent","box","isReady","stop","resizes","slot","watchItems","item","canScroll","scrollEnds","start","end","scrollByRow","direction","_self$","_el$","_el$2","_el$3","_el$4","_el$5","_el$6","_el$7","_el$8","insert","ICON","TITLE","CENTER","START","END","RIGHT","effect","readShallow","TOOLBAR_CLASS","EMPTY","className","_p$","t","setAttribute","slotName","name","_self$2","createComponent","Show","_el$9","_el$10","isStart","label","glyph","IconGlyph","CHEVRON_START","CHEVRON_END","_self$3","_el$11","svg","SCROLL","a","o","n","UIToolbar","delegateEvents"],"sources":["../src/components/ui-toolbar/UIToolbar.en.ts","../src/components/ui-toolbar/UIToolbar.css?inline","../src/components/ui-toolbar/UIToolbar.tsx","../src/components/ui-toolbar/index.ts"],"sourcesContent":["/**\n * The English vocabulary of `<ui-toolbar>`: `<ui-menu>`'s, under the toolbar's own tag, with its scroll buttons.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Built ON the menu's: the same attributes, events, slots, states and owned parts,\n * so an attribute the menu gains reaches the toolbar with no change here.\n * - Its own: the `toolbar` box around the menu,\n * the two scroll buttons (`scroll-start`, `scroll-end`) and their names.\n * - Its slots, a bar's layout: `icon`, `title`, `center` and `right` around the items (the default slot).\n * - The same noun (`menu`): its items draw as a menu's, and `UIMenu.css` styles it.\n */\n\nimport type { E } from \"spell/ui/core\"\nimport { menuVocabulary } from \"spell/ui/components/ui-menu/UIMenu.en\"\n\n/****************\n * ### `toolbarVocabulary`\n * The names of `<ui-toolbar>`, a toolbar: a horizontal menu whose items scroll sideways when they don't fit,\n * with a `‹` / `›` button at each end while there's more that way.\n ****************/\nexport const toolbarVocabulary = {\n ...menuVocabulary,\n tag: \"ui-toolbar\",\n topics: [\"menus\", \"navigation\", \"collections\"],\n aka: [\"toolbar\", \"tool bar\", \"scrolling tabs\", \"overflow menu\", \"chip bar\", \"scrollable menu\"],\n skeleton: \"inline 24 x 2.5\",\n description:\n \"A toolbar is a horizontal menu whose items scroll sideways when they don't fit, with a button at each end \" +\n \"while there's more to see that way; `shrinkable`, it fits their titles to its width instead. It takes every \" +\n \"`<ui-menu>` attribute.\",\n slots: [\n ...menuVocabulary.slots,\n { name: \"icon\", description: \"First, at the start: an icon or an icon button (a menu button).\" },\n { name: \"title\", description: \"After the icon: the title, never squeezed.\" },\n { name: \"center\", description: \"After the title, taking the room left: e.g. a row of links.\" },\n { name: \"right\", description: \"Last, pushed to the end: e.g. search and settings.\" }\n ],\n parts: [\n ...menuVocabulary.parts,\n { name: \"icon\", description: \"The `icon` slot's box.\" },\n { name: \"title\", description: \"The `title` slot's box.\" },\n { name: \"center\", description: \"The `center` slot's box.\" },\n { name: \"right\", description: \"The `right` slot's box.\" },\n { name: \"toolbar\", description: \"The box around the menu and its scroll buttons.\" },\n { name: \"scroll-start\", description: \"The `‹` button, shown while there's more to scroll back to.\" },\n { name: \"scroll-end\", description: \"The `›` button, shown while there's more to scroll on to.\" }\n ],\n states: [\n ...menuVocabulary.states,\n { name: \"overflowing\", description: \"Its items don't all fit: they scroll sideways (never once `shrinkable`).\" }\n ],\n texts: [\n ...menuVocabulary.texts,\n { key: \"scrollStart\", text: \"Scroll back\", description: \"Accessible name and tooltip of the `‹` button.\" },\n { key: \"scrollEnd\", text: \"Scroll on\", description: \"Accessible name and tooltip of the `›` button.\" }\n ]\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-toolbar>`: a menu whose items scroll sideways, with a `‹` / `›` button at each end.\n * - Adopted after `UIMenu.css`, which draws the menu and its items as for `<ui-menu>`.\n * This sheet only lays out the box around them (`.ui.toolbar`), keeps the items on one line,\n * and draws the two buttons.\n * - The menu's own box scrolls, its scrollbar hidden.\n * - The buttons sit over the row's ends, taking no room in it: the items never move as one comes and goes.\n * - Tokens (public, never declared here: read through private aliases):\n *\n * | Token | What | Default |\n * | --- | --- | --- |\n * | `--ui-toolbar-gap` | space between a button and the items | `0.25em` |\n * | `--ui-toolbar-button-size` | each button's width and height | `1.75em` |\n * | `--ui-toolbar-button-background` | a button at rest | `transparent` |\n * | `--ui-toolbar-button-hover-background` | a button under the pointer | a faint ink |\n * | `--ui-toolbar-button-color` | its chevron | `--ui-text-muted` |\n * | `--ui-toolbar-button-radius` | its corners | a circle; on a segmented track, the track's corner less its inset |\n */\n\n@layer ui.components.toolbar.types, ui.components.toolbar.states;\n\n@layer ui.components.toolbar.types {\n /* the toolbar itself (not an item, which adopts this sheet too): a box of its own, whose width the page sets */\n :host(:not(:state(in-menu))) {\n display: block;\n min-width: 0;\n max-width: 100%;\n }\n\n .ui.toolbar {\n --_ui-toolbar-gap: var(--ui-toolbar-gap, 0.25em);\n --_ui-toolbar-button-size: var(--ui-toolbar-button-size, 1.75em);\n --_ui-toolbar-button-background: var(--ui-toolbar-button-background, transparent);\n --_ui-toolbar-button-hover-background: var(\n --ui-toolbar-button-hover-background,\n oklch(from var(--ui-ink) l c h / 0.08)\n );\n --_ui-toolbar-button-color: var(--ui-toolbar-button-color, var(--ui-text-muted));\n --_ui-toolbar-button-radius: var(--ui-toolbar-button-radius, 50%);\n display: flex;\n align-items: center;\n gap: var(--_ui-toolbar-gap);\n min-width: 0;\n }\n\n /*\n * A bar's slots around the items: the icon and title at their own width, the center taking the room left,\n * the right pushed to the end; with no items, the menu's box takes no room\n */\n .ui.toolbar > :is(.icon, .title, .center, .right) {\n display: flex;\n align-items: center;\n gap: var(--_ui-toolbar-gap);\n min-width: 0;\n }\n .ui.toolbar > :is(.icon, .title, .right) {\n flex: none;\n }\n .ui.toolbar > .title {\n white-space: nowrap;\n }\n .ui.toolbar > .center {\n flex: 1 1 auto;\n }\n .ui.toolbar > .right {\n margin-inline-start: auto;\n }\n .ui.toolbar.empty > .ui.menu {\n display: none;\n }\n\n /* the menu's own box scrolls: its items on one line, never shrunk */\n .ui.toolbar > .ui.menu {\n --_ui-menu-item-flex: 0 0 auto;\n flex: 1 1 auto;\n flex-wrap: nowrap;\n min-width: 0;\n max-width: 100%;\n overflow-x: auto;\n overscroll-behavior-x: contain;\n scrollbar-width: none;\n }\n .ui.toolbar > .ui.menu::-webkit-scrollbar {\n display: none;\n }\n /*\n * a segmented track hugs its items, as a segmented menu does (`alignment=\"fluid\"` spreads it):\n * it shrinks and scrolls once they don't fit (Owen: \"second tab group doesn't need to be full width\")\n */\n .ui.toolbar > .ui.segmented.menu:not([class*=\"fluid aligned\"]) {\n flex: 0 1 auto;\n }\n /*\n * on a segmented track, a key's corners nest inside the track's (its radius less its border and padding),\n * as an end option's do: a circle in a less round track was rounder than the corner it sits in\n * (Owen: \"rounding of outer rings needs to be greater than rounding of inner bits\"); a pill track's stays a disc\n */\n .ui.toolbar:has(> .ui.segmented.menu) {\n --_ui-toolbar-button-radius: var(\n --ui-toolbar-button-radius,\n max(\n 0px,\n var(--ui-menu-segmented-radius, var(--ui-menu-radius, var(--ui-radius))) - var(--ui-border-width) -\n var(--ui-menu-segmented-padding, 0px)\n )\n );\n }\n\n /*\n * the two buttons: quiet round keys OVER the row's ends (anchored to the menu's box), taking no room in it\n * - room kept for a hidden `‹` left the row's start further in than its end\n * - the row fades out under a key while there's more that way\n * - a key's press stops on a whole item (scroll snap): without it, it could stop mid-label\n */\n .ui.toolbar {\n position: relative;\n }\n .ui.toolbar > .ui.menu {\n anchor-name: --ui-toolbar-menu;\n scroll-snap-type: x mandatory;\n scroll-padding-inline: var(--_ui-toolbar-button-size);\n --_toolbar-fade-start: 0px;\n --_toolbar-fade-end: 0px;\n /* each end's own fade: one shared width faded the start of a row that could only scroll on (debut I31) */\n --_toolbar-fade-in: 0px;\n --_toolbar-fade-out: 0px;\n /* clear under a key, then fading in over 1em */\n mask-image: linear-gradient(\n to right,\n transparent var(--_toolbar-fade-start),\n #000 calc(var(--_toolbar-fade-start) + var(--_toolbar-fade-in)),\n #000 calc(100% - var(--_toolbar-fade-end) - var(--_toolbar-fade-out)),\n transparent calc(100% - var(--_toolbar-fade-end))\n );\n }\n .ui.toolbar > .ui.menu ::slotted(*) {\n scroll-snap-align: start;\n }\n .ui.toolbar:has(> .scroll.start[data-can]) > .ui.menu {\n --_toolbar-fade-start: var(--_ui-toolbar-button-size);\n --_toolbar-fade-in: 1em;\n }\n .ui.toolbar:has(> .scroll.end[data-can]) > .ui.menu {\n --_toolbar-fade-end: var(--_ui-toolbar-button-size);\n --_toolbar-fade-out: 1em;\n }\n .ui.toolbar > .scroll {\n position: absolute;\n position-anchor: --ui-toolbar-menu;\n top: anchor(center);\n translate: 0 -50%;\n z-index: 1;\n display: inline-grid;\n flex: none;\n place-items: center;\n width: var(--_ui-toolbar-button-size);\n height: var(--_ui-toolbar-button-size);\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--_ui-toolbar-button-radius);\n font: inherit;\n color: var(--_ui-toolbar-button-color);\n background: var(--_ui-toolbar-button-background);\n cursor: pointer;\n }\n .ui.toolbar > .scroll.start {\n left: anchor(left);\n }\n .ui.toolbar > .scroll.end {\n right: anchor(right);\n }\n .ui.toolbar > .scroll > svg {\n width: 0.875em;\n height: 0.875em;\n fill: currentColor;\n pointer-events: none;\n }\n}\n\n@layer ui.components.toolbar.states {\n /* nothing to scroll: no buttons at all */\n .ui.toolbar > .scroll[hidden] {\n display: none;\n }\n /* at that end already: hidden (it takes no room in the row) */\n .ui.toolbar > .scroll:not([data-can]) {\n visibility: hidden;\n }\n .ui.toolbar > .scroll:hover {\n color: var(--ui-text-color);\n background: var(--_ui-toolbar-button-hover-background);\n }\n .ui.toolbar > .scroll:focus-visible {\n outline: var(--ui-focus-width) solid var(--ui-focus-color);\n outline-offset: 1px;\n }\n}\n","import { Show } from \"solid-js\"\nimport type { JSX } from \"@solidjs/web\"\n\nimport { E } from \"spell/ui/core\"\n// the family barrel, not the leaf:\n// the lib build then imports `ui-menu.js` instead of splitting a shared chunk\n// (SIDE EFFECT: defines `<ui-menu>` and `<ui-item>`, which a toolbar extends and holds)\nimport { UIMenu } from \"spell/ui/components/ui-menu\"\nimport type { menuVocabulary } from \"spell/ui/components/ui-menu/UIMenu.en\"\nimport { toolbarVocabulary } from \"./UIToolbar.en\"\n\nimport toolbarCSS from \"./UIToolbar.css?inline\"\n\n/****************\n * ### `<ui-toolbar>`\n * The component behind `<ui-toolbar>`: a horizontal menu whose items scroll sideways when they don't fit.\n *\n * <div class=\"ui toolbar\" part=\"toolbar\">\n * <div class=\"icon\" part=\"icon\"> <slot name=\"icon\"> </div> (each slot's box only while it has content)\n * <div class=\"title\" part=\"title\"> <slot name=\"title\"> </div>\n * <div class=\"center\" part=\"center\"> <slot name=\"center\"> </div> (takes the room left)\n * <button class=\"scroll start\" part=\"scroll-start\" aria-label title>‹</button>\n * <nav class=\"ui … menu\" part=\"menu\"> <slot> </nav> (the menu's own box, which scrolls)\n * <button class=\"scroll end\" part=\"scroll-end\" aria-label title>›</button>\n * <div class=\"right\" part=\"right\"> <slot name=\"right\"> </div> (pushed to the end)\n * </div>\n *\n * - It IS a `<ui-menu>` (it extends `UIMenu`): the same attributes, items, events, `segmented` thumb and menubar.\n * - Its vocabulary is built on the menu's (`UIToolbar.en.ts`).\n * - Its items never wrap:\n * when they don't fit, the menu's box scrolls sideways (`:state(overflowing)`), its scrollbar hidden.\n * - A `‹` / `›` button shows at each end while there's more to scroll that way.\n * - Each sits OVER its end of the row, taking no room in it; the row fades out under it.\n * - A click scrolls by most of the box's width, smoothly (at once with reduced motion),\n * and stops on a whole item.\n * - Neither shows when everything fits; the one at an end the row has reached is hidden.\n * - Out of the Tab order: the items themselves are what a keyboard reaches, and focusing one scrolls it in.\n * - It follows the box's size and its items' (`ResizeObserver`), and the scroll.\n * - `shrinkable` (the menu's): it never scrolls with `‹` / `›`; its titles fit the row instead, down to the menu's\n * overflow button (epic `epic-engine` Q38). Only a row too narrow for even that button scrolls, with no keys.\n * - A BAR's slots around the items, for a site's top bar:\n * `icon`, `title`, `center` (the room left), `right` (at the end).\n * - A slot with nothing in it draws no box; with no items, the menu's box takes no room.\n * - NOTE: left-to-right only, for now: in a right-to-left page `scrollLeft` counts the other way.\n ****************/\nexport class UIToolbar extends UIMenu {\n // the menu's names under the toolbar's tag: same shape, but TypeScript only knows the menu's literals\n @E.proto static vocabulary = toolbarVocabulary as unknown as typeof menuVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { ...UIMenu.prototype.elementSetup.styleSheets, toolbar: toolbarCSS }\n } satisfies Partial<E.ElementSetup>\n\n ////////////////\n // ## Scrolling\n ////////////////\n\n /** There's more to scroll back to (the `‹` button shows). */\n @E.state accessor canScrollStart = false\n\n /** There's more to scroll on to (the `›` button shows). */\n @E.state accessor canScrollEnd = false\n\n /** The items don't all fit: the box scrolls. */\n @E.cssState(\"overflowing\")\n get isOverflowing(): boolean {\n return this.canScrollStart || this.canScrollEnd\n }\n\n /** SIDE EFFECT: follows the box's scroll and the sizes of it and its items, once drawn; the cleanup stops. */\n @E.onChange(\"isReady\", \"shrinkable\")\n protected onReadyToScroll(isReady: boolean) {\n const box = this.box\n if (!isReady || !box) return\n const stop = new AbortController()\n box.addEventListener(\"scroll\", () => this.measure(), { passive: true, signal: stop.signal })\n const resizes = new ResizeObserver(() => this.measure())\n resizes.observe(box)\n const slot = box.querySelector(\"slot\")\n const watchItems = () => {\n for (const item of slot?.assignedElements() ?? []) resizes.observe(item)\n }\n watchItems()\n slot?.addEventListener(\"slotchange\", watchItems, { signal: stop.signal })\n this.measure()\n return () => {\n stop.abort()\n resizes.disconnect()\n }\n }\n\n /** Read where the box is scrolled to, and how far it can go. */\n private measure() {\n const box = this.box\n if (!box) return\n // a shrinkable one fits its titles instead: no keys, no fades\n const canScroll = !this.shrinkable\n const { start, end } = E.scrollEnds(box)\n this.canScrollStart = canScroll && start\n this.canScrollEnd = canScroll && end\n }\n\n /**\n * Scroll by most of the box's width: `-1` back, `1` on; smoothly, unless the person asked for less motion.\n * - The kit's `scrollByRow()`, as the site header's keys scroll its tabs.\n */\n @E.untracked\n scrollByPage(direction: -1 | 1) {\n if (this.box) E.scrollByRow(this.box, direction)\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n /** Which slots have light-DOM children: a bar's slot box draws only when it has some. */\n readonly slots = new E.SlotContent(this.domElement)\n\n render(): JSX.Element {\n return (\n <div class={[TOOLBAR_CLASS, { [EMPTY]: !this.slots.hasContent(\"\") }]} part={this.toolbarPart(\"toolbar\")}>\n {this.barSlot(ICON)}\n {this.barSlot(TITLE)}\n {this.barSlot(CENTER)}\n {this.scrollButton(START)}\n {super.render()}\n {this.scrollButton(END)}\n {this.barSlot(RIGHT)}\n </div>\n )\n }\n\n /** Bar slot `name`'s box, only while something is in it. */\n private barSlot(name: BarSlot): JSX.Element {\n const slotName = this.slotForName(name as never)\n return (\n <Show when={this.slots.hasContent(slotName)}>\n <div class={name} part={this.toolbarPart(name)}>\n <slot name={slotName} />\n </div>\n </Show>\n )\n }\n\n /** A part of the toolbar's own (its vocabulary adds them to the menu's, which TypeScript knows). */\n private toolbarPart(name: \"toolbar\" | \"scroll-start\" | \"scroll-end\" | BarSlot): string {\n return this.partForName(name as never)\n }\n\n /** The `‹` (`start`) or `›` (`end`) button: in the layout only while the items overflow, shown while it can go. */\n private scrollButton(end: typeof START | typeof END): JSX.Element {\n const isStart = end === START\n const label = () => this.translationForKey((isStart ? \"scrollStart\" : \"scrollEnd\") as never)\n const glyph = new E.IconGlyph({ owner: this, name: () => (isStart ? CHEVRON_START : CHEVRON_END) })\n return (\n <button\n type=\"button\"\n class={`${SCROLL} ${end}`}\n part={this.toolbarPart(isStart ? \"scroll-start\" : \"scroll-end\")}\n tabindex=\"-1\"\n aria-label={label()}\n title={label()}\n hidden={!this.isOverflowing}\n data-can={(isStart ? this.canScrollStart : this.canScrollEnd) ? \"\" : undefined}\n onClick={() => this.scrollByPage(isStart ? -1 : 1)}\n >\n <Show when={glyph.svg}>{(svg) => svg()}</Show>\n </button>\n )\n }\n}\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIToolbar extends E.AttributeValues<typeof menuVocabulary> {}\n\n////////////////\n// ## Constants\n////////////////\n\n/** Classes of the box around the menu and its buttons. */\nconst TOOLBAR_CLASS = \"ui toolbar\"\n\n/** Class word of the two scroll buttons. */\nconst SCROLL = \"scroll\"\n\n/** The `‹` button's end. */\nconst START = \"start\"\n\n/** The `›` button's end. */\nconst END = \"end\"\n\n/** The `‹` button's icon. */\nconst CHEVRON_START = \"chevron left\"\n\n/** The `›` button's icon. */\nconst CHEVRON_END = \"chevron right\"\n\n/** Class word of a toolbar with no items: its menu box takes no room. */\nconst EMPTY = \"empty\"\n\n/** The bar's `icon` slot (and its box's class word and part). */\nconst ICON = \"icon\"\n\n/** The bar's `title` slot. */\nconst TITLE = \"title\"\n\n/** The bar's `center` slot: the room left after the icon and title. */\nconst CENTER = \"center\"\n\n/** The bar's `right` slot: at the end. */\nconst RIGHT = \"right\"\n\n/** A slot of the bar's layout around the items. */\ntype BarSlot = typeof ICON | typeof TITLE | typeof CENTER | typeof RIGHT\n","/**\n * The toolbar family: defines `<ui-toolbar>` and exports its component, `UIToolbar`.\n * - SIDE EFFECT: importing it defines the tag.\n * `UIToolbar` imports the menu family first, which defines `<ui-menu>` and `<ui-item>`:\n * a toolbar extends the menu, and holds generic items.\n * - Also the library's `spell/ui/ui-toolbar` entry (its size is in `notes/report.md`).\n */\n\nimport { UIToolbar } from \"./UIToolbar\"\n\nUIToolbar.define()\n\nexport { UIToolbar }\n"],"mappings":";;;;;;AAmBA,IAAasC,IAAoB;CAC/B,GAAGF;CACH,KAAK;CACL,QAAQ;EAAC;EAAS;EAAc;CAAa;CAC7C,KAAK;EAAC;EAAW;EAAY;EAAkB;EAAiB;EAAY;CAAiB;CAC7F,UAAU;CACV,aACE;CAGF,OAAO;EACL,GAAGA,EAAe;EAClB;GAAE,MAAM;GAAQ,aAAa;EAAmE;EAChG;GAAE,MAAM;GAAS,aAAa;EAA8C;EAC5E;GAAE,MAAM;GAAU,aAAa;EAA+D;EAC9F;GAAE,MAAM;GAAS,aAAa;EAAsD;CACtF;CACA,OAAO;EACL,GAAGA,EAAe;EAClB;GAAE,MAAM;GAAQ,aAAa;EAAyB;EACtD;GAAE,MAAM;GAAS,aAAa;EAA0B;EACxD;GAAE,MAAM;GAAU,aAAa;EAA2B;EAC1D;GAAE,MAAM;GAAS,aAAa;EAA0B;EACxD;GAAE,MAAM;GAAW,aAAa;EAAkD;EAClF;GAAE,MAAM;GAAgB,aA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AoB,GAAMG,CAAA,GAAyB5B,EAAA4B,GAAA,WAAA,GAE3BzB,EAFEyB,GAEK,cAAapB,EAApBiB,GAAA,IAFEG,GAEkBhB,CAAA,CAAA,GAApBJ,EAAAiB,GAAA,IAFEG,CAAA,GAGIzB,EAHJyB,GAGW,gBAAepB,EAAtBiB,GAAA,IAHJG,GAG0B,EACnC,aAAa;CAAE,GAAGC,EAAO,UAAU,aAAa;CAAa,SAAS5B;AAAW,EACnF,CAAA,CAAA,GAFeO,EAAAiB,GAAA,IAHJG,CAAA;AAAN,IAAMkE,IAANlE,GAqIDwC,IAAgB,cAGhBsB,IAAS,UAGT3B,IAAQ,SAGRC,IAAM,OAGNqB,IAAgB,gBAGhBC,IAAc,iBAGdjB,IAAQ,SAGRT,KAAO,QAGPC,KAAQ,SAGRC,KAAS,UAGTG,KAAQ;;;cCtMd6B,EAAU,OAAO"}
1
+ {"version":3,"file":"ui-toolbar.js","names":["this","<div\n class={[TOOLBAR_CLASS, SCROLLING_ROW, { [EMPTY]: !this.slots.hasContent(\"\") }]}\n part={this.toolbarPart(\"toolbar\")}\n >\n {this.barSlot(ICON)}\n {this.barSlot(TITLE)}\n {this.barSlot(CENTER)}\n {this.scrolling.key(START)}\n {super.render()}\n {this.scrolling.key(END)}\n {this.barSlot(RIGHT)}\n </div>","part={this.toolbarPart(\"toolbar\")}","<Show when={this.slots.hasContent(slotName)}>\n <div class={name} part={this.toolbarPart(name)}>\n <slot name={slotName} />\n </div>\n </Show>","part={this.toolbarPart(name)}","<div class={name} part={this.toolbarPart(name)}>\n <slot name={slotName} />\n </div>","E.proto","E.protoMerged","E.cssState","E.onChange","E.untracked","E.SlotContent","_$readShallow","_$setAttribute","_$createComponent","_$getOwner","__name","scrollingRowCSS","toolbarCSS","__name$1","__publicField","__decorateElement","__decoratorMetadata","__runInitializers","__decoratorStart","menuVocabulary","START","ScrollingRow","ScrollingRow_default","getOwner$1","toolbarVocabulary","UIToolbar_default","_tmpl$","_tmpl$2","_scrollByPage_dec","_onReadyToScroll_dec","_isOverflowing_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_UIToolbar","UIMenu","proto","protoMerged","cssState","onChange","untracked","SlotContent","box","isReady","direction","_self$","_el$","_el$2","_el$3","_el$4","_el$5","_el$6","_el$7","_el$8","insert","ICON","TITLE","CENTER","RIGHT","effect","readShallow","TOOLBAR_CLASS","SCROLLING_ROW","EMPTY","className","_p$","t","setAttribute","slotName","name","_self$2","createComponent","Show","_el$9","_el$10","UIToolbar"],"sources":["../src/components/ui-toolbar/UIToolbar.en.ts","../src/components/ui-toolbar/UIToolbar.css?inline","../src/components/ui-toolbar/UIToolbar.tsx","../src/components/ui-toolbar/index.ts"],"sourcesContent":["/**\n * The English vocabulary of `<ui-toolbar>`: `<ui-menu>`'s, under the toolbar's own tag, with its scroll buttons.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Built ON the menu's: the same attributes, events, slots, states and owned parts,\n * so an attribute the menu gains reaches the toolbar with no change here.\n * - Its own: the `toolbar` box around the menu,\n * the two scroll buttons (`scroll-start`, `scroll-end`) and their names.\n * - Its slots, a bar's layout: `icon`, `title`, `center` and `right` around the items (the default slot).\n * - The same noun (`menu`): its items draw as a menu's, and `UIMenu.css` styles it.\n */\n\nimport type { E } from \"spell/ui/core\"\nimport { menuVocabulary } from \"spell/ui/components/ui-menu/UIMenu.en\"\n\n/****************\n * ### `toolbarVocabulary`\n * The names of `<ui-toolbar>`, a toolbar: a horizontal menu whose items scroll sideways when they don't fit,\n * with a `‹` / `›` button at each end while there's more that way.\n ****************/\nexport const toolbarVocabulary = {\n ...menuVocabulary,\n tag: \"ui-toolbar\",\n icon: \"tools\",\n topics: [\"menus\", \"navigation\", \"collections\"],\n aka: [\"toolbar\", \"tool bar\", \"scrolling tabs\", \"overflow menu\", \"chip bar\", \"scrollable menu\"],\n skeleton: \"inline 24 x 2.5\",\n description:\n \"A toolbar is a horizontal menu whose items scroll sideways when they don't fit, with a button at each end \" +\n \"while there's more to see that way; `shrinkable`, it fits their titles to its width instead. It takes every \" +\n \"`<ui-menu>` attribute.\",\n attributes: [\n ...menuVocabulary.attributes,\n {\n name: \"scroll-first\",\n group: \"layout\",\n kind: \"boolean\",\n description:\n \"With `shrinkable`: once only its icons are left, they scroll with `‹` / `›`, no overflow button. \" +\n \"With a `segmented` look too: when its items don't fit, they scroll with `‹` / `›` while there's \" +\n \"`--ui-toolbar-scroll-min` (200px) to show them in; only then the dropdown. For a row of many, such as files.\"\n }\n ],\n slots: [\n ...menuVocabulary.slots,\n { name: \"icon\", description: \"First, at the start: an icon or an icon button (a menu button).\" },\n { name: \"title\", description: \"After the icon: the title, never squeezed.\" },\n { name: \"center\", description: \"After the title, taking the room left: e.g. a row of links.\" },\n { name: \"right\", description: \"Last, pushed to the end: e.g. search and settings.\" }\n ],\n parts: [\n ...menuVocabulary.parts,\n { name: \"icon\", description: \"The `icon` slot's box.\" },\n { name: \"title\", description: \"The `title` slot's box.\" },\n { name: \"center\", description: \"The `center` slot's box.\" },\n { name: \"right\", description: \"The `right` slot's box.\" },\n { name: \"toolbar\", description: \"The box around the menu and its scroll buttons.\" },\n { name: \"scroll-start\", description: \"The `‹` button, shown while there's more to scroll back to.\" },\n { name: \"scroll-end\", description: \"The `›` button, shown while there's more to scroll on to.\" }\n ],\n states: [\n ...menuVocabulary.states,\n {\n name: \"overflowing\",\n description: \"Its items don't all fit: they scroll sideways (once `shrinkable`, only with `scroll-first`).\"\n }\n ],\n texts: [\n ...menuVocabulary.texts,\n { key: \"scrollStart\", text: \"Scroll back\", description: \"Accessible name and tooltip of the `‹` button.\" },\n { key: \"scrollEnd\", text: \"Scroll on\", description: \"Accessible name and tooltip of the `›` button.\" }\n ]\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-toolbar>`: a menu whose items scroll sideways, with a `‹` / `›` key at each end.\n * - Adopted after `UIMenu.css`, which draws the menu and its items as for `<ui-menu>`,\n * and the scrolling row's sheet (`ScrollingRow.css`, the menu family's), which scrolls the row and draws the keys:\n * `<ui-tabs>`' tab list scrolls the same way.\n * This sheet only lays out the bar around them (`.ui.toolbar`): its slots, a segmented track, a header's row.\n * - Tokens (public, never declared here: read through private aliases); the keys' are the scrolling row's:\n *\n * | Token | What | Default |\n * | --- | --- | --- |\n * | `--ui-toolbar-gap` | space between a key and the items | `0.25em` |\n * | `--ui-toolbar-button-radius` | a key's corners | a circle; on a segmented track, the track's corner less its inset |\n */\n\n@layer ui.components.toolbar.types;\n\n@layer ui.components.toolbar.types {\n /* the toolbar itself (not an item, which adopts this sheet too): a box of its own, whose width the page sets */\n :host(:not(:state(in-menu))) {\n display: block;\n min-width: 0;\n max-width: 100%;\n }\n\n .ui.toolbar {\n --_ui-toolbar-gap: var(--ui-toolbar-gap, 0.25em);\n display: flex;\n align-items: center;\n gap: var(--_ui-toolbar-gap);\n min-width: 0;\n }\n\n /*\n * A bar's slots around the items: the icon and title at their own width, the center taking the room left,\n * the right pushed to the end; with no items, the menu's box takes no room\n */\n .ui.toolbar > :is(.icon, .title, .center, .right) {\n display: flex;\n align-items: center;\n gap: var(--_ui-toolbar-gap);\n min-width: 0;\n }\n .ui.toolbar > :is(.icon, .title, .right) {\n flex: none;\n }\n .ui.toolbar > .title {\n white-space: nowrap;\n }\n .ui.toolbar > .center {\n flex: 1 1 auto;\n }\n .ui.toolbar > .right {\n margin-inline-start: auto;\n }\n .ui.toolbar.empty > .ui.menu {\n display: none;\n }\n\n /*\n * the menu's own box scrolls (the scrolling row's sheet): it takes the room left, its items never shrunk\n * - none of a menu's margin beside its siblings: the keys and slots before it aren't other blocks,\n * and its 1em above and below made a 40px bar 68px tall (epic `data` I87)\n */\n .ui.toolbar > .ui.menu:not(.equal) {\n --_ui-menu-item-flex: 0 0 auto;\n }\n .ui.toolbar > .ui.menu {\n --_menu-margin-top: 0;\n --_menu-margin-bottom: 0;\n flex: 1 1 auto;\n }\n /*\n * a segmented track hugs its items, as a segmented menu does (`alignment=\"fluid\"` spreads it):\n * it shrinks and scrolls once they don't fit (Owen: \"second tab group doesn't need to be full width\")\n */\n .ui.toolbar > .ui.segmented.menu:not([class*=\"fluid aligned\"]) {\n flex: 0 1 auto;\n }\n /*\n * a header's row (`appearance=\"segmented header\"`): its items hug their words, its actions at the far end\n * - the actions as quiet as its caret, each with room to press: `--ui-toolbar-header-action-gap`\n */\n .ui.toolbar > .ui.segmented.header.menu:not([class*=\"fluid aligned\"]) {\n --_ui-menu-item-flex: 0 0 auto;\n flex: 0 1 auto;\n }\n .ui.toolbar:has(> .ui.segmented.header.menu) > .right {\n --ui-icon-width: auto;\n --ui-icon-distance: 0;\n --ui-icon-link-opacity: 1;\n gap: var(--ui-toolbar-header-action-gap, 10px);\n margin-inline-start: auto;\n padding-inline-start: 8px;\n color: var(--ui-text-muted);\n font-size: var(--ui-menu-segmented-header-font-size, 13px);\n }\n\n /*\n * on a segmented track, a key's corners nest inside the track's (its radius less its border and padding),\n * as an end option's do: a circle in a less round track was rounder than the corner it sits in\n * (Owen: \"rounding of outer rings needs to be greater than rounding of inner bits\"); a pill track's stays a disc\n */\n .ui.toolbar:has(> .ui.segmented.menu) {\n --_ui-toolbar-button-radius: var(\n --ui-toolbar-button-radius,\n max(\n 0px,\n var(--ui-menu-segmented-radius, var(--ui-menu-radius, var(--ui-radius))) - var(--ui-border-width) -\n var(--ui-menu-segmented-padding, 0px)\n )\n );\n }\n}\n","import { Show } from \"solid-js\"\nimport type { JSX } from \"@solidjs/web\"\n\nimport { E } from \"spell/ui/core\"\n// the family barrel, not the leaf:\n// the lib build then imports `ui-menu.js` instead of splitting a shared chunk\n// (SIDE EFFECT: defines `<ui-menu>` and `<ui-item>`, which a toolbar extends and holds)\nimport { UIMenu } from \"spell/ui/components/ui-menu\"\nimport type { menuVocabulary } from \"spell/ui/components/ui-menu/UIMenu.en\"\n// The menu family's, beside its sheet (below): `<ui-tabs>`' tab list scrolls the same way\nimport { ScrollingRow, START, END } from \"spell/ui/components/ui-menu/ScrollingRow\"\nimport { toolbarVocabulary } from \"./UIToolbar.en\"\n\nimport scrollingRowCSS from \"spell/ui/components/ui-menu/ScrollingRow.css?inline\"\nimport toolbarCSS from \"./UIToolbar.css?inline\"\n\n/****************\n * ### `<ui-toolbar>`\n * The component behind `<ui-toolbar>`: a horizontal menu whose items scroll sideways when they don't fit.\n *\n * <div class=\"ui toolbar scrolling-row\" part=\"toolbar\">\n * <div class=\"icon\" part=\"icon\"> <slot name=\"icon\"> </div> (each slot's box only while it has content)\n * <div class=\"title\" part=\"title\"> <slot name=\"title\"> </div>\n * <div class=\"center\" part=\"center\"> <slot name=\"center\"> </div> (takes the room left)\n * <button class=\"scroll start\" part=\"scroll-start\" aria-label title>‹</button>\n * <nav class=\"ui … menu\" part=\"menu\"> <slot> </nav> (the menu's own box, which scrolls)\n * <button class=\"scroll end\" part=\"scroll-end\" aria-label title>›</button>\n * <div class=\"right\" part=\"right\"> <slot name=\"right\"> </div> (pushed to the end)\n * </div>\n *\n * - It IS a `<ui-menu>` (it extends `UIMenu`): the same attributes, items, events, `segmented` thumb and menubar.\n * - Its vocabulary is built on the menu's (`UIToolbar.en.ts`).\n * - Its items never wrap:\n * when they don't fit, the menu's box scrolls sideways (`:state(overflowing)`), its scrollbar hidden.\n * - A `‹` / `›` button shows at each end while there's more to scroll that way.\n * - Each sits OVER its end of the row, taking no room in it; the row fades out under it.\n * - A click scrolls by most of the box's width, smoothly (at once with reduced motion),\n * and stops on a whole item.\n * - Neither shows when everything fits; the one at an end the row has reached is hidden.\n * - Out of the Tab order: the items themselves are what a keyboard reaches, and focusing one scrolls it in.\n * - It follows the box's size and its items' (`ResizeObserver`), and the scroll.\n * - The scrolling, its keys and their look are the menu family's `ScrollingRow`, `<ui-tabs>`' too.\n * - `shrinkable` (the menu's): it never scrolls with `‹` / `›`; its titles fit the row instead, down to the menu's\n * overflow button (epic `epic-engine` Q38). Only a row too narrow for even that button scrolls, with no keys.\n * - `scroll-first`, without a `segmented` look: once only its icons are left, it scrolls with them, no overflow button.\n * - `scroll-first`, with a `segmented` look: it does scroll with them while the row has `--ui-toolbar-scroll-min`\n * (200px) to show, then it's the dropdown: a row of many files stays a row for as long as it can.\n * - A BAR's slots around the items, for a site's top bar:\n * `icon`, `title`, `center` (the room left), `right` (at the end).\n * - A slot with nothing in it draws no box; with no items, the menu's box takes no room.\n * - NOTE: left-to-right only, for now: in a right-to-left page `scrollLeft` counts the other way.\n ****************/\nexport class UIToolbar extends UIMenu {\n // the menu's names under the toolbar's tag: same shape, but TypeScript only knows the menu's literals\n @E.proto static vocabulary = toolbarVocabulary as unknown as typeof menuVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { ...UIMenu.prototype.elementSetup.styleSheets, scrollingRow: scrollingRowCSS, toolbar: toolbarCSS }\n } satisfies Partial<E.ElementSetup>\n\n ////////////////\n // ## Scrolling\n ////////////////\n\n /** The row that scrolls: its menu's box, with a `‹` / `›` key at each end. */\n readonly scrolling = new ScrollingRow({\n owner: this,\n // a shrinkable one fits its titles instead: no keys, no fades; unless it scrolls first, and is still whole\n canScroll: () => !this.shrinkable || (!!this.scrollFirst && !this.isDropdown)\n })\n\n /** The items don't all fit: the box scrolls. */\n @E.cssState(\"overflowing\")\n get isOverflowing(): boolean {\n return this.scrolling.isOverflowing\n }\n\n /** `scroll-first`: the row scrolls before it's a dropdown. */\n protected get scrollsFirst(): boolean {\n return !!this.scrollFirst\n }\n\n /** SIDE EFFECT: follows the box's scroll and the sizes of it and its items, once drawn; the cleanup stops. */\n @E.onChange(\"isReady\", \"shrinkable\", \"scrollFirst\", \"fitAnswer\")\n protected onReadyToScroll(isReady: boolean) {\n const box = this.box\n if (!isReady || !box) return\n return this.scrolling.follow(box)\n }\n\n /**\n * Scroll by most of the box's width: `-1` back, `1` on; smoothly, unless the person asked for less motion.\n * - The kit's `scrollByRow()`, as the site header's keys scroll its tabs.\n */\n @E.untracked\n scrollByPage(direction: -1 | 1) {\n this.scrolling.scrollByPage(direction)\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n /** Which slots have light-DOM children: a bar's slot box draws only when it has some. */\n readonly slots = new E.SlotContent(this.domElement)\n\n render(): JSX.Element {\n return (\n <div\n class={[TOOLBAR_CLASS, SCROLLING_ROW, { [EMPTY]: !this.slots.hasContent(\"\") }]}\n part={this.toolbarPart(\"toolbar\")}\n >\n {this.barSlot(ICON)}\n {this.barSlot(TITLE)}\n {this.barSlot(CENTER)}\n {this.scrolling.key(START)}\n {super.render()}\n {this.scrolling.key(END)}\n {this.barSlot(RIGHT)}\n </div>\n )\n }\n\n /** Bar slot `name`'s box, only while something is in it. */\n private barSlot(name: BarSlot): JSX.Element {\n const slotName = this.slotForName(name as never)\n return (\n <Show when={this.slots.hasContent(slotName)}>\n <div class={name} part={this.toolbarPart(name)}>\n <slot name={slotName} />\n </div>\n </Show>\n )\n }\n\n /** A part of the toolbar's own (its vocabulary adds them to the menu's, which TypeScript knows). */\n private toolbarPart(name: \"toolbar\" | \"scroll-start\" | \"scroll-end\" | BarSlot): string {\n return this.partForName(name as never)\n }\n}\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIToolbar extends E.AttributeValues<typeof toolbarVocabulary> {}\n\n////////////////\n// ## Constants\n////////////////\n\n/** Classes of the box around the menu and its buttons. */\nconst TOOLBAR_CLASS = \"ui toolbar\"\n\n/** Class word of a row that scrolls (`ScrollingRow.css`). */\nconst SCROLLING_ROW = \"scrolling-row\"\n\n/** Class word of a toolbar with no items: its menu box takes no room. */\nconst EMPTY = \"empty\"\n\n/** The bar's `icon` slot (and its box's class word and part). */\nconst ICON = \"icon\"\n\n/** The bar's `title` slot. */\nconst TITLE = \"title\"\n\n/** The bar's `center` slot: the room left after the icon and title. */\nconst CENTER = \"center\"\n\n/** The bar's `right` slot: at the end. */\nconst RIGHT = \"right\"\n\n/** A slot of the bar's layout around the items. */\ntype BarSlot = typeof ICON | typeof TITLE | typeof CENTER | typeof RIGHT\n","/**\n * The toolbar family: defines `<ui-toolbar>` and exports its component, `UIToolbar`.\n * - SIDE EFFECT: importing it defines the tag.\n * `UIToolbar` imports the menu family first, which defines `<ui-menu>` and `<ui-item>`:\n * a toolbar extends the menu, and holds generic items.\n * - Also the library's `spell/ui/ui-toolbar` entry (its size is in `notes/report.md`).\n */\n\nimport { UIToolbar } from \"./UIToolbar\"\n\nUIToolbar.define()\n\nexport { UIToolbar }\n"],"mappings":";;;;;;;AAmBA,IAAa8B,IAAoB;CAC/B,GAAGL;CACH,KAAK;CACL,MAAM;CACN,QAAQ;EAAC;EAAS;EAAc;CAAa;CAC7C,KAAK;EAAC;EAAW;EAAY;EAAkB;EAAiB;EAAY;CAAiB;CAC7F,UAAU;CACV,aACE;CAGF,YAAY,CACV,GAAGA,EAAe,YAClB;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,aACE;CAGJ,CACF;CACA,OAAO;EACL,GAAGA,EAAe;EAClB;GAAE,MAAM;GAAQ,aAAa;EAAmE;EAChG;GAAE,MAAM;GAAS,aAAa;EAA8C;EAC5E;GAAE,MAAM;GAAU,aAAa;EAA+D;EAC9F;GAAE,MAAM;GAAS,aAAa;EAAsD;CACtF;CACA,OAAO;EACL,GAAGA,EAAe;EAClB;GAAE,MAAM;GAAQ,aAAa;EAAyB;EACtD;GAAE,MAAM;GAAS,aAAa;EAA0B;EACxD;GAAE,MAAM;GAAU,aAAa;EAA2B;EAC1D;GAAE,MAAM;GAAS,aAAa;EAA0B;EACxD;GAAE,MAAM;GAAW,aAAa;EAAkD;EAClF;GAAE,MAAM;GAAgB,aAAa;EAA8D;EACnG;GAAE,MAAM;GAAc,aAAa;EAA4D;CACjG;CACA,QAAQ,CACN,GAAGA,EAAe,QAClB;EACE,MAAM;EACN,aAAa;CACf,CACF;CACA,OAAO;EACL,GAAGA,EAAe;EAClB;GAAE,KAAK;GAAe,MAAM;GAAe,aAAa;EAAiD;EACzG;GAAE,KAAK;GAAa,MAAM;GAAa,aAAa;EAAiD;CACvG;AACF,y+CEvEAS,GAAA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,GAEFpB,EAAAmB,GAAA,IAAO,cAAhBF,GAFWG,CAAA,GAGIpB,EAAAmB,GAAA,IAAO,gBAAtBH,GAHWI,CAAA,GAANnB,EAAAkB,GAAMC,CAAA,GAAyBzB,EAAAyB,GAAA,WAAA,GAE3BrB,EAFEqB,GAEK,cAAalB,EAApBiB,GAAA,GAFEC,GAEkBX,CAAA,CAAA,GAApBP,EAAAiB,GAAA,IAFEC,CAAA,GAGIrB,EAHJqB,GAGW,gBAAelB,EAAtBiB,GAAA,IAHJC,GAG0B,EACnC,aAAa;CAAE,GAAGC,EAAO,UAAU,aAAa;CAAa,cAAczB;CAAiB,SAASC;AAAW,EAClH,CAAA,CAAA,GAFeK,EAAAiB,GAAA,IAHJC,CAAA;AAAN,IAAMyC,IAANzC,GA+FD2B,IAAgB,cAGhBC,IAAgB,iBAGhBC,IAAQ,SAGRR,IAAO,QAGPC,IAAQ,SAGRC,IAAS,UAGTC,IAAQ;;;AC3JdiB,EAAU,OAAO"}
@@ -1,9 +1,10 @@
1
1
  import "./rolldown-runtime-CYGlBXrH.js";
2
- import { At as e, Bt as t, DOMElement as n, Ft as r, It as i, Lt as a, Rt as o, UI as s, UIComponent as c, Vt as l, Warnings as u, a as d, cssState as f, m as p, on as m, proto as h, protoMerged as g, state as _, untracked as v, zt as y } from "./core.js";
2
+ import { Bt as e, DOMElement as t, Ht as n, Lt as r, Mt as i, Rt as a, UI as o, UIComponent as s, Ut as c, Vt as l, Warnings as u, a as d, cssState as f, m as p, on as m, proto as h, protoMerged as g, state as _, untracked as v, zt as y } from "./core.js";
3
3
  import { className as b, effect as x, getOwner as S, isServer as C, readShallow as w, ref as T, setAttribute as E, template as D } from "@solidjs/web";
4
4
  //#region src/components/ui-transition/UITransition.en.ts
5
5
  var O = {
6
6
  tag: "ui-transition",
7
+ icon: "magic",
7
8
  topics: ["animation", "modules"],
8
9
  aka: [
9
10
  "animate",
@@ -100,9 +101,9 @@ var O = {
100
101
  description: "An animation is running."
101
102
  }],
102
103
  texts: []
103
- }, k = "@layer ui.components.transition.types{:host{display:contents}.ui.transition{box-sizing:border-box}.ui.transition slot{--ui-color:initial;--ui-color-text:initial;--ui-color-header:initial;--ui-color-border:initial;--ui-color-background:initial;--ui-color-inverted:initial;--ui-color-on:initial;--ui-color-inverted-on:initial}}@layer ui.components.transition.content;@layer ui.components.transition.variations{.ui.inline.transition{vertical-align:top;display:inline-block}.ui.inverted.pulsating.transition{--ui-color:var(--ui-transition-inverted-pulse,oklch(97% 0 0))}}@layer ui.components.transition.states{.ui.transition[hidden]{display:none}}", A = /* @__PURE__ */ D("<div><slot>"), j, M, N, P, F, I, L, R, z, B, V, H, DOMTransitionElement = class extends n {
104
+ }, k = "@layer ui.components.transition.types{:host{display:contents}.ui.transition{box-sizing:border-box}.ui.transition slot{--ui-color:initial;--ui-color-text:initial;--ui-color-header:initial;--ui-color-border:initial;--ui-color-background:initial;--ui-color-inverted:initial;--ui-color-on:initial;--ui-color-inverted-on:initial}}@layer ui.components.transition.content;@layer ui.components.transition.variations{.ui.inline.transition{vertical-align:top;display:inline-block}.ui.inverted.pulsating.transition{--ui-color:var(--ui-transition-inverted-pulse,oklch(97% 0 0))}}@layer ui.components.transition.states{.ui.transition[hidden]{display:none}}", A = /* @__PURE__ */ D("<div><slot>"), j, M, N, P, F, I, L, R, z, B, V, H, DOMTransitionElement = class extends t {
104
105
  static {
105
- o(this, "DOMTransitionElement");
106
+ e(this, "DOMTransitionElement");
106
107
  }
107
108
  show() {
108
109
  return this.component?.animateTo(!0) ?? Promise.resolve(!1);
@@ -116,9 +117,9 @@ var O = {
116
117
  transition(e) {
117
118
  return this.component?.transition(e) ?? Promise.resolve(!1);
118
119
  }
119
- }, U = class _UITransition extends (z = c, R = [h], L = [g], I = [_], F = [f("animating"), _], P = [m("command")], N = [v], M = [v], j = [v], z) {
120
+ }, U = class _UITransition extends (z = s, R = [h], L = [g], I = [_], F = [f("animating"), _], P = [m("command")], N = [v], M = [v], j = [v], z) {
120
121
  constructor() {
121
- super(...arguments), l(B, 5, this), y(this, V, l(B, 8, this, this.isVisible)), l(B, 11, this), y(this, H, l(B, 12, this, !1)), l(B, 15, this), t(this, "willBeVisible", this.isVisible), t(this, "box"), t(this, "queue", []), t(this, "runningStep");
122
+ super(...arguments), c(B, 5, this), l(this, V, c(B, 8, this, this.isVisible)), c(B, 11, this), l(this, H, c(B, 12, this, !1)), c(B, 15, this), n(this, "willBeVisible", this.isVisible), n(this, "box"), n(this, "queue", []), n(this, "runningStep");
122
123
  }
123
124
  onVisibleChange(e, t) {
124
125
  return (e === this.willBeVisible ? this.lastDone() : this.queueVisibility(e, t)).then(() => void 0);
@@ -161,9 +162,9 @@ var O = {
161
162
  let t = d.fomanticNameFor(e);
162
163
  return t ? d.isAttention(t) ? this.enqueue(G, t) : this.animateTo(!this.willBeVisible, t) : (u.warn(`<${this.domElement.localName}>.transition()`, `unknown animation ${JSON.stringify(e)}; use one of Fomantic's names (\`fade up\`) or the runtime's (\`fade-up\`)`), Promise.resolve(!1));
163
164
  }
164
- onCommand(t) {
165
- let { command: n } = t;
166
- n === e.show ? this.animateTo(!0) : n === e.close ? this.animateTo(!1) : n === e.toggle ? this.toggle() : n === e.transition && this.transition();
165
+ onCommand(e) {
166
+ let { command: t } = e;
167
+ t === i.show ? this.animateTo(!0) : t === i.close ? this.animateTo(!1) : t === i.toggle ? this.toggle() : t === i.transition && this.transition();
167
168
  }
168
169
  queueVisibility(e, t) {
169
170
  return this.willBeVisible = e, this.enqueue(e ? "in" : "out", t);
@@ -196,7 +197,7 @@ var O = {
196
197
  if (!t?.isConnected) return t && e.direction !== G && (t.hidden = e.direction === "out"), Promise.resolve(!1);
197
198
  if (e.animation === "none" || this.animationToRun === "none" || e.direction !== G && d.isAttention(e.animation)) return e.direction !== G && (t.hidden = e.direction === "out"), Promise.resolve(!0);
198
199
  let n = d.runtimeNameFor(e.animation);
199
- return s.transitions.animate({
200
+ return o.transitions.animate({
200
201
  element: t,
201
202
  name: n,
202
203
  direction: e.direction,
@@ -218,13 +219,13 @@ var O = {
218
219
  return e ? { duration: p.test(e) ? Number(e) : e } : {};
219
220
  }
220
221
  };
221
- B = a(z), V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), r(B, 4, "isShowing", I, U, V), r(B, 4, "isAnimating", F, U, H), r(B, 1, "onCommand", P, U), r(B, 1, "enqueue", N, U), r(B, 2, "ownAnimation", M, U), r(B, 2, "animateOptions", j, U), r(B, 13, "vocabulary", R, U), r(B, 13, "elementSetup", L, U), i(B, U), o(U, "UITransition"), t(U, "vocabulary", l(B, 16, U, O)), l(B, 19, U), t(U, "elementSetup", l(B, 20, U, {
222
+ B = y(z), V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), r(B, 4, "isShowing", I, U, V), r(B, 4, "isAnimating", F, U, H), r(B, 1, "onCommand", P, U), r(B, 1, "enqueue", N, U), r(B, 2, "ownAnimation", M, U), r(B, 2, "animateOptions", j, U), r(B, 13, "vocabulary", R, U), r(B, 13, "elementSetup", L, U), a(B, U), e(U, "UITransition"), n(U, "vocabulary", c(B, 16, U, O)), c(B, 19, U), n(U, "elementSetup", c(B, 20, U, {
222
223
  styleSheets: { transition: k },
223
224
  DOMElement: DOMTransitionElement,
224
225
  delegatesFocus: !1,
225
226
  disabled: "its own",
226
227
  visible: "hidden"
227
- })), l(B, 23, U);
228
+ })), c(B, 23, U);
228
229
  var W = U, G = "static";
229
230
  //#endregion
230
231
  //#region src/components/ui-transition/index.ts
@@ -1 +1 @@
1
- {"version":3,"file":"ui-transition.js","names":["this","part={this.partForName(\"transition\")}","hidden={!this.willBeVisible || void 0}","ref={(element) => this.attach(element)}","<div ref={(element) => this.attach(element)} class={this.rootClass} part={this.partForName(\"transition\")}>\n <slot />\n </div>","E.DOMElement","E.UIComponent","E.proto","E.protoMerged","E.state","E.cssState","E.on","E.untracked","_$getOwner","_$readShallow","_$setAttribute","__name","transitionCSS","TransitionCommands","__publicField","__decorateElement","__decoratorMetadata","__decoratorStart","__name$1","__runInitializers","AnimationLookup","DIGITS","__privateAdd","transitionVocabulary","UITransition_default","_tmpl$","_animateOptions_dec","_ownAnimation_dec","_enqueue_dec","_onCommand_dec","_isAnimating_dec","_isShowing_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_isShowing","_isAnimating","DOMElement","animation","_UITransition","UIComponent","proto","protoMerged","state","cssState","on","untracked","visible","_self$","isServer","_el$","_el$2","getOwner","effect","readShallow","className","_p$","t","setAttribute","a","_self$2","_el$3","_el$4","ref","element","box","done","name","STATIC","Warnings","event","command","last","direction","isInterrupting","dropped","resolve","settle","step","isCompleted","UI","detail","duration","UITransition"],"sources":["../src/components/ui-transition/UITransition.en.ts","../src/components/ui-transition/UITransition.css?inline","../src/components/ui-transition/UITransition.tsx","../src/components/ui-transition/index.ts"],"sourcesContent":["/**\n * Every name `<ui-transition>` uses: tag, attributes (kind + allowed values), events, slots, parts, states, texts.\n * Schema: `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Class words come out through `ClassBuilder`, in Fomantic's grammar:\n * `<ui-transition color=\"red\" pulsating looping>` => `ui red looping pulsating transition`;\n * the element adds its state before the noun (`visible`, `animating`), the words Fomantic's script added.\n * - `visible` / `hidden` and `animation` are every element's (`SharedVocabulary`).\n * - A transition starts hidden (`elementSetup.visible`).\n * - `animation` takes Fomantic's names, spaces and all (`fade up`, `horizontal flip`),\n * attention ones (`shake`) included.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `<ui-transition>`\n * Shows / hides (or shakes, pulses ...) its content with the animation catalogue:\n * `<div class=\"ui ... transition\" part=\"transition\"><slot>`.\n ****************/\nexport const transitionVocabulary = {\n tag: \"ui-transition\",\n topics: [\"animation\", \"modules\"],\n aka: [\"animate\", \"fade\", \"slide\", \"motion\", \"effect\"],\n noun: \"transition\",\n description: \"A transition is an animation used to show or hide content, or to draw attention to it.\",\n attributes: [\n {\n name: \"duration\",\n group: \"behaviour\",\n kind: \"string\",\n description: \"Length of each animation: ms (`300`) or a CSS time (`0.3s`); default the animation's own.\"\n },\n {\n name: \"interrupt\",\n group: \"advanced\",\n kind: \"boolean\",\n description: \"A new animation stops the running one instead of waiting for it (Fomantic's `queue: false`).\"\n },\n {\n name: \"allow-repeats\",\n group: \"advanced\",\n kind: \"boolean\",\n description: \"Queue the same animation twice in a row (Fomantic's `allowRepeats`); by default it's dropped.\"\n },\n { name: \"color\", group: \"appearance\", kind: \"color\", description: \"Hue of a `pulsating` ring.\" },\n {\n name: \"inline\",\n group: \"layout\",\n kind: \"keyOnly\",\n description: \"An inline block around inline content (an image, a button).\"\n },\n { name: \"inverted\", group: \"appearance\", kind: \"keyOnly\", description: \"A `pulsating` ring for dark backgrounds.\" },\n { name: \"looping\", group: \"appearance\", kind: \"keyOnly\", description: \"Repeats every animation until removed.\" },\n {\n name: \"pulsating\",\n group: \"appearance\",\n kind: \"keyOnly\",\n description: \"A ring pulsing out of the box (with `looping`, forever).\"\n },\n { name: \"disabled\", group: \"states\", kind: \"keyOnly\", description: \"Pauses the running animation.\" }\n ],\n events: [\n {\n name: \"ui-opened\",\n detail: \"{ visible: true, animation: string }\",\n description: \"Shown, its animation finished (Fomantic's `onVisible`).\"\n },\n {\n name: \"ui-closed\",\n detail: \"{ visible: false, animation: string }\",\n description: \"Hidden, its animation finished (Fomantic's `onHidden`).\"\n },\n {\n name: \"ui-animated\",\n detail: \"{ visible: boolean, animation: string }\",\n description: \"Any animation finished, attention ones included (Fomantic's `onComplete`).\"\n }\n ],\n slots: [{ name: \"\", description: \"The content to animate.\" }],\n parts: [{ name: \"transition\", description: \"The animated box around the content.\" }],\n states: [{ name: \"animating\", description: \"An animation is running.\" }],\n texts: []\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-transition>`: what `transition.less` + `transition.variables` add beyond the animation catalogue.\n * - The keyframes, the `data-ui-animation` protocol and Fomantic's transition STATES (`.ui.animating.transition`,\n * `.hidden`, `.visible`, `.disabled`, `.looping`, `.pulsating`) live in `animations.css` (`@layer ui.utilities`),\n * which every shadow root adopts with the foundation; this sheet only adds the element's box and variations.\n * - Shadow markup contract: `<div class=\"ui [color] [keyOnly ...] transition [visible] [animating]\"\n * part=\"transition\"><slot></slot></div>`; the box's `hidden` attribute hides it (`UI.transitions` sets it).\n * - Motion: `animations.css`'s reduced-motion block swaps every animation for a short crossfade;\n * the element skips animating altogether then (`UI.transitions`).\n * - NOTE: left out, on purpose: `.loading.transition` (Fomantic's off-screen measuring state: nothing measures).\n */\n\n@layer ui.components.transition.types, ui.components.transition.content, ui.components.transition.variations, ui.components.transition.states;\n\n/*******************************\n Transition\n*******************************/\n\n@layer ui.components.transition.types {\n /* DOM element: no box of its own; the transition box is the one that animates. */\n :host {\n display: contents;\n }\n\n .ui.transition {\n box-sizing: border-box;\n }\n\n /* What the box hands its content: not its colour remap (`color` tints the pulsating ring only). */\n .ui.transition slot {\n --ui-color: initial;\n --ui-color-text: initial;\n --ui-color-header: initial;\n --ui-color-border: initial;\n --ui-color-background: initial;\n --ui-color-inverted: initial;\n --ui-color-on: initial;\n --ui-color-inverted-on: initial;\n }\n}\n\n/*******************************\n Variations\n*******************************/\n\n@layer ui.components.transition.variations {\n /* ## Inline: wraps inline content (an image, a button) so it scales / flips around ITS centre. */\n .ui.inline.transition {\n display: inline-block;\n vertical-align: top;\n }\n\n /*\n * ## Pulsating: `animations.css` draws the ring in `--ui-color` (a hue by remap, else grey); `inverted` makes it\n * near-white for dark backgrounds (Fomantic's `@pulsatingInvertedColor`).\n */\n .ui.inverted.pulsating.transition {\n --ui-color: var(--ui-transition-inverted-pulse, oklch(0.97 0 0));\n }\n}\n\n/*******************************\n States\n*******************************/\n\n@layer ui.components.transition.states {\n /* Hidden: the `hidden` attribute wins over any `display` above. */\n .ui.transition[hidden] {\n display: none;\n }\n}\n","import { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UI, UIT } from \"spell/ui/core\"\nimport { transitionVocabulary } from \"./UITransition.en\"\n\nimport transitionCSS from \"./UITransition.css?inline\"\n\n/****************\n * ### `DOMTransitionElement`\n * The DOM element of `<ui-transition>`: it adds Fomantic's behaviours as METHODS\n * (`show()`, `hide()`, `toggle()`, `transition()`),\n * since an attention animation (`shake`) has no state an attribute could carry.\n *\n * - Each resolves once its animation has run:\n * - `true` when it finished\n * - `false` when a later one interrupted it (`interrupt`), or when the element hasn't drawn yet\n * - `show()` / `hide()` / `toggle()` write `visible` (so `hidden` follows, and frameworks see it),\n * which queues the animation.\n * - `transition()` is Fomantic's `$(el).transition(name)`.\n * - NOTE: `transition`, not `animate`: `Element.animate()` is the Web Animations API.\n * - Above the component: its `elementSetup` reads this class while the component is defined.\n ****************/\nexport class DOMTransitionElement extends E.DOMElement<UITransition> {\n /** Animate in (its `animation`), then `ui-opened`. */\n show(): Promise<boolean> {\n return this.component?.animateTo(true) ?? Promise.resolve(false)\n }\n\n /** Animate out, then `ui-closed`. */\n hide(): Promise<boolean> {\n return this.component?.animateTo(false) ?? Promise.resolve(false)\n }\n\n /** `show()` when hidden, else `hide()`. */\n toggle(): Promise<boolean> {\n return this.component?.toggle() ?? Promise.resolve(false)\n }\n\n /**\n * Run `animation` (Fomantic's name, `fade up`, or the runtime's, `fade-up`; default its `animation`):\n * an attention one in place, an appear / disappear one toggling visibility.\n * - Queued like every other.\n */\n transition(animation?: string): Promise<boolean> {\n return this.component?.transition(animation) ?? Promise.resolve(false)\n }\n}\n\n/****************\n * ### `UITransition`\n * The component behind `<ui-transition>`: shows, hides or shakes its content\n * with the animation catalogue (`animations.css`), through `UI.transitions`.\n * Its shadow DOM: `<div class=\"ui … transition [visible] [animating]\" part=\"transition\"><slot>`.\n *\n * - The BOX animates, not the content: its `hidden` attribute is what hides it\n * (`UI.transitions` sets it after an `out`, removes it before an `in`),\n * so hidden content is out of the page and the accessibility tree.\n *\n * - `visible` / `hidden` drive it, as on every element (`UIComponent`, \"Shown or hidden\"); it starts hidden.\n * - A change queues an `in` / `out` of its `animation` (`onVisibleChange()`).\n * - The DOM element's `show()` / `hide()` / `toggle()` / `transition(name)` do the same from script\n * (`DOMTransitionElement`), and so do invoker commands\n * (`UIT.TransitionCommands`: `<button commandfor=\"id\" command=\"--toggle\">`).\n * - First paint never animates; nor does anything while motion is off (`animation=\"none\"`, reduced motion).\n *\n * - A queue, as Fomantic's `queue: true`: each animation waits for the one before it.\n * - The same animation twice in a row is dropped unless `allow-repeats`.\n * - `interrupt` makes a new one stop the running one instead.\n *\n * - `ui-opened` / `ui-closed` once an `in` / `out` has run; `ui-animated` after every animation.\n ****************/\nexport class UITransition extends E.UIComponent<typeof transitionVocabulary> {\n @E.proto static vocabulary = transitionVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { transition: transitionCSS },\n DOMElement: DOMTransitionElement,\n // a click on animated text must not jump focus to a link inside it\n delegatesFocus: false,\n // `disabled`: it pauses the running animation\n disabled: \"its own\",\n // `<ui-transition>` alone hides its content; `visible` shows it\n visible: \"hidden\"\n } satisfies Partial<E.ElementSetup>\n\n /** The shared `animation`, as written (`SharedVocabulary`): Fomantic's name, `none`, or `undefined`. */\n declare readonly animation: UIT.Animation | undefined\n\n ////////////////\n // ## Visibility\n ////////////////\n\n /** Shown, or on its way in; follows the queue, not `visible`: Fomantic's `visible` class word. */\n @E.state\n accessor isShowing = this.isVisible\n\n /** An animation is running. `:state(animating)`. */\n @E.cssState(\"animating\")\n @E.state\n accessor isAnimating = false\n\n /** Where the queue is heading: visible once every queued step has run. */\n private willBeVisible = this.isVisible\n\n /**\n * `visible` / `hidden` changed (or the element first drew): queue an `in` / `out`,\n * unless the API already did (`animateTo()`).\n * Resolves once it has run, so the element stays on screen till then.\n */\n protected onVisibleChange(visible: boolean, animation: UIT.Animation): Promise<void> {\n const done = visible === this.willBeVisible ? this.lastDone() : this.queueVisibility(visible, animation)\n return done.then(() => undefined)\n }\n\n /** Its state before the noun, the words Fomantic's script added: `visible`, `animating`. */\n protected get extraClass(): string | undefined {\n const words = [this.isShowing ? UIT.VISIBLE : undefined, this.isAnimating ? UIT.ANIMATING : undefined]\n return words.filter(Boolean).join(\" \") || undefined\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n /** The animated box. */\n private box?: HTMLDivElement\n\n render(): JSX.Element {\n // a server render (`spell/ui/static`) never calls `ref`: first paint's `hidden` as an attribute\n if (isServer)\n return (\n <div class={this.rootClass} part={this.partForName(\"transition\")} hidden={!this.willBeVisible || undefined}>\n <slot />\n </div>\n )\n return (\n <div ref={(element) => this.attach(element)} class={this.rootClass} part={this.partForName(\"transition\")}>\n <slot />\n </div>\n )\n }\n\n /** First paint: hidden unless `visible`, with no animation. */\n private attach(box: HTMLDivElement) {\n this.box = box\n box.hidden = !this.willBeVisible\n }\n\n ////////////////\n // ## API (through `DOMTransitionElement`)\n ////////////////\n\n /** Animate to `visible`; writes the DOM element's `visible`, so `hidden` follows. */\n animateTo(visible: boolean, animation: string = this.ownAnimation): Promise<boolean> {\n const done = visible === this.willBeVisible ? this.lastDone() : this.queueVisibility(visible, animation)\n this.isVisible = visible\n return done\n }\n\n /** Flip visibility. */\n toggle(): Promise<boolean> {\n return this.animateTo(!this.willBeVisible)\n }\n\n /**\n * Run `animation` (default its `animation`):\n * an attention one in place, an appear / disappear one toggling visibility.\n * - Takes Fomantic's names (`fade up`) or the runtime's (`fade-up`); an unknown one warns and resolves `false`.\n */\n transition(animation: string = this.ownAnimation): Promise<boolean> {\n const name = UIT.AnimationLookup.fomanticNameFor(animation)\n if (!name) {\n E.Warnings.warn(\n `<${this.domElement.localName}>.transition()`,\n `unknown animation ${JSON.stringify(animation)}; use one of Fomantic's names (\\`fade up\\`) or the ` +\n `runtime's (\\`fade-up\\`)`\n )\n return Promise.resolve(false)\n }\n if (UIT.AnimationLookup.isAttention(name)) return this.enqueue(STATIC, name)\n return this.animateTo(!this.willBeVisible, name)\n }\n\n /** An invoker command aimed at the DOM element (`TransitionCommands`). */\n @E.on(\"command\")\n protected onCommand(event: Event) {\n const { command } = event as Event & { command: string }\n if (command === UIT.TransitionCommands.show) void this.animateTo(true)\n else if (command === UIT.TransitionCommands.close) void this.animateTo(false)\n else if (command === UIT.TransitionCommands.toggle) void this.toggle()\n else if (command === UIT.TransitionCommands.transition) void this.transition()\n }\n\n ////////////////\n // ## Queue\n ////////////////\n\n /** Steps waiting to run, in order. */\n private readonly queue: TransitionStep[] = []\n\n /** The step running now. */\n private runningStep?: TransitionStep\n\n /** Queue an `in` / `out` of `animation`, heading for `visible`. */\n private queueVisibility(visible: boolean, animation: string): Promise<boolean> {\n this.willBeVisible = visible\n return this.enqueue(visible ? UIT.IN : UIT.OUT, animation)\n }\n\n /**\n * Add a step, and start it when nothing runs (or at once with `interrupt`).\n * - The same animation the same way as the last queued (or running) step is dropped\n * unless `allow-repeats`: its promise is returned instead.\n */\n @E.untracked\n private enqueue(direction: E.AnimationDirection, animation: string): Promise<boolean> {\n const last = this.queue.at(-1) ?? this.runningStep\n const isRepeat = last?.animation === animation && last.direction === direction\n if (isRepeat && !this.allowRepeats) return last.done\n const isInterrupting = !!this.interrupt\n if (isInterrupting) for (const dropped of this.queue.splice(0)) dropped.resolve(false)\n let resolve!: (isCompleted: boolean) => void\n const done = new Promise<boolean>((settle) => (resolve = settle))\n this.queue.push({ direction, animation, done, resolve })\n if (!this.runningStep || isInterrupting) this.next()\n return done\n }\n\n /** Promise of the last queued (or running) step; resolved `true` when idle. */\n private lastDone(): Promise<boolean> {\n return (this.queue.at(-1) ?? this.runningStep)?.done ?? Promise.resolve(true)\n }\n\n /** Start the next step, if any; a step superseded (`interrupt`) resolves `false` and starts nothing. */\n private next() {\n const step = this.queue.shift()\n this.runningStep = step\n this.isAnimating = !!step\n if (!step) return\n if (step.direction === UIT.IN) this.isShowing = true\n void this.run(step).then((isCompleted) => {\n if (this.runningStep !== step) return step.resolve(false)\n if (step.direction === UIT.OUT) this.isShowing = false\n this.announce(step)\n step.resolve(isCompleted)\n this.next()\n })\n }\n\n /**\n * Animate `step` on the box through `UI.transitions`.\n * - At once, the box just shown or hidden: while motion is off (`animationToRun` is `none`), for `none` itself,\n * and for an attention animation asked to show / hide (`animation=\"shake\"`).\n */\n private run(step: TransitionStep): Promise<boolean> {\n const box = this.box\n if (!box?.isConnected) {\n if (box && step.direction !== STATIC) box.hidden = step.direction === UIT.OUT\n return Promise.resolve(false)\n }\n const isInstant =\n step.animation === UIT.NO_ANIMATION ||\n this.animationToRun === UIT.NO_ANIMATION ||\n (step.direction !== STATIC && UIT.AnimationLookup.isAttention(step.animation))\n if (isInstant) {\n if (step.direction !== STATIC) box.hidden = step.direction === UIT.OUT\n return Promise.resolve(true)\n }\n const name = UIT.AnimationLookup.runtimeNameFor(step.animation)\n return UI.transitions.animate({ element: box, name, direction: step.direction, ...this.animateOptions })\n }\n\n /** `ui-opened` / `ui-closed` after an `in` / `out`, then `ui-animated`. */\n private announce(step: TransitionStep) {\n const detail: UIT.TransitionDetail = {\n visible: step.direction === STATIC ? this.willBeVisible : step.direction === UIT.IN,\n animation: step.animation\n }\n if (step.direction === UIT.IN) this.send(\"ui-opened\", detail)\n else if (step.direction === UIT.OUT) this.send(\"ui-closed\", detail)\n this.send(\"ui-animated\", detail)\n }\n\n ////////////////\n // ## Settings\n ////////////////\n\n /**\n * The animation to queue when none is named: its own `animation`, else its family's (`fade`); untracked.\n * - Motion off is checked as each step runs (`run()`), so an attention one (`transition()`) stays one.\n */\n @E.untracked\n private get ownAnimation(): string {\n return this.animation ?? this.elementSetup.animation\n }\n\n /** `duration` as `UI.transitions` takes it: bare digits are ms; untracked. */\n @E.untracked\n private get animateOptions(): E.AnimateOptions {\n const duration = this.duration?.trim()\n if (!duration) return {}\n return { duration: UIT.DIGITS.test(duration) ? Number(duration) : duration }\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UITransition extends E.AttributeValues<typeof transitionVocabulary> {}\n\n/** One queued animation. */\ntype TransitionStep = {\n /** `in`, `out`, or `static` (attention, in place) */\n direction: E.AnimationDirection\n /** Fomantic's name */\n animation: string\n /** resolves when it has run: `true` finished, `false` superseded */\n done: Promise<boolean>\n /** settles `done` */\n resolve: (isCompleted: boolean) => void\n}\n\n/** Direction of an attention animation: in place, visibility unchanged. */\nconst STATIC = \"static\"\n","/**\n * The transition family: defines `<ui-transition>` and exports its component, `UITransition`,\n * and its DOM element, `DOMTransitionElement`.\n * - SIDE EFFECT: importing it defines the tag.\n * - NOTE: the keyframes are `animations.css`, part of the foundation every page and shadow root already has:\n * `UI.transitions` animates any element with them, no `<ui-transition>` needed.\n * - Also the library's `spell/ui/ui-transition` entry (its size is in `notes/report.md`).\n */\n\nimport { DOMTransitionElement, UITransition } from \"./UITransition\"\n\nUITransition.define()\n\nexport { UITransition, DOMTransitionElement }\n"],"mappings":";;;;AAmBA,IAAa4B,IAAuB;CAClC,KAAK;CACL,QAAQ,CAAC,aAAa,SAAS;CAC/B,KAAK;EAAC;EAAW;EAAQ;EAAS;EAAU;CAAQ;CACpD,MAAM;CACN,aAAa;CACb,YAAY;EACV;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GAAE,MAAM;GAAS,OAAO;GAAc,MAAM;GAAS,aAAa;EAA6B;EAC/F;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GAAE,MAAM;GAAY,OAAO;GAAc,MAAM;GAAW,aAAa;EAA2C;EAClH;GAAE,MAAM;GAAW,OAAO;GAAc,MAAM;GAAW,aAAa;EAAyC;EAC/G;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GAAE,MAAM;GAAY,OAAO;GAAU,MAAM;GAAW,aAAa;EAAgC;CACrG;CACA,QAAQ;EACN;GACE,MAAM;GACN,QAAQ;GACR,aAAa;EACf;EACA;GACE,MAAM;GACN,QAAQ;GACR,aAA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WQ,CAAA,GAANxB,EAAAmB,GAAMK,CAAA,GAAgE7B,EAAA6B,GAAA,cAAA,GAClE1B,EADE0B,GACK,cAAarB,EAApBgB,GAAA,IADEK,GACkBjB,CAAA,CAAA,GAApBJ,EAAAgB,GAAA,IADEK,CAAA,GAEI1B,EAFJ0B,GAEW,gBAAerB,EAAtBgB,GAAA,IAFJK,GAE0B;CACnC,aAAa,EAAE,YAAY5B,EAAc;CACzC,YAAY;CAEZ,gBAAgB;CAEhB,UAAU;CAEV,SAAS;AACX,CAAA,CAAA,GATeO,EAAAgB,GAAA,IAFJK,CAAA;AAAN,IAAM4C,IAAN5C,GAyPD6B,IAAS;;;ACrTfe,EAAa,OAAO"}
1
+ {"version":3,"file":"ui-transition.js","names":["this","part={this.partForName(\"transition\")}","hidden={!this.willBeVisible || void 0}","ref={(element) => this.attach(element)}","<div ref={(element) => this.attach(element)} class={this.rootClass} part={this.partForName(\"transition\")}>\n <slot />\n </div>","E.DOMElement","E.UIComponent","E.proto","E.protoMerged","E.state","E.cssState","E.on","E.untracked","_$getOwner","_$readShallow","_$setAttribute","__name","transitionCSS","__name$1","__publicField","__decorateElement","TransitionCommands","__decoratorMetadata","__runInitializers","__privateAdd","AnimationLookup","DIGITS","__decoratorStart","transitionVocabulary","UITransition_default","_tmpl$","_animateOptions_dec","_ownAnimation_dec","_enqueue_dec","_onCommand_dec","_isAnimating_dec","_isShowing_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_isShowing","_isAnimating","DOMElement","animation","_UITransition","UIComponent","proto","protoMerged","state","cssState","on","untracked","visible","_self$","isServer","_el$","_el$2","getOwner","effect","readShallow","className","_p$","t","setAttribute","a","_self$2","_el$3","_el$4","ref","element","box","done","name","STATIC","Warnings","event","command","last","direction","isInterrupting","dropped","resolve","settle","step","isCompleted","UI","detail","duration","UITransition"],"sources":["../src/components/ui-transition/UITransition.en.ts","../src/components/ui-transition/UITransition.css?inline","../src/components/ui-transition/UITransition.tsx","../src/components/ui-transition/index.ts"],"sourcesContent":["/**\n * Every name `<ui-transition>` uses: tag, attributes (kind + allowed values), events, slots, parts, states, texts.\n * Schema: `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Class words come out through `ClassBuilder`, in Fomantic's grammar:\n * `<ui-transition color=\"red\" pulsating looping>` => `ui red looping pulsating transition`;\n * the element adds its state before the noun (`visible`, `animating`), the words Fomantic's script added.\n * - `visible` / `hidden` and `animation` are every element's (`SharedVocabulary`).\n * - A transition starts hidden (`elementSetup.visible`).\n * - `animation` takes Fomantic's names, spaces and all (`fade up`, `horizontal flip`),\n * attention ones (`shake`) included.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `<ui-transition>`\n * Shows / hides (or shakes, pulses ...) its content with the animation catalogue:\n * `<div class=\"ui ... transition\" part=\"transition\"><slot>`.\n ****************/\nexport const transitionVocabulary = {\n tag: \"ui-transition\",\n icon: \"magic\",\n topics: [\"animation\", \"modules\"],\n aka: [\"animate\", \"fade\", \"slide\", \"motion\", \"effect\"],\n noun: \"transition\",\n description: \"A transition is an animation used to show or hide content, or to draw attention to it.\",\n attributes: [\n {\n name: \"duration\",\n group: \"behaviour\",\n kind: \"string\",\n description: \"Length of each animation: ms (`300`) or a CSS time (`0.3s`); default the animation's own.\"\n },\n {\n name: \"interrupt\",\n group: \"advanced\",\n kind: \"boolean\",\n description: \"A new animation stops the running one instead of waiting for it (Fomantic's `queue: false`).\"\n },\n {\n name: \"allow-repeats\",\n group: \"advanced\",\n kind: \"boolean\",\n description: \"Queue the same animation twice in a row (Fomantic's `allowRepeats`); by default it's dropped.\"\n },\n { name: \"color\", group: \"appearance\", kind: \"color\", description: \"Hue of a `pulsating` ring.\" },\n {\n name: \"inline\",\n group: \"layout\",\n kind: \"keyOnly\",\n description: \"An inline block around inline content (an image, a button).\"\n },\n { name: \"inverted\", group: \"appearance\", kind: \"keyOnly\", description: \"A `pulsating` ring for dark backgrounds.\" },\n { name: \"looping\", group: \"appearance\", kind: \"keyOnly\", description: \"Repeats every animation until removed.\" },\n {\n name: \"pulsating\",\n group: \"appearance\",\n kind: \"keyOnly\",\n description: \"A ring pulsing out of the box (with `looping`, forever).\"\n },\n { name: \"disabled\", group: \"states\", kind: \"keyOnly\", description: \"Pauses the running animation.\" }\n ],\n events: [\n {\n name: \"ui-opened\",\n detail: \"{ visible: true, animation: string }\",\n description: \"Shown, its animation finished (Fomantic's `onVisible`).\"\n },\n {\n name: \"ui-closed\",\n detail: \"{ visible: false, animation: string }\",\n description: \"Hidden, its animation finished (Fomantic's `onHidden`).\"\n },\n {\n name: \"ui-animated\",\n detail: \"{ visible: boolean, animation: string }\",\n description: \"Any animation finished, attention ones included (Fomantic's `onComplete`).\"\n }\n ],\n slots: [{ name: \"\", description: \"The content to animate.\" }],\n parts: [{ name: \"transition\", description: \"The animated box around the content.\" }],\n states: [{ name: \"animating\", description: \"An animation is running.\" }],\n texts: []\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-transition>`: what `transition.less` + `transition.variables` add beyond the animation catalogue.\n * - The keyframes, the `data-ui-animation` protocol and Fomantic's transition STATES (`.ui.animating.transition`,\n * `.hidden`, `.visible`, `.disabled`, `.looping`, `.pulsating`) live in `animations.css` (`@layer ui.utilities`),\n * which every shadow root adopts with the foundation; this sheet only adds the element's box and variations.\n * - Shadow markup contract: `<div class=\"ui [color] [keyOnly ...] transition [visible] [animating]\"\n * part=\"transition\"><slot></slot></div>`; the box's `hidden` attribute hides it (`UI.transitions` sets it).\n * - Motion: `animations.css`'s reduced-motion block swaps every animation for a short crossfade;\n * the element skips animating altogether then (`UI.transitions`).\n * - NOTE: left out, on purpose: `.loading.transition` (Fomantic's off-screen measuring state: nothing measures).\n */\n\n@layer ui.components.transition.types, ui.components.transition.content, ui.components.transition.variations, ui.components.transition.states;\n\n/*******************************\n Transition\n*******************************/\n\n@layer ui.components.transition.types {\n /* DOM element: no box of its own; the transition box is the one that animates. */\n :host {\n display: contents;\n }\n\n .ui.transition {\n box-sizing: border-box;\n }\n\n /* What the box hands its content: not its colour remap (`color` tints the pulsating ring only). */\n .ui.transition slot {\n --ui-color: initial;\n --ui-color-text: initial;\n --ui-color-header: initial;\n --ui-color-border: initial;\n --ui-color-background: initial;\n --ui-color-inverted: initial;\n --ui-color-on: initial;\n --ui-color-inverted-on: initial;\n }\n}\n\n/*******************************\n Variations\n*******************************/\n\n@layer ui.components.transition.variations {\n /* ## Inline: wraps inline content (an image, a button) so it scales / flips around ITS centre. */\n .ui.inline.transition {\n display: inline-block;\n vertical-align: top;\n }\n\n /*\n * ## Pulsating: `animations.css` draws the ring in `--ui-color` (a hue by remap, else grey); `inverted` makes it\n * near-white for dark backgrounds (Fomantic's `@pulsatingInvertedColor`).\n */\n .ui.inverted.pulsating.transition {\n --ui-color: var(--ui-transition-inverted-pulse, oklch(0.97 0 0));\n }\n}\n\n/*******************************\n States\n*******************************/\n\n@layer ui.components.transition.states {\n /* Hidden: the `hidden` attribute wins over any `display` above. */\n .ui.transition[hidden] {\n display: none;\n }\n}\n","import { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UI, UIT } from \"spell/ui/core\"\nimport { transitionVocabulary } from \"./UITransition.en\"\n\nimport transitionCSS from \"./UITransition.css?inline\"\n\n/****************\n * ### `DOMTransitionElement`\n * The DOM element of `<ui-transition>`: it adds Fomantic's behaviours as METHODS\n * (`show()`, `hide()`, `toggle()`, `transition()`),\n * since an attention animation (`shake`) has no state an attribute could carry.\n *\n * - Each resolves once its animation has run:\n * - `true` when it finished\n * - `false` when a later one interrupted it (`interrupt`), or when the element hasn't drawn yet\n * - `show()` / `hide()` / `toggle()` write `visible` (so `hidden` follows, and frameworks see it),\n * which queues the animation.\n * - `transition()` is Fomantic's `$(el).transition(name)`.\n * - NOTE: `transition`, not `animate`: `Element.animate()` is the Web Animations API.\n * - Above the component: its `elementSetup` reads this class while the component is defined.\n ****************/\nexport class DOMTransitionElement extends E.DOMElement<UITransition> {\n /** Animate in (its `animation`), then `ui-opened`. */\n show(): Promise<boolean> {\n return this.component?.animateTo(true) ?? Promise.resolve(false)\n }\n\n /** Animate out, then `ui-closed`. */\n hide(): Promise<boolean> {\n return this.component?.animateTo(false) ?? Promise.resolve(false)\n }\n\n /** `show()` when hidden, else `hide()`. */\n toggle(): Promise<boolean> {\n return this.component?.toggle() ?? Promise.resolve(false)\n }\n\n /**\n * Run `animation` (Fomantic's name, `fade up`, or the runtime's, `fade-up`; default its `animation`):\n * an attention one in place, an appear / disappear one toggling visibility.\n * - Queued like every other.\n */\n transition(animation?: string): Promise<boolean> {\n return this.component?.transition(animation) ?? Promise.resolve(false)\n }\n}\n\n/****************\n * ### `UITransition`\n * The component behind `<ui-transition>`: shows, hides or shakes its content\n * with the animation catalogue (`animations.css`), through `UI.transitions`.\n * Its shadow DOM: `<div class=\"ui … transition [visible] [animating]\" part=\"transition\"><slot>`.\n *\n * - The BOX animates, not the content: its `hidden` attribute is what hides it\n * (`UI.transitions` sets it after an `out`, removes it before an `in`),\n * so hidden content is out of the page and the accessibility tree.\n *\n * - `visible` / `hidden` drive it, as on every element (`UIComponent`, \"Shown or hidden\"); it starts hidden.\n * - A change queues an `in` / `out` of its `animation` (`onVisibleChange()`).\n * - The DOM element's `show()` / `hide()` / `toggle()` / `transition(name)` do the same from script\n * (`DOMTransitionElement`), and so do invoker commands\n * (`UIT.TransitionCommands`: `<button commandfor=\"id\" command=\"--toggle\">`).\n * - First paint never animates; nor does anything while motion is off (`animation=\"none\"`, reduced motion).\n *\n * - A queue, as Fomantic's `queue: true`: each animation waits for the one before it.\n * - The same animation twice in a row is dropped unless `allow-repeats`.\n * - `interrupt` makes a new one stop the running one instead.\n *\n * - `ui-opened` / `ui-closed` once an `in` / `out` has run; `ui-animated` after every animation.\n ****************/\nexport class UITransition extends E.UIComponent<typeof transitionVocabulary> {\n @E.proto static vocabulary = transitionVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { transition: transitionCSS },\n DOMElement: DOMTransitionElement,\n // a click on animated text must not jump focus to a link inside it\n delegatesFocus: false,\n // `disabled`: it pauses the running animation\n disabled: \"its own\",\n // `<ui-transition>` alone hides its content; `visible` shows it\n visible: \"hidden\"\n } satisfies Partial<E.ElementSetup>\n\n /** The shared `animation`, as written (`SharedVocabulary`): Fomantic's name, `none`, or `undefined`. */\n declare readonly animation: UIT.Animation | undefined\n\n ////////////////\n // ## Visibility\n ////////////////\n\n /** Shown, or on its way in; follows the queue, not `visible`: Fomantic's `visible` class word. */\n @E.state\n accessor isShowing = this.isVisible\n\n /** An animation is running. `:state(animating)`. */\n @E.cssState(\"animating\")\n @E.state\n accessor isAnimating = false\n\n /** Where the queue is heading: visible once every queued step has run. */\n private willBeVisible = this.isVisible\n\n /**\n * `visible` / `hidden` changed (or the element first drew): queue an `in` / `out`,\n * unless the API already did (`animateTo()`).\n * Resolves once it has run, so the element stays on screen till then.\n */\n protected onVisibleChange(visible: boolean, animation: UIT.Animation): Promise<void> {\n const done = visible === this.willBeVisible ? this.lastDone() : this.queueVisibility(visible, animation)\n return done.then(() => undefined)\n }\n\n /** Its state before the noun, the words Fomantic's script added: `visible`, `animating`. */\n protected get extraClass(): string | undefined {\n const words = [this.isShowing ? UIT.VISIBLE : undefined, this.isAnimating ? UIT.ANIMATING : undefined]\n return words.filter(Boolean).join(\" \") || undefined\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n /** The animated box. */\n private box?: HTMLDivElement\n\n render(): JSX.Element {\n // a server render (`spell/ui/static`) never calls `ref`: first paint's `hidden` as an attribute\n if (isServer)\n return (\n <div class={this.rootClass} part={this.partForName(\"transition\")} hidden={!this.willBeVisible || undefined}>\n <slot />\n </div>\n )\n return (\n <div ref={(element) => this.attach(element)} class={this.rootClass} part={this.partForName(\"transition\")}>\n <slot />\n </div>\n )\n }\n\n /** First paint: hidden unless `visible`, with no animation. */\n private attach(box: HTMLDivElement) {\n this.box = box\n box.hidden = !this.willBeVisible\n }\n\n ////////////////\n // ## API (through `DOMTransitionElement`)\n ////////////////\n\n /** Animate to `visible`; writes the DOM element's `visible`, so `hidden` follows. */\n animateTo(visible: boolean, animation: string = this.ownAnimation): Promise<boolean> {\n const done = visible === this.willBeVisible ? this.lastDone() : this.queueVisibility(visible, animation)\n this.isVisible = visible\n return done\n }\n\n /** Flip visibility. */\n toggle(): Promise<boolean> {\n return this.animateTo(!this.willBeVisible)\n }\n\n /**\n * Run `animation` (default its `animation`):\n * an attention one in place, an appear / disappear one toggling visibility.\n * - Takes Fomantic's names (`fade up`) or the runtime's (`fade-up`); an unknown one warns and resolves `false`.\n */\n transition(animation: string = this.ownAnimation): Promise<boolean> {\n const name = UIT.AnimationLookup.fomanticNameFor(animation)\n if (!name) {\n E.Warnings.warn(\n `<${this.domElement.localName}>.transition()`,\n `unknown animation ${JSON.stringify(animation)}; use one of Fomantic's names (\\`fade up\\`) or the ` +\n `runtime's (\\`fade-up\\`)`\n )\n return Promise.resolve(false)\n }\n if (UIT.AnimationLookup.isAttention(name)) return this.enqueue(STATIC, name)\n return this.animateTo(!this.willBeVisible, name)\n }\n\n /** An invoker command aimed at the DOM element (`TransitionCommands`). */\n @E.on(\"command\")\n protected onCommand(event: Event) {\n const { command } = event as Event & { command: string }\n if (command === UIT.TransitionCommands.show) void this.animateTo(true)\n else if (command === UIT.TransitionCommands.close) void this.animateTo(false)\n else if (command === UIT.TransitionCommands.toggle) void this.toggle()\n else if (command === UIT.TransitionCommands.transition) void this.transition()\n }\n\n ////////////////\n // ## Queue\n ////////////////\n\n /** Steps waiting to run, in order. */\n private readonly queue: TransitionStep[] = []\n\n /** The step running now. */\n private runningStep?: TransitionStep\n\n /** Queue an `in` / `out` of `animation`, heading for `visible`. */\n private queueVisibility(visible: boolean, animation: string): Promise<boolean> {\n this.willBeVisible = visible\n return this.enqueue(visible ? UIT.IN : UIT.OUT, animation)\n }\n\n /**\n * Add a step, and start it when nothing runs (or at once with `interrupt`).\n * - The same animation the same way as the last queued (or running) step is dropped\n * unless `allow-repeats`: its promise is returned instead.\n */\n @E.untracked\n private enqueue(direction: E.AnimationDirection, animation: string): Promise<boolean> {\n const last = this.queue.at(-1) ?? this.runningStep\n const isRepeat = last?.animation === animation && last.direction === direction\n if (isRepeat && !this.allowRepeats) return last.done\n const isInterrupting = !!this.interrupt\n if (isInterrupting) for (const dropped of this.queue.splice(0)) dropped.resolve(false)\n let resolve!: (isCompleted: boolean) => void\n const done = new Promise<boolean>((settle) => (resolve = settle))\n this.queue.push({ direction, animation, done, resolve })\n if (!this.runningStep || isInterrupting) this.next()\n return done\n }\n\n /** Promise of the last queued (or running) step; resolved `true` when idle. */\n private lastDone(): Promise<boolean> {\n return (this.queue.at(-1) ?? this.runningStep)?.done ?? Promise.resolve(true)\n }\n\n /** Start the next step, if any; a step superseded (`interrupt`) resolves `false` and starts nothing. */\n private next() {\n const step = this.queue.shift()\n this.runningStep = step\n this.isAnimating = !!step\n if (!step) return\n if (step.direction === UIT.IN) this.isShowing = true\n void this.run(step).then((isCompleted) => {\n if (this.runningStep !== step) return step.resolve(false)\n if (step.direction === UIT.OUT) this.isShowing = false\n this.announce(step)\n step.resolve(isCompleted)\n this.next()\n })\n }\n\n /**\n * Animate `step` on the box through `UI.transitions`.\n * - At once, the box just shown or hidden: while motion is off (`animationToRun` is `none`), for `none` itself,\n * and for an attention animation asked to show / hide (`animation=\"shake\"`).\n */\n private run(step: TransitionStep): Promise<boolean> {\n const box = this.box\n if (!box?.isConnected) {\n if (box && step.direction !== STATIC) box.hidden = step.direction === UIT.OUT\n return Promise.resolve(false)\n }\n const isInstant =\n step.animation === UIT.NO_ANIMATION ||\n this.animationToRun === UIT.NO_ANIMATION ||\n (step.direction !== STATIC && UIT.AnimationLookup.isAttention(step.animation))\n if (isInstant) {\n if (step.direction !== STATIC) box.hidden = step.direction === UIT.OUT\n return Promise.resolve(true)\n }\n const name = UIT.AnimationLookup.runtimeNameFor(step.animation)\n return UI.transitions.animate({ element: box, name, direction: step.direction, ...this.animateOptions })\n }\n\n /** `ui-opened` / `ui-closed` after an `in` / `out`, then `ui-animated`. */\n private announce(step: TransitionStep) {\n const detail: UIT.TransitionDetail = {\n visible: step.direction === STATIC ? this.willBeVisible : step.direction === UIT.IN,\n animation: step.animation\n }\n if (step.direction === UIT.IN) this.send(\"ui-opened\", detail)\n else if (step.direction === UIT.OUT) this.send(\"ui-closed\", detail)\n this.send(\"ui-animated\", detail)\n }\n\n ////////////////\n // ## Settings\n ////////////////\n\n /**\n * The animation to queue when none is named: its own `animation`, else its family's (`fade`); untracked.\n * - Motion off is checked as each step runs (`run()`), so an attention one (`transition()`) stays one.\n */\n @E.untracked\n private get ownAnimation(): string {\n return this.animation ?? this.elementSetup.animation\n }\n\n /** `duration` as `UI.transitions` takes it: bare digits are ms; untracked. */\n @E.untracked\n private get animateOptions(): E.AnimateOptions {\n const duration = this.duration?.trim()\n if (!duration) return {}\n return { duration: UIT.DIGITS.test(duration) ? Number(duration) : duration }\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UITransition extends E.AttributeValues<typeof transitionVocabulary> {}\n\n/** One queued animation. */\ntype TransitionStep = {\n /** `in`, `out`, or `static` (attention, in place) */\n direction: E.AnimationDirection\n /** Fomantic's name */\n animation: string\n /** resolves when it has run: `true` finished, `false` superseded */\n done: Promise<boolean>\n /** settles `done` */\n resolve: (isCompleted: boolean) => void\n}\n\n/** Direction of an attention animation: in place, visibility unchanged. */\nconst STATIC = \"static\"\n","/**\n * The transition family: defines `<ui-transition>` and exports its component, `UITransition`,\n * and its DOM element, `DOMTransitionElement`.\n * - SIDE EFFECT: importing it defines the tag.\n * - NOTE: the keyframes are `animations.css`, part of the foundation every page and shadow root already has:\n * `UI.transitions` animates any element with them, no `<ui-transition>` needed.\n * - Also the library's `spell/ui/ui-transition` entry (its size is in `notes/report.md`).\n */\n\nimport { DOMTransitionElement, UITransition } from \"./UITransition\"\n\nUITransition.define()\n\nexport { UITransition, DOMTransitionElement }\n"],"mappings":";;;;AAmBA,IAAa4B,IAAuB;CAClC,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