@threadlabs/looma 0.28.4 → 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 (437) hide show
  1. package/components/ui-editor-image-toolbar/ui-editor-image-toolbar.html +96 -0
  2. package/components/ui-editor-image-toolbar/ui-editor-image-toolbar.js +56 -0
  3. package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +3 -2
  4. package/dist/index.js +34 -33
  5. package/package.json +3 -2
  6. package/styles/ui-action-bar.css +13 -6
  7. package/styles/ui-affordance-scope.css +12 -5
  8. package/styles/ui-avatar-group.css +17 -10
  9. package/styles/ui-avatar.css +23 -16
  10. package/styles/ui-badge.css +78 -71
  11. package/styles/ui-breadcrumb-item.css +12 -5
  12. package/styles/ui-breadcrumbs.css +10 -3
  13. package/styles/ui-button.css +79 -72
  14. package/styles/ui-callout.css +29 -22
  15. package/styles/ui-card.css +25 -18
  16. package/styles/ui-checkbox.css +45 -37
  17. package/styles/ui-cluster.css +34 -27
  18. package/styles/ui-combobox.css +46 -39
  19. package/styles/ui-container.css +20 -13
  20. package/styles/ui-context-menu.css +17 -10
  21. package/styles/ui-cover.css +12 -5
  22. package/styles/ui-description-item.css +10 -3
  23. package/styles/ui-description-list.css +20 -13
  24. package/styles/ui-dialog.css +44 -35
  25. package/styles/ui-disclosure.css +32 -25
  26. package/styles/ui-editable.css +15 -8
  27. package/styles/ui-editor-image-toolbar.css +1 -0
  28. package/styles/ui-editor-insert-table-grid.css +11 -4
  29. package/styles/ui-editor-mention-menu-item.css +17 -8
  30. package/styles/ui-editor-mention-menu.css +14 -7
  31. package/styles/ui-editor-slash-menu-group.css +10 -3
  32. package/styles/ui-editor-slash-menu-item.css +15 -8
  33. package/styles/ui-editor-slash-menu.css +15 -8
  34. package/styles/ui-editor-surface.css +10 -3
  35. package/styles/ui-editor-table-context-menu.css +17 -10
  36. package/styles/ui-editor-table-overlay.css +17 -10
  37. package/styles/ui-editor-table-toolbar.css +22 -15
  38. package/styles/ui-editor-toolbar.css +18 -11
  39. package/styles/ui-floating-action-button.css +21 -14
  40. package/styles/ui-form-field.css +20 -13
  41. package/styles/ui-grid.css +21 -14
  42. package/styles/ui-icon-button.css +80 -73
  43. package/styles/ui-icon.css +14 -7
  44. package/styles/ui-image.css +25 -18
  45. package/styles/ui-input-group.css +34 -27
  46. package/styles/ui-input.css +42 -35
  47. package/styles/ui-list-item.css +33 -26
  48. package/styles/ui-list.css +22 -15
  49. package/styles/ui-listbox.css +22 -14
  50. package/styles/ui-menu-group.css +10 -3
  51. package/styles/ui-menu-item.css +29 -22
  52. package/styles/ui-menu.css +25 -18
  53. package/styles/ui-meter.css +36 -29
  54. package/styles/ui-nav-item.css +26 -19
  55. package/styles/ui-page-header.css +12 -5
  56. package/styles/ui-popover.css +27 -20
  57. package/styles/ui-radio-group.css +14 -6
  58. package/styles/ui-radio.css +24 -17
  59. package/styles/ui-reel.css +28 -21
  60. package/styles/ui-scroll-area.css +22 -15
  61. package/styles/ui-search-result-row.css +28 -21
  62. package/styles/ui-search-shell.css +24 -17
  63. package/styles/ui-section.css +14 -7
  64. package/styles/ui-select.css +33 -26
  65. package/styles/ui-separator.css +17 -10
  66. package/styles/ui-sidebar.css +35 -28
  67. package/styles/ui-spinner.css +32 -23
  68. package/styles/ui-stack.css +29 -21
  69. package/styles/ui-status-message.css +14 -7
  70. package/styles/ui-switch.css +29 -22
  71. package/styles/ui-switcher.css +27 -20
  72. package/styles/ui-table.css +14 -7
  73. package/styles/ui-tabs.css +24 -17
  74. package/styles/ui-text.css +35 -28
  75. package/styles/ui-textarea.css +37 -30
  76. package/styles/ui-toast-region.css +74 -63
  77. package/styles/ui-toast.css +21 -14
  78. package/styles/ui-tooltip.css +38 -31
  79. package/styles/ui-top-bar.css +19 -12
  80. package/styles/ui-tree-item.css +79 -71
  81. package/styles/ui-tree.css +18 -11
  82. package/vanilla/UiActionBar.d.ts +1 -1
  83. package/vanilla/UiActionBar.js +1 -1
  84. package/vanilla/UiAffordanceScope.d.ts +1 -1
  85. package/vanilla/UiAffordanceScope.js +1 -1
  86. package/vanilla/UiAvatar.d.ts +1 -1
  87. package/vanilla/UiAvatar.js +1 -1
  88. package/vanilla/UiAvatarGroup.d.ts +1 -1
  89. package/vanilla/UiAvatarGroup.js +1 -1
  90. package/vanilla/UiBadge.d.ts +1 -1
  91. package/vanilla/UiBadge.js +1 -1
  92. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  93. package/vanilla/UiBreadcrumbItem.js +1 -1
  94. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  95. package/vanilla/UiBreadcrumbs.js +1 -1
  96. package/vanilla/UiButton.d.ts +1 -1
  97. package/vanilla/UiButton.js +19 -57
  98. package/vanilla/UiCallout.d.ts +1 -1
  99. package/vanilla/UiCallout.js +25 -73
  100. package/vanilla/UiCard.d.ts +1 -1
  101. package/vanilla/UiCard.js +1 -1
  102. package/vanilla/UiCheckbox.d.ts +1 -1
  103. package/vanilla/UiCheckbox.js +1 -1
  104. package/vanilla/UiCluster.d.ts +1 -1
  105. package/vanilla/UiCluster.js +1 -1
  106. package/vanilla/UiCombobox.d.ts +1 -1
  107. package/vanilla/UiCombobox.js +60 -166
  108. package/vanilla/UiContainer.d.ts +1 -1
  109. package/vanilla/UiContainer.js +1 -1
  110. package/vanilla/UiContextMenu.d.ts +1 -1
  111. package/vanilla/UiContextMenu.js +1 -1
  112. package/vanilla/UiCover.d.ts +1 -1
  113. package/vanilla/UiCover.js +1 -1
  114. package/vanilla/UiDescriptionItem.d.ts +1 -1
  115. package/vanilla/UiDescriptionItem.js +1 -1
  116. package/vanilla/UiDescriptionList.d.ts +1 -1
  117. package/vanilla/UiDescriptionList.js +1 -1
  118. package/vanilla/UiDialog.d.ts +1 -1
  119. package/vanilla/UiDialog.js +4 -10
  120. package/vanilla/UiDisclosure.d.ts +1 -1
  121. package/vanilla/UiDisclosure.js +1 -1
  122. package/vanilla/UiEditable.d.ts +1 -1
  123. package/vanilla/UiEditable.js +7 -19
  124. package/vanilla/UiEditorImageToolbar.d.ts +19 -0
  125. package/vanilla/UiEditorImageToolbar.js +171 -0
  126. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  127. package/vanilla/UiEditorInsertTableGrid.js +1 -1
  128. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  129. package/vanilla/UiEditorMentionMenu.js +17 -37
  130. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  131. package/vanilla/UiEditorMentionMenuItem.js +4 -10
  132. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  133. package/vanilla/UiEditorSlashMenu.js +5 -4
  134. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  135. package/vanilla/UiEditorSlashMenuGroup.js +1 -1
  136. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  137. package/vanilla/UiEditorSlashMenuItem.js +7 -19
  138. package/vanilla/UiEditorSurface.d.ts +1 -1
  139. package/vanilla/UiEditorSurface.js +1 -1
  140. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  141. package/vanilla/UiEditorTableContextMenu.js +6 -14
  142. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  143. package/vanilla/UiEditorTableOverlay.js +9 -25
  144. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  145. package/vanilla/UiEditorTableToolbar.js +25 -77
  146. package/vanilla/UiEditorToolbar.d.ts +1 -1
  147. package/vanilla/UiEditorToolbar.js +1 -1
  148. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  149. package/vanilla/UiFloatingActionButton.js +1 -1
  150. package/vanilla/UiFormField.d.ts +1 -1
  151. package/vanilla/UiFormField.js +1 -1
  152. package/vanilla/UiGrid.d.ts +1 -1
  153. package/vanilla/UiGrid.js +1 -1
  154. package/vanilla/UiIcon.d.ts +1 -1
  155. package/vanilla/UiIcon.js +15 -47
  156. package/vanilla/UiIconButton.d.ts +1 -1
  157. package/vanilla/UiIconButton.js +4 -10
  158. package/vanilla/UiImage.d.ts +1 -1
  159. package/vanilla/UiImage.js +1 -1
  160. package/vanilla/UiInput.d.ts +1 -1
  161. package/vanilla/UiInput.js +1 -1
  162. package/vanilla/UiInputGroup.d.ts +1 -1
  163. package/vanilla/UiInputGroup.js +1 -1
  164. package/vanilla/UiList.d.ts +1 -1
  165. package/vanilla/UiList.js +1 -1
  166. package/vanilla/UiListItem.d.ts +1 -1
  167. package/vanilla/UiListItem.js +1 -1
  168. package/vanilla/UiListbox.d.ts +1 -1
  169. package/vanilla/UiListbox.js +4 -10
  170. package/vanilla/UiMenu.d.ts +1 -1
  171. package/vanilla/UiMenu.js +1 -1
  172. package/vanilla/UiMenuGroup.d.ts +1 -1
  173. package/vanilla/UiMenuGroup.js +4 -10
  174. package/vanilla/UiMenuItem.d.ts +1 -1
  175. package/vanilla/UiMenuItem.js +4 -10
  176. package/vanilla/UiMeter.d.ts +1 -1
  177. package/vanilla/UiMeter.js +13 -33
  178. package/vanilla/UiNavItem.d.ts +1 -1
  179. package/vanilla/UiNavItem.js +1 -1
  180. package/vanilla/UiPageHeader.d.ts +1 -1
  181. package/vanilla/UiPageHeader.js +1 -1
  182. package/vanilla/UiPopover.d.ts +1 -1
  183. package/vanilla/UiPopover.js +1 -1
  184. package/vanilla/UiRadio.d.ts +1 -1
  185. package/vanilla/UiRadio.js +1 -1
  186. package/vanilla/UiRadioGroup.d.ts +1 -1
  187. package/vanilla/UiRadioGroup.js +1 -1
  188. package/vanilla/UiReel.d.ts +1 -1
  189. package/vanilla/UiReel.js +1 -1
  190. package/vanilla/UiScrollArea.d.ts +1 -1
  191. package/vanilla/UiScrollArea.js +1 -1
  192. package/vanilla/UiSearchResultRow.d.ts +1 -1
  193. package/vanilla/UiSearchResultRow.js +1 -1
  194. package/vanilla/UiSearchShell.d.ts +1 -1
  195. package/vanilla/UiSearchShell.js +1 -1
  196. package/vanilla/UiSection.d.ts +1 -1
  197. package/vanilla/UiSection.js +1 -1
  198. package/vanilla/UiSelect.d.ts +1 -1
  199. package/vanilla/UiSelect.js +1 -1
  200. package/vanilla/UiSeparator.d.ts +1 -1
  201. package/vanilla/UiSeparator.js +1 -1
  202. package/vanilla/UiSidebar.d.ts +1 -1
  203. package/vanilla/UiSidebar.js +1 -1
  204. package/vanilla/UiSpinner.d.ts +1 -1
  205. package/vanilla/UiSpinner.js +1 -1
  206. package/vanilla/UiStack.d.ts +1 -1
  207. package/vanilla/UiStack.js +1 -1
  208. package/vanilla/UiStatusMessage.d.ts +1 -1
  209. package/vanilla/UiStatusMessage.js +1 -1
  210. package/vanilla/UiSwitch.d.ts +1 -1
  211. package/vanilla/UiSwitch.js +1 -1
  212. package/vanilla/UiSwitcher.d.ts +1 -1
  213. package/vanilla/UiSwitcher.js +1 -1
  214. package/vanilla/UiTable.d.ts +1 -1
  215. package/vanilla/UiTable.js +1 -1
  216. package/vanilla/UiTabs.d.ts +1 -1
  217. package/vanilla/UiTabs.js +1 -1
  218. package/vanilla/UiText.d.ts +1 -1
  219. package/vanilla/UiText.js +1 -1
  220. package/vanilla/UiTextarea.d.ts +1 -1
  221. package/vanilla/UiTextarea.js +1 -1
  222. package/vanilla/UiToast.d.ts +1 -1
  223. package/vanilla/UiToast.js +1 -1
  224. package/vanilla/UiToastRegion.d.ts +1 -1
  225. package/vanilla/UiToastRegion.js +1 -1
  226. package/vanilla/UiTooltip.d.ts +1 -1
  227. package/vanilla/UiTooltip.js +1 -1
  228. package/vanilla/UiTopBar.d.ts +1 -1
  229. package/vanilla/UiTopBar.js +1 -1
  230. package/vanilla/UiTree.d.ts +1 -1
  231. package/vanilla/UiTree.js +1 -1
  232. package/vanilla/UiTreeItem.d.ts +1 -1
  233. package/vanilla/UiTreeItem.js +7 -19
  234. package/vanilla/index.js +1 -0
  235. package/vue/UiActionBar.vue +46 -78
  236. package/vue/UiAffordanceScope.vue +27 -66
  237. package/vue/UiAvatar.d.ts +10 -7
  238. package/vue/UiAvatar.vue +100 -218
  239. package/vue/UiAvatarGroup.d.ts +10 -7
  240. package/vue/UiAvatarGroup.vue +78 -160
  241. package/vue/UiBadge.d.ts +1 -1
  242. package/vue/UiBadge.vue +483 -520
  243. package/vue/UiBreadcrumbItem.vue +52 -123
  244. package/vue/UiBreadcrumbs.vue +27 -70
  245. package/vue/UiButton.d.ts +2 -2
  246. package/vue/UiButton.vue +420 -471
  247. package/vue/UiCallout.vue +131 -175
  248. package/vue/UiCard.d.ts +1 -1
  249. package/vue/UiCard.vue +112 -151
  250. package/vue/UiCheckbox.d.ts +13 -10
  251. package/vue/UiCheckbox.vue +160 -221
  252. package/vue/UiCluster.d.ts +1 -1
  253. package/vue/UiCluster.vue +84 -128
  254. package/vue/UiCombobox.d.ts +71 -68
  255. package/vue/UiCombobox.vue +417 -743
  256. package/vue/UiContainer.vue +43 -87
  257. package/vue/UiContextMenu.d.ts +6 -6
  258. package/vue/UiContextMenu.vue +78 -117
  259. package/vue/UiCover.vue +29 -69
  260. package/vue/UiDescriptionItem.vue +39 -82
  261. package/vue/UiDescriptionList.vue +64 -107
  262. package/vue/UiDialog.d.ts +22 -19
  263. package/vue/UiDialog.vue +193 -246
  264. package/vue/UiDisclosure.d.ts +22 -19
  265. package/vue/UiDisclosure.vue +192 -283
  266. package/vue/UiEditable.d.ts +5 -5
  267. package/vue/UiEditable.vue +124 -207
  268. package/vue/UiEditorImageToolbar.d.ts +54 -0
  269. package/vue/UiEditorImageToolbar.js +2 -0
  270. package/vue/UiEditorImageToolbar.vue +415 -0
  271. package/vue/UiEditorInsertTableGrid.d.ts +2 -2
  272. package/vue/UiEditorInsertTableGrid.vue +98 -266
  273. package/vue/UiEditorMentionMenu.d.ts +15 -12
  274. package/vue/UiEditorMentionMenu.vue +150 -239
  275. package/vue/UiEditorMentionMenuItem.vue +66 -110
  276. package/vue/UiEditorSlashMenu.d.ts +16 -13
  277. package/vue/UiEditorSlashMenu.vue +172 -253
  278. package/vue/UiEditorSlashMenuGroup.vue +25 -69
  279. package/vue/UiEditorSlashMenuItem.vue +67 -115
  280. package/vue/UiEditorSurface.vue +19 -63
  281. package/vue/UiEditorTableContextMenu.vue +135 -269
  282. package/vue/UiEditorTableOverlay.d.ts +2 -2
  283. package/vue/UiEditorTableOverlay.vue +310 -479
  284. package/vue/UiEditorTableToolbar.d.ts +2 -2
  285. package/vue/UiEditorTableToolbar.vue +182 -357
  286. package/vue/UiEditorToolbar.vue +143 -183
  287. package/vue/UiFloatingActionButton.vue +70 -114
  288. package/vue/UiFormField.d.ts +1 -1
  289. package/vue/UiFormField.vue +76 -117
  290. package/vue/UiGrid.d.ts +1 -1
  291. package/vue/UiGrid.vue +65 -103
  292. package/vue/UiIcon.vue +32 -106
  293. package/vue/UiIconButton.d.ts +2 -2
  294. package/vue/UiIconButton.vue +359 -411
  295. package/vue/UiImage.vue +145 -180
  296. package/vue/UiInput.vue +158 -190
  297. package/vue/UiInputGroup.vue +199 -239
  298. package/vue/UiList.vue +67 -109
  299. package/vue/UiListItem.vue +154 -201
  300. package/vue/UiListbox.d.ts +10 -7
  301. package/vue/UiListbox.vue +86 -260
  302. package/vue/UiMenu.d.ts +11 -11
  303. package/vue/UiMenu.vue +118 -152
  304. package/vue/UiMenuGroup.vue +21 -67
  305. package/vue/UiMenuItem.d.ts +19 -16
  306. package/vue/UiMenuItem.vue +169 -262
  307. package/vue/UiMeter.d.ts +4 -4
  308. package/vue/UiMeter.vue +166 -680
  309. package/vue/UiNavItem.vue +140 -213
  310. package/vue/UiPageHeader.vue +81 -127
  311. package/vue/UiPopover.d.ts +7 -7
  312. package/vue/UiPopover.vue +90 -129
  313. package/vue/UiRadio.d.ts +12 -9
  314. package/vue/UiRadio.vue +91 -149
  315. package/vue/UiRadioGroup.d.ts +2 -2
  316. package/vue/UiRadioGroup.vue +47 -85
  317. package/vue/UiReel.vue +89 -130
  318. package/vue/UiScrollArea.d.ts +1 -1
  319. package/vue/UiScrollArea.vue +78 -119
  320. package/vue/UiSearchResultRow.vue +96 -149
  321. package/vue/UiSearchShell.d.ts +2 -2
  322. package/vue/UiSearchShell.vue +159 -196
  323. package/vue/UiSection.vue +105 -149
  324. package/vue/UiSelect.d.ts +1 -1
  325. package/vue/UiSelect.vue +114 -146
  326. package/vue/UiSeparator.vue +42 -85
  327. package/vue/UiSidebar.d.ts +10 -7
  328. package/vue/UiSidebar.vue +193 -260
  329. package/vue/UiSpinner.vue +54 -130
  330. package/vue/UiStack.vue +66 -107
  331. package/vue/UiStatusMessage.d.ts +1 -1
  332. package/vue/UiStatusMessage.vue +61 -135
  333. package/vue/UiSwitch.d.ts +12 -9
  334. package/vue/UiSwitch.vue +136 -194
  335. package/vue/UiSwitcher.vue +69 -107
  336. package/vue/UiTable.vue +121 -156
  337. package/vue/UiTabs.d.ts +1 -1
  338. package/vue/UiTabs.vue +139 -267
  339. package/vue/UiText.d.ts +4 -4
  340. package/vue/UiText.vue +145 -184
  341. package/vue/UiTextarea.d.ts +2 -2
  342. package/vue/UiTextarea.vue +162 -194
  343. package/vue/UiToast.vue +70 -118
  344. package/vue/UiToastRegion.vue +157 -276
  345. package/vue/UiTooltip.d.ts +21 -18
  346. package/vue/UiTooltip.vue +174 -234
  347. package/vue/UiTopBar.vue +48 -76
  348. package/vue/UiTree.vue +46 -79
  349. package/vue/UiTreeItem.d.ts +18 -15
  350. package/vue/UiTreeItem.vue +526 -668
  351. package/vue/chunks/UiActionBar.js +5 -17
  352. package/vue/chunks/UiAffordanceScope.js +7 -26
  353. package/vue/chunks/UiAvatar.js +20 -74
  354. package/vue/chunks/UiAvatarGroup.js +14 -56
  355. package/vue/chunks/UiBadge.js +10 -28
  356. package/vue/chunks/UiBreadcrumbItem.js +11 -41
  357. package/vue/chunks/UiBreadcrumbs.js +7 -25
  358. package/vue/chunks/UiButton.js +80 -103
  359. package/vue/chunks/UiCallout.js +9 -27
  360. package/vue/chunks/UiCard.js +33 -53
  361. package/vue/chunks/UiCheckbox.js +14 -46
  362. package/vue/chunks/UiCluster.js +13 -31
  363. package/vue/chunks/UiCombobox.js +99 -237
  364. package/vue/chunks/UiContainer.js +9 -27
  365. package/vue/chunks/UiContextMenu.js +7 -26
  366. package/vue/chunks/UiCover.js +7 -25
  367. package/vue/chunks/UiDescriptionItem.js +6 -24
  368. package/vue/chunks/UiDescriptionList.js +9 -27
  369. package/vue/chunks/UiDialog.js +18 -47
  370. package/vue/chunks/UiDisclosure.js +19 -66
  371. package/vue/chunks/UiEditable.js +18 -60
  372. package/vue/chunks/UiEditorImageToolbar.js +515 -0
  373. package/vue/chunks/UiEditorInsertTableGrid.js +14 -112
  374. package/vue/chunks/UiEditorMentionMenu.js +16 -54
  375. package/vue/chunks/UiEditorMentionMenuItem.js +10 -28
  376. package/vue/chunks/UiEditorSlashMenu.js +17 -46
  377. package/vue/chunks/UiEditorSlashMenuGroup.js +7 -25
  378. package/vue/chunks/UiEditorSlashMenuItem.js +16 -31
  379. package/vue/chunks/UiEditorSurface.js +7 -25
  380. package/vue/chunks/UiEditorTableContextMenu.js +25 -102
  381. package/vue/chunks/UiEditorTableOverlay.js +41 -104
  382. package/vue/chunks/UiEditorTableToolbar.js +44 -122
  383. package/vue/chunks/UiEditorToolbar.js +7 -26
  384. package/vue/chunks/UiFloatingActionButton.js +10 -28
  385. package/vue/chunks/UiFormField.js +8 -27
  386. package/vue/chunks/UiGrid.js +10 -28
  387. package/vue/chunks/UiIcon.js +21 -74
  388. package/vue/chunks/UiIconButton.js +18 -50
  389. package/vue/chunks/UiImage.js +14 -33
  390. package/vue/chunks/UiInput.js +12 -31
  391. package/vue/chunks/UiInputGroup.js +10 -29
  392. package/vue/chunks/UiList.js +17 -37
  393. package/vue/chunks/UiListItem.js +12 -30
  394. package/vue/chunks/UiListbox.js +22 -124
  395. package/vue/chunks/UiMenu.js +13 -32
  396. package/vue/chunks/UiMenuGroup.js +8 -26
  397. package/vue/chunks/UiMenuItem.js +35 -80
  398. package/vue/chunks/UiMeter.js +17 -351
  399. package/vue/chunks/UiNavItem.js +23 -57
  400. package/vue/chunks/UiPageHeader.js +7 -25
  401. package/vue/chunks/UiPopover.js +9 -28
  402. package/vue/chunks/UiRadio.js +11 -43
  403. package/vue/chunks/UiRadioGroup.js +13 -32
  404. package/vue/chunks/UiReel.js +10 -28
  405. package/vue/chunks/UiScrollArea.js +10 -29
  406. package/vue/chunks/UiSearchResultRow.js +10 -28
  407. package/vue/chunks/UiSearchShell.js +9 -28
  408. package/vue/chunks/UiSection.js +9 -27
  409. package/vue/chunks/UiSelect.js +10 -29
  410. package/vue/chunks/UiSeparator.js +10 -28
  411. package/vue/chunks/UiSidebar.js +15 -47
  412. package/vue/chunks/UiSpinner.js +8 -44
  413. package/vue/chunks/UiStack.js +12 -30
  414. package/vue/chunks/UiStatusMessage.js +10 -42
  415. package/vue/chunks/UiSwitch.js +11 -43
  416. package/vue/chunks/UiSwitcher.js +9 -28
  417. package/vue/chunks/UiTable.js +7 -26
  418. package/vue/chunks/UiTabs.js +15 -91
  419. package/vue/chunks/UiText.js +148 -168
  420. package/vue/chunks/UiTextarea.js +16 -35
  421. package/vue/chunks/UiToast.js +13 -37
  422. package/vue/chunks/UiToastRegion.js +16 -88
  423. package/vue/chunks/UiTooltip.js +14 -46
  424. package/vue/chunks/UiTopBar.js +5 -17
  425. package/vue/chunks/UiTree.js +13 -32
  426. package/vue/chunks/UiTreeItem.js +34 -90
  427. package/vue/chunks/_plugin-vue_export-helper.js +904 -1
  428. package/vue/chunks/control.js +3 -0
  429. package/vue/chunks/props.js +1 -1
  430. package/vue/components.css +7902 -7830
  431. package/vue/editor/index.js +42 -171
  432. package/vue/editor/primitives.d.ts +9 -1
  433. package/vue/host.ts +999 -14
  434. package/vue/index.d.ts +1 -0
  435. package/vue/index.js +9 -8
  436. package/vue/chunks/host.js +0 -443
  437. package/vue/editor/image-controls.d.ts +0 -19
