one 2.9.0 → 2.9.2
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/cjs/cli/build.cjs +8 -10
- package/dist/cjs/cli/build.native.cjs +27 -29
- package/dist/cjs/cli/build.native.js +27 -29
- package/dist/cjs/cli/build.native.js.map +1 -1
- package/dist/cjs/cli/buildPage.cjs +2 -11
- package/dist/cjs/cli/buildPage.native.cjs +11 -39
- package/dist/cjs/cli/buildPage.native.js +11 -39
- package/dist/cjs/cli/buildPage.native.js.map +1 -1
- package/dist/cjs/createApp.cjs +2 -5
- package/dist/cjs/platform/ui/Pager.cjs +2 -1
- package/dist/cjs/platform/ui/Pager.native.cjs +3 -0
- package/dist/cjs/platform/ui/Pager.native.js +3 -0
- package/dist/cjs/platform/ui/Pager.native.js.map +1 -1
- package/dist/cjs/router/router.cjs +2 -1
- package/dist/cjs/router/router.native.cjs +5 -2
- package/dist/cjs/router/router.native.js +5 -2
- package/dist/cjs/router/router.native.js.map +1 -1
- package/dist/cjs/router/utils/getNativeStackReplaceAction.cjs +54 -0
- package/dist/cjs/router/utils/getNativeStackReplaceAction.native.cjs +58 -0
- package/dist/cjs/router/utils/getNativeStackReplaceAction.native.js +60 -0
- package/dist/cjs/router/utils/getNativeStackReplaceAction.native.js.map +1 -0
- package/dist/esm/cli/build.mjs +8 -10
- package/dist/esm/cli/build.mjs.map +1 -1
- package/dist/esm/cli/build.native.js +27 -29
- package/dist/esm/cli/build.native.js.map +1 -1
- package/dist/esm/cli/buildPage.mjs +2 -11
- package/dist/esm/cli/buildPage.mjs.map +1 -1
- package/dist/esm/cli/buildPage.native.js +11 -39
- package/dist/esm/cli/buildPage.native.js.map +1 -1
- package/dist/esm/createApp.mjs +2 -5
- package/dist/esm/createApp.mjs.map +1 -1
- package/dist/esm/platform/ui/Pager.mjs +2 -1
- package/dist/esm/platform/ui/Pager.mjs.map +1 -1
- package/dist/esm/platform/ui/Pager.native.js +3 -0
- package/dist/esm/platform/ui/Pager.native.js.map +1 -1
- package/dist/esm/router/router.mjs +1 -1
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +5 -2
- package/dist/esm/router/router.native.js.map +1 -1
- package/dist/esm/router/utils/getNativeStackReplaceAction.mjs +35 -0
- package/dist/esm/router/utils/getNativeStackReplaceAction.mjs.map +1 -0
- package/dist/esm/router/utils/getNativeStackReplaceAction.native.js +37 -0
- package/dist/esm/router/utils/getNativeStackReplaceAction.native.js.map +1 -0
- package/package.json +18 -17
- package/src/cli/build.ts +9 -11
- package/src/cli/buildPage.ts +11 -22
- package/src/cli/workerPool.test.ts +1 -1
- package/src/cli/workerPool.ts +1 -1
- package/src/createApp.tsx +4 -2
- package/src/layouts/stack-utils/StackScreen.tsx +15 -5
- package/src/platform/ui/Pager.native.tsx +3 -0
- package/src/platform/ui/Pager.tsx +1 -0
- package/src/platform/ui/pagerTypes.ts +6 -1
- package/src/router/router.ts +9 -2
- package/src/router/utils/getNativeStackReplaceAction.ts +55 -0
- package/src/types.ts +1 -1
- package/src/vite/types.ts +2 -2
- package/types/cli/build.d.ts.map +1 -1
- package/types/cli/buildPage.d.ts +1 -1
- package/types/cli/buildPage.d.ts.map +1 -1
- package/types/cli/workerPool.d.ts +1 -1
- package/types/cli/workerPool.d.ts.map +1 -1
- package/types/createApp.d.ts.map +1 -1
- package/types/layouts/stack-utils/StackScreen.d.ts +4 -5
- package/types/layouts/stack-utils/StackScreen.d.ts.map +1 -1
- package/types/platform/ui/Pager.d.ts.map +1 -1
- package/types/platform/ui/Pager.native.d.ts.map +1 -1
- package/types/platform/ui/pagerTypes.d.ts +6 -1
- package/types/platform/ui/pagerTypes.d.ts.map +1 -1
- package/types/router/router.d.ts.map +1 -1
- package/types/router/utils/getNativeStackReplaceAction.d.ts +12 -0
- package/types/router/utils/getNativeStackReplaceAction.d.ts.map +1 -0
- package/types/types.d.ts +1 -1
- package/types/types.d.ts.map +1 -1
- package/types/vite/types.d.ts +1 -1
- package/types/vite/types.d.ts.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNativeStackReplaceAction.js","names":[],"sources":["esm/router/utils/getNativeStackReplaceAction.js"],"sourcesContent":["import { StackActions } from \"@react-navigation/native\";\nimport { matchDynamicName, matchGroupName } from \"../matchers\";\nimport { getNavigateAction } from \"./getNavigateAction\";\nfunction getNativeStackReplaceAction(actionState, navigationState) {\n while (actionState && navigationState) {\n const currentRoute = navigationState.routes[navigationState.index];\n const targetRoute = actionState.routes[actionState.index ?? actionState.routes.length - 1];\n if (currentRoute.name !== targetRoute.name && (matchGroupName(currentRoute.name) || matchGroupName(targetRoute.name))) {\n return null;\n }\n const dynamicMatch = matchDynamicName(targetRoute.name);\n const changesDynamicScreen = currentRoute.name === targetRoute.name && dynamicMatch && currentRoute.params?.[dynamicMatch.name] !== targetRoute.params?.[dynamicMatch.name];\n if (!currentRoute.state || !targetRoute.state || changesDynamicScreen) {\n if ((currentRoute.name !== targetRoute.name || changesDynamicScreen) && navigationState.type === \"stack\" && navigationState.routeNames.includes(targetRoute.name)) {\n const { payload } = getNavigateAction(actionState, navigationState, \"REPLACE\");\n return {\n ...StackActions.replace(payload.name, payload.params),\n target: navigationState.key,\n source: currentRoute.key\n };\n }\n return null;\n }\n if (currentRoute.name !== targetRoute.name) {\n return null;\n }\n actionState = targetRoute.state;\n navigationState = currentRoute.state;\n }\n return null;\n}\nexport {\n getNativeStackReplaceAction\n};\n//# sourceMappingURL=getNativeStackReplaceAction.js.map\n"],"mappings":";;;;;AAGA,SAAS,4BAA4B,aAAa,iBAAiB;CACjE,OAAO,eAAe,iBAAiB;EACrC,MAAM,eAAe,gBAAgB,OAAO,gBAAgB;EAC5D,MAAM,cAAc,YAAY,OAAO,YAAY,SAAS,YAAY,OAAO,SAAS;EACxF,IAAI,aAAa,SAAS,YAAY,SAAS,eAAe,aAAa,IAAI,KAAK,eAAe,YAAY,IAAI,IAAI;GACrH,OAAO;EACT;EACA,MAAM,eAAe,iBAAiB,YAAY,IAAI;EACtD,MAAM,uBAAuB,aAAa,SAAS,YAAY,QAAQ,gBAAgB,aAAa,SAAS,aAAa,UAAU,YAAY,SAAS,aAAa;EACtK,IAAI,CAAC,aAAa,SAAS,CAAC,YAAY,SAAS,sBAAsB;GACrE,KAAK,aAAa,SAAS,YAAY,QAAQ,yBAAyB,gBAAgB,SAAS,WAAW,gBAAgB,WAAW,SAAS,YAAY,IAAI,GAAG;IACjK,MAAM,EAAE,YAAY,kBAAkB,aAAa,iBAAiB,SAAS;IAC7E,OAAO;KACL,GAAG,aAAa,QAAQ,QAAQ,MAAM,QAAQ,MAAM;KACpD,QAAQ,gBAAgB;KACxB,QAAQ,aAAa;IACvB;GACF;GACA,OAAO;EACT;EACA,IAAI,aAAa,SAAS,YAAY,MAAM;GAC1C,OAAO;EACT;EACA,cAAc,YAAY;EAC1B,kBAAkB,aAAa;CACjC;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { StackActions } from "@react-navigation/native";
|
|
2
|
+
import { matchDynamicName, matchGroupName } from "../matchers.native.js";
|
|
3
|
+
import { getNavigateAction } from "./getNavigateAction.native.js";
|
|
4
|
+
|
|
5
|
+
function getNativeStackReplaceAction(actionState, navigationState) {
|
|
6
|
+
while (actionState && navigationState) {
|
|
7
|
+
var _actionState_index;
|
|
8
|
+
var _currentRoute_params, _targetRoute_params;
|
|
9
|
+
var currentRoute = navigationState.routes[navigationState.index];
|
|
10
|
+
var targetRoute = actionState.routes[(_actionState_index = actionState.index) !== null && _actionState_index !== void 0 ? _actionState_index : actionState.routes.length - 1];
|
|
11
|
+
if (currentRoute.name !== targetRoute.name && (matchGroupName(currentRoute.name) || matchGroupName(targetRoute.name))) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
var dynamicMatch = matchDynamicName(targetRoute.name);
|
|
15
|
+
var changesDynamicScreen = currentRoute.name === targetRoute.name && dynamicMatch && ((_currentRoute_params = currentRoute.params) === null || _currentRoute_params === void 0 ? void 0 : _currentRoute_params[dynamicMatch.name]) !== ((_targetRoute_params = targetRoute.params) === null || _targetRoute_params === void 0 ? void 0 : _targetRoute_params[dynamicMatch.name]);
|
|
16
|
+
if (!currentRoute.state || !targetRoute.state || changesDynamicScreen) {
|
|
17
|
+
if ((currentRoute.name !== targetRoute.name || changesDynamicScreen) && navigationState.type === "stack" && navigationState.routeNames.includes(targetRoute.name)) {
|
|
18
|
+
var { payload } = getNavigateAction(actionState, navigationState, "REPLACE");
|
|
19
|
+
return {
|
|
20
|
+
...StackActions.replace(payload.name, payload.params),
|
|
21
|
+
target: navigationState.key,
|
|
22
|
+
source: currentRoute.key
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
if (currentRoute.name !== targetRoute.name) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
actionState = targetRoute.state;
|
|
31
|
+
navigationState = currentRoute.state;
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { getNativeStackReplaceAction };
|
|
37
|
+
//# sourceMappingURL=getNativeStackReplaceAction.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNativeStackReplaceAction.native.js","names":[],"sources":["esm/router/utils/getNativeStackReplaceAction.native.js"],"sourcesContent":["import { StackActions } from \"@react-navigation/native\";\nimport { matchDynamicName, matchGroupName } from \"../matchers\";\nimport { getNavigateAction } from \"./getNavigateAction\";\nfunction getNativeStackReplaceAction(actionState, navigationState) {\n while (actionState && navigationState) {\n var _actionState_index;\n var _currentRoute_params, _targetRoute_params;\n var currentRoute = navigationState.routes[navigationState.index];\n var targetRoute = actionState.routes[(_actionState_index = actionState.index) !== null && _actionState_index !== void 0 ? _actionState_index : actionState.routes.length - 1];\n if (currentRoute.name !== targetRoute.name && (matchGroupName(currentRoute.name) || matchGroupName(targetRoute.name))) {\n return null;\n }\n var dynamicMatch = matchDynamicName(targetRoute.name);\n var changesDynamicScreen = currentRoute.name === targetRoute.name && dynamicMatch && ((_currentRoute_params = currentRoute.params) === null || _currentRoute_params === void 0 ? void 0 : _currentRoute_params[dynamicMatch.name]) !== ((_targetRoute_params = targetRoute.params) === null || _targetRoute_params === void 0 ? void 0 : _targetRoute_params[dynamicMatch.name]);\n if (!currentRoute.state || !targetRoute.state || changesDynamicScreen) {\n if ((currentRoute.name !== targetRoute.name || changesDynamicScreen) && navigationState.type === \"stack\" && navigationState.routeNames.includes(targetRoute.name)) {\n var { payload } = getNavigateAction(actionState, navigationState, \"REPLACE\");\n return {\n ...StackActions.replace(payload.name, payload.params),\n target: navigationState.key,\n source: currentRoute.key\n };\n }\n return null;\n }\n if (currentRoute.name !== targetRoute.name) {\n return null;\n }\n actionState = targetRoute.state;\n navigationState = currentRoute.state;\n }\n return null;\n}\nexport {\n getNativeStackReplaceAction\n};\n//# sourceMappingURL=getNativeStackReplaceAction.js.map\n"],"mappings":";;;;;AAGA,SAAS,4BAA4B,aAAa,iBAAiB;CACjE,OAAO,eAAe,iBAAiB;EACrC,IAAI;EACJ,IAAI,sBAAsB;EAC1B,IAAI,eAAe,gBAAgB,OAAO,gBAAgB;EAC1D,IAAI,cAAc,YAAY,QAAQ,qBAAqB,YAAY,WAAW,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB,YAAY,OAAO,SAAS;EAC3K,IAAI,aAAa,SAAS,YAAY,SAAS,eAAe,aAAa,IAAI,KAAK,eAAe,YAAY,IAAI,IAAI;GACrH,OAAO;EACT;EACA,IAAI,eAAe,iBAAiB,YAAY,IAAI;EACpD,IAAI,uBAAuB,aAAa,SAAS,YAAY,QAAQ,kBAAkB,uBAAuB,aAAa,YAAY,QAAQ,yBAAyB,KAAK,IAAI,KAAK,IAAI,qBAAqB,aAAa,aAAa,sBAAsB,YAAY,YAAY,QAAQ,wBAAwB,KAAK,IAAI,KAAK,IAAI,oBAAoB,aAAa;EAC1W,IAAI,CAAC,aAAa,SAAS,CAAC,YAAY,SAAS,sBAAsB;GACrE,KAAK,aAAa,SAAS,YAAY,QAAQ,yBAAyB,gBAAgB,SAAS,WAAW,gBAAgB,WAAW,SAAS,YAAY,IAAI,GAAG;IACjK,IAAI,EAAE,YAAY,kBAAkB,aAAa,iBAAiB,SAAS;IAC3E,OAAO;KACL,GAAG,aAAa,QAAQ,QAAQ,MAAM,QAAQ,MAAM;KACpD,QAAQ,gBAAgB;KACxB,QAAQ,aAAa;IACvB;GACF;GACA,OAAO;EACT;EACA,IAAI,aAAa,SAAS,YAAY,MAAM;GAC1C,OAAO;EACT;EACA,cAAc,YAAY;EAC1B,kBAAkB,aAAa;CACjC;CACA,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "one",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "One is a React framework for web, iOS, and Android apps.",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"sideEffects": [
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"setup.mjs",
|
|
9
9
|
"setup.js",
|
|
10
10
|
"**/polyfills-mobile.*",
|
|
11
|
+
"**/ios-runtime.native.*",
|
|
11
12
|
"web-streams-polyfill/polyfill/es5",
|
|
12
13
|
"@azure/core-asynciterator-polyfill",
|
|
13
14
|
"core-js/internals/inspect-source",
|
|
@@ -252,20 +253,20 @@
|
|
|
252
253
|
"@react-navigation/routers": "8.0.0-alpha.21",
|
|
253
254
|
"@rozenite/middleware": "^2.5.0",
|
|
254
255
|
"@ungap/structured-clone": "^1.2.0",
|
|
255
|
-
"@vxrn/color-scheme": "2.9.
|
|
256
|
-
"@vxrn/compiler": "2.9.
|
|
257
|
-
"@vxrn/resolve": "2.9.
|
|
258
|
-
"@vxrn/tslib-lite": "2.9.
|
|
259
|
-
"@vxrn/use-isomorphic-layout-effect": "2.9.
|
|
260
|
-
"@vxrn/utils": "2.9.
|
|
256
|
+
"@vxrn/color-scheme": "2.9.2",
|
|
257
|
+
"@vxrn/compiler": "2.9.2",
|
|
258
|
+
"@vxrn/resolve": "2.9.2",
|
|
259
|
+
"@vxrn/tslib-lite": "2.9.2",
|
|
260
|
+
"@vxrn/use-isomorphic-layout-effect": "2.9.2",
|
|
261
|
+
"@vxrn/utils": "2.9.2",
|
|
261
262
|
"citty": "^0.1.6",
|
|
262
263
|
"core-js": "^3.38.1",
|
|
263
|
-
"create-vxrn": "2.9.
|
|
264
|
+
"create-vxrn": "2.9.2",
|
|
264
265
|
"escape-string-regexp": "^5.0.0",
|
|
265
266
|
"fast-deep-equal": "^3.1.3",
|
|
266
267
|
"fast-glob": "^3.3.3",
|
|
267
268
|
"fs-extra": "^11.2.0",
|
|
268
|
-
"hono": "^4.
|
|
269
|
+
"hono": "^4.13.11",
|
|
269
270
|
"lightningcss": "^1.30.1",
|
|
270
271
|
"magic-string": "^0.30.21",
|
|
271
272
|
"micromatch": "^4.0.8",
|
|
@@ -282,7 +283,7 @@
|
|
|
282
283
|
"tsconfig-paths": "^4",
|
|
283
284
|
"use-latest-callback": "^0.3.5",
|
|
284
285
|
"vite": "^8.2.2",
|
|
285
|
-
"vxrn": "2.9.
|
|
286
|
+
"vxrn": "2.9.2",
|
|
286
287
|
"web-streams-polyfill": "^4.3.0",
|
|
287
288
|
"ws": "^8.21.0",
|
|
288
289
|
"xxhashjs": "^0.2.2"
|
|
@@ -312,7 +313,7 @@
|
|
|
312
313
|
"@babel/types": "^7.28.5",
|
|
313
314
|
"babel-dead-code-elimination": "1.0.10",
|
|
314
315
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
315
|
-
"@vxrn/vite-plugin-metro": "2.9.
|
|
316
|
+
"@vxrn/vite-plugin-metro": "2.9.2"
|
|
316
317
|
},
|
|
317
318
|
"peerDependenciesMeta": {
|
|
318
319
|
"@react-native/babel-preset": {
|
|
@@ -374,19 +375,19 @@
|
|
|
374
375
|
}
|
|
375
376
|
},
|
|
376
377
|
"devDependencies": {
|
|
377
|
-
"@tamagui/sheet": "3.
|
|
378
|
+
"@tamagui/sheet": "3.1.2",
|
|
378
379
|
"@callstack/liquid-glass": "^0.8.1",
|
|
379
380
|
"@react-native/babel-plugin-codegen": "0.88.0",
|
|
380
381
|
"@react-native/codegen": "^0.88.0",
|
|
381
382
|
"@react-navigation/core": "8.0.0-alpha.41",
|
|
382
383
|
"@react-navigation/drawer": "8.0.0-alpha.58",
|
|
383
384
|
"@react-navigation/native": "8.0.0-alpha.51",
|
|
384
|
-
"@tamagui/build": "3.
|
|
385
|
+
"@tamagui/build": "3.1.2",
|
|
385
386
|
"@types/node": "^24.10.0",
|
|
386
387
|
"@types/react-dom": "^19.3.0",
|
|
387
388
|
"@types/react-test-renderer": "^19.1.0",
|
|
388
389
|
"@types/xxhashjs": "^0.2.4",
|
|
389
|
-
"@vxrn/emitter": "2.9.
|
|
390
|
+
"@vxrn/emitter": "2.9.2",
|
|
390
391
|
"depcheck": "^1.4.7",
|
|
391
392
|
"esbuild": "^0.25.12",
|
|
392
393
|
"immer": "^10.1.1",
|
|
@@ -405,7 +406,7 @@
|
|
|
405
406
|
"typescript": "7.0.2",
|
|
406
407
|
"vitest": "^4.1.0",
|
|
407
408
|
"yoga-layout": "^3.2.1",
|
|
408
|
-
"@tamagui/web": "3.
|
|
409
|
+
"@tamagui/web": "3.1.2",
|
|
409
410
|
"@babel/core": "^7.28.5",
|
|
410
411
|
"@babel/generator": "7.29.7",
|
|
411
412
|
"@babel/parser": "^7.28.5",
|
|
@@ -414,7 +415,7 @@
|
|
|
414
415
|
"@babel/types": "^7.28.5",
|
|
415
416
|
"babel-dead-code-elimination": "1.0.10",
|
|
416
417
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
417
|
-
"@vxrn/vite-plugin-metro": "2.9.
|
|
418
|
+
"@vxrn/vite-plugin-metro": "2.9.2"
|
|
418
419
|
},
|
|
419
420
|
"publishConfig": {
|
|
420
421
|
"access": "public"
|
|
@@ -580,7 +581,7 @@
|
|
|
580
581
|
}
|
|
581
582
|
}
|
|
582
583
|
},
|
|
583
|
-
"releaseSourceCommit": "
|
|
584
|
+
"releaseSourceCommit": "ce34ec2d7ee2bcbc559d7c3f110f5324dea3bff6",
|
|
584
585
|
"repository": {
|
|
585
586
|
"type": "git",
|
|
586
587
|
"url": "git+https://github.com/onejs/one.git",
|
package/src/cli/build.ts
CHANGED
|
@@ -739,32 +739,30 @@ export async function build(args: {
|
|
|
739
739
|
return [entry.file, ...collectImports(entry)]
|
|
740
740
|
})
|
|
741
741
|
|
|
742
|
-
//
|
|
743
|
-
const
|
|
742
|
+
// route keys the client loads and registers before rendering this page
|
|
743
|
+
const routePreloadKeys = new Set<string>()
|
|
744
744
|
|
|
745
745
|
// add root layout
|
|
746
746
|
const rootLayoutKey = `${routerRoot}/_layout.tsx`
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
routePreloads[`/${rootLayoutKey}`] = `/${rootLayoutEntry.file}`
|
|
747
|
+
if (vxrnOutput.clientManifest[rootLayoutKey]) {
|
|
748
|
+
routePreloadKeys.add(`/${rootLayoutKey}`)
|
|
750
749
|
}
|
|
751
750
|
|
|
752
751
|
// add all layouts for this route
|
|
753
752
|
if (foundRoute.layouts) {
|
|
754
753
|
for (const layout of foundRoute.layouts) {
|
|
755
754
|
const clientKey = `${routerRoot}${layout.contextKey.slice(1)}`
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
routePreloads[`/${clientKey}`] = `/${entry.file}`
|
|
755
|
+
if (vxrnOutput.clientManifest[clientKey]) {
|
|
756
|
+
routePreloadKeys.add(`/${clientKey}`)
|
|
759
757
|
}
|
|
760
758
|
}
|
|
761
759
|
}
|
|
762
760
|
|
|
763
761
|
// add the page itself using the direct chunk lookup (more reliable than manifest)
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
routePreloads[`/${routerRoot}${foundRoute.file.slice(1)}`] = `/${routeChunkFile}`
|
|
762
|
+
if (clientChunk || clientManifestEntry) {
|
|
763
|
+
routePreloadKeys.add(`/${routerRoot}${foundRoute.file.slice(1)}`)
|
|
767
764
|
}
|
|
765
|
+
const routePreloads = [...routePreloadKeys]
|
|
768
766
|
|
|
769
767
|
const preloadSetupFilePreloads = (() => {
|
|
770
768
|
if (!oneOptions.setupFile) return []
|
package/src/cli/buildPage.ts
CHANGED
|
@@ -58,7 +58,7 @@ export async function buildPage(
|
|
|
58
58
|
preloads: string[],
|
|
59
59
|
allCSS: string[],
|
|
60
60
|
layoutCSS: string[],
|
|
61
|
-
routePreloads:
|
|
61
|
+
routePreloads: string[],
|
|
62
62
|
allCSSContents?: string[],
|
|
63
63
|
criticalPreloads?: string[],
|
|
64
64
|
deferredPreloads?: string[],
|
|
@@ -89,29 +89,18 @@ export async function buildPage(
|
|
|
89
89
|
let loaderData = {}
|
|
90
90
|
|
|
91
91
|
try {
|
|
92
|
-
// generate preload file with route module registration
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
routeImports.push(`import * as ${varName} from "${bundlePath}"`)
|
|
100
|
-
routeRegistrations.push(`registerPreloadedRoute("${routeKey}", ${varName})`)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Use window global for registration since ES module exports get tree-shaken
|
|
104
|
-
const registrationCalls = routeRegistrations.map((call) =>
|
|
105
|
-
call.replace('registerPreloadedRoute(', 'window.__oneRegisterPreloadedRoute(')
|
|
106
|
-
)
|
|
107
|
-
|
|
92
|
+
// generate preload file with route module registration. each route loads
|
|
93
|
+
// through the client's own route import: a route that shares a chunk with
|
|
94
|
+
// another route is not that chunk's namespace (the bundler exports it
|
|
95
|
+
// under a generated name), so importing the chunk file would register a
|
|
96
|
+
// module with no default export and the route would render empty.
|
|
97
|
+
// registration goes through a window global since ES module exports get
|
|
98
|
+
// tree-shaken.
|
|
108
99
|
const preloadContent = [
|
|
109
|
-
//
|
|
110
|
-
...routeImports,
|
|
111
|
-
// static imports for cache warming (original behavior)
|
|
100
|
+
// static imports for cache warming
|
|
112
101
|
...preloads.map((preload) => `import "${preload}"`),
|
|
113
|
-
|
|
114
|
-
|
|
102
|
+
`const routes = globalThis.__importMetaGlobbed`,
|
|
103
|
+
`await Promise.all(${JSON.stringify(routePreloads)}.map((key) => routes[key]().then((mod) => window.__oneRegisterPreloadedRoute(key, mod))))`,
|
|
115
104
|
].join('\n')
|
|
116
105
|
|
|
117
106
|
t0 = performance.now()
|
|
@@ -47,7 +47,7 @@ it('keeps serialized loader data in page artifacts and reuses the parent CSS', a
|
|
|
47
47
|
preloads: [],
|
|
48
48
|
allCSS: ['/assets/probe.css'],
|
|
49
49
|
layoutCSS: [],
|
|
50
|
-
routePreloads:
|
|
50
|
+
routePreloads: [],
|
|
51
51
|
allCSSContents: cssContents,
|
|
52
52
|
})
|
|
53
53
|
expect(result.cssContents).toBe(cssContents)
|
package/src/cli/workerPool.ts
CHANGED
|
@@ -121,7 +121,7 @@ export class BuildWorkerPool {
|
|
|
121
121
|
preloads: string[]
|
|
122
122
|
allCSS: string[]
|
|
123
123
|
layoutCSS: string[]
|
|
124
|
-
routePreloads:
|
|
124
|
+
routePreloads: string[]
|
|
125
125
|
allCSSContents?: string[]
|
|
126
126
|
criticalPreloads?: string[]
|
|
127
127
|
deferredPreloads?: string[]
|
package/src/createApp.tsx
CHANGED
|
@@ -245,8 +245,10 @@ export function createApp(options: CreateAppProps) {
|
|
|
245
245
|
// preload routes using build-time mapping (production SSG)
|
|
246
246
|
// for SPA/dev mode, fall back to importing root layout directly
|
|
247
247
|
const preloadPromises = routePreloads
|
|
248
|
-
?
|
|
249
|
-
|
|
248
|
+
? routePreloads.map(async (routeKey) => {
|
|
249
|
+
// the route import, not its chunk file: a route sharing a chunk with
|
|
250
|
+
// another route is not that chunk's namespace
|
|
251
|
+
const mod = await options.routes[routeKey]()
|
|
250
252
|
registerPreloadedRoute(routeKey, mod)
|
|
251
253
|
return mod
|
|
252
254
|
})
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { ParamListBase, StackNavigationState } from '@react-navigation/native'
|
|
4
|
+
import type {
|
|
5
|
+
NativeStackNavigationEventMap,
|
|
6
|
+
NativeStackNavigationOptions,
|
|
7
|
+
} from '@react-navigation/native-stack'
|
|
4
8
|
import { Children, isValidElement, useMemo, type PropsWithChildren } from 'react'
|
|
5
9
|
|
|
6
10
|
import { NAVIGATOR_CONFIG } from '../../headless/children'
|
|
@@ -14,6 +18,7 @@ import {
|
|
|
14
18
|
appendStackToolbarPropsToOptions,
|
|
15
19
|
type StackToolbarProps,
|
|
16
20
|
} from './StackToolbar'
|
|
21
|
+
import type { ScreenProps } from '../../router/useScreens'
|
|
17
22
|
import { Screen } from '../../views/Screen'
|
|
18
23
|
|
|
19
24
|
export type StackScreenOptions = Omit<NativeStackNavigationOptions, 'presentation'> & {
|
|
@@ -33,10 +38,15 @@ export type StackScreenOptions = Omit<NativeStackNavigationOptions, 'presentatio
|
|
|
33
38
|
keepMounted?: boolean
|
|
34
39
|
}
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
// every route prop the navigator reads off a screen element (listeners,
|
|
42
|
+
// initialParams, getId, redirect) passes through Stack.Screen unchanged.
|
|
43
|
+
export type StackScreenProps = PropsWithChildren<
|
|
44
|
+
ScreenProps<
|
|
45
|
+
StackScreenOptions,
|
|
46
|
+
StackNavigationState<ParamListBase>,
|
|
47
|
+
NativeStackNavigationEventMap
|
|
48
|
+
>
|
|
49
|
+
>
|
|
40
50
|
|
|
41
51
|
/**
|
|
42
52
|
* Stack screen component with support for compositional header configuration.
|
|
@@ -119,6 +119,7 @@ export const Pager = forwardRef<PagerRef, PagerProps>(function Pager(
|
|
|
119
119
|
setPage: (index) => goTo(index, true),
|
|
120
120
|
setPageWithoutAnimation: (index) => goTo(index, false),
|
|
121
121
|
setScrollEnabled: setEnabled,
|
|
122
|
+
getNativeScrollRef: () => container.current,
|
|
122
123
|
}))
|
|
123
124
|
useEffect(() => setEnabled(scrollEnabled), [scrollEnabled])
|
|
124
125
|
useLayoutEffect(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react'
|
|
2
|
-
import type { ViewProps } from 'react-native'
|
|
2
|
+
import type { HostInstance, ViewProps } from 'react-native'
|
|
3
3
|
|
|
4
4
|
export type PagerScrollEvent = Readonly<{
|
|
5
5
|
nativeEvent: Readonly<{ position: number; offset: number }>
|
|
@@ -14,6 +14,11 @@ export interface PagerRef {
|
|
|
14
14
|
setPage(index: number): void
|
|
15
15
|
setPageWithoutAnimation(index: number): void
|
|
16
16
|
setScrollEnabled(enabled: boolean): void
|
|
17
|
+
/**
|
|
18
|
+
* The view that owns the pager's pan, under the name React Native's
|
|
19
|
+
* ScrollView uses, so a gesture library can relate its recognizers to it.
|
|
20
|
+
*/
|
|
21
|
+
getNativeScrollRef(): HostInstance | HTMLElement | null
|
|
17
22
|
}
|
|
18
23
|
export type PagerProps = ViewProps & {
|
|
19
24
|
children?: ReactNode
|
package/src/router/router.ts
CHANGED
|
@@ -63,6 +63,7 @@ import { sortRoutes } from './sortRoutes'
|
|
|
63
63
|
import { getQualifiedRouteComponent } from './useScreens'
|
|
64
64
|
import { preloadRouteModules } from './useViteRoutes'
|
|
65
65
|
import { getNavigateAction } from './utils/getNavigateAction'
|
|
66
|
+
import { getNativeStackReplaceAction } from './utils/getNativeStackReplaceAction'
|
|
66
67
|
import { setClientMatches } from '../useMatches'
|
|
67
68
|
import type { RouteMatch } from '../useMatches'
|
|
68
69
|
import {
|
|
@@ -1317,6 +1318,7 @@ export async function linkTo(
|
|
|
1317
1318
|
|
|
1318
1319
|
// Run async route validation before navigation
|
|
1319
1320
|
const matchingRouteNode = findRouteNodeFromState(state, routeNode)
|
|
1321
|
+
let isColdRoute = false
|
|
1320
1322
|
if (matchingRouteNode?.loadRoute) {
|
|
1321
1323
|
setValidationState({ status: 'validating', lastValidatedHref: href })
|
|
1322
1324
|
|
|
@@ -1355,6 +1357,7 @@ export async function linkTo(
|
|
|
1355
1357
|
} catch (error) {
|
|
1356
1358
|
// Handle Suspense promises thrown by loadRoute in dev mode
|
|
1357
1359
|
if (error && typeof (error as any).then === 'function') {
|
|
1360
|
+
isColdRoute = true
|
|
1358
1361
|
// native dev screens own module suspension. dispatch now so a cold
|
|
1359
1362
|
// route does not hold navigation on the redirect screen while it loads.
|
|
1360
1363
|
const routeLoading = (error as Promise<any>).catch(() => {})
|
|
@@ -1435,7 +1438,11 @@ export async function linkTo(
|
|
|
1435
1438
|
// navigation. the action is built first, so a target it cannot reach
|
|
1436
1439
|
// publishes nothing.
|
|
1437
1440
|
const action =
|
|
1438
|
-
event === 'REPLACE'
|
|
1441
|
+
event === 'REPLACE'
|
|
1442
|
+
? process.env.TAMAGUI_TARGET === 'native' && !isColdRoute
|
|
1443
|
+
? getNativeStackReplaceAction(state, freshRootState)
|
|
1444
|
+
: null
|
|
1445
|
+
: getNavigateAction(state, freshRootState, event)
|
|
1439
1446
|
startTransition(() => {
|
|
1440
1447
|
updateState(optimisticState)
|
|
1441
1448
|
pendingNavigationPathname = targetPathname
|
|
@@ -1457,7 +1464,7 @@ export async function linkTo(
|
|
|
1457
1464
|
const currentFocusedRoute = freshRootState.routes[freshRootState.index]
|
|
1458
1465
|
const currentFocusedName = currentFocusedRoute?.name
|
|
1459
1466
|
|
|
1460
|
-
if (isRootTarget && isGroupTarget && hasFreshRootState) {
|
|
1467
|
+
if (event !== 'REPLACE' && isRootTarget && isGroupTarget && hasFreshRootState) {
|
|
1461
1468
|
const targetRoute = state.routes[state.index ?? state.routes.length - 1]
|
|
1462
1469
|
const targetRootName = targetRoute.name
|
|
1463
1470
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { NavigationState } from '@react-navigation/core'
|
|
2
|
+
import { StackActions } from '@react-navigation/native'
|
|
3
|
+
import type { OneRouter } from '../../interfaces/router'
|
|
4
|
+
import { matchDynamicName, matchGroupName } from '../matchers'
|
|
5
|
+
import { getNavigateAction } from './getNavigateAction'
|
|
6
|
+
|
|
7
|
+
export function getNativeStackReplaceAction(
|
|
8
|
+
actionState: OneRouter.ResultState,
|
|
9
|
+
navigationState: NavigationState
|
|
10
|
+
) {
|
|
11
|
+
while (actionState && navigationState) {
|
|
12
|
+
const currentRoute = navigationState.routes[navigationState.index]
|
|
13
|
+
const targetRoute =
|
|
14
|
+
actionState.routes[actionState.index ?? actionState.routes.length - 1]
|
|
15
|
+
|
|
16
|
+
if (
|
|
17
|
+
currentRoute.name !== targetRoute.name &&
|
|
18
|
+
(matchGroupName(currentRoute.name) || matchGroupName(targetRoute.name))
|
|
19
|
+
) {
|
|
20
|
+
return null
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const dynamicMatch = matchDynamicName(targetRoute.name)
|
|
24
|
+
const changesDynamicScreen =
|
|
25
|
+
currentRoute.name === targetRoute.name &&
|
|
26
|
+
dynamicMatch &&
|
|
27
|
+
currentRoute.params?.[dynamicMatch.name] !== targetRoute.params?.[dynamicMatch.name]
|
|
28
|
+
|
|
29
|
+
// a new dynamic screen instance can own a nested navigator of its own.
|
|
30
|
+
if (!currentRoute.state || !targetRoute.state || changesDynamicScreen) {
|
|
31
|
+
if (
|
|
32
|
+
(currentRoute.name !== targetRoute.name || changesDynamicScreen) &&
|
|
33
|
+
navigationState.type === 'stack' &&
|
|
34
|
+
navigationState.routeNames.includes(targetRoute.name)
|
|
35
|
+
) {
|
|
36
|
+
const { payload } = getNavigateAction(actionState, navigationState, 'REPLACE')
|
|
37
|
+
return {
|
|
38
|
+
...StackActions.replace(payload.name, payload.params),
|
|
39
|
+
target: navigationState.key,
|
|
40
|
+
source: currentRoute.key,
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return null
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (currentRoute.name !== targetRoute.name) {
|
|
47
|
+
return null
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
actionState = targetRoute.state as OneRouter.ResultState
|
|
51
|
+
navigationState = currentRoute.state as NavigationState
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return null
|
|
55
|
+
}
|
package/src/types.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type RenderAppProps = {
|
|
|
36
36
|
loaderServerData?: any
|
|
37
37
|
loaderData?: any
|
|
38
38
|
loaderProps?: LoaderProps
|
|
39
|
-
routePreloads?:
|
|
39
|
+
routePreloads?: string[]
|
|
40
40
|
/**
|
|
41
41
|
* All matched routes with their loader data.
|
|
42
42
|
* Ordered from root layout to leaf page (parent → child).
|
package/src/vite/types.ts
CHANGED
|
@@ -925,8 +925,8 @@ export namespace One {
|
|
|
925
925
|
loaderData?: any
|
|
926
926
|
loaderProps?: any
|
|
927
927
|
mode?: 'spa' | 'ssg' | 'ssr' | 'spa-shell'
|
|
928
|
-
//
|
|
929
|
-
routePreloads?:
|
|
928
|
+
// route keys the client loads and registers before hydrating
|
|
929
|
+
routePreloads?: string[]
|
|
930
930
|
/**
|
|
931
931
|
* All matched routes with their loader data.
|
|
932
932
|
* Ordered from root layout to leaf page (parent → child).
|
package/types/cli/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"AAyLA,wBAAsB,KAAK,CAAC,IAAI,EAAE;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS,CAAA;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"AAyLA,wBAAsB,KAAK,CAAC,IAAI,EAAE;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS,CAAA;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,iBAi0CA"}
|
package/types/cli/buildPage.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { One, RouteInfo } from '../vite/types';
|
|
2
2
|
export declare function printBuildTimings(): void;
|
|
3
|
-
export declare function buildPage(serverEntry: string, routerRoot: string, path: string, relativeId: string, params: any, foundRoute: RouteInfo<string>, clientManifestEntry: any, staticDir: string, clientDir: string, builtMiddlewares: Record<string, string>, serverJsPath: string, preloads: string[], allCSS: string[], layoutCSS: string[], routePreloads:
|
|
3
|
+
export declare function buildPage(serverEntry: string, routerRoot: string, path: string, relativeId: string, params: any, foundRoute: RouteInfo<string>, clientManifestEntry: any, staticDir: string, clientDir: string, builtMiddlewares: Record<string, string>, serverJsPath: string, preloads: string[], allCSS: string[], layoutCSS: string[], routePreloads: string[], allCSSContents?: string[], criticalPreloads?: string[], deferredPreloads?: string[], useAfterLCP?: boolean, useAfterLCPAggressive?: boolean): Promise<One.RouteBuildInfo>;
|
|
4
4
|
//# sourceMappingURL=buildPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildPage.d.ts","sourceRoot":"","sources":["../../src/cli/buildPage.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAmBnD,wBAAgB,iBAAiB,SAUhC;AAED,wBAAsB,SAAS,CAC7B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,GAAG,EACX,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,EAC7B,mBAAmB,EAAE,GAAG,EACxB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACxC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAAE,EAClB,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,MAAM,EAAE,EACnB,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"buildPage.d.ts","sourceRoot":"","sources":["../../src/cli/buildPage.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAmBnD,wBAAgB,iBAAiB,SAUhC;AAED,wBAAsB,SAAS,CAC7B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,GAAG,EACX,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,EAC7B,mBAAmB,EAAE,GAAG,EACxB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACxC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAAE,EAClB,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,MAAM,EAAE,EACnB,aAAa,EAAE,MAAM,EAAE,EACvB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAC3B,WAAW,CAAC,EAAE,OAAO,EACrB,qBAAqB,CAAC,EAAE,OAAO,GAC9B,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAka7B"}
|
|
@@ -30,7 +30,7 @@ export declare class BuildWorkerPool {
|
|
|
30
30
|
preloads: string[];
|
|
31
31
|
allCSS: string[];
|
|
32
32
|
layoutCSS: string[];
|
|
33
|
-
routePreloads:
|
|
33
|
+
routePreloads: string[];
|
|
34
34
|
allCSSContents?: string[];
|
|
35
35
|
criticalPreloads?: string[];
|
|
36
36
|
deferredPreloads?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workerPool.d.ts","sourceRoot":"","sources":["../../src/cli/workerPool.ts"],"names":[],"mappings":"AAoBA,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,SAAS,CAAgD;IACjE,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,MAAM,CAAI;IAClB,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,mBAAmB,CAAa;IACxC,OAAO,CAAC,WAAW,CAAQ;IAE3B,YAAY,IAAI,SAAiC,EAgDhD;IAED,IAAI,IAAI,WAEP;IAGK,UAAU,CAAC,UAAU,CAAC,EAAE,GAAG,iBAQhC;IAED,OAAO,CAAC,QAAQ;IASV,SAAS,CAAC,IAAI,EAAE;QACpB,WAAW,EAAE,MAAM,CAAA;QACnB,UAAU,EAAE,MAAM,CAAA;QAClB,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,GAAG,CAAA;QACX,UAAU,EAAE,GAAG,CAAA;QACf,mBAAmB,EAAE,GAAG,CAAA;QACxB,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;QACjB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACxC,YAAY,EAAE,MAAM,CAAA;QACpB,QAAQ,EAAE,MAAM,EAAE,CAAA;QAClB,MAAM,EAAE,MAAM,EAAE,CAAA;QAChB,SAAS,EAAE,MAAM,EAAE,CAAA;QACnB,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"workerPool.d.ts","sourceRoot":"","sources":["../../src/cli/workerPool.ts"],"names":[],"mappings":"AAoBA,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,SAAS,CAAgD;IACjE,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,MAAM,CAAI;IAClB,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,mBAAmB,CAAa;IACxC,OAAO,CAAC,WAAW,CAAQ;IAE3B,YAAY,IAAI,SAAiC,EAgDhD;IAED,IAAI,IAAI,WAEP;IAGK,UAAU,CAAC,UAAU,CAAC,EAAE,GAAG,iBAQhC;IAED,OAAO,CAAC,QAAQ;IASV,SAAS,CAAC,IAAI,EAAE;QACpB,WAAW,EAAE,MAAM,CAAA;QACnB,UAAU,EAAE,MAAM,CAAA;QAClB,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,GAAG,CAAA;QACX,UAAU,EAAE,GAAG,CAAA;QACf,mBAAmB,EAAE,GAAG,CAAA;QACxB,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;QACjB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACxC,YAAY,EAAE,MAAM,CAAA;QACpB,QAAQ,EAAE,MAAM,EAAE,CAAA;QAClB,MAAM,EAAE,MAAM,EAAE,CAAA;QAChB,SAAS,EAAE,MAAM,EAAE,CAAA;QACnB,aAAa,EAAE,MAAM,EAAE,CAAA;QACvB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;QACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;QAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;QAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;QACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;KAChC,GAAG,OAAO,CAAC,GAAG,CAAC,CAyCf;IAEK,SAAS,kBAKd;CACF;AAKD,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,eAAe,CAK5D;AAED,wBAAsB,mBAAmB,kBAKxC"}
|
package/types/createApp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createApp.d.ts","sourceRoot":"","sources":["../src/createApp.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAWhB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAMzD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;IAC9C,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,GAAG,CAAC,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CACzC,CAAA;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,cAAc;;oBAUrB,cAAc;0BAwGR,cAAc,KAAG,OAAO,CAAC,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"createApp.d.ts","sourceRoot":"","sources":["../src/createApp.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAWhB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAMzD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;IAC9C,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,GAAG,CAAC,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CACzC,CAAA;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,cAAc;;oBAUrB,cAAc;0BAwGR,cAAc,KAAG,OAAO,CAAC,cAAc,CAAC;EAqJzE"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ParamListBase, StackNavigationState } from '@react-navigation/native';
|
|
2
|
+
import type { NativeStackNavigationEventMap, NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
|
2
3
|
import { type PropsWithChildren } from 'react';
|
|
4
|
+
import type { ScreenProps } from '../../router/useScreens';
|
|
3
5
|
export type StackScreenOptions = Omit<NativeStackNavigationOptions, 'presentation'> & {
|
|
4
6
|
presentation?: NativeStackNavigationOptions['presentation'] | 'sheet' | (string & {});
|
|
5
7
|
/**
|
|
@@ -15,10 +17,7 @@ export type StackScreenOptions = Omit<NativeStackNavigationOptions, 'presentatio
|
|
|
15
17
|
*/
|
|
16
18
|
keepMounted?: boolean;
|
|
17
19
|
};
|
|
18
|
-
export
|
|
19
|
-
name?: string;
|
|
20
|
-
options?: StackScreenOptions;
|
|
21
|
-
}
|
|
20
|
+
export type StackScreenProps = PropsWithChildren<ScreenProps<StackScreenOptions, StackNavigationState<ParamListBase>, NativeStackNavigationEventMap>>;
|
|
22
21
|
/**
|
|
23
22
|
* Stack screen component with support for compositional header configuration.
|
|
24
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackScreen.d.ts","sourceRoot":"","sources":["../../../src/layouts/stack-utils/StackScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"StackScreen.d.ts","sourceRoot":"","sources":["../../../src/layouts/stack-utils/StackScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACnF,OAAO,KAAK,EACV,6BAA6B,EAC7B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAqC,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAajF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG1D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,4BAA4B,EAAE,cAAc,CAAC,GAAG;IACpF,YAAY,CAAC,EAAE,4BAA4B,CAAC,cAAc,CAAC,GAAG,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAErF;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAID,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAC9C,WAAW,CACT,kBAAkB,EAClB,oBAAoB,CAAC,aAAa,CAAC,EACnC,6BAA6B,CAC9B,CACF,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,+BAS3E;AAgBD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,kBAAkB,GAAG,kBAAkB,CAAA;AAC1F,wBAAgB,yBAAyB,CACvC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,kBAAkB,EAClD,OAAO,EAAE,CAAC,GAAG,CAAC,CAAA;AAyBhB,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,gBAAgB,GACtB,kBAAkB,CAgCpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pager.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/Pager.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAgD,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAO1F,eAAO,MAAM,KAAK;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Pager.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/Pager.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAgD,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAO1F,eAAO,MAAM,KAAK;;;;;;;;;;;;;;4CAyMhB,CAAA;AACF,YAAY,EACV,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pager.native.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/Pager.native.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAgD,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE1F,eAAO,MAAM,KAAK;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Pager.native.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/Pager.native.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAgD,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE1F,eAAO,MAAM,KAAK;;;;;;;;;;;;;;4CAsDhB,CAAA;AACF,YAAY,EACV,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,cAAc,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ViewProps } from 'react-native';
|
|
2
|
+
import type { HostInstance, ViewProps } from 'react-native';
|
|
3
3
|
export type PagerScrollEvent = Readonly<{
|
|
4
4
|
nativeEvent: Readonly<{
|
|
5
5
|
position: number;
|
|
@@ -20,6 +20,11 @@ export interface PagerRef {
|
|
|
20
20
|
setPage(index: number): void;
|
|
21
21
|
setPageWithoutAnimation(index: number): void;
|
|
22
22
|
setScrollEnabled(enabled: boolean): void;
|
|
23
|
+
/**
|
|
24
|
+
* The view that owns the pager's pan, under the name React Native's
|
|
25
|
+
* ScrollView uses, so a gesture library can relate its recognizers to it.
|
|
26
|
+
*/
|
|
27
|
+
getNativeScrollRef(): HostInstance | HTMLElement | null;
|
|
23
28
|
}
|
|
24
29
|
export type PagerProps = ViewProps & {
|
|
25
30
|
children?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagerTypes.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/pagerTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"pagerTypes.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/pagerTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE3D,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,WAAW,EAAE,QAAQ,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC5D,CAAC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,WAAW,EAAE,QAAQ,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAAA;AAC1F,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,WAAW,EAAE,QAAQ,CAAC;QACpB,eAAe,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAA;KAClD,CAAC,CAAA;CACH,CAAC,CAAA;AACF,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5C,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACxC;;;OAGG;IACH,kBAAkB,IAAI,YAAY,GAAG,WAAW,GAAG,IAAI,CAAA;CACxD;AACD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG;IACnC,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,eAAe,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC5C,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAChD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAA;IACpD,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAA;CAClE,CAAA;AAED,wBAAgB,aAAa,CAAC,EAC5B,WAAe,EACf,UAAc,EACd,kBAAkB,EAClB,WAA0B,EAC1B,eAAuB,EACvB,mBAA4B,EAC5B,cAAuB,GACxB,EAAE,UAAU,QAkBZ;AACD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,QAGzC"}
|