@floegence/floe-webapp-core 0.86.71 → 0.86.73
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,52 +1,52 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createMemo as
|
|
3
|
-
import { ViewActivationProvider as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { deferAfterPaint as
|
|
6
|
-
var
|
|
7
|
-
function
|
|
1
|
+
import { insert as C, createComponent as y, effect as P, className as K, setStyleProperty as O, template as N, memo as j, setAttribute as z } from "solid-js/web";
|
|
2
|
+
import { createMemo as m, createSignal as M, untrack as x, createEffect as q, For as D, createRenderEffect as G, onCleanup as H, ErrorBoundary as J, Suspense as L } from "solid-js";
|
|
3
|
+
import { ViewActivationProvider as Q } from "../../context/ViewActivationContext.js";
|
|
4
|
+
import { cn as V } from "../../utils/cn.js";
|
|
5
|
+
import { deferAfterPaint as T } from "../../utils/defer.js";
|
|
6
|
+
var R = /* @__PURE__ */ N("<div>");
|
|
7
|
+
function A(e) {
|
|
8
8
|
return String(e ?? "").trim();
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
10
|
+
function B(e) {
|
|
11
|
+
const u = [], s = /* @__PURE__ */ new Set();
|
|
12
12
|
for (const l of e) {
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const o = A(l?.id);
|
|
14
|
+
o && (s.has(o) || (s.add(o), u.push(o)));
|
|
15
15
|
}
|
|
16
|
-
return
|
|
16
|
+
return u;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
for (const
|
|
21
|
-
const d =
|
|
22
|
-
d &&
|
|
18
|
+
function U(e, u) {
|
|
19
|
+
const s = new Set(e), l = /* @__PURE__ */ new Map();
|
|
20
|
+
for (const o of u) {
|
|
21
|
+
const d = A(o?.id);
|
|
22
|
+
d && s.has(d) && (l.has(d) || l.set(d, o));
|
|
23
23
|
}
|
|
24
24
|
return l;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const [
|
|
26
|
+
function W(e) {
|
|
27
|
+
const [u, s] = M(0), [l, o] = M(!1);
|
|
28
28
|
let d = 0;
|
|
29
|
-
|
|
30
|
-
const
|
|
29
|
+
G(() => {
|
|
30
|
+
const i = e.active(), c = e.activationMode();
|
|
31
31
|
d += 1;
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
34
|
-
|
|
32
|
+
const w = d;
|
|
33
|
+
if (!i) {
|
|
34
|
+
o(!1);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
const f = () => {
|
|
38
|
-
|
|
38
|
+
w !== d || !e.active() || x(l) || (o(!0), s((S) => S + 1));
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
}),
|
|
40
|
+
c === "after-paint" ? T(f) : f();
|
|
41
|
+
}), H(() => {
|
|
42
42
|
d += 1;
|
|
43
43
|
});
|
|
44
|
-
const
|
|
44
|
+
const E = x(() => ({
|
|
45
45
|
id: e.id,
|
|
46
46
|
visible: e.active,
|
|
47
47
|
active: l,
|
|
48
|
-
activationSeq:
|
|
49
|
-
})), v = () => e.renderFallback ? y(
|
|
48
|
+
activationSeq: u
|
|
49
|
+
})), v = () => e.renderFallback ? y(L, {
|
|
50
50
|
get fallback() {
|
|
51
51
|
return e.renderFallback(e.id);
|
|
52
52
|
},
|
|
@@ -54,102 +54,105 @@ function U(e) {
|
|
|
54
54
|
return e.children;
|
|
55
55
|
}
|
|
56
56
|
}) : e.children;
|
|
57
|
-
return y(
|
|
58
|
-
value:
|
|
57
|
+
return y(Q, {
|
|
58
|
+
value: E,
|
|
59
59
|
get children() {
|
|
60
|
-
var
|
|
61
|
-
return
|
|
62
|
-
var
|
|
63
|
-
return () =>
|
|
64
|
-
fallback: (
|
|
60
|
+
var i = R();
|
|
61
|
+
return C(i, (() => {
|
|
62
|
+
var c = j(() => !!e.renderError);
|
|
63
|
+
return () => c() ? y(J, {
|
|
64
|
+
fallback: (w, f) => e.renderError(w, f, e.id),
|
|
65
65
|
get children() {
|
|
66
66
|
return v();
|
|
67
67
|
}
|
|
68
68
|
}) : v();
|
|
69
|
-
})()),
|
|
70
|
-
var
|
|
71
|
-
return
|
|
69
|
+
})()), P((c) => {
|
|
70
|
+
var w = e.class, f = e.id, S = e.active() ? void 0 : "true", g = !e.active(), I = e.active() ? "block" : "none";
|
|
71
|
+
return w !== c.e && K(i, c.e = w), f !== c.t && z(i, "data-floe-keep-alive-view", c.t = f), S !== c.a && z(i, "aria-hidden", c.a = S), g !== c.o && (i.inert = c.o = g), I !== c.i && O(i, "display", c.i = I), c;
|
|
72
72
|
}, {
|
|
73
73
|
e: void 0,
|
|
74
74
|
t: void 0,
|
|
75
75
|
a: void 0,
|
|
76
76
|
o: void 0,
|
|
77
77
|
i: void 0
|
|
78
|
-
}),
|
|
78
|
+
}), i;
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
let
|
|
88
|
-
const
|
|
89
|
-
for (const b of
|
|
90
|
-
F.has(b) || (
|
|
91
|
-
for (const b of
|
|
92
|
-
const k =
|
|
93
|
-
k && F.has(k) && (
|
|
82
|
+
function p(e) {
|
|
83
|
+
const u = () => e.lazyMount !== !1, s = () => e.keepMounted !== !1, l = () => e.activationMode ?? "sync", o = m(() => B(e.views)), [d, E] = M(x(() => U(B(e.views), e.views))), v = m(() => A(e.activeId));
|
|
84
|
+
q(() => {
|
|
85
|
+
const n = o(), t = e.views;
|
|
86
|
+
E((r) => {
|
|
87
|
+
let a = !1;
|
|
88
|
+
const h = new Map(r), F = new Set(n);
|
|
89
|
+
for (const b of h.keys())
|
|
90
|
+
F.has(b) || (h.delete(b), a = !0);
|
|
91
|
+
for (const b of t) {
|
|
92
|
+
const k = A(b?.id);
|
|
93
|
+
k && F.has(k) && (h.has(k) || (h.set(k, b), a = !0));
|
|
94
94
|
}
|
|
95
|
-
return
|
|
95
|
+
return a ? h : r;
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
|
-
const
|
|
99
|
-
order:
|
|
98
|
+
const i = m(() => ({
|
|
99
|
+
order: o(),
|
|
100
100
|
byId: d()
|
|
101
|
-
})),
|
|
102
|
-
if (!
|
|
103
|
-
if (!
|
|
104
|
-
const
|
|
105
|
-
return
|
|
106
|
-
}, [
|
|
107
|
-
|
|
108
|
-
if (!
|
|
109
|
-
const
|
|
110
|
-
f((
|
|
111
|
-
let
|
|
112
|
-
const
|
|
113
|
-
for (const
|
|
114
|
-
if (!
|
|
115
|
-
|
|
101
|
+
})), c = () => {
|
|
102
|
+
if (!s()) return /* @__PURE__ */ new Set();
|
|
103
|
+
if (!u()) return new Set(i().order);
|
|
104
|
+
const n = v();
|
|
105
|
+
return n ? i().byId.has(n) ? /* @__PURE__ */ new Set([n]) : /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set();
|
|
106
|
+
}, [w, f] = M(c());
|
|
107
|
+
q(() => {
|
|
108
|
+
if (!s()) return;
|
|
109
|
+
const n = new Set(i().order);
|
|
110
|
+
f((t) => {
|
|
111
|
+
let r = !1;
|
|
112
|
+
const a = /* @__PURE__ */ new Set();
|
|
113
|
+
for (const h of t) {
|
|
114
|
+
if (!n.has(h)) {
|
|
115
|
+
r = !0;
|
|
116
116
|
continue;
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
a.add(h);
|
|
119
119
|
}
|
|
120
|
-
return
|
|
120
|
+
return r ? a : t;
|
|
121
121
|
});
|
|
122
|
-
}),
|
|
123
|
-
if (!
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
128
|
-
return
|
|
122
|
+
}), q(() => {
|
|
123
|
+
if (!s() || !u()) return;
|
|
124
|
+
const n = v();
|
|
125
|
+
n && i().byId.has(n) && f((t) => {
|
|
126
|
+
if (t.has(n)) return t;
|
|
127
|
+
const r = new Set(t);
|
|
128
|
+
return r.add(n), r;
|
|
129
129
|
});
|
|
130
130
|
});
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
if (!
|
|
134
|
-
return
|
|
135
|
-
if (!
|
|
136
|
-
const
|
|
137
|
-
return
|
|
138
|
-
}), g =
|
|
139
|
-
const t =
|
|
140
|
-
return
|
|
131
|
+
const S = m(() => {
|
|
132
|
+
const n = i().order, t = v();
|
|
133
|
+
if (!s())
|
|
134
|
+
return t ? i().byId.has(t) ? [t] : [] : [];
|
|
135
|
+
if (!u()) return n;
|
|
136
|
+
const r = w();
|
|
137
|
+
return n.filter((a) => r.has(a) || a === t);
|
|
138
|
+
}), g = m((n) => {
|
|
139
|
+
const t = new Set(S());
|
|
140
|
+
return [...n.filter((r) => t.delete(r)), ...t];
|
|
141
|
+
}, []), I = m(() => {
|
|
142
|
+
const n = v();
|
|
143
|
+
return n ? i().byId.has(n) : !1;
|
|
141
144
|
});
|
|
142
145
|
return (() => {
|
|
143
|
-
var
|
|
144
|
-
return
|
|
146
|
+
var n = R();
|
|
147
|
+
return C(n, y(D, {
|
|
145
148
|
get each() {
|
|
146
|
-
return
|
|
149
|
+
return g();
|
|
147
150
|
},
|
|
148
|
-
children: (
|
|
149
|
-
const
|
|
150
|
-
return y(
|
|
151
|
-
id:
|
|
152
|
-
active: () => v() ===
|
|
151
|
+
children: (t) => {
|
|
152
|
+
const r = m(() => d().get(t));
|
|
153
|
+
return y(W, {
|
|
154
|
+
id: t,
|
|
155
|
+
active: () => v() === t,
|
|
153
156
|
activationMode: l,
|
|
154
157
|
get renderFallback() {
|
|
155
158
|
return e.renderFallback;
|
|
@@ -158,22 +161,22 @@ function $(e) {
|
|
|
158
161
|
return e.renderError;
|
|
159
162
|
},
|
|
160
163
|
get class() {
|
|
161
|
-
return
|
|
164
|
+
return V("absolute inset-0", r()?.class);
|
|
162
165
|
},
|
|
163
166
|
get children() {
|
|
164
|
-
return
|
|
167
|
+
return r()?.render();
|
|
165
168
|
}
|
|
166
169
|
});
|
|
167
170
|
}
|
|
168
|
-
})),
|
|
169
|
-
var
|
|
170
|
-
return
|
|
171
|
+
})), P((t) => {
|
|
172
|
+
var r = V("relative h-full min-h-0 w-full", e.class), a = I() ? "block" : "none";
|
|
173
|
+
return r !== t.e && K(n, t.e = r), a !== t.t && O(n, "display", t.t = a), t;
|
|
171
174
|
}, {
|
|
172
175
|
e: void 0,
|
|
173
176
|
t: void 0
|
|
174
|
-
}),
|
|
177
|
+
}), n;
|
|
175
178
|
})();
|
|
176
179
|
}
|
|
177
180
|
export {
|
|
178
|
-
|
|
181
|
+
p as KeepAliveStack
|
|
179
182
|
};
|