@threadlabs/looma 0.1.16 → 0.1.18
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/README.md +2 -1
- package/dist/{chunk-SVINNT3E.js → chunk-DTQVRGVL.js} +29 -29
- package/dist/{chunk-G53JEAQK.js → chunk-SZJQ3NPX.js} +6 -3
- package/dist/chunk-YHXJC5M5.js +341 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/{manager-BOpVXb92.js → manager-C9j3HZay.js} +5 -2
- package/dist/cjs/positioning-i0WrCAdF.js +384 -0
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +3 -113
- package/dist/cjs/ui-context-menu.cjs.entry.js +43 -5
- package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu.cjs.entry.js +83 -2
- package/dist/cjs/ui-popover.cjs.entry.js +43 -3
- package/dist/cjs/ui-toast-region.cjs.entry.js +17 -2
- package/dist/cjs/ui-tooltip.cjs.entry.js +95 -27
- package/dist/cjs/ui-tree-item.cjs.entry.js +1 -1
- package/dist/collection/components/ui-context-menu/ui-context-menu.css +21 -4
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +43 -4
- package/dist/collection/components/ui-menu/ui-menu.css +39 -0
- package/dist/collection/components/ui-menu/ui-menu.js +128 -1
- package/dist/collection/components/ui-popover/ui-popover.css +31 -0
- package/dist/collection/components/ui-popover/ui-popover.js +87 -1
- package/dist/collection/components/ui-toast-region/ui-toast-region.css +6 -0
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +16 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +20 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +160 -25
- package/dist/collection/components/ui-tree-item/ui-tree-item.css +10 -6
- package/dist/collection/input-modality.js +24 -0
- package/dist/collection/overlay/manager.js +5 -2
- package/dist/collection/overlay/positioning.js +246 -0
- package/dist/components/p-CEYIKqYc.js +1 -0
- package/dist/components/p-DOulVJT7.js +1 -0
- package/dist/components/p-PM9a74r7.js +1 -0
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/components/ui-tree-item.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/{manager-CR7f2MQC.js → manager-PM9a74r7.js} +5 -2
- package/dist/esm/positioning-Bu0dmLBE.js +379 -0
- package/dist/esm/ui-affordance-scope.entry.js +1 -111
- package/dist/esm/ui-context-menu.entry.js +43 -5
- package/dist/esm/ui-dialog.entry.js +1 -1
- package/dist/esm/ui-menu.entry.js +83 -2
- package/dist/esm/ui-popover.entry.js +43 -3
- package/dist/esm/ui-toast-region.entry.js +17 -2
- package/dist/esm/ui-tooltip.entry.js +95 -27
- package/dist/esm/ui-tree-item.entry.js +1 -1
- package/dist/index.cjs +779 -59
- package/dist/index.d.cts +44 -1
- package/dist/index.d.ts +44 -1
- package/dist/index.js +235 -4
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-063f5a89.entry.js +1 -0
- package/dist/looma/{p-c6721aba.entry.js → p-11083743.entry.js} +1 -1
- package/dist/looma/p-1674cda4.entry.js +1 -0
- package/dist/looma/p-2e6f791e.entry.js +1 -0
- package/dist/looma/p-54c41576.entry.js +1 -0
- package/dist/looma/p-9194a99d.entry.js +1 -0
- package/dist/looma/p-Bu0dmLBE.js +1 -0
- package/dist/looma/p-PM9a74r7.js +1 -0
- package/dist/looma/p-caa8fc7b.entry.js +1 -0
- package/dist/looma/{p-ef9ca2ed.entry.js → p-d01960c2.entry.js} +2 -2
- package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +6 -0
- package/dist/types/components/ui-menu/ui-menu.d.ts +13 -0
- package/dist/types/components/ui-popover/ui-popover.d.ts +9 -0
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +2 -0
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +16 -1
- package/dist/types/components.d.ts +71 -0
- package/dist/types/input-modality.d.ts +6 -0
- package/dist/types/overlay/manager.d.ts +3 -0
- package/dist/types/overlay/positioning.d.ts +33 -0
- package/dist/ui-affordance-scope.entry-2W7ZKAGK.js +54 -0
- package/dist/{ui-avatar-group.entry-DQDP325O.js → ui-avatar-group.entry-SE5JG2FT.js} +1 -1
- package/dist/{ui-avatar.entry-WYIDMOFE.js → ui-avatar.entry-46JDI25A.js} +1 -1
- package/dist/{ui-badge.entry-VGHXPEDT.js → ui-badge.entry-U7G3MEC5.js} +1 -1
- package/dist/{ui-button.entry-LKPLOJ22.js → ui-button.entry-DELD6KMH.js} +1 -1
- package/dist/{ui-checkbox.entry-J74HEA22.js → ui-checkbox.entry-ZUG2P642.js} +1 -1
- package/dist/{ui-context-menu.entry-MQM2FCLI.js → ui-context-menu.entry-L4HTK3PV.js} +43 -6
- package/dist/{ui-dialog.entry-DQMMDO4Z.js → ui-dialog.entry-TQPYD2YI.js} +2 -2
- package/dist/{ui-disclosure.entry-ONF7UZDC.js → ui-disclosure.entry-23TII4YU.js} +1 -1
- package/dist/{ui-floating-action-button.entry-FKTGVC5T.js → ui-floating-action-button.entry-FOQYAFJI.js} +1 -1
- package/dist/{ui-form-field.entry-M3ISWQNU.js → ui-form-field.entry-SCPG4STY.js} +1 -1
- package/dist/{ui-icon-button.entry-AWFIQUHM.js → ui-icon-button.entry-U45ZVAC3.js} +1 -1
- package/dist/{ui-input.entry-JZ6RETMT.js → ui-input.entry-3AIA3G4C.js} +1 -1
- package/dist/{ui-menu-item.entry-5MFR5LFL.js → ui-menu-item.entry-3QO5TG2J.js} +1 -1
- package/dist/ui-menu.entry-JACWGDDG.js +184 -0
- package/dist/{ui-popover.entry-ELCMKO6Y.js → ui-popover.entry-2XP4H3S2.js} +46 -4
- package/dist/{ui-radio-group.entry-RJHUPPEM.js → ui-radio-group.entry-73IKFMDK.js} +1 -1
- package/dist/{ui-radio.entry-3VRDPOY4.js → ui-radio.entry-INJVXUKE.js} +1 -1
- package/dist/{ui-search-result-row.entry-J34YPAV7.js → ui-search-result-row.entry-4J732TDC.js} +1 -1
- package/dist/{ui-search-shell.entry-IJ4UUP27.js → ui-search-shell.entry-3C2WRVE2.js} +1 -1
- package/dist/{ui-select.entry-C6YD3HQ5.js → ui-select.entry-3ZLDGAKX.js} +1 -1
- package/dist/{ui-switch.entry-UZDF5QTI.js → ui-switch.entry-5MJRLR2P.js} +1 -1
- package/dist/{ui-tabs.entry-YRAKWOMR.js → ui-tabs.entry-F5H7OPBO.js} +1 -1
- package/dist/{ui-textarea.entry-JLDKFT3K.js → ui-textarea.entry-BNJ375JB.js} +1 -1
- package/dist/{ui-toast-region.entry-GC7C7KXF.js → ui-toast-region.entry-ZUIPJ2JH.js} +20 -3
- package/dist/ui-tooltip.entry-DZ4RMF35.js +214 -0
- package/dist/{ui-top-bar.entry-5W5UA5KV.js → ui-top-bar.entry-VKRXIUU6.js} +1 -1
- package/dist/{ui-tree-item.entry-3LM7IXIK.js → ui-tree-item.entry-NFUQ45OL.js} +2 -2
- package/dist/{ui-tree.entry-X4FU42A6.js → ui-tree.entry-H4CWDYI6.js} +1 -1
- package/editor/{chunk-RTHHTPWK.js → chunk-3QMBK3XZ.js} +245 -41
- package/editor/{chunk-OHD4OS32.js → chunk-OXFYYLUC.js} +632 -236
- package/editor/{chunk-CX4QDKSV.js → chunk-ZOUKEZ77.js} +21 -1
- package/editor/extensions/index.d.ts +49 -1
- package/editor/extensions/index.js +15 -3
- package/editor/index.d.ts +3 -2
- package/editor/index.js +16 -4
- package/editor/ui.d.ts +9 -1
- package/editor/ui.js +2 -2
- package/editor.css +173 -4
- package/package.json +1 -1
- package/styles.css +1 -7
- package/tokens.css +14 -2
- package/vue/editor/index.d.ts +103 -4
- package/vue/editor/index.js +199 -114
- package/dist/components/p-CR7f2MQC.js +0 -1
- package/dist/components/p-QiwSQmKJ.js +0 -1
- package/dist/looma/p-2ae73d5b.entry.js +0 -1
- package/dist/looma/p-3ac2e0d4.entry.js +0 -1
- package/dist/looma/p-65c25c94.entry.js +0 -1
- package/dist/looma/p-8c09c724.entry.js +0 -1
- package/dist/looma/p-95cd639d.entry.js +0 -1
- package/dist/looma/p-96f73d07.entry.js +0 -1
- package/dist/looma/p-CR7f2MQC.js +0 -1
- package/dist/ui-affordance-scope.entry-PFP2TDKO.js +0 -145
- package/dist/ui-menu.entry-IOEIDATQ.js +0 -98
- package/dist/ui-tooltip.entry-F26XDTYX.js +0 -145
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ Vue and Tiptap are optional to the package as a whole. `/vue` needs only Vue 3.5
|
|
|
17
17
|
or newer. Looma's `/editor` and `/vue/editor` surfaces are Tiptap-backed and
|
|
18
18
|
ship Looma's concrete extension set within those subpaths. `/vue/editor` consumers
|
|
19
19
|
must also install `@tiptap/vue-3@^2.11.5`; `LoomaEditor` owns the Tiptap lifecycle,
|
|
20
|
-
formatting toolbar, slash menu, image insertion,
|
|
20
|
+
formatting toolbar, slash menu, bounded mention suggestions, image insertion,
|
|
21
|
+
and table editing. `/editor/ui`
|
|
21
22
|
is the low-level UI-only boundary. See the
|
|
22
23
|
repository getting-started guide for the full CSS and adapter setup.
|
|
@@ -6,35 +6,35 @@ var __glob = (map) => (path) => {
|
|
|
6
6
|
|
|
7
7
|
// import("./**/*.entry.js") in dist/esm/index-CEeiinfk.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-checkbox.entry.js": () => import("./ui-checkbox.entry-
|
|
15
|
-
"./ui-context-menu.entry.js": () => import("./ui-context-menu.entry-
|
|
16
|
-
"./ui-dialog.entry.js": () => import("./ui-dialog.entry-
|
|
17
|
-
"./ui-disclosure.entry.js": () => import("./ui-disclosure.entry-
|
|
18
|
-
"./ui-floating-action-button.entry.js": () => import("./ui-floating-action-button.entry-
|
|
19
|
-
"./ui-form-field.entry.js": () => import("./ui-form-field.entry-
|
|
20
|
-
"./ui-icon-button.entry.js": () => import("./ui-icon-button.entry-
|
|
21
|
-
"./ui-input.entry.js": () => import("./ui-input.entry-
|
|
22
|
-
"./ui-menu-item.entry.js": () => import("./ui-menu-item.entry-
|
|
23
|
-
"./ui-menu.entry.js": () => import("./ui-menu.entry-
|
|
24
|
-
"./ui-popover.entry.js": () => import("./ui-popover.entry-
|
|
25
|
-
"./ui-radio-group.entry.js": () => import("./ui-radio-group.entry-
|
|
26
|
-
"./ui-radio.entry.js": () => import("./ui-radio.entry-
|
|
27
|
-
"./ui-search-result-row.entry.js": () => import("./ui-search-result-row.entry-
|
|
28
|
-
"./ui-search-shell.entry.js": () => import("./ui-search-shell.entry-
|
|
29
|
-
"./ui-select.entry.js": () => import("./ui-select.entry-
|
|
30
|
-
"./ui-switch.entry.js": () => import("./ui-switch.entry-
|
|
31
|
-
"./ui-tabs.entry.js": () => import("./ui-tabs.entry-
|
|
32
|
-
"./ui-textarea.entry.js": () => import("./ui-textarea.entry-
|
|
33
|
-
"./ui-toast-region.entry.js": () => import("./ui-toast-region.entry-
|
|
34
|
-
"./ui-tooltip.entry.js": () => import("./ui-tooltip.entry-
|
|
35
|
-
"./ui-top-bar.entry.js": () => import("./ui-top-bar.entry-
|
|
36
|
-
"./ui-tree-item.entry.js": () => import("./ui-tree-item.entry-
|
|
37
|
-
"./ui-tree.entry.js": () => import("./ui-tree.entry-
|
|
9
|
+
"./ui-affordance-scope.entry.js": () => import("./ui-affordance-scope.entry-2W7ZKAGK.js"),
|
|
10
|
+
"./ui-avatar-group.entry.js": () => import("./ui-avatar-group.entry-SE5JG2FT.js"),
|
|
11
|
+
"./ui-avatar.entry.js": () => import("./ui-avatar.entry-46JDI25A.js"),
|
|
12
|
+
"./ui-badge.entry.js": () => import("./ui-badge.entry-U7G3MEC5.js"),
|
|
13
|
+
"./ui-button.entry.js": () => import("./ui-button.entry-DELD6KMH.js"),
|
|
14
|
+
"./ui-checkbox.entry.js": () => import("./ui-checkbox.entry-ZUG2P642.js"),
|
|
15
|
+
"./ui-context-menu.entry.js": () => import("./ui-context-menu.entry-L4HTK3PV.js"),
|
|
16
|
+
"./ui-dialog.entry.js": () => import("./ui-dialog.entry-TQPYD2YI.js"),
|
|
17
|
+
"./ui-disclosure.entry.js": () => import("./ui-disclosure.entry-23TII4YU.js"),
|
|
18
|
+
"./ui-floating-action-button.entry.js": () => import("./ui-floating-action-button.entry-FOQYAFJI.js"),
|
|
19
|
+
"./ui-form-field.entry.js": () => import("./ui-form-field.entry-SCPG4STY.js"),
|
|
20
|
+
"./ui-icon-button.entry.js": () => import("./ui-icon-button.entry-U45ZVAC3.js"),
|
|
21
|
+
"./ui-input.entry.js": () => import("./ui-input.entry-3AIA3G4C.js"),
|
|
22
|
+
"./ui-menu-item.entry.js": () => import("./ui-menu-item.entry-3QO5TG2J.js"),
|
|
23
|
+
"./ui-menu.entry.js": () => import("./ui-menu.entry-JACWGDDG.js"),
|
|
24
|
+
"./ui-popover.entry.js": () => import("./ui-popover.entry-2XP4H3S2.js"),
|
|
25
|
+
"./ui-radio-group.entry.js": () => import("./ui-radio-group.entry-73IKFMDK.js"),
|
|
26
|
+
"./ui-radio.entry.js": () => import("./ui-radio.entry-INJVXUKE.js"),
|
|
27
|
+
"./ui-search-result-row.entry.js": () => import("./ui-search-result-row.entry-4J732TDC.js"),
|
|
28
|
+
"./ui-search-shell.entry.js": () => import("./ui-search-shell.entry-3C2WRVE2.js"),
|
|
29
|
+
"./ui-select.entry.js": () => import("./ui-select.entry-3ZLDGAKX.js"),
|
|
30
|
+
"./ui-switch.entry.js": () => import("./ui-switch.entry-5MJRLR2P.js"),
|
|
31
|
+
"./ui-tabs.entry.js": () => import("./ui-tabs.entry-F5H7OPBO.js"),
|
|
32
|
+
"./ui-textarea.entry.js": () => import("./ui-textarea.entry-BNJ375JB.js"),
|
|
33
|
+
"./ui-toast-region.entry.js": () => import("./ui-toast-region.entry-ZUIPJ2JH.js"),
|
|
34
|
+
"./ui-tooltip.entry.js": () => import("./ui-tooltip.entry-DZ4RMF35.js"),
|
|
35
|
+
"./ui-top-bar.entry.js": () => import("./ui-top-bar.entry-VKRXIUU6.js"),
|
|
36
|
+
"./ui-tree-item.entry.js": () => import("./ui-tree-item.entry-NFUQ45OL.js"),
|
|
37
|
+
"./ui-tree.entry.js": () => import("./ui-tree.entry-H4CWDYI6.js")
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
// dist/esm/index-CEeiinfk.js
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dist/esm/manager-
|
|
1
|
+
// dist/esm/manager-PM9a74r7.js
|
|
2
2
|
var stack = [];
|
|
3
3
|
var scrollLockAttribute = "data-ui-scroll-lock";
|
|
4
4
|
var modalCount = 0;
|
|
@@ -31,8 +31,11 @@ function handleLightDismiss(event) {
|
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
const target = event.target;
|
|
34
|
-
if (target instanceof Node
|
|
35
|
-
|
|
34
|
+
if (target instanceof Node) {
|
|
35
|
+
if (top.element.contains(target))
|
|
36
|
+
return;
|
|
37
|
+
if (top.relatedElements?.some((element) => element.contains(target)))
|
|
38
|
+
return;
|
|
36
39
|
}
|
|
37
40
|
requestTopOverlayClose("light-dismiss", "pointer");
|
|
38
41
|
}
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
// dist/esm/positioning-Bu0dmLBE.js
|
|
2
|
+
var DEFAULT_AFFORDANCE_NEAR_RADIUS = 16;
|
|
3
|
+
var anchorSequence = 0;
|
|
4
|
+
var anchorBindings = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
function bindAnchorName(anchor, name) {
|
|
6
|
+
const binding = anchorBindings.get(anchor) ?? {
|
|
7
|
+
original: anchor.style.getPropertyValue("anchor-name"),
|
|
8
|
+
names: /* @__PURE__ */ new Set()
|
|
9
|
+
};
|
|
10
|
+
binding.names.add(name);
|
|
11
|
+
anchorBindings.set(anchor, binding);
|
|
12
|
+
const values = [binding.original, ...binding.names].filter(Boolean);
|
|
13
|
+
anchor.style.setProperty("anchor-name", values.join(", "));
|
|
14
|
+
}
|
|
15
|
+
function unbindAnchorName(anchor, name) {
|
|
16
|
+
const binding = anchorBindings.get(anchor);
|
|
17
|
+
if (!binding)
|
|
18
|
+
return;
|
|
19
|
+
binding.names.delete(name);
|
|
20
|
+
if (binding.names.size) {
|
|
21
|
+
const values = [binding.original, ...binding.names].filter(Boolean);
|
|
22
|
+
anchor.style.setProperty("anchor-name", values.join(", "));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (binding.original)
|
|
26
|
+
anchor.style.setProperty("anchor-name", binding.original);
|
|
27
|
+
else
|
|
28
|
+
anchor.style.removeProperty("anchor-name");
|
|
29
|
+
anchorBindings.delete(anchor);
|
|
30
|
+
}
|
|
31
|
+
function supportsAnchorPositioning(owner) {
|
|
32
|
+
const css = owner.CSS;
|
|
33
|
+
return typeof css?.supports === "function" && css.supports("anchor-name: --ui-anchor-test") && css.supports("position-anchor: --ui-anchor-test") && css.supports("top: anchor(bottom)");
|
|
34
|
+
}
|
|
35
|
+
function topLayerOpen(surface) {
|
|
36
|
+
try {
|
|
37
|
+
return surface.matches(":popover-open");
|
|
38
|
+
} catch {
|
|
39
|
+
return !surface.hidden;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function showInTopLayer(surface) {
|
|
43
|
+
surface.setAttribute("popover", "manual");
|
|
44
|
+
surface.hidden = false;
|
|
45
|
+
if (typeof surface.showPopover === "function" && !topLayerOpen(surface)) {
|
|
46
|
+
try {
|
|
47
|
+
surface.showPopover();
|
|
48
|
+
} catch {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function hideFromTopLayer(surface) {
|
|
53
|
+
if (typeof surface.hidePopover === "function" && topLayerOpen(surface)) {
|
|
54
|
+
try {
|
|
55
|
+
surface.hidePopover();
|
|
56
|
+
} catch {
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
surface.hidden = true;
|
|
60
|
+
}
|
|
61
|
+
function createViewportSurface(surface) {
|
|
62
|
+
surface.setAttribute("popover", "manual");
|
|
63
|
+
surface.dataset.uiPositioning = "viewport";
|
|
64
|
+
return {
|
|
65
|
+
show() {
|
|
66
|
+
showInTopLayer(surface);
|
|
67
|
+
},
|
|
68
|
+
hide() {
|
|
69
|
+
hideFromTopLayer(surface);
|
|
70
|
+
},
|
|
71
|
+
destroy() {
|
|
72
|
+
hideFromTopLayer(surface);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function fallbackPosition(surface, anchor, placement, gap, viewportGap) {
|
|
77
|
+
const owner = surface.ownerDocument.defaultView ?? window;
|
|
78
|
+
const viewport = getVisualViewportRect(owner);
|
|
79
|
+
const rect = surface.getBoundingClientRect();
|
|
80
|
+
const preferTop = placement.startsWith("top");
|
|
81
|
+
const preferEnd = placement.endsWith("end");
|
|
82
|
+
const spaceBelow = viewport.bottom - anchor.bottom - viewportGap;
|
|
83
|
+
const spaceAbove = anchor.top - viewport.top - viewportGap;
|
|
84
|
+
const useTop = preferTop ? !(spaceAbove < rect.height + gap && spaceBelow > spaceAbove) : spaceBelow < rect.height + gap && spaceAbove > spaceBelow;
|
|
85
|
+
const unclampedTop = useTop ? anchor.top - rect.height - gap : anchor.bottom + gap;
|
|
86
|
+
const unclampedLeft = preferEnd ? anchor.right - rect.width : anchor.left;
|
|
87
|
+
const shifted = clampRectToViewport({
|
|
88
|
+
left: unclampedLeft,
|
|
89
|
+
top: unclampedTop,
|
|
90
|
+
width: rect.width,
|
|
91
|
+
height: rect.height
|
|
92
|
+
}, viewport, viewportGap);
|
|
93
|
+
surface.style.left = `${Math.round(unclampedLeft + shifted.x)}px`;
|
|
94
|
+
surface.style.top = `${Math.round(unclampedTop + shifted.y)}px`;
|
|
95
|
+
surface.style.right = "auto";
|
|
96
|
+
surface.style.bottom = "auto";
|
|
97
|
+
}
|
|
98
|
+
function createAnchoredSurface(surface, options = {}) {
|
|
99
|
+
const owner = surface.ownerDocument.defaultView ?? window;
|
|
100
|
+
const placement = options.placement ?? "bottom-start";
|
|
101
|
+
const gap = Math.max(0, options.gap ?? 4);
|
|
102
|
+
const viewportGap = Math.max(0, options.viewportGap ?? 8);
|
|
103
|
+
const nativeAnchor = supportsAnchorPositioning(owner);
|
|
104
|
+
const anchorName = `--ui-anchor-${++anchorSequence}`;
|
|
105
|
+
let anchor = options.anchor ?? null;
|
|
106
|
+
let point = null;
|
|
107
|
+
let open = false;
|
|
108
|
+
let frame = null;
|
|
109
|
+
let listenerAbort = null;
|
|
110
|
+
surface.setAttribute("popover", "manual");
|
|
111
|
+
surface.dataset.uiPositioning = nativeAnchor ? "anchor" : "fallback";
|
|
112
|
+
surface.style.position = "fixed";
|
|
113
|
+
surface.style.margin = "0";
|
|
114
|
+
const bindAnchor = (next) => {
|
|
115
|
+
if (anchor)
|
|
116
|
+
unbindAnchorName(anchor, anchorName);
|
|
117
|
+
anchor = next;
|
|
118
|
+
if (!anchor) {
|
|
119
|
+
surface.style.removeProperty("position-anchor");
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
bindAnchorName(anchor, anchorName);
|
|
123
|
+
surface.style.setProperty("position-anchor", anchorName);
|
|
124
|
+
};
|
|
125
|
+
const positionNative = () => {
|
|
126
|
+
const blockEnd = placement.startsWith("bottom");
|
|
127
|
+
const inlineEnd = placement.endsWith("end");
|
|
128
|
+
surface.style.top = blockEnd ? `calc(anchor(bottom) + ${gap}px)` : "auto";
|
|
129
|
+
surface.style.bottom = blockEnd ? "auto" : `calc(anchor(top) + ${gap}px)`;
|
|
130
|
+
surface.style.left = inlineEnd ? "auto" : "anchor(left)";
|
|
131
|
+
surface.style.right = inlineEnd ? "anchor(right)" : "auto";
|
|
132
|
+
surface.style.setProperty("position-try-fallbacks", "flip-block, flip-inline");
|
|
133
|
+
};
|
|
134
|
+
const position = () => {
|
|
135
|
+
frame = null;
|
|
136
|
+
if (!open)
|
|
137
|
+
return;
|
|
138
|
+
if (point) {
|
|
139
|
+
fallbackPosition(surface, {
|
|
140
|
+
left: point.x,
|
|
141
|
+
right: point.x,
|
|
142
|
+
top: point.y,
|
|
143
|
+
bottom: point.y
|
|
144
|
+
}, "bottom-start", gap, viewportGap);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (!anchor)
|
|
148
|
+
return;
|
|
149
|
+
if (nativeAnchor)
|
|
150
|
+
positionNative();
|
|
151
|
+
else
|
|
152
|
+
fallbackPosition(surface, anchor.getBoundingClientRect(), placement, gap, viewportGap);
|
|
153
|
+
};
|
|
154
|
+
const schedule = () => {
|
|
155
|
+
if (!open || frame !== null)
|
|
156
|
+
return;
|
|
157
|
+
frame = owner.requestAnimationFrame(position);
|
|
158
|
+
};
|
|
159
|
+
const syncFallbackListeners = () => {
|
|
160
|
+
const needsListeners = open && (point !== null || !nativeAnchor);
|
|
161
|
+
if (!needsListeners) {
|
|
162
|
+
listenerAbort?.abort();
|
|
163
|
+
listenerAbort = null;
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (listenerAbort)
|
|
167
|
+
return;
|
|
168
|
+
listenerAbort = new AbortController();
|
|
169
|
+
const signal = listenerAbort.signal;
|
|
170
|
+
owner.addEventListener("resize", schedule, { passive: true, signal });
|
|
171
|
+
owner.addEventListener("scroll", schedule, { passive: true, capture: true, signal });
|
|
172
|
+
owner.visualViewport?.addEventListener("resize", schedule, { passive: true, signal });
|
|
173
|
+
owner.visualViewport?.addEventListener("scroll", schedule, { passive: true, signal });
|
|
174
|
+
};
|
|
175
|
+
bindAnchor(anchor);
|
|
176
|
+
return {
|
|
177
|
+
setAnchor(next) {
|
|
178
|
+
point = null;
|
|
179
|
+
bindAnchor(next);
|
|
180
|
+
syncFallbackListeners();
|
|
181
|
+
schedule();
|
|
182
|
+
},
|
|
183
|
+
show() {
|
|
184
|
+
point = null;
|
|
185
|
+
open = true;
|
|
186
|
+
syncFallbackListeners();
|
|
187
|
+
showInTopLayer(surface);
|
|
188
|
+
position();
|
|
189
|
+
},
|
|
190
|
+
showAtPoint(nextPoint) {
|
|
191
|
+
point = nextPoint;
|
|
192
|
+
open = true;
|
|
193
|
+
syncFallbackListeners();
|
|
194
|
+
showInTopLayer(surface);
|
|
195
|
+
position();
|
|
196
|
+
},
|
|
197
|
+
hide() {
|
|
198
|
+
open = false;
|
|
199
|
+
point = null;
|
|
200
|
+
syncFallbackListeners();
|
|
201
|
+
if (frame !== null)
|
|
202
|
+
owner.cancelAnimationFrame(frame);
|
|
203
|
+
frame = null;
|
|
204
|
+
hideFromTopLayer(surface);
|
|
205
|
+
},
|
|
206
|
+
refresh: schedule,
|
|
207
|
+
destroy() {
|
|
208
|
+
open = false;
|
|
209
|
+
listenerAbort?.abort();
|
|
210
|
+
listenerAbort = null;
|
|
211
|
+
if (frame !== null)
|
|
212
|
+
owner.cancelAnimationFrame(frame);
|
|
213
|
+
frame = null;
|
|
214
|
+
hideFromTopLayer(surface);
|
|
215
|
+
bindAnchor(null);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
function getVisualViewportRect(owner = window) {
|
|
220
|
+
const viewport = owner.visualViewport;
|
|
221
|
+
const left = viewport?.offsetLeft ?? 0;
|
|
222
|
+
const top = viewport?.offsetTop ?? 0;
|
|
223
|
+
const width = viewport?.width ?? owner.innerWidth;
|
|
224
|
+
const height = viewport?.height ?? owner.innerHeight;
|
|
225
|
+
return {
|
|
226
|
+
left,
|
|
227
|
+
top,
|
|
228
|
+
right: left + width,
|
|
229
|
+
bottom: top + height,
|
|
230
|
+
width,
|
|
231
|
+
height
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function clampRectToViewport(rect, viewport = getVisualViewportRect(), gutter = 0) {
|
|
235
|
+
const availableWidth = Math.max(0, viewport.width - gutter * 2);
|
|
236
|
+
const availableHeight = Math.max(0, viewport.height - gutter * 2);
|
|
237
|
+
const targetLeft = rect.width > availableWidth ? viewport.left + gutter : Math.min(Math.max(rect.left, viewport.left + gutter), viewport.right - gutter - rect.width);
|
|
238
|
+
const targetTop = rect.height > availableHeight ? viewport.top + gutter : Math.min(Math.max(rect.top, viewport.top + gutter), viewport.bottom - gutter - rect.height);
|
|
239
|
+
return { x: targetLeft - rect.left, y: targetTop - rect.top };
|
|
240
|
+
}
|
|
241
|
+
function distanceFromPointToRect(point, rect) {
|
|
242
|
+
const dx = Math.max(rect.left - point.x, 0, point.x - rect.right);
|
|
243
|
+
const dy = Math.max(rect.top - point.y, 0, point.y - rect.bottom);
|
|
244
|
+
return Math.hypot(dx, dy);
|
|
245
|
+
}
|
|
246
|
+
function createProximityCoordinator(scope, options = {}) {
|
|
247
|
+
const owner = scope.ownerDocument.defaultView ?? window;
|
|
248
|
+
const pointerTarget = options.pointerTarget ?? scope;
|
|
249
|
+
const anchorSelector = options.anchorSelector ?? "[data-ui-affordance]";
|
|
250
|
+
const configuredRadius = options.nearRadius ?? DEFAULT_AFFORDANCE_NEAR_RADIUS;
|
|
251
|
+
const nearRadius = Number.isFinite(configuredRadius) ? Math.max(0, configuredRadius) : DEFAULT_AFFORDANCE_NEAR_RADIUS;
|
|
252
|
+
const abort = new AbortController();
|
|
253
|
+
let anchors = [];
|
|
254
|
+
let frame = null;
|
|
255
|
+
let point = null;
|
|
256
|
+
let geometryDirty = false;
|
|
257
|
+
const clear = () => {
|
|
258
|
+
for (const { element } of anchors) {
|
|
259
|
+
if (element.hasAttribute("data-ui-proximity")) {
|
|
260
|
+
element.removeAttribute("data-ui-proximity");
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (scope.hasAttribute("data-ui-interaction")) {
|
|
264
|
+
scope.removeAttribute("data-ui-interaction");
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const measure = () => {
|
|
268
|
+
anchors = Array.from(scope.querySelectorAll(anchorSelector)).filter((element) => !element.hasAttribute("disabled") && element.getAttribute("aria-disabled") !== "true").map((element) => ({ element, rect: element.getBoundingClientRect() }));
|
|
269
|
+
geometryDirty = false;
|
|
270
|
+
};
|
|
271
|
+
const update = () => {
|
|
272
|
+
frame = null;
|
|
273
|
+
if (geometryDirty)
|
|
274
|
+
measure();
|
|
275
|
+
if (!point) {
|
|
276
|
+
clear();
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
let engaged = false;
|
|
280
|
+
for (const anchor of anchors) {
|
|
281
|
+
const near = distanceFromPointToRect(point, anchor.rect) <= nearRadius;
|
|
282
|
+
if (near && anchor.element.getAttribute("data-ui-proximity") !== "near") {
|
|
283
|
+
anchor.element.setAttribute("data-ui-proximity", "near");
|
|
284
|
+
} else if (!near && anchor.element.hasAttribute("data-ui-proximity")) {
|
|
285
|
+
anchor.element.removeAttribute("data-ui-proximity");
|
|
286
|
+
}
|
|
287
|
+
engaged ||= near;
|
|
288
|
+
}
|
|
289
|
+
if (engaged && scope.getAttribute("data-ui-interaction") !== "engaged") {
|
|
290
|
+
scope.setAttribute("data-ui-interaction", "engaged");
|
|
291
|
+
} else if (!engaged && scope.hasAttribute("data-ui-interaction")) {
|
|
292
|
+
scope.removeAttribute("data-ui-interaction");
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
const schedule = () => {
|
|
296
|
+
if (frame !== null)
|
|
297
|
+
return;
|
|
298
|
+
frame = owner.requestAnimationFrame(update);
|
|
299
|
+
};
|
|
300
|
+
const onPointerMove = (event) => {
|
|
301
|
+
const pointer = event;
|
|
302
|
+
if (pointer.pointerType === "touch") {
|
|
303
|
+
point = null;
|
|
304
|
+
} else {
|
|
305
|
+
point = { x: pointer.clientX, y: pointer.clientY };
|
|
306
|
+
}
|
|
307
|
+
schedule();
|
|
308
|
+
};
|
|
309
|
+
const invalidate = () => {
|
|
310
|
+
geometryDirty = true;
|
|
311
|
+
schedule();
|
|
312
|
+
};
|
|
313
|
+
pointerTarget.addEventListener("pointermove", onPointerMove, {
|
|
314
|
+
passive: true,
|
|
315
|
+
signal: abort.signal
|
|
316
|
+
});
|
|
317
|
+
owner.addEventListener("resize", invalidate, { passive: true, signal: abort.signal });
|
|
318
|
+
owner.addEventListener("scroll", invalidate, { passive: true, capture: true, signal: abort.signal });
|
|
319
|
+
owner.visualViewport?.addEventListener("resize", invalidate, { passive: true, signal: abort.signal });
|
|
320
|
+
owner.visualViewport?.addEventListener("scroll", invalidate, { passive: true, signal: abort.signal });
|
|
321
|
+
measure();
|
|
322
|
+
return {
|
|
323
|
+
refresh: invalidate,
|
|
324
|
+
destroy() {
|
|
325
|
+
abort.abort();
|
|
326
|
+
if (frame !== null)
|
|
327
|
+
owner.cancelAnimationFrame(frame);
|
|
328
|
+
frame = null;
|
|
329
|
+
point = null;
|
|
330
|
+
clear();
|
|
331
|
+
anchors = [];
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export {
|
|
337
|
+
DEFAULT_AFFORDANCE_NEAR_RADIUS,
|
|
338
|
+
createViewportSurface,
|
|
339
|
+
createAnchoredSurface,
|
|
340
|
+
createProximityCoordinator
|
|
341
|
+
};
|
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-context-menu.cjs",[[769,"ui-context-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"internalOpen":[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-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]},null,{"open":[{"syncFromProp":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-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"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"onOpenChange":0}]}]]],["ui-radio.cjs",[[769,"ui-radio",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"name":[1],"required":[4],"value":[1]},null,{"checked":[{"syncToInput":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}]}]]],["ui-tooltip.cjs",[[769,"ui-tooltip",{"for":[1],"open":[4],"defaultOpen":[4,"default-open"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncOverlay":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"]}]]],["ui-tree-item.cjs",[[769,"ui-tree-item",{"itemId":[1,"item-id"],"label":[1],"depth":[2],"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]},null,{"expanded":[{"syncExpandedFromProp":0}]}]]],["ui-menu.cjs",[[769,"ui-menu",{"open":[4],"defaultOpen":[4,"default-open"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["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-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]},null,{"open":[{"syncFromProp":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-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]},null,{"checked":[{"syncToInput":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-tooltip.cjs",[[769,"ui-tooltip",{"for":[1],"open":[4],"defaultOpen":[4,"default-open"],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncOverlay":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"]}]]],["ui-tree-item.cjs",[[769,"ui-tree-item",{"itemId":[1,"item-id"],"label":[1],"depth":[2],"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]},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}]}]]]], 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-context-menu.cjs",[[769,"ui-context-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"internalOpen":[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-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]},null,{"open":[{"syncFromProp":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-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"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"onOpenChange":0}]}]]],["ui-radio.cjs",[[769,"ui-radio",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"name":[1],"required":[4],"value":[1]},null,{"checked":[{"syncToInput":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}]}]]],["ui-tooltip.cjs",[[769,"ui-tooltip",{"for":[1],"open":[4],"defaultOpen":[4,"default-open"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncOverlay":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"]}]]],["ui-tree-item.cjs",[[769,"ui-tree-item",{"itemId":[1,"item-id"],"label":[1],"depth":[2],"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]},null,{"expanded":[{"syncExpandedFromProp":0}]}]]],["ui-menu.cjs",[[769,"ui-menu",{"open":[4],"defaultOpen":[4,"default-open"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["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-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]},null,{"open":[{"syncFromProp":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-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]},null,{"checked":[{"syncToInput":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-tooltip.cjs",[[769,"ui-tooltip",{"for":[1],"open":[4],"defaultOpen":[4,"default-open"],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncOverlay":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"]}]]],["ui-tree-item.cjs",[[769,"ui-tree-item",{"itemId":[1,"item-id"],"label":[1],"depth":[2],"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]},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}]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -32,8 +32,11 @@ function handleLightDismiss(event) {
|
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
const target = event.target;
|
|
35
|
-
if (target instanceof Node
|
|
36
|
-
|
|
35
|
+
if (target instanceof Node) {
|
|
36
|
+
if (top.element.contains(target))
|
|
37
|
+
return;
|
|
38
|
+
if (top.relatedElements?.some((element) => element.contains(target)))
|
|
39
|
+
return;
|
|
37
40
|
}
|
|
38
41
|
requestTopOverlayClose("light-dismiss", "pointer");
|
|
39
42
|
}
|