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