@flemo/react 2.2.4 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +378 -378
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import e, { Activity as t, Children as n, createContext as r, createElement as i, isValidElement as a, useCallback as o, useContext as s, useEffect as c, useId as l, useImperativeHandle as u, useInsertionEffect as d, useLayoutEffect as f, useReducer as p, useRef as m, useState as h, useSyncExternalStore as ee } from "react";
|
|
2
|
-
import { ACTIVE_ATTR as te, ANIM_HOLD as g, ANIM_HOLD_ATTR as _,
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { createPortal as
|
|
2
|
+
import { ACTIVE_ATTR as te, ANIM_HOLD as g, ANIM_HOLD_ATTR as _, DEFAULT_COMMIT_FRACTION as v, DEFAULT_COMMIT_VELOCITY as y, LAYER_HOST_ATTR as ne, LAYER_OWNER_ATTR as b, LAYER_SLOT_ATTR as re, OVERLAY_LEVEL as x, STATUS_ATTR as S, TRANSITION_ATTR as ie, adoptEntryIdentity as ae, animHoldKey as oe, appendParamsQuery as se, attachMorph as C, beginMorphSwipe as ce, buildRoutePath as w, computeBarRiding as le, computeScreenFreeze as ue, computeScreenFreezeMode as T, consumeSelfInducedPop as de, createAnimHoldCoordinator as E, createBrowserHistoryDriver as D, createBrowserHistoryDriver as fe, createDecorator as pe, createHistoryStore as O, createMorphTransition as k, createNavigateStore as me, createNavigationController as A, createPartTransition as he, createRawDecorator as j, createRawMorphTransition as M, createRawPartTransition as N, createRawTransition as ge, createRouterScope as _e, createScreenSelector as ve, createScreenStore as P, createStepController as ye, createSwipeController as be, createTransition as xe, createTransitionEngine as Se, createTransitionStore as Ce, decoratorMap as we, eagerlyDecodeImages as Te, ensureScopeHistorySync as Ee, enteringInitialStyle as De, getMatchedPathPattern as Oe, isDesktopBlink as ke, isOpaqueColor as Ae, isServer as je, markSelfInducedPop as Me, matchesPathname as Ne, morphTransitionMap as Pe, observeBarHeight as Fe, observeViewportScrollHeight as Ie, partTransitionMap as Le, publishRideBox as Re, readStepParams as ze, registerMorphLayer as Be, registerPartLayer as Ve, registerTransitionDefinitions as He, releaseScopeHistorySync as Ue, resolvePartLayer as We, resolvePlatformProfile as Ge, resolveSwipeOptions as Ke, resolveTransition as qe, seedRouterEntry as Je, sharedBarsMatch as Ye, startFlemoRuntime as Xe, subscribeStepParamsRestore as Ze } from "@flemo/core";
|
|
3
|
+
import { Fragment as Qe, jsx as F, jsxs as $e } from "react/jsx-runtime";
|
|
4
|
+
import { createPortal as et, flushSync as tt } from "react-dom";
|
|
5
5
|
//#region src/stores/StoreContext.ts
|
|
6
|
-
var
|
|
6
|
+
var nt = r(null);
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/stores/useStores.ts
|
|
9
|
-
function
|
|
10
|
-
let e = s(
|
|
9
|
+
function I() {
|
|
10
|
+
let e = s(nt);
|
|
11
11
|
if (!e) throw Error("flemo stores are missing. Render inside a <Router>.");
|
|
12
12
|
return e;
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/history/HistoryListener.tsx
|
|
16
|
-
function
|
|
17
|
-
let e =
|
|
18
|
-
return c(() => (
|
|
16
|
+
function L() {
|
|
17
|
+
let e = I();
|
|
18
|
+
return c(() => (Ee(e), () => Ue(e)), [e]), null;
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/screen/ScreenContext.ts
|
|
@@ -41,7 +41,7 @@ function z() {
|
|
|
41
41
|
var B = r({}), V = r(() => {});
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/screen/ParamsProvider/ParamsReducer.ts
|
|
44
|
-
function
|
|
44
|
+
function rt(e, t) {
|
|
45
45
|
switch (t.type) {
|
|
46
46
|
case "SET": return t.params;
|
|
47
47
|
default: return e;
|
|
@@ -49,10 +49,10 @@ function H(e, t) {
|
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/screen/ParamsProvider/ParamsProvider.tsx
|
|
52
|
-
function
|
|
53
|
-
let { isActive: t, params: n } = z(), { driver: r } =
|
|
52
|
+
function it({ children: e }) {
|
|
53
|
+
let { isActive: t, params: n } = z(), { driver: r } = I(), [i, a] = p(rt, n);
|
|
54
54
|
return c(() => {
|
|
55
|
-
if (t) return
|
|
55
|
+
if (t) return Ze(r, (e) => a({
|
|
56
56
|
type: "SET",
|
|
57
57
|
params: e
|
|
58
58
|
}));
|
|
@@ -60,9 +60,9 @@ function U({ children: e }) {
|
|
|
60
60
|
t,
|
|
61
61
|
a,
|
|
62
62
|
r
|
|
63
|
-
]), /* @__PURE__ */
|
|
63
|
+
]), /* @__PURE__ */ F(V.Provider, {
|
|
64
64
|
value: a,
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ F(B.Provider, {
|
|
66
66
|
value: i,
|
|
67
67
|
children: e
|
|
68
68
|
})
|
|
@@ -70,42 +70,42 @@ function U({ children: e }) {
|
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_react@19.2.8/node_modules/zustand/esm/react.mjs
|
|
73
|
-
var
|
|
74
|
-
function
|
|
73
|
+
var at = (e) => e;
|
|
74
|
+
function ot(t, n = at) {
|
|
75
75
|
let r = e.useSyncExternalStore(t.subscribe, e.useCallback(() => n(t.getState()), [t, n]), e.useCallback(() => n(t.getInitialState()), [t, n]));
|
|
76
76
|
return e.useDebugValue(r), r;
|
|
77
77
|
}
|
|
78
78
|
//#endregion
|
|
79
79
|
//#region src/stores/useHistoryStore.ts
|
|
80
|
-
function
|
|
81
|
-
return
|
|
80
|
+
function H(e) {
|
|
81
|
+
return ot(I().history, e);
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/RouterIdContext.ts
|
|
85
|
-
var
|
|
85
|
+
var st = r(null);
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/renderer/Renderer.tsx
|
|
88
|
-
function
|
|
89
|
-
let t =
|
|
90
|
-
return
|
|
91
|
-
let [r] = n.toArray(e).filter((e) =>
|
|
92
|
-
return r ? /* @__PURE__ */
|
|
88
|
+
function ct({ children: e }) {
|
|
89
|
+
let t = H((e) => e.index), r = H((e) => e.histories), i = I(), a = s(R), o = s(st);
|
|
90
|
+
return ve(r, t).map((t) => {
|
|
91
|
+
let [r] = n.toArray(e).filter((e) => Ne(e.props.path, t.pathname));
|
|
92
|
+
return r ? /* @__PURE__ */ F(R.Provider, {
|
|
93
93
|
value: {
|
|
94
94
|
...t,
|
|
95
95
|
isPrev: t.isPrev || a.isPrev,
|
|
96
96
|
navigateStore: i.navigate,
|
|
97
97
|
routerId: o ?? void 0,
|
|
98
|
-
routePath:
|
|
98
|
+
routePath: Oe(r.props.path, t.pathname)
|
|
99
99
|
},
|
|
100
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ F(it, { children: r })
|
|
101
101
|
}, t.id) : null;
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region src/screen/MorphLayer/MorphLayer.tsx
|
|
106
|
-
function
|
|
106
|
+
function lt({ stores: e }) {
|
|
107
107
|
let t = m(null);
|
|
108
|
-
return f(() => (
|
|
108
|
+
return f(() => (Be(e.navigate, t.current), () => Be(e.navigate, null)), [e.navigate]), /* @__PURE__ */ F("div", {
|
|
109
109
|
ref: t,
|
|
110
110
|
"data-flemo-morph-layer": "",
|
|
111
111
|
"aria-hidden": "true",
|
|
@@ -118,9 +118,9 @@ function rt({ stores: e }) {
|
|
|
118
118
|
}
|
|
119
119
|
//#endregion
|
|
120
120
|
//#region src/screen/PartLayer/PartLayer.tsx
|
|
121
|
-
function
|
|
121
|
+
function ut({ stores: e }) {
|
|
122
122
|
let t = m(null);
|
|
123
|
-
return f(() => (
|
|
123
|
+
return f(() => (Ve(e.navigate, t.current), () => Ve(e.navigate, null)), [e.navigate]), /* @__PURE__ */ F("div", {
|
|
124
124
|
ref: t,
|
|
125
125
|
"data-flemo-part-layer": "",
|
|
126
126
|
"aria-hidden": "true",
|
|
@@ -133,14 +133,14 @@ function it({ stores: e }) {
|
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region src/screen/ScreenViewportContext.ts
|
|
136
|
-
var
|
|
137
|
-
function
|
|
138
|
-
return s(
|
|
136
|
+
var dt = r({ contained: !1 });
|
|
137
|
+
function ft() {
|
|
138
|
+
return s(dt);
|
|
139
139
|
}
|
|
140
140
|
//#endregion
|
|
141
141
|
//#region src/transition/styles.ts
|
|
142
|
-
function
|
|
143
|
-
d(() =>
|
|
142
|
+
function pt(e, t, n = [], r = []) {
|
|
143
|
+
d(() => He(e, t, n, r), [
|
|
144
144
|
e,
|
|
145
145
|
t,
|
|
146
146
|
n,
|
|
@@ -149,50 +149,50 @@ function st(e, t, n = [], r = []) {
|
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region src/utils/devDiagnostics.ts
|
|
152
|
-
function
|
|
152
|
+
function mt() {
|
|
153
153
|
return typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
!
|
|
155
|
+
function ht(e) {
|
|
156
|
+
!mt() || typeof console > "u" || console.error(`[flemo] ${e}`);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
if (
|
|
158
|
+
function gt(e) {
|
|
159
|
+
if (mt()) throw Error(`[flemo] ${e}`);
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/RouterDepthContext.ts
|
|
163
|
-
var
|
|
163
|
+
var U = r(0), W = r(null), _t = [
|
|
164
164
|
"current",
|
|
165
165
|
"parent",
|
|
166
166
|
"root",
|
|
167
167
|
"nearest-owner"
|
|
168
|
-
],
|
|
168
|
+
], vt = (e) => _t.includes(e), G = (e) => {
|
|
169
169
|
let t = [];
|
|
170
170
|
for (let n = e; n; n = n.parent) t.push(n);
|
|
171
171
|
return t;
|
|
172
172
|
};
|
|
173
|
-
function
|
|
174
|
-
return e.routePaths.length === 0 || e.routePaths.some((e) => e === t) ? !0 : n ?
|
|
173
|
+
function K(e, t, n) {
|
|
174
|
+
return e.routePaths.length === 0 || e.routePaths.some((e) => e === t) ? !0 : n ? Ne(e.routePaths, n) : !1;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
return
|
|
176
|
+
function q(e) {
|
|
177
|
+
return G(e).map((e, t) => {
|
|
178
178
|
let n = t === 0 ? "current" : `${t} level(s) up`;
|
|
179
179
|
return e.name ? `"${e.name}" (${n})` : `<unnamed> (${n})`;
|
|
180
180
|
}).join(", ");
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function yt({ from: e, target: t, path: n, pathname: r }) {
|
|
183
183
|
if (t === void 0) return {
|
|
184
184
|
node: e,
|
|
185
185
|
message: null
|
|
186
186
|
};
|
|
187
187
|
let i = null, a = null;
|
|
188
|
-
if (typeof t == "string" ?
|
|
189
|
-
let t =
|
|
188
|
+
if (typeof t == "string" ? vt(t) ? i = t : a = t : "scope" in t ? i = t.scope : a = t.name, a !== null) {
|
|
189
|
+
let t = G(e).find((e) => e.name === a);
|
|
190
190
|
return t ? {
|
|
191
191
|
node: t,
|
|
192
192
|
message: null
|
|
193
193
|
} : {
|
|
194
194
|
node: null,
|
|
195
|
-
message: `no <Router name="${a}"> encloses this call. Routers in scope: ${
|
|
195
|
+
message: `no <Router name="${a}"> encloses this call. Routers in scope: ${q(e)}.`
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
switch (i) {
|
|
@@ -204,7 +204,7 @@ function ht({ from: e, target: t, path: n, pathname: r }) {
|
|
|
204
204
|
message: "router: \"parent\" was requested, but the enclosing <Router> is the outermost one (it has no parent Router)."
|
|
205
205
|
};
|
|
206
206
|
case "root": {
|
|
207
|
-
let t =
|
|
207
|
+
let t = G(e);
|
|
208
208
|
return {
|
|
209
209
|
node: t[t.length - 1],
|
|
210
210
|
message: null
|
|
@@ -215,13 +215,13 @@ function ht({ from: e, target: t, path: n, pathname: r }) {
|
|
|
215
215
|
node: e,
|
|
216
216
|
message: "router: \"nearest-owner\" needs a route to search for, and pop() carries none. Falling back to \"current\" — name the Router explicitly for a cross-Router pop."
|
|
217
217
|
};
|
|
218
|
-
let t =
|
|
218
|
+
let t = G(e).find((e) => K(e, n, r));
|
|
219
219
|
return t ? {
|
|
220
220
|
node: t,
|
|
221
221
|
message: null
|
|
222
222
|
} : {
|
|
223
223
|
node: null,
|
|
224
|
-
message: `no <Router> in scope declares a <Route path="${n}">. Routers in scope: ${
|
|
224
|
+
message: `no <Router> in scope declares a <Route path="${n}">. Routers in scope: ${q(e)}.`
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
default: return {
|
|
@@ -230,117 +230,117 @@ function ht({ from: e, target: t, path: n, pathname: r }) {
|
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function bt(e) {
|
|
234
234
|
if (!e.name) return null;
|
|
235
235
|
for (let t = e.parent; t; t = t.parent) if (t.name === e.name) return t;
|
|
236
236
|
return null;
|
|
237
237
|
}
|
|
238
238
|
//#endregion
|
|
239
239
|
//#region src/Slot.tsx
|
|
240
|
-
var
|
|
241
|
-
function
|
|
242
|
-
return /* @__PURE__ */
|
|
240
|
+
var xt = { contained: !0 };
|
|
241
|
+
function St({ children: e, className: t, style: n }) {
|
|
242
|
+
return /* @__PURE__ */ F("div", {
|
|
243
243
|
className: t,
|
|
244
244
|
style: {
|
|
245
245
|
position: "relative",
|
|
246
246
|
overflow: "hidden",
|
|
247
247
|
...n
|
|
248
248
|
},
|
|
249
|
-
children: /* @__PURE__ */
|
|
250
|
-
value:
|
|
251
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ F(dt.Provider, {
|
|
250
|
+
value: xt,
|
|
251
|
+
children: /* @__PURE__ */ F(ct, { children: e })
|
|
252
252
|
})
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
255
|
//#endregion
|
|
256
256
|
//#region src/Router.tsx
|
|
257
|
-
function
|
|
257
|
+
function J(e) {
|
|
258
258
|
let t = null;
|
|
259
259
|
return n.forEach(e, (e) => {
|
|
260
260
|
if (t || !a(e)) return;
|
|
261
|
-
if (e.type ===
|
|
261
|
+
if (e.type === St) {
|
|
262
262
|
t = n.toArray(e.props.children).filter(a);
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
265
|
let r = e.props.children;
|
|
266
266
|
if (r) {
|
|
267
|
-
let e =
|
|
267
|
+
let e = J(r);
|
|
268
268
|
e && (t = e);
|
|
269
269
|
}
|
|
270
270
|
}), t;
|
|
271
271
|
}
|
|
272
|
-
var
|
|
273
|
-
function
|
|
274
|
-
let v = s(
|
|
275
|
-
c(() =>
|
|
276
|
-
let
|
|
277
|
-
routePaths:
|
|
272
|
+
var Ct = typeof window > "u" ? c : f, wt = () => () => {}, Y = () => !1, Tt = () => !0, Et = typeof window > "u" ? c : d, Dt = [], Ot = [], kt = [], At = [], jt = { contained: !0 };
|
|
273
|
+
function Mt({ children: e, name: t, strictRoutes: r = !1, initPath: i = "/", defaultTransitionName: o = "cupertino", transitions: u = Dt, decorators: d = Ot, partTransitions: f = kt, morphTransitions: p = At, history: m = "browser", createDriver: te, className: g, style: _ }) {
|
|
274
|
+
let v = s(U), y = l(), [ne, b] = h(!1);
|
|
275
|
+
c(() => b(!0), []);
|
|
276
|
+
let re = ne ? y : null, x = v > 0, S = m === "memory", ie = l(), oe = s(R), se = s(nt), C = x && oe.id ? `_F_${se?.routerKey ?? ""}${oe.id}_` : ie, ce = J(e), w = ce !== null, le = (ce ?? n.toArray(e).filter(a)).flatMap((e) => e.props?.path ? [e.props.path].flat() : []), ue = x ? null : se, T = ue !== null, de = te ?? fe, [E] = h(() => S ? null : de(T ? void 0 : C)), D = !x && !S && !je(), pe = D && E ? E.readPathname() : i || "/", O = pe.indexOf("?"), k = (O >= 0 ? pe.slice(0, O) : pe) || "/", me = D ? window.location.search : O >= 0 ? pe.slice(O) : "", A = ee(wt, Y, Tt), [he] = h(A), [j] = h(() => _e({
|
|
277
|
+
routePaths: le,
|
|
278
278
|
pathname: k,
|
|
279
279
|
search: me,
|
|
280
280
|
defaultTransitionName: o,
|
|
281
|
-
memory:
|
|
282
|
-
browserDriver:
|
|
283
|
-
hostedScope:
|
|
281
|
+
memory: S,
|
|
282
|
+
browserDriver: E,
|
|
283
|
+
hostedScope: ue,
|
|
284
284
|
deferEntryAdoption: A,
|
|
285
|
-
routerKey: T ? void 0 :
|
|
286
|
-
zoneEntryId:
|
|
287
|
-
persistKey:
|
|
285
|
+
routerKey: T ? void 0 : C,
|
|
286
|
+
zoneEntryId: x && !T && oe.id || void 0,
|
|
287
|
+
persistKey: x && !S && !T ? C : void 0
|
|
288
288
|
}));
|
|
289
|
-
|
|
289
|
+
Ct(() => {
|
|
290
290
|
j.transition.getState().defaultTransitionName !== o && j.transition.setState({ defaultTransitionName: o });
|
|
291
291
|
});
|
|
292
|
-
let M = s(
|
|
292
|
+
let M = s(W), [N] = h(() => ({
|
|
293
293
|
name: t,
|
|
294
294
|
stores: j,
|
|
295
|
-
routePaths:
|
|
295
|
+
routePaths: le,
|
|
296
296
|
strictRoutes: r,
|
|
297
297
|
parent: M,
|
|
298
298
|
depth: v
|
|
299
299
|
}));
|
|
300
|
-
|
|
301
|
-
N.name = t, N.stores = j, N.routePaths =
|
|
300
|
+
Et(() => {
|
|
301
|
+
N.name = t, N.stores = j, N.routePaths = le, N.strictRoutes = r, N.parent = M;
|
|
302
302
|
}), c(() => {
|
|
303
|
-
|
|
304
|
-
}, [N, t]),
|
|
303
|
+
bt(N) && ht(`duplicate <Router name="${N.name}">: an enclosing <Router> already uses that name, so \`router\` targets resolve to the nearer one. Give each nested Router a unique name.`);
|
|
304
|
+
}, [N, t]), Ct(() => (j.life.alive = !0, () => {
|
|
305
305
|
j.life.alive = !1;
|
|
306
|
-
}), [j]),
|
|
307
|
-
he &&
|
|
306
|
+
}), [j]), pt(u, d, f, p), c(() => Xe(), []), Ct(() => {
|
|
307
|
+
he && ae(j);
|
|
308
308
|
}, [he, j]), c(() => {
|
|
309
|
-
|
|
310
|
-
driver:
|
|
311
|
-
routerKey: T ? null :
|
|
312
|
-
nested:
|
|
309
|
+
S || !E || Je({
|
|
310
|
+
driver: E,
|
|
311
|
+
routerKey: T ? null : C,
|
|
312
|
+
nested: x && !T,
|
|
313
313
|
seedPathname: k,
|
|
314
314
|
defaultTransitionName: o,
|
|
315
315
|
rootParams: j.history.getState().histories[0]?.params ?? {}
|
|
316
316
|
});
|
|
317
317
|
}, [
|
|
318
|
-
b,
|
|
319
|
-
T,
|
|
320
|
-
y,
|
|
321
318
|
S,
|
|
319
|
+
T,
|
|
320
|
+
x,
|
|
321
|
+
C,
|
|
322
322
|
k,
|
|
323
323
|
o,
|
|
324
324
|
j.history,
|
|
325
|
-
|
|
325
|
+
E
|
|
326
326
|
]);
|
|
327
|
-
let
|
|
328
|
-
value:
|
|
329
|
-
children: /* @__PURE__ */
|
|
327
|
+
let ge = w ? e : /* @__PURE__ */ F(ct, { children: e }), ve = /* @__PURE__ */ F(st.Provider, {
|
|
328
|
+
value: re,
|
|
329
|
+
children: /* @__PURE__ */ F(U.Provider, {
|
|
330
330
|
value: v + 1,
|
|
331
|
-
children: /* @__PURE__ */
|
|
331
|
+
children: /* @__PURE__ */ F(W.Provider, {
|
|
332
332
|
value: N,
|
|
333
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ $e(nt.Provider, {
|
|
334
334
|
value: j,
|
|
335
|
-
children: [/* @__PURE__ */
|
|
336
|
-
value:
|
|
337
|
-
children:
|
|
338
|
-
}) :
|
|
335
|
+
children: [/* @__PURE__ */ F(L, {}), x ? /* @__PURE__ */ F(dt.Provider, {
|
|
336
|
+
value: jt,
|
|
337
|
+
children: ge
|
|
338
|
+
}) : ge]
|
|
339
339
|
})
|
|
340
340
|
})
|
|
341
341
|
})
|
|
342
342
|
});
|
|
343
|
-
return
|
|
343
|
+
return x ? /* @__PURE__ */ $e("div", {
|
|
344
344
|
className: g,
|
|
345
345
|
style: {
|
|
346
346
|
position: "relative",
|
|
@@ -349,29 +349,29 @@ function Ot({ children: e, name: t, strictRoutes: r = !1, initPath: i = "/", def
|
|
|
349
349
|
},
|
|
350
350
|
children: [
|
|
351
351
|
ve,
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ F(lt, { stores: j }),
|
|
353
|
+
/* @__PURE__ */ F(ut, { stores: j })
|
|
354
354
|
]
|
|
355
|
-
}) : /* @__PURE__ */
|
|
355
|
+
}) : /* @__PURE__ */ $e(Qe, { children: [
|
|
356
356
|
ve,
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ F(lt, { stores: j }),
|
|
358
|
+
/* @__PURE__ */ F(ut, { stores: j })
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
361
|
//#endregion
|
|
362
362
|
//#region src/Route.tsx
|
|
363
|
-
function
|
|
363
|
+
function Nt({ element: e }) {
|
|
364
364
|
return e;
|
|
365
365
|
}
|
|
366
366
|
//#endregion
|
|
367
367
|
//#region src/utils/buildRoutePath.ts
|
|
368
|
-
function
|
|
369
|
-
return
|
|
368
|
+
function X(e, t) {
|
|
369
|
+
return w(e, t);
|
|
370
370
|
}
|
|
371
371
|
//#endregion
|
|
372
372
|
//#region src/navigate/useNavigate.ts
|
|
373
|
-
function
|
|
374
|
-
let t =
|
|
373
|
+
function Pt(e) {
|
|
374
|
+
let t = I(), n = s(W) ?? {
|
|
375
375
|
stores: t,
|
|
376
376
|
routePaths: [],
|
|
377
377
|
strictRoutes: !1,
|
|
@@ -380,24 +380,24 @@ function jt(e) {
|
|
|
380
380
|
}, r = (t, r, i) => {
|
|
381
381
|
let a = t ?? e?.router, o;
|
|
382
382
|
if (r) try {
|
|
383
|
-
o =
|
|
383
|
+
o = X(r, i).toPathname;
|
|
384
384
|
} catch {
|
|
385
385
|
o = void 0;
|
|
386
386
|
}
|
|
387
|
-
let { node: s, message: c } =
|
|
387
|
+
let { node: s, message: c } = yt({
|
|
388
388
|
from: n,
|
|
389
389
|
target: a,
|
|
390
390
|
path: r,
|
|
391
391
|
pathname: o
|
|
392
392
|
});
|
|
393
|
-
if (!s) return
|
|
394
|
-
if (c &&
|
|
393
|
+
if (!s) return gt(c ?? "the requested Router could not be resolved."), null;
|
|
394
|
+
if (c && ht(c), r && !K(s, r, o)) {
|
|
395
395
|
let e = `"${r}" is not declared by ${s.name ? `<Router name="${s.name}">` : "the target <Router>"}, so the navigation cannot mount a screen there. Declare a matching <Route>, target the Router that owns it, or use \`router: "nearest-owner"\`.`;
|
|
396
|
-
a !== void 0 || s.strictRoutes ?
|
|
396
|
+
a !== void 0 || s.strictRoutes ? gt(e) : ht(e);
|
|
397
397
|
}
|
|
398
|
-
return
|
|
398
|
+
return A({
|
|
399
399
|
stores: s.stores,
|
|
400
|
-
buildPathname: (e, t) =>
|
|
400
|
+
buildPathname: (e, t) => X(e, t),
|
|
401
401
|
driver: s.stores.driver,
|
|
402
402
|
markSelfInduced: s.stores.markSelfInduced
|
|
403
403
|
});
|
|
@@ -419,21 +419,21 @@ function jt(e) {
|
|
|
419
419
|
}
|
|
420
420
|
//#endregion
|
|
421
421
|
//#region src/navigate/usePathname.ts
|
|
422
|
-
function
|
|
423
|
-
return
|
|
422
|
+
function Ft() {
|
|
423
|
+
return H((e) => e.histories[e.pendingIndex]?.pathname ?? "/");
|
|
424
424
|
}
|
|
425
425
|
//#endregion
|
|
426
426
|
//#region src/navigate/useStep.ts
|
|
427
|
-
function
|
|
428
|
-
let { routePath: e } = z(), t =
|
|
427
|
+
function It() {
|
|
428
|
+
let { routePath: e } = z(), t = I(), n = s(V), { driver: r, markSelfInduced: i } = t, [a, o] = h(null);
|
|
429
429
|
c(() => {
|
|
430
|
-
if (!e) return o(
|
|
430
|
+
if (!e) return o(ze(r.readState())), r.subscribe((e) => o(ze(e.state)));
|
|
431
431
|
}, [e, r]);
|
|
432
|
-
let l =
|
|
432
|
+
let l = ye({
|
|
433
433
|
stores: t,
|
|
434
434
|
driver: r,
|
|
435
435
|
markSelfInduced: i,
|
|
436
|
-
buildStepPathname: (t) => e ?
|
|
436
|
+
buildStepPathname: (t) => e ? X(e, t).pathname : se(r.readPathname(), t),
|
|
437
437
|
applyParams: (t) => {
|
|
438
438
|
n({
|
|
439
439
|
type: "SET",
|
|
@@ -450,23 +450,23 @@ function Mt() {
|
|
|
450
450
|
}
|
|
451
451
|
//#endregion
|
|
452
452
|
//#region src/screen/ParamsProvider/useParams.ts
|
|
453
|
-
function
|
|
453
|
+
function Lt() {
|
|
454
454
|
return s(B);
|
|
455
455
|
}
|
|
456
456
|
//#endregion
|
|
457
457
|
//#region src/screen/ScreenFreeze.tsx
|
|
458
|
-
var
|
|
459
|
-
function
|
|
458
|
+
var Rt = 3e3;
|
|
459
|
+
function zt({ freeze: e, mode: n = "deferred", children: r }) {
|
|
460
460
|
let [i, a] = h(e), o = m(null);
|
|
461
461
|
return !e && i && a(!1), c(() => {
|
|
462
462
|
if (!(!e || i)) {
|
|
463
|
-
if (n === "immediate" || !
|
|
463
|
+
if (n === "immediate" || !ke()) {
|
|
464
464
|
a(!0);
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
467
|
return o.current = setTimeout(() => {
|
|
468
468
|
o.current = null, a(!0);
|
|
469
|
-
},
|
|
469
|
+
}, Rt), () => {
|
|
470
470
|
o.current !== null && (clearTimeout(o.current), o.current = null);
|
|
471
471
|
};
|
|
472
472
|
}
|
|
@@ -474,40 +474,40 @@ function Ft({ freeze: e, mode: n = "deferred", children: r }) {
|
|
|
474
474
|
e,
|
|
475
475
|
i,
|
|
476
476
|
n
|
|
477
|
-
]), /* @__PURE__ */
|
|
477
|
+
]), /* @__PURE__ */ F(t, {
|
|
478
478
|
mode: e && i ? "hidden" : "visible",
|
|
479
479
|
children: r
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
//#endregion
|
|
483
483
|
//#region src/screen/LayerContext.ts
|
|
484
|
-
var
|
|
485
|
-
function
|
|
486
|
-
return s(
|
|
484
|
+
var Bt = r(null);
|
|
485
|
+
function Vt() {
|
|
486
|
+
return s(Bt);
|
|
487
487
|
}
|
|
488
|
-
var
|
|
489
|
-
function
|
|
490
|
-
return s(
|
|
488
|
+
var Ht = r(null);
|
|
489
|
+
function Ut() {
|
|
490
|
+
return s(Ht);
|
|
491
491
|
}
|
|
492
492
|
//#endregion
|
|
493
493
|
//#region src/screen/scopeAnimHoldCoordinator.ts
|
|
494
|
-
var
|
|
495
|
-
function
|
|
496
|
-
let t =
|
|
497
|
-
return t || (t =
|
|
494
|
+
var Wt = /* @__PURE__ */ new WeakMap();
|
|
495
|
+
function Gt(e) {
|
|
496
|
+
let t = Wt.get(e);
|
|
497
|
+
return t || (t = E(), Wt.set(e, t)), t;
|
|
498
498
|
}
|
|
499
499
|
//#endregion
|
|
500
500
|
//#region src/stores/useNavigateStore.ts
|
|
501
|
-
function
|
|
502
|
-
return
|
|
501
|
+
function Kt(e) {
|
|
502
|
+
return ot(I().navigate, e);
|
|
503
503
|
}
|
|
504
504
|
//#endregion
|
|
505
505
|
//#region src/screen/ScreenDecorator.tsx
|
|
506
|
-
function
|
|
506
|
+
function qt({ ref: e, style: t, ...n }) {
|
|
507
507
|
let { id: r, isActive: i, isPrev: a, transitionName: o } = z(), s = m(null);
|
|
508
508
|
u(e, () => s.current);
|
|
509
|
-
let c =
|
|
510
|
-
return f ? /* @__PURE__ */
|
|
509
|
+
let c = Kt((e) => a ? "COMPLETED" : e.status), l = qe(o), { decoratorName: d } = l, f = we.get(d);
|
|
510
|
+
return f ? /* @__PURE__ */ F("div", {
|
|
511
511
|
ref: s,
|
|
512
512
|
"data-flemo-decorator": !0,
|
|
513
513
|
"data-flemo-decorator-name": f.name,
|
|
@@ -529,9 +529,9 @@ function Ut({ ref: e, style: t, ...n }) {
|
|
|
529
529
|
}
|
|
530
530
|
//#endregion
|
|
531
531
|
//#region src/screen/useViewportScrollHeight.ts
|
|
532
|
-
function
|
|
532
|
+
function Jt() {
|
|
533
533
|
let [e, t] = h(0), [n, r] = h(0);
|
|
534
|
-
return c(() =>
|
|
534
|
+
return c(() => Ie((e, n) => {
|
|
535
535
|
r(n), t(e);
|
|
536
536
|
}), []), {
|
|
537
537
|
viewportScrollHeight: e,
|
|
@@ -540,60 +540,60 @@ function Wt() {
|
|
|
540
540
|
}
|
|
541
541
|
//#endregion
|
|
542
542
|
//#region src/stores/useScreenStore.ts
|
|
543
|
-
function
|
|
544
|
-
return
|
|
543
|
+
function Z(e) {
|
|
544
|
+
return ot(I().screen, e);
|
|
545
545
|
}
|
|
546
546
|
//#endregion
|
|
547
547
|
//#region src/screen/ScreenMotion.tsx
|
|
548
|
-
function
|
|
549
|
-
let { id: C, isActive: w, isRoot: T, isPrev: de, zIndex: E, transitionName: D, prevTransitionName: fe } = z(), { contained: pe } =
|
|
550
|
-
|
|
548
|
+
function Yt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigationBarHeight: r, systemNavigationBarColor: i, sharedTopBar: a, sharedTopBarId: l, sharedBottomBar: u, sharedBottomBarId: d, topBar: p, bottomBar: ee, hideStatusBar: v, hideSystemNavigationBar: y, backgroundColor: b = "white", contentScrollable: re = !0, paintHidden: ae = !1, ...se }) {
|
|
549
|
+
let { id: C, isActive: w, isRoot: T, isPrev: de, zIndex: E, transitionName: D, prevTransitionName: fe } = z(), { contained: pe } = ft(), O = pe ? "absolute" : "fixed", k = I(), me = s(st), A = H((e) => e.index), he = H((e) => e.histories), j = w || E === A - 1, M = Kt((e) => j ? e.status : "COMPLETED"), N = Z((e) => e.dragStatus), ge = Z((e) => e.replaceTransitionStatus), _e = k.screen.getState().setDragStatus, ve = k.screen.getState().setReplaceTransitionStatus, P = w ? he[A - 1]?.id : he[A]?.id, ye = Z((e) => P ? e.sharedBars[P] : void 0), xe = Z((e) => P ? e.sharedBarMetadata[P] : void 0), Ce = Z((e) => P ? e.screenSurfaces[P] : void 0), Ee = m(null);
|
|
550
|
+
Ee.current ||= Se({
|
|
551
551
|
getTransitionTaskId: () => k.navigate.getState().transitionTaskId,
|
|
552
552
|
setDragStatus: _e,
|
|
553
553
|
setReplaceTransitionStatus: ve
|
|
554
554
|
});
|
|
555
|
-
let
|
|
556
|
-
|
|
557
|
-
let je =
|
|
558
|
-
let t =
|
|
559
|
-
e ? t.add(e) : t.clear(),
|
|
560
|
-
}, []),
|
|
561
|
-
key:
|
|
555
|
+
let Oe = Ee.current, ke = m(null);
|
|
556
|
+
ke.current ||= Gt(k.navigate);
|
|
557
|
+
let je = qe(D), { initial: Me, decoratorName: Ne } = je, Pe = Ke(je)?.direction, Ie = we.get(Ne), { viewportScrollHeight: Le } = Jt(), ze = Le > 0, [Be, Ve] = h(null), He = Vt(), Ue = He ?? Be, Je = m(/* @__PURE__ */ new Set()), [Xe, Ze] = h(!1), Qe = Xe, nt = o((e) => {
|
|
558
|
+
let t = Je.current;
|
|
559
|
+
e ? t.add(e) : t.clear(), Ze(t.size > 0);
|
|
560
|
+
}, []), L = !!a, R = !!u, B = L ? `${typeof l}:${String(l)}` : null, V = R ? `${typeof d}:${String(d)}` : null, [rt, it] = h({
|
|
561
|
+
key: B,
|
|
562
562
|
height: 0
|
|
563
|
-
}), [
|
|
564
|
-
key:
|
|
563
|
+
}), [at, ot] = h({
|
|
564
|
+
key: V,
|
|
565
565
|
height: 0
|
|
566
|
-
}),
|
|
567
|
-
e <= 0 ||
|
|
568
|
-
key:
|
|
566
|
+
}), ct = m(rt), lt = m(at), ut = rt.key === B ? rt.height : 0, dt = at.key === V ? at.height : 0, pt = Ye(L ? { id: l } : void 0, xe?.topBar) ? xe?.topBar?.height ?? 0 : 0, mt = Ye(R ? { id: d } : void 0, xe?.bottomBar) ? xe?.bottomBar?.height ?? 0 : 0, ht = ut || pt, gt = dt || mt, U = m(null), W = m(null), _t = m(null), vt = m(null), G = m(null), K = m(null), q = m(null), yt = o((e) => {
|
|
567
|
+
e <= 0 || B === null || (vt.current && (vt.current.style.minHeight = `${e}px`), ct.current = {
|
|
568
|
+
key: B,
|
|
569
569
|
height: e
|
|
570
|
-
},
|
|
571
|
-
key:
|
|
570
|
+
}, it((t) => t.key === B && t.height === e ? t : {
|
|
571
|
+
key: B,
|
|
572
572
|
height: e
|
|
573
573
|
}), k.screen.getState().updateSharedBarHeight(C, "topBar", e));
|
|
574
574
|
}, [
|
|
575
575
|
C,
|
|
576
576
|
k.screen,
|
|
577
|
-
|
|
578
|
-
]),
|
|
579
|
-
e <= 0 ||
|
|
580
|
-
key:
|
|
577
|
+
B
|
|
578
|
+
]), bt = o((e) => {
|
|
579
|
+
e <= 0 || V === null || (G.current && (G.current.style.minHeight = `${e}px`), lt.current = {
|
|
580
|
+
key: V,
|
|
581
581
|
height: e
|
|
582
|
-
},
|
|
583
|
-
key:
|
|
582
|
+
}, ot((t) => t.key === V && t.height === e ? t : {
|
|
583
|
+
key: V,
|
|
584
584
|
height: e
|
|
585
585
|
}), k.screen.getState().updateSharedBarHeight(C, "bottomBar", e));
|
|
586
586
|
}, [
|
|
587
|
-
|
|
587
|
+
V,
|
|
588
588
|
C,
|
|
589
589
|
k.screen
|
|
590
|
-
]),
|
|
591
|
-
|
|
592
|
-
}, [
|
|
593
|
-
|
|
594
|
-
}, [
|
|
590
|
+
]), xt = o((e) => {
|
|
591
|
+
K.current = e, e?.offsetHeight && yt(e.offsetHeight);
|
|
592
|
+
}, [yt]), St = o((e) => {
|
|
593
|
+
q.current = e, e?.offsetHeight && bt(e.offsetHeight);
|
|
594
|
+
}, [bt]), J = m({
|
|
595
595
|
transition: je,
|
|
596
|
-
decorator:
|
|
596
|
+
decorator: Ie,
|
|
597
597
|
hasSharedTopBar: !!a,
|
|
598
598
|
hasSharedBottomBar: !!u,
|
|
599
599
|
sharedTopBarId: l,
|
|
@@ -602,12 +602,12 @@ function Gt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
602
602
|
isRoot: T,
|
|
603
603
|
isActive: w,
|
|
604
604
|
status: M,
|
|
605
|
-
dragStatus:
|
|
605
|
+
dragStatus: N,
|
|
606
606
|
index: A
|
|
607
607
|
});
|
|
608
|
-
|
|
608
|
+
J.current = {
|
|
609
609
|
transition: je,
|
|
610
|
-
decorator:
|
|
610
|
+
decorator: Ie,
|
|
611
611
|
hasSharedTopBar: !!a,
|
|
612
612
|
hasSharedBottomBar: !!u,
|
|
613
613
|
sharedTopBarId: l,
|
|
@@ -616,223 +616,223 @@ function Gt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
616
616
|
isRoot: T,
|
|
617
617
|
isActive: w,
|
|
618
618
|
status: M,
|
|
619
|
-
dragStatus:
|
|
619
|
+
dragStatus: N,
|
|
620
620
|
index: A
|
|
621
621
|
};
|
|
622
|
-
let
|
|
623
|
-
|
|
624
|
-
getTransition: () =>
|
|
625
|
-
getDecorator: () =>
|
|
622
|
+
let Ct = m(null), wt = m(null);
|
|
623
|
+
Ct.current ||= be({
|
|
624
|
+
getTransition: () => J.current.transition,
|
|
625
|
+
getDecorator: () => J.current.decorator,
|
|
626
626
|
getElements: () => ({
|
|
627
|
-
scope:
|
|
628
|
-
screenContainer:
|
|
629
|
-
decorator:
|
|
630
|
-
sharedTopBar:
|
|
631
|
-
sharedBottomBar:
|
|
627
|
+
scope: W.current,
|
|
628
|
+
screenContainer: U.current,
|
|
629
|
+
decorator: _t.current,
|
|
630
|
+
sharedTopBar: K.current,
|
|
631
|
+
sharedBottomBar: q.current
|
|
632
632
|
}),
|
|
633
|
-
hasSharedTopBar: () =>
|
|
634
|
-
hasSharedBottomBar: () =>
|
|
635
|
-
getPartLayer: () =>
|
|
636
|
-
getSharedTopBarId: () =>
|
|
637
|
-
getSharedBottomBarId: () =>
|
|
638
|
-
getViewportScrollHeight: () =>
|
|
633
|
+
hasSharedTopBar: () => J.current.hasSharedTopBar,
|
|
634
|
+
hasSharedBottomBar: () => J.current.hasSharedBottomBar,
|
|
635
|
+
getPartLayer: () => We(k.navigate),
|
|
636
|
+
getSharedTopBarId: () => J.current.sharedTopBarId,
|
|
637
|
+
getSharedBottomBarId: () => J.current.sharedBottomBarId,
|
|
638
|
+
getViewportScrollHeight: () => J.current.viewportScrollHeight,
|
|
639
639
|
isReadyForDrag: () => {
|
|
640
|
-
let e =
|
|
641
|
-
return !e.isRoot && e.isActive && e.status === "COMPLETED" && e.dragStatus === "IDLE" && !!e.transition
|
|
640
|
+
let e = J.current;
|
|
641
|
+
return !e.isRoot && e.isActive && e.status === "COMPLETED" && e.dragStatus === "IDLE" && !!Ke(e.transition) && e.viewportScrollHeight < 10;
|
|
642
642
|
},
|
|
643
643
|
getPartnerBars: () => {
|
|
644
|
-
let e =
|
|
644
|
+
let e = J.current, t = k.history.getState().histories, n = e.isActive ? t[e.index - 1]?.id : t[e.index]?.id;
|
|
645
645
|
return n ? k.screen.getState().sharedBars[n] : void 0;
|
|
646
646
|
},
|
|
647
647
|
getPartnerBarMetadata: () => {
|
|
648
|
-
let e =
|
|
648
|
+
let e = J.current, t = k.history.getState().histories, n = e.isActive ? t[e.index - 1]?.id : t[e.index]?.id;
|
|
649
649
|
return n ? k.screen.getState().sharedBarMetadata[n] : void 0;
|
|
650
650
|
},
|
|
651
651
|
setDragStatus: _e,
|
|
652
652
|
back: () => k.driver.back(),
|
|
653
653
|
onDragStart: () => {
|
|
654
|
-
|
|
654
|
+
wt.current?.settle(!1, 0), wt.current = ce(k.navigate, "POPPING");
|
|
655
655
|
},
|
|
656
656
|
onDragProgress: (e) => {
|
|
657
|
-
|
|
657
|
+
wt.current?.scrub(e);
|
|
658
658
|
},
|
|
659
659
|
onDragSettle: (e, t) => {
|
|
660
|
-
|
|
660
|
+
wt.current?.settle(e, t), wt.current = null;
|
|
661
661
|
}
|
|
662
662
|
});
|
|
663
|
-
let
|
|
663
|
+
let Y = Ct.current, Tt = (e) => Y.pointerDown(e.nativeEvent), Et = (e) => Y.pointerMove(e.nativeEvent), Dt = (e) => Y.pointerUp(e.nativeEvent), Ot = (e) => Y.pointerCancel(e.nativeEvent), kt = (e) => Y.lostPointerCapture(e.nativeEvent), At = (e) => {
|
|
664
664
|
(M === "PUSHING" || M === "REPLACING") && (e.preventDefault(), e.stopPropagation());
|
|
665
665
|
};
|
|
666
666
|
c(() => {
|
|
667
|
-
|
|
667
|
+
Te(W.current);
|
|
668
668
|
}, []), c(() => {
|
|
669
|
-
let e =
|
|
669
|
+
let e = W.current;
|
|
670
670
|
if (!e) return;
|
|
671
671
|
let t = (e) => {
|
|
672
|
-
|
|
672
|
+
Y.shouldPreventTouch() && e.preventDefault();
|
|
673
673
|
};
|
|
674
674
|
return e.addEventListener("touchmove", t, { passive: !1 }), () => {
|
|
675
|
-
e.removeEventListener("touchmove", t),
|
|
675
|
+
e.removeEventListener("touchmove", t), Y.abandon();
|
|
676
676
|
};
|
|
677
|
-
}, [
|
|
678
|
-
let { registerSharedBars: e, unregisterSharedBars: t } = k.screen.getState(), n =
|
|
677
|
+
}, [Y]), f(() => {
|
|
678
|
+
let { registerSharedBars: e, unregisterSharedBars: t } = k.screen.getState(), n = ct.current, r = lt.current;
|
|
679
679
|
return e(C, {
|
|
680
|
-
topBar:
|
|
681
|
-
bottomBar:
|
|
680
|
+
topBar: L,
|
|
681
|
+
bottomBar: R
|
|
682
682
|
}, {
|
|
683
|
-
topBar:
|
|
683
|
+
topBar: L ? {
|
|
684
684
|
id: l,
|
|
685
|
-
height: n.key ===
|
|
685
|
+
height: n.key === B ? n.height : void 0
|
|
686
686
|
} : void 0,
|
|
687
|
-
bottomBar:
|
|
687
|
+
bottomBar: R ? {
|
|
688
688
|
id: d,
|
|
689
|
-
height: r.key ===
|
|
689
|
+
height: r.key === V ? r.height : void 0
|
|
690
690
|
} : void 0
|
|
691
691
|
}), () => t(C);
|
|
692
692
|
}, [
|
|
693
|
-
U,
|
|
694
693
|
V,
|
|
695
|
-
|
|
694
|
+
R,
|
|
695
|
+
L,
|
|
696
696
|
C,
|
|
697
697
|
d,
|
|
698
698
|
l,
|
|
699
699
|
k.screen,
|
|
700
|
-
|
|
700
|
+
B
|
|
701
701
|
]), f(() => {
|
|
702
|
-
let e = ht.current;
|
|
703
|
-
if (e) return Ne(e, _t);
|
|
704
|
-
}, [_t, B]), f(() => {
|
|
705
|
-
let e = gt.current;
|
|
706
|
-
if (e) return Ne(e, vt);
|
|
707
|
-
}, [vt, V]), f(() => {
|
|
708
702
|
let e = K.current;
|
|
709
|
-
if (e
|
|
710
|
-
}, [
|
|
703
|
+
if (e) return Fe(e, yt);
|
|
704
|
+
}, [yt, L]), f(() => {
|
|
711
705
|
let e = q.current;
|
|
706
|
+
if (e) return Fe(e, bt);
|
|
707
|
+
}, [bt, R]), f(() => {
|
|
708
|
+
let e = U.current;
|
|
709
|
+
if (e && !(!L && !R)) return Re(e);
|
|
710
|
+
}, [R, L]), f(() => {
|
|
711
|
+
let e = W.current;
|
|
712
712
|
if (!e) return;
|
|
713
713
|
let { registerScreenSurface: t, unregisterScreenSurface: n } = k.screen.getState();
|
|
714
|
-
return t(C, { opaqueBackground:
|
|
714
|
+
return t(C, { opaqueBackground: Ae(getComputedStyle(e).backgroundColor) }), () => n(C);
|
|
715
715
|
}, [
|
|
716
716
|
C,
|
|
717
|
-
|
|
717
|
+
b,
|
|
718
718
|
M,
|
|
719
719
|
k.screen
|
|
720
720
|
]);
|
|
721
|
-
let
|
|
721
|
+
let jt = j, { app: Mt, nav: Nt } = le({
|
|
722
722
|
status: M,
|
|
723
|
-
isTopOrTopPrev:
|
|
724
|
-
hasTopBar:
|
|
725
|
-
hasNavBar:
|
|
723
|
+
isTopOrTopPrev: jt,
|
|
724
|
+
hasTopBar: L,
|
|
725
|
+
hasNavBar: R,
|
|
726
726
|
topBarId: l,
|
|
727
727
|
bottomBarId: d,
|
|
728
|
-
partnerBars:
|
|
729
|
-
partnerMetadata:
|
|
730
|
-
}),
|
|
728
|
+
partnerBars: ye,
|
|
729
|
+
partnerMetadata: xe
|
|
730
|
+
}), X = oe({
|
|
731
731
|
status: M,
|
|
732
|
-
isTopOrTopPrev:
|
|
732
|
+
isTopOrTopPrev: jt,
|
|
733
733
|
transitionName: D
|
|
734
|
-
}),
|
|
734
|
+
}), Pt = ue({
|
|
735
735
|
isActive: w,
|
|
736
736
|
isPrev: de,
|
|
737
737
|
zIndex: E,
|
|
738
738
|
index: A,
|
|
739
739
|
status: M,
|
|
740
|
-
dragStatus:
|
|
741
|
-
replaceTransitionStatus:
|
|
742
|
-
}),
|
|
743
|
-
|
|
744
|
-
let
|
|
745
|
-
key:
|
|
746
|
-
released:
|
|
740
|
+
dragStatus: N,
|
|
741
|
+
replaceTransitionStatus: ge
|
|
742
|
+
}), Ft = m(Pt), It = m(X !== null && Pt), Lt = m(null), Rt = m(null), zt = m(!1);
|
|
743
|
+
X === null && (zt.current = !0);
|
|
744
|
+
let Ut = !zt.current, [Wt, Yt] = h({
|
|
745
|
+
key: X,
|
|
746
|
+
released: X === null
|
|
747
747
|
});
|
|
748
|
-
|
|
749
|
-
key:
|
|
750
|
-
released:
|
|
751
|
-
}),
|
|
752
|
-
let
|
|
753
|
-
|
|
754
|
-
let
|
|
748
|
+
Wt.key !== X && (Yt({
|
|
749
|
+
key: X,
|
|
750
|
+
released: X === null
|
|
751
|
+
}), Lt.current = null, Rt.current = null, It.current = X !== null && Ft.current), Ft.current = Pt;
|
|
752
|
+
let Q = X !== null && Wt.key === X && !Wt.released && Lt.current !== X, $ = Q ? !w && Ce?.opaqueBackground ? g.PARK : w && (M === "PUSHING" || M === "REPLACING") && Ce?.opaqueBackground ? Ge().parkOver ? g.PARK_OVER : g.PARK_UNDER : g.HELD : g.RELEASED;
|
|
753
|
+
Rt.current !== X && ($ === g.PARK_OVER || $ === g.PARK) && (Rt.current = X);
|
|
754
|
+
let Xt = X !== null && Rt.current === X, Zt = {
|
|
755
755
|
zIndex: E,
|
|
756
|
-
paintHidden:
|
|
756
|
+
paintHidden: ae,
|
|
757
757
|
transitionName: D,
|
|
758
758
|
status: M,
|
|
759
759
|
isActive: w,
|
|
760
760
|
animHold: $,
|
|
761
|
-
rendersHost: !
|
|
761
|
+
rendersHost: !He,
|
|
762
762
|
screenId: C,
|
|
763
|
-
registerSlot:
|
|
763
|
+
registerSlot: nt
|
|
764
764
|
};
|
|
765
|
-
f(() =>
|
|
765
|
+
f(() => Oe.driveScreenLifecycle({
|
|
766
766
|
getElements: () => ({
|
|
767
|
-
scope:
|
|
768
|
-
decorator:
|
|
769
|
-
bars: [
|
|
770
|
-
screenContainer:
|
|
771
|
-
partLayer:
|
|
767
|
+
scope: W.current,
|
|
768
|
+
decorator: _t.current,
|
|
769
|
+
bars: [K.current, q.current],
|
|
770
|
+
screenContainer: U.current,
|
|
771
|
+
partLayer: We(k.navigate)
|
|
772
772
|
}),
|
|
773
773
|
transitionName: D,
|
|
774
774
|
prevTransitionName: fe,
|
|
775
775
|
status: M,
|
|
776
776
|
isActive: w,
|
|
777
|
-
animHoldReleased: !
|
|
777
|
+
animHoldReleased: !Q
|
|
778
778
|
}), [
|
|
779
|
-
|
|
779
|
+
Oe,
|
|
780
780
|
M,
|
|
781
781
|
w,
|
|
782
782
|
fe,
|
|
783
783
|
D,
|
|
784
|
-
|
|
784
|
+
Q,
|
|
785
785
|
k.navigate
|
|
786
786
|
]), c(() => {
|
|
787
|
-
if (!
|
|
788
|
-
let e =
|
|
789
|
-
return
|
|
790
|
-
let t =
|
|
787
|
+
if (!Q || X === null) return;
|
|
788
|
+
let e = X, t = k.navigate.getState().transitionTaskId, n = t === null ? e : `${e}#${t}`;
|
|
789
|
+
return ke.current.join(n, () => {
|
|
790
|
+
let t = J.current.transition.driver === "native", n = Ge({ authoredNativeDriver: t }).atomicReleaseFlip;
|
|
791
791
|
if (n) {
|
|
792
792
|
for (let e of [
|
|
793
|
+
W.current,
|
|
794
|
+
K.current,
|
|
793
795
|
q.current,
|
|
794
|
-
|
|
795
|
-
gt.current,
|
|
796
|
-
J.current
|
|
796
|
+
_t.current
|
|
797
797
|
]) e?.isConnected && e.getAttribute(_) !== null && e.setAttribute(_, g.RELEASED);
|
|
798
|
-
|
|
798
|
+
U.current && (U.current.style.zIndex = String(E + 1)), Lt.current = e;
|
|
799
799
|
}
|
|
800
800
|
{
|
|
801
|
-
let t = () =>
|
|
801
|
+
let t = () => Yt((t) => t.key === e && !t.released ? {
|
|
802
802
|
key: e,
|
|
803
803
|
released: !0
|
|
804
804
|
} : t);
|
|
805
|
-
n &&
|
|
805
|
+
n && Ge().deferReleaseCommit && typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => t()) : tt(t);
|
|
806
806
|
}
|
|
807
807
|
}, {
|
|
808
|
-
scope:
|
|
809
|
-
decodeWait:
|
|
810
|
-
contentSettle:
|
|
808
|
+
scope: W.current,
|
|
809
|
+
decodeWait: It.current,
|
|
810
|
+
contentSettle: Ge().renderSettleGate && (w && M === "PUSHING" || M === "POPPING") ? {
|
|
811
811
|
firstWaitMs: 120,
|
|
812
812
|
capMs: 700,
|
|
813
|
-
graceMs:
|
|
813
|
+
graceMs: Ut ? 60 : 0,
|
|
814
814
|
minNodes: w ? 30 : 1,
|
|
815
815
|
renderSettleOnly: !0
|
|
816
816
|
} : void 0
|
|
817
817
|
});
|
|
818
818
|
}, [
|
|
819
|
-
|
|
820
|
-
|
|
819
|
+
Q,
|
|
820
|
+
X,
|
|
821
821
|
$,
|
|
822
822
|
w,
|
|
823
|
-
|
|
823
|
+
Ut,
|
|
824
824
|
M,
|
|
825
825
|
k.navigate,
|
|
826
826
|
E
|
|
827
827
|
]);
|
|
828
|
-
let
|
|
828
|
+
let Qt = $ === g.PARK_UNDER || $ === g.PARK_OVER ? {} : De({
|
|
829
829
|
initial: Me,
|
|
830
830
|
isActive: w,
|
|
831
831
|
status: M
|
|
832
832
|
});
|
|
833
|
-
return /* @__PURE__ */
|
|
834
|
-
ref:
|
|
835
|
-
onClickCapture:
|
|
833
|
+
return /* @__PURE__ */ $e("div", {
|
|
834
|
+
ref: U,
|
|
835
|
+
onClickCapture: At,
|
|
836
836
|
style: {
|
|
837
837
|
position: O,
|
|
838
838
|
top: 0,
|
|
@@ -840,7 +840,7 @@ function Gt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
840
840
|
width: "100%",
|
|
841
841
|
height: "100%",
|
|
842
842
|
display: "flex",
|
|
843
|
-
visibility:
|
|
843
|
+
visibility: ae ? "hidden" : void 0,
|
|
844
844
|
zIndex: $ === g.PARK_UNDER ? E - 1 : E + 1,
|
|
845
845
|
isolation: "isolate",
|
|
846
846
|
contain: "style",
|
|
@@ -849,35 +849,35 @@ function Gt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
849
849
|
overscrollBehavior: "contain"
|
|
850
850
|
},
|
|
851
851
|
children: [
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
ref:
|
|
854
|
-
...
|
|
855
|
-
onPointerDown:
|
|
856
|
-
onPointerMove:
|
|
857
|
-
onPointerUp:
|
|
858
|
-
onPointerCancel:
|
|
859
|
-
onLostPointerCapture:
|
|
852
|
+
/* @__PURE__ */ $e("div", {
|
|
853
|
+
ref: W,
|
|
854
|
+
...se,
|
|
855
|
+
onPointerDown: Tt,
|
|
856
|
+
onPointerMove: Et,
|
|
857
|
+
onPointerUp: Dt,
|
|
858
|
+
onPointerCancel: Ot,
|
|
859
|
+
onLostPointerCapture: kt,
|
|
860
860
|
"data-flemo-screen": C,
|
|
861
861
|
"data-flemo-router": me ?? void 0,
|
|
862
862
|
"data-flemo-transition": D,
|
|
863
863
|
"data-flemo-status": M,
|
|
864
864
|
"data-flemo-active": w ? "true" : "false",
|
|
865
865
|
"data-flemo-anim-hold": $,
|
|
866
|
-
"data-flemo-park-head":
|
|
866
|
+
"data-flemo-park-head": Xt ? "true" : void 0,
|
|
867
867
|
style: {
|
|
868
868
|
display: "flex",
|
|
869
869
|
flexDirection: "column",
|
|
870
870
|
height: "100%",
|
|
871
|
-
backgroundColor:
|
|
872
|
-
overflowY:
|
|
871
|
+
backgroundColor: b,
|
|
872
|
+
overflowY: re ? void 0 : "auto",
|
|
873
873
|
touchAction: Pe === "x" ? "pan-y" : Pe === "y" ? "pan-x" : "auto",
|
|
874
|
-
...
|
|
875
|
-
...
|
|
874
|
+
...Qt,
|
|
875
|
+
...se.style
|
|
876
876
|
},
|
|
877
877
|
children: [
|
|
878
|
-
!
|
|
878
|
+
!v && t && /* @__PURE__ */ F("div", {
|
|
879
879
|
style: { minHeight: t },
|
|
880
|
-
children: /* @__PURE__ */
|
|
880
|
+
children: /* @__PURE__ */ F("div", { style: {
|
|
881
881
|
position: O,
|
|
882
882
|
top: 0,
|
|
883
883
|
width: "100%",
|
|
@@ -885,46 +885,46 @@ function Gt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
885
885
|
backgroundColor: n
|
|
886
886
|
} })
|
|
887
887
|
}),
|
|
888
|
-
a && /* @__PURE__ */
|
|
889
|
-
ref:
|
|
888
|
+
a && /* @__PURE__ */ F("div", {
|
|
889
|
+
ref: vt,
|
|
890
890
|
"data-flemo-bar-spacer": "app",
|
|
891
891
|
style: {
|
|
892
892
|
width: "100%",
|
|
893
|
-
minHeight:
|
|
893
|
+
minHeight: ht
|
|
894
894
|
}
|
|
895
895
|
}),
|
|
896
896
|
p,
|
|
897
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ F("div", {
|
|
898
898
|
style: {
|
|
899
899
|
display: "flex",
|
|
900
900
|
flexDirection: "column",
|
|
901
901
|
flexGrow: 1,
|
|
902
|
-
overflowY:
|
|
902
|
+
overflowY: re ? "auto" : void 0
|
|
903
903
|
},
|
|
904
|
-
children: /* @__PURE__ */
|
|
905
|
-
value:
|
|
906
|
-
children: /* @__PURE__ */
|
|
907
|
-
value:
|
|
904
|
+
children: /* @__PURE__ */ F(Bt.Provider, {
|
|
905
|
+
value: Ue,
|
|
906
|
+
children: /* @__PURE__ */ F(Ht.Provider, {
|
|
907
|
+
value: Zt,
|
|
908
908
|
children: e
|
|
909
909
|
})
|
|
910
910
|
})
|
|
911
911
|
}),
|
|
912
912
|
ee,
|
|
913
|
-
u && /* @__PURE__ */
|
|
914
|
-
ref:
|
|
913
|
+
u && /* @__PURE__ */ F("div", {
|
|
914
|
+
ref: G,
|
|
915
915
|
"data-flemo-bar-spacer": "nav",
|
|
916
916
|
style: {
|
|
917
|
-
display:
|
|
917
|
+
display: ze ? "none" : void 0,
|
|
918
918
|
width: "100%",
|
|
919
|
-
minHeight:
|
|
919
|
+
minHeight: gt
|
|
920
920
|
}
|
|
921
921
|
}),
|
|
922
|
-
!
|
|
922
|
+
!y && r && /* @__PURE__ */ F("div", {
|
|
923
923
|
style: {
|
|
924
|
-
display:
|
|
924
|
+
display: ze ? "none" : void 0,
|
|
925
925
|
minHeight: r
|
|
926
926
|
},
|
|
927
|
-
children: /* @__PURE__ */
|
|
927
|
+
children: /* @__PURE__ */ F("div", { style: {
|
|
928
928
|
position: O,
|
|
929
929
|
bottom: 0,
|
|
930
930
|
width: "100%",
|
|
@@ -934,8 +934,8 @@ function Gt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
934
934
|
})
|
|
935
935
|
]
|
|
936
936
|
}),
|
|
937
|
-
a && /* @__PURE__ */
|
|
938
|
-
ref:
|
|
937
|
+
a && /* @__PURE__ */ F("div", {
|
|
938
|
+
ref: xt,
|
|
939
939
|
"data-flemo-bar": "app",
|
|
940
940
|
"data-flemo-bar-id": l,
|
|
941
941
|
"data-flemo-bar-id-type": l === void 0 ? void 0 : typeof l,
|
|
@@ -943,18 +943,18 @@ function Gt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
943
943
|
"data-flemo-bar-transition": D,
|
|
944
944
|
"data-flemo-bar-status": M,
|
|
945
945
|
"data-flemo-bar-active": w ? "true" : "false",
|
|
946
|
-
"data-flemo-bar-riding":
|
|
946
|
+
"data-flemo-bar-riding": Mt ? "true" : "false",
|
|
947
947
|
"data-flemo-anim-hold": $,
|
|
948
948
|
style: {
|
|
949
949
|
position: O,
|
|
950
|
-
top:
|
|
950
|
+
top: v ? 0 : t,
|
|
951
951
|
left: 0,
|
|
952
952
|
width: "100%"
|
|
953
953
|
},
|
|
954
954
|
children: a
|
|
955
955
|
}),
|
|
956
|
-
u && /* @__PURE__ */
|
|
957
|
-
ref:
|
|
956
|
+
u && /* @__PURE__ */ F("div", {
|
|
957
|
+
ref: St,
|
|
958
958
|
"data-flemo-bar": "nav",
|
|
959
959
|
"data-flemo-bar-id": d,
|
|
960
960
|
"data-flemo-bar-id-type": d === void 0 ? void 0 : typeof d,
|
|
@@ -962,38 +962,38 @@ function Gt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
962
962
|
"data-flemo-bar-transition": D,
|
|
963
963
|
"data-flemo-bar-status": M,
|
|
964
964
|
"data-flemo-bar-active": w ? "true" : "false",
|
|
965
|
-
"data-flemo-bar-riding":
|
|
965
|
+
"data-flemo-bar-riding": Nt ? "true" : "false",
|
|
966
966
|
"data-flemo-anim-hold": $,
|
|
967
967
|
style: {
|
|
968
|
-
display:
|
|
968
|
+
display: ze ? "none" : void 0,
|
|
969
969
|
position: O,
|
|
970
|
-
bottom:
|
|
970
|
+
bottom: y ? 0 : r,
|
|
971
971
|
left: 0,
|
|
972
972
|
width: "100%"
|
|
973
973
|
},
|
|
974
974
|
children: u
|
|
975
975
|
}),
|
|
976
|
-
|
|
977
|
-
ref:
|
|
976
|
+
Ie && !Qe && /* @__PURE__ */ F(qt, {
|
|
977
|
+
ref: _t,
|
|
978
978
|
"data-flemo-anim-hold": $
|
|
979
979
|
}),
|
|
980
|
-
|
|
981
|
-
ref:
|
|
980
|
+
Ie && Qe && Ue ? et(/* @__PURE__ */ F(qt, {
|
|
981
|
+
ref: _t,
|
|
982
982
|
"data-flemo-anim-hold": $,
|
|
983
983
|
style: { zIndex: E * 2 + 1 }
|
|
984
|
-
}),
|
|
985
|
-
!
|
|
986
|
-
ref:
|
|
987
|
-
[
|
|
988
|
-
[
|
|
989
|
-
[
|
|
984
|
+
}), Ue) : null,
|
|
985
|
+
!He && /* @__PURE__ */ F("div", {
|
|
986
|
+
ref: Ve,
|
|
987
|
+
[ne]: "",
|
|
988
|
+
[ie]: D,
|
|
989
|
+
[S]: M,
|
|
990
990
|
[te]: w ? "true" : "false",
|
|
991
991
|
[_]: $,
|
|
992
992
|
style: {
|
|
993
993
|
position: "absolute",
|
|
994
994
|
inset: 0,
|
|
995
995
|
pointerEvents: "none",
|
|
996
|
-
zIndex:
|
|
996
|
+
zIndex: x
|
|
997
997
|
}
|
|
998
998
|
})
|
|
999
999
|
]
|
|
@@ -1001,8 +1001,8 @@ function Gt({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
1001
1001
|
}
|
|
1002
1002
|
//#endregion
|
|
1003
1003
|
//#region src/screen/Screen.tsx
|
|
1004
|
-
function
|
|
1005
|
-
let { isActive: n, isPrev: r, zIndex: i } = z(), a =
|
|
1004
|
+
function Q({ children: e, ...t }) {
|
|
1005
|
+
let { isActive: n, isPrev: r, zIndex: i } = z(), a = H((e) => e.index), o = Kt((e) => e.status), s = Z((e) => e.dragStatus), l = Z((e) => e.replaceTransitionStatus), u = T({
|
|
1006
1006
|
isActive: n,
|
|
1007
1007
|
isPrev: r,
|
|
1008
1008
|
zIndex: i,
|
|
@@ -1013,24 +1013,24 @@ function Kt({ children: e, ...t }) {
|
|
|
1013
1013
|
}), [d, f] = h(u !== "live");
|
|
1014
1014
|
return u === "live" && d && f(!1), u === "immediate" && !d && f(!0), c(() => {
|
|
1015
1015
|
if (u !== "deferred" || d) return;
|
|
1016
|
-
let e = setTimeout(() => f(!0),
|
|
1016
|
+
let e = setTimeout(() => f(!0), $);
|
|
1017
1017
|
return () => clearTimeout(e);
|
|
1018
|
-
}, [u, d]), /* @__PURE__ */
|
|
1018
|
+
}, [u, d]), /* @__PURE__ */ F(zt, {
|
|
1019
1019
|
freeze: d,
|
|
1020
1020
|
mode: u,
|
|
1021
|
-
children: /* @__PURE__ */
|
|
1021
|
+
children: /* @__PURE__ */ F(Yt, {
|
|
1022
1022
|
paintHidden: d,
|
|
1023
1023
|
...t,
|
|
1024
1024
|
children: e
|
|
1025
1025
|
})
|
|
1026
1026
|
});
|
|
1027
1027
|
}
|
|
1028
|
-
var
|
|
1028
|
+
var $ = 600;
|
|
1029
1029
|
//#endregion
|
|
1030
1030
|
//#region src/screen/Part.tsx
|
|
1031
|
-
function
|
|
1032
|
-
let { isActive: a, isPrev: o, navigateStore: c, routerId: l, transitionName: u } = z(), d = s(
|
|
1033
|
-
return /* @__PURE__ */
|
|
1031
|
+
function Xt({ ref: e, name: t, style: n, children: r, ...i }) {
|
|
1032
|
+
let { isActive: a, isPrev: o, navigateStore: c, routerId: l, transitionName: u } = z(), d = s(st), f = l ?? d ?? void 0, p = I(), m = ot(c ?? p.navigate, (e) => o ? "COMPLETED" : e.status);
|
|
1033
|
+
return /* @__PURE__ */ F("div", {
|
|
1034
1034
|
ref: e,
|
|
1035
1035
|
"data-flemo-part-name": t,
|
|
1036
1036
|
"data-flemo-transition": u,
|
|
@@ -1044,15 +1044,15 @@ function Jt({ ref: e, name: t, style: n, children: r, ...i }) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
//#endregion
|
|
1046
1046
|
//#region src/screen/Layer.tsx
|
|
1047
|
-
function
|
|
1048
|
-
let t =
|
|
1049
|
-
return !t || !n ? null :
|
|
1047
|
+
function Zt({ children: e }) {
|
|
1048
|
+
let t = Vt(), n = Ut();
|
|
1049
|
+
return !t || !n ? null : et(/* @__PURE__ */ F("div", {
|
|
1050
1050
|
ref: n.registerSlot,
|
|
1051
1051
|
[re]: "",
|
|
1052
|
-
[
|
|
1052
|
+
[b]: n.screenId,
|
|
1053
1053
|
...n.rendersHost ? {} : {
|
|
1054
|
-
[
|
|
1055
|
-
[
|
|
1054
|
+
[ie]: n.transitionName,
|
|
1055
|
+
[S]: n.status,
|
|
1056
1056
|
[te]: n.isActive ? "true" : "false",
|
|
1057
1057
|
[_]: n.animHold
|
|
1058
1058
|
},
|
|
@@ -1063,7 +1063,7 @@ function $({ children: e }) {
|
|
|
1063
1063
|
zIndex: n.zIndex * 2,
|
|
1064
1064
|
visibility: n.paintHidden ? "hidden" : void 0
|
|
1065
1065
|
},
|
|
1066
|
-
children: /* @__PURE__ */
|
|
1066
|
+
children: /* @__PURE__ */ F("div", {
|
|
1067
1067
|
style: {
|
|
1068
1068
|
display: "contents",
|
|
1069
1069
|
pointerEvents: "auto"
|
|
@@ -1074,17 +1074,17 @@ function $({ children: e }) {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region src/screen/Morph.tsx
|
|
1077
|
-
function
|
|
1078
|
-
let { isActive: u, isPrev: d, navigateStore: p, routerId: h, transitionName: ee } = z(), te = s(
|
|
1079
|
-
|
|
1080
|
-
}, [e]),
|
|
1077
|
+
function Qt({ ref: e, layoutId: t, name: n, as: r = "div", style: a, children: c, ...l }) {
|
|
1078
|
+
let { isActive: u, isPrev: d, navigateStore: p, routerId: h, transitionName: ee } = z(), te = s(st), g = I(), _ = p ?? g.navigate, v = ot(_, (e) => d ? "COMPLETED" : e.status), y = m(null), ne = o((t) => {
|
|
1079
|
+
y.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
|
|
1080
|
+
}, [e]), b = !!p;
|
|
1081
1081
|
return f(() => {
|
|
1082
|
-
let e =
|
|
1083
|
-
if (e) return
|
|
1082
|
+
let e = y.current;
|
|
1083
|
+
if (e) return C(e, {
|
|
1084
1084
|
layoutId: t,
|
|
1085
1085
|
name: n,
|
|
1086
1086
|
navigateStore: _,
|
|
1087
|
-
ownership:
|
|
1087
|
+
ownership: b ? {
|
|
1088
1088
|
status: v,
|
|
1089
1089
|
active: u
|
|
1090
1090
|
} : null
|
|
@@ -1092,7 +1092,7 @@ function Yt({ ref: e, layoutId: t, name: n, as: r = "div", style: a, children: c
|
|
|
1092
1092
|
}, [
|
|
1093
1093
|
t,
|
|
1094
1094
|
n,
|
|
1095
|
-
|
|
1095
|
+
b,
|
|
1096
1096
|
_,
|
|
1097
1097
|
v,
|
|
1098
1098
|
u
|
|
@@ -1100,10 +1100,10 @@ function Yt({ ref: e, layoutId: t, name: n, as: r = "div", style: a, children: c
|
|
|
1100
1100
|
"data-flemo-morph-slot": "",
|
|
1101
1101
|
style: { display: "contents" }
|
|
1102
1102
|
}, i(r, {
|
|
1103
|
-
ref:
|
|
1103
|
+
ref: ne,
|
|
1104
1104
|
"data-flemo-morph": "",
|
|
1105
1105
|
"data-flemo-morph-name": n,
|
|
1106
|
-
...
|
|
1106
|
+
...b ? {
|
|
1107
1107
|
"data-flemo-transition": ee,
|
|
1108
1108
|
"data-flemo-router": h ?? te ?? void 0
|
|
1109
1109
|
} : null,
|
|
@@ -1113,22 +1113,22 @@ function Yt({ ref: e, layoutId: t, name: n, as: r = "div", style: a, children: c
|
|
|
1113
1113
|
}
|
|
1114
1114
|
//#endregion
|
|
1115
1115
|
//#region src/stores/RouterScopeProvider.tsx
|
|
1116
|
-
function
|
|
1116
|
+
function $t({ children: e }) {
|
|
1117
1117
|
let [t] = h(() => ({
|
|
1118
|
-
history:
|
|
1119
|
-
navigate:
|
|
1120
|
-
transition:
|
|
1121
|
-
screen:
|
|
1122
|
-
driver:
|
|
1118
|
+
history: O(),
|
|
1119
|
+
navigate: me(),
|
|
1120
|
+
transition: Ce(),
|
|
1121
|
+
screen: P(),
|
|
1122
|
+
driver: fe(),
|
|
1123
1123
|
memory: !1,
|
|
1124
|
-
markSelfInduced:
|
|
1125
|
-
consume:
|
|
1124
|
+
markSelfInduced: Me,
|
|
1125
|
+
consume: de,
|
|
1126
1126
|
life: { alive: !0 }
|
|
1127
1127
|
}));
|
|
1128
|
-
return /* @__PURE__ */
|
|
1128
|
+
return /* @__PURE__ */ F(nt.Provider, {
|
|
1129
1129
|
value: t,
|
|
1130
1130
|
children: e
|
|
1131
1131
|
});
|
|
1132
1132
|
}
|
|
1133
1133
|
//#endregion
|
|
1134
|
-
export {
|
|
1134
|
+
export { v as DEFAULT_COMMIT_FRACTION, y as DEFAULT_COMMIT_VELOCITY, Zt as Layer, Qt as Morph, Xt as Part, Nt as Route, Mt as Router, $t as RouterScopeProvider, Q as Screen, R as ScreenContext, qt as ScreenDecorator, zt as ScreenFreeze, Yt as ScreenMotion, St as Slot, D as createBrowserHistoryDriver, pe as createDecorator, k as createMorphTransition, he as createPartTransition, j as createRawDecorator, M as createRawMorphTransition, N as createRawPartTransition, ge as createRawTransition, xe as createTransition, Pe as morphTransitionMap, Le as partTransitionMap, H as useHistoryStore, Pt as useNavigate, Kt as useNavigateStore, Lt as useParams, Ft as usePathname, z as useScreen, Z as useScreenStore, It as useStep, I as useStores, Jt as useViewportScrollHeight };
|