@threadlabs/looma 0.30.9 → 0.31.1

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 (270) hide show
  1. package/components/shared/icons.js +1 -0
  2. package/components/ui-affordance-scope/ui-affordance-scope.html +1 -1
  3. package/components/ui-affordance-scope/ui-affordance-scope.js +1 -6
  4. package/components/ui-avatar/ui-avatar.html +1 -1
  5. package/components/ui-avatar/ui-avatar.js +1 -6
  6. package/components/ui-avatar-group/ui-avatar-group.html +1 -1
  7. package/components/ui-avatar-group/ui-avatar-group.js +1 -6
  8. package/components/ui-button/ui-button.html +1 -1
  9. package/components/ui-button/ui-button.js +1 -6
  10. package/components/ui-checkbox/ui-checkbox.html +1 -1
  11. package/components/ui-checkbox/ui-checkbox.js +1 -6
  12. package/components/ui-combobox/ui-combobox.html +1 -1
  13. package/components/ui-combobox/ui-combobox.js +1 -6
  14. package/components/ui-context-menu/ui-context-menu.html +1 -1
  15. package/components/ui-context-menu/ui-context-menu.js +1 -6
  16. package/components/ui-dialog/ui-dialog.html +1 -1
  17. package/components/ui-dialog/ui-dialog.js +1 -6
  18. package/components/ui-disclosure/ui-disclosure.html +1 -1
  19. package/components/ui-disclosure/ui-disclosure.js +1 -6
  20. package/components/ui-editable/ui-editable.html +1 -1
  21. package/components/ui-editable/ui-editable.js +1 -6
  22. package/components/ui-editor-block-actions/ui-editor-block-actions.html +1 -1
  23. package/components/ui-editor-block-actions/ui-editor-block-actions.js +1 -6
  24. package/components/ui-editor-chip-editor/ui-editor-chip-editor.html +1 -1
  25. package/components/ui-editor-chip-editor/ui-editor-chip-editor.js +1 -6
  26. package/components/ui-editor-code-language/ui-editor-code-language.html +1 -1
  27. package/components/ui-editor-code-language/ui-editor-code-language.js +1 -6
  28. package/components/ui-editor-footnote-editor/ui-editor-footnote-editor.html +57 -0
  29. package/components/ui-editor-footnote-editor/ui-editor-footnote-editor.js +38 -0
  30. package/components/ui-editor-image-toolbar/ui-editor-image-toolbar.html +1 -1
  31. package/components/ui-editor-image-toolbar/ui-editor-image-toolbar.js +1 -6
  32. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +1 -1
  33. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.js +1 -6
  34. package/components/ui-editor-link-card/ui-editor-link-card.html +1 -1
  35. package/components/ui-editor-link-card/ui-editor-link-card.js +1 -6
  36. package/components/ui-editor-link-form/ui-editor-link-form.html +1 -1
  37. package/components/ui-editor-link-form/ui-editor-link-form.js +1 -6
  38. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +1 -1
  39. package/components/ui-editor-mention-menu/ui-editor-mention-menu.js +1 -6
  40. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +1 -1
  41. package/components/ui-editor-slash-menu/ui-editor-slash-menu.js +1 -6
  42. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +1 -1
  43. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.js +1 -6
  44. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +1 -1
  45. package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +1 -6
  46. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +1 -1
  47. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.js +1 -6
  48. package/components/ui-editor-toolbar/ui-editor-toolbar.html +1 -1
  49. package/components/ui-editor-toolbar/ui-editor-toolbar.js +1 -6
  50. package/components/ui-form-field/ui-form-field.html +1 -1
  51. package/components/ui-form-field/ui-form-field.js +1 -6
  52. package/components/ui-icon/ui-icon.html +1 -0
  53. package/components/ui-icon-button/ui-icon-button.html +1 -1
  54. package/components/ui-icon-button/ui-icon-button.js +1 -6
  55. package/components/ui-image/ui-image.html +1 -1
  56. package/components/ui-image/ui-image.js +1 -6
  57. package/components/ui-input/ui-input.html +1 -1
  58. package/components/ui-input/ui-input.js +1 -6
  59. package/components/ui-input-group/ui-input-group.html +1 -1
  60. package/components/ui-input-group/ui-input-group.js +1 -6
  61. package/components/ui-listbox/ui-listbox.html +1 -1
  62. package/components/ui-listbox/ui-listbox.js +1 -6
  63. package/components/ui-menu/ui-menu.html +1 -1
  64. package/components/ui-menu/ui-menu.js +1 -6
  65. package/components/ui-menu-item/ui-menu-item.html +1 -1
  66. package/components/ui-menu-item/ui-menu-item.js +1 -6
  67. package/components/ui-popover/ui-popover.html +1 -1
  68. package/components/ui-popover/ui-popover.js +1 -6
  69. package/components/ui-radio/ui-radio.html +1 -1
  70. package/components/ui-radio/ui-radio.js +1 -6
  71. package/components/ui-radio-group/ui-radio-group.html +1 -1
  72. package/components/ui-radio-group/ui-radio-group.js +1 -6
  73. package/components/ui-scroll-area/ui-scroll-area.html +1 -1
  74. package/components/ui-scroll-area/ui-scroll-area.js +1 -6
  75. package/components/ui-search-shell/ui-search-shell.html +1 -1
  76. package/components/ui-search-shell/ui-search-shell.js +1 -6
  77. package/components/ui-select/ui-select.html +1 -1
  78. package/components/ui-select/ui-select.js +1 -6
  79. package/components/ui-sidebar/ui-sidebar.html +1 -1
  80. package/components/ui-sidebar/ui-sidebar.js +1 -6
  81. package/components/ui-switch/ui-switch.html +1 -1
  82. package/components/ui-switch/ui-switch.js +1 -6
  83. package/components/ui-switcher/ui-switcher.html +1 -1
  84. package/components/ui-switcher/ui-switcher.js +1 -6
  85. package/components/ui-table/ui-table.html +1 -1
  86. package/components/ui-table/ui-table.js +1 -6
  87. package/components/ui-tabs/ui-tabs.html +1 -1
  88. package/components/ui-tabs/ui-tabs.js +1 -6
  89. package/components/ui-textarea/ui-textarea.html +1 -1
  90. package/components/ui-textarea/ui-textarea.js +1 -6
  91. package/components/ui-toast/ui-toast.html +1 -1
  92. package/components/ui-toast/ui-toast.js +1 -6
  93. package/components/ui-toast-region/ui-toast-region.html +1 -1
  94. package/components/ui-toast-region/ui-toast-region.js +1 -6
  95. package/components/ui-tooltip/ui-tooltip.html +1 -1
  96. package/components/ui-tooltip/ui-tooltip.js +1 -6
  97. package/components/ui-tree/ui-tree.html +1 -1
  98. package/components/ui-tree/ui-tree.js +1 -6
  99. package/components/ui-tree-item/ui-tree-item.html +1 -1
  100. package/components/ui-tree-item/ui-tree-item.js +1 -6
  101. package/dist/index.js +37 -36
  102. package/editor/chunks/extensions.js +342 -20
  103. package/editor/expressmark.js +1 -1
  104. package/editor/extensions/footnote.d.ts +40 -7
  105. package/editor/extensions/index.d.ts +1 -1
  106. package/editor/extensions/index.js +2 -2
  107. package/editor/footnote-editing.d.ts +46 -0
  108. package/editor/icons.d.ts +1 -0
  109. package/editor/index.js +4 -3
  110. package/package.json +1 -1
  111. package/styles/ui-editor-footnote-editor.css +1 -0
  112. package/vanilla/UiAffordanceScope.js +4 -4
  113. package/vanilla/UiAvatar.js +4 -4
  114. package/vanilla/UiAvatarGroup.js +4 -4
  115. package/vanilla/UiButton.js +4 -4
  116. package/vanilla/UiCheckbox.js +4 -4
  117. package/vanilla/UiCombobox.js +4 -4
  118. package/vanilla/UiContextMenu.js +4 -4
  119. package/vanilla/UiDialog.js +4 -4
  120. package/vanilla/UiDisclosure.js +4 -4
  121. package/vanilla/UiEditable.js +4 -4
  122. package/vanilla/UiEditorBlockActions.js +4 -4
  123. package/vanilla/UiEditorChipEditor.js +4 -4
  124. package/vanilla/UiEditorCodeLanguage.js +4 -4
  125. package/vanilla/UiEditorFootnoteEditor.d.ts +30 -0
  126. package/vanilla/UiEditorFootnoteEditor.js +101 -0
  127. package/vanilla/UiEditorImageToolbar.js +4 -4
  128. package/vanilla/UiEditorInsertTableGrid.js +4 -4
  129. package/vanilla/UiEditorLinkCard.js +4 -4
  130. package/vanilla/UiEditorLinkForm.js +4 -4
  131. package/vanilla/UiEditorMentionMenu.js +4 -4
  132. package/vanilla/UiEditorSlashMenu.js +4 -4
  133. package/vanilla/UiEditorTableContextMenu.js +4 -4
  134. package/vanilla/UiEditorTableOverlay.js +4 -4
  135. package/vanilla/UiEditorTableToolbar.js +4 -4
  136. package/vanilla/UiEditorToolbar.js +4 -4
  137. package/vanilla/UiFormField.js +4 -4
  138. package/vanilla/UiIcon.js +1 -1
  139. package/vanilla/UiIconButton.js +4 -4
  140. package/vanilla/UiImage.js +4 -4
  141. package/vanilla/UiInput.js +4 -4
  142. package/vanilla/UiInputGroup.js +4 -4
  143. package/vanilla/UiListbox.js +4 -4
  144. package/vanilla/UiMenu.js +4 -4
  145. package/vanilla/UiMenuItem.js +4 -4
  146. package/vanilla/UiPopover.js +4 -4
  147. package/vanilla/UiRadio.js +4 -4
  148. package/vanilla/UiRadioGroup.js +4 -4
  149. package/vanilla/UiScrollArea.js +4 -4
  150. package/vanilla/UiSearchShell.js +4 -4
  151. package/vanilla/UiSelect.js +4 -4
  152. package/vanilla/UiSidebar.js +4 -4
  153. package/vanilla/UiSwitch.js +4 -4
  154. package/vanilla/UiSwitcher.js +4 -4
  155. package/vanilla/UiTable.js +4 -4
  156. package/vanilla/UiTabs.js +4 -4
  157. package/vanilla/UiTextarea.js +4 -4
  158. package/vanilla/UiToast.js +4 -4
  159. package/vanilla/UiToastRegion.js +4 -4
  160. package/vanilla/UiTooltip.js +4 -4
  161. package/vanilla/UiTree.js +4 -4
  162. package/vanilla/UiTreeItem.js +4 -4
  163. package/vanilla/index.js +1 -0
  164. package/vue/UiAffordanceScope.vue +1 -0
  165. package/vue/UiAvatar.vue +1 -0
  166. package/vue/UiAvatarGroup.vue +1 -0
  167. package/vue/UiButton.vue +1 -0
  168. package/vue/UiCheckbox.vue +1 -0
  169. package/vue/UiCombobox.vue +1 -0
  170. package/vue/UiContextMenu.vue +1 -0
  171. package/vue/UiDialog.vue +1 -0
  172. package/vue/UiDisclosure.vue +1 -0
  173. package/vue/UiEditable.vue +1 -0
  174. package/vue/UiEditorBlockActions.vue +1 -0
  175. package/vue/UiEditorChipEditor.vue +1 -0
  176. package/vue/UiEditorCodeLanguage.vue +1 -0
  177. package/vue/UiEditorFootnoteEditor.d.ts +57 -0
  178. package/vue/UiEditorFootnoteEditor.js +2 -0
  179. package/vue/UiEditorFootnoteEditor.vue +304 -0
  180. package/vue/UiEditorImageToolbar.vue +1 -0
  181. package/vue/UiEditorInsertTableGrid.vue +1 -0
  182. package/vue/UiEditorLinkCard.vue +1 -0
  183. package/vue/UiEditorLinkForm.vue +1 -0
  184. package/vue/UiEditorMentionMenu.vue +1 -0
  185. package/vue/UiEditorSlashMenu.vue +1 -0
  186. package/vue/UiEditorTableContextMenu.vue +1 -0
  187. package/vue/UiEditorTableOverlay.vue +1 -0
  188. package/vue/UiEditorTableToolbar.vue +1 -0
  189. package/vue/UiEditorToolbar.vue +1 -0
  190. package/vue/UiFormField.vue +1 -0
  191. package/vue/UiIcon.vue +4 -0
  192. package/vue/UiIconButton.vue +1 -0
  193. package/vue/UiImage.vue +1 -0
  194. package/vue/UiInput.vue +1 -0
  195. package/vue/UiInputGroup.vue +1 -0
  196. package/vue/UiListbox.vue +1 -0
  197. package/vue/UiMenu.vue +1 -0
  198. package/vue/UiMenuItem.vue +1 -0
  199. package/vue/UiPopover.vue +1 -0
  200. package/vue/UiRadio.vue +1 -0
  201. package/vue/UiRadioGroup.vue +1 -0
  202. package/vue/UiScrollArea.vue +1 -0
  203. package/vue/UiSearchShell.vue +1 -0
  204. package/vue/UiSelect.vue +1 -0
  205. package/vue/UiSidebar.vue +1 -0
  206. package/vue/UiSwitch.vue +1 -0
  207. package/vue/UiSwitcher.vue +1 -0
  208. package/vue/UiTable.vue +1 -0
  209. package/vue/UiTabs.vue +1 -0
  210. package/vue/UiTextarea.vue +1 -0
  211. package/vue/UiToast.vue +1 -0
  212. package/vue/UiToastRegion.vue +1 -0
  213. package/vue/UiTooltip.vue +1 -0
  214. package/vue/UiTree.vue +1 -0
  215. package/vue/UiTreeItem.vue +1 -0
  216. package/vue/chunks/UiAffordanceScope.js +2 -1
  217. package/vue/chunks/UiAvatar.js +2 -1
  218. package/vue/chunks/UiAvatarGroup.js +2 -1
  219. package/vue/chunks/UiButton.js +2 -1
  220. package/vue/chunks/UiCheckbox.js +2 -1
  221. package/vue/chunks/UiCombobox.js +2 -1
  222. package/vue/chunks/UiContextMenu.js +2 -1
  223. package/vue/chunks/UiDialog.js +2 -1
  224. package/vue/chunks/UiDisclosure.js +2 -1
  225. package/vue/chunks/UiEditable.js +2 -1
  226. package/vue/chunks/UiEditorBlockActions.js +1 -0
  227. package/vue/chunks/UiEditorChipEditor.js +1 -0
  228. package/vue/chunks/UiEditorCodeLanguage.js +1 -0
  229. package/vue/chunks/UiEditorFootnoteEditor.js +306 -0
  230. package/vue/chunks/UiEditorImageToolbar.js +2 -1
  231. package/vue/chunks/UiEditorInsertTableGrid.js +2 -1
  232. package/vue/chunks/UiEditorLinkCard.js +1 -0
  233. package/vue/chunks/UiEditorLinkForm.js +2 -1
  234. package/vue/chunks/UiEditorMentionMenu.js +2 -1
  235. package/vue/chunks/UiEditorSlashMenu.js +2 -1
  236. package/vue/chunks/UiEditorTableContextMenu.js +2 -1
  237. package/vue/chunks/UiEditorTableOverlay.js +2 -1
  238. package/vue/chunks/UiEditorTableToolbar.js +2 -1
  239. package/vue/chunks/UiEditorToolbar.js +2 -1
  240. package/vue/chunks/UiFormField.js +2 -1
  241. package/vue/chunks/UiIcon.js +15 -1
  242. package/vue/chunks/UiIconButton.js +2 -1
  243. package/vue/chunks/UiImage.js +2 -1
  244. package/vue/chunks/UiInput.js +2 -1
  245. package/vue/chunks/UiInputGroup.js +2 -1
  246. package/vue/chunks/UiListbox.js +2 -1
  247. package/vue/chunks/UiMenu.js +2 -1
  248. package/vue/chunks/UiMenuItem.js +2 -1
  249. package/vue/chunks/UiPopover.js +2 -1
  250. package/vue/chunks/UiRadio.js +2 -1
  251. package/vue/chunks/UiRadioGroup.js +2 -1
  252. package/vue/chunks/UiScrollArea.js +2 -1
  253. package/vue/chunks/UiSearchShell.js +2 -1
  254. package/vue/chunks/UiSelect.js +2 -1
  255. package/vue/chunks/UiSidebar.js +2 -1
  256. package/vue/chunks/UiSwitch.js +2 -1
  257. package/vue/chunks/UiSwitcher.js +2 -1
  258. package/vue/chunks/UiTable.js +2 -1
  259. package/vue/chunks/UiTabs.js +2 -1
  260. package/vue/chunks/UiTextarea.js +2 -1
  261. package/vue/chunks/UiToast.js +2 -1
  262. package/vue/chunks/UiToastRegion.js +2 -1
  263. package/vue/chunks/UiTooltip.js +2 -1
  264. package/vue/chunks/UiTree.js +2 -1
  265. package/vue/chunks/UiTreeItem.js +2 -1
  266. package/vue/components.css +595 -595
  267. package/vue/editor/index.js +668 -80
  268. package/vue/editor/primitives.d.ts +3 -1
  269. package/vue/index.d.ts +1 -0
  270. package/vue/index.js +5 -4
