@threadlabs/looma 0.1.27 → 0.2.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.
- package/dist/{chunk-RLELJVBL.js → chunk-JXSHRMYW.js} +32 -33
- package/dist/{chunk-YHXJC5M5.js → chunk-M7FPK6GN.js} +17 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/{positioning-i0WrCAdF.js → positioning-D5q9DM-0.js} +19 -12
- 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 +2 -2
- 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 +3 -3
- package/dist/cjs/ui-popover.cjs.entry.js +3 -3
- 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.css +1 -0
- 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.css +7 -2
- 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.css +6 -2
- 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 +21 -14
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DZRtXH6j.js → p-DWN2m6ta.js} +1 -1
- package/dist/components/p-DYiNETk6.js +1 -0
- package/dist/components/p-Drw41pSY.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-Bu0dmLBE.js → positioning-Drmwg-C1.js} +19 -12
- 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 +2 -2
- 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 +3 -3
- package/dist/esm/ui-popover.entry.js +3 -3
- 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 +525 -550
- package/dist/index.js +27 -14
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/{p-9a82c523.entry.js → p-1249a806.entry.js} +1 -1
- 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-72338f53.entry.js → p-32c85198.entry.js} +1 -1
- package/dist/looma/{p-b75aff63.entry.js → p-37ec2b4b.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-9551ebf6.entry.js → p-424d6719.entry.js} +1 -1
- package/dist/looma/{p-6cc3180b.entry.js → p-4caccfce.entry.js} +1 -1
- package/dist/looma/p-55e06e2e.entry.js +1 -0
- package/dist/looma/{p-a939c00f.entry.js → p-56dac38a.entry.js} +1 -1
- package/dist/looma/p-5cbbf7a0.entry.js +1 -0
- 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-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-Drmwg-C1.js +1 -0
- package/dist/looma/{p-607c3056.entry.js → p-b6ede6bb.entry.js} +1 -1
- package/dist/looma/p-b6fb6ba3.entry.js +1 -0
- 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-d46317e0.entry.js +1 -0
- 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-e604e906.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-7H6GIQEK.js → ui-affordance-scope.entry-VR7FLAWG.js} +2 -2
- package/dist/{ui-avatar-group.entry-QB25IUWA.js → ui-avatar-group.entry-L3UKOY3U.js} +1 -1
- package/dist/{ui-avatar.entry-L377CWPR.js → ui-avatar.entry-VM5OHEFQ.js} +1 -1
- package/dist/{ui-badge.entry-QHC3KI5S.js → ui-badge.entry-ZTM4OPUD.js} +1 -1
- package/dist/{ui-button.entry-MZGTPU22.js → ui-button.entry-CIPUSV5B.js} +1 -1
- package/dist/{ui-callout.entry-2D4LO74K.js → ui-callout.entry-OBFCI2O7.js} +1 -1
- package/dist/{ui-checkbox.entry-B2O5DREC.js → ui-checkbox.entry-XT6ET56H.js} +1 -1
- package/dist/{ui-tooltip.entry-VG4AWEBD.js → ui-chip_2.entry-32SHCLV6.js} +19 -4
- package/dist/{ui-chip_2.entry-OOSON72O.js → ui-combobox.entry-ONBBPQ2C.js} +170 -31
- package/dist/{ui-context-menu.entry-UY76G7HM.js → ui-context-menu.entry-RXNUOK24.js} +3 -3
- package/dist/{ui-dialog.entry-345V7IJ3.js → ui-dialog.entry-IJXNUARC.js} +3 -3
- package/dist/{ui-disclosure.entry-RUU7VNDN.js → ui-disclosure.entry-5QS7UDRH.js} +2 -2
- package/dist/{ui-editable.entry-WWFFHOMP.js → ui-editable.entry-D7LOQN2H.js} +3 -3
- package/dist/{ui-floating-action-button.entry-Y2TLDJO4.js → ui-floating-action-button.entry-XQZCTZQT.js} +2 -2
- package/dist/{ui-form-field.entry-C63GZMQR.js → ui-form-field.entry-A654LJZE.js} +2 -2
- package/dist/{ui-icon-button.entry-35MJYYEI.js → ui-icon-button.entry-MJ7F7ZIH.js} +2 -2
- package/dist/{ui-input.entry-3FAXEH5M.js → ui-input.entry-B2XM7JQU.js} +2 -2
- package/dist/{ui-menu-item.entry-3J42XLCJ.js → ui-menu-item.entry-JULYSFVW.js} +2 -2
- package/dist/{ui-menu.entry-YDABO3OO.js → ui-menu.entry-ORRWW7HD.js} +4 -4
- package/dist/{ui-popover.entry-YP7R6FQO.js → ui-popover.entry-W67V4UPA.js} +4 -4
- package/dist/{ui-radio-group.entry-TYXAN7G5.js → ui-radio-group.entry-KCFOR27M.js} +2 -2
- package/dist/{ui-radio.entry-JW7HX3LW.js → ui-radio.entry-I2P4V5E3.js} +2 -2
- package/dist/{ui-search-result-row.entry-MKQYGNFO.js → ui-search-result-row.entry-GHODLSLR.js} +2 -2
- package/dist/{ui-search-shell.entry-KHIQTT4J.js → ui-search-shell.entry-PDB5UN4B.js} +2 -2
- package/dist/{ui-select.entry-R235Y3IL.js → ui-select.entry-D3CZHCKB.js} +2 -2
- package/dist/{ui-switch.entry-BJ6FIEPB.js → ui-switch.entry-WUDRL4H5.js} +3 -3
- package/dist/{ui-tabs.entry-ZBP3FLR2.js → ui-tabs.entry-MW64GKIJ.js} +2 -2
- package/dist/{ui-textarea.entry-2YW7TCEU.js → ui-textarea.entry-VHRBYY6G.js} +2 -2
- package/dist/{ui-toast-region.entry-ZSCMMIKQ.js → ui-toast-region.entry-ET75RWYP.js} +3 -3
- package/dist/{ui-top-bar.entry-CZW3MLC6.js → ui-top-bar.entry-QIYA3LD3.js} +2 -2
- package/dist/{ui-tree-item.entry-CU2SWAOK.js → ui-tree-item.entry-BDB7VEUS.js} +3 -3
- package/dist/{ui-tree.entry-M6KXK7GJ.js → ui-tree.entry-GSC7BPRN.js} +2 -2
- package/package.json +1 -1
- package/styles.css +6 -4
- 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-BKzrrab4.js +0 -1
- package/dist/components/p-D0wBI-9r.js +0 -1
- package/dist/components/p-DOulVJT7.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-0fd60103.entry.js +0 -1
- package/dist/looma/p-4fc9917f.entry.js +0 -1
- package/dist/looma/p-66c6b6dd.entry.js +0 -1
- package/dist/looma/p-77dcfa6f.entry.js +0 -1
- package/dist/looma/p-85a6716e.entry.js +0 -1
- package/dist/looma/p-8f102407.entry.js +0 -1
- package/dist/looma/p-Bu0dmLBE.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-XXLS4V3I.js +0 -196
|
@@ -6,39 +6,38 @@ var __glob = (map) => (path) => {
|
|
|
6
6
|
|
|
7
7
|
// import("./**/*.entry.js") in dist/esm/index-8BGiMGQ0.js
|
|
8
8
|
var globImport_entry_js = __glob({
|
|
9
|
-
"./ui-affordance-scope.entry.js": () => import("./ui-affordance-scope.entry-
|
|
10
|
-
"./ui-avatar-group.entry.js": () => import("./ui-avatar-group.entry-
|
|
11
|
-
"./ui-avatar.entry.js": () => import("./ui-avatar.entry-
|
|
12
|
-
"./ui-badge.entry.js": () => import("./ui-badge.entry-
|
|
13
|
-
"./ui-button.entry.js": () => import("./ui-button.entry-
|
|
14
|
-
"./ui-callout.entry.js": () => import("./ui-callout.entry-
|
|
15
|
-
"./ui-checkbox.entry.js": () => import("./ui-checkbox.entry-
|
|
16
|
-
"./ui-chip_2.entry.js": () => import("./ui-chip_2.entry-
|
|
17
|
-
"./ui-
|
|
18
|
-
"./ui-
|
|
19
|
-
"./ui-
|
|
20
|
-
"./ui-
|
|
21
|
-
"./ui-
|
|
22
|
-
"./ui-
|
|
23
|
-
"./ui-
|
|
24
|
-
"./ui-
|
|
25
|
-
"./ui-
|
|
26
|
-
"./ui-menu.entry.js": () => import("./ui-menu.entry-
|
|
27
|
-
"./ui-
|
|
28
|
-
"./ui-popover.entry.js": () => import("./ui-popover.entry-
|
|
29
|
-
"./ui-radio-group.entry.js": () => import("./ui-radio-group.entry-
|
|
30
|
-
"./ui-radio.entry.js": () => import("./ui-radio.entry-
|
|
31
|
-
"./ui-search-result-row.entry.js": () => import("./ui-search-result-row.entry-
|
|
32
|
-
"./ui-search-shell.entry.js": () => import("./ui-search-shell.entry-
|
|
33
|
-
"./ui-select.entry.js": () => import("./ui-select.entry-
|
|
34
|
-
"./ui-switch.entry.js": () => import("./ui-switch.entry-
|
|
35
|
-
"./ui-tabs.entry.js": () => import("./ui-tabs.entry-
|
|
36
|
-
"./ui-textarea.entry.js": () => import("./ui-textarea.entry-
|
|
37
|
-
"./ui-toast-region.entry.js": () => import("./ui-toast-region.entry-
|
|
38
|
-
"./ui-
|
|
39
|
-
"./ui-
|
|
40
|
-
"./ui-tree
|
|
41
|
-
"./ui-tree.entry.js": () => import("./ui-tree.entry-M6KXK7GJ.js")
|
|
9
|
+
"./ui-affordance-scope.entry.js": () => import("./ui-affordance-scope.entry-VR7FLAWG.js"),
|
|
10
|
+
"./ui-avatar-group.entry.js": () => import("./ui-avatar-group.entry-L3UKOY3U.js"),
|
|
11
|
+
"./ui-avatar.entry.js": () => import("./ui-avatar.entry-VM5OHEFQ.js"),
|
|
12
|
+
"./ui-badge.entry.js": () => import("./ui-badge.entry-ZTM4OPUD.js"),
|
|
13
|
+
"./ui-button.entry.js": () => import("./ui-button.entry-CIPUSV5B.js"),
|
|
14
|
+
"./ui-callout.entry.js": () => import("./ui-callout.entry-OBFCI2O7.js"),
|
|
15
|
+
"./ui-checkbox.entry.js": () => import("./ui-checkbox.entry-XT6ET56H.js"),
|
|
16
|
+
"./ui-chip_2.entry.js": () => import("./ui-chip_2.entry-32SHCLV6.js"),
|
|
17
|
+
"./ui-combobox.entry.js": () => import("./ui-combobox.entry-ONBBPQ2C.js"),
|
|
18
|
+
"./ui-context-menu.entry.js": () => import("./ui-context-menu.entry-RXNUOK24.js"),
|
|
19
|
+
"./ui-dialog.entry.js": () => import("./ui-dialog.entry-IJXNUARC.js"),
|
|
20
|
+
"./ui-disclosure.entry.js": () => import("./ui-disclosure.entry-5QS7UDRH.js"),
|
|
21
|
+
"./ui-editable.entry.js": () => import("./ui-editable.entry-D7LOQN2H.js"),
|
|
22
|
+
"./ui-floating-action-button.entry.js": () => import("./ui-floating-action-button.entry-XQZCTZQT.js"),
|
|
23
|
+
"./ui-form-field.entry.js": () => import("./ui-form-field.entry-A654LJZE.js"),
|
|
24
|
+
"./ui-icon-button.entry.js": () => import("./ui-icon-button.entry-MJ7F7ZIH.js"),
|
|
25
|
+
"./ui-input.entry.js": () => import("./ui-input.entry-B2XM7JQU.js"),
|
|
26
|
+
"./ui-menu-item.entry.js": () => import("./ui-menu-item.entry-JULYSFVW.js"),
|
|
27
|
+
"./ui-menu.entry.js": () => import("./ui-menu.entry-ORRWW7HD.js"),
|
|
28
|
+
"./ui-popover.entry.js": () => import("./ui-popover.entry-W67V4UPA.js"),
|
|
29
|
+
"./ui-radio-group.entry.js": () => import("./ui-radio-group.entry-KCFOR27M.js"),
|
|
30
|
+
"./ui-radio.entry.js": () => import("./ui-radio.entry-I2P4V5E3.js"),
|
|
31
|
+
"./ui-search-result-row.entry.js": () => import("./ui-search-result-row.entry-GHODLSLR.js"),
|
|
32
|
+
"./ui-search-shell.entry.js": () => import("./ui-search-shell.entry-PDB5UN4B.js"),
|
|
33
|
+
"./ui-select.entry.js": () => import("./ui-select.entry-D3CZHCKB.js"),
|
|
34
|
+
"./ui-switch.entry.js": () => import("./ui-switch.entry-WUDRL4H5.js"),
|
|
35
|
+
"./ui-tabs.entry.js": () => import("./ui-tabs.entry-MW64GKIJ.js"),
|
|
36
|
+
"./ui-textarea.entry.js": () => import("./ui-textarea.entry-VHRBYY6G.js"),
|
|
37
|
+
"./ui-toast-region.entry.js": () => import("./ui-toast-region.entry-ET75RWYP.js"),
|
|
38
|
+
"./ui-top-bar.entry.js": () => import("./ui-top-bar.entry-QIYA3LD3.js"),
|
|
39
|
+
"./ui-tree-item.entry.js": () => import("./ui-tree-item.entry-BDB7VEUS.js"),
|
|
40
|
+
"./ui-tree.entry.js": () => import("./ui-tree.entry-GSC7BPRN.js")
|
|
42
41
|
});
|
|
43
42
|
|
|
44
43
|
// dist/esm/index-8BGiMGQ0.js
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dist/esm/positioning-
|
|
1
|
+
// dist/esm/positioning-Drmwg-C1.js
|
|
2
2
|
var DEFAULT_AFFORDANCE_NEAR_RADIUS = 16;
|
|
3
3
|
var anchorSequence = 0;
|
|
4
4
|
var anchorBindings = /* @__PURE__ */ new WeakMap();
|
|
@@ -73,22 +73,21 @@ function createViewportSurface(surface) {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
function fallbackPosition(surface, anchor, placement, gap, viewportGap) {
|
|
76
|
+
function fallbackPosition(surface, anchor, placement, gap, viewportGap, surfaceRect = surface.getBoundingClientRect()) {
|
|
77
77
|
const owner = surface.ownerDocument.defaultView ?? window;
|
|
78
78
|
const viewport = getVisualViewportRect(owner);
|
|
79
|
-
const rect = surface.getBoundingClientRect();
|
|
80
79
|
const preferTop = placement.startsWith("top");
|
|
81
80
|
const preferEnd = placement.endsWith("end");
|
|
82
81
|
const spaceBelow = viewport.bottom - anchor.bottom - viewportGap;
|
|
83
82
|
const spaceAbove = anchor.top - viewport.top - viewportGap;
|
|
84
|
-
const useTop = preferTop ? !(spaceAbove <
|
|
85
|
-
const unclampedTop = useTop ? anchor.top -
|
|
86
|
-
const unclampedLeft = preferEnd ? anchor.right -
|
|
83
|
+
const useTop = preferTop ? !(spaceAbove < surfaceRect.height + gap && spaceBelow > spaceAbove) : spaceBelow < surfaceRect.height + gap && spaceAbove > spaceBelow;
|
|
84
|
+
const unclampedTop = useTop ? anchor.top - surfaceRect.height - gap : anchor.bottom + gap;
|
|
85
|
+
const unclampedLeft = preferEnd ? anchor.right - surfaceRect.width : anchor.left;
|
|
87
86
|
const shifted = clampRectToViewport({
|
|
88
87
|
left: unclampedLeft,
|
|
89
88
|
top: unclampedTop,
|
|
90
|
-
width:
|
|
91
|
-
height:
|
|
89
|
+
width: surfaceRect.width,
|
|
90
|
+
height: surfaceRect.height
|
|
92
91
|
}, viewport, viewportGap);
|
|
93
92
|
surface.style.left = `${Math.round(unclampedLeft + shifted.x)}px`;
|
|
94
93
|
surface.style.top = `${Math.round(unclampedTop + shifted.y)}px`;
|
|
@@ -146,10 +145,16 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
146
145
|
}
|
|
147
146
|
if (!anchor)
|
|
148
147
|
return;
|
|
149
|
-
|
|
148
|
+
let surfaceRect;
|
|
149
|
+
if (nativeAnchor) {
|
|
150
150
|
positionNative();
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
const viewport = getVisualViewportRect(owner);
|
|
152
|
+
surfaceRect = surface.getBoundingClientRect();
|
|
153
|
+
const shift = clampRectToViewport(surfaceRect, viewport, viewportGap);
|
|
154
|
+
if (shift.x === 0 && shift.y === 0)
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
fallbackPosition(surface, anchor.getBoundingClientRect(), placement, gap, viewportGap, surfaceRect);
|
|
153
158
|
};
|
|
154
159
|
const schedule = () => {
|
|
155
160
|
if (!open || frame !== null)
|
|
@@ -157,7 +162,7 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
157
162
|
frame = owner.requestAnimationFrame(position);
|
|
158
163
|
};
|
|
159
164
|
const syncFallbackListeners = () => {
|
|
160
|
-
const needsListeners = open && (point !== null ||
|
|
165
|
+
const needsListeners = open && (point !== null || anchor !== null);
|
|
161
166
|
if (!needsListeners) {
|
|
162
167
|
listenerAbort?.abort();
|
|
163
168
|
listenerAbort = null;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["ui-
|
|
9
|
+
return index.bootstrapLazy([["ui-combobox.cjs",[[769,"ui-combobox",{"label":[1],"placeholder":[1],"name":[1],"value":[1],"defaultValue":[1,"default-value"],"multiple":[516],"tokenSeparators":[16],"query":[1],"defaultQuery":[1,"default-query"],"config":[16],"disabled":[4],"readOnly":[4,"readonly"],"required":[4],"size":[1],"labelVisibility":[1,"label-visibility"],"disclosure":[4],"clearable":[4],"help":[1],"raw":[32],"display":[32],"selected":[32],"expanded":[32],"rows":[32],"active":[32],"loading":[32],"helpOpen":[32],"lookupError":[32],"validation":[32],"validate":[64],"focusInput":[64]},null,{"value":[{"syncValue":0}],"query":[{"syncQuery":0}],"disabled":[{"syncDisabled":0}],"readOnly":[{"syncDisabled":0}],"config":[{"syncConfig":0}]}]]],["ui-context-menu.cjs",[[769,"ui-context-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"internalOpen":[32],"focusTrigger":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"syncTarget":0}],"internalOpen":[{"syncOverlay":0}]}]]],["ui-affordance-scope.cjs",[[769,"ui-affordance-scope",{"nearRadius":[514,"near-radius"]},null,{"nearRadius":[{"connectCoordinator":0}]}]]],["ui-avatar.cjs",[[513,"ui-avatar",{"src":[1],"alt":[1],"name":[1],"fallback":[1],"hasImage":[32]},null,{"src":[{"watchSrc":0}]}]]],["ui-avatar-group.cjs",[[769,"ui-avatar-group",{"max":[2],"label":[1],"overflowCount":[32]},null,{"max":[{"syncOverflow":0}]}]]],["ui-badge.cjs",[[769,"ui-badge",{"variant":[1],"tone":[1]}]]],["ui-button.cjs",[[769,"ui-button",{"variant":[1],"size":[1],"disabled":[4]},null,{"variant":[{"syncToButton":0}],"size":[{"syncToButton":0}],"disabled":[{"syncToButton":0}]}]]],["ui-callout.cjs",[[769,"ui-callout",{"tone":[1]}]]],["ui-checkbox.cjs",[[769,"ui-checkbox",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"indeterminate":[4],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}],"internalChecked":[{"syncToInput":0}],"indeterminate":[{"syncToInput":0}],"disabled":[{"syncToInput":0}],"required":[{"syncToInput":0}]}]]],["ui-dialog.cjs",[[769,"ui-dialog",{"open":[4],"defaultOpen":[4,"default-open"],"modal":[4],"dismissible":[4],"label":[1],"internalOpen":[32],"accessibleLabel":[32]},null,{"open":[{"syncFromProp":0}],"label":[{"syncLabelFromProp":0}],"internalOpen":[{"syncOpen":0}]}]]],["ui-disclosure.cjs",[[769,"ui-disclosure",{"open":[4],"defaultOpen":[4,"default-open"],"disabled":[4],"internalOpen":[32],"contentId":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncState":0}]}]]],["ui-editable.cjs",[[769,"ui-editable",{"edit":[4],"defaultEdit":[4,"default-edit"],"disabled":[4],"internalEdit":[32]},null,{"edit":[{"syncFromProp":0}]}]]],["ui-floating-action-button.cjs",[[769,"ui-floating-action-button",{"disabled":[516],"mobileOnly":[516,"mobile-only"],"label":[1]}]]],["ui-form-field.cjs",[[769,"ui-form-field",{"invalid":[4],"disabled":[4],"required":[4]}]]],["ui-icon-button.cjs",[[769,"ui-icon-button",{"disabled":[516],"label":[1],"size":[513],"variant":[513],"anticipatory":[516]}]]],["ui-input.cjs",[[769,"ui-input",{"value":[1],"defaultValue":[1,"default-value"],"disabled":[4],"invalid":[4],"readOnly":[4,"readonly"],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncToInput":0}],"defaultValue":[{"syncToInput":0}],"disabled":[{"syncToInput":0}],"invalid":[{"syncToInput":0}],"readOnly":[{"syncToInput":0}]}]]],["ui-menu-item.cjs",[[769,"ui-menu-item",{"disabled":[516],"value":[1]}]]],["ui-popover.cjs",[[769,"ui-popover",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"placement":[1],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"onOpenChange":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}]}]]],["ui-radio.cjs",[[769,"ui-radio",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"name":[1],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}],"disabled":[{"syncToInput":0}],"name":[{"syncToInput":0}],"required":[{"syncToInput":0}],"value":[{"syncToInput":0}]}]]],["ui-radio-group.cjs",[[769,"ui-radio-group",{"value":[1],"name":[1],"orientation":[1],"disabled":[4],"required":[4],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncToRadios":0}],"name":[{"syncToRadios":0}],"orientation":[{"syncToRadios":0}],"disabled":[{"syncToRadios":0}]}]]],["ui-search-result-row.cjs",[[769,"ui-search-result-row",{"disabled":[516],"selected":[516],"hasLeading":[32],"hasMeta":[32],"hasExcerpt":[32],"hasTrailing":[32]}]]],["ui-search-shell.cjs",[[769,"ui-search-shell",{"hasStatus":[32],"hasFooter":[32]}]]],["ui-select.cjs",[[769,"ui-select",{"value":[1],"defaultValue":[1,"default-value"],"disabled":[4],"invalid":[4],"required":[4],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncToSelect":0}],"defaultValue":[{"syncToSelect":0}],"disabled":[{"syncToSelect":0}],"invalid":[{"syncToSelect":0}],"required":[{"syncToSelect":0}]}]]],["ui-switch.cjs",[[769,"ui-switch",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}]}]]],["ui-tabs.cjs",[[769,"ui-tabs",{"value":[1],"defaultValue":[1,"default-value"],"orientation":[1],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncState":0}],"orientation":[{"syncState":0}]}]]],["ui-textarea.cjs",[[769,"ui-textarea",{"value":[1],"defaultValue":[1,"default-value"],"disabled":[4],"invalid":[4],"readOnly":[4,"readonly"],"rows":[2],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncToTextarea":0}],"defaultValue":[{"syncToTextarea":0}],"disabled":[{"syncToTextarea":0}],"invalid":[{"syncToTextarea":0}],"readOnly":[{"syncToTextarea":0}],"rows":[{"syncToTextarea":0}]}]]],["ui-toast-region.cjs",[[769,"ui-toast-region",{"open":[4],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncSurface":0}]}]]],["ui-top-bar.cjs",[[769,"ui-top-bar",{"hasLeading":[32],"hasSearch":[32],"hasActions":[32]}]]],["ui-tree.cjs",[[769,"ui-tree",{"label":[1],"hoverExpandDelay":[2,"hover-expand-delay"],"maxDepth":[2,"max-depth"]}]]],["ui-tree-item.cjs",[[769,"ui-tree-item",{"itemId":[1,"item-id"],"label":[1],"dropDepth":[2,"drop-depth"],"subtreeDepth":[2,"subtree-depth"],"container":[4],"sortable":[4],"dragType":[1,"drag-type"],"dropScope":[1,"drop-scope"],"accepts":[1],"expanded":[4],"defaultExpanded":[4,"default-expanded"],"selected":[4],"disabled":[4],"internalExpanded":[32],"structuralLevel":[32],"tabStop":[32]},null,{"expanded":[{"syncExpandedFromProp":0}]}]]],["ui-menu.cjs",[[769,"ui-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"placement":[1],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncSurface":0}]}]]],["ui-chip_2.cjs",[[769,"ui-chip",{"appearance":[1],"size":[1]}],[769,"ui-tooltip",{"for":[1],"open":[4],"defaultOpen":[4,"default-open"],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"toggleOnClick":[4,"toggle-on-click"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncOverlay":0}]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/looma.cjs.js
CHANGED
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["ui-
|
|
22
|
+
return index.bootstrapLazy([["ui-combobox.cjs",[[769,"ui-combobox",{"label":[1],"placeholder":[1],"name":[1],"value":[1],"defaultValue":[1,"default-value"],"multiple":[516],"tokenSeparators":[16],"query":[1],"defaultQuery":[1,"default-query"],"config":[16],"disabled":[4],"readOnly":[4,"readonly"],"required":[4],"size":[1],"labelVisibility":[1,"label-visibility"],"disclosure":[4],"clearable":[4],"help":[1],"raw":[32],"display":[32],"selected":[32],"expanded":[32],"rows":[32],"active":[32],"loading":[32],"helpOpen":[32],"lookupError":[32],"validation":[32],"validate":[64],"focusInput":[64]},null,{"value":[{"syncValue":0}],"query":[{"syncQuery":0}],"disabled":[{"syncDisabled":0}],"readOnly":[{"syncDisabled":0}],"config":[{"syncConfig":0}]}]]],["ui-context-menu.cjs",[[769,"ui-context-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"internalOpen":[32],"focusTrigger":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"syncTarget":0}],"internalOpen":[{"syncOverlay":0}]}]]],["ui-affordance-scope.cjs",[[769,"ui-affordance-scope",{"nearRadius":[514,"near-radius"]},null,{"nearRadius":[{"connectCoordinator":0}]}]]],["ui-avatar.cjs",[[513,"ui-avatar",{"src":[1],"alt":[1],"name":[1],"fallback":[1],"hasImage":[32]},null,{"src":[{"watchSrc":0}]}]]],["ui-avatar-group.cjs",[[769,"ui-avatar-group",{"max":[2],"label":[1],"overflowCount":[32]},null,{"max":[{"syncOverflow":0}]}]]],["ui-badge.cjs",[[769,"ui-badge",{"variant":[1],"tone":[1]}]]],["ui-button.cjs",[[769,"ui-button",{"variant":[1],"size":[1],"disabled":[4]},null,{"variant":[{"syncToButton":0}],"size":[{"syncToButton":0}],"disabled":[{"syncToButton":0}]}]]],["ui-callout.cjs",[[769,"ui-callout",{"tone":[1]}]]],["ui-checkbox.cjs",[[769,"ui-checkbox",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"indeterminate":[4],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}],"internalChecked":[{"syncToInput":0}],"indeterminate":[{"syncToInput":0}],"disabled":[{"syncToInput":0}],"required":[{"syncToInput":0}]}]]],["ui-dialog.cjs",[[769,"ui-dialog",{"open":[4],"defaultOpen":[4,"default-open"],"modal":[4],"dismissible":[4],"label":[1],"internalOpen":[32],"accessibleLabel":[32]},null,{"open":[{"syncFromProp":0}],"label":[{"syncLabelFromProp":0}],"internalOpen":[{"syncOpen":0}]}]]],["ui-disclosure.cjs",[[769,"ui-disclosure",{"open":[4],"defaultOpen":[4,"default-open"],"disabled":[4],"internalOpen":[32],"contentId":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncState":0}]}]]],["ui-editable.cjs",[[769,"ui-editable",{"edit":[4],"defaultEdit":[4,"default-edit"],"disabled":[4],"internalEdit":[32]},null,{"edit":[{"syncFromProp":0}]}]]],["ui-floating-action-button.cjs",[[769,"ui-floating-action-button",{"disabled":[516],"mobileOnly":[516,"mobile-only"],"label":[1]}]]],["ui-form-field.cjs",[[769,"ui-form-field",{"invalid":[4],"disabled":[4],"required":[4]}]]],["ui-icon-button.cjs",[[769,"ui-icon-button",{"disabled":[516],"label":[1],"size":[513],"variant":[513],"anticipatory":[516]}]]],["ui-input.cjs",[[769,"ui-input",{"value":[1],"defaultValue":[1,"default-value"],"disabled":[4],"invalid":[4],"readOnly":[4,"readonly"],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncToInput":0}],"defaultValue":[{"syncToInput":0}],"disabled":[{"syncToInput":0}],"invalid":[{"syncToInput":0}],"readOnly":[{"syncToInput":0}]}]]],["ui-menu-item.cjs",[[769,"ui-menu-item",{"disabled":[516],"value":[1]}]]],["ui-popover.cjs",[[769,"ui-popover",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"placement":[1],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"onOpenChange":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}]}]]],["ui-radio.cjs",[[769,"ui-radio",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"name":[1],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}],"disabled":[{"syncToInput":0}],"name":[{"syncToInput":0}],"required":[{"syncToInput":0}],"value":[{"syncToInput":0}]}]]],["ui-radio-group.cjs",[[769,"ui-radio-group",{"value":[1],"name":[1],"orientation":[1],"disabled":[4],"required":[4],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncToRadios":0}],"name":[{"syncToRadios":0}],"orientation":[{"syncToRadios":0}],"disabled":[{"syncToRadios":0}]}]]],["ui-search-result-row.cjs",[[769,"ui-search-result-row",{"disabled":[516],"selected":[516],"hasLeading":[32],"hasMeta":[32],"hasExcerpt":[32],"hasTrailing":[32]}]]],["ui-search-shell.cjs",[[769,"ui-search-shell",{"hasStatus":[32],"hasFooter":[32]}]]],["ui-select.cjs",[[769,"ui-select",{"value":[1],"defaultValue":[1,"default-value"],"disabled":[4],"invalid":[4],"required":[4],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncToSelect":0}],"defaultValue":[{"syncToSelect":0}],"disabled":[{"syncToSelect":0}],"invalid":[{"syncToSelect":0}],"required":[{"syncToSelect":0}]}]]],["ui-switch.cjs",[[769,"ui-switch",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}]}]]],["ui-tabs.cjs",[[769,"ui-tabs",{"value":[1],"defaultValue":[1,"default-value"],"orientation":[1],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncState":0}],"orientation":[{"syncState":0}]}]]],["ui-textarea.cjs",[[769,"ui-textarea",{"value":[1],"defaultValue":[1,"default-value"],"disabled":[4],"invalid":[4],"readOnly":[4,"readonly"],"rows":[2],"internalValue":[32]},null,{"value":[{"syncFromProp":0}],"internalValue":[{"syncToTextarea":0}],"defaultValue":[{"syncToTextarea":0}],"disabled":[{"syncToTextarea":0}],"invalid":[{"syncToTextarea":0}],"readOnly":[{"syncToTextarea":0}],"rows":[{"syncToTextarea":0}]}]]],["ui-toast-region.cjs",[[769,"ui-toast-region",{"open":[4],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncSurface":0}]}]]],["ui-top-bar.cjs",[[769,"ui-top-bar",{"hasLeading":[32],"hasSearch":[32],"hasActions":[32]}]]],["ui-tree.cjs",[[769,"ui-tree",{"label":[1],"hoverExpandDelay":[2,"hover-expand-delay"],"maxDepth":[2,"max-depth"]}]]],["ui-tree-item.cjs",[[769,"ui-tree-item",{"itemId":[1,"item-id"],"label":[1],"dropDepth":[2,"drop-depth"],"subtreeDepth":[2,"subtree-depth"],"container":[4],"sortable":[4],"dragType":[1,"drag-type"],"dropScope":[1,"drop-scope"],"accepts":[1],"expanded":[4],"defaultExpanded":[4,"default-expanded"],"selected":[4],"disabled":[4],"internalExpanded":[32],"structuralLevel":[32],"tabStop":[32]},null,{"expanded":[{"syncExpandedFromProp":0}]}]]],["ui-menu.cjs",[[769,"ui-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"placement":[1],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncSurface":0}]}]]],["ui-chip_2.cjs",[[769,"ui-chip",{"appearance":[1],"size":[1]}],[769,"ui-tooltip",{"for":[1],"open":[4],"defaultOpen":[4,"default-open"],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"toggleOnClick":[4,"toggle-on-click"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncOverlay":0}]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -88,28 +88,27 @@ function createViewportSurface(surface) {
|
|
|
88
88
|
},
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
function fallbackPosition(surface, anchor, placement, gap, viewportGap) {
|
|
91
|
+
function fallbackPosition(surface, anchor, placement, gap, viewportGap, surfaceRect = surface.getBoundingClientRect()) {
|
|
92
92
|
const owner = surface.ownerDocument.defaultView ?? window;
|
|
93
93
|
const viewport = getVisualViewportRect(owner);
|
|
94
|
-
const rect = surface.getBoundingClientRect();
|
|
95
94
|
const preferTop = placement.startsWith("top");
|
|
96
95
|
const preferEnd = placement.endsWith("end");
|
|
97
96
|
const spaceBelow = viewport.bottom - anchor.bottom - viewportGap;
|
|
98
97
|
const spaceAbove = anchor.top - viewport.top - viewportGap;
|
|
99
98
|
const useTop = preferTop
|
|
100
|
-
? !(spaceAbove <
|
|
101
|
-
: spaceBelow <
|
|
99
|
+
? !(spaceAbove < surfaceRect.height + gap && spaceBelow > spaceAbove)
|
|
100
|
+
: spaceBelow < surfaceRect.height + gap && spaceAbove > spaceBelow;
|
|
102
101
|
const unclampedTop = useTop
|
|
103
|
-
? anchor.top -
|
|
102
|
+
? anchor.top - surfaceRect.height - gap
|
|
104
103
|
: anchor.bottom + gap;
|
|
105
104
|
const unclampedLeft = preferEnd
|
|
106
|
-
? anchor.right -
|
|
105
|
+
? anchor.right - surfaceRect.width
|
|
107
106
|
: anchor.left;
|
|
108
107
|
const shifted = clampRectToViewport({
|
|
109
108
|
left: unclampedLeft,
|
|
110
109
|
top: unclampedTop,
|
|
111
|
-
width:
|
|
112
|
-
height:
|
|
110
|
+
width: surfaceRect.width,
|
|
111
|
+
height: surfaceRect.height,
|
|
113
112
|
}, viewport, viewportGap);
|
|
114
113
|
surface.style.left = `${Math.round(unclampedLeft + shifted.x)}px`;
|
|
115
114
|
surface.style.top = `${Math.round(unclampedTop + shifted.y)}px`;
|
|
@@ -172,10 +171,16 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
172
171
|
}
|
|
173
172
|
if (!anchor)
|
|
174
173
|
return;
|
|
175
|
-
|
|
174
|
+
let surfaceRect;
|
|
175
|
+
if (nativeAnchor) {
|
|
176
176
|
positionNative();
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
const viewport = getVisualViewportRect(owner);
|
|
178
|
+
surfaceRect = surface.getBoundingClientRect();
|
|
179
|
+
const shift = clampRectToViewport(surfaceRect, viewport, viewportGap);
|
|
180
|
+
if (shift.x === 0 && shift.y === 0)
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
fallbackPosition(surface, anchor.getBoundingClientRect(), placement, gap, viewportGap, surfaceRect);
|
|
179
184
|
};
|
|
180
185
|
const schedule = () => {
|
|
181
186
|
if (!open || frame !== null)
|
|
@@ -183,7 +188,9 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
183
188
|
frame = owner.requestAnimationFrame(position);
|
|
184
189
|
};
|
|
185
190
|
const syncFallbackListeners = () => {
|
|
186
|
-
|
|
191
|
+
// Native anchor positioning handles ordinary placement, but the shared
|
|
192
|
+
// controller still owns viewport containment when neither side can fit.
|
|
193
|
+
const needsListeners = open && (point !== null || anchor !== null);
|
|
187
194
|
if (!needsListeners) {
|
|
188
195
|
listenerAbort?.abort();
|
|
189
196
|
listenerAbort = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-BHG9Rpil.js');
|
|
4
|
-
var positioning = require('./positioning-
|
|
4
|
+
var positioning = require('./positioning-D5q9DM-0.js');
|
|
5
5
|
|
|
6
6
|
const uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
|
|
7
7
|
|