@floegence/floe-webapp-core 0.100.0 → 0.101.3
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/components/layout/BottomBarCompanion.js +125 -125
- package/dist/components/ui/Settings.d.ts +2 -0
- package/dist/components/ui/Settings.js +144 -105
- package/dist/components/ui/SurfaceAnchoredLayer.d.ts +2 -0
- package/dist/components/ui/SurfaceAnchoredLayer.js +44 -43
- package/dist/styles.css +1 -1
- package/dist/ui.css +2 -0
- package/package.json +1 -1
|
@@ -1,192 +1,231 @@
|
|
|
1
|
-
import { insert as e, createComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { cn as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
import { insert as e, createComponent as r, effect as C, className as N, setAttribute as y, spread as p, mergeProps as S, template as o } from "solid-js/web";
|
|
2
|
+
import { children as m, Show as c, splitProps as k, For as H } from "solid-js";
|
|
3
|
+
import { cn as w } from "../../utils/cn.js";
|
|
4
|
+
var A = /* @__PURE__ */ o("<div class=floe-settings-layout__mobile>"), L = /* @__PURE__ */ o("<div><aside class=floe-settings-layout__sidebar></aside><div class=floe-settings-layout__content>"), P = /* @__PURE__ */ o("<div class=floe-settings-navigation__search>"), B = /* @__PURE__ */ o("<nav class=floe-settings-navigation><div class=floe-settings-navigation__groups>"), F = /* @__PURE__ */ o("<div class=floe-settings-navigation__group><div class=floe-settings-navigation__label>"), I = /* @__PURE__ */ o("<button><span>"), R = /* @__PURE__ */ o("<h1>"), j = /* @__PURE__ */ o("<div class=floe-settings-section__title>"), x = /* @__PURE__ */ o("<p>"), q = /* @__PURE__ */ o("<div class=floe-settings-section__heading>"), z = /* @__PURE__ */ o("<div class=floe-settings-section__actions>"), D = /* @__PURE__ */ o("<header class=floe-settings-section__header>"), E = /* @__PURE__ */ o("<section><div class=floe-settings-section__body>"), G = /* @__PURE__ */ o("<h2>"), J = /* @__PURE__ */ o("<div>"), K = /* @__PURE__ */ o("<div class=floe-setting-row__control>"), M = /* @__PURE__ */ o("<div class=floe-setting-row__body>"), O = /* @__PURE__ */ o("<div><div class=floe-setting-row__main><div class=floe-setting-row__label><div><div class=floe-setting-row__title>");
|
|
5
|
+
function f(n) {
|
|
6
|
+
return n.toArray().some((t) => t != null && typeof t != "boolean" && t !== "");
|
|
7
|
+
}
|
|
8
|
+
function V(n) {
|
|
9
|
+
const t = m(() => n.mobileNavigation);
|
|
7
10
|
return (() => {
|
|
8
|
-
var
|
|
9
|
-
return e(
|
|
11
|
+
var s = L(), a = s.firstChild, i = a.nextSibling;
|
|
12
|
+
return e(a, () => n.sidebar), e(s, r(c, {
|
|
10
13
|
get when() {
|
|
11
|
-
return
|
|
14
|
+
return f(t);
|
|
12
15
|
},
|
|
13
16
|
get children() {
|
|
14
|
-
var g =
|
|
15
|
-
return e(g,
|
|
17
|
+
var g = A();
|
|
18
|
+
return e(g, t), g;
|
|
16
19
|
}
|
|
17
|
-
}),
|
|
20
|
+
}), i), e(i, () => n.children), C(() => N(s, w("floe-settings-layout", n.class))), s;
|
|
18
21
|
})();
|
|
19
22
|
}
|
|
20
|
-
function
|
|
23
|
+
function W(n) {
|
|
24
|
+
const t = m(() => n.search);
|
|
21
25
|
return (() => {
|
|
22
|
-
var
|
|
23
|
-
return e(
|
|
26
|
+
var s = B(), a = s.firstChild;
|
|
27
|
+
return e(s, r(c, {
|
|
24
28
|
get when() {
|
|
25
|
-
return t
|
|
29
|
+
return f(t);
|
|
26
30
|
},
|
|
27
31
|
get children() {
|
|
28
|
-
var i =
|
|
29
|
-
return e(i,
|
|
32
|
+
var i = P();
|
|
33
|
+
return e(i, t), i;
|
|
30
34
|
}
|
|
31
|
-
}),
|
|
35
|
+
}), a), e(a, r(c, {
|
|
32
36
|
get when() {
|
|
33
|
-
return
|
|
37
|
+
return n.groups.some((i) => i.items.length);
|
|
34
38
|
},
|
|
35
39
|
get fallback() {
|
|
36
|
-
return
|
|
40
|
+
return n.empty;
|
|
37
41
|
},
|
|
38
42
|
get children() {
|
|
39
|
-
return
|
|
43
|
+
return r(H, {
|
|
40
44
|
get each() {
|
|
41
|
-
return
|
|
45
|
+
return n.groups;
|
|
42
46
|
},
|
|
43
|
-
children: (i) =>
|
|
47
|
+
children: (i) => r(c, {
|
|
44
48
|
get when() {
|
|
45
49
|
return i.items.length;
|
|
46
50
|
},
|
|
47
51
|
get children() {
|
|
48
|
-
var
|
|
49
|
-
return e(
|
|
52
|
+
var g = F(), _ = g.firstChild;
|
|
53
|
+
return e(_, () => i.label), e(g, r(H, {
|
|
50
54
|
get each() {
|
|
51
55
|
return i.items;
|
|
52
56
|
},
|
|
53
|
-
children: (
|
|
54
|
-
var
|
|
55
|
-
return
|
|
57
|
+
children: (u) => (() => {
|
|
58
|
+
var l = I(), d = l.firstChild;
|
|
59
|
+
return p(l, S(() => u.attributes, {
|
|
56
60
|
type: "button",
|
|
57
61
|
get class() {
|
|
58
|
-
return
|
|
62
|
+
return w("floe-settings-navigation__item", u.attributes?.class);
|
|
59
63
|
},
|
|
60
64
|
get "aria-current"() {
|
|
61
|
-
return
|
|
65
|
+
return n.value === u.id ? "page" : void 0;
|
|
62
66
|
},
|
|
63
|
-
onClick: () =>
|
|
64
|
-
}), !1, !0), e(
|
|
67
|
+
onClick: () => n.onChange(u.id)
|
|
68
|
+
}), !1, !0), e(l, r(c, {
|
|
65
69
|
get when() {
|
|
66
|
-
return
|
|
70
|
+
return u.icon;
|
|
67
71
|
},
|
|
68
|
-
children: (
|
|
69
|
-
const
|
|
70
|
-
return
|
|
72
|
+
children: (h) => {
|
|
73
|
+
const v = h();
|
|
74
|
+
return r(v, {
|
|
71
75
|
class: "floe-settings-navigation__icon"
|
|
72
76
|
});
|
|
73
77
|
}
|
|
74
|
-
}),
|
|
78
|
+
}), d), e(d, () => u.label), l;
|
|
75
79
|
})()
|
|
76
|
-
}), null),
|
|
80
|
+
}), null), C(() => y(g, "data-settings-group", i.id)), g;
|
|
77
81
|
}
|
|
78
82
|
})
|
|
79
83
|
});
|
|
80
84
|
}
|
|
81
|
-
})),
|
|
85
|
+
})), C(() => y(s, "aria-label", n.label)), s;
|
|
82
86
|
})();
|
|
83
87
|
}
|
|
84
|
-
function
|
|
85
|
-
const [
|
|
88
|
+
function X(n) {
|
|
89
|
+
const [t, s] = k(n, ["title", "description", "badge", "actions", "variant", "showHeading", "class", "children"]), a = m(() => t.badge), i = m(() => t.actions), g = () => t.showHeading !== !1, _ = () => g() || f(a), u = () => _() || !!t.description;
|
|
86
90
|
return (() => {
|
|
87
|
-
var
|
|
88
|
-
return
|
|
91
|
+
var l = E(), d = l.firstChild;
|
|
92
|
+
return p(l, S(s, {
|
|
89
93
|
get class() {
|
|
90
|
-
return
|
|
94
|
+
return w("floe-settings-section", t.class);
|
|
91
95
|
},
|
|
92
96
|
get "data-settings-variant"() {
|
|
93
|
-
return
|
|
94
|
-
}
|
|
95
|
-
}), !1, !0), e(l, s(d, {
|
|
96
|
-
get when() {
|
|
97
|
-
return n.variant === "page";
|
|
98
|
-
},
|
|
99
|
-
get fallback() {
|
|
100
|
-
return (() => {
|
|
101
|
-
var r = z();
|
|
102
|
-
return e(r, () => n.title), r;
|
|
103
|
-
})();
|
|
104
|
-
},
|
|
105
|
-
get children() {
|
|
106
|
-
var r = R();
|
|
107
|
-
return e(r, () => n.title), r;
|
|
108
|
-
}
|
|
109
|
-
}), null), e(l, () => n.badge, null), e(g, s(d, {
|
|
110
|
-
get when() {
|
|
111
|
-
return n.description;
|
|
97
|
+
return t.variant ?? "section";
|
|
112
98
|
},
|
|
113
|
-
get
|
|
114
|
-
|
|
115
|
-
return e(r, () => n.description), r;
|
|
99
|
+
get "aria-label"() {
|
|
100
|
+
return s["aria-label"] ?? (!g() && !s["aria-labelledby"] ? t.title : void 0);
|
|
116
101
|
}
|
|
117
|
-
}),
|
|
102
|
+
}), !1, !0), e(l, r(c, {
|
|
118
103
|
get when() {
|
|
119
|
-
return
|
|
104
|
+
return u() || f(i);
|
|
120
105
|
},
|
|
121
106
|
get children() {
|
|
122
|
-
var
|
|
123
|
-
return e(
|
|
107
|
+
var h = D();
|
|
108
|
+
return e(h, r(c, {
|
|
109
|
+
get when() {
|
|
110
|
+
return u();
|
|
111
|
+
},
|
|
112
|
+
get children() {
|
|
113
|
+
var v = q();
|
|
114
|
+
return e(v, r(c, {
|
|
115
|
+
get when() {
|
|
116
|
+
return _();
|
|
117
|
+
},
|
|
118
|
+
get children() {
|
|
119
|
+
var $ = j();
|
|
120
|
+
return e($, r(c, {
|
|
121
|
+
get when() {
|
|
122
|
+
return g();
|
|
123
|
+
},
|
|
124
|
+
get children() {
|
|
125
|
+
return r(c, {
|
|
126
|
+
get when() {
|
|
127
|
+
return t.variant === "page";
|
|
128
|
+
},
|
|
129
|
+
get fallback() {
|
|
130
|
+
return (() => {
|
|
131
|
+
var b = G();
|
|
132
|
+
return e(b, () => t.title), b;
|
|
133
|
+
})();
|
|
134
|
+
},
|
|
135
|
+
get children() {
|
|
136
|
+
var b = R();
|
|
137
|
+
return e(b, () => t.title), b;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}), null), e($, a, null), $;
|
|
142
|
+
}
|
|
143
|
+
}), null), e(v, r(c, {
|
|
144
|
+
get when() {
|
|
145
|
+
return t.description;
|
|
146
|
+
},
|
|
147
|
+
get children() {
|
|
148
|
+
var $ = x();
|
|
149
|
+
return e($, () => t.description), $;
|
|
150
|
+
}
|
|
151
|
+
}), null), v;
|
|
152
|
+
}
|
|
153
|
+
}), null), e(h, r(c, {
|
|
154
|
+
get when() {
|
|
155
|
+
return f(i);
|
|
156
|
+
},
|
|
157
|
+
get children() {
|
|
158
|
+
var v = z();
|
|
159
|
+
return e(v, i), v;
|
|
160
|
+
}
|
|
161
|
+
}), null), h;
|
|
124
162
|
}
|
|
125
|
-
}),
|
|
163
|
+
}), d), e(d, () => t.children), l;
|
|
126
164
|
})();
|
|
127
165
|
}
|
|
128
|
-
function
|
|
129
|
-
const [
|
|
166
|
+
function Y(n) {
|
|
167
|
+
const [t, s] = k(n, ["class", "children"]);
|
|
130
168
|
return (() => {
|
|
131
|
-
var
|
|
132
|
-
return
|
|
169
|
+
var a = J();
|
|
170
|
+
return p(a, S(s, {
|
|
133
171
|
get class() {
|
|
134
|
-
return
|
|
172
|
+
return w("floe-settings-list", t.class);
|
|
135
173
|
},
|
|
136
174
|
"data-floe-surface": "card"
|
|
137
|
-
}), !1, !0), e(
|
|
175
|
+
}), !1, !0), e(a, () => t.children), a;
|
|
138
176
|
})();
|
|
139
177
|
}
|
|
140
|
-
function
|
|
178
|
+
function Z(n) {
|
|
179
|
+
const t = m(() => n.control), s = m(() => n.children);
|
|
141
180
|
return (() => {
|
|
142
|
-
var
|
|
143
|
-
return e(
|
|
181
|
+
var a = O(), i = a.firstChild, g = i.firstChild, _ = g.firstChild, u = _.firstChild;
|
|
182
|
+
return e(g, r(c, {
|
|
144
183
|
get when() {
|
|
145
|
-
return
|
|
184
|
+
return n.icon;
|
|
146
185
|
},
|
|
147
186
|
children: (l) => {
|
|
148
|
-
const
|
|
149
|
-
return
|
|
187
|
+
const d = l();
|
|
188
|
+
return r(d, {
|
|
150
189
|
class: "floe-setting-row__icon"
|
|
151
190
|
});
|
|
152
191
|
}
|
|
153
|
-
}),
|
|
192
|
+
}), _), e(u, () => n.title), e(_, r(c, {
|
|
154
193
|
get when() {
|
|
155
|
-
return
|
|
194
|
+
return n.description;
|
|
156
195
|
},
|
|
157
196
|
get children() {
|
|
158
|
-
var l =
|
|
159
|
-
return e(l, () =>
|
|
197
|
+
var l = x();
|
|
198
|
+
return e(l, () => n.description), l;
|
|
160
199
|
}
|
|
161
|
-
}), null), e(
|
|
200
|
+
}), null), e(i, r(c, {
|
|
162
201
|
get when() {
|
|
163
|
-
return t
|
|
202
|
+
return f(t);
|
|
164
203
|
},
|
|
165
204
|
get children() {
|
|
166
|
-
var l =
|
|
167
|
-
return e(l,
|
|
205
|
+
var l = K();
|
|
206
|
+
return e(l, t), l;
|
|
168
207
|
}
|
|
169
|
-
}), null), e(
|
|
208
|
+
}), null), e(a, r(c, {
|
|
170
209
|
get when() {
|
|
171
|
-
return
|
|
210
|
+
return f(s);
|
|
172
211
|
},
|
|
173
212
|
get children() {
|
|
174
|
-
var l =
|
|
175
|
-
return e(l,
|
|
213
|
+
var l = M();
|
|
214
|
+
return e(l, s), l;
|
|
176
215
|
}
|
|
177
|
-
}), null),
|
|
178
|
-
var
|
|
179
|
-
return
|
|
216
|
+
}), null), C((l) => {
|
|
217
|
+
var d = w("floe-setting-row", n.class), h = n.tone ?? "default";
|
|
218
|
+
return d !== l.e && N(a, l.e = d), h !== l.t && y(a, "data-tone", l.t = h), l;
|
|
180
219
|
}, {
|
|
181
220
|
e: void 0,
|
|
182
221
|
t: void 0
|
|
183
|
-
}),
|
|
222
|
+
}), a;
|
|
184
223
|
})();
|
|
185
224
|
}
|
|
186
225
|
export {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
226
|
+
Z as SettingRow,
|
|
227
|
+
V as SettingsLayout,
|
|
228
|
+
Y as SettingsList,
|
|
229
|
+
W as SettingsNavigation,
|
|
230
|
+
X as SettingsSection
|
|
192
231
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type JSX } from 'solid-js';
|
|
2
2
|
export interface SurfaceAnchoredLayerProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'children' | 'class' | 'style' | 'ref'> {
|
|
3
3
|
anchor: HTMLElement | undefined;
|
|
4
|
+
/** Global navigation may escape its source surface while retaining the anchor. */
|
|
5
|
+
portalScope?: 'surface' | 'viewport';
|
|
4
6
|
/** Changes when the anchor moves through a transform; no idle polling is used. */
|
|
5
7
|
revision?: unknown;
|
|
6
8
|
/** Screen-space clearance above labels outside the object bounds. */
|
|
@@ -1,66 +1,64 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { splitProps as Q, createSignal as
|
|
1
|
+
import { createComponent as L, mergeProps as K, memo as N } from "solid-js/web";
|
|
2
|
+
import { splitProps as Q, createSignal as m, createEffect as M, onCleanup as S, onMount as U, Show as Z, untrack as _ } from "solid-js";
|
|
3
3
|
import { SurfaceFloatingLayer as tt } from "./SurfaceFloatingLayer.js";
|
|
4
4
|
import { resolveFloatingBoundary as et } from "./surfaceFloatingBoundary.js";
|
|
5
5
|
import { observeViewport as ot } from "../../viewport.js";
|
|
6
|
-
import { resolveSurfacePortalHost as
|
|
7
|
-
function
|
|
8
|
-
const [e, $] = Q(H, ["anchor", "revision", "topOffset", "reservedSpace", "placement", "align", "gap", "children", "class", "style", "layerRef", "onAnchorDisconnect"]), [
|
|
6
|
+
import { resolveSurfacePortalHost as nt } from "./dialogSurfaceScope.js";
|
|
7
|
+
function ht(H) {
|
|
8
|
+
const [e, $] = Q(H, ["anchor", "portalScope", "revision", "topOffset", "reservedSpace", "placement", "align", "gap", "children", "class", "style", "layerRef", "onAnchorDisconnect"]), [R, k] = m(!1), [q, B] = m({
|
|
9
9
|
x: 0,
|
|
10
10
|
y: 0
|
|
11
|
-
}), [V, Y] =
|
|
12
|
-
let
|
|
13
|
-
const [O, X] =
|
|
11
|
+
}), [V, Y] = m("above"), [A, b] = m(!1), [D, T] = m(480), [F, W] = m();
|
|
12
|
+
let d, w = !1;
|
|
13
|
+
const [O, X] = m({
|
|
14
14
|
x: 0,
|
|
15
15
|
y: 0
|
|
16
|
-
}), [j, G] =
|
|
17
|
-
|
|
16
|
+
}), [j, G] = m(0), P = () => nt({
|
|
17
|
+
owner: e.portalScope === "viewport" ? document.documentElement : e.anchor
|
|
18
|
+
}), z = () => {
|
|
19
|
+
d = void 0;
|
|
18
20
|
const n = e.anchor, l = F();
|
|
19
21
|
if (!n || !l) return;
|
|
20
22
|
if (!n.isConnected) {
|
|
21
|
-
|
|
23
|
+
b(!1), w || e.onAnchorDisconnect?.(), w = !0;
|
|
22
24
|
return;
|
|
23
25
|
}
|
|
24
26
|
w = !1;
|
|
25
|
-
const o = et(
|
|
26
|
-
owner: n
|
|
27
|
-
}));
|
|
27
|
+
const o = et(P());
|
|
28
28
|
if (!o) {
|
|
29
|
-
|
|
29
|
+
b(!1);
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
const t = n.getBoundingClientRect(), s = e.reservedSpace,
|
|
33
|
-
T(Math.max(120, o.width - 24)), G(Math.max(0, o.bottom - (s?.bottom ?? 12) -
|
|
34
|
-
const
|
|
35
|
-
let p = Math.max(o.left + 12, Math.min(J, o.right -
|
|
36
|
-
const x = t.top - (e.topOffset ?? 0),
|
|
32
|
+
const t = n.getBoundingClientRect(), s = e.reservedSpace, f = o.top + (window.matchMedia("(max-width:760px)").matches ? s?.narrowTop ?? s?.top ?? 12 : s?.top ?? 12);
|
|
33
|
+
T(Math.max(120, o.width - 24)), G(Math.max(0, o.bottom - (s?.bottom ?? 12) - f));
|
|
34
|
+
const r = l.getBoundingClientRect(), I = (Math.max(o.left, t.left) + Math.min(o.right, t.right)) / 2, C = getComputedStyle(n).direction === "rtl", J = e.align === "start" ? C ? t.right - r.width : t.left : e.align === "end" ? C ? t.left : t.right - r.width : I - r.width / 2;
|
|
35
|
+
let p = Math.max(o.left + 12, Math.min(J, o.right - r.width - 12));
|
|
36
|
+
const x = t.top - (e.topOffset ?? 0), i = Math.max(0, e.gap ?? 12), g = x - r.height - i, y = Math.max(f, o.bottom - (s?.bottom ?? 12) - r.height), u = (v) => Math.max(f, Math.min(v, y));
|
|
37
37
|
let c = g, a = "above";
|
|
38
38
|
if (e.placement === "right" || e.placement === "left") {
|
|
39
|
-
const
|
|
40
|
-
a = e.placement, a === "right" && !
|
|
41
|
-
} else g <
|
|
39
|
+
const v = t.right + i + r.width <= o.right - 12, E = t.left - i - r.width >= o.left + 12;
|
|
40
|
+
a = e.placement, a === "right" && !v && E ? a = "left" : a === "left" && !E && v && (a = "right"), p = Math.max(o.left + 12, Math.min(a === "right" ? t.right + i : t.left - r.width - i, o.right - r.width - 12)), c = u(t.top + t.height / 2 - r.height / 2);
|
|
41
|
+
} else g < f ? t.bottom + i <= y ? (c = t.bottom + i, a = "below") : g >= o.top + 12 ? a = "above" : t.bottom + r.height + i <= o.bottom - 12 ? (c = t.bottom + i, a = "below") : t.right + r.width + i + 12 <= o.right ? (p = t.right + i, c = u(x), a = "right") : t.left - r.width - i - 12 >= o.left ? (p = t.left - r.width - i, c = u(x), a = "left") : (c = u(g), a = "edge") : c = Math.min(c, y);
|
|
42
42
|
X({
|
|
43
|
-
x: Math.max(18, Math.min(t.left + t.width / 2 - p, Math.max(18,
|
|
44
|
-
y: Math.max(18, Math.min(t.top + t.height / 2 - c, Math.max(18,
|
|
43
|
+
x: Math.max(18, Math.min(t.left + t.width / 2 - p, Math.max(18, r.width - 18))),
|
|
44
|
+
y: Math.max(18, Math.min(t.top + t.height / 2 - c, Math.max(18, r.height - 18)))
|
|
45
45
|
}), Y(a), B({
|
|
46
46
|
x: Math.round(p),
|
|
47
47
|
y: Math.round(c)
|
|
48
|
-
}),
|
|
48
|
+
}), b(t.right > o.left && t.left < o.right && t.bottom > o.top && t.top < o.bottom);
|
|
49
49
|
}, h = () => {
|
|
50
|
-
|
|
50
|
+
d === void 0 && typeof requestAnimationFrame == "function" && (d = requestAnimationFrame(z));
|
|
51
51
|
};
|
|
52
52
|
return M(() => {
|
|
53
|
-
e.anchor, e.revision, e.topOffset, e.reservedSpace, e.placement, e.align, e.gap, h();
|
|
53
|
+
e.anchor, e.portalScope, e.revision, e.topOffset, e.reservedSpace, e.placement, e.align, e.gap, h();
|
|
54
54
|
}), M(() => {
|
|
55
55
|
const n = F();
|
|
56
56
|
if (!n || typeof ResizeObserver > "u") return;
|
|
57
57
|
const l = new ResizeObserver(h);
|
|
58
|
-
l.observe(n),
|
|
58
|
+
l.observe(n), S(() => l.disconnect());
|
|
59
59
|
}), U(() => k(!0)), M(() => {
|
|
60
|
-
if (!
|
|
61
|
-
const n = e.anchor, l = typeof ResizeObserver == "function" ? new ResizeObserver(h) : void 0, o =
|
|
62
|
-
owner: n
|
|
63
|
-
}).boundaryHost;
|
|
60
|
+
if (!R()) return;
|
|
61
|
+
const n = e.anchor, l = typeof ResizeObserver == "function" ? new ResizeObserver(h) : void 0, o = P().boundaryHost;
|
|
64
62
|
o && l?.observe(o), n && l?.observe(n);
|
|
65
63
|
const t = new MutationObserver(h);
|
|
66
64
|
n && t.observe(n, {
|
|
@@ -74,21 +72,24 @@ function lt(H) {
|
|
|
74
72
|
childList: !0
|
|
75
73
|
}), s !== o); )
|
|
76
74
|
s = s.parentElement;
|
|
77
|
-
const
|
|
78
|
-
window.addEventListener("scroll", h, !0), h(),
|
|
79
|
-
l?.disconnect(), t.disconnect(),
|
|
75
|
+
const f = ot(window, h);
|
|
76
|
+
window.addEventListener("scroll", h, !0), h(), S(() => {
|
|
77
|
+
l?.disconnect(), t.disconnect(), f(), window.removeEventListener("scroll", h, !0);
|
|
80
78
|
});
|
|
81
|
-
}),
|
|
82
|
-
|
|
83
|
-
}),
|
|
79
|
+
}), S(() => {
|
|
80
|
+
d !== void 0 && cancelAnimationFrame(d);
|
|
81
|
+
}), L(Z, {
|
|
84
82
|
get when() {
|
|
85
|
-
return N(() => !!
|
|
83
|
+
return N(() => !!R())() && e.anchor;
|
|
86
84
|
},
|
|
87
85
|
get children() {
|
|
88
|
-
return
|
|
86
|
+
return L(tt, K($, {
|
|
89
87
|
get owner() {
|
|
90
88
|
return e.anchor;
|
|
91
89
|
},
|
|
90
|
+
get portalScope() {
|
|
91
|
+
return e.portalScope;
|
|
92
|
+
},
|
|
92
93
|
get position() {
|
|
93
94
|
return q();
|
|
94
95
|
},
|
|
@@ -114,7 +115,7 @@ function lt(H) {
|
|
|
114
115
|
},
|
|
115
116
|
layerRef: (n) => {
|
|
116
117
|
W(n), e.layerRef?.(n), queueMicrotask(() => _(() => {
|
|
117
|
-
n.isConnected && (
|
|
118
|
+
n.isConnected && (d !== void 0 && cancelAnimationFrame(d), z());
|
|
118
119
|
}));
|
|
119
120
|
},
|
|
120
121
|
get children() {
|
|
@@ -125,5 +126,5 @@ function lt(H) {
|
|
|
125
126
|
});
|
|
126
127
|
}
|
|
127
128
|
export {
|
|
128
|
-
|
|
129
|
+
ht as SurfaceAnchoredLayer
|
|
129
130
|
};
|