@threadlabs/looma 0.28.5 → 0.28.6

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 (429) hide show
  1. package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +3 -2
  2. package/dist/index.js +1 -1
  3. package/package.json +3 -2
  4. package/styles/ui-action-bar.css +13 -6
  5. package/styles/ui-affordance-scope.css +12 -5
  6. package/styles/ui-avatar-group.css +17 -10
  7. package/styles/ui-avatar.css +23 -16
  8. package/styles/ui-badge.css +78 -71
  9. package/styles/ui-breadcrumb-item.css +12 -5
  10. package/styles/ui-breadcrumbs.css +10 -3
  11. package/styles/ui-button.css +79 -72
  12. package/styles/ui-callout.css +29 -22
  13. package/styles/ui-card.css +25 -18
  14. package/styles/ui-checkbox.css +45 -37
  15. package/styles/ui-cluster.css +34 -27
  16. package/styles/ui-combobox.css +46 -39
  17. package/styles/ui-container.css +20 -13
  18. package/styles/ui-context-menu.css +17 -10
  19. package/styles/ui-cover.css +12 -5
  20. package/styles/ui-description-item.css +10 -3
  21. package/styles/ui-description-list.css +20 -13
  22. package/styles/ui-dialog.css +44 -35
  23. package/styles/ui-disclosure.css +32 -25
  24. package/styles/ui-editable.css +15 -8
  25. package/styles/ui-editor-image-toolbar.css +1 -1
  26. package/styles/ui-editor-insert-table-grid.css +11 -4
  27. package/styles/ui-editor-mention-menu-item.css +17 -8
  28. package/styles/ui-editor-mention-menu.css +14 -7
  29. package/styles/ui-editor-slash-menu-group.css +10 -3
  30. package/styles/ui-editor-slash-menu-item.css +15 -8
  31. package/styles/ui-editor-slash-menu.css +15 -8
  32. package/styles/ui-editor-surface.css +10 -3
  33. package/styles/ui-editor-table-context-menu.css +17 -10
  34. package/styles/ui-editor-table-overlay.css +17 -10
  35. package/styles/ui-editor-table-toolbar.css +22 -15
  36. package/styles/ui-editor-toolbar.css +18 -11
  37. package/styles/ui-floating-action-button.css +21 -14
  38. package/styles/ui-form-field.css +20 -13
  39. package/styles/ui-grid.css +21 -14
  40. package/styles/ui-icon-button.css +80 -73
  41. package/styles/ui-icon.css +14 -7
  42. package/styles/ui-image.css +25 -18
  43. package/styles/ui-input-group.css +34 -27
  44. package/styles/ui-input.css +42 -35
  45. package/styles/ui-list-item.css +33 -26
  46. package/styles/ui-list.css +22 -15
  47. package/styles/ui-listbox.css +22 -14
  48. package/styles/ui-menu-group.css +10 -3
  49. package/styles/ui-menu-item.css +29 -22
  50. package/styles/ui-menu.css +25 -18
  51. package/styles/ui-meter.css +36 -29
  52. package/styles/ui-nav-item.css +26 -19
  53. package/styles/ui-page-header.css +12 -5
  54. package/styles/ui-popover.css +27 -20
  55. package/styles/ui-radio-group.css +14 -6
  56. package/styles/ui-radio.css +24 -17
  57. package/styles/ui-reel.css +28 -21
  58. package/styles/ui-scroll-area.css +22 -15
  59. package/styles/ui-search-result-row.css +28 -21
  60. package/styles/ui-search-shell.css +24 -17
  61. package/styles/ui-section.css +14 -7
  62. package/styles/ui-select.css +33 -26
  63. package/styles/ui-separator.css +17 -10
  64. package/styles/ui-sidebar.css +35 -28
  65. package/styles/ui-spinner.css +32 -23
  66. package/styles/ui-stack.css +29 -21
  67. package/styles/ui-status-message.css +14 -7
  68. package/styles/ui-switch.css +29 -22
  69. package/styles/ui-switcher.css +27 -20
  70. package/styles/ui-table.css +14 -7
  71. package/styles/ui-tabs.css +24 -17
  72. package/styles/ui-text.css +35 -28
  73. package/styles/ui-textarea.css +37 -30
  74. package/styles/ui-toast-region.css +74 -63
  75. package/styles/ui-toast.css +21 -14
  76. package/styles/ui-tooltip.css +38 -31
  77. package/styles/ui-top-bar.css +19 -12
  78. package/styles/ui-tree-item.css +79 -71
  79. package/styles/ui-tree.css +18 -11
  80. package/vanilla/UiActionBar.d.ts +1 -1
  81. package/vanilla/UiActionBar.js +1 -1
  82. package/vanilla/UiAffordanceScope.d.ts +1 -1
  83. package/vanilla/UiAffordanceScope.js +1 -1
  84. package/vanilla/UiAvatar.d.ts +1 -1
  85. package/vanilla/UiAvatar.js +1 -1
  86. package/vanilla/UiAvatarGroup.d.ts +1 -1
  87. package/vanilla/UiAvatarGroup.js +1 -1
  88. package/vanilla/UiBadge.d.ts +1 -1
  89. package/vanilla/UiBadge.js +1 -1
  90. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  91. package/vanilla/UiBreadcrumbItem.js +1 -1
  92. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  93. package/vanilla/UiBreadcrumbs.js +1 -1
  94. package/vanilla/UiButton.d.ts +1 -1
  95. package/vanilla/UiButton.js +19 -57
  96. package/vanilla/UiCallout.d.ts +1 -1
  97. package/vanilla/UiCallout.js +25 -73
  98. package/vanilla/UiCard.d.ts +1 -1
  99. package/vanilla/UiCard.js +1 -1
  100. package/vanilla/UiCheckbox.d.ts +1 -1
  101. package/vanilla/UiCheckbox.js +1 -1
  102. package/vanilla/UiCluster.d.ts +1 -1
  103. package/vanilla/UiCluster.js +1 -1
  104. package/vanilla/UiCombobox.d.ts +1 -1
  105. package/vanilla/UiCombobox.js +60 -166
  106. package/vanilla/UiContainer.d.ts +1 -1
  107. package/vanilla/UiContainer.js +1 -1
  108. package/vanilla/UiContextMenu.d.ts +1 -1
  109. package/vanilla/UiContextMenu.js +1 -1
  110. package/vanilla/UiCover.d.ts +1 -1
  111. package/vanilla/UiCover.js +1 -1
  112. package/vanilla/UiDescriptionItem.d.ts +1 -1
  113. package/vanilla/UiDescriptionItem.js +1 -1
  114. package/vanilla/UiDescriptionList.d.ts +1 -1
  115. package/vanilla/UiDescriptionList.js +1 -1
  116. package/vanilla/UiDialog.d.ts +1 -1
  117. package/vanilla/UiDialog.js +4 -10
  118. package/vanilla/UiDisclosure.d.ts +1 -1
  119. package/vanilla/UiDisclosure.js +1 -1
  120. package/vanilla/UiEditable.d.ts +1 -1
  121. package/vanilla/UiEditable.js +7 -19
  122. package/vanilla/UiEditorImageToolbar.d.ts +1 -1
  123. package/vanilla/UiEditorImageToolbar.js +1 -1
  124. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  125. package/vanilla/UiEditorInsertTableGrid.js +1 -1
  126. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  127. package/vanilla/UiEditorMentionMenu.js +17 -37
  128. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  129. package/vanilla/UiEditorMentionMenuItem.js +4 -10
  130. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  131. package/vanilla/UiEditorSlashMenu.js +5 -4
  132. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  133. package/vanilla/UiEditorSlashMenuGroup.js +1 -1
  134. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  135. package/vanilla/UiEditorSlashMenuItem.js +7 -19
  136. package/vanilla/UiEditorSurface.d.ts +1 -1
  137. package/vanilla/UiEditorSurface.js +1 -1
  138. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  139. package/vanilla/UiEditorTableContextMenu.js +6 -14
  140. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  141. package/vanilla/UiEditorTableOverlay.js +9 -25
  142. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  143. package/vanilla/UiEditorTableToolbar.js +25 -77
  144. package/vanilla/UiEditorToolbar.d.ts +1 -1
  145. package/vanilla/UiEditorToolbar.js +1 -1
  146. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  147. package/vanilla/UiFloatingActionButton.js +1 -1
  148. package/vanilla/UiFormField.d.ts +1 -1
  149. package/vanilla/UiFormField.js +1 -1
  150. package/vanilla/UiGrid.d.ts +1 -1
  151. package/vanilla/UiGrid.js +1 -1
  152. package/vanilla/UiIcon.d.ts +1 -1
  153. package/vanilla/UiIcon.js +15 -47
  154. package/vanilla/UiIconButton.d.ts +1 -1
  155. package/vanilla/UiIconButton.js +4 -10
  156. package/vanilla/UiImage.d.ts +1 -1
  157. package/vanilla/UiImage.js +1 -1
  158. package/vanilla/UiInput.d.ts +1 -1
  159. package/vanilla/UiInput.js +1 -1
  160. package/vanilla/UiInputGroup.d.ts +1 -1
  161. package/vanilla/UiInputGroup.js +1 -1
  162. package/vanilla/UiList.d.ts +1 -1
  163. package/vanilla/UiList.js +1 -1
  164. package/vanilla/UiListItem.d.ts +1 -1
  165. package/vanilla/UiListItem.js +1 -1
  166. package/vanilla/UiListbox.d.ts +1 -1
  167. package/vanilla/UiListbox.js +4 -10
  168. package/vanilla/UiMenu.d.ts +1 -1
  169. package/vanilla/UiMenu.js +1 -1
  170. package/vanilla/UiMenuGroup.d.ts +1 -1
  171. package/vanilla/UiMenuGroup.js +4 -10
  172. package/vanilla/UiMenuItem.d.ts +1 -1
  173. package/vanilla/UiMenuItem.js +4 -10
  174. package/vanilla/UiMeter.d.ts +1 -1
  175. package/vanilla/UiMeter.js +13 -33
  176. package/vanilla/UiNavItem.d.ts +1 -1
  177. package/vanilla/UiNavItem.js +1 -1
  178. package/vanilla/UiPageHeader.d.ts +1 -1
  179. package/vanilla/UiPageHeader.js +1 -1
  180. package/vanilla/UiPopover.d.ts +1 -1
  181. package/vanilla/UiPopover.js +1 -1
  182. package/vanilla/UiRadio.d.ts +1 -1
  183. package/vanilla/UiRadio.js +1 -1
  184. package/vanilla/UiRadioGroup.d.ts +1 -1
  185. package/vanilla/UiRadioGroup.js +1 -1
  186. package/vanilla/UiReel.d.ts +1 -1
  187. package/vanilla/UiReel.js +1 -1
  188. package/vanilla/UiScrollArea.d.ts +1 -1
  189. package/vanilla/UiScrollArea.js +1 -1
  190. package/vanilla/UiSearchResultRow.d.ts +1 -1
  191. package/vanilla/UiSearchResultRow.js +1 -1
  192. package/vanilla/UiSearchShell.d.ts +1 -1
  193. package/vanilla/UiSearchShell.js +1 -1
  194. package/vanilla/UiSection.d.ts +1 -1
  195. package/vanilla/UiSection.js +1 -1
  196. package/vanilla/UiSelect.d.ts +1 -1
  197. package/vanilla/UiSelect.js +1 -1
  198. package/vanilla/UiSeparator.d.ts +1 -1
  199. package/vanilla/UiSeparator.js +1 -1
  200. package/vanilla/UiSidebar.d.ts +1 -1
  201. package/vanilla/UiSidebar.js +1 -1
  202. package/vanilla/UiSpinner.d.ts +1 -1
  203. package/vanilla/UiSpinner.js +1 -1
  204. package/vanilla/UiStack.d.ts +1 -1
  205. package/vanilla/UiStack.js +1 -1
  206. package/vanilla/UiStatusMessage.d.ts +1 -1
  207. package/vanilla/UiStatusMessage.js +1 -1
  208. package/vanilla/UiSwitch.d.ts +1 -1
  209. package/vanilla/UiSwitch.js +1 -1
  210. package/vanilla/UiSwitcher.d.ts +1 -1
  211. package/vanilla/UiSwitcher.js +1 -1
  212. package/vanilla/UiTable.d.ts +1 -1
  213. package/vanilla/UiTable.js +1 -1
  214. package/vanilla/UiTabs.d.ts +1 -1
  215. package/vanilla/UiTabs.js +1 -1
  216. package/vanilla/UiText.d.ts +1 -1
  217. package/vanilla/UiText.js +1 -1
  218. package/vanilla/UiTextarea.d.ts +1 -1
  219. package/vanilla/UiTextarea.js +1 -1
  220. package/vanilla/UiToast.d.ts +1 -1
  221. package/vanilla/UiToast.js +1 -1
  222. package/vanilla/UiToastRegion.d.ts +1 -1
  223. package/vanilla/UiToastRegion.js +1 -1
  224. package/vanilla/UiTooltip.d.ts +1 -1
  225. package/vanilla/UiTooltip.js +1 -1
  226. package/vanilla/UiTopBar.d.ts +1 -1
  227. package/vanilla/UiTopBar.js +1 -1
  228. package/vanilla/UiTree.d.ts +1 -1
  229. package/vanilla/UiTree.js +1 -1
  230. package/vanilla/UiTreeItem.d.ts +1 -1
  231. package/vanilla/UiTreeItem.js +7 -19
  232. package/vue/UiActionBar.vue +46 -78
  233. package/vue/UiAffordanceScope.vue +27 -66
  234. package/vue/UiAvatar.d.ts +10 -7
  235. package/vue/UiAvatar.vue +100 -218
  236. package/vue/UiAvatarGroup.d.ts +10 -7
  237. package/vue/UiAvatarGroup.vue +78 -160
  238. package/vue/UiBadge.d.ts +1 -1
  239. package/vue/UiBadge.vue +483 -520
  240. package/vue/UiBreadcrumbItem.vue +52 -123
  241. package/vue/UiBreadcrumbs.vue +27 -70
  242. package/vue/UiButton.d.ts +2 -2
  243. package/vue/UiButton.vue +420 -471
  244. package/vue/UiCallout.vue +131 -175
  245. package/vue/UiCard.d.ts +1 -1
  246. package/vue/UiCard.vue +112 -151
  247. package/vue/UiCheckbox.d.ts +13 -10
  248. package/vue/UiCheckbox.vue +160 -221
  249. package/vue/UiCluster.d.ts +1 -1
  250. package/vue/UiCluster.vue +84 -128
  251. package/vue/UiCombobox.d.ts +71 -68
  252. package/vue/UiCombobox.vue +417 -743
  253. package/vue/UiContainer.vue +43 -87
  254. package/vue/UiContextMenu.d.ts +6 -6
  255. package/vue/UiContextMenu.vue +78 -117
  256. package/vue/UiCover.vue +29 -69
  257. package/vue/UiDescriptionItem.vue +39 -82
  258. package/vue/UiDescriptionList.vue +64 -107
  259. package/vue/UiDialog.d.ts +22 -19
  260. package/vue/UiDialog.vue +193 -246
  261. package/vue/UiDisclosure.d.ts +22 -19
  262. package/vue/UiDisclosure.vue +192 -283
  263. package/vue/UiEditable.d.ts +5 -5
  264. package/vue/UiEditable.vue +124 -207
  265. package/vue/UiEditorImageToolbar.d.ts +2 -2
  266. package/vue/UiEditorImageToolbar.vue +41 -251
  267. package/vue/UiEditorInsertTableGrid.d.ts +2 -2
  268. package/vue/UiEditorInsertTableGrid.vue +98 -266
  269. package/vue/UiEditorMentionMenu.d.ts +15 -12
  270. package/vue/UiEditorMentionMenu.vue +150 -239
  271. package/vue/UiEditorMentionMenuItem.vue +66 -110
  272. package/vue/UiEditorSlashMenu.d.ts +16 -13
  273. package/vue/UiEditorSlashMenu.vue +172 -253
  274. package/vue/UiEditorSlashMenuGroup.vue +25 -69
  275. package/vue/UiEditorSlashMenuItem.vue +67 -115
  276. package/vue/UiEditorSurface.vue +19 -63
  277. package/vue/UiEditorTableContextMenu.vue +135 -269
  278. package/vue/UiEditorTableOverlay.d.ts +2 -2
  279. package/vue/UiEditorTableOverlay.vue +310 -479
  280. package/vue/UiEditorTableToolbar.d.ts +2 -2
  281. package/vue/UiEditorTableToolbar.vue +182 -357
  282. package/vue/UiEditorToolbar.vue +143 -183
  283. package/vue/UiFloatingActionButton.vue +70 -114
  284. package/vue/UiFormField.d.ts +1 -1
  285. package/vue/UiFormField.vue +76 -117
  286. package/vue/UiGrid.d.ts +1 -1
  287. package/vue/UiGrid.vue +65 -103
  288. package/vue/UiIcon.vue +32 -106
  289. package/vue/UiIconButton.d.ts +2 -2
  290. package/vue/UiIconButton.vue +359 -411
  291. package/vue/UiImage.vue +145 -180
  292. package/vue/UiInput.vue +158 -190
  293. package/vue/UiInputGroup.vue +199 -239
  294. package/vue/UiList.vue +67 -109
  295. package/vue/UiListItem.vue +154 -201
  296. package/vue/UiListbox.d.ts +10 -7
  297. package/vue/UiListbox.vue +86 -260
  298. package/vue/UiMenu.d.ts +11 -11
  299. package/vue/UiMenu.vue +118 -152
  300. package/vue/UiMenuGroup.vue +21 -67
  301. package/vue/UiMenuItem.d.ts +19 -16
  302. package/vue/UiMenuItem.vue +169 -262
  303. package/vue/UiMeter.d.ts +4 -4
  304. package/vue/UiMeter.vue +166 -680
  305. package/vue/UiNavItem.vue +140 -213
  306. package/vue/UiPageHeader.vue +81 -127
  307. package/vue/UiPopover.d.ts +7 -7
  308. package/vue/UiPopover.vue +90 -129
  309. package/vue/UiRadio.d.ts +12 -9
  310. package/vue/UiRadio.vue +91 -149
  311. package/vue/UiRadioGroup.d.ts +2 -2
  312. package/vue/UiRadioGroup.vue +47 -85
  313. package/vue/UiReel.vue +89 -130
  314. package/vue/UiScrollArea.d.ts +1 -1
  315. package/vue/UiScrollArea.vue +78 -119
  316. package/vue/UiSearchResultRow.vue +96 -149
  317. package/vue/UiSearchShell.d.ts +2 -2
  318. package/vue/UiSearchShell.vue +159 -196
  319. package/vue/UiSection.vue +105 -149
  320. package/vue/UiSelect.d.ts +1 -1
  321. package/vue/UiSelect.vue +114 -146
  322. package/vue/UiSeparator.vue +42 -85
  323. package/vue/UiSidebar.d.ts +10 -7
  324. package/vue/UiSidebar.vue +193 -260
  325. package/vue/UiSpinner.vue +54 -130
  326. package/vue/UiStack.vue +66 -107
  327. package/vue/UiStatusMessage.d.ts +1 -1
  328. package/vue/UiStatusMessage.vue +61 -135
  329. package/vue/UiSwitch.d.ts +12 -9
  330. package/vue/UiSwitch.vue +136 -194
  331. package/vue/UiSwitcher.vue +69 -107
  332. package/vue/UiTable.vue +121 -156
  333. package/vue/UiTabs.d.ts +1 -1
  334. package/vue/UiTabs.vue +139 -267
  335. package/vue/UiText.d.ts +4 -4
  336. package/vue/UiText.vue +145 -184
  337. package/vue/UiTextarea.d.ts +2 -2
  338. package/vue/UiTextarea.vue +162 -194
  339. package/vue/UiToast.vue +70 -118
  340. package/vue/UiToastRegion.vue +157 -276
  341. package/vue/UiTooltip.d.ts +21 -18
  342. package/vue/UiTooltip.vue +174 -234
  343. package/vue/UiTopBar.vue +48 -76
  344. package/vue/UiTree.vue +46 -79
  345. package/vue/UiTreeItem.d.ts +18 -15
  346. package/vue/UiTreeItem.vue +526 -668
  347. package/vue/chunks/UiActionBar.js +5 -17
  348. package/vue/chunks/UiAffordanceScope.js +7 -26
  349. package/vue/chunks/UiAvatar.js +20 -74
  350. package/vue/chunks/UiAvatarGroup.js +14 -56
  351. package/vue/chunks/UiBadge.js +10 -28
  352. package/vue/chunks/UiBreadcrumbItem.js +11 -41
  353. package/vue/chunks/UiBreadcrumbs.js +7 -25
  354. package/vue/chunks/UiButton.js +80 -103
  355. package/vue/chunks/UiCallout.js +9 -27
  356. package/vue/chunks/UiCard.js +33 -53
  357. package/vue/chunks/UiCheckbox.js +14 -46
  358. package/vue/chunks/UiCluster.js +13 -31
  359. package/vue/chunks/UiCombobox.js +99 -237
  360. package/vue/chunks/UiContainer.js +9 -27
  361. package/vue/chunks/UiContextMenu.js +7 -26
  362. package/vue/chunks/UiCover.js +7 -25
  363. package/vue/chunks/UiDescriptionItem.js +6 -24
  364. package/vue/chunks/UiDescriptionList.js +9 -27
  365. package/vue/chunks/UiDialog.js +18 -47
  366. package/vue/chunks/UiDisclosure.js +19 -66
  367. package/vue/chunks/UiEditable.js +18 -60
  368. package/vue/chunks/UiEditorImageToolbar.js +34 -103
  369. package/vue/chunks/UiEditorInsertTableGrid.js +14 -112
  370. package/vue/chunks/UiEditorMentionMenu.js +16 -54
  371. package/vue/chunks/UiEditorMentionMenuItem.js +10 -28
  372. package/vue/chunks/UiEditorSlashMenu.js +17 -46
  373. package/vue/chunks/UiEditorSlashMenuGroup.js +7 -25
  374. package/vue/chunks/UiEditorSlashMenuItem.js +16 -31
  375. package/vue/chunks/UiEditorSurface.js +7 -25
  376. package/vue/chunks/UiEditorTableContextMenu.js +25 -102
  377. package/vue/chunks/UiEditorTableOverlay.js +41 -104
  378. package/vue/chunks/UiEditorTableToolbar.js +44 -122
  379. package/vue/chunks/UiEditorToolbar.js +7 -26
  380. package/vue/chunks/UiFloatingActionButton.js +10 -28
  381. package/vue/chunks/UiFormField.js +8 -27
  382. package/vue/chunks/UiGrid.js +10 -28
  383. package/vue/chunks/UiIcon.js +21 -74
  384. package/vue/chunks/UiIconButton.js +18 -50
  385. package/vue/chunks/UiImage.js +14 -33
  386. package/vue/chunks/UiInput.js +12 -31
  387. package/vue/chunks/UiInputGroup.js +10 -29
  388. package/vue/chunks/UiList.js +17 -37
  389. package/vue/chunks/UiListItem.js +12 -30
  390. package/vue/chunks/UiListbox.js +22 -124
  391. package/vue/chunks/UiMenu.js +13 -32
  392. package/vue/chunks/UiMenuGroup.js +8 -26
  393. package/vue/chunks/UiMenuItem.js +35 -80
  394. package/vue/chunks/UiMeter.js +17 -351
  395. package/vue/chunks/UiNavItem.js +23 -57
  396. package/vue/chunks/UiPageHeader.js +7 -25
  397. package/vue/chunks/UiPopover.js +9 -28
  398. package/vue/chunks/UiRadio.js +11 -43
  399. package/vue/chunks/UiRadioGroup.js +13 -32
  400. package/vue/chunks/UiReel.js +10 -28
  401. package/vue/chunks/UiScrollArea.js +10 -29
  402. package/vue/chunks/UiSearchResultRow.js +10 -28
  403. package/vue/chunks/UiSearchShell.js +9 -28
  404. package/vue/chunks/UiSection.js +9 -27
  405. package/vue/chunks/UiSelect.js +10 -29
  406. package/vue/chunks/UiSeparator.js +10 -28
  407. package/vue/chunks/UiSidebar.js +15 -47
  408. package/vue/chunks/UiSpinner.js +8 -44
  409. package/vue/chunks/UiStack.js +12 -30
  410. package/vue/chunks/UiStatusMessage.js +10 -42
  411. package/vue/chunks/UiSwitch.js +11 -43
  412. package/vue/chunks/UiSwitcher.js +9 -28
  413. package/vue/chunks/UiTable.js +7 -26
  414. package/vue/chunks/UiTabs.js +15 -91
  415. package/vue/chunks/UiText.js +148 -168
  416. package/vue/chunks/UiTextarea.js +16 -35
  417. package/vue/chunks/UiToast.js +13 -37
  418. package/vue/chunks/UiToastRegion.js +16 -88
  419. package/vue/chunks/UiTooltip.js +14 -46
  420. package/vue/chunks/UiTopBar.js +5 -17
  421. package/vue/chunks/UiTree.js +13 -32
  422. package/vue/chunks/UiTreeItem.js +34 -90
  423. package/vue/chunks/_plugin-vue_export-helper.js +904 -1
  424. package/vue/chunks/control.js +3 -0
  425. package/vue/chunks/props.js +1 -1
  426. package/vue/components.css +7606 -7534
  427. package/vue/editor/index.js +1 -1
  428. package/vue/host.ts +999 -14
  429. package/vue/chunks/host.js +0 -443
