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