@@ -1,3 +1,906 @@
1
+ import { Fragment, computed, defineComponent, getCurrentInstance, h, onBeforeUnmount, onBeforeUpdate, onMounted, onUpdated, shallowRef, useSlots, watchEffect } from "vue";
2
+ //#region .build/vue/host.ts
3
+ function controllerNamespaces(options, source) {
4
+ const reported = /* @__PURE__ */ new Set();
5
+ const nested = /* @__PURE__ */ new WeakMap();
6
+ const eventType = typeof Event === "undefined" ? void 0 : Object.getOwnPropertyDescriptor(Event.prototype, "type").get;
7
+ const eventBrands = /* @__PURE__ */ new WeakMap();
8
+ const nativeEvent = (value) => {
9
+ if (!("type" in value) || eventType === void 0) return false;
10
+ const known = eventBrands.get(value);
11
+ if (known !== void 0) return known;
12
+ let accepted = false;
13
+ try {
14
+ eventType.call(value);
15
+ accepted = true;
16
+ } catch {}
17
+ eventBrands.set(value, accepted);
18
+ return accepted;
19
+ };
20
+ const warn = (path, readonly) => {
21
+ if (reported.has(path)) return;
22
+ reported.add(path);
23
+ console.warn(source + ": HR007: Destination " + path + (readonly ? " is read-only." : " does not satisfy its declared type."));
24
+ };
25
+ const write = (name, keys, value, readonly, apply) => {
26
+ if (readonly || options.acceptsState?.(name, keys, value) === false) warn([name, ...keys].join("."), readonly);
27
+ else apply();
28
+ return true;
29
+ };
30
+ const plain = /* @__PURE__ */ new WeakMap();
31
+ const unwrap = (value) => typeof value === "object" && value !== null && plain.has(value) ? plain.get(value) : value;
32
+ const wrap = (value, name, keys, readonly) => {
33
+ if (value === null || typeof value !== "object" || nativeEvent(value)) return value;
34
+ const path = [name, ...keys].join(".");
35
+ let paths = nested.get(value);
36
+ if (paths === void 0) nested.set(value, paths = /* @__PURE__ */ new Map());
37
+ const known = paths.get(path);
38
+ if (known !== void 0) return known;
39
+ const surface = readonly ? Array.isArray(value) ? [] : Object.create(Object.getPrototypeOf(value)) : value;
40
+ if (readonly && Array.isArray(value)) surface.length = value.length;
41
+ const proxy = new Proxy(surface, {
42
+ get: (_target, key) => {
43
+ if (!readonly) options.read?.(name, [...keys, String(key)]);
44
+ return wrap(Reflect.get(value, key), name, [...keys, String(key)], readonly);
45
+ },
46
+ set: (_target, key, written) => {
47
+ const next = unwrap(written);
48
+ return write(name, [...keys, String(key)], next, readonly, () => {
49
+ const previous = Reflect.get(value, key);
50
+ const length = Array.isArray(value) ? value.length : void 0;
51
+ if (Reflect.set(value, key, next) && !Object.is(previous, next)) options.changed?.(name, [...keys, String(key)]);
52
+ if (length !== void 0 && length !== value.length && key !== "length") options.changed?.(name, [...keys, "length"]);
53
+ });
54
+ },
55
+ has: (_target, key) => Reflect.has(value, key),
56
+ ownKeys: () => Reflect.ownKeys(value),
57
+ getOwnPropertyDescriptor: (_target, key) => {
58
+ if (readonly && Array.isArray(value) && key === "length") {
59
+ surface.length = value.length;
60
+ return Reflect.getOwnPropertyDescriptor(surface, key);
61
+ }
62
+ const descriptor = Reflect.getOwnPropertyDescriptor(value, key);
63
+ return descriptor === void 0 ? void 0 : readonly ? {
64
+ ...descriptor,
65
+ configurable: true
66
+ } : descriptor;
67
+ },
68
+ deleteProperty: (_target, key) => write(name, [...keys, String(key)], void 0, readonly, () => {
69
+ if (Reflect.has(value, key) && Reflect.deleteProperty(value, key)) options.changed?.(name, [...keys, String(key)]);
70
+ }),
71
+ defineProperty: (_target, key, descriptor) => {
72
+ if (readonly || !("value" in descriptor) || options.acceptsState?.(name, [...keys, String(key)], descriptor.value) === false) {
73
+ warn([
74
+ name,
75
+ ...keys,
76
+ String(key)
77
+ ].join("."), readonly);
78
+ return false;
79
+ }
80
+ const changed = Reflect.defineProperty(value, key, descriptor);
81
+ if (changed) options.changed?.(name, [...keys, String(key)]);
82
+ return changed;
83
+ }
84
+ });
85
+ paths.set(path, proxy);
86
+ plain.set(proxy, value);
87
+ return proxy;
88
+ };
89
+ return {
90
+ state: new Proxy({}, {
91
+ get: (_target, name) => {
92
+ if (typeof name !== "string") return void 0;
93
+ if (Object.hasOwn(options.state, name)) return wrap(options.state[name].get(), name, [], false);
94
+ if (Object.hasOwn(options.computed, name)) return wrap(options.computed[name](), name, [], true);
95
+ },
96
+ set: (_target, name, value) => write(String(name), [], unwrap(value), typeof name !== "string" || !Object.hasOwn(options.state, name), () => options.state[String(name)].set(unwrap(value))),
97
+ deleteProperty: (_target, name) => {
98
+ warn(String(name), true);
99
+ return true;
100
+ },
101
+ defineProperty: (_target, name) => {
102
+ warn(String(name), true);
103
+ return false;
104
+ },
105
+ has: (_target, name) => typeof name === "string" && (Object.hasOwn(options.state, name) || Object.hasOwn(options.computed, name))
106
+ }),
107
+ data: new Proxy({}, {
108
+ get: (_target, name) => typeof name === "string" && Object.hasOwn(options.data ?? {}, name) ? wrap(options.data[name](), "data." + name, [], true) : void 0,
109
+ set: (_target, name, value) => write("data." + String(name), [], value, true, () => {}),
110
+ deleteProperty: (_target, name) => {
111
+ warn("data." + String(name), true);
112
+ return true;
113
+ },
114
+ defineProperty: (_target, name) => {
115
+ warn("data." + String(name), true);
116
+ return false;
117
+ },
118
+ has: (_target, name) => typeof name === "string" && Object.hasOwn(options.data ?? {}, name)
119
+ })
120
+ };
121
+ }
122
+ function dispatchToTargets(recorded, send) {
123
+ const targets = (recorded instanceof Set ? [...recorded] : Array.isArray(recorded) ? [...recorded] : [recorded]).map((ref) => ref?.nodeType === 1 ? ref : ref?.$el).filter((element) => element?.nodeType === 1 && element.isConnected).sort((a, b) => a === b ? 0 : a.compareDocumentPosition(b) & 4 ? -1 : 1);
124
+ for (const target of targets) if (target.isConnected) send(target);
125
+ }
126
+ var runtimeKey = Symbol.for("@nextwebwg/html-next.runtime.v1");
127
+ function observeConnection(element, check) {
128
+ const document = element.ownerDocument;
129
+ const state = document[runtimeKey] ??= {};
130
+ let hub = state.mutationHub;
131
+ if (hub === void 0) {
132
+ const Observer = document.defaultView?.MutationObserver ?? MutationObserver;
133
+ const subscribers = /* @__PURE__ */ new Set();
134
+ const observer = new Observer((mutations) => {
135
+ for (const notify of Array.from(subscribers)) notify(mutations);
136
+ });
137
+ hub = {
138
+ observer,
139
+ subscribers
140
+ };
141
+ state.mutationHub = hub;
142
+ observer.observe(document, {
143
+ childList: true,
144
+ subtree: true
145
+ });
146
+ }
147
+ const shared = hub;
148
+ const subscriber = () => check();
149
+ shared.subscribers.add(subscriber);
150
+ return () => {
151
+ shared.subscribers.delete(subscriber);
152
+ if (shared.subscribers.size === 0 && state.mutationHub === shared) {
153
+ shared.observer.disconnect();
154
+ delete state.mutationHub;
155
+ }
156
+ };
157
+ }
158
+ /** Keep native focus on the corresponding control when a root-level $match replaces its element. */
159
+ function preserveRootFocus(root) {
160
+ const focusable = "a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]";
161
+ let previous = null;
162
+ let active = null;
163
+ let focusIndex = -1;
164
+ onBeforeUpdate(() => {
165
+ previous = root.value;
166
+ active = previous?.ownerDocument.activeElement ?? null;
167
+ focusIndex = previous !== null && active !== null && active !== previous && previous.contains(active) ? Array.from(previous.querySelectorAll(focusable)).indexOf(active) : -1;
168
+ });
169
+ onUpdated(() => {
170
+ const next = root.value;
171
+ if (previous === null || next === null || previous === next) return;
172
+ (active === previous ? next : active?.isConnected === true && next.contains(active) ? active : focusIndex >= 0 ? next.querySelectorAll(focusable)[focusIndex] : void 0)?.focus?.({ preventScroll: true });
173
+ });
174
+ }
175
+ /** Vue does not promise a `v-for` ref array in source order, and the host does. */
176
+ function inDocumentOrder(elements) {
177
+ return [...elements].sort((a, b) => (a.compareDocumentPosition(b) & 4) !== 0 ? -1 : 1);
178
+ }
179
+ /** Slot content flattened to the elements Vue mounted for it, descending through fragments. */
180
+ function slottedElements(nodes) {
181
+ const elements = [];
182
+ for (const node of nodes) if (node.type === Fragment && Array.isArray(node.children)) elements.push(...slottedElements(node.children));
183
+ else if (node.el instanceof Element) elements.push(node.el);
184
+ return elements;
185
+ }
186
+ /**
187
+ * The controller host, built from Vue refs, effects, and lifecycle. Reads and writes reach the
188
+ * component's own refs, so a controller's change renders as any other Vue change does. Vue
189
+ * hooks cover mount/unmount; a shared native observer also detects external root detachment
190
+ * and reinsertion without treating an in-tree move as a new connection.
191
+ */
192
+ function useComponentHost(controllerLoader, options) {
193
+ const { root, dispatch, props, propInputs = () => null, propNames = [], refs = {}, state = {}, computed: computedValues = {}, data = {}, context = {} } = options;
194
+ const vueSlots = useSlots();
195
+ const component = getCurrentInstance();
196
+ const report = (error) => {
197
+ const handler = component?.appContext.config.errorHandler;
198
+ if (handler === void 0) queueMicrotask(() => {
199
+ throw error;
200
+ });
201
+ else handler(error, component?.proxy ?? null, "HTML Next controller");
202
+ };
203
+ const controllerDiagnostic = (code, reason) => {
204
+ const edge = options.controllerSource;
205
+ const source = edge?.definition ? new URL(edge.definition, document.baseURI).href : void 0;
206
+ const url = new URL(edge?.specifier ?? "", source ?? document.baseURI).href;
207
+ const message = code === "HJ002" ? "Controller module `" + url + "` must default-export a function." : "Controller module `" + url + "` failed to load: " + (reason instanceof Error ? reason.message : String(reason)) + ".";
208
+ return Object.assign(/* @__PURE__ */ new Error((source === void 0 ? "" : source + ": ") + code + ": " + message), {
209
+ name: "HtmlDiagnosticError",
210
+ diagnostic: Object.freeze({
211
+ code,
212
+ message,
213
+ ...source === void 0 ? {} : { source }
214
+ })
215
+ });
216
+ };
217
+ let controllerModule;
218
+ const loadControllerModule = () => controllerModule ??= Promise.resolve().then(controllerLoader).then((candidate) => {
219
+ if (typeof candidate?.default !== "function") throw controllerDiagnostic("HJ002");
220
+ return candidate;
221
+ }).catch((error) => {
222
+ if (error instanceof Error && "diagnostic" in error) throw error;
223
+ throw controllerDiagnostic("HJ001", error);
224
+ });
225
+ const stops = [];
226
+ const connected = shallowRef(false);
227
+ const pauses = /* @__PURE__ */ new Map();
228
+ const subscriptions = /* @__PURE__ */ new Set();
229
+ const activate = (entry) => {
230
+ if (entry.type === "connect") entry.cleanup = entry.callback(new Event("connect"));
231
+ else if (entry.type !== "disconnect") {
232
+ entry.target = root.value ?? void 0;
233
+ entry.target?.addEventListener(entry.type, entry.callback);
234
+ }
235
+ };
236
+ const deactivate = (entry, disconnecting) => {
237
+ entry.target?.removeEventListener(entry.type, entry.callback);
238
+ entry.target = void 0;
239
+ const cleanup = entry.cleanup;
240
+ entry.cleanup = void 0;
241
+ cleanup?.();
242
+ if (disconnecting && entry.type === "disconnect") entry.callback(new Event("disconnect"));
243
+ };
244
+ const propHandles = Object.create(null);
245
+ for (const name of propNames) {
246
+ const validity = () => options.propValidity?.(name);
247
+ const value = computed(() => props?.value[name]);
248
+ propHandles[name] = Object.freeze({
249
+ get value() {
250
+ return value.value;
251
+ },
252
+ get inputValue() {
253
+ return propInputs(name);
254
+ },
255
+ get validity() {
256
+ return validity();
257
+ },
258
+ validate: validity
259
+ });
260
+ }
261
+ const host = {
262
+ get element() {
263
+ return root.value;
264
+ },
265
+ get root() {
266
+ return root.value;
267
+ },
268
+ ...controllerNamespaces({
269
+ state: Object.fromEntries(Object.entries(state).map(([name, value]) => [name, {
270
+ get: () => value.value,
271
+ set: (next) => {
272
+ value.value = next;
273
+ }
274
+ }])),
275
+ computed: Object.fromEntries([...Object.entries(computedValues), ...Object.entries(context)].map(([name, value]) => [name, () => value.value])),
276
+ data: Object.fromEntries(Object.entries(data).map(([name, value]) => [name, () => value.value])),
277
+ ...options.acceptsState === void 0 ? {} : { acceptsState: options.acceptsState }
278
+ }, options.controllerSource?.definition ?? "<component>"),
279
+ on(type, callback) {
280
+ const entry = {
281
+ type,
282
+ callback
283
+ };
284
+ subscriptions.add(entry);
285
+ if (connected.value) activate(entry);
286
+ return () => {
287
+ if (subscriptions.delete(entry)) deactivate(entry, false);
288
+ };
289
+ },
290
+ props: Object.freeze(propHandles),
291
+ refs: Object.defineProperties({}, Object.fromEntries(Object.entries(refs).map(([name, ref]) => [name, {
292
+ enumerable: true,
293
+ get: () => Array.isArray(ref.value) ? inDocumentOrder(ref.value) : ref.value
294
+ }]))),
295
+ slots: new Proxy({}, {
296
+ get: (_target, name) => {
297
+ if (typeof name !== "string") return void 0;
298
+ const render = vueSlots[name];
299
+ return render === void 0 ? [] : slottedElements(render());
300
+ },
301
+ has: (_target, name) => typeof name === "string" && vueSlots[name] !== void 0
302
+ }),
303
+ signal(initialValue) {
304
+ const value = shallowRef(initialValue);
305
+ return {
306
+ get: () => value.value,
307
+ set: (next) => {
308
+ value.value = next;
309
+ },
310
+ update: (next) => {
311
+ value.value = next(value.value);
312
+ }
313
+ };
314
+ },
315
+ computed(compute) {
316
+ const value = computed(compute);
317
+ return { get: () => value.value };
318
+ },
319
+ effect(run) {
320
+ let cleanup;
321
+ const pause = () => {
322
+ const previous = cleanup;
323
+ cleanup = void 0;
324
+ previous?.();
325
+ };
326
+ const stop = watchEffect(() => {
327
+ pause();
328
+ if (connected.value) cleanup = run();
329
+ }, { flush: "post" });
330
+ const dispose = () => {
331
+ stop();
332
+ pause();
333
+ pauses.delete(dispose);
334
+ };
335
+ pauses.set(dispose, pause);
336
+ stops.push(dispose);
337
+ return dispose;
338
+ },
339
+ dispatch
340
+ };
341
+ let cleanup;
342
+ let started;
343
+ let stopObserving;
344
+ let connection = 0;
345
+ let initialized = false;
346
+ let unmounted = false;
347
+ const disconnect = () => {
348
+ if (!connected.value) return;
349
+ connected.value = false;
350
+ connection += 1;
351
+ for (const pause of pauses.values()) pause();
352
+ for (const entry of subscriptions) deactivate(entry, true);
353
+ cleanup?.();
354
+ cleanup = void 0;
355
+ };
356
+ const synchronize = () => {
357
+ if (unmounted) return;
358
+ if (root.value?.isConnected !== true) {
359
+ disconnect();
360
+ return;
361
+ }
362
+ if (connected.value) {
363
+ for (const entry of subscriptions) if (entry.type !== "connect" && entry.type !== "disconnect" && entry.target !== root.value) {
364
+ deactivate(entry, false);
365
+ activate(entry);
366
+ }
367
+ return;
368
+ }
369
+ connected.value = true;
370
+ for (const entry of subscriptions) activate(entry);
371
+ if (initialized) return;
372
+ const current = ++connection;
373
+ started = loadControllerModule().then(async (loaded) => {
374
+ if (!connected.value || current !== connection || initialized) return loaded;
375
+ initialized = true;
376
+ const result = await loaded.default(host);
377
+ if (typeof result === "function") {
378
+ if (!connected.value || current !== connection) result();
379
+ else cleanup = result;
380
+ }
381
+ return loaded;
382
+ });
383
+ started.catch(report);
384
+ };
385
+ onMounted(() => {
386
+ if (root.value === null) return;
387
+ stopObserving = observeConnection(root.value, () => {
388
+ try {
389
+ synchronize();
390
+ } catch (error) {
391
+ report(error);
392
+ }
393
+ });
394
+ synchronize();
395
+ });
396
+ onUpdated(synchronize);
397
+ onBeforeUnmount(() => {
398
+ unmounted = true;
399
+ stopObserving?.();
400
+ disconnect();
401
+ for (const stop of stops.splice(0)) stop();
402
+ subscriptions.clear();
403
+ });
404
+ return host;
405
+ }
406
+ var HtmlDiagnosticError = class extends Error {
407
+ diagnostic;
408
+ constructor(code, message) {
409
+ super(code + ": " + message);
410
+ this.name = "HtmlDiagnosticError";
411
+ this.diagnostic = Object.freeze({
412
+ code,
413
+ message
414
+ });
415
+ }
416
+ };
417
+ /** Reports declared CustomEvents to Vue and dispatches them through the DOM. */
418
+ function createDispatch(root, emit, options = {}) {
419
+ const { declared = {}, checks = {}, modeled = [] } = options;
420
+ const reported = /* @__PURE__ */ new Map();
421
+ return (name, detail, targets) => {
422
+ const check = checks[name];
423
+ if (detail !== void 0 && check !== void 0 && !check(detail)) throw new HtmlDiagnosticError("HR002", `Event \`${name}\` detail does not satisfy its declared type.`);
424
+ if (targets !== void 0) {
425
+ let accepted = true;
426
+ dispatchToTargets(targets, (target) => {
427
+ if (!target.dispatchEvent(new CustomEvent(name, {
428
+ bubbles: true,
429
+ composed: true,
430
+ ...declared[name],
431
+ detail
432
+ }))) accepted = false;
433
+ });
434
+ return accepted;
435
+ }
436
+ if (detail !== null && typeof detail === "object") for (const prop of modeled) {
437
+ if (!(prop in detail)) continue;
438
+ const value = detail[prop];
439
+ if (reported.has(prop) && Object.is(reported.get(prop), value)) continue;
440
+ if (reported.size === 0) queueMicrotask(() => reported.clear());
441
+ reported.set(prop, value);
442
+ emit?.(`update:${prop}`, value);
443
+ }
444
+ const event = new CustomEvent(name, {
445
+ bubbles: true,
446
+ composed: true,
447
+ ...declared[name],
448
+ detail
449
+ });
450
+ if (check !== void 0) emit?.(name, event);
451
+ return root.value?.dispatchEvent(event) ?? true;
452
+ };
453
+ }
454
+ /**
455
+ * A consumer's attributes for the root. Vue sets a name that is also an object property, such as
456
+ * `constructor`, as a DOM property; capitalized, it stays an attribute, which HTML lowercases.
457
+ */
458
+ function nativeAttrs(attrs) {
459
+ const names = Object.keys(attrs);
460
+ if (!names.some((name) => Object.hasOwn(Object.prototype, name))) return attrs;
461
+ return Object.fromEntries(names.map((name) => [Object.hasOwn(Object.prototype, name) ? name === "__proto__" ? "__Proto__" : name[0].toUpperCase() + name.slice(1) : name, attrs[name]]));
462
+ }
463
+ /** Hydrating server markup needs its root to be the element this component renders. */
464
+ function checkHydratedRoot(expected, tag) {
465
+ const node = getCurrentInstance()?.vnode.el;
466
+ if (typeof window === "undefined" || node == null || node instanceof Element && node.localName === expected) return;
467
+ const message = `Server markup for <${tag}> has an incompatible root.`;
468
+ throw Object.assign(/* @__PURE__ */ new Error(`HR005: ${message}`), {
469
+ name: "HtmlDiagnosticError",
470
+ diagnostic: Object.freeze({
471
+ code: "HR005",
472
+ message
473
+ })
474
+ });
475
+ }
476
+ function diagnostic(code, message) {
477
+ return Object.assign(/* @__PURE__ */ new Error(`${code}: ${message}`), {
478
+ name: "HtmlDiagnosticError",
479
+ diagnostic: Object.freeze({
480
+ code,
481
+ message
482
+ })
483
+ });
484
+ }
485
+ /** Vue may return an in-progress computed value on a cyclic read; guard the public value access instead. */
486
+ function cycleCheckedComputed(evaluate) {
487
+ const value = computed(evaluate);
488
+ let reading = false;
489
+ return new Proxy(value, { get(target, property) {
490
+ if (property !== "value") return Reflect.get(target, property);
491
+ if (reading) throw diagnostic("HR006", "A reactive computed value depends on itself.");
492
+ reading = true;
493
+ try {
494
+ return target.value;
495
+ } finally {
496
+ reading = false;
497
+ }
498
+ } });
499
+ }
500
+ /**
501
+ * A declared prop's reflected root attribute: the authored literal until the consumer passes the
502
+ * prop, then its value as text, absent for null.
503
+ */
504
+ function useReflectedProp() {
505
+ const instance = getCurrentInstance();
506
+ return (name, kebab, value, fallback, bound, separator) => {
507
+ const incoming = instance?.vnode.props;
508
+ if (!bound && (incoming === null || incoming === void 0 || !Object.hasOwn(incoming, name) && !Object.hasOwn(incoming, kebab))) return fallback;
509
+ if (value === null || value === void 0) return void 0;
510
+ return Array.isArray(value) && separator !== void 0 ? value.join(separator) : typeof value === "object" ? JSON.stringify(value) : String(value);
511
+ };
512
+ }
513
+ var KeyedFailure = /* @__PURE__ */ defineComponent({
514
+ props: { error: {
515
+ type: null,
516
+ required: true
517
+ } },
518
+ setup(props) {
519
+ return () => {
520
+ throw props.error;
521
+ };
522
+ }
523
+ });
524
+ /** A keyed list that produces a duplicate key keeps its last rows and reports the error in the browser. */
525
+ var KeyedBoundary = /* @__PURE__ */ defineComponent({ setup(_props, { slots }) {
526
+ let last = [];
527
+ return () => {
528
+ try {
529
+ last = slots.default?.() ?? [];
530
+ return last;
531
+ } catch (error) {
532
+ if (!(error instanceof Error) || error.diagnostic?.code !== "HR004") throw error;
533
+ if (typeof window === "undefined") throw error;
534
+ return [...last, h(KeyedFailure, { error })];
535
+ }
536
+ };
537
+ } });
538
+ var warned = /* @__PURE__ */ new Set();
539
+ /** An authored value's check: false warns once per authored location. */
540
+ function warnUnless(accepted, location, message) {
541
+ if (!accepted && !warned.has(location)) {
542
+ warned.add(location);
543
+ console.warn(message);
544
+ }
545
+ return accepted;
546
+ }
547
+ function text(value) {
548
+ if (Array.isArray(value)) return value.map(text).join(" ");
549
+ return value === null || value === void 0 || typeof value === "object" ? "" : String(value);
550
+ }
551
+ function attribute(value) {
552
+ if (value === null || value === void 0 || value === false || typeof value === "object" && !Array.isArray(value)) return void 0;
553
+ return value === true ? "" : text(value);
554
+ }
555
+ function list(value) {
556
+ return Array.isArray(value) ? value : [];
557
+ }
558
+ function number(value) {
559
+ return typeof value === "number" && !Number.isNaN(value) ? value : void 0;
560
+ }
561
+ function concat(...values) {
562
+ if (values.some((value) => value === Symbol.for("html-next.invalid-result"))) return Symbol.for("html-next.invalid-result");
563
+ if (values.some((value) => value === void 0)) return void 0;
564
+ if (values.length === 0 || values.some((value) => typeof value === "object" && value !== null)) return Symbol.for("html-next.invalid-result");
565
+ return values.map((value) => value === null ? "" : String(value)).join("");
566
+ }
567
+ function math(fn, kinds, values) {
568
+ if (values.includes(Symbol.for("html-next.invalid-result"))) return Symbol.for("html-next.invalid-result");
569
+ if (values.some((value) => value === void 0 || value === null)) return void 0;
570
+ if ((fn === "abs" || fn === "negate") && values.length !== 1 || fn === "round" && (values.length < 1 || values.length > 2) || (fn === "min" || fn === "max") && values.length === 0 || fn === "clamp" && values.length !== 3) return Symbol.for("html-next.invalid-result");
571
+ const kind = kinds[0];
572
+ const dimensional = kind === "length" || kind === "percentage" || kind === "duration";
573
+ if (!dimensional && kind !== "number") return Symbol.for("html-next.invalid-result");
574
+ let unit;
575
+ const numbers = [];
576
+ for (let index = 0; index < values.length; index++) {
577
+ if (kinds[index] !== kind) return Symbol.for("html-next.invalid-result");
578
+ const value = values[index];
579
+ if (!dimensional) {
580
+ if (typeof value !== "number" || !Number.isFinite(value)) return Symbol.for("html-next.invalid-result");
581
+ numbers.push(value);
582
+ continue;
583
+ }
584
+ if (typeof value !== "string") return Symbol.for("html-next.invalid-result");
585
+ const match = /^(-?(?:\d+(?:\.\d+)?|\.\d+))(vmin|vmax|rem|px|em|vw|vh|ch|ex|cm|mm|in|pt|pc|q|ms|s|%)$/.exec(value);
586
+ if (match === null || unit !== void 0 && match[2] !== unit) return Symbol.for("html-next.invalid-result");
587
+ unit = match[2];
588
+ if ((unit === "%" ? "percentage" : unit === "ms" || unit === "s" ? "duration" : "length") !== kind) return Symbol.for("html-next.invalid-result");
589
+ const number = Number(match[1]);
590
+ if (!Number.isFinite(number)) return Symbol.for("html-next.invalid-result");
591
+ numbers.push(number);
592
+ }
593
+ let result;
594
+ switch (fn) {
595
+ case "abs":
596
+ result = Math.abs(numbers[0]);
597
+ break;
598
+ case "negate":
599
+ result = -numbers[0];
600
+ break;
601
+ case "round": {
602
+ const step = Math.abs(numbers[1] ?? 1);
603
+ if (step === 0) return Symbol.for("html-next.invalid-result");
604
+ result = Math.round(numbers[0] / step) * step;
605
+ break;
606
+ }
607
+ case "min":
608
+ result = Math.min(...numbers);
609
+ break;
610
+ case "max":
611
+ result = Math.max(...numbers);
612
+ break;
613
+ case "clamp":
614
+ result = Math.max(numbers[0], Math.min(numbers[1], numbers[2]));
615
+ break;
616
+ default: return Symbol.for("html-next.invalid-result");
617
+ }
618
+ return !Number.isFinite(result) ? Symbol.for("html-next.invalid-result") : unit === void 0 ? result : String(result) + unit;
619
+ }
620
+ function uniqueKeys(items, keyOf) {
621
+ const seen = /* @__PURE__ */ new Set();
622
+ for (let index = 0; index < items.length; index += 1) {
623
+ const key = keyOf(items[index], index, {
624
+ index,
625
+ first: index === 0,
626
+ last: index === items.length - 1,
627
+ count: items.length
628
+ });
629
+ if (seen.has(key)) {
630
+ const message = `A keyed list produced duplicate key \`${text(key)}\`.`;
631
+ throw Object.assign(/* @__PURE__ */ new Error(`HR004: ${message}`), {
632
+ name: "HtmlDiagnosticError",
633
+ diagnostic: Object.freeze({
634
+ code: "HR004",
635
+ message
636
+ })
637
+ });
638
+ }
639
+ seen.add(key);
640
+ }
641
+ return items;
642
+ }
643
+ /**
644
+ * Digits after the point in `value`'s shortest round-trip text, as `Number#toString` writes it:
645
+ * 2 for 1.25, 7 for 1e-7, and 0 for an integer, 1e21, NaN or Infinity. Writing that text made an
646
+ * addition about ten times slower (200 ns against 20 ns), so up to 22 places, where 10^places is
647
+ * exact, the fewest places at which `value` survives rounding stand in for it. That count is never
648
+ * below the text's, and differs only for a value of more than 15 significant digits, which
649
+ * `decimalResult` leaves as a double either way.
650
+ */
651
+ function decimalPlaces(value) {
652
+ if (Number.isInteger(value)) return 0;
653
+ for (let places = 1; places <= 22; places += 1) if (Math.round(value * 10 ** places) / 10 ** places === value) return places;
654
+ const [digits, exponent] = String(value).split("e");
655
+ const point = digits.indexOf(".");
656
+ return Math.max(0, (point < 0 ? 0 : digits.length - point - 1) - Number(exponent ?? 0));
657
+ }
658
+ /**
659
+ * The double nearest the exact decimal result: `a` and `b` become integers at `left` and `right`
660
+ * places, `combine` joins them, and the integer is read back at `places`. Every step is exact while
661
+ * the operands and `result` stay below 10^15 at `places`, the 15 significant digits a double always
662
+ * holds; past that (or for a non-finite value, or with no places) the double `result` stands.
663
+ * Dividing by 10^places is exact only up to 10^22, so past 22 places a nonzero integer is read back
664
+ * by parsing its decimal text, which rounds exactly too. A zero divides, keeping its sign.
665
+ */
666
+ function decimalResult(result, a, b, left, right, places, combine) {
667
+ if (!(places > 0 && Math.max(Math.abs(a), Math.abs(b), Math.abs(result)) * 10 ** places < 0x38d7ea4c68000)) return result;
668
+ const integer = combine(Math.round(a * 10 ** left), Math.round(b * 10 ** right));
669
+ return places > 22 && integer !== 0 ? Number(`${integer}e-${places}`) : integer / 10 ** places;
670
+ }
671
+ /** `a - b` at the larger operand's decimal places: `decimalSubtract(0.3, 0.1)` is 0.2. */
672
+ function decimalSubtract(a, b) {
673
+ const places = Math.max(decimalPlaces(a), decimalPlaces(b));
674
+ return decimalResult(a - b, a, b, places, places, places, (x, y) => x - y);
675
+ }
676
+ /** `a * b` at the sum of the operands' decimal places: `decimalMultiply(0.1, 0.2)` is 0.02. */
677
+ function decimalMultiply(a, b) {
678
+ const left = decimalPlaces(a);
679
+ const right = decimalPlaces(b);
680
+ return decimalResult(a * b, a, b, left, right, left + right, (x, y) => x * y);
681
+ }
682
+ function createFormatValue() {
683
+ const cache = /* @__PURE__ */ new Map();
684
+ function formatterFor(name, locale, options) {
685
+ const constructor = Reflect.get(Intl, name);
686
+ if (name === "DateTimeFormat" && options.timeZone === void 0) return new constructor(locale, options);
687
+ const entries = [];
688
+ for (const key of Object.keys(options).sort()) {
689
+ const value = options[key];
690
+ if (value === void 0) continue;
691
+ if (value !== null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number" || typeof value === "number" && !Number.isFinite(value)) return new constructor(locale, options);
692
+ entries.push([
693
+ key,
694
+ typeof value,
695
+ Object.is(value, -0) ? "-0" : value
696
+ ]);
697
+ }
698
+ const language = locale === void 0 && typeof navigator !== "undefined" ? navigator.language : void 0;
699
+ const key = JSON.stringify([
700
+ name,
701
+ locale,
702
+ language,
703
+ entries
704
+ ]);
705
+ if (key.length > 4096) return new constructor(locale, options);
706
+ const cached = cache.get(key);
707
+ if (cached !== void 0 && cached.constructor === constructor) return cached.value;
708
+ const value = new constructor(locale, options);
709
+ if (cache.size >= 128 && !cache.has(key)) cache.delete(cache.keys().next().value);
710
+ cache.set(key, {
711
+ constructor,
712
+ value
713
+ });
714
+ return value;
715
+ }
716
+ /**
717
+ * The native Intl adapter. Self-contained so converters emit this same implementation only when
718
+ * authored expressions use formatting, without importing the live parser or interpreter.
719
+ * undefined is absence; the shared invalid-result symbol tells each target to retain its output.
720
+ */
721
+ return function formatValue(value, inputType, operation, ...args) {
722
+ const invalid = Symbol.for("html-next.invalid-result");
723
+ if (value === invalid || args.includes(invalid)) return invalid;
724
+ if (value === void 0 || value === null || args.some((arg) => arg === void 0)) return;
725
+ const end = operation === "formatRange" ? args.shift() : void 0;
726
+ if (operation === "formatRange" && (end === null || end === void 0)) return;
727
+ const format = typeof args[0] === "string" ? args.shift() : Reflect.get({
728
+ number: "number",
729
+ integer: "number",
730
+ percentage: "percent",
731
+ date: "date",
732
+ time: "time",
733
+ datetime: "dateTime",
734
+ "datetime-local": "dateTime",
735
+ duration: "duration",
736
+ list: "list"
737
+ }, inputType ?? "");
738
+ const options = args.length > 0 ? args.shift() : {};
739
+ const locale = args.shift();
740
+ if (args.length > 0 || !format || options === null || typeof options !== "object" || Array.isArray(options) || locale !== void 0 && typeof locale !== "string") return invalid;
741
+ try {
742
+ const durationFields = [
743
+ "years",
744
+ "months",
745
+ "weeks",
746
+ "days",
747
+ "hours",
748
+ "minutes",
749
+ "seconds",
750
+ "milliseconds",
751
+ "microseconds",
752
+ "nanoseconds"
753
+ ];
754
+ const settings = { ...options };
755
+ let formatter;
756
+ let input = value;
757
+ let last = end;
758
+ let zoneFree = false;
759
+ if ([
760
+ "number",
761
+ "currency",
762
+ "percent",
763
+ "unit"
764
+ ].includes(format)) {
765
+ if (format !== "number") {
766
+ if (settings.style !== void 0 && settings.style !== format) return invalid;
767
+ settings.style = format;
768
+ }
769
+ const quantity = (candidate) => {
770
+ if (inputType === "percentage" && typeof candidate === "string" && /^-?(?:\d+(?:\.\d+)?|\.\d+)%$/.test(candidate)) return Number(candidate.slice(0, -1)) / 100;
771
+ return candidate;
772
+ };
773
+ input = quantity(input);
774
+ last = quantity(last);
775
+ if (typeof input !== "number" || !Number.isFinite(input) || operation === "formatRange" && (typeof last !== "number" || !Number.isFinite(last))) return invalid;
776
+ formatter = formatterFor("NumberFormat", locale, settings);
777
+ } else if ([
778
+ "date",
779
+ "time",
780
+ "dateTime"
781
+ ].includes(format)) {
782
+ const civil = inputType === "date" || inputType === "time" || inputType === "datetime-local" || typeof input === "string" && !/(?:Z|[+-]\d\d:\d\d)$/.test(input);
783
+ zoneFree = civil;
784
+ if (civil && (settings.timeZone !== void 0 || settings.timeZoneName !== void 0)) return invalid;
785
+ if (format === "date" && (settings.timeStyle !== void 0 || [
786
+ "hour",
787
+ "minute",
788
+ "second",
789
+ "dayPeriod",
790
+ "fractionalSecondDigits"
791
+ ].some((key) => settings[key] !== void 0)) || format === "time" && (settings.dateStyle !== void 0 || [
792
+ "year",
793
+ "month",
794
+ "day",
795
+ "weekday",
796
+ "era"
797
+ ].some((key) => settings[key] !== void 0))) return invalid;
798
+ if (settings.dateStyle === void 0 && settings.timeStyle === void 0 && ![
799
+ "year",
800
+ "month",
801
+ "day",
802
+ "weekday",
803
+ "era",
804
+ "hour",
805
+ "minute",
806
+ "second",
807
+ "dayPeriod",
808
+ "fractionalSecondDigits"
809
+ ].some((key) => settings[key] !== void 0)) {
810
+ if (format !== "time") settings.dateStyle = "medium";
811
+ if (format !== "date") settings.timeStyle = "medium";
812
+ }
813
+ if (civil) settings.timeZone = "UTC";
814
+ const asDate = (candidate) => {
815
+ if (typeof candidate === "number" && Number.isFinite(candidate)) return new Date(candidate);
816
+ if (typeof candidate !== "string") return;
817
+ let written = candidate.replace(" ", "T");
818
+ if (/^\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?$/.test(written)) {
819
+ if (format !== "time") return;
820
+ written = "1970-01-01T" + written + "Z";
821
+ } else if (/^\d{4,}-\d\d-\d\d$/.test(written)) {
822
+ if (format !== "date") return;
823
+ written += "T00:00:00Z";
824
+ } else if (/^\d{4,}-\d\d-\d\dT\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?$/.test(written)) written += "Z";
825
+ else if (!/^\d{4,}-\d\d-\d\dT\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?(?:Z|[+-]\d\d:\d\d)$/.test(written)) return;
826
+ const date = new Date(written.replace(/^(\d{5,})-/, (_match, year) => "+" + year.padStart(6, "0") + "-"));
827
+ if (!Number.isFinite(date.getTime())) return;
828
+ const match = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d))?/.exec(written);
829
+ if (!match) return;
830
+ const probe = /* @__PURE__ */ new Date(0);
831
+ probe.setUTCFullYear(Number(match[1]), Number(match[2]) - 1, Number(match[3]));
832
+ if (Number(match[1]) === 0 || probe.getUTCMonth() !== Number(match[2]) - 1 || probe.getUTCDate() !== Number(match[3]) || Number(match[4]) > 23 || Number(match[5]) > 59 || Number(match[6] ?? 0) > 59) return;
833
+ return date;
834
+ };
835
+ input = asDate(input);
836
+ last = operation === "formatRange" ? asDate(last) : void 0;
837
+ if (!input || operation === "formatRange" && !last) return invalid;
838
+ formatter = formatterFor("DateTimeFormat", locale, settings);
839
+ } else {
840
+ if (operation === "formatRange") return invalid;
841
+ if (format === "relativeTime") {
842
+ if (typeof input !== "number" || !Number.isFinite(input) || typeof settings.unit !== "string") return invalid;
843
+ const unit = settings.unit;
844
+ delete settings.unit;
845
+ formatter = formatterFor("RelativeTimeFormat", locale, settings);
846
+ return operation === "formatParts" ? formatter.formatToParts(input, unit) : formatter.format(input, unit);
847
+ }
848
+ if (format === "list") {
849
+ if (!Array.isArray(input) || input.some((item) => typeof item !== "string")) return invalid;
850
+ formatter = formatterFor("ListFormat", locale, settings);
851
+ } else if (format === "duration") {
852
+ if (inputType === "duration" && typeof input === "string") {
853
+ const match = /^(-?(?:\d+(?:\.\d+)?|\.\d+))(ms|s)$/.exec(input);
854
+ if (!match) return invalid;
855
+ const milliseconds = Number(match[1]) * (match[2] === "s" ? 1e3 : 1);
856
+ if (!Number.isFinite(milliseconds)) return invalid;
857
+ input = {
858
+ hours: Math.trunc(milliseconds / 36e5),
859
+ minutes: Math.trunc(milliseconds % 36e5 / 6e4),
860
+ seconds: Math.trunc(milliseconds % 6e4 / 1e3),
861
+ milliseconds: Math.trunc(milliseconds % 1e3),
862
+ microseconds: Math.trunc((milliseconds - Math.trunc(milliseconds)) * 1e3),
863
+ nanoseconds: Math.round((milliseconds * 1e3 - Math.trunc(milliseconds * 1e3)) * 1e3)
864
+ };
865
+ }
866
+ if (input === null || typeof input !== "object" || Array.isArray(input) || Object.keys(input).some((key) => !durationFields.includes(key))) return invalid;
867
+ if (!Reflect.get(Intl, "DurationFormat")) return invalid;
868
+ formatter = formatterFor("DurationFormat", locale, settings);
869
+ } else if (format === "displayName") {
870
+ if (typeof input !== "string" || operation === "formatParts") return invalid;
871
+ return formatterFor("DisplayNames", locale, settings).of(input);
872
+ } else if (format === "plural") {
873
+ if (typeof input !== "number" || !Number.isFinite(input) || operation === "formatParts") return invalid;
874
+ const forms = settings.forms;
875
+ if (!forms || typeof forms !== "object" || Array.isArray(forms) || typeof forms.other !== "string" || Object.entries(forms).some(([key, entry]) => ![
876
+ "zero",
877
+ "one",
878
+ "two",
879
+ "few",
880
+ "many",
881
+ "other"
882
+ ].includes(key) || typeof entry !== "string")) return invalid;
883
+ delete settings.forms;
884
+ const message = forms[formatterFor("PluralRules", locale, settings).select(input)] ?? forms.other;
885
+ const numberOptions = { ...settings };
886
+ delete numberOptions.type;
887
+ delete numberOptions.forms;
888
+ const number = formatterFor("NumberFormat", locale, numberOptions).format(input);
889
+ return message.replace(/#/g, () => number);
890
+ }
891
+ }
892
+ if (!zoneFree && operation !== "formatParts") return operation === "formatRange" ? formatter.formatRange(input, last) : formatter.format(input);
893
+ const parts = operation === "formatRange" ? formatter.formatRangeToParts(input, last) : formatter.formatToParts(input);
894
+ if (zoneFree && operation !== "formatParts" && !parts.some((part) => part.type === "timeZoneName")) return operation === "formatRange" ? formatter.formatRange(input, last) : formatter.format(input);
895
+ const visible = zoneFree ? parts.filter((part, index) => part.type !== "timeZoneName" && !(part.type === "literal" && /^[\s(),]*$/.test(part.value) && (parts[index - 1]?.type === "timeZoneName" || parts[index + 1]?.type === "timeZoneName"))) : parts;
896
+ return operation === "formatParts" ? visible : visible.map((part) => part.value).join("");
897
+ } catch {
898
+ return invalid;
899
+ }
900
+ };
901
+ }
902
+ var formatValue = /* @__PURE__ */ createFormatValue();
903
+ //#endregion
1
904
  //#region \0plugin-vue:export-helper
2
905
  var _plugin_vue_export_helper_default = (sfc, props) => {
3
906
  const target = sfc.__vccOpts || sfc;
@@ -5,4 +908,4 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
5
908
  return target;
6
909
  };
7
910
  //#endregion
8
- export { _plugin_vue_export_helper_default as t };
911
+ export { useComponentHost as _, concat as a, decimalMultiply as c, list as d, math as f, uniqueKeys as g, preserveRootFocus as h, checkHydratedRoot as i, decimalSubtract as l, number as m, KeyedBoundary as n, createDispatch as o, nativeAttrs as p, attribute as r, cycleCheckedComputed as s, _plugin_vue_export_helper_default as t, formatValue as u, useReflectedProp as v, warnUnless as y };