@threadlabs/looma 0.1.28 → 0.2.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 (210) hide show
  1. package/dist/{chunk-G5AWV77V.js → chunk-WW7Y67EW.js} +32 -33
  2. package/dist/{chunk-M7FPK6GN.js → chunk-Z4W5W53T.js} +19 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/looma.cjs.js +1 -1
  5. package/dist/cjs/{positioning-D5q9DM-0.js → positioning-BiPpyC-_.js} +26 -0
  6. package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
  7. package/dist/cjs/ui-chip_2.cjs.entry.js +190 -498
  8. package/dist/cjs/ui-combobox.cjs.entry.js +708 -0
  9. package/dist/cjs/ui-context-menu.cjs.entry.js +2 -2
  10. package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/ui-disclosure.cjs.entry.js +1 -1
  12. package/dist/cjs/ui-editable.cjs.entry.js +3 -3
  13. package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
  14. package/dist/cjs/ui-form-field.cjs.entry.js +1 -1
  15. package/dist/cjs/ui-icon-button.cjs.entry.js +1 -1
  16. package/dist/cjs/ui-input.cjs.entry.js +1 -1
  17. package/dist/cjs/ui-menu-item.cjs.entry.js +1 -1
  18. package/dist/cjs/ui-menu.cjs.entry.js +2 -2
  19. package/dist/cjs/ui-popover.cjs.entry.js +2 -2
  20. package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
  21. package/dist/cjs/ui-radio.cjs.entry.js +1 -1
  22. package/dist/cjs/ui-search-result-row.cjs.entry.js +1 -1
  23. package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
  24. package/dist/cjs/ui-select.cjs.entry.js +1 -1
  25. package/dist/cjs/ui-switch.cjs.entry.js +2 -2
  26. package/dist/cjs/ui-tabs.cjs.entry.js +1 -1
  27. package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
  28. package/dist/cjs/ui-toast-region.cjs.entry.js +2 -2
  29. package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/ui-tree-item.cjs.entry.js +2 -2
  31. package/dist/cjs/ui-tree.cjs.entry.js +1 -1
  32. package/dist/collection/collection-manifest.json +0 -1
  33. package/dist/collection/components/ui-combobox/ui-combobox.css +23 -0
  34. package/dist/collection/components/ui-combobox/ui-combobox.js +298 -21
  35. package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
  36. package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
  37. package/dist/collection/components/ui-disclosure/ui-disclosure.js +1 -1
  38. package/dist/collection/components/ui-editable/ui-editable.js +3 -3
  39. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
  40. package/dist/collection/components/ui-form-field/ui-form-field.js +1 -1
  41. package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
  42. package/dist/collection/components/ui-input/ui-input.js +1 -1
  43. package/dist/collection/components/ui-menu/ui-menu.js +1 -1
  44. package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
  45. package/dist/collection/components/ui-popover/ui-popover.js +1 -1
  46. package/dist/collection/components/ui-radio/ui-radio.js +1 -1
  47. package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
  48. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
  49. package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
  50. package/dist/collection/components/ui-select/ui-select.js +1 -1
  51. package/dist/collection/components/ui-switch/ui-switch.js +2 -2
  52. package/dist/collection/components/ui-tabs/ui-tabs.js +1 -1
  53. package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
  54. package/dist/collection/components/ui-toast-region/ui-toast-region.js +1 -1
  55. package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
  56. package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
  57. package/dist/collection/components/ui-tree/ui-tree.js +1 -1
  58. package/dist/collection/components/ui-tree-item/ui-tree-item.js +2 -2
  59. package/dist/collection/overlay/positioning.js +26 -0
  60. package/dist/components/index.d.ts +0 -2
  61. package/dist/components/index.js +1 -1
  62. package/dist/components/p-BOC_l2hE.js +1 -0
  63. package/dist/components/{p-B1macZOS.js → p-Btk_75st.js} +1 -1
  64. package/dist/components/p-biKnomFl.js +1 -0
  65. package/dist/components/ui-affordance-scope.js +1 -1
  66. package/dist/components/ui-combobox.js +1 -1
  67. package/dist/components/ui-context-menu.js +1 -1
  68. package/dist/components/ui-dialog.js +1 -1
  69. package/dist/components/ui-disclosure.js +1 -1
  70. package/dist/components/ui-editable.js +1 -1
  71. package/dist/components/ui-floating-action-button.js +1 -1
  72. package/dist/components/ui-form-field.js +1 -1
  73. package/dist/components/ui-icon-button.js +1 -1
  74. package/dist/components/ui-input.js +1 -1
  75. package/dist/components/ui-menu-item.js +1 -1
  76. package/dist/components/ui-menu.js +1 -1
  77. package/dist/components/ui-popover.js +1 -1
  78. package/dist/components/ui-radio-group.js +1 -1
  79. package/dist/components/ui-radio.js +1 -1
  80. package/dist/components/ui-search-result-row.js +1 -1
  81. package/dist/components/ui-search-shell.js +1 -1
  82. package/dist/components/ui-select.js +1 -1
  83. package/dist/components/ui-switch.js +1 -1
  84. package/dist/components/ui-tabs.js +1 -1
  85. package/dist/components/ui-textarea.js +1 -1
  86. package/dist/components/ui-toast-region.js +1 -1
  87. package/dist/components/ui-tooltip.js +1 -1
  88. package/dist/components/ui-top-bar.js +1 -1
  89. package/dist/components/ui-tree-item.js +1 -1
  90. package/dist/components/ui-tree.js +1 -1
  91. package/dist/esm/loader.js +1 -1
  92. package/dist/esm/looma.js +1 -1
  93. package/dist/esm/{positioning-Drmwg-C1.js → positioning-Ig1jYhE1.js} +26 -0
  94. package/dist/esm/ui-affordance-scope.entry.js +1 -1
  95. package/dist/esm/ui-chip_2.entry.js +193 -501
  96. package/dist/esm/ui-combobox.entry.js +706 -0
  97. package/dist/esm/ui-context-menu.entry.js +2 -2
  98. package/dist/esm/ui-dialog.entry.js +1 -1
  99. package/dist/esm/ui-disclosure.entry.js +1 -1
  100. package/dist/esm/ui-editable.entry.js +3 -3
  101. package/dist/esm/ui-floating-action-button.entry.js +1 -1
  102. package/dist/esm/ui-form-field.entry.js +1 -1
  103. package/dist/esm/ui-icon-button.entry.js +1 -1
  104. package/dist/esm/ui-input.entry.js +1 -1
  105. package/dist/esm/ui-menu-item.entry.js +1 -1
  106. package/dist/esm/ui-menu.entry.js +2 -2
  107. package/dist/esm/ui-popover.entry.js +2 -2
  108. package/dist/esm/ui-radio-group.entry.js +1 -1
  109. package/dist/esm/ui-radio.entry.js +1 -1
  110. package/dist/esm/ui-search-result-row.entry.js +1 -1
  111. package/dist/esm/ui-search-shell.entry.js +1 -1
  112. package/dist/esm/ui-select.entry.js +1 -1
  113. package/dist/esm/ui-switch.entry.js +2 -2
  114. package/dist/esm/ui-tabs.entry.js +1 -1
  115. package/dist/esm/ui-textarea.entry.js +1 -1
  116. package/dist/esm/ui-toast-region.entry.js +2 -2
  117. package/dist/esm/ui-top-bar.entry.js +1 -1
  118. package/dist/esm/ui-tree-item.entry.js +2 -2
  119. package/dist/esm/ui-tree.entry.js +1 -1
  120. package/dist/index.cjs +516 -524
  121. package/dist/index.js +19 -2
  122. package/dist/looma/looma.esm.js +1 -1
  123. package/dist/looma/{p-32c85198.entry.js → p-08c9e253.entry.js} +1 -1
  124. package/dist/looma/{p-88e61cab.entry.js → p-0fa7062f.entry.js} +1 -1
  125. package/dist/looma/{p-9a82c523.entry.js → p-1249a806.entry.js} +1 -1
  126. package/dist/looma/p-172d67ff.entry.js +1 -0
  127. package/dist/looma/p-1c00670f.entry.js +1 -0
  128. package/dist/looma/p-22842f8c.entry.js +1 -0
  129. package/dist/looma/{p-1e1de77f.entry.js → p-2915d5c0.entry.js} +1 -1
  130. package/dist/looma/{p-2f3c1b57.entry.js → p-3b2961a6.entry.js} +1 -1
  131. package/dist/looma/{p-e07e6ac2.entry.js → p-3f60f4c8.entry.js} +1 -1
  132. package/dist/looma/p-3fba3edd.entry.js +1 -0
  133. package/dist/looma/{p-9551ebf6.entry.js → p-424d6719.entry.js} +1 -1
  134. package/dist/looma/p-4354f48f.entry.js +1 -0
  135. package/dist/looma/{p-6cc3180b.entry.js → p-4caccfce.entry.js} +1 -1
  136. package/dist/looma/{p-f431dc13.entry.js → p-6f20d470.entry.js} +1 -1
  137. package/dist/looma/{p-b68762f2.entry.js → p-7c0b5364.entry.js} +1 -1
  138. package/dist/looma/p-7ebbe74e.entry.js +1 -0
  139. package/dist/looma/{p-e82f104c.entry.js → p-8bdd9495.entry.js} +1 -1
  140. package/dist/looma/{p-df696cca.entry.js → p-9cfbf722.entry.js} +1 -1
  141. package/dist/looma/p-Ig1jYhE1.js +1 -0
  142. package/dist/looma/{p-607c3056.entry.js → p-b6ede6bb.entry.js} +1 -1
  143. package/dist/looma/{p-da6e2d01.entry.js → p-b76e2111.entry.js} +1 -1
  144. package/dist/looma/{p-1a12eb5c.entry.js → p-d372b0db.entry.js} +1 -1
  145. package/dist/looma/{p-20387ffa.entry.js → p-d4825822.entry.js} +1 -1
  146. package/dist/looma/{p-8a5e3fe1.entry.js → p-d5c3954f.entry.js} +1 -1
  147. package/dist/looma/{p-4f68f939.entry.js → p-e604e906.entry.js} +1 -1
  148. package/dist/looma/p-ec1c02e5.entry.js +1 -0
  149. package/dist/looma/{p-e406656e.entry.js → p-f1f7c5cb.entry.js} +1 -1
  150. package/dist/types/components/ui-combobox/ui-combobox.d.ts +35 -4
  151. package/dist/types/components.d.ts +56 -153
  152. package/dist/{ui-affordance-scope.entry-X5526PRP.js → ui-affordance-scope.entry-FENYADN3.js} +2 -2
  153. package/dist/{ui-avatar-group.entry-U72MPB5K.js → ui-avatar-group.entry-K7D6QKDP.js} +1 -1
  154. package/dist/{ui-avatar.entry-OC4J3LTV.js → ui-avatar.entry-WCYFUQZT.js} +1 -1
  155. package/dist/{ui-badge.entry-4MSUQRQV.js → ui-badge.entry-VZC4LONR.js} +1 -1
  156. package/dist/{ui-button.entry-22DESWN4.js → ui-button.entry-7E2KMPRF.js} +1 -1
  157. package/dist/{ui-callout.entry-LOGODDM5.js → ui-callout.entry-7WXQ47S6.js} +1 -1
  158. package/dist/{ui-checkbox.entry-XAGW3BW4.js → ui-checkbox.entry-GTSEB7ZS.js} +1 -1
  159. package/dist/{ui-tooltip.entry-AQ6UPBUP.js → ui-chip_2.entry-PG24H67I.js} +19 -4
  160. package/dist/{ui-chip_2.entry-JCPHPXAG.js → ui-combobox.entry-NTCOCZOH.js} +170 -31
  161. package/dist/{ui-context-menu.entry-24YOHF7L.js → ui-context-menu.entry-7GSDWHTP.js} +3 -3
  162. package/dist/{ui-dialog.entry-XKNYDWOQ.js → ui-dialog.entry-F53O6FBQ.js} +2 -2
  163. package/dist/{ui-disclosure.entry-2AWCGZ4C.js → ui-disclosure.entry-YWJA42GQ.js} +2 -2
  164. package/dist/{ui-editable.entry-HLEWO7BN.js → ui-editable.entry-3QPCWDPM.js} +3 -3
  165. package/dist/{ui-floating-action-button.entry-2NJDB4YN.js → ui-floating-action-button.entry-L4UC6RFM.js} +2 -2
  166. package/dist/{ui-form-field.entry-FJ5HYCTN.js → ui-form-field.entry-2VCITLQA.js} +2 -2
  167. package/dist/{ui-icon-button.entry-YZHJQ5YR.js → ui-icon-button.entry-MRRA6NVP.js} +2 -2
  168. package/dist/{ui-input.entry-JMBLMNP6.js → ui-input.entry-7LYLUJNT.js} +2 -2
  169. package/dist/{ui-menu-item.entry-VBGXM66D.js → ui-menu-item.entry-YHSIKO5W.js} +2 -2
  170. package/dist/{ui-menu.entry-I2N5H3YC.js → ui-menu.entry-ZQBF7B4T.js} +3 -3
  171. package/dist/{ui-popover.entry-7JRSJM5S.js → ui-popover.entry-2HG5ZWQX.js} +3 -3
  172. package/dist/{ui-radio-group.entry-Q2XB7P3B.js → ui-radio-group.entry-A6LI3KHW.js} +2 -2
  173. package/dist/{ui-radio.entry-NJO4NA4M.js → ui-radio.entry-WBCZZG5D.js} +2 -2
  174. package/dist/{ui-search-result-row.entry-RPMNDSRN.js → ui-search-result-row.entry-P25POOYP.js} +2 -2
  175. package/dist/{ui-search-shell.entry-FMIMYD3B.js → ui-search-shell.entry-R6IVRPSW.js} +2 -2
  176. package/dist/{ui-select.entry-7NDBWNAU.js → ui-select.entry-CAAGCELJ.js} +2 -2
  177. package/dist/{ui-switch.entry-YUCPIZE4.js → ui-switch.entry-SKU445KH.js} +3 -3
  178. package/dist/{ui-tabs.entry-FXZWV665.js → ui-tabs.entry-7BQPZEH3.js} +2 -2
  179. package/dist/{ui-textarea.entry-HHLQR5GG.js → ui-textarea.entry-OFC4YUU7.js} +2 -2
  180. package/dist/{ui-toast-region.entry-PIIBHNYA.js → ui-toast-region.entry-7VNTFVDO.js} +3 -3
  181. package/dist/{ui-top-bar.entry-S2L7ZM4U.js → ui-top-bar.entry-2N3EKMVF.js} +2 -2
  182. package/dist/{ui-tree-item.entry-UID7IJPA.js → ui-tree-item.entry-SLHAE42A.js} +3 -3
  183. package/dist/{ui-tree.entry-UMD3DNG5.js → ui-tree.entry-LF45JUC4.js} +2 -2
  184. package/package.json +1 -1
  185. package/vue/{chunk-2DDIBSFD.js → chunk-ROMBQS2L.js} +32 -89
  186. package/vue/editor/index.js +1 -1
  187. package/vue/index.d.ts +30 -107
  188. package/vue/index.js +1 -3
  189. package/dist/cjs/ui-multi-combobox.cjs.entry.js +0 -190
  190. package/dist/cjs/ui-tooltip.cjs.entry.js +0 -241
  191. package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.css +0 -33
  192. package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.js +0 -553
  193. package/dist/components/p-DiyiodGX.js +0 -1
  194. package/dist/components/p-Drw41pSY.js +0 -1
  195. package/dist/components/p-d5fk1vBI.js +0 -1
  196. package/dist/components/ui-multi-combobox.d.ts +0 -11
  197. package/dist/components/ui-multi-combobox.js +0 -1
  198. package/dist/esm/ui-multi-combobox.entry.js +0 -188
  199. package/dist/esm/ui-tooltip.entry.js +0 -239
  200. package/dist/looma/p-071c139c.entry.js +0 -1
  201. package/dist/looma/p-311e54d4.entry.js +0 -1
  202. package/dist/looma/p-3957f7ef.entry.js +0 -1
  203. package/dist/looma/p-4a10a875.entry.js +0 -1
  204. package/dist/looma/p-4fc9917f.entry.js +0 -1
  205. package/dist/looma/p-63a9159f.entry.js +0 -1
  206. package/dist/looma/p-82de1112.entry.js +0 -1
  207. package/dist/looma/p-Drmwg-C1.js +0 -1
  208. package/dist/looma/p-caa37be2.entry.js +0 -1
  209. package/dist/types/components/ui-multi-combobox/ui-multi-combobox.d.ts +0 -51
  210. package/dist/ui-multi-combobox.entry-MEX7MU7P.js +0 -196
