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
package/dist/ui-shape.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import "./rolldown-runtime-CYGlBXrH.js";
2
- import { Bt as e, DOMElement as t, Ft as n, It as r, Lt as i, Rt as a, UI as o, UIComponent as s, Vt as c, after as ee, controlled as te, cssState as l, it as ne, m as re, n as ie, on as u, onChange as ae, proto as oe, protoMerged as se, r as d, rt as f, state as p, untracked as m, zt as h } from "./core.js";
3
- import { className as g, effect as _, getOwner as v, isServer as y, readShallow as b, ref as ce, setAttribute as x, template as S } from "@solidjs/web";
2
+ import { Bt as e, DOMElement as t, Ht as n, Lt as r, Rt as i, UI as a, UIComponent as o, Ut as s, Vt as c, after as ee, at as te, controlled as ne, cssState as l, it as u, m as re, n as ie, on as d, onChange as ae, proto as oe, protoMerged as f, r as p, state as m, untracked as h, zt as g } from "./core.js";
3
+ import { className as _, effect as v, getOwner as y, isServer as se, readShallow as b, ref as ce, setAttribute as x, template as S } from "@solidjs/web";
4
4
  //#region src/components/ui-shape/UIShape.types.ts
5
5
  var C = "side", w = "sides", le = {
6
6
  tag: "ui-shape",
7
+ icon: "cube",
7
8
  topics: [
8
9
  "animation",
9
10
  "media",
@@ -57,6 +58,14 @@ var C = "side", w = "sides", le = {
57
58
  group: "behaviour",
58
59
  kind: "string",
59
60
  description: "Length of a flip: ms (`600`) or a CSS time (`0.6s`); default Fomantic's 0.6s."
61
+ },
62
+ {
63
+ name: "flip-on",
64
+ group: "behaviour",
65
+ kind: "enum",
66
+ values: ["click", "manual"],
67
+ default: "manual",
68
+ description: "What turns it to its next side: `click` -- a click, or Enter / Space while it has focus (a flip card; a link or button on a side still works as itself); `manual` -- only `active-index`, `next()` / `previous()` / `flip()` and invoker commands."
60
69
  }
61
70
  ],
62
71
  events: [{
@@ -80,9 +89,9 @@ var C = "side", w = "sides", le = {
80
89
  description: "Flipping."
81
90
  }],
82
91
  texts: []
83
- }, T = "@layer ui.components.shape.types{:host{display:contents}:host(:state(side)){opacity:1;backface-visibility:hidden;width:100%;transition:opacity var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out);margin:0;display:block}.ui.shape{--_ui-shape-type:plain;vertical-align:top;perspective:2000px;transition:transform var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out), left var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out), width var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out), height var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out);display:inline-block;position:relative}.ui.shape .sides,.ui.shape .side{transform-style:preserve-3d}.ui.shape .side{box-sizing:border-box;opacity:1;backface-visibility:hidden;width:100%;margin:0;display:none}.ui.shape .side *{backface-visibility:visible}:host(:state(side))>.side{box-sizing:border-box;height:100%;display:block}}@layer ui.components.shape.content;@layer ui.components.shape.variations{.ui.cube.shape{--_ui-shape-type:cube}.ui.cube.shape .side,:host(:state(side))>.side{--_ui-shape-cube-size:var(--ui-shape-cube-size,15em)}.ui.cube.shape .side{min-width:var(--_ui-shape-cube-size);height:var(--_ui-shape-cube-size);background-color:var(--ui-shape-cube-background,light-dark(oklch(93% 0 0),oklch(32% 0 0)));box-shadow:0 0 2px var(--ui-shape-cube-shadow,oklch(0% 0 0/.3));color:var(--ui-text-color);padding:2em}.ui.cube.shape .side>.content{text-align:center;-webkit-user-select:text;user-select:text;width:100%;height:100%;display:table}.ui.cube.shape .side>.content>div{vertical-align:middle;font-size:2em;display:table-cell}@container style(--_ui-shape-type:cube){:host(:state(side))>.side{min-width:var(--_ui-shape-cube-size);height:var(--_ui-shape-cube-size);background-color:var(--ui-shape-cube-background,light-dark(oklch(93% 0 0),oklch(32% 0 0)));box-shadow:0 0 2px var(--ui-shape-cube-shadow,oklch(0% 0 0/.3));color:var(--ui-text-color);text-align:center;-webkit-user-select:text;user-select:text;justify-content:center;align-items:center;padding:2em;display:flex}:host(:state(side))>.side>::slotted(*){font-size:2em}}.ui.text.shape{--_ui-shape-type:text}.ui.text.shape.animating .sides{position:static}.ui.text.shape .side{white-space:nowrap}.ui.text.shape .side>*{white-space:normal}@container style(--_ui-shape-type:text){:host(:state(side))>.side{white-space:nowrap}}}@layer ui.components.shape.states{.ui.shape .active.side{display:block}:host(:state(inactive)),:host(:state(inactive))>.side{display:none}.ui.shape.animating .sides{transition:transform var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out);position:absolute}.ui.shape .animating.side,:host(:state(animating)){z-index:100;display:block;position:absolute;top:0;left:0}.ui.shape .hidden.side,:host(:state(leaving)){opacity:.6}.ui.shape .animating.side *,.ui.shape.animating .side *{transition:none}}", ue = /* @__PURE__ */ S("<div><div aria-live=polite><slot>"), de = /* @__PURE__ */ S("<span><span aria-live=polite><slot>"), E, D, O, k, A, j, M, N, P, F, I, L, R, z, B, V, H, U, W, G, DOMShapeElement = class extends t {
92
+ }, T = "@layer ui.components.shape.types{:host{display:contents}:host(:state(side)){opacity:1;backface-visibility:hidden;width:100%;transition:opacity var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out);margin:0;display:block}.ui.shape{--_ui-shape-type:plain;vertical-align:top;perspective:2000px;transition:transform var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out), left var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out), width var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out), height var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out);display:inline-block;position:relative}.ui.shape .sides,.ui.shape .side{transform-style:preserve-3d}.ui.shape .side{box-sizing:border-box;opacity:1;backface-visibility:hidden;width:100%;margin:0;display:none}.ui.shape .side *{backface-visibility:visible}:host(:state(side))>.side{box-sizing:border-box;height:100%;display:block}}@layer ui.components.shape.content;@layer ui.components.shape.variations{.ui.cube.shape{--_ui-shape-type:cube}.ui.cube.shape .side,:host(:state(side))>.side{--_ui-shape-cube-size:var(--ui-shape-cube-size,15em)}.ui.cube.shape .side{min-width:var(--_ui-shape-cube-size);height:var(--_ui-shape-cube-size);background-color:var(--ui-shape-cube-background,light-dark(oklch(93% 0 0),oklch(32% 0 0)));box-shadow:0 0 2px var(--ui-shape-cube-shadow,oklch(0% 0 0/.3));color:var(--ui-text-color);padding:2em}.ui.cube.shape .side>.content{text-align:center;-webkit-user-select:text;user-select:text;width:100%;height:100%;display:table}.ui.cube.shape .side>.content>div{vertical-align:middle;font-size:2em;display:table-cell}@container style(--_ui-shape-type:cube){:host(:state(side))>.side{min-width:var(--_ui-shape-cube-size);height:var(--_ui-shape-cube-size);background-color:var(--ui-shape-cube-background,light-dark(oklch(93% 0 0),oklch(32% 0 0)));box-shadow:0 0 2px var(--ui-shape-cube-shadow,oklch(0% 0 0/.3));color:var(--ui-text-color);text-align:center;-webkit-user-select:text;user-select:text;justify-content:center;align-items:center;padding:2em;display:flex}:host(:state(side))>.side>::slotted(*){font-size:2em}}.ui.text.shape{--_ui-shape-type:text}.ui.text.shape.animating .sides{position:static}.ui.text.shape .side{white-space:nowrap}.ui.text.shape .side>*{white-space:normal}@container style(--_ui-shape-type:text){:host(:state(side))>.side{white-space:nowrap}}}@layer ui.components.shape.states{.ui.shape[tabindex]{width:var(--_cards-item-width,var(--_cards-width,100%));margin:var(--_cards-item-margin,calc(var(--_cards-row-spacing,0px) / 2) var(--_cards-spacing,0px));break-inside:avoid;cursor:pointer;display:block}.ui.shape[tabindex]>.sides{display:grid}.ui.shape[tabindex].animating>.sides{inset:0}:host(:state(side):state(in-flip-card)){grid-area:1/1}:host(:state(side):state(in-flip-card))>.side{display:grid}.ui.shape[tabindex]:focus-visible{outline:var(--ui-focus-width,2px) solid var(--ui-focus-color);outline-offset:var(--ui-focus-width,2px);border-radius:var(--ui-radius)}.ui.shape .active.side{display:block}:host(:state(inactive)){display:none}:host(:state(inactive):state(in-flip-card)){visibility:hidden;display:block}:host(:state(inactive))>.side{display:none}:host(:state(inactive):state(in-flip-card))>.side{display:grid}.ui.shape.animating .sides{transition:transform var(--ui-shape-duration,.6s) var(--ui-shape-easing,ease-in-out);position:absolute}.ui.shape .animating.side,:host(:state(animating)){z-index:100;display:block;position:absolute;top:0;left:0}.ui.shape .hidden.side,:host(:state(leaving)){opacity:.6}.ui.shape .animating.side *,.ui.shape.animating .side *{transition:none}}", ue = /* @__PURE__ */ S("<div><div aria-live=polite><slot>"), de = /* @__PURE__ */ S("<span><span aria-live=polite><slot>"), E, D, O, k, A, j, M, N, P, F, I, L, R, z, B, V, H, U, W, G, K, q, DOMShapeElement = class extends t {
84
93
  static {
85
- a(this, "DOMShapeElement");
94
+ e(this, "DOMShapeElement");
86
95
  }
87
96
  flip(e, t) {
88
97
  return this.component?.flipTo(e, t) ?? Promise.resolve(!1);
@@ -93,9 +102,9 @@ var C = "side", w = "sides", le = {
93
102
  previous() {
94
103
  return this.component?.flipBy(-1) ?? Promise.resolve(!1);
95
104
  }
96
- }, K = class _UIShape extends (V = s, B = [oe], z = [se], R = [p], L = [u("slotchange", { target: "renderRoot" })], I = [ae("isReady", "sides", { writesDOMElement: !0 })], F = [m], P = [te("active-index")], N = [ae("isReady", "activeSideIndex")], M = [m], j = [u("command")], A = [l("animating"), p], k = [m], O = [m], D = [m], E = [m], V) {
105
+ }, J = class _UIShape extends (U = o, H = [oe], V = [f], B = [m], z = [d("slotchange", { target: "renderRoot" })], R = [ae("isReady", "sides", "flipsOnClick", { writesDOMElement: !0 })], L = [h], I = [ne("active-index")], F = [ae("isReady", "activeSideIndex")], P = [h], N = [d("command")], M = [d("click")], j = [d("keydown")], A = [l("animating"), m], k = [h], O = [h], D = [h], E = [h], U) {
97
106
  constructor() {
98
- super(...arguments), c(H, 5, this), h(this, U, c(H, 8, this, this.findSides())), c(H, 11, this), e(this, "hasHadSides", this.sides.length > 0), h(this, W, c(H, 12, this, 0)), c(H, 15, this), e(this, "shownIndex", this.normalize(this.activeSideIndex, this.sides.length)), e(this, "queuedIndex", this.shownIndex), e(this, "flipQueue", Promise.resolve()), h(this, G, c(H, 16, this, !1)), c(H, 19, this), e(this, "stage"), e(this, "box");
107
+ super(...arguments), s(W, 5, this), c(this, G, s(W, 8, this, this.findSides())), s(W, 11, this), n(this, "hasHadSides", this.sides.length > 0), c(this, K, s(W, 12, this, 0)), s(W, 15, this), n(this, "shownIndex", this.normalize(this.activeSideIndex, this.sides.length)), n(this, "queuedIndex", this.shownIndex), n(this, "flipQueue", Promise.resolve()), c(this, q, s(W, 16, this, !1)), s(W, 19, this), n(this, "stage"), n(this, "box");
99
108
  }
100
109
  onSlotChange() {
101
110
  this.sides = this.findSides();
@@ -107,12 +116,13 @@ var C = "side", w = "sides", le = {
107
116
  !this.hasHadSides && e.length && (this.hasHadSides = !0, this.shownIndex = this.queuedIndex = this.normalize(this.activeSideIndex, e.length));
108
117
  }
109
118
  mark(e) {
110
- e.forEach((e, t) => {
111
- e.setState(ie, t === this.shownIndex), e.setState(J, t !== this.shownIndex);
119
+ let t = this.flipsOnClick;
120
+ e.forEach((e, n) => {
121
+ e.setState(ie, n === this.shownIndex), e.setState(pe, n !== this.shownIndex), e.setState(he, t);
112
122
  });
113
123
  }
114
124
  findSides() {
115
- return [...this.domElement.children].filter((e) => s.registry.definitions.get(e.localName)?.vocabulary.noun === C);
125
+ return [...this.domElement.children].filter((e) => o.registry.definitions.get(e.localName)?.vocabulary.noun === C);
116
126
  }
117
127
  onActiveSideIndexChanged(e, t) {
118
128
  if (!e) return;
@@ -130,13 +140,25 @@ var C = "side", w = "sides", le = {
130
140
  }
131
141
  onCommand(e) {
132
142
  let { command: t } = e;
133
- if (t === f.next) this.flipBy(1);
134
- else if (t === f.previous) this.flipBy(-1);
135
- else if (t?.startsWith(f.flip)) {
136
- let e = t.slice(f.flip.length);
137
- ne.includes(e) && this.flipTo(e);
143
+ if (t === u.next) this.flipBy(1);
144
+ else if (t === u.previous) this.flipBy(-1);
145
+ else if (t?.startsWith(u.flip)) {
146
+ let e = t.slice(u.flip.length);
147
+ te.includes(e) && this.flipTo(e);
138
148
  }
139
149
  }
150
+ get flipsOnClick() {
151
+ return this.flipOn === _e;
152
+ }
153
+ onClick(e) {
154
+ this.flipsOnClick && !_UIShape.pressedInside(e, this.domElement) && this.flipBy(1);
155
+ }
156
+ onKeyDown(e) {
157
+ !this.flipsOnClick || e.key !== "Enter" && e.key !== " " || _UIShape.pressedInside(e, this.domElement) || (e.preventDefault(), this.flipBy(1));
158
+ }
159
+ static pressedInside(e, t) {
160
+ return e.composedPath().some((e) => e !== t && e instanceof Element && e.matches(ve));
161
+ }
140
162
  enqueue(e, t) {
141
163
  this.queuedIndex = t;
142
164
  let n = this.flipQueue.then(() => this.flip(e, t));
@@ -146,15 +168,15 @@ var C = "side", w = "sides", le = {
146
168
  return t ? (Math.trunc(e) % t + t) % t : 0;
147
169
  }
148
170
  get extraClass() {
149
- return this.isFlipping ? d : void 0;
171
+ return this.isFlipping ? p : void 0;
150
172
  }
151
173
  async flip(e, t) {
152
174
  let n = this.sides, r = n[this.shownIndex], i = n[t];
153
175
  if (!i || t === this.shownIndex) return !1;
154
- let { stage: a, box: s } = this;
155
- r && a && s && this.domElement.isConnected && !o.browser.isReducedMotion && a.offsetParent !== null && await this.animate({
176
+ let { stage: o, box: s } = this;
177
+ r && o && s && this.domElement.isConnected && !a.browser.isReducedMotion && o.offsetParent !== null && await this.animate({
156
178
  direction: e,
157
- stage: a,
179
+ stage: o,
158
180
  box: s,
159
181
  active: r,
160
182
  next: i
@@ -167,28 +189,28 @@ var C = "side", w = "sides", le = {
167
189
  return this.send("ui-animated", c), !0;
168
190
  }
169
191
  async animate({ direction: e, stage: t, box: n, active: r, next: i }) {
170
- t.style.width = `${t.offsetWidth}px`, t.style.height = `${t.offsetHeight}px`, i.setState(J, !1), i.setState(d, !0);
192
+ t.style.width = `${t.offsetWidth}px`, t.style.height = `${t.offsetHeight}px`, i.setState(pe, !1), i.setState(p, !0);
171
193
  let a = {
172
194
  active: this.sizeOf(r),
173
195
  next: this.sizeOf(i)
174
196
  }, o = _UIShape.staging(e, a);
175
197
  Object.assign(r.style, { transform: o.active }), Object.assign(i.style, o.next);
176
198
  let s = this.cssDuration;
177
- s && (n.style.transitionDuration = s), n.offsetWidth, this.isFlipping = !0, t.classList.add(d), r.setState(Y, !0), n.style.transform = _UIShape.turn(e, a), await this.transitionEnd(n);
199
+ s && (n.style.transitionDuration = s), n.offsetWidth, this.isFlipping = !0, t.classList.add(p), r.setState(me, !0), n.style.transform = _UIShape.turn(e, a), await this.transitionEnd(n);
178
200
  for (let e of [t, n]) e.removeAttribute("style");
179
- for (let e of [r, i]) for (let t of pe) e.style.removeProperty(t);
180
- t.classList.remove(d), r.setState(Y, !1), i.setState(d, !1), this.isFlipping = !1;
181
- }
182
- transitionEnd(e) {
183
- return new Promise((t) => {
184
- let n = getComputedStyle(e), r = Math.max(...n.transitionDuration.split(",").map((e) => _UIShape.ms(e))), i = /* @__PURE__ */ a((t) => {
185
- t.target === e && done();
186
- }, "onEnd"), o = ee((r + me) / 1e3, done);
187
- e.addEventListener("transitionend", i);
201
+ for (let e of [r, i]) for (let t of ge) e.style.removeProperty(t);
202
+ t.classList.remove(p), r.setState(me, !1), i.setState(p, !1), this.isFlipping = !1;
203
+ }
204
+ transitionEnd(t) {
205
+ return new Promise((n) => {
206
+ let r = getComputedStyle(t), i = Math.max(...r.transitionDuration.split(",").map((e) => _UIShape.ms(e))), a = /* @__PURE__ */ e((e) => {
207
+ e.target === t && done();
208
+ }, "onEnd"), o = ee((i + ye) / 1e3, done);
209
+ t.addEventListener("transitionend", a);
188
210
  function done() {
189
- o.cancel(), e.removeEventListener("transitionend", i), t();
211
+ o.cancel(), t.removeEventListener("transitionend", a), n();
190
212
  }
191
- a(done, "done");
213
+ e(done, "done");
192
214
  });
193
215
  }
194
216
  sizeOf(e) {
@@ -212,28 +234,29 @@ var C = "side", w = "sides", le = {
212
234
  if (this.rendersInlineOnServer) return this.inlineShape();
213
235
  let e = this;
214
236
  var t = ue(), n = t.firstChild, r = n.firstChild;
215
- return ce(() => (t) => e.stage = t, t), ce(() => (t) => e.box = t, n), r._$owner = v(), _(() => ({
237
+ return ce(() => (t) => e.stage = t, t), ce(() => (t) => e.box = t, n), r._$owner = y(), v(() => ({
216
238
  e: b(e.rootClass),
217
239
  t: e.partForName("shape"),
218
- a: b(w),
219
- o: e.partForName("sides")
220
- }), ({ e, t: r, a: i, o: a }, o) => {
221
- g(t, e, o?.e), r !== o?.t && x(t, "part", r), g(n, i, o?.a), a !== o?.o && x(n, "part", a);
240
+ a: e.flipsOnClick ? 0 : void 0,
241
+ o: b(w),
242
+ i: e.partForName("sides")
243
+ }), ({ e, t: r, a: i, o: a, i: o }, s) => {
244
+ _(t, e, s?.e), r !== s?.t && x(t, "part", r), i !== s?.a && x(t, "tabindex", i), _(n, a, s?.o), o !== s?.i && x(n, "part", o);
222
245
  }), t;
223
246
  }
224
247
  get rendersInlineOnServer() {
225
- return y && !!this.text;
248
+ return se && !!this.text;
226
249
  }
227
250
  inlineShape() {
228
251
  let e = this;
229
252
  var t = de(), n = t.firstChild, r = n.firstChild;
230
- return r._$owner = v(), _(() => ({
253
+ return r._$owner = y(), v(() => ({
231
254
  e: b(e.rootClass),
232
255
  t: e.partForName("shape"),
233
256
  a: b(w),
234
257
  o: e.partForName("sides")
235
258
  }), ({ e, t: r, a: i, o: a }, o) => {
236
- g(t, e, o?.e), r !== o?.t && x(t, "part", r), g(n, i, o?.a), a !== o?.o && x(n, "part", a);
259
+ _(t, e, o?.e), r !== o?.t && x(t, "part", r), _(n, i, o?.a), a !== o?.o && x(n, "part", a);
237
260
  }), t;
238
261
  }
239
262
  static staging(e, t) {
@@ -280,17 +303,18 @@ var C = "side", w = "sides", le = {
280
303
  return Number.isNaN(t) ? 0 : e.trim().endsWith("ms") ? t : t * 1e3;
281
304
  }
282
305
  };
283
- H = i(V), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), n(H, 4, "sides", R, K, U), n(H, 1, "onSlotChange", L, K), n(H, 1, "onSidesChanged", I, K), n(H, 1, "firstSides", F, K), n(H, 4, "activeSideIndex", P, K, W), n(H, 1, "onActiveSideIndexChanged", N, K), n(H, 1, "flipTo", M, K), n(H, 1, "onCommand", j, K), n(H, 4, "isFlipping", A, K, G), n(H, 1, "flip", k, K), n(H, 2, "defaultFlip", O, K), n(H, 2, "cssDuration", D, K), n(H, 2, "rendersInlineOnServer", E, K), n(H, 13, "vocabulary", B, K), n(H, 13, "elementSetup", z, K), r(H, K), a(K, "UIShape"), e(K, "vocabulary", c(H, 20, K, le)), c(H, 23, K), e(K, "elementSetup", c(H, 24, K, {
306
+ W = g(U), G = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), r(W, 4, "sides", B, J, G), r(W, 1, "onSlotChange", z, J), r(W, 1, "onSidesChanged", R, J), r(W, 1, "firstSides", L, J), r(W, 4, "activeSideIndex", I, J, K), r(W, 1, "onActiveSideIndexChanged", F, J), r(W, 1, "flipTo", P, J), r(W, 1, "onCommand", N, J), r(W, 1, "onClick", M, J), r(W, 1, "onKeyDown", j, J), r(W, 4, "isFlipping", A, J, q), r(W, 1, "flip", k, J), r(W, 2, "defaultFlip", O, J), r(W, 2, "cssDuration", D, J), r(W, 2, "rendersInlineOnServer", E, J), r(W, 13, "vocabulary", H, J), r(W, 13, "elementSetup", V, J), i(W, J), e(J, "UIShape"), n(J, "vocabulary", s(W, 20, J, le)), s(W, 23, J), n(J, "elementSetup", s(W, 24, J, {
284
307
  styleSheets: { shape: T },
285
308
  DOMElement: DOMShapeElement,
286
309
  delegatesFocus: !1
287
- })), c(H, 27, K);
288
- var q = K, fe = "left", J = "inactive", Y = "leaving", pe = [
310
+ })), s(W, 27, J);
311
+ var Y = J, fe = "left", pe = "inactive", me = "leaving", he = "in-flip-card", ge = [
289
312
  "transform",
290
313
  "top",
291
314
  "left"
292
- ], me = 100, he = {
315
+ ], _e = "click", ve = "a[href], button, input, select, textarea, summary, label, [contenteditable], [role=button], [role=link]", ye = 100, be = {
293
316
  tag: "ui-side",
317
+ icon: "square outline",
294
318
  topics: [
295
319
  "animation",
296
320
  "content parts",
@@ -330,12 +354,16 @@ var q = K, fe = "left", J = "inactive", Y = "leaving", pe = [
330
354
  {
331
355
  name: "leaving",
332
356
  description: "Turning out of view (set by the shape)."
357
+ },
358
+ {
359
+ name: "in-flip-card",
360
+ description: "Its shape is a flip card (`flip-on=\"click\"`): the sides share one place, hidden ones kept in the layout, so the card is as tall as its tallest side (set by the shape)."
333
361
  }
334
362
  ],
335
363
  texts: []
336
- }, ge = /* @__PURE__ */ S("<div><slot>"), _e = /* @__PURE__ */ S("<span><slot>"), ve, ye, be, X, Z, Q = class _UISide extends (X = s, be = [oe], ye = [se], ve = [l("side")], X) {
364
+ }, xe = /* @__PURE__ */ S("<div><slot>"), Se = /* @__PURE__ */ S("<span><slot>"), Ce, X, we, Z, Q, $ = class _UISide extends (Z = o, we = [oe], X = [f], Ce = [l("side")], Z) {
337
365
  constructor() {
338
- super(...arguments), c(Z, 5, this);
366
+ super(...arguments), s(Q, 5, this);
339
367
  }
340
368
  get isSide() {
341
369
  return !0;
@@ -343,37 +371,37 @@ var q = K, fe = "left", J = "inactive", Y = "leaving", pe = [
343
371
  render() {
344
372
  if (this.isInline) return this.inlineSide();
345
373
  let e = this;
346
- var t = ge(), n = t.firstChild;
347
- return n._$owner = v(), _(() => ({
374
+ var t = xe(), n = t.firstChild;
375
+ return n._$owner = y(), v(() => ({
348
376
  e: b(C),
349
377
  t: e.partForName("side")
350
378
  }), ({ e, t: n }, r) => {
351
- g(t, e, r?.e), n !== r?.t && x(t, "part", n);
379
+ _(t, e, r?.e), n !== r?.t && x(t, "part", n);
352
380
  }), t;
353
381
  }
354
382
  get isInline() {
355
- if (!y) return !1;
383
+ if (!se) return !1;
356
384
  let e = this.domElement.parentElement?.component;
357
- return e instanceof q && e.rendersInlineOnServer;
385
+ return e instanceof Y && e.rendersInlineOnServer;
358
386
  }
359
387
  inlineSide() {
360
388
  let e = this;
361
- var t = _e(), n = t.firstChild;
362
- return n._$owner = v(), _(() => ({
389
+ var t = Se(), n = t.firstChild;
390
+ return n._$owner = y(), v(() => ({
363
391
  e: b(C),
364
392
  t: e.partForName("side")
365
393
  }), ({ e, t: n }, r) => {
366
- g(t, e, r?.e), n !== r?.t && x(t, "part", n);
394
+ _(t, e, r?.e), n !== r?.t && x(t, "part", n);
367
395
  }), t;
368
396
  }
369
397
  };
370
- Z = i(X), n(Z, 2, "isSide", ve, Q), n(Z, 13, "vocabulary", be, Q), n(Z, 13, "elementSetup", ye, Q), r(Z, Q), a(Q, "UISide"), e(Q, "vocabulary", c(Z, 8, Q, he)), c(Z, 11, Q), e(Q, "elementSetup", c(Z, 12, Q, {
398
+ Q = g(Z), r(Q, 2, "isSide", Ce, $), r(Q, 13, "vocabulary", we, $), r(Q, 13, "elementSetup", X, $), i(Q, $), e($, "UISide"), n($, "vocabulary", s(Q, 8, $, be)), s(Q, 11, $), n($, "elementSetup", s(Q, 12, $, {
371
399
  styleSheets: { shape: T },
372
400
  delegatesFocus: !1
373
- })), c(Z, 15, Q);
374
- var $ = Q;
375
- q.define(), $.define();
401
+ })), s(Q, 15, $);
402
+ var Te = $;
403
+ Y.define(), Te.define();
376
404
  //#endregion
377
- export { DOMShapeElement, q as UIShape, $ as UISide };
405
+ export { DOMShapeElement, Y as UIShape, Te as UISide };
378
406
 
379
407
  //# sourceMappingURL=ui-shape.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui-shape.js","names":["origin","sign","ref={(element) => this.stage = element}","ref={(element) => this.box = element}","this","part={this.partForName(\"shape\")}","class={SIDES}","part={this.partForName(\"sides\")}","<div ref={(element) => this.stage = element} class={this.rootClass} part={this.partForName(\"shape\")}>\n <div ref={(element) => this.box = element} class={SIDES} part={this.partForName(\"sides\")} aria-live=\"polite\">\n <slot />\n </div>\n </div>","<span class={this.rootClass} part={this.partForName(\"shape\")}>\n <span class={SIDES} part={this.partForName(\"sides\")} aria-live=\"polite\">\n <slot />\n </span>\n </span>","_tmpl$","_tmpl$2","_elementSetup_dec","_vocabulary_dec","_a","_init","E.DOMElement","E.UIComponent","E.proto","E.protoMerged","E.state","E.on","E.onChange","E.untracked","E.controlled","E.cssState","UIT.ACTIVE","UIT.ANIMATING","E.after","_$getOwner","_$readShallow","_$setAttribute","__name","shapeCSS","part={this.partForName(\"side\")}","this","<div class={SIDE} part={this.partForName(\"side\")}>\n <slot />\n </div>","<span class={SIDE} part={this.partForName(\"side\")}>\n <slot />\n </span>","E.UIComponent","E.proto","E.protoMerged","E.cssState","_$getOwner","_$readShallow","_$setAttribute","__name","shapeCSS","__publicField","__decorateElement","__decoratorMetadata","__decoratorStart","__name$1","__runInitializers","ShapeFlips","DIGITS","ACTIVE","ANIMATING","ShapeCommands","__privateAdd","SIDE","SIDES","shapeVocabulary","UIShape_default","_tmpl$$1","_tmpl$2$1","_rendersInlineOnServer_dec","_cssDuration_dec","_defaultFlip_dec","_flip_dec","_isFlipping_dec","_onCommand_dec","_flipTo_dec","_onActiveSideIndexChanged_dec","_activeSideIndex_dec","_firstSides_dec","_onSidesChanged_dec","_onSlotChange_dec","_sides_dec","_elementSetup_dec$1","_vocabulary_dec$1","_a$1","_init$1","_sides","_activeSideIndex","_isFlipping","DOMElement","direction","index","_UIShape","UIComponent","proto","protoMerged","state","on","onChange","untracked","controlled","cssState","isReady","sides","side","INACTIVE","child","next","count","to","done","step","event","command","run","active","stage","box","detail","sizes","staged","duration","LEAVING","element","property","STAGED","style","wait","time","onEnd","timer","after","FAIL_SAFE","resolve","first","second","DEFAULT_FLIP","text","_self$","_el$","_el$2","_el$3","ref","getOwner","effect","readShallow","className","_p$","t","setAttribute","a","o","isServer","_self$2","_el$4","_el$5","_el$6","origin2","sign2","origin","sign","value","UIShape","sideVocabulary","_tmpl$","_tmpl$2","_isSide_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_UISide","shape","UISide"],"sources":["../src/components/ui-shape/UIShape.types.ts","../src/components/ui-shape/UIShape.en.ts","../src/components/ui-shape/UIShape.css?inline","../src/components/ui-shape/UIShape.tsx","../src/components/ui-shape/UISide.en.ts","../src/components/ui-shape/UISide.tsx","../src/components/ui-shape/index.ts"],"sourcesContent":["/**\n * The constants and types the `ui-shape` family's files share: `UIShape` and `UISide`.\n * - Pure data, at the bottom of the folder's imports: `import type` only, so node can load it (`yarn site:data`).\n * - A constant only one class reads sits below that class (epic `wwod-spell-ui`, Q18).\n */\n\nimport type { shapeVocabulary } from \"./UIShape.en\"\n\n////////////////\n// ## Vocabulary\n////////////////\n\n/** `shapeVocabulary`'s type, for brevity. */\nexport type ShapeVocabulary = typeof shapeVocabulary\n\n////////////////\n// ## Markup contract (`UIShape.css`)\n////////////////\n\n/** The side noun: `<ui-side>`'s class and part, and how a shape finds its sides (a translated tag too). */\nexport const SIDE = \"side\"\n\n/** Class of the turning box. */\nexport const SIDES = \"sides\"\n","/**\n * Every name `<ui-shape>` and `<ui-side>` use:\n * tags, 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: `<ui-shape cube>` => `ui cube shape`;\n * the element adds `animating` before the noun while it flips.\n * - A side has no `ui` (Fomantic's `.side`);\n * which one shows is the shape's `active-index`, not an attribute of the side.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `<ui-shape>`\n * A 3D shape showing one side at a time:\n * `<div class=\"ui ... shape\" part=\"shape\"><div class=\"sides\" part=\"sides\"><slot>`, its `<ui-side>`s slotted.\n ****************/\nexport const shapeVocabulary = {\n tag: \"ui-shape\",\n topics: [\"animation\", \"media\", \"modules\"],\n aka: [\"3d flip\", \"cube\", \"flip card\", \"carousel\"],\n noun: \"shape\",\n description: \"A shape is a three dimensional object displayed on a two dimensional plane.\",\n attributes: [\n { name: \"cube\", group: \"appearance\", kind: \"keyOnly\", description: \"Square grey faces, as the sides of a cube.\" },\n {\n name: \"text\",\n group: \"name\",\n kind: \"keyOnly\",\n description: \"Sides of text, inline: a word that flips to another.\"\n },\n {\n name: \"active-index\",\n group: \"appearance\",\n kind: \"number\",\n default: 0,\n description:\n \"Index of the side shown (from 0). Controlled: changing it flips (`direction` says which way) to that side.\"\n },\n {\n name: \"direction\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"up\", \"down\", \"left\", \"right\", \"over\", \"back\"],\n default: \"left\",\n description:\n \"Which way it turns (Fomantic's `flip up` ...) when `active-index` changes, `next()` / `previous()` run or \" +\n \"`flip()` gets no direction.\"\n },\n {\n name: \"duration\",\n group: \"behaviour\",\n kind: \"string\",\n description: \"Length of a flip: ms (`600`) or a CSS time (`0.6s`); default Fomantic's 0.6s.\"\n }\n ],\n events: [\n {\n name: \"ui-animated\",\n detail: \"{ activeIndex: number, side: Element, flip: ShapeFlip }\",\n description: \"Another side is shown, its flip finished (Fomantic's `onChange`).\"\n }\n ],\n slots: [{ name: \"\", description: \"The sides: `<ui-side>` elements, in order.\" }],\n parts: [\n { name: \"shape\", description: \"The stage, with the 3D perspective.\" },\n { name: \"sides\", description: \"The box that turns; a polite live region, so a flip is announced.\" }\n ],\n states: [{ name: \"animating\", description: \"Flipping.\" }],\n texts: []\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-shape>` and `<ui-side>`: port of Fomantic's `shape.less` + `shape.variables`. One sheet for both elements\n * (each adopts it), as Fomantic's one definition styles `.shape`, `.sides` and `.side`.\n * - Shadow markup contracts:\n * - `<ui-shape>`: `<div class=\"ui [cube] [text] shape [animating]\" part=\"shape\">` (the stage:\n * perspective) > `<div class=\"sides\" part=\"sides\">` (the box that turns) > `<slot>`\n * - `<ui-side>`: the DOM element is the face that turns (a block, `backface-visibility: hidden`),\n * holding `<div class=\"side\" part=\"side\"><slot>`; its shape sets its states and, while flipping,\n * its inline `transform` / `top` / `left`\n * - Which side shows: `:host(:state(inactive))` is hidden; a side outside a working shape has no state,\n * so every side shows (stacked) rather than none.\n * - The shape hands its type to its sides as an inherited PRIVATE switch, `--_ui-shape-type` (`plain` / `cube` /\n * `text`), which a side's face style-queries: a shadow root can't see its DOM element's parent's classes. Private:\n * the shape's classes decide it, so NEVER set it from outside.\n * - Public tokens (`--ui-shape-*`, the theming surface) are NEVER declared here:\n * a face reads `--ui-shape-cube-size` through its private alias\n * (`--_ui-shape-cube-size: var(--ui-shape-cube-size, 15em)`, declared on the face),\n * and `--ui-shape-duration` / `-easing` / `-cube-background` / `-cube-shadow` are read with their defaults inline,\n * since nothing declares them. So a value set on `:root`, an ancestor, the DOM element,\n * `::part(shape)` / `::part(side)` or in the app stylesheet reaches the box (`notes/theming.md` \"Component tokens\").\n * - Motion: the sides box's `transform` transition (`--ui-shape-duration`, Fomantic's 0.6s ease-in-out);\n * the leaving side fades to 0.6. Reduced motion: the element swaps at once.\n * - NOTE: left out, on purpose:\n * `.ui.loading.shape` (Fomantic's off-screen measuring clone: nothing measures a clone here).\n */\n\n@layer ui.components.shape.types, ui.components.shape.content, ui.components.shape.variations, ui.components.shape.states;\n\n/*******************************\n Shape\n*******************************/\n\n@layer ui.components.shape.types {\n /* A shape's DOM element has no box; a side's DOM element IS the face. */\n :host {\n display: contents;\n }\n :host(:state(side)) {\n display: block;\n width: 100%;\n margin: 0;\n opacity: 1;\n backface-visibility: hidden;\n transition: opacity var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out);\n }\n\n .ui.shape {\n --_ui-shape-type: plain;\n position: relative;\n display: inline-block;\n vertical-align: top;\n perspective: 2000px;\n transition:\n transform var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out),\n left var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out),\n width var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out),\n height var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out);\n }\n .ui.shape .sides,\n .ui.shape .side {\n transform-style: preserve-3d;\n }\n\n /* Static markup's sides: only the active one shows. */\n .ui.shape .side {\n box-sizing: border-box;\n display: none;\n width: 100%;\n margin: 0;\n opacity: 1;\n backface-visibility: hidden;\n }\n .ui.shape .side * {\n backface-visibility: visible;\n }\n\n /* The element's face: always laid out in its DOM element (the DOM element shows / hides). */\n :host(:state(side)) > .side {\n display: block;\n box-sizing: border-box;\n height: 100%;\n }\n}\n\n/*******************************\n Types\n*******************************/\n\n@layer ui.components.shape.variations {\n /* ## Cube: square grey faces, content centred and large. */\n .ui.cube.shape {\n --_ui-shape-type: cube;\n }\n .ui.cube.shape .side,\n :host(:state(side)) > .side {\n /* Token: the private alias of its public token, on the face that reads it. */\n --_ui-shape-cube-size: var(--ui-shape-cube-size, 15em);\n }\n .ui.cube.shape .side {\n min-width: var(--_ui-shape-cube-size);\n height: var(--_ui-shape-cube-size);\n padding: 2em;\n background-color: var(--ui-shape-cube-background, light-dark(oklch(0.93 0 0), oklch(0.32 0 0)));\n box-shadow: 0 0 2px var(--ui-shape-cube-shadow, oklch(0 0 0 / 0.3));\n color: var(--ui-text-color);\n }\n .ui.cube.shape .side > .content {\n display: table;\n width: 100%;\n height: 100%;\n text-align: center;\n user-select: text;\n }\n .ui.cube.shape .side > .content > div {\n display: table-cell;\n font-size: 2em;\n vertical-align: middle;\n }\n @container style(--_ui-shape-type: cube) {\n :host(:state(side)) > .side {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: var(--_ui-shape-cube-size);\n height: var(--_ui-shape-cube-size);\n padding: 2em;\n background-color: var(--ui-shape-cube-background, light-dark(oklch(0.93 0 0), oklch(0.32 0 0)));\n box-shadow: 0 0 2px var(--ui-shape-cube-shadow, oklch(0 0 0 / 0.3));\n color: var(--ui-text-color);\n text-align: center;\n user-select: text;\n }\n /* Fomantic's `.content > div`: the face's content, large. */\n :host(:state(side)) > .side > ::slotted(*) {\n font-size: 2em;\n }\n }\n\n /* ## Text: inline words; the sides box stays in flow while turning. */\n .ui.text.shape {\n --_ui-shape-type: text;\n }\n .ui.text.shape.animating .sides {\n position: static;\n }\n .ui.text.shape .side {\n white-space: nowrap;\n }\n .ui.text.shape .side > * {\n white-space: normal;\n }\n @container style(--_ui-shape-type: text) {\n :host(:state(side)) > .side {\n white-space: nowrap;\n }\n }\n}\n\n/*******************************\n States\n*******************************/\n\n@layer ui.components.shape.states {\n /* Active (static markup) */\n .ui.shape .active.side {\n display: block;\n }\n\n /* Hidden: another side is shown. */\n :host(:state(inactive)) {\n display: none;\n }\n /*\n * Its face too, for a server render (`spell/ui/static`), whose root is the DOM element and the face at once:\n * there the DOM element rule's `display` is dropped (it was the DOM element's box's).\n * In the element it changes nothing: the DOM element is already hidden.\n */\n :host(:state(inactive)) > .side {\n display: none;\n }\n\n /* Animating: the box turns, the incoming side is staged absolutely over it. */\n .ui.shape.animating .sides {\n position: absolute;\n transition: transform var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out);\n }\n .ui.shape .animating.side,\n :host(:state(animating)) {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 100;\n display: block;\n }\n .ui.shape .hidden.side,\n :host(:state(leaving)) {\n opacity: 0.6;\n }\n .ui.shape .animating.side *,\n .ui.shape.animating .side * {\n transition: none;\n }\n}\n","import { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UI, UIT } from \"spell/ui/core\"\nimport { SIDE, SIDES, type ShapeVocabulary } from \"./UIShape.types\"\nimport { shapeVocabulary } from \"./UIShape.en\"\n\nimport shapeCSS from \"./UIShape.css?inline\"\n\n/****************\n * ### `DOMShapeElement`\n * The DOM element of `<ui-shape>`:\n * it adds Fomantic's `.shape('flip up')` / `'set next side'` as METHODS, `flip()`, `next()` and `previous()`.\n *\n * - Each resolves once its flip has run: `true` when it showed another side,\n * `false` when there was none to show (or the element hasn't drawn yet).\n * - Flips queue, as Fomantic's do.\n * - Each writes `activeIndex` (so it reflects, and frameworks see it);\n * writing `activeIndex` yourself flips too, the `direction` attribute's way.\n * - Above the component: its `elementSetup` reads this class while the component is defined.\n ****************/\nexport class DOMShapeElement extends E.DOMElement<UIShape> {\n /** Turn `direction` (default the `direction` attribute) to side `index` (default the next one, wrapping). */\n flip(direction?: UIT.ShapeFlip, index?: number): Promise<boolean> {\n return this.component?.flipTo(direction, index) ?? Promise.resolve(false)\n }\n\n /** Turn to the next side (wrapping), the `direction` attribute's way. */\n next(): Promise<boolean> {\n return this.flip()\n }\n\n /** Turn to the previous side (wrapping), the `direction` attribute's way. */\n previous(): Promise<boolean> {\n return this.component?.flipBy(-1) ?? Promise.resolve(false)\n }\n}\n\n/****************\n * ### `UIShape`\n * The component behind `<ui-shape>`: Fomantic's shape, one of its `<ui-side>`s at a time, turning in 3D to another.\n * Its shadow DOM: `<div class=\"ui … shape [animating]\" part=\"shape\"><div class=\"sides\" part=\"sides\"><slot>`.\n *\n * - `activeIndex` is the side shown.\n * Changing it turns the `direction` way (`up`, `down`, `left`, `right`, `over`, `back`), then fires `ui-animated`;\n * so do the DOM element's `flip()` / `next()` / `previous()` (`DOMShapeElement`)\n * and invoker commands (`UIT.ShapeCommands`).\n * - Flips queue; a flip to the side already shown does nothing.\n *\n * - The flip is Fomantic's own geometry (`shape.js`):\n * - the stage keeps its size\n * - the next side is staged at 90° (or 180°) around the current one\n * - the sides box turns with a CSS transition\n * - the inline styles are cleared after\n *\n * - SIDE EFFECTS on the sides (this family's own DOM elements):\n * custom states (`active`, `inactive`, `animating`, `leaving`)\n * and, during a flip, inline `transform` / `top` / `left`.\n * - Reduced motion: an instant swap, `ui-animated` all the same.\n * - Accessibility: hidden sides are `display: none`;\n * the sides box is a polite live region, so the new side is read out after a flip (Fomantic's had no ARIA).\n ****************/\nexport class UIShape extends E.UIComponent<ShapeVocabulary> {\n @E.proto static vocabulary = shapeVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { shape: shapeCSS },\n DOMElement: DOMShapeElement,\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n ////////////////\n // ## Sides\n ////////////////\n\n /** The side elements, in order. */\n @E.state accessor sides: E.DOMElement[] = this.findSides()\n\n /**\n * Has had sides; until then `shownIndex` is only a guess.\n * - NOTE: the barrel defines `<ui-shape>` BEFORE `<ui-side>`, so a parsed shape upgrades with no sides yet.\n */\n private hasHadSides = this.sides.length > 0\n\n /** The default slot's content changed: find the sides again. */\n @E.on(\"slotchange\", { target: \"renderRoot\" })\n protected onSlotChange() {\n this.sides = this.findSides()\n }\n\n /**\n * The sides changed: start at `activeIndex` the first time, then show the current side, hide the rest.\n * - Once `isReady` (the sheets are in and the stage is drawn), as when this lived in `render()`.\n * - Writes the DOM element's sides: a static render (`spell/ui/static`) marks them once, before they render.\n */\n @E.onChange(\"isReady\", \"sides\", { writesDOMElement: true })\n protected onSidesChanged(isReady: boolean, sides: E.DOMElement[]) {\n if (!isReady) return\n this.firstSides(sides)\n this.mark(sides)\n }\n\n /** The first sides found after none (upgrade order, or content added later): start at `activeIndex`, not 0. */\n @E.untracked\n private firstSides(sides: readonly E.DOMElement[]) {\n if (this.hasHadSides || !sides.length) return\n this.hasHadSides = true\n this.shownIndex = this.queuedIndex = this.normalize(this.activeSideIndex, sides.length)\n }\n\n /** Show the current side; hide the rest. */\n private mark(sides: readonly E.DOMElement[]) {\n sides.forEach((side, index) => {\n side.setState(UIT.ACTIVE, index === this.shownIndex)\n side.setState(INACTIVE, index !== this.shownIndex)\n })\n }\n\n /** Child elements whose definition's noun is `side` (a `<ui-side>`, or a translated one). */\n private findSides(): E.DOMElement[] {\n return [...this.domElement.children].filter(\n (child): child is E.DOMElement =>\n E.UIComponent.registry.definitions.get(child.localName)?.vocabulary.noun === SIDE\n )\n }\n\n ////////////////\n // ## The side shown (API through `DOMShapeElement`)\n ////////////////\n\n /** `activeIndex`: always the DOM element's property (a number with a default). */\n @E.controlled(\"active-index\") accessor activeSideIndex = 0\n\n /**\n * Index of the side shown now:\n * NOT a mirror of `activeSideIndex`, it follows the queue (it lags while a flip runs).\n */\n private shownIndex = this.normalize(this.activeSideIndex, this.sides.length)\n\n /** Where the queue is heading. */\n private queuedIndex = this.shownIndex\n\n /** The queue: each flip starts when the one before has finished. */\n private flipQueue: Promise<unknown> = Promise.resolve()\n\n /**\n * `activeIndex` changed (the DOM element's own write, or `flipTo()`'s):\n * flip there, unless the queue is heading there.\n * - Once `isReady`, as when this lived in `render()`:\n * a change before the sheets load flips (animated) once the stage is drawn, instead of swapping at once.\n */\n @E.onChange(\"isReady\", \"activeSideIndex\")\n protected onActiveSideIndexChanged(isReady: boolean, index: number) {\n if (!isReady) return\n const next = this.normalize(index, this.sides.length)\n if (next !== this.queuedIndex) void this.enqueue(this.defaultFlip, next)\n }\n\n /** Turn `direction` to side `index` (default the next one after where the queue is heading, wrapping). */\n @E.untracked\n flipTo(direction?: UIT.ShapeFlip, index?: number): Promise<boolean> {\n const count = this.sides.length\n if (!count) return Promise.resolve(false)\n const to = this.normalize(index ?? this.queuedIndex + 1, count)\n const done = to === this.queuedIndex ? Promise.resolve(false) : this.enqueue(direction ?? this.defaultFlip, to)\n this.activeSideIndex = to\n return done\n }\n\n /** Turn `step` sides on (negative: back), the `direction` attribute's way. */\n flipBy(step: number): Promise<boolean> {\n return this.flipTo(undefined, this.queuedIndex + step)\n }\n\n /**\n * An invoker command aimed at the DOM element (`UIT.ShapeCommands`): `--next`, `--previous`, `--flip-<direction>`.\n */\n @E.on(\"command\")\n protected onCommand(event: Event) {\n const { command } = event as Event & { command: string }\n if (command === UIT.ShapeCommands.next) void this.flipBy(1)\n else if (command === UIT.ShapeCommands.previous) void this.flipBy(-1)\n else if (command?.startsWith(UIT.ShapeCommands.flip)) {\n const direction = command.slice(UIT.ShapeCommands.flip.length) as UIT.ShapeFlip\n if (UIT.ShapeFlips.includes(direction)) void this.flipTo(direction)\n }\n }\n\n /** Queue a flip to `index`. */\n private enqueue(direction: UIT.ShapeFlip, index: number): Promise<boolean> {\n this.queuedIndex = index\n const run = this.flipQueue.then(() => this.flip(direction, index))\n this.flipQueue = run.catch(() => false)\n return run\n }\n\n /** `index` wrapped into `0 .. count - 1`. */\n private normalize(index: number, count: number): number {\n if (!count) return 0\n return ((Math.trunc(index) % count) + count) % count\n }\n\n ////////////////\n // ## Flipping\n ////////////////\n\n /** A flip is running: class `animating`, `:state(animating)`. */\n @E.cssState(\"animating\")\n @E.state\n accessor isFlipping = false\n\n protected get extraClass(): string | undefined {\n return this.isFlipping ? UIT.ANIMATING : undefined\n }\n\n /** The stage: the outer box, which keeps its size while the sides turn. */\n private stage?: HTMLDivElement\n\n /** The turning box of sides. */\n private box?: HTMLDivElement\n\n /**\n * One flip, Fomantic's `animate()`: stage the next side, turn the box, wait for its transition, reset.\n * - Reduced motion, a hidden or disconnected shape: swap at once.\n */\n @E.untracked\n private async flip(direction: UIT.ShapeFlip, index: number): Promise<boolean> {\n const sides = this.sides\n const active = sides[this.shownIndex]\n const next = sides[index]\n if (!next || index === this.shownIndex) return false\n const { stage, box } = this\n const isInstant = !active || !stage || !box || !this.domElement.isConnected || UI.browser.isReducedMotion\n // `offsetParent` is the platform's: `null` while hidden\n if (!isInstant && stage.offsetParent !== null) await this.animate({ direction, stage, box, active, next })\n this.shownIndex = index\n this.mark(sides)\n const detail: UIT.ShapeChangeDetail = { activeIndex: index, side: next, flip: direction }\n this.send(\"ui-animated\", detail)\n return true\n }\n\n /** Stage, turn, wait, reset. */\n private async animate({ direction, stage, box, active, next }: FlipParams) {\n // the stage keeps its size (Fomantic's `width` / `height: 'initial'`)\n stage.style.width = `${stage.offsetWidth}px`\n stage.style.height = `${stage.offsetHeight}px`\n next.setState(INACTIVE, false)\n next.setState(UIT.ANIMATING, true)\n const sizes = { active: this.sizeOf(active), next: this.sizeOf(next) }\n const staged = UIShape.staging(direction, sizes)\n Object.assign(active.style, { transform: staged.active })\n Object.assign(next.style, staged.next)\n const duration = this.cssDuration\n if (duration) box.style.transitionDuration = duration\n void box.offsetWidth\n this.isFlipping = true\n stage.classList.add(UIT.ANIMATING)\n active.setState(LEAVING, true)\n box.style.transform = UIShape.turn(direction, sizes)\n await this.transitionEnd(box)\n for (const element of [stage, box]) element.removeAttribute(\"style\")\n for (const side of [active, next]) for (const property of STAGED) side.style.removeProperty(property)\n stage.classList.remove(UIT.ANIMATING)\n active.setState(LEAVING, false)\n next.setState(UIT.ANIMATING, false)\n this.isFlipping = false\n }\n\n /** Resolve on the box's `transitionend` (its own), or after its duration plus a fail-safe. */\n private transitionEnd(box: HTMLElement): Promise<void> {\n return new Promise((resolve) => {\n const style = getComputedStyle(box)\n const wait = Math.max(...style.transitionDuration.split(\",\").map((time) => UIShape.ms(time)))\n const onEnd = (event: TransitionEvent) => {\n if (event.target === box) done()\n }\n const timer = E.after((wait + FAIL_SAFE) / 1000, done)\n box.addEventListener(\"transitionend\", onEnd)\n\n /** Stop waiting: the timer and the listener go, and the flip goes on. */\n function done() {\n timer.cancel()\n box.removeEventListener(\"transitionend\", onEnd)\n resolve()\n }\n })\n }\n\n /** A side's margin box. */\n private sizeOf(side: HTMLElement): Size {\n const style = getComputedStyle(side)\n return {\n width: side.offsetWidth + margins(\"margin-left\", \"margin-right\"),\n height: side.offsetHeight + margins(\"margin-top\", \"margin-bottom\")\n }\n\n /** The two margins, in px. */\n function margins(first: string, second: string): number {\n return parseFloat(style.getPropertyValue(first)) + parseFloat(style.getPropertyValue(second))\n }\n }\n\n /** The `direction` attribute (or its default); untracked. */\n @E.untracked\n private get defaultFlip(): UIT.ShapeFlip {\n return this.direction ?? DEFAULT_FLIP\n }\n\n /** `duration` as CSS: bare digits are ms; untracked. */\n @E.untracked\n private get cssDuration(): string | undefined {\n const text = this.duration?.trim()\n if (!text) return undefined\n return UIT.DIGITS.test(text) ? `${text}ms` : text\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n render(): JSX.Element {\n if (this.rendersInlineOnServer) return this.inlineShape()\n return (\n <div ref={(element) => (this.stage = element)} class={this.rootClass} part={this.partForName(\"shape\")}>\n <div ref={(element) => (this.box = element)} class={SIDES} part={this.partForName(\"sides\")} aria-live=\"polite\">\n <slot />\n </div>\n </div>\n )\n }\n\n /**\n * A `text` shape in a server render (`spell/ui/static`):\n * its static output is PHRASING content (`<span>`s, as the class grammar's),\n * since the DOM element it replaces sits in running text --\n * a `<div>` would close an open `<p>` when a browser parses the page.\n * - Its sides follow (`UISide`).\n */\n @E.untracked\n get rendersInlineOnServer(): boolean {\n return isServer && !!this.text\n }\n\n /** `render()`'s markup as `<span>`s (`rendersInlineOnServer`). */\n private inlineShape(): JSX.Element {\n return (\n <span class={this.rootClass} part={this.partForName(\"shape\")}>\n <span class={SIDES} part={this.partForName(\"sides\")} aria-live=\"polite\">\n <slot />\n </span>\n </span>\n )\n }\n\n ////////////////\n // ## Geometry (Fomantic's `shape.js`): static, as it's pure\n ////////////////\n\n /** Where the active side stays and the next one waits, 90° (or 180°) round (Fomantic's `stage.*`). */\n private static staging(\n direction: UIT.ShapeFlip,\n sizes: Sizes\n ): { active: string; next: Partial<CSSStyleDeclaration> } {\n const { active, next } = sizes\n if (direction === \"up\" || direction === \"down\") {\n const origin = (active.height - next.height) / 2\n const sign = direction === \"up\" ? 1 : -1\n return {\n active: \"rotateX(0deg)\",\n next: {\n top: `${origin}px`,\n transform: `rotateX(${sign * 90}deg) translateZ(${active.height / 2}px) translateY(${-sign * (next.height / 2)}px)`\n }\n }\n }\n const origin = (active.width - next.width) / 2\n if (direction === \"over\" || direction === \"back\") {\n return { active: \"rotateY(0deg)\", next: { left: `${origin}px`, transform: \"rotateY(-180deg)\" } }\n }\n const sign = direction === \"left\" ? -1 : 1\n return {\n active: \"rotateY(0deg)\",\n next: {\n left: `${origin}px`,\n transform: `rotateY(${sign * 90}deg) translateZ(${active.width / 2}px) translateX(${sign * (next.width / 2)}px)`\n }\n }\n }\n\n /** How the sides box turns (Fomantic's `get.transform.*`). */\n private static turn(direction: UIT.ShapeFlip, { active, next }: Sizes): string {\n switch (direction) {\n case \"up\":\n return `translateY(${next.height - active.height / 2}px) translateZ(${-active.height / 2}px) rotateX(-90deg)`\n case \"down\":\n return `translateY(${-active.height / 2}px) translateZ(${-active.height / 2}px) rotateX(90deg)`\n case \"left\":\n return `translateX(${next.width - active.width / 2}px) translateZ(${-active.width / 2}px) rotateY(90deg)`\n case \"right\":\n return `translateX(${-active.width / 2}px) translateZ(${-active.width / 2}px) rotateY(-90deg)`\n case \"over\":\n return `translateX(${-(active.width - next.width) / 2}px) rotateY(180deg)`\n case \"back\":\n return `translateX(${-(active.width - next.width) / 2}px) rotateY(-180deg)`\n }\n }\n\n /** A CSS time (`0.6s`, `600ms`) in ms. */\n private static ms(time: string): number {\n const value = Number.parseFloat(time)\n if (Number.isNaN(value)) return 0\n return time.trim().endsWith(\"ms\") ? value : value * 1000\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIShape extends E.AttributeValues<ShapeVocabulary> {}\n\n/** What one animated flip works on. */\ntype FlipParams = {\n /** which way it turns */\n direction: UIT.ShapeFlip\n /** the outer box, held at its size */\n stage: HTMLElement\n /** the turning box of sides */\n box: HTMLElement\n /** the side shown now */\n active: E.DOMElement\n /** the side turning in */\n next: E.DOMElement\n}\n\n/** A margin box, in px. */\ntype Size = { width: number; height: number }\n\n/** Margin-box sizes of the active and next sides. */\ntype Sizes = { active: Size; next: Size }\n\n/** Default of `direction` (the vocabulary's). */\nconst DEFAULT_FLIP: UIT.ShapeFlip = \"left\"\n\n/** A side's state while another is shown: hidden. */\nconst INACTIVE = \"inactive\"\n\n/** The active side's state while it turns away. */\nconst LEAVING = \"leaving\"\n\n/** The inline properties a flip stages on the sides. */\nconst STAGED = [\"transform\", \"top\", \"left\"] as const\n\n/** ms added to the transition before giving up on `transitionend`. */\nconst FAIL_SAFE = 100\n","/**\n * Every name `<ui-shape>` and `<ui-side>` use:\n * tags, 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: `<ui-shape cube>` => `ui cube shape`;\n * the element adds `animating` before the noun while it flips.\n * - A side has no `ui` (Fomantic's `.side`);\n * which one shows is the shape's `active-index`, not an attribute of the side.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `<ui-side>`\n * One side of a `<ui-shape>`: `<div class=\"side\" part=\"side\"><slot>`; the shape shows, hides and turns it.\n ****************/\nexport const sideVocabulary = {\n tag: \"ui-side\",\n topics: [\"animation\", \"content parts\", \"modules\"],\n aka: [\"shape side\", \"face\"],\n noun: \"side\",\n ui: false,\n description: \"One side of a shape.\",\n attributes: [],\n events: [],\n slots: [{ name: \"\", description: \"The side's content.\" }],\n parts: [{ name: \"side\", description: \"The face.\" }],\n states: [\n { name: \"side\", description: \"Always: its shape finds it by this.\" },\n { name: \"active\", description: \"The side shown (set by the shape).\" },\n { name: \"inactive\", description: \"Another side is shown: hidden (set by the shape).\" },\n { name: \"animating\", description: \"Turning into view (set by the shape).\" },\n { name: \"leaving\", description: \"Turning out of view (set by the shape).\" }\n ],\n texts: []\n} as const satisfies E.ComponentVocabulary\n","import { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E } from \"spell/ui/core\"\nimport { UIShape } from \"./UIShape\"\nimport { SIDE } from \"./UIShape.types\"\nimport { sideVocabulary } from \"./UISide.en\"\n\nimport shapeCSS from \"./UIShape.css?inline\"\n\n/****************\n * ### `UISide`\n * The component behind `<ui-side>`:\n * one side of a `<ui-shape>` (Fomantic's `.side`), `<div class=\"side\" part=\"side\"><slot>`.\n *\n * - Passive: the DOM element is the face that turns.\n * Its shape sets its states (`active`, `inactive`, `animating`, `leaving`)\n * and, while flipping, its inline `transform` / `top` / `left`; `UIShape.css` does the rest.\n * - Outside a working shape (no `inactive` state) every side shows, stacked: content is never lost.\n * - A server render (`spell/ui/static`):\n * - in a `text` shape the root is a `<span>` (`UIShape.rendersInlineOnServer`)\n * - which side shows goes by its states (`data-state`), not the class grammar's `active` class:\n * that one's rule (states layer) would beat a cube face's `display: flex`\n ****************/\nexport class UISide extends E.UIComponent<typeof sideVocabulary> {\n @E.proto static vocabulary = sideVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { shape: shapeCSS },\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n /** Always a side: `:state(side)`. */\n @E.cssState(\"side\")\n get isSide(): boolean {\n return true\n }\n\n render(): JSX.Element {\n if (this.isInline) return this.inlineSide()\n return (\n <div class={SIDE} part={this.partForName(\"side\")}>\n <slot />\n </div>\n )\n }\n\n /** A side of a `text` shape in a server render (see class docs). */\n private get isInline(): boolean {\n if (!isServer) return false\n // `parentElement` is the platform's: `null` at the top\n const shape = (this.domElement.parentElement as E.DOMElement | null)?.component\n return shape instanceof UIShape && shape.rendersInlineOnServer\n }\n\n /** `render()`'s markup as a `<span>` (`isInline`). */\n private inlineSide(): JSX.Element {\n return (\n <span class={SIDE} part={this.partForName(\"side\")}>\n <slot />\n </span>\n )\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UISide extends E.AttributeValues<typeof sideVocabulary> {}\n","/**\n * The shape family: defines `<ui-shape>` and `<ui-side>`, and exports their components, `UIShape` and `UISide`,\n * and the shape's DOM element, `DOMShapeElement`.\n * - SIDE EFFECT: importing it defines the tags.\n * - Also the library's `spell/ui/ui-shape` entry (its size is in `notes/report.md`).\n */\n\nimport { DOMShapeElement, UIShape } from \"./UIShape\"\nimport { UISide } from \"./UISide\"\n\nUIShape.define()\nUISide.define()\n\nexport { UIShape, UISide, DOMShapeElement }\n"],"mappings":";;;;AAoBA,IAAa2D,IAAO,QAGPC,IAAQ,SCNRC,KAAkB;CAC7B,KAAK;CACL,QAAQ;EAAC;EAAa;EAAS;CAAS;CACxC,KAAK;EAAC;EAAW;EAAQ;EAAa;CAAU;CAChD,MAAM;CACN,aAAa;CACb,YAAY;EACV;GAAE,MAAM;GAAQ,OAAO;GAAc,MAAM;GAAW,aAAa;EAA6C;EAChH;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,SAAS;GACT,aACE;EACJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ;IAAC;IAAM;IAAQ;IAAQ;IAAS;IAAQ;GAAM;GACtD,SAAS;GACT,aACE;EAEJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;CACF;CACA,QAAQ,CACN;EACE,MAAM;EACN,QAAQ;EACR,aAAa;CACf,CACF;CACA,OAAO,CAAC;EAAE,MAAM;EAAI,aAAa;CAA8C,CAAC;CAChF,OAAO,CACL;EAAE,MAAM;EAAS,aAAa;CAAsC,GACpE;EAAE,MAAM;EAAS,aAAa;CAAqE,CACrG;CACA,QAAQ,CAAC;EAAE,MAAM;EAAa,aAAa;CAAY,CAAC;CACxD,OAAO,CAAC;AACV,29FEtEAI,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAjE,GAAAC,GAAAC,GAAAC,GAAAmE,GAAAC,GAAAC,GAoBa,kBAAN,cAA8BpE,EAAsB;CApB3D;EAoB2D,EAAA,MAAA,iBAAA;CAAA;CAEzD,KAAK,GAA2B,GAAkC;EAChE,OAAO,KAAK,WAAW,OAAOsE,GAAWC,CAAK,KAAK,QAAQ,QA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AO,GACfW,EAAO,OAAO"}
1
+ {"version":3,"file":"ui-shape.js","names":["origin","sign","ref={(element) => this.stage = element}","ref={(element) => this.box = element}","this","part={this.partForName(\"shape\")}","tabindex={this.flipsOnClick ? 0 : void 0}","class={SIDES}","part={this.partForName(\"sides\")}","<div\n ref={(element) => this.stage = element}\n class={this.rootClass}\n part={this.partForName(\"shape\")}\n tabindex={this.flipsOnClick ? 0 : void 0}\n >\n <div ref={(element) => this.box = element} class={SIDES} part={this.partForName(\"sides\")} aria-live=\"polite\">\n <slot />\n </div>\n </div>","<span class={this.rootClass} part={this.partForName(\"shape\")}>\n <span class={SIDES} part={this.partForName(\"sides\")} aria-live=\"polite\">\n <slot />\n </span>\n </span>","_tmpl$","_tmpl$2","_elementSetup_dec","_vocabulary_dec","_a","_init","E.DOMElement","E.UIComponent","E.proto","E.protoMerged","E.state","E.on","E.onChange","E.untracked","E.controlled","E.cssState","UIT.ACTIVE","UIT.ANIMATING","E.after","_$getOwner","_$readShallow","_$setAttribute","__name","shapeCSS","part={this.partForName(\"side\")}","this","<div class={SIDE} part={this.partForName(\"side\")}>\n <slot />\n </div>","<span class={SIDE} part={this.partForName(\"side\")}>\n <slot />\n </span>","E.UIComponent","E.proto","E.protoMerged","E.cssState","_$getOwner","_$readShallow","_$setAttribute","__name","shapeCSS","__name$1","__publicField","__decorateElement","__decoratorMetadata","__runInitializers","__privateAdd","ShapeFlips","ShapeCommands","DIGITS","ACTIVE","ANIMATING","__decoratorStart","SIDE","SIDES","shapeVocabulary","UIShape_default","_tmpl$$1","_tmpl$2$1","_rendersInlineOnServer_dec","_cssDuration_dec","_defaultFlip_dec","_flip_dec","_isFlipping_dec","_onKeyDown_dec","_onClick_dec","_onCommand_dec","_flipTo_dec","_onActiveSideIndexChanged_dec","_activeSideIndex_dec","_firstSides_dec","_onSidesChanged_dec","_onSlotChange_dec","_sides_dec","_elementSetup_dec$1","_vocabulary_dec$1","_a$1","_init$1","_sides","_activeSideIndex","_isFlipping","DOMElement","direction","index","_UIShape","UIComponent","proto","protoMerged","state","on","onChange","untracked","controlled","cssState","isReady","sides","isFlipCard","side","INACTIVE","IN_FLIP_CARD","child","next","count","to","done","step","event","command","CLICK","node","host","PRESSABLE","run","active","stage","box","detail","sizes","staged","duration","LEAVING","element","property","STAGED","style","wait","time","onEnd","timer","after","FAIL_SAFE","resolve","first","second","DEFAULT_FLIP","text","_self$","_el$","_el$2","_el$3","ref","getOwner","effect","readShallow","className","_p$","t","setAttribute","a","o","i","isServer","_self$2","_el$4","_el$5","_el$6","origin2","sign2","origin","sign","value","UIShape","sideVocabulary","_tmpl$","_tmpl$2","_isSide_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_UISide","shape","UISide"],"sources":["../src/components/ui-shape/UIShape.types.ts","../src/components/ui-shape/UIShape.en.ts","../src/components/ui-shape/UIShape.css?inline","../src/components/ui-shape/UIShape.tsx","../src/components/ui-shape/UISide.en.ts","../src/components/ui-shape/UISide.tsx","../src/components/ui-shape/index.ts"],"sourcesContent":["/**\n * The constants and types the `ui-shape` family's files share: `UIShape` and `UISide`.\n * - Pure data, at the bottom of the folder's imports: `import type` only, so node can load it (`yarn site:data`).\n * - A constant only one class reads sits below that class (epic `wwod-spell-ui`, Q18).\n */\n\nimport type { shapeVocabulary } from \"./UIShape.en\"\n\n////////////////\n// ## Vocabulary\n////////////////\n\n/** `shapeVocabulary`'s type, for brevity. */\nexport type ShapeVocabulary = typeof shapeVocabulary\n\n////////////////\n// ## Markup contract (`UIShape.css`)\n////////////////\n\n/** The side noun: `<ui-side>`'s class and part, and how a shape finds its sides (a translated tag too). */\nexport const SIDE = \"side\"\n\n/** Class of the turning box. */\nexport const SIDES = \"sides\"\n","/**\n * Every name `<ui-shape>` and `<ui-side>` use:\n * tags, 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: `<ui-shape cube>` => `ui cube shape`;\n * the element adds `animating` before the noun while it flips.\n * - A side has no `ui` (Fomantic's `.side`);\n * which one shows is the shape's `active-index`, not an attribute of the side.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `<ui-shape>`\n * A 3D shape showing one side at a time:\n * `<div class=\"ui ... shape\" part=\"shape\"><div class=\"sides\" part=\"sides\"><slot>`, its `<ui-side>`s slotted.\n ****************/\nexport const shapeVocabulary = {\n tag: \"ui-shape\",\n icon: \"cube\",\n topics: [\"animation\", \"media\", \"modules\"],\n aka: [\"3d flip\", \"cube\", \"flip card\", \"carousel\"],\n noun: \"shape\",\n description: \"A shape is a three dimensional object displayed on a two dimensional plane.\",\n attributes: [\n { name: \"cube\", group: \"appearance\", kind: \"keyOnly\", description: \"Square grey faces, as the sides of a cube.\" },\n {\n name: \"text\",\n group: \"name\",\n kind: \"keyOnly\",\n description: \"Sides of text, inline: a word that flips to another.\"\n },\n {\n name: \"active-index\",\n group: \"appearance\",\n kind: \"number\",\n default: 0,\n description:\n \"Index of the side shown (from 0). Controlled: changing it flips (`direction` says which way) to that side.\"\n },\n {\n name: \"direction\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"up\", \"down\", \"left\", \"right\", \"over\", \"back\"],\n default: \"left\",\n description:\n \"Which way it turns (Fomantic's `flip up` ...) when `active-index` changes, `next()` / `previous()` run or \" +\n \"`flip()` gets no direction.\"\n },\n {\n name: \"duration\",\n group: \"behaviour\",\n kind: \"string\",\n description: \"Length of a flip: ms (`600`) or a CSS time (`0.6s`); default Fomantic's 0.6s.\"\n },\n {\n name: \"flip-on\",\n group: \"behaviour\",\n kind: \"enum\",\n values: [\"click\", \"manual\"],\n default: \"manual\",\n description:\n \"What turns it to its next side: `click` -- a click, or Enter / Space while it has focus \" +\n \"(a flip card; a link or button on a side still works as itself); `manual` -- only \" +\n \"`active-index`, `next()` / `previous()` / `flip()` and invoker commands.\"\n }\n ],\n events: [\n {\n name: \"ui-animated\",\n detail: \"{ activeIndex: number, side: Element, flip: ShapeFlip }\",\n description: \"Another side is shown, its flip finished (Fomantic's `onChange`).\"\n }\n ],\n slots: [{ name: \"\", description: \"The sides: `<ui-side>` elements, in order.\" }],\n parts: [\n { name: \"shape\", description: \"The stage, with the 3D perspective.\" },\n { name: \"sides\", description: \"The box that turns; a polite live region, so a flip is announced.\" }\n ],\n states: [{ name: \"animating\", description: \"Flipping.\" }],\n texts: []\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-shape>` and `<ui-side>`: port of Fomantic's `shape.less` + `shape.variables`. One sheet for both elements\n * (each adopts it), as Fomantic's one definition styles `.shape`, `.sides` and `.side`.\n * - Shadow markup contracts:\n * - `<ui-shape>`: `<div class=\"ui [cube] [text] shape [animating]\" part=\"shape\">` (the stage:\n * perspective) > `<div class=\"sides\" part=\"sides\">` (the box that turns) > `<slot>`\n * - `<ui-side>`: the DOM element is the face that turns (a block, `backface-visibility: hidden`),\n * holding `<div class=\"side\" part=\"side\"><slot>`; its shape sets its states and, while flipping,\n * its inline `transform` / `top` / `left`\n * - Which side shows: `:host(:state(inactive))` is hidden; a side outside a working shape has no state,\n * so every side shows (stacked) rather than none.\n * - The shape hands its type to its sides as an inherited PRIVATE switch, `--_ui-shape-type` (`plain` / `cube` /\n * `text`), which a side's face style-queries: a shadow root can't see its DOM element's parent's classes. Private:\n * the shape's classes decide it, so NEVER set it from outside.\n * - Public tokens (`--ui-shape-*`, the theming surface) are NEVER declared here:\n * a face reads `--ui-shape-cube-size` through its private alias\n * (`--_ui-shape-cube-size: var(--ui-shape-cube-size, 15em)`, declared on the face),\n * and `--ui-shape-duration` / `-easing` / `-cube-background` / `-cube-shadow` are read with their defaults inline,\n * since nothing declares them. So a value set on `:root`, an ancestor, the DOM element,\n * `::part(shape)` / `::part(side)` or in the app stylesheet reaches the box (`notes/theming.md` \"Component tokens\").\n * - Motion: the sides box's `transform` transition (`--ui-shape-duration`, Fomantic's 0.6s ease-in-out);\n * the leaving side fades to 0.6. Reduced motion: the element swaps at once.\n * - NOTE: left out, on purpose:\n * `.ui.loading.shape` (Fomantic's off-screen measuring clone: nothing measures a clone here).\n */\n\n@layer ui.components.shape.types, ui.components.shape.content, ui.components.shape.variations, ui.components.shape.states;\n\n/*******************************\n Shape\n*******************************/\n\n@layer ui.components.shape.types {\n /* A shape's DOM element has no box; a side's DOM element IS the face. */\n :host {\n display: contents;\n }\n :host(:state(side)) {\n display: block;\n width: 100%;\n margin: 0;\n opacity: 1;\n backface-visibility: hidden;\n transition: opacity var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out);\n }\n\n .ui.shape {\n --_ui-shape-type: plain;\n position: relative;\n display: inline-block;\n vertical-align: top;\n perspective: 2000px;\n transition:\n transform var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out),\n left var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out),\n width var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out),\n height var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out);\n }\n .ui.shape .sides,\n .ui.shape .side {\n transform-style: preserve-3d;\n }\n\n /* Static markup's sides: only the active one shows. */\n .ui.shape .side {\n box-sizing: border-box;\n display: none;\n width: 100%;\n margin: 0;\n opacity: 1;\n backface-visibility: hidden;\n }\n .ui.shape .side * {\n backface-visibility: visible;\n }\n\n /* The element's face: always laid out in its DOM element (the DOM element shows / hides). */\n :host(:state(side)) > .side {\n display: block;\n box-sizing: border-box;\n height: 100%;\n }\n}\n\n/*******************************\n Types\n*******************************/\n\n@layer ui.components.shape.variations {\n /* ## Cube: square grey faces, content centred and large. */\n .ui.cube.shape {\n --_ui-shape-type: cube;\n }\n .ui.cube.shape .side,\n :host(:state(side)) > .side {\n /* Token: the private alias of its public token, on the face that reads it. */\n --_ui-shape-cube-size: var(--ui-shape-cube-size, 15em);\n }\n .ui.cube.shape .side {\n min-width: var(--_ui-shape-cube-size);\n height: var(--_ui-shape-cube-size);\n padding: 2em;\n background-color: var(--ui-shape-cube-background, light-dark(oklch(0.93 0 0), oklch(0.32 0 0)));\n box-shadow: 0 0 2px var(--ui-shape-cube-shadow, oklch(0 0 0 / 0.3));\n color: var(--ui-text-color);\n }\n .ui.cube.shape .side > .content {\n display: table;\n width: 100%;\n height: 100%;\n text-align: center;\n user-select: text;\n }\n .ui.cube.shape .side > .content > div {\n display: table-cell;\n font-size: 2em;\n vertical-align: middle;\n }\n @container style(--_ui-shape-type: cube) {\n :host(:state(side)) > .side {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: var(--_ui-shape-cube-size);\n height: var(--_ui-shape-cube-size);\n padding: 2em;\n background-color: var(--ui-shape-cube-background, light-dark(oklch(0.93 0 0), oklch(0.32 0 0)));\n box-shadow: 0 0 2px var(--ui-shape-cube-shadow, oklch(0 0 0 / 0.3));\n color: var(--ui-text-color);\n text-align: center;\n user-select: text;\n }\n /* Fomantic's `.content > div`: the face's content, large. */\n :host(:state(side)) > .side > ::slotted(*) {\n font-size: 2em;\n }\n }\n\n /* ## Text: inline words; the sides box stays in flow while turning. */\n .ui.text.shape {\n --_ui-shape-type: text;\n }\n .ui.text.shape.animating .sides {\n position: static;\n }\n .ui.text.shape .side {\n white-space: nowrap;\n }\n .ui.text.shape .side > * {\n white-space: normal;\n }\n @container style(--_ui-shape-type: text) {\n :host(:state(side)) > .side {\n white-space: nowrap;\n }\n }\n}\n\n/*******************************\n States\n*******************************/\n\n@layer ui.components.shape.states {\n /*\n * A flip card (`flip-on=\"click\"`): pressable, with a focus ring, and a block filling its place.\n * - In a `<ui-cards>` group it sits as one of the group's cards: the group's private item width and margin\n * (`--_cards-item-*`, a mosaic's; else `--_cards-width` / `--_cards-spacing`, `UICard.css`) reach it by\n * inheritance, and it never splits across a mosaic's columns.\n */\n .ui.shape[tabindex] {\n display: block;\n width: var(--_cards-item-width, var(--_cards-width, 100%));\n margin: var(--_cards-item-margin, calc(var(--_cards-row-spacing, 0px) / 2) var(--_cards-spacing, 0px));\n break-inside: avoid;\n cursor: pointer;\n }\n /*\n * A flip card is as tall as its tallest side: the sides share one grid cell, and a hidden side keeps its place\n * (`visibility: hidden`, out of the accessibility tree all the same) -- so turning it never moves what's around it\n * - the sides box is the grid; the `<slot>` adds no box, so each side is a grid item\n */\n .ui.shape[tabindex] > .sides {\n display: grid;\n }\n .ui.shape[tabindex].animating > .sides {\n inset: 0;\n }\n :host(:state(side):state(in-flip-card)) {\n grid-area: 1 / 1;\n }\n /* each face a grid too: what it holds (a card) stretches to the card's full height, leaving no gap under it */\n :host(:state(side):state(in-flip-card)) > .side {\n display: grid;\n }\n .ui.shape[tabindex]:focus-visible {\n outline: var(--ui-focus-width, 2px) solid var(--ui-focus-color);\n outline-offset: var(--ui-focus-width, 2px);\n border-radius: var(--ui-radius);\n }\n\n /* Active (static markup) */\n .ui.shape .active.side {\n display: block;\n }\n\n /* Hidden: another side is shown. In a flip card it keeps its place, so the card keeps its tallest side's height. */\n :host(:state(inactive)) {\n display: none;\n }\n :host(:state(inactive):state(in-flip-card)) {\n display: block;\n visibility: hidden;\n }\n /*\n * Its face too, for a server render (`spell/ui/static`), whose root is the DOM element and the face at once:\n * there the DOM element rule's `display` is dropped (it was the DOM element's box's).\n * In the element it changes nothing: the DOM element is already hidden.\n */\n :host(:state(inactive)) > .side {\n display: none;\n }\n :host(:state(inactive):state(in-flip-card)) > .side {\n display: grid;\n }\n\n /* Animating: the box turns, the incoming side is staged absolutely over it. */\n .ui.shape.animating .sides {\n position: absolute;\n transition: transform var(--ui-shape-duration, 0.6s) var(--ui-shape-easing, ease-in-out);\n }\n .ui.shape .animating.side,\n :host(:state(animating)) {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 100;\n display: block;\n }\n .ui.shape .hidden.side,\n :host(:state(leaving)) {\n opacity: 0.6;\n }\n .ui.shape .animating.side *,\n .ui.shape.animating .side * {\n transition: none;\n }\n}\n","import { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UI, UIT } from \"spell/ui/core\"\nimport { SIDE, SIDES, type ShapeVocabulary } from \"./UIShape.types\"\nimport { shapeVocabulary } from \"./UIShape.en\"\n\nimport shapeCSS from \"./UIShape.css?inline\"\n\n/****************\n * ### `DOMShapeElement`\n * The DOM element of `<ui-shape>`:\n * it adds Fomantic's `.shape('flip up')` / `'set next side'` as METHODS, `flip()`, `next()` and `previous()`.\n *\n * - Each resolves once its flip has run: `true` when it showed another side,\n * `false` when there was none to show (or the element hasn't drawn yet).\n * - Flips queue, as Fomantic's do.\n * - Each writes `activeIndex` (so it reflects, and frameworks see it);\n * writing `activeIndex` yourself flips too, the `direction` attribute's way.\n * - Above the component: its `elementSetup` reads this class while the component is defined.\n ****************/\nexport class DOMShapeElement extends E.DOMElement<UIShape> {\n /** Turn `direction` (default the `direction` attribute) to side `index` (default the next one, wrapping). */\n flip(direction?: UIT.ShapeFlip, index?: number): Promise<boolean> {\n return this.component?.flipTo(direction, index) ?? Promise.resolve(false)\n }\n\n /** Turn to the next side (wrapping), the `direction` attribute's way. */\n next(): Promise<boolean> {\n return this.flip()\n }\n\n /** Turn to the previous side (wrapping), the `direction` attribute's way. */\n previous(): Promise<boolean> {\n return this.component?.flipBy(-1) ?? Promise.resolve(false)\n }\n}\n\n/****************\n * ### `UIShape`\n * The component behind `<ui-shape>`: Fomantic's shape, one of its `<ui-side>`s at a time, turning in 3D to another.\n * Its shadow DOM: `<div class=\"ui … shape [animating]\" part=\"shape\"><div class=\"sides\" part=\"sides\"><slot>`.\n *\n * - `activeIndex` is the side shown.\n * Changing it turns the `direction` way (`up`, `down`, `left`, `right`, `over`, `back`), then fires `ui-animated`;\n * so do the DOM element's `flip()` / `next()` / `previous()` (`DOMShapeElement`)\n * and invoker commands (`UIT.ShapeCommands`).\n * - Flips queue; a flip to the side already shown does nothing.\n *\n * - The flip is Fomantic's own geometry (`shape.js`):\n * - the stage keeps its size\n * - the next side is staged at 90° (or 180°) around the current one\n * - the sides box turns with a CSS transition\n * - the inline styles are cleared after\n *\n * - SIDE EFFECTS on the sides (this family's own DOM elements):\n * custom states (`active`, `inactive`, `animating`, `leaving`)\n * and, during a flip, inline `transform` / `top` / `left`.\n * - Reduced motion: an instant swap, `ui-animated` all the same.\n * - A flip card (`flip-on=\"click\"`) is as tall as its tallest side, whichever shows: turning it never moves\n * what's around it (a mosaic's other cards). Its sides share one grid cell, the hidden ones `visibility: hidden`.\n * - Accessibility: hidden sides are `display: none` (a flip card's, `visibility: hidden`: out of the tree all the same);\n * the sides box is a polite live region, so the new side is read out after a flip (Fomantic's had no ARIA).\n ****************/\nexport class UIShape extends E.UIComponent<ShapeVocabulary> {\n @E.proto static vocabulary = shapeVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { shape: shapeCSS },\n DOMElement: DOMShapeElement,\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n ////////////////\n // ## Sides\n ////////////////\n\n /** The side elements, in order. */\n @E.state accessor sides: E.DOMElement[] = this.findSides()\n\n /**\n * Has had sides; until then `shownIndex` is only a guess.\n * - NOTE: the barrel defines `<ui-shape>` BEFORE `<ui-side>`, so a parsed shape upgrades with no sides yet.\n */\n private hasHadSides = this.sides.length > 0\n\n /** The default slot's content changed: find the sides again. */\n @E.on(\"slotchange\", { target: \"renderRoot\" })\n protected onSlotChange() {\n this.sides = this.findSides()\n }\n\n /**\n * The sides changed: start at `activeIndex` the first time, then show the current side, hide the rest.\n * - Once `isReady` (the sheets are in and the stage is drawn), as when this lived in `render()`.\n * - Writes the DOM element's sides: a static render (`spell/ui/static`) marks them once, before they render.\n */\n @E.onChange(\"isReady\", \"sides\", \"flipsOnClick\", { writesDOMElement: true })\n protected onSidesChanged(isReady: boolean, sides: E.DOMElement[]) {\n if (!isReady) return\n this.firstSides(sides)\n this.mark(sides)\n }\n\n /** The first sides found after none (upgrade order, or content added later): start at `activeIndex`, not 0. */\n @E.untracked\n private firstSides(sides: readonly E.DOMElement[]) {\n if (this.hasHadSides || !sides.length) return\n this.hasHadSides = true\n this.shownIndex = this.queuedIndex = this.normalize(this.activeSideIndex, sides.length)\n }\n\n /**\n * Show the current side; hide the rest.\n * - A flip card's sides are marked `in-flip-card`: they share one place, so it keeps its tallest side's height.\n */\n private mark(sides: readonly E.DOMElement[]) {\n const isFlipCard = this.flipsOnClick\n sides.forEach((side, index) => {\n side.setState(UIT.ACTIVE, index === this.shownIndex)\n side.setState(INACTIVE, index !== this.shownIndex)\n side.setState(IN_FLIP_CARD, isFlipCard)\n })\n }\n\n /** Child elements whose definition's noun is `side` (a `<ui-side>`, or a translated one). */\n private findSides(): E.DOMElement[] {\n return [...this.domElement.children].filter(\n (child): child is E.DOMElement =>\n E.UIComponent.registry.definitions.get(child.localName)?.vocabulary.noun === SIDE\n )\n }\n\n ////////////////\n // ## The side shown (API through `DOMShapeElement`)\n ////////////////\n\n /** `activeIndex`: always the DOM element's property (a number with a default). */\n @E.controlled(\"active-index\") accessor activeSideIndex = 0\n\n /**\n * Index of the side shown now:\n * NOT a mirror of `activeSideIndex`, it follows the queue (it lags while a flip runs).\n */\n private shownIndex = this.normalize(this.activeSideIndex, this.sides.length)\n\n /** Where the queue is heading. */\n private queuedIndex = this.shownIndex\n\n /** The queue: each flip starts when the one before has finished. */\n private flipQueue: Promise<unknown> = Promise.resolve()\n\n /**\n * `activeIndex` changed (the DOM element's own write, or `flipTo()`'s):\n * flip there, unless the queue is heading there.\n * - Once `isReady`, as when this lived in `render()`:\n * a change before the sheets load flips (animated) once the stage is drawn, instead of swapping at once.\n */\n @E.onChange(\"isReady\", \"activeSideIndex\")\n protected onActiveSideIndexChanged(isReady: boolean, index: number) {\n if (!isReady) return\n const next = this.normalize(index, this.sides.length)\n if (next !== this.queuedIndex) void this.enqueue(this.defaultFlip, next)\n }\n\n /** Turn `direction` to side `index` (default the next one after where the queue is heading, wrapping). */\n @E.untracked\n flipTo(direction?: UIT.ShapeFlip, index?: number): Promise<boolean> {\n const count = this.sides.length\n if (!count) return Promise.resolve(false)\n const to = this.normalize(index ?? this.queuedIndex + 1, count)\n const done = to === this.queuedIndex ? Promise.resolve(false) : this.enqueue(direction ?? this.defaultFlip, to)\n this.activeSideIndex = to\n return done\n }\n\n /** Turn `step` sides on (negative: back), the `direction` attribute's way. */\n flipBy(step: number): Promise<boolean> {\n return this.flipTo(undefined, this.queuedIndex + step)\n }\n\n /**\n * An invoker command aimed at the DOM element (`UIT.ShapeCommands`): `--next`, `--previous`, `--flip-<direction>`.\n */\n @E.on(\"command\")\n protected onCommand(event: Event) {\n const { command } = event as Event & { command: string }\n if (command === UIT.ShapeCommands.next) void this.flipBy(1)\n else if (command === UIT.ShapeCommands.previous) void this.flipBy(-1)\n else if (command?.startsWith(UIT.ShapeCommands.flip)) {\n const direction = command.slice(UIT.ShapeCommands.flip.length) as UIT.ShapeFlip\n if (UIT.ShapeFlips.includes(direction)) void this.flipTo(direction)\n }\n }\n\n ////////////////\n // ## Flip on click (`flip-on=\"click\"`)\n ////////////////\n\n /** `flip-on=\"click\"`: a flip card, turning to its next side when pressed. */\n get flipsOnClick(): boolean {\n return this.flipOn === CLICK\n }\n\n /** A click anywhere on it turns it, unless it landed on something pressable of its own (a link on its back). */\n @E.on(\"click\")\n protected onClick(event: MouseEvent) {\n if (!this.flipsOnClick || UIShape.pressedInside(event, this.domElement)) return\n void this.flipBy(1)\n }\n\n /** Enter or Space while it has focus turns it, as a click does. */\n @E.on(\"keydown\")\n protected onKeyDown(event: KeyboardEvent) {\n if (!this.flipsOnClick || (event.key !== \"Enter\" && event.key !== \" \")) return\n if (UIShape.pressedInside(event, this.domElement)) return\n event.preventDefault()\n void this.flipBy(1)\n }\n\n /** The event started on a pressable element inside `host` (a link, a button, a field), not on the shape itself. */\n private static pressedInside(event: Event, host: Element): boolean {\n return event.composedPath().some((node) => node !== host && node instanceof Element && node.matches(PRESSABLE))\n }\n\n /** Queue a flip to `index`. */\n private enqueue(direction: UIT.ShapeFlip, index: number): Promise<boolean> {\n this.queuedIndex = index\n const run = this.flipQueue.then(() => this.flip(direction, index))\n this.flipQueue = run.catch(() => false)\n return run\n }\n\n /** `index` wrapped into `0 .. count - 1`. */\n private normalize(index: number, count: number): number {\n if (!count) return 0\n return ((Math.trunc(index) % count) + count) % count\n }\n\n ////////////////\n // ## Flipping\n ////////////////\n\n /** A flip is running: class `animating`, `:state(animating)`. */\n @E.cssState(\"animating\")\n @E.state\n accessor isFlipping = false\n\n protected get extraClass(): string | undefined {\n return this.isFlipping ? UIT.ANIMATING : undefined\n }\n\n /** The stage: the outer box, which keeps its size while the sides turn. */\n private stage?: HTMLDivElement\n\n /** The turning box of sides. */\n private box?: HTMLDivElement\n\n /**\n * One flip, Fomantic's `animate()`: stage the next side, turn the box, wait for its transition, reset.\n * - Reduced motion, a hidden or disconnected shape: swap at once.\n */\n @E.untracked\n private async flip(direction: UIT.ShapeFlip, index: number): Promise<boolean> {\n const sides = this.sides\n const active = sides[this.shownIndex]\n const next = sides[index]\n if (!next || index === this.shownIndex) return false\n const { stage, box } = this\n const isInstant = !active || !stage || !box || !this.domElement.isConnected || UI.browser.isReducedMotion\n // `offsetParent` is the platform's: `null` while hidden\n if (!isInstant && stage.offsetParent !== null) await this.animate({ direction, stage, box, active, next })\n this.shownIndex = index\n this.mark(sides)\n const detail: UIT.ShapeChangeDetail = { activeIndex: index, side: next, flip: direction }\n this.send(\"ui-animated\", detail)\n return true\n }\n\n /** Stage, turn, wait, reset. */\n private async animate({ direction, stage, box, active, next }: FlipParams) {\n // the stage keeps its size (Fomantic's `width` / `height: 'initial'`)\n stage.style.width = `${stage.offsetWidth}px`\n stage.style.height = `${stage.offsetHeight}px`\n next.setState(INACTIVE, false)\n next.setState(UIT.ANIMATING, true)\n const sizes = { active: this.sizeOf(active), next: this.sizeOf(next) }\n const staged = UIShape.staging(direction, sizes)\n Object.assign(active.style, { transform: staged.active })\n Object.assign(next.style, staged.next)\n const duration = this.cssDuration\n if (duration) box.style.transitionDuration = duration\n void box.offsetWidth\n this.isFlipping = true\n stage.classList.add(UIT.ANIMATING)\n active.setState(LEAVING, true)\n box.style.transform = UIShape.turn(direction, sizes)\n await this.transitionEnd(box)\n for (const element of [stage, box]) element.removeAttribute(\"style\")\n for (const side of [active, next]) for (const property of STAGED) side.style.removeProperty(property)\n stage.classList.remove(UIT.ANIMATING)\n active.setState(LEAVING, false)\n next.setState(UIT.ANIMATING, false)\n this.isFlipping = false\n }\n\n /** Resolve on the box's `transitionend` (its own), or after its duration plus a fail-safe. */\n private transitionEnd(box: HTMLElement): Promise<void> {\n return new Promise((resolve) => {\n const style = getComputedStyle(box)\n const wait = Math.max(...style.transitionDuration.split(\",\").map((time) => UIShape.ms(time)))\n const onEnd = (event: TransitionEvent) => {\n if (event.target === box) done()\n }\n const timer = E.after((wait + FAIL_SAFE) / 1000, done)\n box.addEventListener(\"transitionend\", onEnd)\n\n /** Stop waiting: the timer and the listener go, and the flip goes on. */\n function done() {\n timer.cancel()\n box.removeEventListener(\"transitionend\", onEnd)\n resolve()\n }\n })\n }\n\n /** A side's margin box. */\n private sizeOf(side: HTMLElement): Size {\n const style = getComputedStyle(side)\n return {\n width: side.offsetWidth + margins(\"margin-left\", \"margin-right\"),\n height: side.offsetHeight + margins(\"margin-top\", \"margin-bottom\")\n }\n\n /** The two margins, in px. */\n function margins(first: string, second: string): number {\n return parseFloat(style.getPropertyValue(first)) + parseFloat(style.getPropertyValue(second))\n }\n }\n\n /** The `direction` attribute (or its default); untracked. */\n @E.untracked\n private get defaultFlip(): UIT.ShapeFlip {\n return this.direction ?? DEFAULT_FLIP\n }\n\n /** `duration` as CSS: bare digits are ms; untracked. */\n @E.untracked\n private get cssDuration(): string | undefined {\n const text = this.duration?.trim()\n if (!text) return undefined\n return UIT.DIGITS.test(text) ? `${text}ms` : text\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n render(): JSX.Element {\n if (this.rendersInlineOnServer) return this.inlineShape()\n return (\n <div\n ref={(element) => (this.stage = element)}\n class={this.rootClass}\n part={this.partForName(\"shape\")}\n tabindex={this.flipsOnClick ? 0 : undefined}\n >\n <div ref={(element) => (this.box = element)} class={SIDES} part={this.partForName(\"sides\")} aria-live=\"polite\">\n <slot />\n </div>\n </div>\n )\n }\n\n /**\n * A `text` shape in a server render (`spell/ui/static`):\n * its static output is PHRASING content (`<span>`s, as the class grammar's),\n * since the DOM element it replaces sits in running text --\n * a `<div>` would close an open `<p>` when a browser parses the page.\n * - Its sides follow (`UISide`).\n */\n @E.untracked\n get rendersInlineOnServer(): boolean {\n return isServer && !!this.text\n }\n\n /** `render()`'s markup as `<span>`s (`rendersInlineOnServer`). */\n private inlineShape(): JSX.Element {\n return (\n <span class={this.rootClass} part={this.partForName(\"shape\")}>\n <span class={SIDES} part={this.partForName(\"sides\")} aria-live=\"polite\">\n <slot />\n </span>\n </span>\n )\n }\n\n ////////////////\n // ## Geometry (Fomantic's `shape.js`): static, as it's pure\n ////////////////\n\n /** Where the active side stays and the next one waits, 90° (or 180°) round (Fomantic's `stage.*`). */\n private static staging(\n direction: UIT.ShapeFlip,\n sizes: Sizes\n ): { active: string; next: Partial<CSSStyleDeclaration> } {\n const { active, next } = sizes\n if (direction === \"up\" || direction === \"down\") {\n const origin = (active.height - next.height) / 2\n const sign = direction === \"up\" ? 1 : -1\n return {\n active: \"rotateX(0deg)\",\n next: {\n top: `${origin}px`,\n transform: `rotateX(${sign * 90}deg) translateZ(${active.height / 2}px) translateY(${-sign * (next.height / 2)}px)`\n }\n }\n }\n const origin = (active.width - next.width) / 2\n if (direction === \"over\" || direction === \"back\") {\n return { active: \"rotateY(0deg)\", next: { left: `${origin}px`, transform: \"rotateY(-180deg)\" } }\n }\n const sign = direction === \"left\" ? -1 : 1\n return {\n active: \"rotateY(0deg)\",\n next: {\n left: `${origin}px`,\n transform: `rotateY(${sign * 90}deg) translateZ(${active.width / 2}px) translateX(${sign * (next.width / 2)}px)`\n }\n }\n }\n\n /** How the sides box turns (Fomantic's `get.transform.*`). */\n private static turn(direction: UIT.ShapeFlip, { active, next }: Sizes): string {\n switch (direction) {\n case \"up\":\n return `translateY(${next.height - active.height / 2}px) translateZ(${-active.height / 2}px) rotateX(-90deg)`\n case \"down\":\n return `translateY(${-active.height / 2}px) translateZ(${-active.height / 2}px) rotateX(90deg)`\n case \"left\":\n return `translateX(${next.width - active.width / 2}px) translateZ(${-active.width / 2}px) rotateY(90deg)`\n case \"right\":\n return `translateX(${-active.width / 2}px) translateZ(${-active.width / 2}px) rotateY(-90deg)`\n case \"over\":\n return `translateX(${-(active.width - next.width) / 2}px) rotateY(180deg)`\n case \"back\":\n return `translateX(${-(active.width - next.width) / 2}px) rotateY(-180deg)`\n }\n }\n\n /** A CSS time (`0.6s`, `600ms`) in ms. */\n private static ms(time: string): number {\n const value = Number.parseFloat(time)\n if (Number.isNaN(value)) return 0\n return time.trim().endsWith(\"ms\") ? value : value * 1000\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIShape extends E.AttributeValues<ShapeVocabulary> {}\n\n/** What one animated flip works on. */\ntype FlipParams = {\n /** which way it turns */\n direction: UIT.ShapeFlip\n /** the outer box, held at its size */\n stage: HTMLElement\n /** the turning box of sides */\n box: HTMLElement\n /** the side shown now */\n active: E.DOMElement\n /** the side turning in */\n next: E.DOMElement\n}\n\n/** A margin box, in px. */\ntype Size = { width: number; height: number }\n\n/** Margin-box sizes of the active and next sides. */\ntype Sizes = { active: Size; next: Size }\n\n/** Default of `direction` (the vocabulary's). */\nconst DEFAULT_FLIP: UIT.ShapeFlip = \"left\"\n\n/** A side's state while another is shown: hidden. */\nconst INACTIVE = \"inactive\"\n\n/** The active side's state while it turns away. */\nconst LEAVING = \"leaving\"\n\n/** A side's state in a flip card (`flip-on=\"click\"`): the sides share one place (`UIShape.css`). */\nconst IN_FLIP_CARD = \"in-flip-card\"\n\n/** The inline properties a flip stages on the sides. */\nconst STAGED = [\"transform\", \"top\", \"left\"] as const\n\n/** `flip-on`'s value for a flip card. */\nconst CLICK = \"click\"\n\n/** What a click or key on a side may press for itself, instead of turning the shape. */\nconst PRESSABLE =\n \"a[href], button, input, select, textarea, summary, label, [contenteditable], [role=button], [role=link]\"\n\n/** ms added to the transition before giving up on `transitionend`. */\nconst FAIL_SAFE = 100\n","/**\n * Every name `<ui-shape>` and `<ui-side>` use:\n * tags, 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: `<ui-shape cube>` => `ui cube shape`;\n * the element adds `animating` before the noun while it flips.\n * - A side has no `ui` (Fomantic's `.side`);\n * which one shows is the shape's `active-index`, not an attribute of the side.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `<ui-side>`\n * One side of a `<ui-shape>`: `<div class=\"side\" part=\"side\"><slot>`; the shape shows, hides and turns it.\n ****************/\nexport const sideVocabulary = {\n tag: \"ui-side\",\n icon: \"square outline\",\n topics: [\"animation\", \"content parts\", \"modules\"],\n aka: [\"shape side\", \"face\"],\n noun: \"side\",\n ui: false,\n description: \"One side of a shape.\",\n attributes: [],\n events: [],\n slots: [{ name: \"\", description: \"The side's content.\" }],\n parts: [{ name: \"side\", description: \"The face.\" }],\n states: [\n { name: \"side\", description: \"Always: its shape finds it by this.\" },\n { name: \"active\", description: \"The side shown (set by the shape).\" },\n { name: \"inactive\", description: \"Another side is shown: hidden (set by the shape).\" },\n { name: \"animating\", description: \"Turning into view (set by the shape).\" },\n { name: \"leaving\", description: \"Turning out of view (set by the shape).\" },\n {\n name: \"in-flip-card\",\n description:\n 'Its shape is a flip card (`flip-on=\"click\"`): the sides share one place, hidden ones kept in the ' +\n \"layout, so the card is as tall as its tallest side (set by the shape).\"\n }\n ],\n texts: []\n} as const satisfies E.ComponentVocabulary\n","import { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E } from \"spell/ui/core\"\nimport { UIShape } from \"./UIShape\"\nimport { SIDE } from \"./UIShape.types\"\nimport { sideVocabulary } from \"./UISide.en\"\n\nimport shapeCSS from \"./UIShape.css?inline\"\n\n/****************\n * ### `UISide`\n * The component behind `<ui-side>`:\n * one side of a `<ui-shape>` (Fomantic's `.side`), `<div class=\"side\" part=\"side\"><slot>`.\n *\n * - Passive: the DOM element is the face that turns.\n * Its shape sets its states (`active`, `inactive`, `animating`, `leaving`)\n * and, while flipping, its inline `transform` / `top` / `left`; `UIShape.css` does the rest.\n * - Outside a working shape (no `inactive` state) every side shows, stacked: content is never lost.\n * - A server render (`spell/ui/static`):\n * - in a `text` shape the root is a `<span>` (`UIShape.rendersInlineOnServer`)\n * - which side shows goes by its states (`data-state`), not the class grammar's `active` class:\n * that one's rule (states layer) would beat a cube face's `display: flex`\n ****************/\nexport class UISide extends E.UIComponent<typeof sideVocabulary> {\n @E.proto static vocabulary = sideVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { shape: shapeCSS },\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n /** Always a side: `:state(side)`. */\n @E.cssState(\"side\")\n get isSide(): boolean {\n return true\n }\n\n render(): JSX.Element {\n if (this.isInline) return this.inlineSide()\n return (\n <div class={SIDE} part={this.partForName(\"side\")}>\n <slot />\n </div>\n )\n }\n\n /** A side of a `text` shape in a server render (see class docs). */\n private get isInline(): boolean {\n if (!isServer) return false\n // `parentElement` is the platform's: `null` at the top\n const shape = (this.domElement.parentElement as E.DOMElement | null)?.component\n return shape instanceof UIShape && shape.rendersInlineOnServer\n }\n\n /** `render()`'s markup as a `<span>` (`isInline`). */\n private inlineSide(): JSX.Element {\n return (\n <span class={SIDE} part={this.partForName(\"side\")}>\n <slot />\n </span>\n )\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UISide extends E.AttributeValues<typeof sideVocabulary> {}\n","/**\n * The shape family: defines `<ui-shape>` and `<ui-side>`, and exports their components, `UIShape` and `UISide`,\n * and the shape's DOM element, `DOMShapeElement`.\n * - SIDE EFFECT: importing it defines the tags.\n * - Also the library's `spell/ui/ui-shape` entry (its size is in `notes/report.md`).\n */\n\nimport { DOMShapeElement, UIShape } from \"./UIShape\"\nimport { UISide } from \"./UISide\"\n\nUIShape.define()\nUISide.define()\n\nexport { UIShape, UISide, DOMShapeElement }\n"],"mappings":";;;;AAoBA,IAAa4D,IAAO,QAGPC,IAAQ,SCNRC,KAAkB;CAC7B,KAAK;CACL,MAAM;CACN,QAAQ;EAAC;EAAa;EAAS;CAAS;CACxC,KAAK;EAAC;EAAW;EAAQ;EAAa;CAAU;CAChD,MAAM;CACN,aAAa;CACb,YAAY;EACV;GAAE,MAAM;GAAQ,OAAO;GAAc,MAAM;GAAW,aAAa;EAA6C;EAChH;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,SAAS;GACT,aACE;EACJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ;IAAC;IAAM;IAAQ;IAAQ;IAAS;IAAQ;GAAM;GACtD,SAAS;GACT,aACE;EAEJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ,CAAC,SAAS,QAAQ;GAC1B,SAAS;GACT,aACE;EAGJ;CACF;CACA,QAAQ,CACN;EACE,MAAM;EACN,QAAQ;EACR,aAAa;CACf,CACF;CACA,OAAO,CAAC;EAAE,MAAM;EAAI,aAAa;CAA8C,CAAC;CAChF,OAAO,CACL;EAAE,MAAM;EAAS,aAAa;CAAsC,GACpE;EAAE,MAAM;EAAS,aAAa;CAAqE,CACrG;CACA,QAAQ,CAAC;EAAE,MAAM;EAAa,aAAa;CAAY,CAAC;CACxD,OAAO,CAAC;AACV,gsHElFAI,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAnE,GAAAC,GAAAC,GAAAC,GAAAqE,GAAAC,GAAAC,GAoBa,kBAAN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