package/vue/UiMeter.vue CHANGED
@@ -1,362 +1,24 @@
1
- <!-- Generated by HTML Next 1.0.0-alpha.35 for Vue 3.5. Do not edit. -->
2
- <script lang="ts">
3
- function createFormatValue(): any {
4
- // FIFO bounds native instances and retained keys; only constructor inputs, never values, are cached.
5
- const cache = new Map()
6
- function formatterFor(name: any, locale: any, options: any) {
7
- const constructor = Reflect.get(Intl, name)
8
- // There is no cheap native query for changes to the default time zone. Keep native lookup for
9
- // instants without an explicit zone; civil HTML values already supply their fixed UTC anchor.
10
- if (name === 'DateTimeFormat' && options.timeZone === undefined) {
11
- return new constructor(locale, options)
12
- }
13
- const entries = []
14
- for (const key of Object.keys(options).sort()) {
15
- const value = options[key]
16
- if (value === undefined) {
17
- continue
18
- }
19
- // Native option coercion can observe mutable objects. Bypass caching rather than stringify
20
- // them or collapse NaN/infinity into null, which would change validation and side effects.
21
- if (
22
- value !== null && typeof value !== 'string' && typeof value !== 'boolean'
23
- && typeof value !== 'number'
24
- || typeof value === 'number' && !Number.isFinite(value)
25
- ) {
26
- return new constructor(locale, options)
27
- }
28
- entries.push([key, typeof value, Object.is(value, -0) ? '-0' : value])
29
- }
30
- const language = locale === undefined && typeof navigator !== 'undefined'
31
- ? navigator.language
32
- : undefined
33
- const key = JSON.stringify([name, locale, language, entries])
34
- if (key.length > 4096) {
35
- return new constructor(locale, options)
36
- }
37
- const cached = cache.get(key)
38
- if (cached !== undefined && cached.constructor === constructor) {
39
- return cached.value
40
- }
41
- const value = new constructor(locale, options)
42
- if (cache.size >= 128 && !cache.has(key)) {
43
- cache.delete(cache.keys().next().value)
44
- }
45
- cache.set(key, { constructor, value })
46
- return value
47
- }
48
- /**
49
- * The native Intl adapter. Self-contained so converters emit this same implementation only when
50
- * authored expressions use formatting, without importing the live parser or interpreter.
51
- * undefined is absence; the shared invalid-result symbol tells each target to retain its output.
52
- */
53
- return function formatValue(value: any, inputType: any, operation: any, ...args: any[]) {
54
- const invalid = Symbol.for('html-next.invalid-result')
55
- if (value === invalid || args.includes(invalid)) {
56
- return invalid
57
- }
58
- if (value === undefined || value === null || args.some((arg: any) => arg === undefined)) {
59
- return undefined
60
- }
61
- const end = operation === 'formatRange' ? args.shift() : undefined
62
- if (operation === 'formatRange' && (end === null || end === undefined)) {
63
- return undefined
64
- }
65
- const explicit = typeof args[0] === 'string'
66
- const defaults = {
67
- number: 'number',
68
- integer: 'number',
69
- percentage: 'percent',
70
- date: 'date',
71
- time: 'time',
72
- datetime: 'dateTime',
73
- 'datetime-local': 'dateTime',
74
- duration: 'duration',
75
- list: 'list',
76
- }
77
- const format = explicit ? args.shift() : Reflect.get(defaults, inputType ?? '')
78
- const options = args.length > 0 ? args.shift() : {}
79
- const locale = args.shift()
80
- if (
81
- args.length > 0 || !format || options === null || typeof options !== 'object'
82
- || Array.isArray(options) || locale !== undefined && typeof locale !== 'string'
83
- ) {
84
- return invalid
85
- }
86
- try {
87
- const durationFields = [
88
- 'years',
89
- 'months',
90
- 'weeks',
91
- 'days',
92
- 'hours',
93
- 'minutes',
94
- 'seconds',
95
- 'milliseconds',
96
- 'microseconds',
97
- 'nanoseconds',
98
- ]
99
- const settings = { ...options }
100
- let formatter
101
- let input = value
102
- let last = end
103
- let zoneFree = false
104
- if (['number', 'currency', 'percent', 'unit'].includes(format)) {
105
- if (format !== 'number') {
106
- if (settings.style !== undefined && settings.style !== format) {
107
- return invalid
108
- }
109
- settings.style = format
110
- }
111
- const quantity = (candidate: any) => {
112
- if (
113
- inputType === 'percentage' && typeof candidate === 'string'
114
- && /^-?(?:\d+(?:\.\d+)?|\.\d+)%$/.test(candidate)
115
- ) {
116
- return Number(candidate.slice(0, -1)) / 100
117
- }
118
- return candidate
119
- }
120
- input = quantity(input)
121
- last = quantity(last)
122
- if (
123
- typeof input !== 'number' || !Number.isFinite(input)
124
- || operation === 'formatRange' && (typeof last !== 'number' || !Number.isFinite(last))
125
- ) {
126
- return invalid
127
- }
128
- formatter = formatterFor('NumberFormat', locale, settings)
129
- } else if (['date', 'time', 'dateTime'].includes(format)) {
130
- const civil = inputType === 'date' || inputType === 'time' || inputType === 'datetime-local'
131
- || typeof input === 'string' && !/(?:Z|[+-]\d\d:\d\d)$/.test(input)
132
- zoneFree = civil
133
- if (civil && (settings.timeZone !== undefined || settings.timeZoneName !== undefined)) {
134
- return invalid
135
- }
136
- if (
137
- format === 'date'
138
- && (settings.timeStyle !== undefined
139
- || ['hour', 'minute', 'second', 'dayPeriod', 'fractionalSecondDigits'].some((
140
- key: any,
141
- ) => settings[key] !== undefined))
142
- || format === 'time'
143
- && (settings.dateStyle !== undefined
144
- || ['year', 'month', 'day', 'weekday', 'era'].some((key: any) =>
145
- settings[key] !== undefined
146
- ))
147
- ) {
148
- return invalid
149
- }
150
- const fields = [
151
- 'year',
152
- 'month',
153
- 'day',
154
- 'weekday',
155
- 'era',
156
- 'hour',
157
- 'minute',
158
- 'second',
159
- 'dayPeriod',
160
- 'fractionalSecondDigits',
161
- ]
162
- if (
163
- settings.dateStyle === undefined && settings.timeStyle === undefined
164
- && !fields.some((key: any) => settings[key] !== undefined)
165
- ) {
166
- if (format !== 'time') {
167
- settings.dateStyle = 'medium'
168
- }
169
- if (format !== 'date') {
170
- settings.timeStyle = 'medium'
171
- }
172
- }
173
- if (civil) {
174
- settings.timeZone = 'UTC'
175
- }
176
- const asDate = (candidate: any) => {
177
- if (typeof candidate === 'number' && Number.isFinite(candidate)) {
178
- return new Date(candidate)
179
- }
180
- if (typeof candidate !== 'string') {
181
- return undefined
182
- }
183
- let written = candidate.replace(' ', 'T')
184
- if (/^\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?$/.test(written)) {
185
- if (format !== 'time') {
186
- return undefined
187
- }
188
- written = '1970-01-01T' + written + 'Z'
189
- } else if (/^\d{4,}-\d\d-\d\d$/.test(written)) {
190
- if (format !== 'date') {
191
- return undefined
192
- }
193
- written += 'T00:00:00Z'
194
- } else if (/^\d{4,}-\d\d-\d\dT\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?$/.test(written)) {
195
- written += 'Z'
196
- } else if (
197
- !/^\d{4,}-\d\d-\d\dT\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?(?:Z|[+-]\d\d:\d\d)$/.test(written)
198
- ) {
199
- return undefined
200
- }
201
- const date = new Date(
202
- written.replace(/^(\d{5,})-/, (_match: any, year: any) =>
203
- '+' + year.padStart(6, '0') + '-'),
204
- )
205
- if (!Number.isFinite(date.getTime())) {
206
- return undefined
207
- }
208
- // Native Date normalizes invalid days; authored HTML dates must not roll into another day.
209
- const match = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d))?/.exec(written)
210
- if (!match) {
211
- return undefined
212
- }
213
- const probe = new Date(0)
214
- probe.setUTCFullYear(Number(match[1]), Number(match[2]) - 1, Number(match[3]))
215
- if (
216
- Number(match[1]) === 0 || probe.getUTCMonth() !== Number(match[2]) - 1
217
- || probe.getUTCDate() !== Number(match[3]) || Number(match[4]) > 23
218
- || Number(match[5]) > 59 || Number(match[6] ?? 0) > 59
219
- ) {
220
- return undefined
221
- }
222
- return date
223
- }
224
- input = asDate(input)
225
- last = operation === 'formatRange' ? asDate(last) : undefined
226
- if (!input || operation === 'formatRange' && !last) {
227
- return invalid
228
- }
229
- formatter = formatterFor('DateTimeFormat', locale, settings)
230
- } else {
231
- if (operation === 'formatRange') {
232
- return invalid
233
- }
234
- if (format === 'relativeTime') {
235
- if (
236
- typeof input !== 'number' || !Number.isFinite(input)
237
- || typeof settings.unit !== 'string'
238
- ) {
239
- return invalid
240
- }
241
- const unit = settings.unit
242
- delete settings.unit
243
- formatter = formatterFor('RelativeTimeFormat', locale, settings)
244
- return operation === 'formatParts'
245
- ? formatter.formatToParts(input, unit)
246
- : formatter.format(input, unit)
247
- }
248
- if (format === 'list') {
249
- if (!Array.isArray(input) || input.some((item: any) => typeof item !== 'string')) {
250
- return invalid
251
- }
252
- formatter = formatterFor('ListFormat', locale, settings)
253
- } else if (format === 'duration') {
254
- if (inputType === 'duration' && typeof input === 'string') {
255
- const match = /^(-?(?:\d+(?:\.\d+)?|\.\d+))(ms|s)$/.exec(input)
256
- if (!match) {
257
- return invalid
258
- }
259
- const milliseconds = Number(match[1]) * (match[2] === 's' ? 1000 : 1)
260
- if (!Number.isFinite(milliseconds)) {
261
- return invalid
262
- }
263
- const hours = Math.trunc(milliseconds / 3600000)
264
- const minutes = Math.trunc((milliseconds % 3600000) / 60000)
265
- const seconds = Math.trunc((milliseconds % 60000) / 1000)
266
- input = {
267
- hours,
268
- minutes,
269
- seconds,
270
- milliseconds: Math.trunc(milliseconds % 1000),
271
- microseconds: Math.trunc((milliseconds - Math.trunc(milliseconds)) * 1000),
272
- nanoseconds: Math.round(
273
- (milliseconds * 1000 - Math.trunc(milliseconds * 1000)) * 1000,
274
- ),
275
- }
276
- }
277
- if (
278
- input === null || typeof input !== 'object' || Array.isArray(input)
279
- || Object.keys(input).some((key: any) => !durationFields.includes(key))
280
- ) {
281
- return invalid
282
- }
283
- const DurationFormat = Reflect.get(Intl, 'DurationFormat')
284
- if (!DurationFormat) {
285
- return invalid
286
- }
287
- formatter = formatterFor('DurationFormat', locale, settings)
288
- } else if (format === 'displayName') {
289
- if (typeof input !== 'string' || operation === 'formatParts') {
290
- return invalid
291
- }
292
- return formatterFor('DisplayNames', locale, settings).of(input)
293
- } else if (format === 'plural') {
294
- if (typeof input !== 'number' || !Number.isFinite(input) || operation === 'formatParts') {
295
- return invalid
296
- }
297
- const forms = settings.forms
298
- if (
299
- !forms || typeof forms !== 'object' || Array.isArray(forms)
300
- || typeof forms.other !== 'string' || Object.entries(forms).some(([key, entry]: any) =>
301
- !['zero', 'one', 'two', 'few', 'many', 'other'].includes(key)
302
- || typeof entry !== 'string'
303
- )
304
- ) {
305
- return invalid
306
- }
307
- delete settings.forms
308
- const category = formatterFor('PluralRules', locale, settings).select(input)
309
- const message = forms[category] ?? forms.other
310
- const numberOptions = { ...settings }
311
- delete numberOptions.type
312
- delete numberOptions.forms
313
- const number = formatterFor('NumberFormat', locale, numberOptions).format(input)
314
- return message.replace(/#/g, () => number)
315
- }
316
- }
317
- if (!zoneFree && operation !== 'formatParts') {
318
- return operation === 'formatRange'
319
- ? formatter.formatRange(input, last)
320
- : formatter.format(input)
321
- }
322
- const parts = operation === 'formatRange'
323
- ? formatter.formatRangeToParts(input, last)
324
- : formatter.formatToParts(input)
325
- if (
326
- zoneFree && operation !== 'formatParts'
327
- && !parts.some((part: any) => part.type === 'timeZoneName')
328
- ) {
329
- return operation === 'formatRange'
330
- ? formatter.formatRange(input, last)
331
- : formatter.format(input)
332
- }
333
- const visible = zoneFree
334
- ? parts.filter((part: any, index: any) =>
335
- part.type !== 'timeZoneName'
336
- && !(part.type === 'literal' && /^[\s(),]*$/.test(part.value)
337
- && (parts[index - 1]?.type === 'timeZoneName'
338
- || parts[index + 1]?.type === 'timeZoneName'))
339
- )
340
- : parts
341
- return operation === 'formatParts' ? visible : visible.map((part: any) => part.value).join('')
342
- } catch {
343
- return invalid
344
- }
345
- }
346
- }
347
-
348
- const moduleFormatValue = createFormatValue()
349
- </script>
350
-
1
+ <!-- Generated by HTML Next 1.0.0-alpha.51 for Vue 3.5. Do not edit. -->
351
2
  <script setup lang="ts">