@@ -131,6 +131,22 @@ function createAnchoredSurface(surface, options = {}) {
131
131
  let open = false;
132
132
  let frame = null;
133
133
  let listenerAbort = null;
134
+ let sizeObserver = null;
135
+ // The surface can enter the top layer before its content has laid out (a
136
+ // menu's items, a tooltip's text), so its measured size is briefly zero or
137
+ // stale and the viewport clamp would run against the wrong geometry. Re-run
138
+ // positioning whenever the surface's own size settles.
139
+ const ResizeObserverImpl = owner.ResizeObserver;
140
+ const observeSurfaceSize = () => {
141
+ if (sizeObserver || typeof ResizeObserverImpl !== "function")
142
+ return;
143
+ sizeObserver = new ResizeObserverImpl(() => schedule());
144
+ sizeObserver.observe(surface);
145
+ };
146
+ const stopObservingSurfaceSize = () => {
147
+ sizeObserver?.disconnect();
148
+ sizeObserver = null;
149
+ };
134
150
  surface.setAttribute("popover", "manual");
135
151
  surface.dataset.uiPositioning = nativeAnchor ? "anchor" : "fallback";
136
152
  surface.style.position = "fixed";
@@ -217,6 +233,12 @@ function createAnchoredSurface(surface, options = {}) {
217
233
  syncFallbackListeners();
218
234
  showInTopLayer(surface);
219
235
  position();
236
+ // The surface has just entered the top layer and may not be laid out yet,
237
+ // so the first position() can measure a zero/stale size and skip the
238
+ // viewport clamp. Re-position on the next frame, and keep re-positioning
239
+ // while the surface's own size settles as its content renders.
240
+ schedule();
241
+ observeSurfaceSize();
220
242
  },
221
243
  showAtPoint(nextPoint) {
222
244
  point = nextPoint;
@@ -224,11 +246,14 @@ function createAnchoredSurface(surface, options = {}) {
224
246
  syncFallbackListeners();
225
247
  showInTopLayer(surface);
226
248
  position();
249
+ schedule();
250
+ observeSurfaceSize();
227
251
  },
228
252
  hide() {
229
253
  open = false;
230
254
  point = null;
231
255
  syncFallbackListeners();
256
+ stopObservingSurfaceSize();
232
257
  if (frame !== null)
233
258
  owner.cancelAnimationFrame(frame);
234
259
  frame = null;
@@ -239,6 +264,7 @@ function createAnchoredSurface(surface, options = {}) {
239
264
  open = false;
240
265
  listenerAbort?.abort();
241
266
  listenerAbort = null;
267
+ stopObservingSurfaceSize();
242
268
  if (frame !== null)
243
269
  owner.cancelAnimationFrame(frame);
244
270
  frame = null;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, g as getElement, h, H as Host } from './index-8BGiMGQ0.js';
2
- import { D as DEFAULT_AFFORDANCE_NEAR_RADIUS, c as createProximityCoordinator } from './positioning-Drmwg-C1.js';
2
+ import { D as DEFAULT_AFFORDANCE_NEAR_RADIUS, c as createProximityCoordinator } from './positioning-Ig1jYhE1.js';
3
3
 
4
4
  const uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
5
5