@threadlabs/looma 0.51.6 → 0.52.0

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 (368) hide show
  1. package/README.md +4 -4
  2. package/components/shared/overlay.js +7 -2
  3. package/components/ui-breadcrumb-item/ui-breadcrumb-item.html +1 -0
  4. package/components/ui-calendar/ui-calendar.js +11 -7
  5. package/components/ui-date-field/ui-date-field.js +0 -5
  6. package/components/ui-disclosure/ui-disclosure.js +19 -4
  7. package/components/ui-editor-link-form/ui-editor-link-form.js +5 -0
  8. package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +2 -3
  9. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +10 -1
  10. package/components/ui-file-input/ui-file-input.js +0 -2
  11. package/components/ui-status-message/ui-status-message.html +1 -0
  12. package/components/ui-tabs/ui-tabs.html +1 -0
  13. package/components/ui-tooltip/ui-tooltip.html +11 -32
  14. package/dist/index.js +14 -8
  15. package/docs/catalog.json +565 -131
  16. package/editor/components.css +530 -551
  17. package/editor/index.js +72 -47
  18. package/package.json +30 -35
  19. package/styles/ui-action-bar.css +8 -8
  20. package/styles/ui-affordance-scope.css +10 -10
  21. package/styles/ui-avatar-group.css +11 -11
  22. package/styles/ui-avatar.css +14 -14
  23. package/styles/ui-badge.css +67 -67
  24. package/styles/ui-breadcrumb-item.css +10 -10
  25. package/styles/ui-breadcrumbs.css +8 -8
  26. package/styles/ui-button.css +99 -99
  27. package/styles/ui-calendar.css +1 -1
  28. package/styles/ui-callout.css +14 -14
  29. package/styles/ui-card-group.css +11 -11
  30. package/styles/ui-card.css +36 -36
  31. package/styles/ui-checkbox.css +28 -28
  32. package/styles/ui-cluster.css +30 -30
  33. package/styles/ui-color-picker.css +16 -16
  34. package/styles/ui-combobox.css +50 -50
  35. package/styles/ui-compact-content.css +1 -1
  36. package/styles/ui-compact-editor.css +1 -1
  37. package/styles/ui-compact-mark.css +1 -1
  38. package/styles/ui-compact-node.css +1 -1
  39. package/styles/ui-container.css +14 -14
  40. package/styles/ui-context-menu.css +8 -8
  41. package/styles/ui-cover.css +9 -9
  42. package/styles/ui-curve-editor.css +9 -9
  43. package/styles/ui-cycle-button.css +10 -10
  44. package/styles/ui-date-field.css +1 -1
  45. package/styles/ui-date-picker.css +1 -1
  46. package/styles/ui-date-range-picker.css +1 -1
  47. package/styles/ui-description-item.css +8 -8
  48. package/styles/ui-description-list.css +18 -18
  49. package/styles/ui-dialog.css +37 -37
  50. package/styles/ui-disclosure.css +26 -26
  51. package/styles/ui-editable.css +13 -13
  52. package/styles/ui-editor-block-actions.css +1 -1
  53. package/styles/ui-editor-chip-editor.css +1 -1
  54. package/styles/ui-editor-code-language.css +1 -1
  55. package/styles/ui-editor-footnote-editor.css +1 -1
  56. package/styles/ui-editor-formatting-tools.css +1 -1
  57. package/styles/ui-editor-image-toolbar.css +1 -1
  58. package/styles/ui-editor-insert-table-grid.css +9 -9
  59. package/styles/ui-editor-link-card.css +1 -1
  60. package/styles/ui-editor-link-form.css +1 -1
  61. package/styles/ui-editor-mention-menu-item.css +13 -15
  62. package/styles/ui-editor-mention-menu.css +12 -12
  63. package/styles/ui-editor-slash-menu-group.css +7 -7
  64. package/styles/ui-editor-slash-menu-item.css +12 -12
  65. package/styles/ui-editor-slash-menu.css +13 -13
  66. package/styles/ui-editor-surface.css +8 -8
  67. package/styles/ui-editor-table-context-menu.css +19 -15
  68. package/styles/ui-editor-table-overlay.css +15 -15
  69. package/styles/ui-editor-table-toolbar.css +19 -19
  70. package/styles/ui-editor-toolbar.css +16 -16
  71. package/styles/ui-editor.css +1 -1
  72. package/styles/ui-file-input.css +1 -1
  73. package/styles/ui-floating-action-button.css +14 -14
  74. package/styles/ui-form-field.css +9 -9
  75. package/styles/ui-grid.css +19 -19
  76. package/styles/ui-icon-button.css +73 -73
  77. package/styles/ui-icon.css +11 -11
  78. package/styles/ui-image.css +23 -23
  79. package/styles/ui-input-group.css +26 -26
  80. package/styles/ui-input.css +23 -23
  81. package/styles/ui-light-editor.css +15 -15
  82. package/styles/ui-list-item.css +25 -25
  83. package/styles/ui-list.css +16 -16
  84. package/styles/ui-listbox.css +22 -22
  85. package/styles/ui-menu-group.css +7 -7
  86. package/styles/ui-menu-item.css +20 -20
  87. package/styles/ui-menu.css +20 -20
  88. package/styles/ui-meter.css +32 -32
  89. package/styles/ui-nav-item.css +18 -18
  90. package/styles/ui-number-input.css +12 -12
  91. package/styles/ui-page-header.css +10 -10
  92. package/styles/ui-pagination.css +1 -1
  93. package/styles/ui-popover.css +17 -17
  94. package/styles/ui-radio-group.css +10 -10
  95. package/styles/ui-radio.css +25 -25
  96. package/styles/ui-reel.css +21 -21
  97. package/styles/ui-scroll-area.css +20 -20
  98. package/styles/ui-search-result-row.css +16 -16
  99. package/styles/ui-search-shell.css +10 -10
  100. package/styles/ui-section.css +18 -18
  101. package/styles/ui-select.css +22 -22
  102. package/styles/ui-separator.css +12 -12
  103. package/styles/ui-sidebar.css +26 -26
  104. package/styles/ui-site-header.css +65 -65
  105. package/styles/ui-skeleton.css +18 -18
  106. package/styles/ui-slider.css +11 -11
  107. package/styles/ui-spinner.css +9 -9
  108. package/styles/ui-stack.css +22 -22
  109. package/styles/ui-status-message.css +12 -12
  110. package/styles/ui-swatch.css +14 -14
  111. package/styles/ui-switch.css +23 -23
  112. package/styles/ui-switcher.css +20 -20
  113. package/styles/ui-table.css +12 -12
  114. package/styles/ui-tabs.css +18 -17
  115. package/styles/ui-text.css +40 -40
  116. package/styles/ui-textarea.css +21 -21
  117. package/styles/ui-time-field.css +1 -1
  118. package/styles/ui-time-picker.css +1 -1
  119. package/styles/ui-toast-region.css +29 -29
  120. package/styles/ui-toast.css +19 -19
  121. package/styles/ui-tooltip.css +37 -58
  122. package/styles/ui-top-bar.css +8 -8
  123. package/styles/ui-tree-item.css +112 -112
  124. package/styles/ui-tree.css +11 -11
  125. package/vanilla/UiActionBar.d.ts +1 -1
  126. package/vanilla/UiActionBar.js +2 -2
  127. package/vanilla/UiAffordanceScope.d.ts +1 -1
  128. package/vanilla/UiAffordanceScope.js +2 -2
  129. package/vanilla/UiAvatar.d.ts +1 -1
  130. package/vanilla/UiAvatar.js +2 -2
  131. package/vanilla/UiAvatarGroup.d.ts +1 -1
  132. package/vanilla/UiAvatarGroup.js +2 -2
  133. package/vanilla/UiBadge.d.ts +1 -1
  134. package/vanilla/UiBadge.js +2 -2
  135. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  136. package/vanilla/UiBreadcrumbItem.js +2 -2
  137. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  138. package/vanilla/UiBreadcrumbs.js +2 -2
  139. package/vanilla/UiButton.d.ts +1 -1
  140. package/vanilla/UiButton.js +5 -5
  141. package/vanilla/UiCalendar.d.ts +1 -1
  142. package/vanilla/UiCalendar.js +10 -10
  143. package/vanilla/UiCallout.d.ts +1 -1
  144. package/vanilla/UiCallout.js +2 -2
  145. package/vanilla/UiCard.d.ts +1 -1
  146. package/vanilla/UiCard.js +5 -5
  147. package/vanilla/UiCardGroup.d.ts +1 -1
  148. package/vanilla/UiCardGroup.js +2 -2
  149. package/vanilla/UiCheckbox.d.ts +1 -1
  150. package/vanilla/UiCheckbox.js +2 -2
  151. package/vanilla/UiCluster.d.ts +1 -1
  152. package/vanilla/UiCluster.js +2 -2
  153. package/vanilla/UiColorPicker.d.ts +1 -1
  154. package/vanilla/UiColorPicker.js +2 -2
  155. package/vanilla/UiCombobox.d.ts +1 -1
  156. package/vanilla/UiCombobox.js +8 -8
  157. package/vanilla/UiCompactContent.d.ts +1 -1
  158. package/vanilla/UiCompactContent.js +4 -4
  159. package/vanilla/UiCompactEditor.d.ts +1 -1
  160. package/vanilla/UiCompactEditor.js +2 -2
  161. package/vanilla/UiCompactMark.d.ts +1 -1
  162. package/vanilla/UiCompactMark.js +5 -5
  163. package/vanilla/UiCompactNode.d.ts +1 -1
  164. package/vanilla/UiCompactNode.js +8 -8
  165. package/vanilla/UiContainer.d.ts +1 -1
  166. package/vanilla/UiContainer.js +2 -2
  167. package/vanilla/UiContextMenu.d.ts +1 -1
  168. package/vanilla/UiContextMenu.js +2 -2
  169. package/vanilla/UiCover.d.ts +1 -1
  170. package/vanilla/UiCover.js +2 -2
  171. package/vanilla/UiCurveEditor.d.ts +1 -1
  172. package/vanilla/UiCurveEditor.js +2 -2
  173. package/vanilla/UiCycleButton.d.ts +1 -1
  174. package/vanilla/UiCycleButton.js +2 -2
  175. package/vanilla/UiDateField.d.ts +1 -1
  176. package/vanilla/UiDateField.js +2 -2
  177. package/vanilla/UiDatePicker.d.ts +1 -1
  178. package/vanilla/UiDatePicker.js +2 -2
  179. package/vanilla/UiDateRangePicker.d.ts +1 -1
  180. package/vanilla/UiDateRangePicker.js +4 -4
  181. package/vanilla/UiDescriptionItem.d.ts +1 -1
  182. package/vanilla/UiDescriptionItem.js +2 -2
  183. package/vanilla/UiDescriptionList.d.ts +1 -1
  184. package/vanilla/UiDescriptionList.js +2 -2
  185. package/vanilla/UiDialog.d.ts +1 -1
  186. package/vanilla/UiDialog.js +2 -2
  187. package/vanilla/UiDisclosure.d.ts +1 -1
  188. package/vanilla/UiDisclosure.js +2 -2
  189. package/vanilla/UiEditable.d.ts +1 -1
  190. package/vanilla/UiEditable.js +2 -2
  191. package/vanilla/UiEditor.d.ts +1 -1
  192. package/vanilla/UiEditor.js +6 -6
  193. package/vanilla/UiEditorBlockActions.d.ts +1 -1
  194. package/vanilla/UiEditorBlockActions.js +2 -2
  195. package/vanilla/UiEditorChipEditor.d.ts +1 -1
  196. package/vanilla/UiEditorChipEditor.js +2 -2
  197. package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
  198. package/vanilla/UiEditorCodeLanguage.js +4 -4
  199. package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
  200. package/vanilla/UiEditorFootnoteEditor.js +2 -2
  201. package/vanilla/UiEditorFormattingTools.d.ts +1 -1
  202. package/vanilla/UiEditorFormattingTools.js +4 -4
  203. package/vanilla/UiEditorImageToolbar.d.ts +1 -1
  204. package/vanilla/UiEditorImageToolbar.js +2 -2
  205. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  206. package/vanilla/UiEditorInsertTableGrid.js +4 -4
  207. package/vanilla/UiEditorLinkCard.d.ts +1 -1
  208. package/vanilla/UiEditorLinkCard.js +2 -2
  209. package/vanilla/UiEditorLinkForm.d.ts +1 -1
  210. package/vanilla/UiEditorLinkForm.js +4 -4
  211. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  212. package/vanilla/UiEditorMentionMenu.js +4 -4
  213. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  214. package/vanilla/UiEditorMentionMenuItem.js +2 -2
  215. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  216. package/vanilla/UiEditorSlashMenu.js +4 -4
  217. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  218. package/vanilla/UiEditorSlashMenuGroup.js +2 -2
  219. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  220. package/vanilla/UiEditorSlashMenuItem.js +2 -2
  221. package/vanilla/UiEditorSurface.d.ts +1 -1
  222. package/vanilla/UiEditorSurface.js +2 -2
  223. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  224. package/vanilla/UiEditorTableContextMenu.js +7 -6
  225. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  226. package/vanilla/UiEditorTableOverlay.js +5 -5
  227. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  228. package/vanilla/UiEditorTableToolbar.js +8 -8
  229. package/vanilla/UiEditorToolbar.d.ts +1 -1
  230. package/vanilla/UiEditorToolbar.js +2 -2
  231. package/vanilla/UiFileInput.d.ts +1 -1
  232. package/vanilla/UiFileInput.js +4 -4
  233. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  234. package/vanilla/UiFloatingActionButton.js +2 -2
  235. package/vanilla/UiFormField.d.ts +1 -1
  236. package/vanilla/UiFormField.js +2 -2
  237. package/vanilla/UiGrid.d.ts +1 -1
  238. package/vanilla/UiGrid.js +4 -4
  239. package/vanilla/UiIcon.d.ts +1 -1
  240. package/vanilla/UiIcon.js +4 -4
  241. package/vanilla/UiIconButton.d.ts +1 -1
  242. package/vanilla/UiIconButton.js +2 -2
  243. package/vanilla/UiImage.d.ts +1 -1
  244. package/vanilla/UiImage.js +2 -2
  245. package/vanilla/UiInput.d.ts +1 -1
  246. package/vanilla/UiInput.js +2 -2
  247. package/vanilla/UiInputGroup.d.ts +1 -1
  248. package/vanilla/UiInputGroup.js +2 -2
  249. package/vanilla/UiLightEditor.d.ts +1 -1
  250. package/vanilla/UiLightEditor.js +2 -2
  251. package/vanilla/UiList.d.ts +1 -1
  252. package/vanilla/UiList.js +3 -3
  253. package/vanilla/UiListItem.d.ts +1 -1
  254. package/vanilla/UiListItem.js +2 -2
  255. package/vanilla/UiListbox.d.ts +1 -1
  256. package/vanilla/UiListbox.js +5 -5
  257. package/vanilla/UiMenu.d.ts +1 -1
  258. package/vanilla/UiMenu.js +2 -2
  259. package/vanilla/UiMenuGroup.d.ts +1 -1
  260. package/vanilla/UiMenuGroup.js +2 -2
  261. package/vanilla/UiMenuItem.d.ts +1 -1
  262. package/vanilla/UiMenuItem.js +3 -3
  263. package/vanilla/UiMeter.d.ts +1 -1
  264. package/vanilla/UiMeter.js +4 -4
  265. package/vanilla/UiNavItem.d.ts +1 -1
  266. package/vanilla/UiNavItem.js +3 -3
  267. package/vanilla/UiNumberInput.d.ts +1 -1
  268. package/vanilla/UiNumberInput.js +2 -2
  269. package/vanilla/UiPageHeader.d.ts +1 -1
  270. package/vanilla/UiPageHeader.js +2 -2
  271. package/vanilla/UiPagination.d.ts +1 -1
  272. package/vanilla/UiPagination.js +4 -4
  273. package/vanilla/UiPopover.d.ts +1 -1
  274. package/vanilla/UiPopover.js +2 -2
  275. package/vanilla/UiRadio.d.ts +1 -1
  276. package/vanilla/UiRadio.js +2 -2
  277. package/vanilla/UiRadioGroup.d.ts +1 -1
  278. package/vanilla/UiRadioGroup.js +2 -2
  279. package/vanilla/UiReel.d.ts +1 -1
  280. package/vanilla/UiReel.js +2 -2
  281. package/vanilla/UiScrollArea.d.ts +1 -1
  282. package/vanilla/UiScrollArea.js +2 -2
  283. package/vanilla/UiSearchResultRow.d.ts +1 -1
  284. package/vanilla/UiSearchResultRow.js +2 -2
  285. package/vanilla/UiSearchShell.d.ts +1 -1
  286. package/vanilla/UiSearchShell.js +2 -2
  287. package/vanilla/UiSection.d.ts +1 -1
  288. package/vanilla/UiSection.js +3 -3
  289. package/vanilla/UiSelect.d.ts +1 -1
  290. package/vanilla/UiSelect.js +2 -2
  291. package/vanilla/UiSeparator.d.ts +1 -1
  292. package/vanilla/UiSeparator.js +2 -2
  293. package/vanilla/UiSidebar.d.ts +1 -1
  294. package/vanilla/UiSidebar.js +2 -2
  295. package/vanilla/UiSiteHeader.d.ts +1 -1
  296. package/vanilla/UiSiteHeader.js +2 -2
  297. package/vanilla/UiSkeleton.d.ts +1 -1
  298. package/vanilla/UiSkeleton.js +2 -2
  299. package/vanilla/UiSlider.d.ts +1 -1
  300. package/vanilla/UiSlider.js +2 -2
  301. package/vanilla/UiSpinner.d.ts +1 -1
  302. package/vanilla/UiSpinner.js +2 -2
  303. package/vanilla/UiStack.d.ts +1 -1
  304. package/vanilla/UiStack.js +2 -2
  305. package/vanilla/UiStatusMessage.d.ts +1 -1
  306. package/vanilla/UiStatusMessage.js +2 -2
  307. package/vanilla/UiSwatch.d.ts +1 -1
  308. package/vanilla/UiSwatch.js +2 -2
  309. package/vanilla/UiSwitch.d.ts +1 -1
  310. package/vanilla/UiSwitch.js +2 -2
  311. package/vanilla/UiSwitcher.d.ts +1 -1
  312. package/vanilla/UiSwitcher.js +2 -2
  313. package/vanilla/UiTable.d.ts +1 -1
  314. package/vanilla/UiTable.js +2 -2
  315. package/vanilla/UiTabs.d.ts +1 -1
  316. package/vanilla/UiTabs.js +4 -4
  317. package/vanilla/UiText.d.ts +1 -1
  318. package/vanilla/UiText.js +13 -13
  319. package/vanilla/UiTextarea.d.ts +1 -1
  320. package/vanilla/UiTextarea.js +2 -2
  321. package/vanilla/UiTimeField.d.ts +1 -1
  322. package/vanilla/UiTimeField.js +2 -2
  323. package/vanilla/UiTimePicker.d.ts +1 -1
  324. package/vanilla/UiTimePicker.js +6 -6
  325. package/vanilla/UiToast.d.ts +1 -1
  326. package/vanilla/UiToast.js +2 -2
  327. package/vanilla/UiToastRegion.d.ts +1 -1
  328. package/vanilla/UiToastRegion.js +4 -4
  329. package/vanilla/UiTooltip.d.ts +1 -1
  330. package/vanilla/UiTooltip.js +2 -2
  331. package/vanilla/UiTopBar.d.ts +1 -1
  332. package/vanilla/UiTopBar.js +2 -2
  333. package/vanilla/UiTree.d.ts +1 -1
  334. package/vanilla/UiTree.js +2 -2
  335. package/vanilla/UiTreeItem.d.ts +1 -1
  336. package/vanilla/UiTreeItem.js +2 -2
  337. package/bin/looma-docs.mjs +0 -3
  338. package/docs/README.md +0 -323
  339. package/docs/card.html +0 -79
  340. package/docs/card.js +0 -18
  341. package/docs/catalog-view.js +0 -24
  342. package/docs/catalog-view.mjs +0 -13
  343. package/docs/catalog.mjs +0 -131
  344. package/docs/cli.mjs +0 -26
  345. package/docs/commands.mjs +0 -94
  346. package/docs/customizer-render.mjs +0 -157
  347. package/docs/customizer.js +0 -494
  348. package/docs/documentation.css +0 -14
  349. package/docs/example-invocations.mjs +0 -63
  350. package/docs/fonts.mjs +0 -73
  351. package/docs/framework-examples.d.mts +0 -9
  352. package/docs/framework-examples.mjs +0 -195
  353. package/docs/index.d.ts +0 -59
  354. package/docs/index.mjs +0 -4
  355. package/docs/local-server.mjs +0 -65
  356. package/docs/navigation.mjs +0 -26
  357. package/docs/palette.mjs +0 -68
  358. package/docs/pastoral.svg +0 -54
  359. package/docs/portrait.svg +0 -15
  360. package/docs/reference.html +0 -1
  361. package/docs/reference.js +0 -36
  362. package/docs/render.mjs +0 -97
  363. package/docs/site.mjs +0 -237
  364. package/docs/store.mjs +0 -92
  365. package/docs/theme-session.mjs +0 -72
  366. package/docs/theme.mjs +0 -669
  367. package/docs/value-editors.mjs +0 -37
  368. package/docs/workspace.mjs +0 -32