352
- import { computed, getCurrentInstance, watchSyncEffect } from 'vue'
3
+ import { computed, watchSyncEffect } from 'vue'
353
4
  import type { PropType } from 'vue'
5
+ import {
6
+ attribute,
7
+ checkHydratedRoot,
8
+ concat,
9
+ cycleCheckedComputed,
10
+ decimalMultiply,
11
+ decimalSubtract,
12
+ formatValue,
13
+ math,
14
+ nativeAttrs,
15
+ number,
16
+ useReflectedProp,
17
+ } from './host'
354
18
  import { checkedProp, vPropValidity } from './props'
355
19
 
356
20
  defineOptions({ inheritAttrs: false })
357
21
 
358
- const formatValue = moduleFormatValue
359
-
360
22
  const propValidityContract = {
361
23
  props: {
362
24
  label: {
@@ -562,63 +224,8 @@ void checkedProps.value
562
224
  watchSyncEffect(() => {
563
225
  void checkedProps.value
564
226
  })
565
- function nativeAttrs(attrs: Record<string, unknown>): Record<string, unknown> {
566
- const names = Object.keys(attrs)
567
- if (!names.some((name) => Object.hasOwn(Object.prototype, name))) return attrs
568
- return Object.fromEntries(names.map((name) => [
569
- Object.hasOwn(Object.prototype, name)
570
- ? name === '__proto__' ? '__Proto__' : name[0]!.toUpperCase() + name.slice(1)
571
- : name,
572
- attrs[name],
573
- ]))
574
- }
575
- const componentInstance = getCurrentInstance()
576
- function reflectedProp(
577
- name: string,
578
- kebab: string,
579
- value: unknown,
580
- fallback: string | undefined,
581
- bound: boolean,
582
- separator?: string,
583
- ): string | undefined {
584
- const incoming = componentInstance?.vnode.props
585
- if (
586
- !bound
587
- && (incoming === null || incoming === undefined
588
- || (!Object.hasOwn(incoming, name) && !Object.hasOwn(incoming, kebab)))
589
- ) return fallback
590
- if (value === null || value === undefined) return undefined
591
- return Array.isArray(value) && separator !== undefined
592
- ? value.join(separator)
593
- : typeof value === 'object'
594
- ? JSON.stringify(value)
595
- : String(value)
596
- }
597
- const hydrationInstance = getCurrentInstance()
227
+ const reflectedProp = useReflectedProp()
598
228
 
599
- // Vue may return an in-progress computed value on a cyclic read; guard the public value access instead.
600
- function cycleCheckedComputed<T>(evaluate: () => T) {
601
- const value = computed(evaluate)
602
- let reading = false
603
- return new Proxy(value, {
604
- get(target, property) {
605
- if (property !== 'value') return Reflect.get(target, property)
606
- if (reading) {
607
- const message = 'A reactive computed value depends on itself.'
608
- throw Object.assign(new Error(`HR006: ${message}`), {
609
- name: 'HtmlDiagnosticError',
610
- diagnostic: Object.freeze({ code: 'HR006', message }),
611
- })
612
- }
613
- reading = true
614
- try {
615
- return target.value
616
- } finally {
617
- reading = false
618
- }
619
- },
620
- })
621
- }
622
229
  let amountPrevious: any = null
623
230
  const amount = cycleCheckedComputed(() => {
624
231
  const next: any = math('clamp', ['number', 'number', 'number'], [
@@ -644,11 +251,14 @@ const percent = cycleCheckedComputed(() => {
644
251
  : number(amount.value)! / number(checkedProps.value.max)!,
645
252
  ) === undefined || number(100) === undefined
646
253
  ? undefined
647
- : number(
648
- number(amount.value) === undefined || number(checkedProps.value.max) === undefined
649
- ? undefined
650
- : number(amount.value)! / number(checkedProps.value.max)!,
651
- )! * number(100)!,
254
+ : decimalMultiply(
255
+ number(
256
+ number(amount.value) === undefined || number(checkedProps.value.max) === undefined
257
+ ? undefined
258
+ : number(amount.value)! / number(checkedProps.value.max)!,
259
+ )!,
260
+ number(100)!,
261
+ ),
652
262
  false: 0,
653
263
  },
654
264
  concat(
@@ -1172,19 +782,7 @@ const guardedBinding7 = computed(() => {
1172
782
  if (candidate === Symbol.for('html-next.invalid-result')) return guardedBinding7Previous
1173
783
  return guardedBinding7Previous = candidate
1174
784
  })
1175
- const hydrationNode = hydrationInstance?.vnode.el
1176
- if (
1177
- typeof window !== 'undefined' && hydrationNode != null
1178
- && (!(hydrationNode instanceof Element) || hydrationNode.localName !== ('span'))
1179
- ) {
1180
- throw Object.assign(new Error('HR005: Server markup for <ui-meter> has an incompatible root.'), {
1181
- name: 'HtmlDiagnosticError',
1182
- diagnostic: Object.freeze({
1183
- code: 'HR005',
1184
- message: 'Server markup for <ui-meter> has an incompatible root.',
1185
- }),
1186
- })
1187
- }
785
+ checkHydratedRoot('span', 'ui-meter')
1188
786
 
1189
787
  /** The values the styles' :host-state() rules test. */
1190
788
  const hostState = computed(() =>
@@ -1198,125 +796,11 @@ const hostState = computed(() =>
1198
796
  && `variant=${encodeURIComponent(checkedProps.value.variant)}`,
1199
797
  ].filter(Boolean).join(' ')
1200
798
  )
1201
-
1202
- function text(value: unknown): string {
1203
- if (Array.isArray(value)) return value.map(text).join(' ')
1204
- return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
1205
- }
1206
-
1207
- function attribute(value: unknown): any {
1208
- if (
1209
- value === null || value === undefined || value === false
1210
- || (typeof value === 'object' && !Array.isArray(value))
1211
- ) return undefined
1212
- return value === true ? '' : text(value)
1213
- }
1214
-
1215
- function number(value: unknown): number | undefined {
1216
- return typeof value === 'number' && !Number.isNaN(value) ? value : undefined
1217
- }
1218
-
1219
- // A nonempty scalar call cannot produce the invalid-result sentinel.
1220
- type ConcatResult<T extends unknown[]> = T extends
1221
- [
1222
- string | number | boolean | null | undefined,
1223
- ...(string | number | boolean | null | undefined)[],
1224
- ] ? string | undefined
1225
- : string | symbol | undefined
1226
- function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
1227
- if (values.some(value => value === Symbol.for('html-next.invalid-result'))) {
1228
- return Symbol.for('html-next.invalid-result') as ConcatResult<T>
1229
- }
1230
- if (values.some(value => value === undefined)) return undefined as ConcatResult<T>
1231
- if (values.length === 0 || values.some(value => typeof value === 'object' && value !== null)) {
1232
- return Symbol.for('html-next.invalid-result') as ConcatResult<T>
1233
- }
1234
- return values.map(value => value === null ? '' : String(value)).join('') as ConcatResult<T>
1235
- }
1236
-
1237
- function math(
1238
- fn: string,
1239
- kinds: readonly string[],
1240
- values: readonly unknown[],
1241
- ): number | string | symbol | undefined {
1242
- if (values.includes(Symbol.for('html-next.invalid-result'))) {
1243
- return Symbol.for('html-next.invalid-result')
1244
- }
1245
- if (values.some(value => value === undefined || value === null)) return undefined
1246
- if (
1247
- (fn === 'abs' || fn === 'negate') && values.length !== 1
1248
- || fn === 'round' && (values.length < 1 || values.length > 2)
1249
- || (fn === 'min' || fn === 'max') && values.length === 0
1250
- || fn === 'clamp' && values.length !== 3
1251
- ) return Symbol.for('html-next.invalid-result')
1252
- const kind = kinds[0]
1253
- const dimensional = kind === 'length' || kind === 'percentage' || kind === 'duration'
1254
- if (!dimensional && kind !== 'number') return Symbol.for('html-next.invalid-result')
1255
- let unit: string | undefined
1256
- const numbers: number[] = []
1257
- for (let index = 0; index < values.length; index++) {
1258
- if (kinds[index] !== kind) return Symbol.for('html-next.invalid-result')
1259
- const value = values[index]
1260
- if (!dimensional) {
1261
- if (typeof value !== 'number' || !Number.isFinite(value)) {
1262
- return Symbol.for('html-next.invalid-result')
1263
- }
1264
- numbers.push(value)
1265
- continue
1266
- }
1267
- if (typeof value !== 'string') return Symbol.for('html-next.invalid-result')
1268
- const match =
1269
- /^(-?(?:\d+(?:\.\d+)?|\.\d+))(vmin|vmax|rem|px|em|vw|vh|ch|ex|cm|mm|in|pt|pc|q|ms|s|%)$/.exec(
1270
- value,
1271
- )
1272
- if (match === null || unit !== undefined && match[2] !== unit) {
1273
- return Symbol.for('html-next.invalid-result')
1274
- }
1275
- unit = match[2]
1276
- if (
1277
- (unit === '%' ? 'percentage' : unit === 'ms' || unit === 's' ? 'duration' : 'length') !== kind
1278
- ) return Symbol.for('html-next.invalid-result')
1279
- const number = Number(match[1])
1280
- if (!Number.isFinite(number)) return Symbol.for('html-next.invalid-result')
1281
- numbers.push(number)
1282
- }
1283
- let result: number
1284
- switch (fn) {
1285
- case 'abs':
1286
- result = Math.abs(numbers[0]!)
1287
- break
1288
- case 'negate':
1289
- result = -numbers[0]!
1290
- break
1291
- case 'round': {
1292
- const step = Math.abs(numbers[1] ?? 1)
1293
- if (step === 0) return Symbol.for('html-next.invalid-result')
1294
- result = Math.round(numbers[0]! / step) * step
1295
- break
1296
- }
1297
- case 'min':
1298
- result = Math.min(...numbers)
1299
- break
1300
- case 'max':
1301
- result = Math.max(...numbers)
1302
- break
1303
- case 'clamp':
1304
- result = Math.max(numbers[0]!, Math.min(numbers[1]!, numbers[2]!))
1305
- break
1306
- default:
1307
- return Symbol.for('html-next.invalid-result')
1308
- }
1309
- return !Number.isFinite(result)
1310
- ? Symbol.for('html-next.invalid-result')
1311
- : unit === undefined
1312
- ? result
1313
- : String(result) + unit
1314
- }
1315
799
  </script>
1316
800
 
1317
801
  <template>
1318
802
  <span
1319
- data-component="ui-meter"
803
+ class="ui-meter"
1320
804
  v-bind="nativeAttrs($attrs)"
1321
805
  :role="guarded"
1322
806
  :aria-valuemin="guardedBinding"
@@ -1345,7 +829,7 @@ function math(
1345
829
  v-for="(part, index) in checkedProps.parts"
1346
830
  :key="index"
1347
831
  ><span
1348
- v-if="part.value > 0 && (part.value - part.value) === 0"
832
+ v-if="part.value > 0 && (decimalSubtract(part.value, part.value)) === 0"
1349
833
  class="part"
1350
834
  aria-hidden="true"
1351
835
  :style="{ 'flex-grow': part.value, 'background-color': part.color }"
@@ -1361,56 +845,6 @@ function math(
1361
845
  inherits: false;
1362
846
  }
1363
847
 
1364
- [data-component~="ui-meter"] {
1365
- --_meter-fill: var(--ui-text-muted);
1366
-
1367
- display: inline-block;
1368
- flex: none;
1369
- vertical-align: middle;
1370
- inline-size: var(--ui-meter-inline-size, 8rem);
1371
- max-inline-size: 100%;
1372
- block-size: var(--ui-space-2);
1373
- overflow: hidden;
1374
- border-radius: var(--ui-radius-round);
1375
- background: var(--ui-border);
1376
- box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.1), inset 0 -1px rgb(255 255 255 / 0.22);
1377
- /* Unseen until forced colours draw it, where the track's own colour is gone. */
1378
- outline: var(--ui-border-width) solid transparent;
1379
- }
1380
-
1381
- [data-component~="ui-meter"][data-ui-meter-state~="size=sm"] {
1382
- inline-size: var(--ui-meter-inline-size, 5rem);
1383
- block-size: var(--ui-space-1);
1384
- }
1385
-
1386
- .fill {
1387
- display: block;
1388
- block-size: 100%;
1389
- background-color: var(--_meter-fill);
1390
- background-image: linear-gradient(to bottom, rgb(255 255 255 / 0.26), transparent 70%);
1391
- box-shadow: inset 0 1px rgb(255 255 255 / 0.26), inset 0 -1px rgb(0 0 0 / 0.1);
1392
- }
1393
-
1394
- [data-component~="ui-meter"][data-ui-meter-state~="tone=accent"] {
1395
- --_meter-fill: var(--ui-accent-solid);
1396
- }
1397
-
1398
- [data-component~="ui-meter"][data-ui-meter-state~="tone=info"] {
1399
- --_meter-fill: var(--ui-info-solid);
1400
- }
1401
-
1402
- [data-component~="ui-meter"][data-ui-meter-state~="tone=success"] {
1403
- --_meter-fill: var(--ui-success-solid);
1404
- }
1405
-
1406
- [data-component~="ui-meter"][data-ui-meter-state~="tone=warning"] {
1407
- --_meter-fill: var(--ui-warning-solid);
1408
- }
1409
-
1410
- [data-component~="ui-meter"][data-ui-meter-state~="tone=danger"] {
1411
- --_meter-fill: var(--ui-danger-solid);
1412
- }
1413
-
1414
848
  /* Segments: the track and its fill show through a mask of equal segments with a gap between them.
1415
849
  A mask over the whole meter, rather than one element per segment, because the expression
1416
850
  language has no range to render N elements from, and one mask lines the fill up with the track
@@ -1419,118 +853,170 @@ function math(
1419
853
  The count arrives as an attribute, not an inline custom property (which would add a style
1420
854
  attribute to every meter), so a continuous meter renders exactly as before, and the rules below
1421
855
  turn it into a number. That caps it at 12, until attr() with a type reads any count in every engine. */
1422
- [data-component~="ui-meter"][data-ui-meter-segments="2"] {
1423
- --_segments: 2;
1424
- }
1425
856
 
1426
- [data-component~="ui-meter"][data-ui-meter-segments="3"] {
1427
- --_segments: 3;
1428
- }
857
+ /* A categorical distribution uses flex ratios, avoiding rounded percentages and retaining
858
+ identical geometry before hydration. It has no progress mask or growing-value animation. */
1429
859
 
1430
- [data-component~="ui-meter"][data-ui-meter-segments="4"] {
1431
- --_segments: 4;
1432
- }
860
+ /* Forced colours drop backgrounds: draw the fill in the text colour inside the outlined track. */
1433
861
 
1434
- [data-component~="ui-meter"][data-ui-meter-segments="5"] {
1435
- --_segments: 5;
1436
- }
862
+ /* A component that sets its display still honours the hidden attribute on its root. */
1437
863
 
1438
- [data-component~="ui-meter"][data-ui-meter-segments="6"] {
1439
- --_segments: 6;
1440
- }
864
+ @scope (.ui-meter) {
865
+ :scope:where(:scope) {
866
+ --_meter-fill: var(--ui-text-muted);
867
+
868
+ display: inline-block;
869
+ flex: none;
870
+ vertical-align: middle;
871
+ inline-size: var(--ui-meter-inline-size, 8rem);
872
+ max-inline-size: 100%;
873
+ block-size: var(--ui-space-2);
874
+ overflow: hidden;
875
+ border-radius: var(--ui-radius-round);
876
+ background: var(--ui-border);
877
+ box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.1), inset 0 -1px rgb(255 255 255 / 0.22);
878
+ /* Unseen until forced colours draw it, where the track's own colour is gone. */
879
+ outline: var(--ui-border-width) solid transparent;
880
+ }
1441
881
 
1442
- [data-component~="ui-meter"][data-ui-meter-segments="7"] {
1443
- --_segments: 7;
1444
- }
882
+ :scope:where(:scope):is([data-ui-meter-state~="size=sm"]) {
883
+ inline-size: var(--ui-meter-inline-size, 5rem);
884
+ block-size: var(--ui-space-1);
885
+ }
1445
886
 
1446
- [data-component~="ui-meter"][data-ui-meter-segments="8"] {
1447
- --_segments: 8;
1448
- }
887
+ .fill {
888
+ display: block;
889
+ block-size: 100%;
890
+ background-color: var(--_meter-fill);
891
+ background-image: linear-gradient(to bottom, rgb(255 255 255 / 0.26), transparent 70%);
892
+ box-shadow: inset 0 1px rgb(255 255 255 / 0.26), inset 0 -1px rgb(0 0 0 / 0.1);
893
+ }
1449
894
 
1450
- [data-component~="ui-meter"][data-ui-meter-segments="9"] {
1451
- --_segments: 9;
1452
- }
895
+ :scope:where(:scope):is([data-ui-meter-state~="tone=accent"]) {
896
+ --_meter-fill: var(--ui-accent-solid);
897
+ }
1453
898
 
1454
- [data-component~="ui-meter"][data-ui-meter-segments="10"] {
1455
- --_segments: 10;
1456
- }
899
+ :scope:where(:scope):is([data-ui-meter-state~="tone=info"]) {
900
+ --_meter-fill: var(--ui-info-solid);
901
+ }
1457
902
 
1458
- [data-component~="ui-meter"][data-ui-meter-segments="11"] {
1459
- --_segments: 11;
1460
- }
903
+ :scope:where(:scope):is([data-ui-meter-state~="tone=success"]) {
904
+ --_meter-fill: var(--ui-success-solid);
905
+ }
1461
906
 
1462
- [data-component~="ui-meter"][data-ui-meter-segments="12"] {
1463
- --_segments: 12;
1464
- }
907
+ :scope:where(:scope):is([data-ui-meter-state~="tone=warning"]) {
908
+ --_meter-fill: var(--ui-warning-solid);
909
+ }
910
+
911
+ :scope:where(:scope):is([data-ui-meter-state~="tone=danger"]) {
912
+ --_meter-fill: var(--ui-danger-solid);
913
+ }
914
+ :scope:where(:scope):is([data-ui-meter-segments="2"]) {
915
+ --_segments: 2;
916
+ }
1465
917
 
1466
- [data-component~="ui-meter"][data-ui-meter-segments] {
1467
- --_meter-gap: var(--ui-space-1);
1468
- --_meter-period: calc((100% + var(--_meter-gap)) / var(--_segments));
1469
- --_meter-segment: calc(var(--_meter-period) - var(--_meter-gap));
918
+ :scope:where(:scope):is([data-ui-meter-segments="3"]) {
919
+ --_segments: 3;
920
+ }
1470
921
 
1471
- mask-image: repeating-linear-gradient(
1472
- to right,
1473
- #000 0 var(--_meter-segment),
1474
- transparent 0 var(--_meter-period)
1475
- );
1476
- }
922
+ :scope:where(:scope):is([data-ui-meter-segments="4"]) {
923
+ --_segments: 4;
924
+ }
1477
925
 
1478
- [data-component~="ui-meter"][data-ui-meter-state~="size=sm"][data-ui-meter-segments] {
1479
- --_meter-gap: var(--ui-space-0-5);
1480
- }
926
+ :scope:where(:scope):is([data-ui-meter-segments="5"]) {
927
+ --_segments: 5;
928
+ }
1481
929
 
1482
- /* A categorical distribution uses flex ratios, avoiding rounded percentages and retaining
1483
- identical geometry before hydration. It has no progress mask or growing-value animation. */
1484
- [data-component~="ui-meter"][data-ui-meter-state~="variant=distribution"] {
1485
- display: flex;
1486
- inline-size: 100%;
1487
- block-size: var(--ui-space-4);
1488
- gap: var(--ui-space-0-5);
1489
- }
930
+ :scope:where(:scope):is([data-ui-meter-segments="6"]) {
931
+ --_segments: 6;
932
+ }
1490
933
 
1491
- [data-component~="ui-meter"][data-ui-meter-state~="variant=distribution"][size="sm"] {
1492
- block-size: var(--ui-space-2);
1493
- }
934
+ :scope:where(:scope):is([data-ui-meter-segments="7"]) {
935
+ --_segments: 7;
936
+ }
1494
937
 
1495
- .part {
1496
- flex-basis: 0;
1497
- min-inline-size: 0;
1498
- block-size: 100%;
1499
- }
938
+ :scope:where(:scope):is([data-ui-meter-segments="8"]) {
939
+ --_segments: 8;
940
+ }
1500
941
 
1501
- @media (forced-colors: active) {
1502
- .part {
1503
- forced-color-adjust: none;
1504
- background: CanvasText !important;
1505
- outline: var(--ui-border-width) solid Canvas;
1506
- outline-offset: calc(-1 * var(--ui-border-width));
942
+ :scope:where(:scope):is([data-ui-meter-segments="9"]) {
943
+ --_segments: 9;
1507
944
  }
1508
- }
1509
945
 
1510
- /* Forced colours drop backgrounds: draw the fill in the text colour inside the outlined track. */
1511
- @media (forced-colors: active) {
1512
- .fill {
1513
- forced-color-adjust: none;
1514
- background: CanvasText;
946
+ :scope:where(:scope):is([data-ui-meter-segments="10"]) {
947
+ --_segments: 10;
948
+ }
949
+
950
+ :scope:where(:scope):is([data-ui-meter-segments="11"]) {
951
+ --_segments: 11;
1515
952
  }
1516
953
 
1517
- /* The mask clips the track's outline, so each segment draws its own: the inset shadow draws the
1518
- top and bottom edges and the gradient the ends. */
1519
- [data-component~="ui-meter"][data-ui-meter-segments] {
1520
- forced-color-adjust: none;
1521
- background: repeating-linear-gradient(
954
+ :scope:where(:scope):is([data-ui-meter-segments="12"]) {
955
+ --_segments: 12;
956
+ }
957
+
958
+ :scope:where(:scope):is([data-ui-meter-segments]) {
959
+ --_meter-gap: var(--ui-space-1);
960
+ --_meter-period: calc((100% + var(--_meter-gap)) / var(--_segments));
961
+ --_meter-segment: calc(var(--_meter-period) - var(--_meter-gap));
962
+
963
+ mask-image: repeating-linear-gradient(
1522
964
  to right,
1523
- CanvasText 0 1px,
1524
- Canvas 0 calc(var(--_meter-segment) - 1px),
1525
- CanvasText 0 var(--_meter-segment),
965
+ #000 0 var(--_meter-segment),
1526
966
  transparent 0 var(--_meter-period)
1527
967
  );
1528
- box-shadow: inset 0 0 0 1px CanvasText;
1529
968
  }
1530
- }
1531
969
 
1532
- /* A component that sets its display still honours the hidden attribute on its root. */
1533
- [data-component~="ui-meter"][hidden] {
1534
- display: none;
970
+ :scope:where(:scope):is([data-ui-meter-state~="size=sm"][data-ui-meter-segments]) {
971
+ --_meter-gap: var(--ui-space-0-5);
972
+ }
973
+ :scope:where(:scope):is([data-ui-meter-state~="variant=distribution"]) {
974
+ display: flex;
975
+ inline-size: 100%;
976
+ block-size: var(--ui-space-4);
977
+ gap: var(--ui-space-0-5);
978
+ }
979
+
980
+ :scope:where(:scope):is([data-ui-meter-state~="variant=distribution"][size="sm"]) {
981
+ block-size: var(--ui-space-2);
982
+ }
983
+
984
+ .part {
985
+ flex-basis: 0;
986
+ min-inline-size: 0;
987
+ block-size: 100%;
988
+ }
989
+
990
+ @media (forced-colors: active) {
991
+ .part {
992
+ forced-color-adjust: none;
993
+ background: CanvasText !important;
994
+ outline: var(--ui-border-width) solid Canvas;
995
+ outline-offset: calc(-1 * var(--ui-border-width));
996
+ }
997
+ }
998
+ @media (forced-colors: active) {
999
+ .fill {
1000
+ forced-color-adjust: none;
1001
+ background: CanvasText;
1002
+ }
1003
+
1004
+ /* The mask clips the track's outline, so each segment draws its own: the inset shadow draws the
1005
+ top and bottom edges and the gradient the ends. */
1006
+ :scope:where(:scope):is([data-ui-meter-segments]) {
1007
+ forced-color-adjust: none;
1008
+ background: repeating-linear-gradient(
1009
+ to right,
1010
+ CanvasText 0 1px,
1011
+ Canvas 0 calc(var(--_meter-segment) - 1px),
1012
+ CanvasText 0 var(--_meter-segment),
1013
+ transparent 0 var(--_meter-period)
1014
+ );
1015
+ box-shadow: inset 0 0 0 1px CanvasText;
1016
+ }
1017
+ }
1018
+ :scope:where(:scope):is([hidden]) {
1019
+ display: none;
1020
+ }
1535
1021
  }
1536
1022
  </style>