@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.
- package/dist/{chunk-G5AWV77V.js → chunk-WW7Y67EW.js} +32 -33
- package/dist/{chunk-M7FPK6GN.js → chunk-Z4W5W53T.js} +19 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/{positioning-D5q9DM-0.js → positioning-BiPpyC-_.js} +26 -0
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
- package/dist/cjs/ui-chip_2.cjs.entry.js +190 -498
- package/dist/cjs/ui-combobox.cjs.entry.js +708 -0
- package/dist/cjs/ui-context-menu.cjs.entry.js +2 -2
- package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ui-disclosure.cjs.entry.js +1 -1
- package/dist/cjs/ui-editable.cjs.entry.js +3 -3
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-form-field.cjs.entry.js +1 -1
- package/dist/cjs/ui-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-input.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu.cjs.entry.js +2 -2
- package/dist/cjs/ui-popover.cjs.entry.js +2 -2
- package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio.cjs.entry.js +1 -1
- package/dist/cjs/ui-search-result-row.cjs.entry.js +1 -1
- package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
- package/dist/cjs/ui-select.cjs.entry.js +1 -1
- package/dist/cjs/ui-switch.cjs.entry.js +2 -2
- package/dist/cjs/ui-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ui-toast-region.cjs.entry.js +2 -2
- package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
- package/dist/cjs/ui-tree-item.cjs.entry.js +2 -2
- package/dist/cjs/ui-tree.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/ui-combobox/ui-combobox.css +23 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +298 -21
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
- package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +1 -1
- package/dist/collection/components/ui-editable/ui-editable.js +3 -3
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
- package/dist/collection/components/ui-form-field/ui-form-field.js +1 -1
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
- package/dist/collection/components/ui-input/ui-input.js +1 -1
- package/dist/collection/components/ui-menu/ui-menu.js +1 -1
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
- package/dist/collection/components/ui-popover/ui-popover.js +1 -1
- package/dist/collection/components/ui-radio/ui-radio.js +1 -1
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
- package/dist/collection/components/ui-select/ui-select.js +1 -1
- package/dist/collection/components/ui-switch/ui-switch.js +2 -2
- package/dist/collection/components/ui-tabs/ui-tabs.js +1 -1
- package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +1 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/components/ui-tree/ui-tree.js +1 -1
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +2 -2
- package/dist/collection/overlay/positioning.js +26 -0
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +1 -1
- package/dist/components/p-BOC_l2hE.js +1 -0
- package/dist/components/{p-B1macZOS.js → p-Btk_75st.js} +1 -1
- package/dist/components/p-biKnomFl.js +1 -0
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-combobox.js +1 -1
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-disclosure.js +1 -1
- package/dist/components/ui-editable.js +1 -1
- package/dist/components/ui-floating-action-button.js +1 -1
- package/dist/components/ui-form-field.js +1 -1
- package/dist/components/ui-icon-button.js +1 -1
- package/dist/components/ui-input.js +1 -1
- package/dist/components/ui-menu-item.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-radio.js +1 -1
- package/dist/components/ui-search-result-row.js +1 -1
- package/dist/components/ui-search-shell.js +1 -1
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/components/ui-top-bar.js +1 -1
- package/dist/components/ui-tree-item.js +1 -1
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/{positioning-Drmwg-C1.js → positioning-Ig1jYhE1.js} +26 -0
- package/dist/esm/ui-affordance-scope.entry.js +1 -1
- package/dist/esm/ui-chip_2.entry.js +193 -501
- package/dist/esm/ui-combobox.entry.js +706 -0
- package/dist/esm/ui-context-menu.entry.js +2 -2
- package/dist/esm/ui-dialog.entry.js +1 -1
- package/dist/esm/ui-disclosure.entry.js +1 -1
- package/dist/esm/ui-editable.entry.js +3 -3
- package/dist/esm/ui-floating-action-button.entry.js +1 -1
- package/dist/esm/ui-form-field.entry.js +1 -1
- package/dist/esm/ui-icon-button.entry.js +1 -1
- package/dist/esm/ui-input.entry.js +1 -1
- package/dist/esm/ui-menu-item.entry.js +1 -1
- package/dist/esm/ui-menu.entry.js +2 -2
- package/dist/esm/ui-popover.entry.js +2 -2
- package/dist/esm/ui-radio-group.entry.js +1 -1
- package/dist/esm/ui-radio.entry.js +1 -1
- package/dist/esm/ui-search-result-row.entry.js +1 -1
- package/dist/esm/ui-search-shell.entry.js +1 -1
- package/dist/esm/ui-select.entry.js +1 -1
- package/dist/esm/ui-switch.entry.js +2 -2
- package/dist/esm/ui-tabs.entry.js +1 -1
- package/dist/esm/ui-textarea.entry.js +1 -1
- package/dist/esm/ui-toast-region.entry.js +2 -2
- package/dist/esm/ui-top-bar.entry.js +1 -1
- package/dist/esm/ui-tree-item.entry.js +2 -2
- package/dist/esm/ui-tree.entry.js +1 -1
- package/dist/index.cjs +516 -524
- package/dist/index.js +19 -2
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/{p-32c85198.entry.js → p-08c9e253.entry.js} +1 -1
- package/dist/looma/{p-88e61cab.entry.js → p-0fa7062f.entry.js} +1 -1
- package/dist/looma/{p-9a82c523.entry.js → p-1249a806.entry.js} +1 -1
- package/dist/looma/p-172d67ff.entry.js +1 -0
- package/dist/looma/p-1c00670f.entry.js +1 -0
- package/dist/looma/p-22842f8c.entry.js +1 -0
- package/dist/looma/{p-1e1de77f.entry.js → p-2915d5c0.entry.js} +1 -1
- package/dist/looma/{p-2f3c1b57.entry.js → p-3b2961a6.entry.js} +1 -1
- package/dist/looma/{p-e07e6ac2.entry.js → p-3f60f4c8.entry.js} +1 -1
- package/dist/looma/p-3fba3edd.entry.js +1 -0
- package/dist/looma/{p-9551ebf6.entry.js → p-424d6719.entry.js} +1 -1
- package/dist/looma/p-4354f48f.entry.js +1 -0
- package/dist/looma/{p-6cc3180b.entry.js → p-4caccfce.entry.js} +1 -1
- package/dist/looma/{p-f431dc13.entry.js → p-6f20d470.entry.js} +1 -1
- package/dist/looma/{p-b68762f2.entry.js → p-7c0b5364.entry.js} +1 -1
- package/dist/looma/p-7ebbe74e.entry.js +1 -0
- package/dist/looma/{p-e82f104c.entry.js → p-8bdd9495.entry.js} +1 -1
- package/dist/looma/{p-df696cca.entry.js → p-9cfbf722.entry.js} +1 -1
- package/dist/looma/p-Ig1jYhE1.js +1 -0
- package/dist/looma/{p-607c3056.entry.js → p-b6ede6bb.entry.js} +1 -1
- package/dist/looma/{p-da6e2d01.entry.js → p-b76e2111.entry.js} +1 -1
- package/dist/looma/{p-1a12eb5c.entry.js → p-d372b0db.entry.js} +1 -1
- package/dist/looma/{p-20387ffa.entry.js → p-d4825822.entry.js} +1 -1
- package/dist/looma/{p-8a5e3fe1.entry.js → p-d5c3954f.entry.js} +1 -1
- package/dist/looma/{p-4f68f939.entry.js → p-e604e906.entry.js} +1 -1
- package/dist/looma/p-ec1c02e5.entry.js +1 -0
- package/dist/looma/{p-e406656e.entry.js → p-f1f7c5cb.entry.js} +1 -1
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +35 -4
- package/dist/types/components.d.ts +56 -153
- package/dist/{ui-affordance-scope.entry-X5526PRP.js → ui-affordance-scope.entry-FENYADN3.js} +2 -2
- package/dist/{ui-avatar-group.entry-U72MPB5K.js → ui-avatar-group.entry-K7D6QKDP.js} +1 -1
- package/dist/{ui-avatar.entry-OC4J3LTV.js → ui-avatar.entry-WCYFUQZT.js} +1 -1
- package/dist/{ui-badge.entry-4MSUQRQV.js → ui-badge.entry-VZC4LONR.js} +1 -1
- package/dist/{ui-button.entry-22DESWN4.js → ui-button.entry-7E2KMPRF.js} +1 -1
- package/dist/{ui-callout.entry-LOGODDM5.js → ui-callout.entry-7WXQ47S6.js} +1 -1
- package/dist/{ui-checkbox.entry-XAGW3BW4.js → ui-checkbox.entry-GTSEB7ZS.js} +1 -1
- package/dist/{ui-tooltip.entry-AQ6UPBUP.js → ui-chip_2.entry-PG24H67I.js} +19 -4
- package/dist/{ui-chip_2.entry-JCPHPXAG.js → ui-combobox.entry-NTCOCZOH.js} +170 -31
- package/dist/{ui-context-menu.entry-24YOHF7L.js → ui-context-menu.entry-7GSDWHTP.js} +3 -3
- package/dist/{ui-dialog.entry-XKNYDWOQ.js → ui-dialog.entry-F53O6FBQ.js} +2 -2
- package/dist/{ui-disclosure.entry-2AWCGZ4C.js → ui-disclosure.entry-YWJA42GQ.js} +2 -2
- package/dist/{ui-editable.entry-HLEWO7BN.js → ui-editable.entry-3QPCWDPM.js} +3 -3
- package/dist/{ui-floating-action-button.entry-2NJDB4YN.js → ui-floating-action-button.entry-L4UC6RFM.js} +2 -2
- package/dist/{ui-form-field.entry-FJ5HYCTN.js → ui-form-field.entry-2VCITLQA.js} +2 -2
- package/dist/{ui-icon-button.entry-YZHJQ5YR.js → ui-icon-button.entry-MRRA6NVP.js} +2 -2
- package/dist/{ui-input.entry-JMBLMNP6.js → ui-input.entry-7LYLUJNT.js} +2 -2
- package/dist/{ui-menu-item.entry-VBGXM66D.js → ui-menu-item.entry-YHSIKO5W.js} +2 -2
- package/dist/{ui-menu.entry-I2N5H3YC.js → ui-menu.entry-ZQBF7B4T.js} +3 -3
- package/dist/{ui-popover.entry-7JRSJM5S.js → ui-popover.entry-2HG5ZWQX.js} +3 -3
- package/dist/{ui-radio-group.entry-Q2XB7P3B.js → ui-radio-group.entry-A6LI3KHW.js} +2 -2
- package/dist/{ui-radio.entry-NJO4NA4M.js → ui-radio.entry-WBCZZG5D.js} +2 -2
- package/dist/{ui-search-result-row.entry-RPMNDSRN.js → ui-search-result-row.entry-P25POOYP.js} +2 -2
- package/dist/{ui-search-shell.entry-FMIMYD3B.js → ui-search-shell.entry-R6IVRPSW.js} +2 -2
- package/dist/{ui-select.entry-7NDBWNAU.js → ui-select.entry-CAAGCELJ.js} +2 -2
- package/dist/{ui-switch.entry-YUCPIZE4.js → ui-switch.entry-SKU445KH.js} +3 -3
- package/dist/{ui-tabs.entry-FXZWV665.js → ui-tabs.entry-7BQPZEH3.js} +2 -2
- package/dist/{ui-textarea.entry-HHLQR5GG.js → ui-textarea.entry-OFC4YUU7.js} +2 -2
- package/dist/{ui-toast-region.entry-PIIBHNYA.js → ui-toast-region.entry-7VNTFVDO.js} +3 -3
- package/dist/{ui-top-bar.entry-S2L7ZM4U.js → ui-top-bar.entry-2N3EKMVF.js} +2 -2
- package/dist/{ui-tree-item.entry-UID7IJPA.js → ui-tree-item.entry-SLHAE42A.js} +3 -3
- package/dist/{ui-tree.entry-UMD3DNG5.js → ui-tree.entry-LF45JUC4.js} +2 -2
- package/package.json +1 -1
- package/vue/{chunk-2DDIBSFD.js → chunk-ROMBQS2L.js} +32 -89
- package/vue/editor/index.js +1 -1
- package/vue/index.d.ts +30 -107
- package/vue/index.js +1 -3
- package/dist/cjs/ui-multi-combobox.cjs.entry.js +0 -190
- package/dist/cjs/ui-tooltip.cjs.entry.js +0 -241
- package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.css +0 -33
- package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.js +0 -553
- package/dist/components/p-DiyiodGX.js +0 -1
- package/dist/components/p-Drw41pSY.js +0 -1
- package/dist/components/p-d5fk1vBI.js +0 -1
- package/dist/components/ui-multi-combobox.d.ts +0 -11
- package/dist/components/ui-multi-combobox.js +0 -1
- package/dist/esm/ui-multi-combobox.entry.js +0 -188
- package/dist/esm/ui-tooltip.entry.js +0 -239
- package/dist/looma/p-071c139c.entry.js +0 -1
- package/dist/looma/p-311e54d4.entry.js +0 -1
- package/dist/looma/p-3957f7ef.entry.js +0 -1
- package/dist/looma/p-4a10a875.entry.js +0 -1
- package/dist/looma/p-4fc9917f.entry.js +0 -1
- package/dist/looma/p-63a9159f.entry.js +0 -1
- package/dist/looma/p-82de1112.entry.js +0 -1
- package/dist/looma/p-Drmwg-C1.js +0 -1
- package/dist/looma/p-caa37be2.entry.js +0 -1
- package/dist/types/components/ui-multi-combobox/ui-multi-combobox.d.ts +0 -51
- 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-
|
|
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
|
|