@floegence/floe-webapp-core 0.75.0 → 0.77.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.
@@ -1,25 +1,34 @@
1
- import { insert as n, createComponent as s, effect as v, className as b, setAttribute as h, spread as f, mergeProps as $, template as c } from "solid-js/web";
2
- import { Show as d, splitProps as w, For as m } from "solid-js";
1
+ import { insert as e, createComponent as s, effect as v, className as b, setAttribute as h, spread as f, mergeProps as $, template as o } from "solid-js/web";
2
+ import { Show as d, children as N, splitProps as w, For as m } from "solid-js";
3
3
  import { cn as u } from "../../utils/cn.js";
4
- var x = /* @__PURE__ */ c("<div><aside class=floe-settings-layout__sidebar></aside><div class=floe-settings-layout__mobile></div><div class=floe-settings-layout__content>"), k = /* @__PURE__ */ c("<div class=floe-settings-navigation__search>"), N = /* @__PURE__ */ c("<nav class=floe-settings-navigation><div class=floe-settings-navigation__groups>"), L = /* @__PURE__ */ c("<div class=floe-settings-navigation__group><div class=floe-settings-navigation__label>"), P = /* @__PURE__ */ c("<button><span>"), A = /* @__PURE__ */ c("<h1>"), C = /* @__PURE__ */ c("<p>"), F = /* @__PURE__ */ c("<div class=floe-settings-section__actions>"), R = /* @__PURE__ */ c("<section><header class=floe-settings-section__header><div class=floe-settings-section__heading><div class=floe-settings-section__title></div></div></header><div class=floe-settings-section__body>"), j = /* @__PURE__ */ c("<h2>"), q = /* @__PURE__ */ c("<div>"), z = /* @__PURE__ */ c("<div class=floe-setting-row__control>"), B = /* @__PURE__ */ c("<div class=floe-setting-row__body>"), D = /* @__PURE__ */ c("<div><div class=floe-setting-row__main><div class=floe-setting-row__label><div><div class=floe-setting-row__title>");
5
- function I(t) {
4
+ var k = /* @__PURE__ */ o("<div class=floe-settings-layout__mobile>"), x = /* @__PURE__ */ o("<div><aside class=floe-settings-layout__sidebar></aside><div class=floe-settings-layout__content>"), A = /* @__PURE__ */ o("<div class=floe-settings-navigation__search>"), L = /* @__PURE__ */ o("<nav class=floe-settings-navigation><div class=floe-settings-navigation__groups>"), P = /* @__PURE__ */ o("<div class=floe-settings-navigation__group><div class=floe-settings-navigation__label>"), F = /* @__PURE__ */ o("<button><span>"), R = /* @__PURE__ */ o("<h1>"), C = /* @__PURE__ */ o("<p>"), j = /* @__PURE__ */ o("<div class=floe-settings-section__actions>"), q = /* @__PURE__ */ o("<section><header class=floe-settings-section__header><div class=floe-settings-section__heading><div class=floe-settings-section__title></div></div></header><div class=floe-settings-section__body>"), z = /* @__PURE__ */ o("<h2>"), B = /* @__PURE__ */ o("<div>"), D = /* @__PURE__ */ o("<div class=floe-setting-row__control>"), E = /* @__PURE__ */ o("<div class=floe-setting-row__body>"), G = /* @__PURE__ */ o("<div><div class=floe-setting-row__main><div class=floe-setting-row__label><div><div class=floe-setting-row__title>");
5
+ function K(t) {
6
+ const n = N(() => t.mobileNavigation);
6
7
  return (() => {
7
- var e = x(), o = e.firstChild, i = o.nextSibling, a = i.nextSibling;
8
- return n(o, () => t.sidebar), n(i, () => t.mobileNavigation), n(a, () => t.children), v(() => b(e, u("floe-settings-layout", t.class))), e;
8
+ var c = x(), i = c.firstChild, a = i.nextSibling;
9
+ return e(i, () => t.sidebar), e(c, s(d, {
10
+ get when() {
11
+ return n.toArray().some((g) => g != null && typeof g != "boolean" && g !== "");
12
+ },
13
+ get children() {
14
+ var g = k();
15
+ return e(g, n), g;
16
+ }
17
+ }), a), e(a, () => t.children), v(() => b(c, u("floe-settings-layout", t.class))), c;
9
18
  })();
10
19
  }
11
- function J(t) {
20
+ function M(t) {
12
21
  return (() => {
13
- var e = N(), o = e.firstChild;
14
- return n(e, s(d, {
22
+ var n = L(), c = n.firstChild;
23
+ return e(n, s(d, {
15
24
  get when() {
16
25
  return t.search;
17
26
  },
18
27
  get children() {
19
- var i = k();
20
- return n(i, () => t.search), i;
28
+ var i = A();
29
+ return e(i, () => t.search), i;
21
30
  }
22
- }), o), n(o, s(d, {
31
+ }), c), e(c, s(d, {
23
32
  get when() {
24
33
  return t.groups.some((i) => i.items.length);
25
34
  },
@@ -36,14 +45,14 @@ function J(t) {
36
45
  return i.items.length;
37
46
  },
38
47
  get children() {
39
- var a = L(), _ = a.firstChild;
40
- return n(_, () => i.label), n(a, s(m, {
48
+ var a = P(), g = a.firstChild;
49
+ return e(g, () => i.label), e(a, s(m, {
41
50
  get each() {
42
51
  return i.items;
43
52
  },
44
53
  children: (l) => (() => {
45
- var g = P(), r = g.firstChild;
46
- return f(g, $(() => l.attributes, {
54
+ var _ = F(), r = _.firstChild;
55
+ return f(_, $(() => l.attributes, {
47
56
  type: "button",
48
57
  get class() {
49
58
  return u("floe-settings-navigation__item", l.attributes?.class);
@@ -52,132 +61,132 @@ function J(t) {
52
61
  return t.value === l.id ? "page" : void 0;
53
62
  },
54
63
  onClick: () => t.onChange(l.id)
55
- }), !1, !0), n(g, s(d, {
64
+ }), !1, !0), e(_, s(d, {
56
65
  get when() {
57
66
  return l.icon;
58
67
  },
59
- children: (S) => {
60
- const y = S();
61
- return s(y, {
68
+ children: (y) => {
69
+ const S = y();
70
+ return s(S, {
62
71
  class: "floe-settings-navigation__icon"
63
72
  });
64
73
  }
65
- }), r), n(r, () => l.label), g;
74
+ }), r), e(r, () => l.label), _;
66
75
  })()
67
76
  }), null), v(() => h(a, "data-settings-group", i.id)), a;
68
77
  }
69
78
  })
70
79
  });
71
80
  }
72
- })), v(() => h(e, "aria-label", t.label)), e;
81
+ })), v(() => h(n, "aria-label", t.label)), n;
73
82
  })();
74
83
  }
75
- function K(t) {
76
- const [e, o] = w(t, ["title", "description", "badge", "actions", "variant", "class", "children"]);
84
+ function O(t) {
85
+ const [n, c] = w(t, ["title", "description", "badge", "actions", "variant", "class", "children"]);
77
86
  return (() => {
78
- var i = R(), a = i.firstChild, _ = a.firstChild, l = _.firstChild, g = a.nextSibling;
79
- return f(i, $(o, {
87
+ var i = q(), a = i.firstChild, g = a.firstChild, l = g.firstChild, _ = a.nextSibling;
88
+ return f(i, $(c, {
80
89
  get class() {
81
- return u("floe-settings-section", e.class);
90
+ return u("floe-settings-section", n.class);
82
91
  },
83
92
  get "data-settings-variant"() {
84
- return e.variant ?? "section";
93
+ return n.variant ?? "section";
85
94
  }
86
- }), !1, !0), n(l, s(d, {
95
+ }), !1, !0), e(l, s(d, {
87
96
  get when() {
88
- return e.variant === "page";
97
+ return n.variant === "page";
89
98
  },
90
99
  get fallback() {
91
100
  return (() => {
92
- var r = j();
93
- return n(r, () => e.title), r;
101
+ var r = z();
102
+ return e(r, () => n.title), r;
94
103
  })();
95
104
  },
96
105
  get children() {
97
- var r = A();
98
- return n(r, () => e.title), r;
106
+ var r = R();
107
+ return e(r, () => n.title), r;
99
108
  }
100
- }), null), n(l, () => e.badge, null), n(_, s(d, {
109
+ }), null), e(l, () => n.badge, null), e(g, s(d, {
101
110
  get when() {
102
- return e.description;
111
+ return n.description;
103
112
  },
104
113
  get children() {
105
114
  var r = C();
106
- return n(r, () => e.description), r;
115
+ return e(r, () => n.description), r;
107
116
  }
108
- }), null), n(a, s(d, {
117
+ }), null), e(a, s(d, {
109
118
  get when() {
110
- return e.actions;
119
+ return n.actions;
111
120
  },
112
121
  get children() {
113
- var r = F();
114
- return n(r, () => e.actions), r;
122
+ var r = j();
123
+ return e(r, () => n.actions), r;
115
124
  }
116
- }), null), n(g, () => e.children), i;
125
+ }), null), e(_, () => n.children), i;
117
126
  })();
118
127
  }
119
- function M(t) {
120
- const [e, o] = w(t, ["class", "children"]);
128
+ function Q(t) {
129
+ const [n, c] = w(t, ["class", "children"]);
121
130
  return (() => {
122
- var i = q();
123
- return f(i, $(o, {
131
+ var i = B();
132
+ return f(i, $(c, {
124
133
  get class() {
125
- return u("floe-settings-list", e.class);
134
+ return u("floe-settings-list", n.class);
126
135
  },
127
136
  "data-floe-surface": "card"
128
- }), !1, !0), n(i, () => e.children), i;
137
+ }), !1, !0), e(i, () => n.children), i;
129
138
  })();
130
139
  }
131
- function O(t) {
140
+ function T(t) {
132
141
  return (() => {
133
- var e = D(), o = e.firstChild, i = o.firstChild, a = i.firstChild, _ = a.firstChild;
134
- return n(i, s(d, {
142
+ var n = G(), c = n.firstChild, i = c.firstChild, a = i.firstChild, g = a.firstChild;
143
+ return e(i, s(d, {
135
144
  get when() {
136
145
  return t.icon;
137
146
  },
138
147
  children: (l) => {
139
- const g = l();
140
- return s(g, {
148
+ const _ = l();
149
+ return s(_, {
141
150
  class: "floe-setting-row__icon"
142
151
  });
143
152
  }
144
- }), a), n(_, () => t.title), n(a, s(d, {
153
+ }), a), e(g, () => t.title), e(a, s(d, {
145
154
  get when() {
146
155
  return t.description;
147
156
  },
148
157
  get children() {
149
158
  var l = C();
150
- return n(l, () => t.description), l;
159
+ return e(l, () => t.description), l;
151
160
  }
152
- }), null), n(o, s(d, {
161
+ }), null), e(c, s(d, {
153
162
  get when() {
154
163
  return t.control;
155
164
  },
156
165
  get children() {
157
- var l = z();
158
- return n(l, () => t.control), l;
166
+ var l = D();
167
+ return e(l, () => t.control), l;
159
168
  }
160
- }), null), n(e, s(d, {
169
+ }), null), e(n, s(d, {
161
170
  get when() {
162
171
  return t.children;
163
172
  },
164
173
  get children() {
165
- var l = B();
166
- return n(l, () => t.children), l;
174
+ var l = E();
175
+ return e(l, () => t.children), l;
167
176
  }
168
177
  }), null), v((l) => {
169
- var g = u("floe-setting-row", t.class), r = t.tone ?? "default";
170
- return g !== l.e && b(e, l.e = g), r !== l.t && h(e, "data-tone", l.t = r), l;
178
+ var _ = u("floe-setting-row", t.class), r = t.tone ?? "default";
179
+ return _ !== l.e && b(n, l.e = _), r !== l.t && h(n, "data-tone", l.t = r), l;
171
180
  }, {
172
181
  e: void 0,
173
182
  t: void 0
174
- }), e;
183
+ }), n;
175
184
  })();
176
185
  }
177
186
  export {
178
- O as SettingRow,
179
- I as SettingsLayout,
180
- M as SettingsList,
181
- J as SettingsNavigation,
182
- K as SettingsSection
187
+ T as SettingRow,
188
+ K as SettingsLayout,
189
+ Q as SettingsList,
190
+ M as SettingsNavigation,
191
+ O as SettingsSection
183
192
  };
@@ -0,0 +1,16 @@
1
+ /* Apply only to remote pixels, never local chrome or the editable IME element. */
2
+ [data-floe-remote-pointer] {
3
+ touch-action: pinch-zoom;
4
+ user-select: none;
5
+ -webkit-user-select: none;
6
+ -webkit-touch-callout: none;
7
+ }
8
+ .floe-remote-pointer-hold {
9
+ position: fixed;
10
+ width: 28px;
11
+ height: 28px;
12
+ margin: -14px;
13
+ border: 2px solid var(--ring, #808080);
14
+ border-radius: 50%;
15
+ pointer-events: none;
16
+ }
@@ -0,0 +1,47 @@
1
+ /** Viewport CSS coordinates and browser modifiers, independent of image density. */
2
+ export interface RemotePointerPosition {
3
+ clientX: number;
4
+ clientY: number;
5
+ shiftKey: boolean;
6
+ ctrlKey: boolean;
7
+ altKey: boolean;
8
+ metaKey: boolean;
9
+ pointerType: string;
10
+ }
11
+ export type RemotePointerCommand = RemotePointerPosition & ({
12
+ kind: 'move';
13
+ } | {
14
+ kind: 'down' | 'up';
15
+ button: number;
16
+ clicks: number;
17
+ } | {
18
+ kind: 'scroll';
19
+ dx: number;
20
+ dy: number;
21
+ });
22
+ export interface RemotePointerOptions<T> {
23
+ /** Stable owner; resolveTarget excludes local chrome and unpainted content. */
24
+ surface: HTMLElement;
25
+ resolveTarget(event: MouseEvent): T | null;
26
+ isTargetValid(target: T): boolean;
27
+ sendPointer(command: RemotePointerCommand, target: T): void | boolean;
28
+ /** Clear platform scroll remainder; never release keyboard input here. */
29
+ release(target: T): void;
30
+ /** Called before a deliberate button press, never for touch scrolling. */
31
+ onActivate?(position: RemotePointerPosition, target: T): void;
32
+ onHoldChange?(position: (RemotePointerPosition & {
33
+ target: T;
34
+ }) | null): void;
35
+ }
36
+ export interface RemotePointerController {
37
+ /** Preserve ordering before the consumer delivers a later key/text command. */
38
+ flush(): void;
39
+ reset(): void;
40
+ dispose(): void;
41
+ }
42
+ /**
43
+ * Own remote content pointer events once. Mark its content elements with
44
+ * data-floe-remote-pointer and load remote-pointer.css before interaction.
45
+ * Keyboard, local window decorations and transport remain separate owners.
46
+ */
47
+ export declare function createRemotePointer<T>(options: RemotePointerOptions<T>): RemotePointerController;
@@ -0,0 +1,198 @@
1
+ function U(a) {
2
+ const { surface: l } = a, T = l.ownerDocument, c = T.defaultView;
3
+ if (!c) throw new Error("Remote pointer requires an attached document");
4
+ let o = null, f = null, u = null, p = null, y = 0, z = 0, M = !1, x = !1, D = 0, b = !1;
5
+ const g = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Map(), C = [], w = (e) => !x && a.isTargetValid(e), O = (e, t) => Math.hypot(e.clientX - t.clientX, e.clientY - t.clientY), v = (e) => ({
6
+ clientX: e.clientX,
7
+ clientY: e.clientY,
8
+ shiftKey: e.shiftKey,
9
+ ctrlKey: e.ctrlKey,
10
+ altKey: e.altKey,
11
+ metaKey: e.metaKey,
12
+ pointerType: "pointerType" in e ? String(e.pointerType) : "mouse"
13
+ });
14
+ function d(e, t, n, i = !1) {
15
+ const s = n;
16
+ e.addEventListener(t, s, { capture: i, passive: !1 }), C.push(() => e.removeEventListener(t, s, i));
17
+ }
18
+ function P(e, t) {
19
+ const n = w(t) && a.sendPointer(e, t) !== !1;
20
+ if (n && e.kind === "move")
21
+ for (const i of h.values()) i.target === t && (i.command = { ...i.command, ...v(e) });
22
+ return n;
23
+ }
24
+ function H() {
25
+ c.clearTimeout(z), z = 0, M && (M = !1, a.onHoldChange?.(null));
26
+ }
27
+ function X(e) {
28
+ L.delete(e), l.hasPointerCapture?.(e) && l.releasePointerCapture(e);
29
+ }
30
+ function B(e) {
31
+ l.setPointerCapture?.(e), L.add(e);
32
+ }
33
+ function k() {
34
+ y && c.cancelAnimationFrame(y), y = 0;
35
+ const e = f;
36
+ f = null, e && !P(e.command, e.target) && r();
37
+ }
38
+ function E(e, t) {
39
+ if (f && (f.target !== t || f.command.kind !== e.kind) && k(), !!w(t) && (e.kind === "scroll" && f?.command.kind === "scroll" && (e = { ...e, dx: f.command.dx + e.dx, dy: f.command.dy + e.dy }), f = { target: t, command: e }, !y)) {
40
+ const n = D, i = c.requestAnimationFrame(() => {
41
+ n === D && y === i && k();
42
+ });
43
+ y = i;
44
+ }
45
+ }
46
+ function I(e, t, n, i, s = 1) {
47
+ const m = h.get(i);
48
+ if (!e && !m) return;
49
+ e || h.delete(i);
50
+ const A = { ...t, kind: e ? "down" : "up", button: i, clicks: s };
51
+ P(A, n) && e && h.set(i, { target: n, command: A });
52
+ }
53
+ function K(e, t) {
54
+ const n = D;
55
+ return a.onActivate?.(e, t), n === D && w(t);
56
+ }
57
+ function Y(e, t, n, i = 1) {
58
+ K(e, t) && (I(!0, e, t, n, i), I(!1, e, t, n, i));
59
+ }
60
+ function r() {
61
+ D++, H(), y && c.cancelAnimationFrame(y), y = 0;
62
+ const e = /* @__PURE__ */ new Set();
63
+ o && e.add(o.target), f && e.add(f.target), u !== null && e.add(u), f = null, o = null, u = null, p = null, b = g.size > 0;
64
+ for (const [t, n] of h)
65
+ e.add(n.target), I(!1, n.command, n.target, t);
66
+ for (const t of e) a.release(t);
67
+ for (const t of [...L]) X(t);
68
+ }
69
+ function S(e) {
70
+ g.delete(e), X(e), g.size || (b = !1);
71
+ }
72
+ function _(e) {
73
+ const t = o;
74
+ if (!t || t.id !== e.pointerId) return;
75
+ if (!w(t.target)) {
76
+ r();
77
+ return;
78
+ }
79
+ const n = v(e);
80
+ if ((t.mode === "pending" || t.mode === "hold") && O(t.origin, n) > 8) {
81
+ const i = t.mode === "hold";
82
+ if (H(), p = null, t.mode = i ? "drag" : "scroll", i && K(t.origin, t.target) && I(!0, t.origin, t.target, 0), o !== t) return;
83
+ }
84
+ if (t.mode === "scroll") {
85
+ const i = t.last, s = i.clientX - n.clientX, m = i.clientY - n.clientY;
86
+ (s || m) && E({ ...t.origin, kind: "scroll", dx: s, dy: m }, t.target), t.last = n;
87
+ } else t.mode === "drag" && (E({ ...n, kind: "move" }, t.target), t.last = n);
88
+ }
89
+ d(l, "pointerdown", (e) => {
90
+ const t = a.resolveTarget(e);
91
+ if (t === null || !w(t)) return;
92
+ const n = v(e);
93
+ if (e.pointerType === "touch") {
94
+ if (g.add(e.pointerId), g.size > 1 || b) {
95
+ r();
96
+ return;
97
+ }
98
+ (o || h.size) && r(), k(), u !== null && (a.release(u), u = null), b = !1, o = { id: e.pointerId, target: t, origin: n, last: n, mode: "pending" };
99
+ const i = o;
100
+ z = c.setTimeout(() => {
101
+ if (z = 0, o === i) {
102
+ if (!w(t)) {
103
+ r();
104
+ return;
105
+ }
106
+ i.mode = "hold", M = !0, a.onHoldChange?.({ ...n, target: t });
107
+ }
108
+ }, 450);
109
+ } else {
110
+ if (g.size) {
111
+ r();
112
+ return;
113
+ }
114
+ o && (o.id !== e.pointerId || o.target !== t) && r(), k(), u !== null && (a.release(u), u = null), o = { id: e.pointerId, target: t, origin: n, last: n, mode: "direct" };
115
+ const i = e.button === 0 && p?.target === t && c.performance.now() - p.time <= 350 && O(p.position, n) <= 16;
116
+ K(n, t) && I(!0, n, t, e.button, Math.max(1, e.detail, i ? 2 : 1));
117
+ }
118
+ B(e.pointerId), e.preventDefault();
119
+ }), d(l, "pointermove", (e) => {
120
+ if (e.pointerType === "touch") {
121
+ _(e);
122
+ return;
123
+ }
124
+ if (b || g.size) return;
125
+ const t = o?.target ?? a.resolveTarget(e);
126
+ if (t === null || !w(t)) {
127
+ o && r();
128
+ return;
129
+ }
130
+ const n = v(e);
131
+ if (o) {
132
+ o.last = n;
133
+ for (const [i, s] of [[0, 1], [1, 4], [2, 2], [3, 8], [4, 16]]) {
134
+ const m = !!(e.buttons & s);
135
+ m !== h.has(i) && (k(), I(m, n, t, i));
136
+ }
137
+ }
138
+ E({ ...n, kind: "move" }, t);
139
+ }), d(l, "pointerup", (e) => {
140
+ const t = o;
141
+ if (t?.id === e.pointerId && !b)
142
+ if (!w(t.target)) r();
143
+ else if (e.pointerType === "touch") {
144
+ _(e), H();
145
+ const n = v(e);
146
+ if (t.mode === "pending") {
147
+ const i = c.performance.now(), s = p?.target === t.target && i - p.time <= 350 && O(p.position, n) <= 16;
148
+ Y(n, t.target, 0, s ? 2 : 1), p = s ? null : { target: t.target, position: n, time: i };
149
+ } else t.mode === "hold" ? (p = null, Y(n, t.target, 2)) : (k(), t.mode === "drag" && I(!1, n, t.target, 0));
150
+ a.release(t.target), o = null;
151
+ } else {
152
+ f?.command.kind === "move" && (f.command = { ...v(e), kind: "move" }), k();
153
+ const n = h.get(e.button)?.command;
154
+ for (const i of [...h.keys()]) I(!1, v(e), t.target, i, n && "clicks" in n ? n.clicks : 1);
155
+ p = e.button === 0 && n && "clicks" in n && n.clicks === 1 && O(t.origin, v(e)) <= 8 ? { target: t.target, position: v(e), time: c.performance.now() } : null, h.size || (o = null);
156
+ }
157
+ (!o || o.id !== e.pointerId) && S(e.pointerId);
158
+ }), d(l, "pointercancel", (e) => {
159
+ r(), S(e.pointerId);
160
+ }), d(l, "lostpointercapture", (e) => {
161
+ L.has(e.pointerId) && (r(), S(e.pointerId));
162
+ }), d(T, "pointerup", (e) => {
163
+ o?.id !== e.pointerId && S(e.pointerId);
164
+ }), d(T, "pointercancel", (e) => S(e.pointerId)), d(T, "pointerdown", (e) => {
165
+ o && (e.pointerType === "touch" && e.pointerId !== o.id ? (g.add(e.pointerId), r()) : l.contains(e.target) || r());
166
+ }, !0), d(l, "wheel", (e) => {
167
+ const t = a.resolveTarget(e);
168
+ if (t === null || !w(t) || (e.preventDefault(), o || g.size)) return;
169
+ p = null, u !== null && u !== t && (k(), a.release(u)), u = t;
170
+ const n = e.deltaMode === 1 ? 16 : e.deltaMode === 2 ? l.clientWidth || c.innerWidth : 1, i = e.deltaMode === 1 ? 16 : e.deltaMode === 2 ? l.clientHeight || c.innerHeight : 1, s = e.deltaX * n, m = e.deltaY * i;
171
+ Number.isFinite(s) && Number.isFinite(m) && (s || m) && E({ ...v(e), kind: "scroll", dx: s, dy: m }, t);
172
+ });
173
+ for (const e of ["mousedown", "mouseup", "click", "dblclick", "contextmenu", "dragstart", "selectstart"])
174
+ d(l, e, (t) => {
175
+ a.resolveTarget(t) !== null && t.preventDefault();
176
+ });
177
+ for (const e of ["blur", "pagehide", "resize", "orientationchange"]) d(c, e, r);
178
+ if (d(T, "visibilitychange", () => {
179
+ T.hidden && r();
180
+ }), d(c, "scroll", r, !0), c.visualViewport && (d(c.visualViewport, "resize", r), d(c.visualViewport, "scroll", r)), typeof ResizeObserver < "u") {
181
+ let e = `${l.clientWidth}:${l.clientHeight}`;
182
+ const t = new ResizeObserver(() => {
183
+ const n = `${l.clientWidth}:${l.clientHeight}`;
184
+ n !== e && (e = n, r());
185
+ });
186
+ t.observe(l), C.push(() => t.disconnect());
187
+ }
188
+ return { flush: k, reset: r, dispose() {
189
+ if (!x) {
190
+ r(), x = !0;
191
+ for (const e of C) e();
192
+ g.clear();
193
+ }
194
+ } };
195
+ }
196
+ export {
197
+ U as createRemotePointer
198
+ };