package/README.md CHANGED
@@ -116,14 +116,14 @@ Components read design tokens (`--ui-*` custom properties) from `tokens.css` and
116
116
 
117
117
  ## Weave your design system
118
118
 
119
- The package includes the documentation generator and theme customizer used by Looma's public site. Browse real component cards, generate a theme from shared semantic decisions, and document your own HTML Next components beside Looma's.
119
+ `@threadlabs/looma-docs` supplies the documentation generator and theme customizer used by Looma's public site. Browse real component cards, generate a theme from shared semantic decisions, and document your own HTML Next components beside Looma's.
120
120
 
121
- Install the optional documentation tools, then initialize your project:
121
+ Install the documentation package as a development dependency, then initialize your project:
122
122
 
123
123
  ```sh
124
- pnpm add -D 'markupress@>=0.14.6' '@threadlabs/markupkit@>=0.4.2' vite
124
+ pnpm add -D @threadlabs/looma-docs
125
125
  pnpm exec looma-docs init
126
126
  pnpm exec looma-docs dev
127
127
  ```
128
128
 
129
- The local editor saves `looma.theme.json` and generated `looma.theme.css`; import that CSS in your application. Static builds offer CSS and recipe downloads. See the [design-system guide](https://threadlabs.studio/looma/design-system/) for configuration, discovery, saving and recovery. Programmatic tooling is available through `@threadlabs/looma/docs`.
129
+ The local editor saves `looma.theme.json` and generated `looma.theme.css`; import that CSS in your application. Static builds offer CSS and recipe downloads. See the [design-system guide](https://threadlabs.studio/looma/design-system/) for configuration, discovery, saving and recovery. Programmatic tooling is available through `@threadlabs/looma-docs`.
@@ -355,6 +355,7 @@ export function createViewportSurface(surface, options = {}) {
355
355
  let sizeObserver = null;
356
356
  let frame = null;
357
357
  const position = () => {
358
+ if (frame !== null) owner.cancelAnimationFrame(frame);
358
359
  frame = null;
359
360
  if (stop) {
360
361
  if (options.materialRole) updateSurfaceMaterial(surface, options.materialRole);
@@ -396,7 +397,8 @@ export function createViewportSurface(surface, options = {}) {
396
397
  stop ??= observeOverlayViewport(surface.ownerDocument, position);
397
398
  options.position?.();
398
399
  if (!sizeObserver && owner.ResizeObserver) {
399
- sizeObserver = new owner.ResizeObserver(refresh);
400
+ // ResizeObserver runs before paint. Another frame would expose the new size at the old position.
401
+ sizeObserver = new owner.ResizeObserver(position);
400
402
  sizeObserver.observe(surface);
401
403
  }
402
404
  },
@@ -431,7 +433,10 @@ export function createAnchoredSurface(surface, options = {}) {
431
433
  return;
432
434
  }
433
435
  const rect = point ? { left: point.x, right: point.x, top: point.y, bottom: point.y, width: 0, height: 0 } : anchorRect();
434
- if (!rect) return;
436
+ if (!rect) {
437
+ if (!lastAnchorRect) hide(surface);
438
+ return;
439
+ }
435
440
  // A disappearing trigger has no usable position. Keep the last valid position, or wait before first opening.
436
441
  if (!point && typeof anchor !== "function" && (anchor.isConnected === false || rect.width === 0 && rect.height === 0
437
442
  || anchor instanceof owner.Element && owner.getComputedStyle(anchor).visibility !== "visible")) {
@@ -1,3 +1,4 @@
1
+ <link rel="component" href="../ui-icon/ui-icon.html">
1
2
  <template component="ui-breadcrumb-item">
2
3
  <defs>
3
4
  <prop name="current" type="boolean" default="false"
@@ -3,6 +3,7 @@ import { componentInputs } from "@nextwebwg/html-next/inputs";
3
3
  import { Temporal, asciiDigits, canonicalValue, compileDateRules, isDateAllowed } from "../shared/date-time.js";
4
4
  import { availableDate } from "../shared/date-navigation.js";
5
5
  import { createCalendarBindings } from "./calendar-source.js";
6
+ import { externalValueTracker } from "../shared/external-value.js";
6
7
 
7
8
  const constraintNames = ["min", "max", "allowedDates", "allowedRanges", "disabledDates", "disabledRanges", "disabledWeekdays"];
8
9
 
@@ -15,8 +16,12 @@ function interactions(host) {
15
16
  const model = () => host.props.model.value;
16
17
  const blocked = () => host.props.disabled.value;
17
18
  const settings = () => Object.fromEntries(constraintNames.map(key => [key, host.props[key].value]));
18
- const focus = selector => {
19
+ const focus = (selector, immediate = false) => {
19
20
  cancelAnimationFrame(frame);
21
+ if (immediate) {
22
+ const target = element.querySelector(selector);
23
+ if (target && !target.closest("[hidden]")) target.focus();
24
+ }
20
25
  frame = requestAnimationFrame(() => {
21
26
  if (!connected) return;
22
27
  const target = element.querySelector(selector) ?? element.querySelector(host.state.mode === "days" ? '[data-calendar-days][tabindex="0"]' : "[data-calendar-year-toggle]");
@@ -65,7 +70,7 @@ function interactions(host) {
65
70
  if (!date) return;
66
71
  host.state.focusedDate = date;
67
72
  showMonth(date.slice(0, 7), "keyboard");
68
- focus(`[data-calendar-day="${date}"]`);
73
+ focus(`[data-calendar-day="${date}"]`, true);
69
74
  };
70
75
  const navigate = (direction, trigger) => {
71
76
  const current = model(); if (!current) return;
@@ -158,19 +163,18 @@ function interactions(host) {
158
163
  element.addEventListener("keydown", keydown);
159
164
  element.addEventListener("focusin", focusin);
160
165
  element.addEventListener("focus-date", request);
161
- let externalValue = host.props.value.value;
162
- let externalMonth = host.props.month.value;
166
+ const externalValueChanged = externalValueTracker(host.props.value);
167
+ const externalMonthChanged = externalValueTracker(host.props.month);
163
168
  const stop = host.effect(() => {
164
169
  const value = host.props.value.value;
165
170
  const month = host.props.month.value;
166
- if (value !== externalValue) {
167
- externalValue = value;
171
+ if (externalValueChanged(value)) {
168
172
  if (host.state.current !== value) {
169
173
  host.state.current = value;
170
174
  if (!month && value) host.state.visibleMonth = value.slice(0, 7);
171
175
  }
172
176
  }
173
- if (month !== externalMonth) { externalMonth = month; host.state.visibleMonth = month; }
177
+ if (externalMonthChanged(month)) host.state.visibleMonth = month;
174
178
  });
175
179
  return () => {
176
180
  connected = false; cancelAnimationFrame(frame); stop();
@@ -22,7 +22,6 @@ export function connect(host) {
22
22
  let signature;
23
23
  const externalChanged = externalValueTracker(host.element);
24
24
  let lastValidation;
25
- let validityMessage = "";
26
25
  let trigger = "programmatic";
27
26
  const blocked = () => editor.matches(":disabled") || editor.readOnly;
28
27
  const write = text => { if (editor.value !== text) editor.value = text; };
@@ -35,12 +34,8 @@ export function connect(host) {
35
34
  }
36
35
  catch { write(current); }
37
36
  };
38
- // Input's generated prop checks refresh native validity during rendering. Reapply
39
- // the domain error after that flush as well as immediately for synchronous submit.
40
37
  const setValidity = message => {
41
- validityMessage = message;
42
38
  editor.setCustomValidity(message);
43
- queueMicrotask(() => { if (connected) editor.setCustomValidity(validityMessage); });
44
39
  };
45
40
  const validate = (value, announce = false) => {
46
41
  let message = "";
@@ -17,10 +17,18 @@ function ensureOpen(members) {
17
17
  pendingGroups.add(members);
18
18
  queueMicrotask(() => {
19
19
  pendingGroups.delete(members);
20
- const current = [...members];
21
- if (!current.some(member => member.required()) || current.some(member => member.isOpen())) return;
20
+ // Connection can finish out of order. Native document order owns the automatic choice;
21
+ // an authored or user-selected open member keeps ownership when another member connects.
22
+ const current = [...members].sort((a, b) => {
23
+ const position = a.element.compareDocumentPosition(b.element);
24
+ if (position & a.element.DOCUMENT_POSITION_DISCONNECTED) return 0;
25
+ return position & a.element.DOCUMENT_POSITION_FOLLOWING ? -1 : position & a.element.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
26
+ });
27
+ if (!current.some(member => member.required()) || current.some(member => member.isOpen() && !member.automatic)) return;
22
28
  const candidate = current.find(member => !member.disabled()) || current[0];
23
- candidate?.open();
29
+ if (candidate?.isOpen()) return;
30
+ for (const member of current) if (member.isOpen()) member.close("programmatic", "programmatic");
31
+ candidate?.open(true);
24
32
  });
25
33
  }
26
34
 
@@ -75,11 +83,14 @@ export function connect(host) {
75
83
  });
76
84
  };
77
85
  const member = {
86
+ element: host.element,
87
+ automatic: false,
78
88
  isOpen: () => Boolean(host.state.internalOpen),
79
89
  required: () => Boolean(host.props.requiredOpen.value),
80
90
  disabled: () => Boolean(host.props.disabled.value),
81
- open() {
91
+ open(automatic = false) {
82
92
  if (disposed || host.state.internalOpen) return;
93
+ member.automatic = automatic;
83
94
  animateFillTakeover();
84
95
  host.state.internalOpen = true;
85
96
  syncGroup("programmatic", "programmatic");
@@ -87,6 +98,7 @@ export function connect(host) {
87
98
  },
88
99
  close(reason, how) {
89
100
  if (!host.state.internalOpen) return;
101
+ member.automatic = false;
90
102
  animateFillTakeover();
91
103
  host.state.internalOpen = false;
92
104
  host.dispatch("close", { open: false, reason, trigger: how });
@@ -111,6 +123,7 @@ export function connect(host) {
111
123
  };
112
124
  const stop = host.effect(() => {
113
125
  if (host.props.open.value !== external) {
126
+ member.automatic = false;
114
127
  external = host.props.open.value;
115
128
  if (external || mayClose()) {
116
129
  animateFillTakeover();
@@ -126,6 +139,7 @@ export function connect(host) {
126
139
  });
127
140
  const onClick = () => {
128
141
  if (host.props.disabled.value) return;
142
+ member.automatic = false;
129
143
  const open = !host.state.internalOpen;
130
144
  if (!open && !mayClose()) return;
131
145
  const how = trigger();
@@ -136,6 +150,7 @@ export function connect(host) {
136
150
  };
137
151
  const onBeforematch = () => queueMicrotask(() => {
138
152
  if (disposed || host.state.internalOpen) return;
153
+ member.automatic = false;
139
154
  animateFillTakeover();
140
155
  host.state.internalOpen = true;
141
156
  syncGroup("programmatic", "programmatic");
@@ -63,6 +63,11 @@ export function connect(host) {
63
63
  element.addEventListener("click", onClick);
64
64
  element.addEventListener("keydown", onKeyDown);
65
65
  element.addEventListener("submit", onSubmit);
66
+ // Native fields retain edits made while the component's controller module was loading.
67
+ const destination = element.querySelector("[data-link-destination]")?.value;
68
+ const text = element.querySelector("[data-link-text]")?.value;
69
+ if (destination !== undefined && destination !== String(host.props.value.value ?? "")) host.dispatch("destination", { value: destination });
70
+ if (text !== undefined && text !== String(host.props.text.value ?? "")) host.dispatch("text", { text });
66
71
  return () => {
67
72
  element.removeEventListener("command", onCommand);
68
73
  cancelActiveItemReveal(element);
@@ -30,9 +30,8 @@
30
30
  box-shadow: inset 0 0 0 1px var(--ui-accent-soft);
31
31
  }
32
32
 
33
- /* A slotted Avatar (a person's photo) is its own circle. Its root carries data-component in HTML
34
- and its tag as a class in Vue; neither tool lowers a component tag inside :has(). */
35
- :host .avatar:has(> :is([data-component~="ui-avatar"], .ui-avatar)) {
33
+ /* A slotted Avatar supplies its own circle. */
34
+ :host .avatar:has(> [component~="ui-avatar"]) {
36
35
  background: none;
37
36
  box-shadow: none;
38
37
  }
@@ -41,7 +41,12 @@
41
41
  ></prop>
42
42
  </event>
43
43
  </defs>
44
- <div role="menu" from:aria-label="$scope = 'column' ? 'Column actions' : $scope = 'row' ? 'Row actions' : 'Cell actions'" from:hidden="not $open">
44
+ <div
45
+ role="menu"
46
+ popover="manual"
47
+ from:aria-label="$scope = 'column' ? 'Column actions' : $scope = 'row' ? 'Row actions' : 'Cell actions'"
48
+ from:hidden="not $open"
49
+ >
45
50
  <div $if="$swatches" class="section" role="none">
46
51
  <div class="heading" role="presentation">Cell background</div>
47
52
  <div class="swatches" role="group" aria-label="Cell background">
@@ -80,6 +85,10 @@
80
85
  </template>
81
86
  </div>
82
87
  <style>
88
+ :host[popover]:not(:popover-open) {
89
+ display: none !important;
90
+ }
91
+
83
92
  :host[popover] {
84
93
  position: fixed;
85
94
  inset: auto;
@@ -23,7 +23,6 @@ export function connect(host) {
23
23
  validity = message;
24
24
  host.state.invalidSelection = Boolean(message);
25
25
  input.setCustomValidity(message);
26
- queueMicrotask(() => { if (connected) input.setCustomValidity(validity); });
27
26
  };
28
27
  const validate = (announce = false) => {
29
28
  const previous = validity;
@@ -45,7 +44,6 @@ export function connect(host) {
45
44
  writeFiles(selected);
46
45
  host.state.error = message;
47
46
  input.setCustomValidity(validity);
48
- queueMicrotask(() => { if (connected) input.setCustomValidity(validity); });
49
47
  host.dispatch("reject", { files, message });
50
48
  return;
51
49
  }
@@ -1,3 +1,4 @@
1
+ <link rel="component" href="../ui-spinner/ui-spinner.html">
1
2
  <template component="ui-status-message">
2
3
  <defs>
3
4
  <prop name="kind" type="keyword" values="empty, loading, error" default="empty"
@@ -136,6 +136,7 @@
136
136
  }
137
137
  .list button[aria-selected="true"],
138
138
  .list > :slotted(button[slot="tab"][aria-selected="true"]) {
139
+ background: var(--ui-accent-subtle);
139
140
  color: var(--ui-accent-subtle-text);
140
141
  border-block-end-color: var(--ui-accent-subtle-text);
141
142
  }
@@ -74,56 +74,35 @@
74
74
 
75
75
  /* The label and the shortcut sit side by side, a gap apart, with the label wrapping on its own. */
76
76
  .surface {
77
- --_tooltip-line: var(--_ui-tooltip-border, var(--ui-overlay-border, var(--ui-border-strong)));
77
+ --_tooltip-line: var(--_ui-tooltip-border, var(--ui-overlay-border, var(--ui-border)));
78
78
  position: relative;
79
79
  display: flex !important;
80
80
  align-items: baseline !important;
81
- gap: var(--ui-space-2) !important;
81
+ gap: var(--ui-space-1) !important;
82
82
  box-sizing: border-box !important;
83
83
  max-inline-size: var(--_ui-tooltip-max-inline-size, 18rem);
84
84
  border: var(--ui-border-width) solid var(--_tooltip-line);
85
- border-radius: var(--_ui-tooltip-radius, var(--ui-overlay-radius, var(--ui-radius-md)));
85
+ border-radius: var(--_ui-tooltip-radius, var(--ui-overlay-radius, var(--ui-radius-sm)));
86
86
  background: var(--_ui-tooltip-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
87
87
  color: var(--_ui-tooltip-text, var(--ui-text-primary));
88
- padding: var(--ui-space-2) var(--ui-space-3) !important;
88
+ padding: var(--ui-space-1) var(--ui-space-2) !important;
89
89
  font-family: var(--ui-font-family-sans);
90
- font-size: var(--ui-font-size-sm);
90
+ font-size: var(--ui-font-size-xs);
91
91
  line-height: var(--ui-line-height-tight);
92
- box-shadow: var(--_ui-tooltip-shadow, var(--ui-overlay-shadow, var(--ui-elevation-tooltip, var(--ui-shadow-md))));
92
+ box-shadow: var(--_ui-tooltip-shadow, var(--ui-overlay-shadow, var(--ui-elevation-tooltip, var(--ui-shadow-sm))));
93
93
  }
94
94
 
95
- /* Purpose and measured size shape one shared separation lever. The content plane stays opaque;
96
- transparency, frosting and edge light belong to the surrounding decorative material. */
95
+ /* A hint keeps one edge and a quiet lift. The shared palette supplies its tint;
96
+ the nearly opaque label plane and matching arrow remain readable over content. */
97
97
  .surface {
98
98
  --_ui-material-glassiness: clamp(0, var(--ui-glassiness, 0), 1);
99
- --_ui-material-separation: clamp(0, var(--ui-surface-separation, 0), 1);
100
- --_ui-material-active: clamp(0, calc(var(--_ui-material-separation) * 100000), 1);
101
- --_ui-material-rim: calc(var(--_ui-material-separation) * var(--_ui-material-scale, 0.08) * 8px);
102
99
  --_ui-material-content-color: var(
103
100
  --_ui-tooltip-surface,
104
- var(--_ui-material-underpaint, var(--ui-material-content, var(--ui-overlay-surface, var(--ui-surface-elevated))))
101
+ var(--ui-material-content, var(--ui-overlay-surface, var(--ui-surface-elevated)))
105
102
  );
106
- --_ui-material-rim-color: color-mix(in srgb, var(--ui-material-glass, var(--ui-surface-elevated)) calc(var(--_ui-material-active) * 100%), transparent);
107
103
  background:
108
- var(--ui-material-highlight, var(--ui-surface-highlight, linear-gradient(transparent, transparent))) padding-box,
109
104
  linear-gradient(var(--_ui-material-content-color), var(--_ui-material-content-color)) padding-box,
110
- linear-gradient(var(--_ui-material-rim-color), var(--_ui-material-rim-color)) border-box;
111
- border-width: calc(var(--ui-border-width) + var(--_ui-material-rim));
112
- border-color: var(
113
- --_ui-tooltip-border,
114
- color-mix(in oklab, var(--ui-overlay-border, var(--ui-border-strong)) calc((1 - var(--_ui-material-active)) * 100%), transparent)
115
- );
116
- box-shadow: var(
117
- --_ui-tooltip-shadow,
118
- var(
119
- --ui-overlay-shadow,
120
- 0 calc(var(--_ui-material-separation) * var(--_ui-material-scale, 0.08) * 8px) calc(
121
- var(--_ui-material-separation) * var(--_ui-material-scale, 0.08) * 24px
122
- ) color-mix(in oklab, var(--ui-text-primary) 15%, transparent),
123
- inset 0 0 0 calc(var(--_ui-material-active) * var(--ui-border-width)) var(--ui-material-edge, var(--ui-border-strong)),
124
- var(--ui-elevation-tooltip, var(--ui-shadow-md))
125
- )
126
- );
105
+ linear-gradient(transparent, transparent) border-box;
127
106
  -webkit-backdrop-filter: blur(calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 32px));
128
107
  backdrop-filter: blur(calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 32px));
129
108
  }
@@ -160,7 +139,7 @@
160
139
  padding-inline-start: var(--ui-space-2) !important;
161
140
  border-inline-start: 1px solid color-mix(in oklab, currentColor 28%, transparent);
162
141
  color: color-mix(in oklab, currentColor 72%, transparent);
163
- font-size: var(--ui-font-size-xs);
142
+ font-size: var(--ui-font-size-2xs);
164
143
  font-weight: var(--ui-font-normal);
165
144
  white-space: nowrap;
166
145
  vertical-align: baseline;