@@ -63,6 +63,7 @@ export const icons = {
63
63
  "settings": [["path",{"d":"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{"cx":"12","cy":"12","r":"3"}]],
64
64
  "split": [["path",{"d":"M16 3h5v5"}],["path",{"d":"M8 3H3v5"}],["path",{"d":"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3"}],["path",{"d":"m15 9 6-6"}]],
65
65
  "strikethrough": [["path",{"d":"M16 4H9a3 3 0 0 0-2.83 4"}],["path",{"d":"M14 12a4 4 0 0 1 0 8H6"}],["line",{"x1":"4","x2":"20","y1":"12","y2":"12"}]],
66
+ "superscript": [["path",{"d":"m4 19 8-8"}],["path",{"d":"m12 19-8-8"}],["path",{"d":"M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06"}]],
66
67
  "table": [["path",{"d":"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"}]],
67
68
  "tag": [["path",{"d":"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{"cx":"7.5","cy":"7.5","r":".5","fill":"currentColor"}]],
68
69
  "trash": [["path",{"d":"M10 11v6"}],["path",{"d":"M14 11v6"}],["path",{"d":"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{"d":"M3 6h18"}],["path",{"d":"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],
@@ -1,4 +1,4 @@
1
- <template component="ui-affordance-scope" controller="./ui-affordance-scope.js">
1
+ <template component="ui-affordance-scope" module="./ui-affordance-scope.js">
2
2
  <defs>
3
3
  <prop name="nearRadius" type="number" default="16">How close, in pixels, the pointer must come to reveal an affordance.</prop>
4
4
  <prop name="guide" type="keyword" values="dot, none" default="dot"
@@ -6,7 +6,7 @@ function distance(point, rect) {
6
6
  return Math.hypot(dx, dy);
7
7
  }
8
8
 
9
- function connect(host) {
9
+ export function connect(host) {
10
10
  const element = host.element;
11
11
  const owner = element.ownerDocument.defaultView;
12
12
  let anchors = [];
@@ -70,8 +70,3 @@ function connect(host) {
70
70
  clear();
71
71
  };
72
72
  }
73
-
74
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
75
- export default function controller(host) {
76
- host.on("connect", () => connect(host));
77
- }
@@ -1,5 +1,5 @@
1
1
  <link rel="component" href="../ui-icon/ui-icon.html">
2
- <template component="ui-avatar" controller="./ui-avatar.js">
2
+ <template component="ui-avatar" module="./ui-avatar.js">
3
3
  <defs>
4
4
  <prop name="src" type="string"
5
5
  >The image to show, cropped to fill the circle. Until it loads, or if it fails, the avatar shows initials instead. An img element authored inside the avatar
@@ -6,7 +6,7 @@ function toInitials(value) {
6
6
  }
7
7
 
8
8
  // Shows an authored <img>, else the `src` image, else initials, and tracks whether the image loaded.
9
- function connect(host) {
9
+ export function connect(host) {
10
10
  const element = host.element;
11
11
  const managed = host.refs.image;
12
12
  let active;
@@ -51,8 +51,3 @@ function connect(host) {
51
51
  active?.removeEventListener("error", onError);
52
52
  };
53
53
  }
54
-
55
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
56
- export default function controller(host) {
57
- host.on("connect", () => connect(host));
58
- }
@@ -1,4 +1,4 @@
1
- <template component="ui-avatar-group" controller="./ui-avatar-group.js">
1
+ <template component="ui-avatar-group" module="./ui-avatar-group.js">
2
2
  <defs>
3
3
  <prop name="max" type="number" default="5"
4
4
  >How many avatars to show. The rest are hidden and counted in a +N badge after the last visible one. Fractions round down, and 0 hides every avatar behind
@@ -1,6 +1,6 @@
1
1
  // Hides avatars beyond `max`, counts them into the "+N" badge, and overlaps the rest. Projected
2
2
  // avatars are component roots, which this component's styles do not reach, so the overlap is inline.
3
- function connect(host) {
3
+ export function connect(host) {
4
4
  const element = host.element;
5
5
  const update = () => {
6
6
  const max = Number(host.props.max.value);
@@ -31,8 +31,3 @@ function connect(host) {
31
31
  observer.disconnect();
32
32
  };
33
33
  }
34
-
35
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
36
- export default function controller(host) {
37
- host.on("connect", () => connect(host));
38
- }
@@ -1,6 +1,6 @@
1
1
  <link rel="component" href="../ui-spinner/ui-spinner.html">
2
2
  <link rel="component" href="../ui-icon/ui-icon.html">
3
- <template component="ui-button" controller="./ui-button.js">
3
+ <template component="ui-button" module="./ui-button.js">
4
4
  <defs>
5
5
  <prop name="variant" type="keyword" values="outline, solid, danger, ghost, link, card, field" default="outline"
6
6
  >Emphasis: how loudly the button asks. solid fills with its tone, outline draws its tone at the edge over a wash of it, ghost carries only text until it is
@@ -1,5 +1,5 @@
1
1
  // Loading actions retain focus but cannot activate, navigate, submit, or notify click consumers.
2
- function connect(host) {
2
+ export function connect(host) {
3
3
  const onClick = (event) => {
4
4
  if (!host.props.loading.value && !host.props.pending.value) return;
5
5
  event.preventDefault();
@@ -8,8 +8,3 @@ function connect(host) {
8
8
  host.element.addEventListener("click", onClick, true);
9
9
  return () => host.element.removeEventListener("click", onClick, true);
10
10
  }
11
-
12
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
13
- export default function controller(host) {
14
- host.on("connect", () => connect(host));
15
- }
@@ -1,4 +1,4 @@
1
- <template component="ui-checkbox" controller="./ui-checkbox.js">
1
+ <template component="ui-checkbox" module="./ui-checkbox.js">
2
2
  <defs>
3
3
  <prop name="label" type="string" default="">An accessible name for a checkbox without a visible label slot. It names the native input.</prop>
4
4
  <prop name="checked" type="boolean" default="false"
@@ -5,7 +5,7 @@ import { trackTrigger } from "../shared/trigger.js";
5
5
  // `checked` sets the control initially and whenever it changes; the user's changes update the state.
6
6
  // A form reset returns the control to `checked`. Vue writes the checked attribute on every render, so
7
7
  // the native default alone cannot hold it there.
8
- function connect(host) {
8
+ export function connect(host) {
9
9
  const input = host.refs.input;
10
10
  describeInput(input, host.refs.description);
11
11
  const [trigger, stopTracking] = trackTrigger(host);
@@ -33,8 +33,3 @@ function connect(host) {
33
33
  input.removeEventListener("change", onChange);
34
34
  };
35
35
  }
36
-
37
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
38
- export default function controller(host) {
39
- host.on("connect", () => connect(host));
40
- }
@@ -1,6 +1,6 @@
1
1
  <link rel="component" href="../ui-badge/ui-badge.html">
2
2
  <link rel="component" href="../ui-tooltip/ui-tooltip.html">
3
- <template component="ui-combobox" controller="./ui-combobox.js">
3
+ <template component="ui-combobox" module="./ui-combobox.js">
4
4
  <defs>
5
5
  <prop name="label" type="string" default=""
6
6
  >The field's label, tied to its input and shown above it; required adds an asterisk. It also names the suggestion list. Pair it with
@@ -21,7 +21,7 @@ function authoredOptions(container) {
21
21
  });
22
22
  }
23
23
 
24
- function connect(host) {
24
+ export function connect(host) {
25
25
  const element = host.element;
26
26
  const document = element.ownerDocument;
27
27
  const uid = `ui-combobox-${++comboboxes}`;
@@ -580,8 +580,3 @@ function connect(host) {
580
580
  surface.destroy();
581
581
  };
582
582
  }
583
-
584
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
585
- export default function controller(host) {
586
- host.on("connect", () => connect(host));
587
- }
@@ -1,4 +1,4 @@
1
- <template component="ui-context-menu" controller="./ui-context-menu.js">
1
+ <template component="ui-context-menu" module="./ui-context-menu.js">
2
2
  <defs>
3
3
  <prop name="open" type="boolean" default="false">Whether the context menu is open initially or when set externally.</prop>
4
4
  <prop name="for" type="string" default="">ID of the element whose context click (right-click, long-press, Shift+F10, or the Menu key) opens the menu.</prop>
@@ -5,7 +5,7 @@ function disabled(item) {
5
5
  return item.getAttribute("aria-disabled") === "true" || item.hasAttribute("disabled") || item.getAttribute("disabled") === "true";
6
6
  }
7
7
 
8
- function connect(host) {
8
+ export function connect(host) {
9
9
  const element = host.element;
10
10
  const document = element.ownerDocument;
11
11
  const menuSurface = host.refs.menu;
@@ -157,8 +157,3 @@ function connect(host) {
157
157
  closeOverlay(document, overlayId);
158
158
  };
159
159
  }
160
-
161
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
162
- export default function controller(host) {
163
- host.on("connect", () => connect(host));
164
- }
@@ -1,5 +1,5 @@
1
1
  <link rel="component" href="../ui-scroll-area/ui-scroll-area.html">
2
- <template component="ui-dialog" controller="./ui-dialog.js">
2
+ <template component="ui-dialog" module="./ui-dialog.js">
3
3
  <defs>
4
4
  <prop name="open" type="boolean" default="false">Whether the dialog is open initially or when set externally.</prop>
5
5
  <prop name="modal" type="boolean" default="false"
@@ -54,7 +54,7 @@ function observeContentHeight(dialog, refs) {
54
54
  return { reset, destroy() { reset(); observer.disconnect(); motion.removeEventListener("change", onMotionChange); } };
55
55
  }
56
56
 
57
- function connect(host) {
57
+ export function connect(host) {
58
58
  const element = host.element;
59
59
  const document = element.ownerDocument;
60
60
  const dialog = element.localName === "dialog" ? element : element.querySelector("dialog");
@@ -186,8 +186,3 @@ function connect(host) {
186
186
  closeOverlay(document, overlayId);
187
187
  };
188
188
  }
189
-
190
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
191
- export default function controller(host) {
192
- host.on("connect", () => connect(host));
193
- }
@@ -1,4 +1,4 @@
1
- <template component="ui-disclosure" controller="./ui-disclosure.js">
1
+ <template component="ui-disclosure" module="./ui-disclosure.js">
2
2
  <defs>
3
3
  <prop name="density" type="keyword" values="comfortable, compact" default="comfortable"
4
4
  >Compact trades padding and type size for rows that fit more on screen.</prop>
@@ -34,7 +34,7 @@ function leaveGroup(document, name, member) {
34
34
  }
35
35
 
36
36
  // `open` sets the disclosure initially and whenever it changes; the trigger toggles the state.
37
- function connect(host) {
37
+ export function connect(host) {
38
38
  const document = host.element.ownerDocument;
39
39
  const [trigger, stopTracking] = trackTrigger(host);
40
40
  host.state.contentId = `ui-disclosure-${++disclosures}`;
@@ -119,8 +119,3 @@ function connect(host) {
119
119
  host.refs.panel.removeEventListener("beforematch", onBeforematch);
120
120
  };
121
121
  }
122
-
123
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
124
- export default function controller(host) {
125
- host.on("connect", () => connect(host));
126
- }
@@ -1,4 +1,4 @@
1
- <template component="ui-editable" controller="./ui-editable.js">
1
+ <template component="ui-editable" module="./ui-editable.js">
2
2
  <defs>
3
3
  <prop name="value" type="string" default=""
4
4
  >The displayed value, and the text the editor starts from. It is not a form field: nothing is submitted with a form, so a form that needs the value copies
@@ -3,7 +3,7 @@ function triggerFor(event) {
3
3
  }
4
4
 
5
5
  /** Owns the display/edit transition so authors only provide value and label. */
6
- function connect(host) {
6
+ export function connect(host) {
7
7
  const element = host.element;
8
8
  const document = element.ownerDocument;
9
9
  const { preview, input } = host.refs;
@@ -119,8 +119,3 @@ function connect(host) {
119
119
  document.removeEventListener("pointerdown", onDocumentPointerdown, true);
120
120
  };
121
121
  }
122
-
123
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
124
- export default function controller(host) {
125
- host.on("connect", () => connect(host));
126
- }
@@ -1,6 +1,6 @@
1
1
  <link rel="component" href="../ui-menu/ui-menu.html">
2
2
  <link rel="component" href="../ui-menu-item/ui-menu-item.html">
3
- <template component="ui-editor-block-actions" controller="./ui-editor-block-actions.js">
3
+ <template component="ui-editor-block-actions" module="./ui-editor-block-actions.js">
4
4
  <defs>
5
5
  <prop name="for" type="string" default="">The id of the button that opens the menu and anchors it.</prop>
6
6
  <prop name="placement" type="keyword" values="bottom-start, top-start" default="bottom-start"
@@ -1,5 +1,5 @@
1
1
  // Reports the menu's choice as a block action.
2
- function connect(host) {
2
+ export function connect(host) {
3
3
  const element = host.element;
4
4
  const onSelect = (event) => {
5
5
  if (event.target !== element && element.contains(event.target)) host.dispatch("action", { action: event.detail.value });
@@ -7,8 +7,3 @@ function connect(host) {
7
7
  element.addEventListener("select", onSelect);
8
8
  return () => element.removeEventListener("select", onSelect);
9
9
  }
10
-
11
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
12
- export default function controller(host) {
13
- host.on("connect", () => connect(host));
14
- }
@@ -2,7 +2,7 @@
2
2
  <link rel="component" href="../ui-input/ui-input.html">
3
3
  <link rel="component" href="../ui-radio-group/ui-radio-group.html">
4
4
  <link rel="component" href="../ui-swatch/ui-swatch.html">
5
- <template component="ui-editor-chip-editor" controller="./ui-editor-chip-editor.js">
5
+ <template component="ui-editor-chip-editor" module="./ui-editor-chip-editor.js">
6
6
  <defs>
7
7
  <prop name="label" type="string" default="">The chip's text, shown in the field as the reader edits it.</prop>
8
8
  <prop name="color" type="keyword" values="neutral, blue, green, yellow, red, purple" default="neutral">The chip's colour, checked among the swatches.</prop>
@@ -1,6 +1,6 @@
1
1
  // Reports the chip's text and colour as they change, and Enter or Escape in the text field as done.
2
2
  // A colour chosen with the pointer returns focus to the text; the arrow keys stay among the swatches.
3
- function connect(host) {
3
+ export function connect(host) {
4
4
  const element = host.element;
5
5
  const text = () => element.querySelector("[data-chip-label]");
6
6
  const onInput = (event) => {
@@ -26,8 +26,3 @@ function connect(host) {
26
26
  element.removeEventListener("keydown", onKeyDown);
27
27
  };
28
28
  }
29
-
30
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
31
- export default function controller(host) {
32
- host.on("connect", () => connect(host));
33
- }
@@ -1,5 +1,5 @@
1
1
  <link rel="component" href="../ui-combobox/ui-combobox.html">
2
- <template component="ui-editor-code-language" controller="./ui-editor-code-language.js">
2
+ <template component="ui-editor-code-language" module="./ui-editor-code-language.js">
3
3
  <defs>
4
4
  <prop name="value" type="string" default="auto">The code block's language, or auto to detect it.</prop>
5
5
  <prop name="languages" type="list(object({ value: string, label: string }))"
@@ -1,5 +1,5 @@
1
1
  // Reports a chosen language; typing a filter is not a choice.
2
- function connect(host) {
2
+ export function connect(host) {
3
3
  const element = host.element;
4
4
  const onValueChange = (event) => {
5
5
  if (event.target !== element && event.detail?.kind === "selection" && event.detail.value) host.dispatch("language", { value: event.detail.value });
@@ -7,8 +7,3 @@ function connect(host) {
7
7
  element.addEventListener("value-change", onValueChange);
8
8
  return () => element.removeEventListener("value-change", onValueChange);
9
9
  }
10
-
11
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
12
- export default function controller(host) {
13
- host.on("connect", () => connect(host));
14
- }
@@ -0,0 +1,57 @@
1
+ <link rel="component" href="../ui-stack/ui-stack.html">
2
+ <link rel="component" href="../ui-form-field/ui-form-field.html">
3
+ <link rel="component" href="../ui-input-group/ui-input-group.html">
4
+ <link rel="component" href="../ui-input/ui-input.html">
5
+ <link rel="component" href="../ui-textarea/ui-textarea.html">
6
+ <link rel="component" href="../ui-button/ui-button.html">
7
+ <template component="ui-editor-footnote-editor" module="./ui-editor-footnote-editor.js">
8
+ <defs>
9
+ <prop name="label" type="string" default="">The footnote's label, which its references and its note share, shown between [^ and ].</prop>
10
+ <prop name="note" type="string" default="">The note's text, shown in the note field, with each block of a longer note on its own line.</prop>
11
+ <prop name="editable" type="boolean" default="false"
12
+ >Whether the note's text can be edited here. A note with formatting or more than one block shows its text read-only; Go to note edits it in the
13
+ document.</prop>
14
+ <prop name="error" type="string" default="">Why the label field's label was not used. While set, the field is invalid and shows it.</prop>
15
+ <state name="base" type="string" value="ui-editor-footnote-editor"></state>
16
+ <event name="text" type="object">
17
+ <prop name="text" required type="string"></prop>
18
+ The note's text changed.
19
+ </event>
20
+ <event name="label" type="object">
21
+ <prop name="label" required type="string"></prop>
22
+ A new label was committed: the label field changed and lost focus, or Enter was pressed in it.
23
+ </event>
24
+ <event name="go" type="object">Go to note was pressed.</event>
25
+ <event name="done" type="object">Enter or Escape was pressed in a field, to close the editor and return to the reference.</event>
26
+ </defs>
27
+ <div role="dialog" aria-label="Edit footnote">
28
+ <ui-stack gap="s">
29
+ <ui-form-field from:invalid="$error != ''">
30
+ <label slot="label" from:for="concat($base, '-label')">Label</label>
31
+ <ui-input-group>
32
+ <span slot="prefix">[^</span>
33
+ <ui-input data-footnote-label from:id="concat($base, '-label')" size="sm" autocomplete="off" from:value="$label"></ui-input>
34
+ <span slot="suffix">]</span>
35
+ </ui-input-group>
36
+ <span slot="error">{$error}</span>
37
+ </ui-form-field>
38
+ <ui-form-field>
39
+ <label slot="label" from:for="concat($base, '-note')">Note</label>
40
+ <ui-input-group multiline>
41
+ <ui-textarea
42
+ data-footnote-note
43
+ from:id="concat($base, '-note')"
44
+ size="sm"
45
+ rows="2"
46
+ autosize
47
+ placeholder="Write the note"
48
+ from:readonly="not $editable"
49
+ from:value="$note"
50
+ ></ui-textarea>
51
+ <ui-button slot="action" size="sm" data-footnote-go>Go to note</ui-button>
52
+ </ui-input-group>
53
+ <span $if="not $editable" slot="help">This note has formatting, so it is edited in the document.</span>
54
+ </ui-form-field>
55
+ </ui-stack>
56
+ </div>
57
+ </template>
@@ -0,0 +1,38 @@
1
+ // Gives each editor its own field ids, reports the note's text as it changes and a label when it is
2
+ // committed, Go to note when pressed, and Enter or Escape in a field as done.
3
+ export function connect(host) {
4
+ const element = host.element;
5
+ if (host.state.base === "ui-editor-footnote-editor") host.state.base = `ui-editor-footnote-editor-${Math.random().toString(36).slice(2, 11)}`;
6
+ const within = (event, selector) => {
7
+ const match = event.target.closest?.(selector);
8
+ return match && element.contains(match) ? match : null;
9
+ };
10
+ const onInput = (event) => {
11
+ if (within(event, "[data-footnote-note]")) host.dispatch("text", { text: event.target.value });
12
+ };
13
+ const onChange = (event) => {
14
+ if (within(event, "[data-footnote-label]") && typeof event.target.value === "string") host.dispatch("label", { label: event.target.value.trim() });
15
+ };
16
+ const onClick = (event) => {
17
+ if (within(event, "[data-footnote-go]")) host.dispatch("go", {});
18
+ };
19
+ // The editor handles Enter and Escape itself, so the overlay around it does not also act on them.
20
+ const onKeyDown = (event) => {
21
+ const label = within(event, "[data-footnote-label]");
22
+ if ((event.key !== "Enter" && event.key !== "Escape") || !(label || within(event, "[data-footnote-note]"))) return;
23
+ event.preventDefault();
24
+ event.stopPropagation();
25
+ if (label && event.key === "Enter") host.dispatch("label", { label: event.target.value.trim() });
26
+ host.dispatch("done", {});
27
+ };
28
+ element.addEventListener("input", onInput);
29
+ element.addEventListener("change", onChange);
30
+ element.addEventListener("click", onClick);
31
+ element.addEventListener("keydown", onKeyDown);
32
+ return () => {
33
+ element.removeEventListener("input", onInput);
34
+ element.removeEventListener("change", onChange);
35
+ element.removeEventListener("click", onClick);
36
+ element.removeEventListener("keydown", onKeyDown);
37
+ };
38
+ }
@@ -9,7 +9,7 @@
9
9
  <link rel="component" href="../ui-input/ui-input.html">
10
10
  <link rel="component" href="../ui-cluster/ui-cluster.html">
11
11
  <link rel="component" href="../ui-button/ui-button.html">
12
- <template component="ui-editor-image-toolbar" controller="./ui-editor-image-toolbar.js">
12
+ <template component="ui-editor-image-toolbar" module="./ui-editor-image-toolbar.js">
13
13
  <defs>
14
14
  <prop name="placement" type="keyword" values="block, center, wrap-left, wrap-right" default="block"
15
15
  >How the selected image sits in the text; its command shows as pressed.</prop>
@@ -1,6 +1,6 @@
1
1
  // Gives each toolbar its own ids for its tooltips and description popover, reports placement,
2
2
  // description, and delete requests, and keeps the description draft tied to the image it opened for.
3
- function connect(host) {
3
+ export function connect(host) {
4
4
  const element = host.element;
5
5
  if (host.state.base === "ui-editor-image-toolbar") host.state.base = `ui-editor-image-toolbar-${Math.random().toString(36).slice(2, 11)}`;
6
6
  let target = null;
@@ -48,8 +48,3 @@ function connect(host) {
48
48
  element.removeEventListener("submit", onSubmit);
49
49
  };
50
50
  }
51
-
52
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
53
- export default function controller(host) {
54
- host.on("connect", () => connect(host));
55
- }
@@ -1,4 +1,4 @@
1
- <template component="ui-editor-insert-table-grid" controller="./ui-editor-insert-table-grid.js">
1
+ <template component="ui-editor-insert-table-grid" module="./ui-editor-insert-table-grid.js">
2
2
  <defs>
3
3
  <prop name="open" type="boolean" default="false">Whether the grid is shown.</prop>
4
4
  <prop name="maxRows" type="integer" default="8">The most rows the grid offers (at most 10).</prop>
@@ -4,7 +4,7 @@ function bounded(value, fallback) {
4
4
  }
5
5
 
6
6
  // Lays out the grid cells and inserts the chosen size by pointer or keyboard.
7
- function connect(host) {
7
+ export function connect(host) {
8
8
  const element = host.element;
9
9
  let selected = { rows: 3, cols: 3 };
10
10
  let preview = null;
@@ -103,8 +103,3 @@ function connect(host) {
103
103
  host.refs.header.removeEventListener("change", onChange);
104
104
  };
105
105
  }
106
-
107
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
108
- export default function controller(host) {
109
- host.on("connect", () => connect(host));
110
- }
@@ -6,7 +6,7 @@
6
6
  <link rel="component" href="../ui-button/ui-button.html">
7
7
  <link rel="component" href="../ui-icon-button/ui-icon-button.html">
8
8
  <link rel="component" href="../ui-tooltip/ui-tooltip.html">
9
- <template component="ui-editor-link-card" controller="./ui-editor-link-card.js">
9
+ <template component="ui-editor-link-card" module="./ui-editor-link-card.js">
10
10
  <defs>
11
11
  <prop name="href" type="string" default="">The link's destination, shown when there is no label.</prop>
12
12
  <prop name="openHref" type="string" default=""
@@ -1,6 +1,6 @@
1
1
  // Gives each card its own tooltip ids and reports edit and remove requests without taking focus
2
2
  // from the editor.
3
- function connect(host) {
3
+ export function connect(host) {
4
4
  const element = host.element;
5
5
  if (host.state.base === "ui-editor-link-card") host.state.base = `ui-editor-link-card-${Math.random().toString(36).slice(2, 11)}`;
6
6
  const action = (event) => {
@@ -20,8 +20,3 @@ function connect(host) {
20
20
  element.removeEventListener("click", onClick);
21
21
  };
22
22
  }
23
-
24
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
25
- export default function controller(host) {
26
- host.on("connect", () => connect(host));
27
- }
@@ -8,7 +8,7 @@
8
8
  <link rel="component" href="../ui-scroll-area/ui-scroll-area.html">
9
9
  <link rel="component" href="../ui-search-result-row/ui-search-result-row.html">
10
10
  <link rel="component" href="../ui-checkbox/ui-checkbox.html">
11
- <template component="ui-editor-link-form" controller="./ui-editor-link-form.js">
11
+ <template component="ui-editor-link-form" module="./ui-editor-link-form.js">
12
12
  <defs>
13
13
  <prop name="existing" type="boolean" default="false">Whether the link already exists, so the heading reads Edit link rather than Add link.</prop>
14
14
  <prop name="searchable" type="boolean" default="false"
@@ -1,6 +1,6 @@
1
1
  // Gives each form its own field ids, reports field changes and choices, saves on Enter in a field,
2
2
  // closes on Escape, and moves between the search field and its results with the arrow keys.
3
- function connect(host) {
3
+ export function connect(host) {
4
4
  const element = host.element;
5
5
  if (host.state.base === "ui-editor-link-form") host.state.base = `ui-editor-link-form-${Math.random().toString(36).slice(2, 11)}`;
6
6
  const within = (event, selector) => {
@@ -64,8 +64,3 @@ function connect(host) {
64
64
  element.removeEventListener("submit", onSubmit);
65
65
  };
66
66
  }
67
-
68
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
69
- export default function controller(host) {
70
- host.on("connect", () => connect(host));
71
- }
@@ -1,5 +1,5 @@
1
1
  <link rel="component" href="../ui-editor-mention-menu-item/ui-editor-mention-menu-item.html">
2
- <template component="ui-editor-mention-menu" controller="./ui-editor-mention-menu.js">
2
+ <template component="ui-editor-mention-menu" module="./ui-editor-mention-menu.js">
3
3
  <defs>
4
4
  <prop name="open" type="boolean" default="false">Whether the menu is open.</prop>
5
5
  <prop name="query" type="string" default="">The text typed after the @.</prop>
@@ -2,7 +2,7 @@ import { createViewportSurface } from "../shared/overlay.js";
2
2
  import { normalizeAnchor, positionMenu } from "../shared/editor.js";
3
3
 
4
4
  // Places the menu at the @ and derives its rows; the template renders them.
5
- function connect(host) {
5
+ export function connect(host) {
6
6
  const element = host.element;
7
7
  const authoredLabel = element.hasAttribute("aria-label") || element.hasAttribute("aria-labelledby");
8
8
  const place = () => {
@@ -66,8 +66,3 @@ function connect(host) {
66
66
  element.removeEventListener("mouseover", onMouseover);
67
67
  };
68
68
  }
69
-
70
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
71
- export default function controller(host) {
72
- host.on("connect", () => connect(host));
73
- }
@@ -1,7 +1,7 @@
1
1
  <link rel="component" href="../ui-icon/ui-icon.html">
2
2
  <link rel="component" href="../ui-editor-slash-menu-item/ui-editor-slash-menu-item.html">
3
3
  <link rel="component" href="../ui-editor-slash-menu-group/ui-editor-slash-menu-group.html">
4
- <template component="ui-editor-slash-menu" controller="./ui-editor-slash-menu.js">
4
+ <template component="ui-editor-slash-menu" module="./ui-editor-slash-menu.js">
5
5
  <defs>
6
6
  <prop name="open" type="boolean" default="false">Whether the menu is open.</prop>
7
7
  <prop name="query" type="string" default="">The text typed after the slash.</prop>
@@ -2,7 +2,7 @@ import { createViewportSurface } from "../shared/overlay.js";
2
2
  import { normalizeAnchor, positionMenu } from "../shared/editor.js";
3
3
 
4
4
  // Places the menu at the slash and tracks the highlighted item; the template renders the items.
5
- function connect(host) {
5
+ export function connect(host) {
6
6
  const element = host.element;
7
7
  const authoredLabel = element.hasAttribute("aria-label") || element.hasAttribute("aria-labelledby");
8
8
  const place = () => {
@@ -72,8 +72,3 @@ function connect(host) {
72
72
  element.removeEventListener("mouseover", onMouseover);
73
73
  };
74
74
  }
75
-
76
- /** Keep DOM setup and its cleanup tied to each connection, including reconnects. */
77
- export default function controller(host) {
78
- host.on("connect", () => connect(host));
79
- }
@@ -1,5 +1,5 @@
1
1
  <link rel="component" href="../ui-icon/ui-icon.html">
2
- <template component="ui-editor-table-context-menu" controller="./ui-editor-table-context-menu.js">
2
+ <template component="ui-editor-table-context-menu" module="./ui-editor-table-context-menu.js">
3
3
  <defs>
4
4
  <prop name="open" type="boolean" default="false">Shows the menu at the position owned by the editor integration.</prop>
5
5
  <prop name="scope" type="keyword" values="cell, row, column" default="cell">Keeps structure actions relevant to a cell, row handle, or column handle.</prop>