@flemo/react 1.6.8 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +290 -273
- package/dist/screen/ScreenContext.d.ts +2 -1
- package/dist/screen/__tests__/ScreenMotion.replaceSuspenseCut.test.d.ts +1 -0
- package/dist/screen/__tests__/ScreenMotion.shellFirst.test.d.ts +1 -0
- package/dist/screen/__tests__/ScreenMotion.suspendedMountEffects.test.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import e, { Activity as t, Children as n, createContext as r, isValidElement as i,
|
|
2
|
-
import { animHoldKey as
|
|
3
|
-
import { jsx as
|
|
1
|
+
import e, { Activity as t, Children as n, createContext as r, isValidElement as i, startTransition as a, useContext as o, useEffect as s, useId as c, useImperativeHandle as l, useInsertionEffect as ee, useLayoutEffect as u, useReducer as te, useRef as d, useState as f } from "react";
|
|
2
|
+
import { animHoldKey as ne, appendParamsQuery as p, buildRoutePath as m, computeBarRiding as re, computeScreenFreeze as h, consumeSelfInducedPop as g, createAnimHoldCoordinator as _, createBrowserHistoryDriver as v, createBrowserHistoryDriver as y, createDecorator as b, createHistoryStore as ie, createNavigateStore as x, createNavigationController as S, createPartTransition as C, createRawDecorator as w, createRawPartTransition as T, createRawTransition as E, createRouterScope as D, createScreenSelector as O, createScreenStore as ae, createStepController as k, createSwipeController as oe, createTransition as se, createTransitionEngine as ce, createTransitionStore as A, decoratorMap as le, eagerlyDecodeImages as ue, ensureScopeHistorySync as de, enteringInitialStyle as fe, getMatchedPathPattern as j, isOpaqueColor as pe, isServer as me, markSelfInducedPop as he, matchesPathname as ge, observeBarHeight as _e, observeViewportScrollHeight as ve, partTransitionMap as ye, readStepParams as M, registerTransitionDefinitions as be, releaseScopeHistorySync as xe, resolveTransition as Se, seedRouterEntry as Ce, shouldMountShellFirst as we, subscribeStepParamsRestore as N } from "@flemo/core";
|
|
3
|
+
import { jsx as P, jsxs as Te } from "react/jsx-runtime";
|
|
4
4
|
//#region src/stores/StoreContext.ts
|
|
5
|
-
var
|
|
5
|
+
var F = r(null);
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/stores/useStores.ts
|
|
8
|
-
function
|
|
9
|
-
let e =
|
|
8
|
+
function I() {
|
|
9
|
+
let e = o(F);
|
|
10
10
|
if (!e) throw Error("flemo stores are missing. Render inside a <Router>.");
|
|
11
11
|
return e;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/history/HistoryListener.tsx
|
|
15
|
-
function
|
|
16
|
-
let e =
|
|
17
|
-
return
|
|
15
|
+
function L() {
|
|
16
|
+
let e = I();
|
|
17
|
+
return s(() => (de(e), () => xe(e)), [e]), null;
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/screen/ScreenContext.ts
|
|
21
|
-
var
|
|
21
|
+
var R = r({
|
|
22
22
|
id: "",
|
|
23
23
|
isActive: !1,
|
|
24
24
|
isRoot: !0,
|
|
@@ -33,15 +33,15 @@ var B = r({
|
|
|
33
33
|
});
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/screen/useScreen.ts
|
|
36
|
-
function
|
|
37
|
-
return
|
|
36
|
+
function z() {
|
|
37
|
+
return o(R);
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/screen/ParamsProvider/ParamsContext.ts
|
|
41
|
-
var
|
|
41
|
+
var B = r({}), Ee = r(() => {});
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/screen/ParamsProvider/ParamsReducer.ts
|
|
44
|
-
function
|
|
44
|
+
function De(e, t) {
|
|
45
45
|
switch (t.type) {
|
|
46
46
|
case "SET": return t.params;
|
|
47
47
|
default: return e;
|
|
@@ -49,10 +49,10 @@ function we(e, t) {
|
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/screen/ParamsProvider/ParamsProvider.tsx
|
|
52
|
-
function
|
|
53
|
-
let { isActive: t, params: n } =
|
|
54
|
-
return
|
|
55
|
-
if (t) return
|
|
52
|
+
function Oe({ children: e }) {
|
|
53
|
+
let { isActive: t, params: n } = z(), { driver: r } = I(), [i, a] = te(De, n);
|
|
54
|
+
return s(() => {
|
|
55
|
+
if (t) return N(r, (e) => a({
|
|
56
56
|
type: "SET",
|
|
57
57
|
params: e
|
|
58
58
|
}));
|
|
@@ -60,9 +60,9 @@ function Te({ children: e }) {
|
|
|
60
60
|
t,
|
|
61
61
|
a,
|
|
62
62
|
r
|
|
63
|
-
]), /* @__PURE__ */
|
|
63
|
+
]), /* @__PURE__ */ P(Ee.Provider, {
|
|
64
64
|
value: a,
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ P(B.Provider, {
|
|
66
66
|
value: i,
|
|
67
67
|
children: e
|
|
68
68
|
})
|
|
@@ -70,41 +70,42 @@ function Te({ children: e }) {
|
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region ../../node_modules/.pnpm/zustand@5.0.14_@types+react@19.2.17_react@19.2.7/node_modules/zustand/esm/react.mjs
|
|
73
|
-
var
|
|
74
|
-
function
|
|
73
|
+
var V = (e) => e;
|
|
74
|
+
function H(t, n = V) {
|
|
75
75
|
let r = e.useSyncExternalStore(t.subscribe, e.useCallback(() => n(t.getState()), [t, n]), e.useCallback(() => n(t.getInitialState()), [t, n]));
|
|
76
76
|
return e.useDebugValue(r), r;
|
|
77
77
|
}
|
|
78
78
|
//#endregion
|
|
79
79
|
//#region src/stores/useHistoryStore.ts
|
|
80
|
-
function
|
|
81
|
-
return
|
|
80
|
+
function U(e) {
|
|
81
|
+
return H(I().history, e);
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/renderer/Renderer.tsx
|
|
85
|
-
function
|
|
86
|
-
let t =
|
|
87
|
-
return O(
|
|
88
|
-
let [r] = n.toArray(e).filter((e) =>
|
|
89
|
-
return r ? /* @__PURE__ */
|
|
85
|
+
function W({ children: e }) {
|
|
86
|
+
let t = U((e) => e.index), r = U((e) => e.histories), i = I();
|
|
87
|
+
return O(r, t).map((t) => {
|
|
88
|
+
let [r] = n.toArray(e).filter((e) => ge(e.props.path, t.pathname));
|
|
89
|
+
return r ? /* @__PURE__ */ P(R.Provider, {
|
|
90
90
|
value: {
|
|
91
91
|
...t,
|
|
92
|
-
|
|
92
|
+
navigateStore: i.navigate,
|
|
93
|
+
routePath: j(r.props.path, t.pathname)
|
|
93
94
|
},
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ P(Oe, { children: r })
|
|
95
96
|
}, t.id) : null;
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
99
|
//#endregion
|
|
99
100
|
//#region src/screen/ScreenViewportContext.ts
|
|
100
|
-
var
|
|
101
|
-
function
|
|
102
|
-
return
|
|
101
|
+
var G = r({ contained: !1 });
|
|
102
|
+
function ke() {
|
|
103
|
+
return o(G);
|
|
103
104
|
}
|
|
104
105
|
//#endregion
|
|
105
106
|
//#region src/transition/styles.ts
|
|
106
|
-
function
|
|
107
|
-
|
|
107
|
+
function K(e, t, n = []) {
|
|
108
|
+
ee(() => be(e, t, n), [
|
|
108
109
|
e,
|
|
109
110
|
t,
|
|
110
111
|
n
|
|
@@ -112,109 +113,109 @@ function q(e, t, n = []) {
|
|
|
112
113
|
}
|
|
113
114
|
//#endregion
|
|
114
115
|
//#region src/RouterDepthContext.ts
|
|
115
|
-
var
|
|
116
|
-
function
|
|
117
|
-
return /* @__PURE__ */
|
|
116
|
+
var Ae = r(0), q = { contained: !0 };
|
|
117
|
+
function je({ children: e, className: t, style: n }) {
|
|
118
|
+
return /* @__PURE__ */ P("div", {
|
|
118
119
|
className: t,
|
|
119
120
|
style: {
|
|
120
121
|
position: "relative",
|
|
121
122
|
overflow: "hidden",
|
|
122
123
|
...n
|
|
123
124
|
},
|
|
124
|
-
children: /* @__PURE__ */
|
|
125
|
-
value:
|
|
126
|
-
children: /* @__PURE__ */
|
|
125
|
+
children: /* @__PURE__ */ P(G.Provider, {
|
|
126
|
+
value: q,
|
|
127
|
+
children: /* @__PURE__ */ P(W, { children: e })
|
|
127
128
|
})
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
131
|
//#endregion
|
|
131
132
|
//#region src/Router.tsx
|
|
132
|
-
function
|
|
133
|
+
function Me(e) {
|
|
133
134
|
let t = null;
|
|
134
135
|
return n.forEach(e, (e) => {
|
|
135
136
|
if (t || !i(e)) return;
|
|
136
|
-
if (e.type ===
|
|
137
|
+
if (e.type === je) {
|
|
137
138
|
t = n.toArray(e.props.children).filter(i);
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
141
|
let r = e.props.children;
|
|
141
142
|
if (r) {
|
|
142
|
-
let e =
|
|
143
|
+
let e = Me(r);
|
|
143
144
|
e && (t = e);
|
|
144
145
|
}
|
|
145
146
|
}), t;
|
|
146
147
|
}
|
|
147
|
-
var
|
|
148
|
-
function
|
|
149
|
-
let
|
|
148
|
+
var Ne = typeof window > "u" ? s : u, Pe = [], Fe = [], Ie = [], J = { contained: !0 };
|
|
149
|
+
function Le({ children: e, initPath: t = "/", defaultTransitionName: r = "cupertino", transitions: i = Pe, decorators: a = Fe, partTransitions: l = Ie, history: ee = "browser", createDriver: u, className: te, style: d }) {
|
|
150
|
+
let ne = o(Ae), p = ne > 0, m = ee === "memory", re = c(), h = o(R), g = o(F), _ = p && h.id ? `_F_${g?.routerKey ?? ""}${h.id}_` : re, v = Me(e), b = v !== null, ie = p ? null : g, x = ie !== null, S = u ?? y, [C] = f(() => m ? null : S(x ? void 0 : _)), w = !p && !m && !me(), T = w && C ? C.readPathname() : t || "/", E = T.indexOf("?"), O = (E >= 0 ? T.slice(0, E) : T) || "/", ae = w ? window.location.search : E >= 0 ? T.slice(E) : "", [k] = f(() => D({
|
|
150
151
|
routePaths: (v ?? n.toArray(e)).map((e) => e.props.path).flat(),
|
|
151
|
-
pathname:
|
|
152
|
-
search:
|
|
152
|
+
pathname: O,
|
|
153
|
+
search: ae,
|
|
153
154
|
defaultTransitionName: r,
|
|
154
|
-
memory:
|
|
155
|
-
browserDriver:
|
|
156
|
-
hostedScope:
|
|
157
|
-
routerKey:
|
|
158
|
-
zoneEntryId:
|
|
159
|
-
persistKey:
|
|
155
|
+
memory: m,
|
|
156
|
+
browserDriver: C,
|
|
157
|
+
hostedScope: ie,
|
|
158
|
+
routerKey: x ? void 0 : _,
|
|
159
|
+
zoneEntryId: p && !x && h.id || void 0,
|
|
160
|
+
persistKey: p && !m && !x ? _ : void 0
|
|
160
161
|
}));
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}), [
|
|
164
|
-
|
|
165
|
-
driver:
|
|
166
|
-
routerKey:
|
|
167
|
-
nested:
|
|
168
|
-
seedPathname:
|
|
162
|
+
k.transition.setState({ defaultTransitionName: r }), Ne(() => (k.life.alive = !0, () => {
|
|
163
|
+
k.life.alive = !1;
|
|
164
|
+
}), [k]), K(i, a, l), s(() => {
|
|
165
|
+
m || !C || Ce({
|
|
166
|
+
driver: C,
|
|
167
|
+
routerKey: x ? null : _,
|
|
168
|
+
nested: p && !x,
|
|
169
|
+
seedPathname: O,
|
|
169
170
|
defaultTransitionName: r,
|
|
170
|
-
rootParams:
|
|
171
|
+
rootParams: k.history.getState().histories[0]?.params ?? {}
|
|
171
172
|
});
|
|
172
173
|
}, [
|
|
173
|
-
h,
|
|
174
|
-
S,
|
|
175
174
|
m,
|
|
175
|
+
x,
|
|
176
|
+
p,
|
|
176
177
|
_,
|
|
177
|
-
|
|
178
|
+
O,
|
|
178
179
|
r,
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
k.history,
|
|
181
|
+
C
|
|
181
182
|
]);
|
|
182
|
-
let
|
|
183
|
-
value:
|
|
184
|
-
children: /* @__PURE__ */
|
|
185
|
-
value:
|
|
186
|
-
children: [!
|
|
187
|
-
value:
|
|
188
|
-
children:
|
|
189
|
-
}) :
|
|
183
|
+
let oe = b ? e : /* @__PURE__ */ P(W, { children: e }), se = /* @__PURE__ */ P(Ae.Provider, {
|
|
184
|
+
value: ne + 1,
|
|
185
|
+
children: /* @__PURE__ */ Te(F.Provider, {
|
|
186
|
+
value: k,
|
|
187
|
+
children: [!m && /* @__PURE__ */ P(L, {}), p ? /* @__PURE__ */ P(G.Provider, {
|
|
188
|
+
value: J,
|
|
189
|
+
children: oe
|
|
190
|
+
}) : oe]
|
|
190
191
|
})
|
|
191
192
|
});
|
|
192
|
-
return
|
|
193
|
-
className:
|
|
193
|
+
return p ? /* @__PURE__ */ P("div", {
|
|
194
|
+
className: te,
|
|
194
195
|
style: {
|
|
195
196
|
position: "relative",
|
|
196
197
|
overflow: "hidden",
|
|
197
|
-
...
|
|
198
|
+
...d
|
|
198
199
|
},
|
|
199
|
-
children:
|
|
200
|
-
}) :
|
|
200
|
+
children: se
|
|
201
|
+
}) : se;
|
|
201
202
|
}
|
|
202
203
|
//#endregion
|
|
203
204
|
//#region src/Route.tsx
|
|
204
|
-
function
|
|
205
|
+
function Re({ element: e }) {
|
|
205
206
|
return e;
|
|
206
207
|
}
|
|
207
208
|
//#endregion
|
|
208
209
|
//#region src/utils/buildRoutePath.ts
|
|
209
|
-
function
|
|
210
|
+
function ze(e, t) {
|
|
210
211
|
return m(e, t);
|
|
211
212
|
}
|
|
212
213
|
//#endregion
|
|
213
214
|
//#region src/navigate/useNavigate.ts
|
|
214
|
-
function
|
|
215
|
-
let e =
|
|
215
|
+
function Be() {
|
|
216
|
+
let e = I(), t = S({
|
|
216
217
|
stores: e,
|
|
217
|
-
buildPathname: (e, t) =>
|
|
218
|
+
buildPathname: (e, t) => ze(e, t),
|
|
218
219
|
driver: e.driver,
|
|
219
220
|
markSelfInduced: e.markSelfInduced
|
|
220
221
|
});
|
|
@@ -226,21 +227,21 @@ function Le() {
|
|
|
226
227
|
}
|
|
227
228
|
//#endregion
|
|
228
229
|
//#region src/navigate/usePathname.ts
|
|
229
|
-
function
|
|
230
|
-
return
|
|
230
|
+
function Ve() {
|
|
231
|
+
return U((e) => e.histories[e.pendingIndex]?.pathname ?? "/");
|
|
231
232
|
}
|
|
232
233
|
//#endregion
|
|
233
234
|
//#region src/navigate/useStep.ts
|
|
234
|
-
function
|
|
235
|
-
let { routePath: e } =
|
|
236
|
-
|
|
237
|
-
if (!e) return c(
|
|
235
|
+
function Y() {
|
|
236
|
+
let { routePath: e } = z(), t = I(), n = o(Ee), { driver: r, markSelfInduced: i } = t, [a, c] = f(null);
|
|
237
|
+
s(() => {
|
|
238
|
+
if (!e) return c(M(r.readState())), r.subscribe((e) => c(M(e.state)));
|
|
238
239
|
}, [e, r]);
|
|
239
|
-
let l =
|
|
240
|
+
let l = k({
|
|
240
241
|
stores: t,
|
|
241
242
|
driver: r,
|
|
242
243
|
markSelfInduced: i,
|
|
243
|
-
buildStepPathname: (t) => e ?
|
|
244
|
+
buildStepPathname: (t) => e ? ze(e, t).pathname : p(r.readPathname(), t),
|
|
244
245
|
applyParams: (t) => {
|
|
245
246
|
n({
|
|
246
247
|
type: "SET",
|
|
@@ -249,7 +250,7 @@ function X() {
|
|
|
249
250
|
}
|
|
250
251
|
});
|
|
251
252
|
return {
|
|
252
|
-
step:
|
|
253
|
+
step: a,
|
|
253
254
|
pushStep: (e) => l.pushStep(e),
|
|
254
255
|
replaceStep: (e) => l.replaceStep(e),
|
|
255
256
|
popStep: l.popStep
|
|
@@ -257,39 +258,39 @@ function X() {
|
|
|
257
258
|
}
|
|
258
259
|
//#endregion
|
|
259
260
|
//#region src/screen/ParamsProvider/useParams.ts
|
|
260
|
-
function
|
|
261
|
-
return
|
|
261
|
+
function He() {
|
|
262
|
+
return o(B);
|
|
262
263
|
}
|
|
263
264
|
//#endregion
|
|
264
265
|
//#region src/screen/ScreenFreeze.tsx
|
|
265
|
-
function
|
|
266
|
-
return /* @__PURE__ */
|
|
266
|
+
function X({ freeze: e, children: n }) {
|
|
267
|
+
return /* @__PURE__ */ P(t, {
|
|
267
268
|
mode: e ? "hidden" : "visible",
|
|
268
269
|
children: n
|
|
269
270
|
});
|
|
270
271
|
}
|
|
271
272
|
//#endregion
|
|
272
273
|
//#region src/screen/scopeAnimHoldCoordinator.ts
|
|
273
|
-
var
|
|
274
|
-
function
|
|
275
|
-
let t =
|
|
276
|
-
return t || (t = _(),
|
|
274
|
+
var Ue = /* @__PURE__ */ new WeakMap();
|
|
275
|
+
function We(e) {
|
|
276
|
+
let t = Ue.get(e);
|
|
277
|
+
return t || (t = _(), Ue.set(e, t)), t;
|
|
277
278
|
}
|
|
278
279
|
//#endregion
|
|
279
280
|
//#region src/stores/useNavigateStore.ts
|
|
280
|
-
function
|
|
281
|
-
return
|
|
281
|
+
function Z(e) {
|
|
282
|
+
return H(I().navigate, e);
|
|
282
283
|
}
|
|
283
284
|
//#endregion
|
|
284
285
|
//#region src/screen/ScreenDecorator.tsx
|
|
285
|
-
function
|
|
286
|
-
let { isActive: r, transitionName: i } =
|
|
287
|
-
|
|
288
|
-
let o =
|
|
289
|
-
return
|
|
286
|
+
function Ge({ ref: e, style: t, ...n }) {
|
|
287
|
+
let { isActive: r, transitionName: i } = z(), a = d(null);
|
|
288
|
+
l(e, () => a.current);
|
|
289
|
+
let o = Z((e) => e.status), { decoratorName: s } = Se(i), c = le.get(s);
|
|
290
|
+
return c ? /* @__PURE__ */ P("div", {
|
|
290
291
|
ref: a,
|
|
291
292
|
"data-flemo-decorator": !0,
|
|
292
|
-
"data-flemo-decorator-name":
|
|
293
|
+
"data-flemo-decorator-name": c.name,
|
|
293
294
|
"data-flemo-status": o,
|
|
294
295
|
"data-flemo-active": r ? "true" : "false",
|
|
295
296
|
style: {
|
|
@@ -307,9 +308,9 @@ function He({ ref: e, style: t, ...n }) {
|
|
|
307
308
|
}
|
|
308
309
|
//#endregion
|
|
309
310
|
//#region src/screen/useViewportScrollHeight.ts
|
|
310
|
-
function
|
|
311
|
+
function Ke() {
|
|
311
312
|
let [e, t] = f(0), [n, r] = f(0);
|
|
312
|
-
return
|
|
313
|
+
return s(() => ve((e, n) => {
|
|
313
314
|
r(n), t(e);
|
|
314
315
|
}), []), {
|
|
315
316
|
viewportScrollHeight: e,
|
|
@@ -318,185 +319,201 @@ function Ue() {
|
|
|
318
319
|
}
|
|
319
320
|
//#endregion
|
|
320
321
|
//#region src/stores/useScreenStore.ts
|
|
321
|
-
function
|
|
322
|
-
return
|
|
322
|
+
function Q(e) {
|
|
323
|
+
return H(I().screen, e);
|
|
323
324
|
}
|
|
324
325
|
//#endregion
|
|
325
326
|
//#region src/screen/ScreenMotion.tsx
|
|
326
|
-
function
|
|
327
|
-
let { id: v, isActive: y, isRoot: b, isPrev:
|
|
328
|
-
|
|
327
|
+
function $({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigationBarHeight: r, systemNavigationBarColor: i, sharedTopBar: o, sharedBottomBar: c, topBar: l, bottomBar: ee, hideStatusBar: te, hideSystemNavigationBar: p, backgroundColor: m = "white", contentScrollable: g = !0, ..._ }) {
|
|
328
|
+
let { id: v, isActive: y, isRoot: b, isPrev: ie, zIndex: x, transitionName: S, prevTransitionName: C } = z(), { contained: w } = ke(), T = w ? "absolute" : "fixed", E = I(), D = Z((e) => e.status), O = Q((e) => e.dragStatus), ae = Q((e) => e.replaceTransitionStatus), k = E.screen.getState().setDragStatus, se = E.screen.getState().setReplaceTransitionStatus, A = U((e) => e.index), de = U((e) => e.histories), j = y ? de[A - 1]?.id : de[A]?.id, me = Q((e) => j ? e.sharedBars[j] : void 0), he = Q((e) => j ? e.screenSurfaces[j] : void 0), ge = d(null);
|
|
329
|
+
ge.current ||= ce({
|
|
329
330
|
getTransitionTaskId: () => E.navigate.getState().transitionTaskId,
|
|
330
|
-
setDragStatus:
|
|
331
|
-
setReplaceTransitionStatus:
|
|
331
|
+
setDragStatus: k,
|
|
332
|
+
setReplaceTransitionStatus: se
|
|
332
333
|
});
|
|
333
|
-
let
|
|
334
|
-
|
|
335
|
-
let
|
|
336
|
-
transition:
|
|
337
|
-
decorator:
|
|
338
|
-
hasSharedTopBar: !!
|
|
339
|
-
hasSharedBottomBar: !!
|
|
340
|
-
viewportScrollHeight:
|
|
334
|
+
let ve = ge.current, ye = d(null);
|
|
335
|
+
ye.current ||= We(E.navigate);
|
|
336
|
+
let M = Se(S), { initial: be, swipeDirection: xe, decoratorName: Ce } = M, N = le.get(Ce), { viewportScrollHeight: F } = Ke(), L = F > 0, [R, B] = f(0), [Ee, De] = f(0), Oe = d(null), V = d(null), H = d(null), W = d(null), G = d(null), K = d({
|
|
337
|
+
transition: M,
|
|
338
|
+
decorator: N,
|
|
339
|
+
hasSharedTopBar: !!o,
|
|
340
|
+
hasSharedBottomBar: !!c,
|
|
341
|
+
viewportScrollHeight: F,
|
|
341
342
|
isRoot: b,
|
|
342
343
|
isActive: y,
|
|
343
344
|
status: D,
|
|
344
345
|
dragStatus: O,
|
|
345
|
-
index:
|
|
346
|
+
index: A
|
|
346
347
|
});
|
|
347
|
-
|
|
348
|
-
transition:
|
|
349
|
-
decorator:
|
|
350
|
-
hasSharedTopBar: !!
|
|
351
|
-
hasSharedBottomBar: !!
|
|
352
|
-
viewportScrollHeight:
|
|
348
|
+
K.current = {
|
|
349
|
+
transition: M,
|
|
350
|
+
decorator: N,
|
|
351
|
+
hasSharedTopBar: !!o,
|
|
352
|
+
hasSharedBottomBar: !!c,
|
|
353
|
+
viewportScrollHeight: F,
|
|
353
354
|
isRoot: b,
|
|
354
355
|
isActive: y,
|
|
355
356
|
status: D,
|
|
356
357
|
dragStatus: O,
|
|
357
|
-
index:
|
|
358
|
+
index: A
|
|
358
359
|
};
|
|
359
|
-
let
|
|
360
|
-
|
|
361
|
-
getTransition: () =>
|
|
362
|
-
getDecorator: () =>
|
|
360
|
+
let Ae = d(null);
|
|
361
|
+
Ae.current ||= oe({
|
|
362
|
+
getTransition: () => K.current.transition,
|
|
363
|
+
getDecorator: () => K.current.decorator,
|
|
363
364
|
getElements: () => ({
|
|
364
|
-
scope:
|
|
365
|
-
screenContainer:
|
|
366
|
-
decorator:
|
|
367
|
-
sharedTopBar:
|
|
368
|
-
sharedBottomBar:
|
|
365
|
+
scope: V.current,
|
|
366
|
+
screenContainer: Oe.current,
|
|
367
|
+
decorator: H.current,
|
|
368
|
+
sharedTopBar: W.current,
|
|
369
|
+
sharedBottomBar: G.current
|
|
369
370
|
}),
|
|
370
|
-
hasSharedTopBar: () =>
|
|
371
|
-
hasSharedBottomBar: () =>
|
|
372
|
-
getViewportScrollHeight: () =>
|
|
371
|
+
hasSharedTopBar: () => K.current.hasSharedTopBar,
|
|
372
|
+
hasSharedBottomBar: () => K.current.hasSharedBottomBar,
|
|
373
|
+
getViewportScrollHeight: () => K.current.viewportScrollHeight,
|
|
373
374
|
isReadyForDrag: () => {
|
|
374
|
-
let e =
|
|
375
|
+
let e = K.current;
|
|
375
376
|
return !e.isRoot && e.isActive && e.status === "COMPLETED" && e.dragStatus === "IDLE" && !!e.transition.swipeDirection && e.viewportScrollHeight < 10;
|
|
376
377
|
},
|
|
377
378
|
getPartnerBars: () => {
|
|
378
|
-
let e =
|
|
379
|
+
let e = K.current, t = E.history.getState().histories, n = e.isActive ? t[e.index - 1]?.id : t[e.index]?.id;
|
|
379
380
|
return n ? E.screen.getState().sharedBars[n] : void 0;
|
|
380
381
|
},
|
|
381
|
-
setDragStatus:
|
|
382
|
+
setDragStatus: k,
|
|
382
383
|
back: () => window.history.back()
|
|
383
384
|
});
|
|
384
|
-
let
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}, []),
|
|
388
|
-
let e =
|
|
385
|
+
let q = Ae.current, je = (e) => q.pointerDown(e.nativeEvent), Me = (e) => q.pointerMove(e.nativeEvent), Ne = (e) => q.pointerUp(e.nativeEvent);
|
|
386
|
+
s(() => {
|
|
387
|
+
ue(V.current);
|
|
388
|
+
}, []), s(() => {
|
|
389
|
+
let e = V.current;
|
|
389
390
|
if (!e) return;
|
|
390
391
|
let t = (e) => {
|
|
391
|
-
|
|
392
|
+
q.shouldPreventTouch() && e.preventDefault(), e.target?.dataset.swipeAtEdgeBar === "true" && e.preventDefault();
|
|
392
393
|
};
|
|
393
394
|
return e.addEventListener("touchmove", t, { passive: !1 }), () => {
|
|
394
395
|
e.removeEventListener("touchmove", t);
|
|
395
396
|
};
|
|
396
|
-
}, [
|
|
397
|
-
let e =
|
|
397
|
+
}, [q]), u(() => {
|
|
398
|
+
let e = W.current;
|
|
398
399
|
if (!e) {
|
|
399
|
-
|
|
400
|
+
B(0);
|
|
400
401
|
return;
|
|
401
402
|
}
|
|
402
|
-
return
|
|
403
|
-
}, [
|
|
404
|
-
let e =
|
|
403
|
+
return _e(e, B);
|
|
404
|
+
}, [o]), u(() => {
|
|
405
|
+
let e = G.current;
|
|
405
406
|
if (!e) {
|
|
406
|
-
|
|
407
|
+
De(0);
|
|
407
408
|
return;
|
|
408
409
|
}
|
|
409
|
-
return
|
|
410
|
-
}, [
|
|
410
|
+
return _e(e, De);
|
|
411
|
+
}, [c]), u(() => {
|
|
411
412
|
let { registerSharedBars: e, unregisterSharedBars: t } = E.screen.getState();
|
|
412
413
|
return e(v, {
|
|
413
|
-
topBar: !!
|
|
414
|
-
bottomBar: !!
|
|
414
|
+
topBar: !!o,
|
|
415
|
+
bottomBar: !!c
|
|
415
416
|
}), () => t(v);
|
|
416
417
|
}, [
|
|
417
418
|
v,
|
|
418
|
-
|
|
419
|
-
|
|
419
|
+
o,
|
|
420
|
+
c,
|
|
420
421
|
E.screen
|
|
421
422
|
]), u(() => {
|
|
422
|
-
let e =
|
|
423
|
+
let e = V.current;
|
|
423
424
|
if (!e) return;
|
|
424
425
|
let { registerScreenSurface: t, unregisterScreenSurface: n } = E.screen.getState();
|
|
425
|
-
return t(v, { opaqueBackground:
|
|
426
|
+
return t(v, { opaqueBackground: pe(getComputedStyle(e).backgroundColor) }), () => n(v);
|
|
426
427
|
}, [
|
|
427
428
|
v,
|
|
428
429
|
m,
|
|
429
430
|
D,
|
|
430
431
|
E.screen
|
|
431
432
|
]);
|
|
432
|
-
let
|
|
433
|
+
let Pe = y || x === A - 1, { app: Fe, nav: Ie } = re({
|
|
433
434
|
status: D,
|
|
434
|
-
isTopOrTopPrev:
|
|
435
|
-
hasTopBar: !!
|
|
436
|
-
hasNavBar: !!
|
|
437
|
-
partnerBars:
|
|
438
|
-
}),
|
|
435
|
+
isTopOrTopPrev: Pe,
|
|
436
|
+
hasTopBar: !!o,
|
|
437
|
+
hasNavBar: !!c,
|
|
438
|
+
partnerBars: me
|
|
439
|
+
}), J = ne({
|
|
439
440
|
status: D,
|
|
440
|
-
isTopOrTopPrev:
|
|
441
|
+
isTopOrTopPrev: Pe,
|
|
441
442
|
transitionName: S
|
|
442
|
-
}),
|
|
443
|
+
}), Le = h({
|
|
443
444
|
isActive: y,
|
|
444
|
-
isPrev:
|
|
445
|
+
isPrev: ie,
|
|
445
446
|
zIndex: x,
|
|
446
|
-
index:
|
|
447
|
+
index: A,
|
|
447
448
|
status: D,
|
|
448
449
|
dragStatus: O,
|
|
449
|
-
replaceTransitionStatus:
|
|
450
|
-
}),
|
|
451
|
-
key:
|
|
452
|
-
released:
|
|
450
|
+
replaceTransitionStatus: ae
|
|
451
|
+
}), Re = d(Le), ze = d(J !== null && Le), [Be, Ve] = f({
|
|
452
|
+
key: J,
|
|
453
|
+
released: J === null
|
|
453
454
|
});
|
|
454
|
-
|
|
455
|
-
key:
|
|
456
|
-
released:
|
|
457
|
-
}),
|
|
458
|
-
let
|
|
459
|
-
|
|
455
|
+
Be.key !== J && (Ve({
|
|
456
|
+
key: J,
|
|
457
|
+
released: J === null
|
|
458
|
+
}), ze.current = J !== null && Re.current), Re.current = Le;
|
|
459
|
+
let Y = J !== null && Be.key === J && !Be.released, [He] = f(() => we({
|
|
460
|
+
holdKey: J,
|
|
461
|
+
isActive: y,
|
|
462
|
+
status: D
|
|
463
|
+
})), [X, Ue] = f(!1);
|
|
464
|
+
s(() => {
|
|
465
|
+
if (!He || X || Y) return;
|
|
466
|
+
let e = requestAnimationFrame(() => {
|
|
467
|
+
a(() => Ue(!0));
|
|
468
|
+
});
|
|
469
|
+
return () => cancelAnimationFrame(e);
|
|
470
|
+
}, [
|
|
471
|
+
He,
|
|
472
|
+
X,
|
|
473
|
+
Y
|
|
474
|
+
]);
|
|
475
|
+
let $ = Y ? !y && he?.opaqueBackground ? "park" : y && (D === "PUSHING" || D === "REPLACING") && he?.opaqueBackground ? "park-under" : "true" : "false";
|
|
476
|
+
u(() => ve.driveScreenLifecycle({
|
|
460
477
|
getElements: () => ({
|
|
461
|
-
scope:
|
|
462
|
-
decorator:
|
|
463
|
-
bars: [
|
|
478
|
+
scope: V.current,
|
|
479
|
+
decorator: H.current,
|
|
480
|
+
bars: [W.current, G.current]
|
|
464
481
|
}),
|
|
465
482
|
transitionName: S,
|
|
466
483
|
prevTransitionName: C,
|
|
467
484
|
status: D,
|
|
468
485
|
isActive: y,
|
|
469
|
-
animHoldReleased: !
|
|
486
|
+
animHoldReleased: !Y
|
|
470
487
|
}), [
|
|
471
|
-
|
|
488
|
+
ve,
|
|
472
489
|
D,
|
|
473
490
|
y,
|
|
474
491
|
C,
|
|
475
492
|
S,
|
|
476
|
-
|
|
477
|
-
]),
|
|
478
|
-
if (!
|
|
479
|
-
let e =
|
|
480
|
-
return
|
|
493
|
+
Y
|
|
494
|
+
]), s(() => {
|
|
495
|
+
if (!Y || J === null) return;
|
|
496
|
+
let e = J, t = E.navigate.getState().transitionTaskId, n = t === null ? e : `${e}#${t}`;
|
|
497
|
+
return ye.current.join(n, () => Ve((t) => t.key === e && !t.released ? {
|
|
481
498
|
key: e,
|
|
482
499
|
released: !0
|
|
483
500
|
} : t), {
|
|
484
|
-
scope:
|
|
485
|
-
decodeWait:
|
|
501
|
+
scope: V.current,
|
|
502
|
+
decodeWait: ze.current
|
|
486
503
|
});
|
|
487
504
|
}, [
|
|
488
|
-
X,
|
|
489
505
|
Y,
|
|
490
|
-
|
|
506
|
+
J,
|
|
507
|
+
$,
|
|
491
508
|
E.navigate
|
|
492
509
|
]);
|
|
493
|
-
let
|
|
494
|
-
initial:
|
|
510
|
+
let qe = $ === "park-under" ? {} : fe({
|
|
511
|
+
initial: be,
|
|
495
512
|
isActive: y,
|
|
496
513
|
status: D
|
|
497
514
|
});
|
|
498
|
-
return /* @__PURE__ */
|
|
499
|
-
ref:
|
|
515
|
+
return /* @__PURE__ */ Te("div", {
|
|
516
|
+
ref: Oe,
|
|
500
517
|
style: {
|
|
501
518
|
position: T,
|
|
502
519
|
top: 0,
|
|
@@ -504,14 +521,14 @@ function We({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
504
521
|
width: "100%",
|
|
505
522
|
height: "100%",
|
|
506
523
|
display: "flex",
|
|
507
|
-
zIndex:
|
|
524
|
+
zIndex: $ === "park-under" ? -1 : void 0,
|
|
508
525
|
contain: "layout style",
|
|
509
526
|
flexDirection: "column",
|
|
510
527
|
boxSizing: "border-box",
|
|
511
528
|
overscrollBehavior: "contain"
|
|
512
529
|
},
|
|
513
530
|
children: [
|
|
514
|
-
/* @__PURE__ */
|
|
531
|
+
/* @__PURE__ */ P("div", {
|
|
515
532
|
"data-swipe-at-edge-bar": !0,
|
|
516
533
|
style: {
|
|
517
534
|
position: T,
|
|
@@ -522,32 +539,32 @@ function We({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
522
539
|
zIndex: 1
|
|
523
540
|
}
|
|
524
541
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
526
|
-
ref:
|
|
542
|
+
/* @__PURE__ */ Te("div", {
|
|
543
|
+
ref: V,
|
|
527
544
|
..._,
|
|
528
|
-
onPointerDown:
|
|
529
|
-
onPointerMove:
|
|
530
|
-
onPointerUp:
|
|
531
|
-
onPointerCancel:
|
|
545
|
+
onPointerDown: je,
|
|
546
|
+
onPointerMove: Me,
|
|
547
|
+
onPointerUp: Ne,
|
|
548
|
+
onPointerCancel: Ne,
|
|
532
549
|
"data-flemo-screen": !0,
|
|
533
550
|
"data-flemo-transition": S,
|
|
534
551
|
"data-flemo-status": D,
|
|
535
552
|
"data-flemo-active": y ? "true" : "false",
|
|
536
|
-
"data-flemo-anim-hold":
|
|
553
|
+
"data-flemo-anim-hold": $,
|
|
537
554
|
style: {
|
|
538
555
|
display: "flex",
|
|
539
556
|
flexDirection: "column",
|
|
540
557
|
height: "100%",
|
|
541
558
|
backgroundColor: m,
|
|
542
559
|
overflowY: g ? void 0 : "auto",
|
|
543
|
-
touchAction:
|
|
544
|
-
...
|
|
560
|
+
touchAction: xe === "x" ? "pan-y" : xe === "y" ? "pan-x" : "auto",
|
|
561
|
+
...qe,
|
|
545
562
|
..._.style
|
|
546
563
|
},
|
|
547
564
|
children: [
|
|
548
|
-
!
|
|
565
|
+
!te && t && /* @__PURE__ */ P("div", {
|
|
549
566
|
style: { minHeight: t },
|
|
550
|
-
children: /* @__PURE__ */
|
|
567
|
+
children: /* @__PURE__ */ P("div", { style: {
|
|
551
568
|
position: T,
|
|
552
569
|
top: 0,
|
|
553
570
|
width: "100%",
|
|
@@ -555,32 +572,32 @@ function We({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
555
572
|
backgroundColor: n
|
|
556
573
|
} })
|
|
557
574
|
}),
|
|
558
|
-
|
|
575
|
+
o && /* @__PURE__ */ P("div", { style: {
|
|
559
576
|
width: "100%",
|
|
560
|
-
minHeight:
|
|
577
|
+
minHeight: R
|
|
561
578
|
} }),
|
|
562
|
-
|
|
563
|
-
/* @__PURE__ */
|
|
579
|
+
l,
|
|
580
|
+
/* @__PURE__ */ P("div", {
|
|
564
581
|
style: {
|
|
565
582
|
display: "flex",
|
|
566
583
|
flexDirection: "column",
|
|
567
584
|
flexGrow: 1,
|
|
568
585
|
overflowY: g ? "auto" : void 0
|
|
569
586
|
},
|
|
570
|
-
children: e
|
|
587
|
+
children: He && !X ? null : e
|
|
571
588
|
}),
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
display:
|
|
589
|
+
ee,
|
|
590
|
+
c && /* @__PURE__ */ P("div", { style: {
|
|
591
|
+
display: L ? "none" : void 0,
|
|
575
592
|
width: "100%",
|
|
576
|
-
minHeight:
|
|
593
|
+
minHeight: Ee
|
|
577
594
|
} }),
|
|
578
|
-
!p && r && /* @__PURE__ */
|
|
595
|
+
!p && r && /* @__PURE__ */ P("div", {
|
|
579
596
|
style: {
|
|
580
|
-
display:
|
|
597
|
+
display: L ? "none" : void 0,
|
|
581
598
|
minHeight: r
|
|
582
599
|
},
|
|
583
|
-
children: /* @__PURE__ */
|
|
600
|
+
children: /* @__PURE__ */ P("div", { style: {
|
|
584
601
|
position: T,
|
|
585
602
|
bottom: 0,
|
|
586
603
|
width: "100%",
|
|
@@ -590,46 +607,46 @@ function We({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
590
607
|
})
|
|
591
608
|
]
|
|
592
609
|
}),
|
|
593
|
-
|
|
594
|
-
ref:
|
|
610
|
+
o && /* @__PURE__ */ P("div", {
|
|
611
|
+
ref: W,
|
|
595
612
|
"data-flemo-bar": "app",
|
|
596
613
|
"data-flemo-bar-transition": S,
|
|
597
614
|
"data-flemo-bar-status": D,
|
|
598
615
|
"data-flemo-bar-active": y ? "true" : "false",
|
|
599
|
-
"data-flemo-bar-riding":
|
|
600
|
-
"data-flemo-anim-hold":
|
|
616
|
+
"data-flemo-bar-riding": Fe ? "true" : "false",
|
|
617
|
+
"data-flemo-anim-hold": $,
|
|
601
618
|
style: {
|
|
602
619
|
position: T,
|
|
603
|
-
top:
|
|
620
|
+
top: te ? 0 : t,
|
|
604
621
|
left: 0,
|
|
605
622
|
width: "100%",
|
|
606
623
|
zIndex: 1
|
|
607
624
|
},
|
|
608
|
-
children:
|
|
625
|
+
children: o
|
|
609
626
|
}),
|
|
610
|
-
|
|
611
|
-
ref:
|
|
627
|
+
c && /* @__PURE__ */ P("div", {
|
|
628
|
+
ref: G,
|
|
612
629
|
"data-flemo-bar": "nav",
|
|
613
630
|
"data-flemo-bar-transition": S,
|
|
614
631
|
"data-flemo-bar-status": D,
|
|
615
632
|
"data-flemo-bar-active": y ? "true" : "false",
|
|
616
|
-
"data-flemo-bar-riding":
|
|
617
|
-
"data-flemo-anim-hold":
|
|
633
|
+
"data-flemo-bar-riding": Ie ? "true" : "false",
|
|
634
|
+
"data-flemo-anim-hold": $,
|
|
618
635
|
style: {
|
|
619
|
-
display:
|
|
636
|
+
display: L ? "none" : void 0,
|
|
620
637
|
position: T,
|
|
621
638
|
bottom: p ? 0 : r,
|
|
622
639
|
left: 0,
|
|
623
640
|
width: "100%",
|
|
624
641
|
zIndex: 1
|
|
625
642
|
},
|
|
626
|
-
children:
|
|
643
|
+
children: c
|
|
627
644
|
}),
|
|
628
|
-
|
|
629
|
-
ref:
|
|
630
|
-
"data-flemo-anim-hold":
|
|
645
|
+
N && /* @__PURE__ */ P(Ge, {
|
|
646
|
+
ref: H,
|
|
647
|
+
"data-flemo-anim-hold": $
|
|
631
648
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ P("div", {
|
|
633
650
|
"data-swipe-at-edge-bar": !0,
|
|
634
651
|
style: {
|
|
635
652
|
position: T,
|
|
@@ -645,19 +662,19 @@ function We({ children: e, statusBarHeight: t, statusBarColor: n, systemNavigati
|
|
|
645
662
|
}
|
|
646
663
|
//#endregion
|
|
647
664
|
//#region src/screen/Screen.tsx
|
|
648
|
-
function
|
|
649
|
-
let { isActive: n, isPrev: r, zIndex: i } =
|
|
650
|
-
return /* @__PURE__ */
|
|
651
|
-
freeze:
|
|
665
|
+
function qe({ children: e, ...t }) {
|
|
666
|
+
let { isActive: n, isPrev: r, zIndex: i } = z();
|
|
667
|
+
return /* @__PURE__ */ P(X, {
|
|
668
|
+
freeze: h({
|
|
652
669
|
isActive: n,
|
|
653
670
|
isPrev: r,
|
|
654
671
|
zIndex: i,
|
|
655
|
-
index:
|
|
656
|
-
status:
|
|
657
|
-
dragStatus:
|
|
658
|
-
replaceTransitionStatus:
|
|
672
|
+
index: U((e) => e.index),
|
|
673
|
+
status: Z((e) => e.status),
|
|
674
|
+
dragStatus: Q((e) => e.dragStatus),
|
|
675
|
+
replaceTransitionStatus: Q((e) => e.replaceTransitionStatus)
|
|
659
676
|
}),
|
|
660
|
-
children: /* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ P($, {
|
|
661
678
|
...t,
|
|
662
679
|
children: e
|
|
663
680
|
})
|
|
@@ -665,12 +682,12 @@ function Ge({ children: e, ...t }) {
|
|
|
665
682
|
}
|
|
666
683
|
//#endregion
|
|
667
684
|
//#region src/screen/Part.tsx
|
|
668
|
-
function
|
|
669
|
-
let { isActive: a } =
|
|
670
|
-
return /* @__PURE__ */
|
|
685
|
+
function Je({ ref: e, name: t, style: n, children: r, ...i }) {
|
|
686
|
+
let { isActive: a, navigateStore: o } = z(), s = I();
|
|
687
|
+
return /* @__PURE__ */ P("div", {
|
|
671
688
|
ref: e,
|
|
672
689
|
"data-flemo-part-name": t,
|
|
673
|
-
"data-flemo-status":
|
|
690
|
+
"data-flemo-status": H(o ?? s.navigate, (e) => e.status),
|
|
674
691
|
"data-flemo-active": a ? "true" : "false",
|
|
675
692
|
style: n,
|
|
676
693
|
...i,
|
|
@@ -679,21 +696,21 @@ function Ke({ ref: e, name: t, style: n, children: r, ...i }) {
|
|
|
679
696
|
}
|
|
680
697
|
//#endregion
|
|
681
698
|
//#region src/stores/RouterScopeProvider.tsx
|
|
682
|
-
function
|
|
699
|
+
function Ye({ children: e }) {
|
|
683
700
|
let [t] = f(() => ({
|
|
684
|
-
history:
|
|
701
|
+
history: ie(),
|
|
685
702
|
navigate: x(),
|
|
686
|
-
transition:
|
|
687
|
-
screen:
|
|
703
|
+
transition: A(),
|
|
704
|
+
screen: ae(),
|
|
688
705
|
driver: y(),
|
|
689
|
-
markSelfInduced:
|
|
706
|
+
markSelfInduced: he,
|
|
690
707
|
consume: g,
|
|
691
708
|
life: { alive: !0 }
|
|
692
709
|
}));
|
|
693
|
-
return /* @__PURE__ */
|
|
710
|
+
return /* @__PURE__ */ P(F.Provider, {
|
|
694
711
|
value: t,
|
|
695
712
|
children: e
|
|
696
713
|
});
|
|
697
714
|
}
|
|
698
715
|
//#endregion
|
|
699
|
-
export {
|
|
716
|
+
export { Je as Part, Re as Route, Le as Router, Ye as RouterScopeProvider, qe as Screen, R as ScreenContext, Ge as ScreenDecorator, X as ScreenFreeze, $ as ScreenMotion, je as Slot, v as createBrowserHistoryDriver, b as createDecorator, C as createPartTransition, w as createRawDecorator, T as createRawPartTransition, E as createRawTransition, se as createTransition, ye as partTransitionMap, U as useHistoryStore, Be as useNavigate, Z as useNavigateStore, He as useParams, Ve as usePathname, z as useScreen, Q as useScreenStore, Y as useStep, I as useStores, Ke as useViewportScrollHeight };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { History, TransitionName } from '@flemo/core';
|
|
1
|
+
import { FlemoStores, History, TransitionName } from '@flemo/core';
|
|
2
2
|
import { Path } from 'path-to-regexp';
|
|
3
3
|
export interface ScreenContextProps extends History {
|
|
4
4
|
id: string;
|
|
@@ -8,6 +8,7 @@ export interface ScreenContextProps extends History {
|
|
|
8
8
|
zIndex: number;
|
|
9
9
|
prevTransitionName: TransitionName;
|
|
10
10
|
routePath: Path;
|
|
11
|
+
navigateStore?: FlemoStores["navigate"];
|
|
11
12
|
}
|
|
12
13
|
declare const ScreenContext: import('react').Context<ScreenContextProps>;
|
|
13
14
|
export default ScreenContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flemo/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "React bindings for flemo: Router, Route, Screen, and the screen-transition runtime.",
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"path-to-regexp": "^8.4.2",
|
|
38
38
|
"zustand": "^5.0.14",
|
|
39
|
-
"@flemo/core": "1.
|
|
39
|
+
"@flemo/core": "1.19.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@testing-library/jest-dom": "^6.9.1",
|