one 1.1.434 → 1.1.435
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/Root.cjs +23 -24
- package/dist/cjs/Root.js +21 -24
- package/dist/cjs/Root.js.map +1 -1
- package/dist/cjs/Root.native.js +3 -4
- package/dist/cjs/Root.native.js.map +2 -2
- package/dist/cjs/createApp.cjs +5 -2
- package/dist/cjs/createApp.js +4 -2
- package/dist/cjs/createApp.js.map +1 -1
- package/dist/cjs/render.js.map +1 -1
- package/dist/cjs/router/router.cjs +19 -13
- package/dist/cjs/router/router.js +14 -9
- package/dist/cjs/router/router.js.map +1 -1
- package/dist/cjs/router/router.native.js +44 -40
- package/dist/cjs/router/router.native.js.map +2 -2
- package/dist/cjs/router/useScreens.cjs +63 -78
- package/dist/cjs/router/useScreens.js +41 -50
- package/dist/cjs/router/useScreens.js.map +1 -1
- package/dist/cjs/router/useScreens.native.js +32 -36
- package/dist/cjs/router/useScreens.native.js.map +2 -2
- package/dist/cjs/vite/one.cjs +10 -4
- package/dist/cjs/vite/one.js +9 -4
- package/dist/cjs/vite/one.js.map +1 -1
- package/dist/cjs/vite/one.native.js +10 -5
- package/dist/cjs/vite/one.native.js.map +2 -2
- package/dist/cjs/vite/types.native.js.map +1 -1
- package/dist/esm/Root.js +22 -24
- package/dist/esm/Root.js.map +1 -1
- package/dist/esm/Root.mjs +24 -25
- package/dist/esm/Root.mjs.map +1 -1
- package/dist/esm/Root.native.js +4 -5
- package/dist/esm/Root.native.js.map +2 -2
- package/dist/esm/createApp.js +5 -2
- package/dist/esm/createApp.js.map +1 -1
- package/dist/esm/createApp.mjs +5 -2
- package/dist/esm/createApp.mjs.map +1 -1
- package/dist/esm/render.js.map +1 -1
- package/dist/esm/render.mjs.map +1 -1
- package/dist/esm/router/router.js +19 -14
- package/dist/esm/router/router.js.map +1 -1
- package/dist/esm/router/router.mjs +18 -12
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +49 -45
- package/dist/esm/router/router.native.js.map +2 -2
- package/dist/esm/router/useScreens.js +41 -51
- package/dist/esm/router/useScreens.js.map +1 -1
- package/dist/esm/router/useScreens.mjs +64 -79
- package/dist/esm/router/useScreens.mjs.map +1 -1
- package/dist/esm/router/useScreens.native.js +32 -37
- package/dist/esm/router/useScreens.native.js.map +2 -2
- package/dist/esm/vite/one.js +9 -4
- package/dist/esm/vite/one.js.map +1 -1
- package/dist/esm/vite/one.mjs +10 -4
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +10 -5
- package/dist/esm/vite/one.native.js.map +2 -2
- package/package.json +9 -9
- package/src/Root.tsx +41 -40
- package/src/createApp.tsx +5 -2
- package/src/render.tsx +1 -0
- package/src/router/router.ts +26 -21
- package/src/router/useScreens.tsx +48 -49
- package/src/vite/one.ts +11 -5
- package/src/vite/types.ts +11 -17
- package/types/Root.d.ts.map +1 -1
- package/types/createApp.d.ts.map +1 -1
- package/types/layouts/Drawer.d.ts +2 -2
- package/types/layouts/Stack.d.ts +2 -2
- package/types/layouts/Tabs.d.ts +2 -2
- package/types/render.d.ts.map +1 -1
- package/types/router/router.d.ts +2 -2
- package/types/router/router.d.ts.map +1 -1
- package/types/router/useScreens.d.ts +1 -1
- package/types/router/useScreens.d.ts.map +1 -1
- package/types/vite/one.d.ts.map +1 -1
- package/types/vite/types.d.ts +10 -17
- package/types/vite/types.d.ts.map +1 -1
package/src/vite/types.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { GetTransform } from '@vxrn/compiler'
|
2
2
|
import type { PluginOptions as TSConfigPluginOptions } from 'vite-tsconfig-paths'
|
3
3
|
import type {
|
4
|
+
AutoDepOptimizationOptions,
|
4
5
|
DepOptimize,
|
5
6
|
DepPatch,
|
6
7
|
AfterBuildProps as VXRNAfterBuildProps,
|
@@ -9,6 +10,7 @@ import type {
|
|
9
10
|
VXRNServePlatform,
|
10
11
|
} from 'vxrn'
|
11
12
|
import type { RouteNode } from '../router/Route'
|
13
|
+
import type { Options as ReactScanOptions } from 'react-scan'
|
12
14
|
|
13
15
|
export type RouteInfo<TRegex = string> = {
|
14
16
|
file: string
|
@@ -39,20 +41,6 @@ export namespace One {
|
|
39
41
|
[key: string]: DepOptimize | DepPatch['patchFiles']
|
40
42
|
}
|
41
43
|
|
42
|
-
export type ReactScanOptions = {
|
43
|
-
enabled?: boolean
|
44
|
-
includeChildren?: boolean
|
45
|
-
playSound?: boolean
|
46
|
-
log?: boolean
|
47
|
-
showToolbar?: boolean
|
48
|
-
renderCountThreshold?: number
|
49
|
-
resetCountTimeout?: number
|
50
|
-
maxRenders?: number
|
51
|
-
report?: boolean
|
52
|
-
alwaysShowLabels?: boolean
|
53
|
-
animationSpeed?: 'slow' | 'fast' | 'off'
|
54
|
-
}
|
55
|
-
|
56
44
|
type PluginPlatformTarget = 'native' | 'web'
|
57
45
|
|
58
46
|
export type PluginOptions = {
|
@@ -62,7 +50,7 @@ export namespace One {
|
|
62
50
|
* - It makes zero hand of seamelessly from server to client without flicker
|
63
51
|
*
|
64
52
|
*/
|
65
|
-
zero?: boolean
|
53
|
+
// zero?: boolean
|
66
54
|
|
67
55
|
/**
|
68
56
|
* Per-file control over how code transforms.
|
@@ -243,9 +231,15 @@ export namespace One {
|
|
243
231
|
|
244
232
|
ssr?: {
|
245
233
|
/**
|
246
|
-
*
|
234
|
+
* One scans dependencies on startup and decides which ones to optimize based on known broken
|
235
|
+
* dependencies. These include react-native and react, which need to be optimized to work.
|
236
|
+
* It finds all parent dependencies of the know bad deps and adds them to ssr.optimizeDeps.include.
|
237
|
+
*
|
238
|
+
* You can disable with false, or configure the include/exclude with options.
|
239
|
+
*
|
240
|
+
* @default { include: /node_modules/ }
|
247
241
|
*/
|
248
|
-
|
242
|
+
autoDepsOptimization?: boolean | AutoDepOptimizationOptions
|
249
243
|
}
|
250
244
|
}
|
251
245
|
|
package/types/Root.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../src/Root.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,wBAAwB,EAC9B,MAAM,0BAA0B,CAAA;AAEjC,OAAO,
|
1
|
+
{"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../src/Root.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,wBAAwB,EAC9B,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAOL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAOd,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKlD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,KAAK,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG;IAC7C,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,mBAAmB,CAAA;IAC3B,YAAY,CAAC,EAAE,GAAG,CAAC,YAAY,CAAA;CAChC,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,GAAG,CAAC,YAAY,CAAA;IACzB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,OAAO,CAAC,EAAE,iBAAiB,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAA;IACpD,wBAAwB,CAAC,EAAE,wBAAwB,GAAG;QACpD,KAAK,CAAC,EAAE;YACN,IAAI,EAAE,OAAO,CAAA;YACb,MAAM,EAAE;gBACN,OAAO,EAAE,MAAM,CAAA;gBACf,UAAU,EAAE,MAAM,CAAA;gBAClB,IAAI,EAAE,MAAM,CAAA;gBACZ,IAAI,EAAE,MAAM,CAAA;gBACZ,MAAM,EAAE,MAAM,CAAA;gBACd,YAAY,EAAE,MAAM,CAAA;aACrB,CAAA;SACF,CAAA;KACF,CAAA;CACF,CAAA;AAOD,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,kDAsFpC"}
|
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;AAOhB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;
|
1
|
+
{"version":3,"file":"createApp.d.ts","sourceRoot":"","sources":["../src/createApp.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAOhB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAS7C,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;CAAE,CAAA;AAE/E,wBAAgB,SAAS,CAAC,OAAO,EAAE,cAAc;;oBAIrB,cAAc;EA2GzC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type DrawerNavigationOptions, type DrawerNavigationEventMap } from '@react-navigation/drawer';
|
2
2
|
import type { DrawerNavigationState, ParamListBase } from '@react-navigation/native';
|
3
|
-
export declare const Drawer: import("react").ForwardRefExoticComponent<Omit<Omit<import("@react-navigation/drawer").DrawerNavigatorProps, "children" | "layout" | "initialRouteName" | "
|
3
|
+
export declare const Drawer: import("react").ForwardRefExoticComponent<Omit<Omit<import("@react-navigation/drawer").DrawerNavigatorProps, "children" | "layout" | "initialRouteName" | "id" | "screenOptions" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
4
4
|
children: React.ReactNode;
|
5
5
|
layout?: ((props: {
|
6
6
|
state: DrawerNavigationState<ParamListBase>;
|
@@ -48,7 +48,7 @@ export declare const Drawer: import("react").ForwardRefExoticComponent<Omit<Omit
|
|
48
48
|
UNSTABLE_getStateForRouteNamesChange?: (state: import("@react-navigation/routers").NavigationState) => import("@react-navigation/routers").PartialState<import("@react-navigation/routers").NavigationState> | undefined;
|
49
49
|
} & {
|
50
50
|
id?: undefined;
|
51
|
-
}, "children"> & Partial<Pick<Omit<import("@react-navigation/drawer").DrawerNavigatorProps, "children" | "layout" | "initialRouteName" | "
|
51
|
+
}, "children"> & Partial<Pick<Omit<import("@react-navigation/drawer").DrawerNavigatorProps, "children" | "layout" | "initialRouteName" | "id" | "screenOptions" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
52
52
|
children: React.ReactNode;
|
53
53
|
layout?: ((props: {
|
54
54
|
state: DrawerNavigationState<ParamListBase>;
|
package/types/layouts/Stack.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ParamListBase, StackNavigationState } from '@react-navigation/native';
|
2
2
|
import { type NativeStackNavigationEventMap, type NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
3
|
-
export declare const Stack: import("react").ForwardRefExoticComponent<Omit<Omit<import("@react-navigation/native-stack").NativeStackNavigatorProps, "children" | "layout" | "initialRouteName" | "
|
3
|
+
export declare const Stack: import("react").ForwardRefExoticComponent<Omit<Omit<import("@react-navigation/native-stack").NativeStackNavigatorProps, "children" | "layout" | "initialRouteName" | "id" | "screenOptions" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
4
4
|
children: React.ReactNode;
|
5
5
|
layout?: ((props: {
|
6
6
|
state: StackNavigationState<ParamListBase>;
|
@@ -44,7 +44,7 @@ export declare const Stack: import("react").ForwardRefExoticComponent<Omit<Omit<
|
|
44
44
|
UNSTABLE_getStateForRouteNamesChange?: (state: import("@react-navigation/routers").NavigationState) => import("@react-navigation/routers").PartialState<import("@react-navigation/routers").NavigationState> | undefined;
|
45
45
|
} & {
|
46
46
|
id?: undefined;
|
47
|
-
}, "children"> & Partial<Pick<Omit<import("@react-navigation/native-stack").NativeStackNavigatorProps, "children" | "layout" | "initialRouteName" | "
|
47
|
+
}, "children"> & Partial<Pick<Omit<import("@react-navigation/native-stack").NativeStackNavigatorProps, "children" | "layout" | "initialRouteName" | "id" | "screenOptions" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
48
48
|
children: React.ReactNode;
|
49
49
|
layout?: ((props: {
|
50
50
|
state: StackNavigationState<ParamListBase>;
|
package/types/layouts/Tabs.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type BottomTabNavigationEventMap, type BottomTabNavigationOptions } from '@react-navigation/bottom-tabs';
|
2
2
|
import type { ParamListBase, TabNavigationState } from '@react-navigation/native';
|
3
|
-
export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<Omit<import("@react-navigation/bottom-tabs").BottomTabNavigatorProps, "children" | "layout" | "initialRouteName" | "
|
3
|
+
export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<Omit<import("@react-navigation/bottom-tabs").BottomTabNavigatorProps, "children" | "layout" | "initialRouteName" | "id" | "screenOptions" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
4
4
|
children: React.ReactNode;
|
5
5
|
layout?: ((props: {
|
6
6
|
state: TabNavigationState<ParamListBase>;
|
@@ -44,7 +44,7 @@ export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<Omit<i
|
|
44
44
|
UNSTABLE_getStateForRouteNamesChange?: (state: import("@react-navigation/routers").NavigationState) => import("@react-navigation/routers").PartialState<import("@react-navigation/routers").NavigationState> | undefined;
|
45
45
|
} & {
|
46
46
|
id?: undefined;
|
47
|
-
}, "children"> & Partial<Pick<Omit<import("@react-navigation/bottom-tabs").BottomTabNavigatorProps, "children" | "layout" | "initialRouteName" | "
|
47
|
+
}, "children"> & Partial<Pick<Omit<import("@react-navigation/bottom-tabs").BottomTabNavigatorProps, "children" | "layout" | "initialRouteName" | "id" | "screenOptions" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
48
48
|
children: React.ReactNode;
|
49
49
|
layout?: ((props: {
|
50
50
|
state: TabNavigationState<ParamListBase>;
|
package/types/render.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.tsx"],"names":[],"mappings":"AAKA,wBAAgB,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.tsx"],"names":[],"mappings":"AAKA,wBAAgB,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,QAiC9C"}
|
package/types/router/router.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import { type NavigationContainerRefWithCurrent } from '@react-navigation/native';
|
2
2
|
import { type ComponentType } from 'react';
|
3
|
-
import type { RouteNode } from './Route';
|
4
|
-
import { type OneLinkingOptions } from './getLinkingConfig';
|
5
3
|
import type { OneRouter } from '../interfaces/router';
|
6
4
|
import type { One } from '../vite/types';
|
5
|
+
import { type OneLinkingOptions } from './getLinkingConfig';
|
7
6
|
import { type UrlObject } from './getNormalizedStatePath';
|
7
|
+
import type { RouteNode } from './Route';
|
8
8
|
export declare let routeNode: RouteNode | null;
|
9
9
|
export declare let rootComponent: ComponentType;
|
10
10
|
export declare let linking: OneLinkingOptions | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/router/router.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iCAAiC,EAEvC,MAAM,0BAA0B,CAAA;AAGjC,OAAO,
|
1
|
+
{"version":3,"file":"router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C,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,aAAa,iBA2G3F"}
|
@@ -27,7 +27,7 @@ export declare function useSortedScreens(order: ScreenProps[], options?: {
|
|
27
27
|
onlyMatching?: boolean;
|
28
28
|
}): React.ReactNode[];
|
29
29
|
/** Wrap the component with various enhancements and add access to child routes. */
|
30
|
-
export declare function getQualifiedRouteComponent(value: RouteNode): React.ComponentType<any> | React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown
|
30
|
+
export declare function getQualifiedRouteComponent(value: RouteNode): React.ComponentType<any> | React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>>;
|
31
31
|
/** @returns a function which provides a screen id that matches the dynamic route name in params. */
|
32
32
|
export declare function createGetIdForRoute(route: Pick<RouteNode, 'dynamic' | 'route' | 'contextKey' | 'children'>): ({ params }?: {
|
33
33
|
params?: Record<string, any>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useScreens.d.ts","sourceRoot":"","sources":["../../src/router/useScreens.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,SAAS,EACT,eAAe,EAChB,MAAM,0BAA0B,CAAA;AACjC,OAAO,
|
1
|
+
{"version":3,"file":"useScreens.d.ts","sourceRoot":"","sources":["../../src/router/useScreens.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,SAAS,EACT,eAAe,EAChB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAqC,MAAM,OAAO,CAAA;AASzD,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,SAAS,CAAA;AAKhB,eAAO,MAAQ,MAAM,OAAE,KAAK,KAAwC,CAAA;AAEpE,MAAM,MAAM,WAAW,CACrB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GA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3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,YAAY,EAAc,MAAM,MAAM,CAAA;AAK5D,OAAO,qBAAqB,CAAA;AAU5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAkBlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,
|
1
|
+
{"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,YAAY,EAAc,MAAM,MAAM,CAAA;AAK5D,OAAO,qBAAqB,CAAA;AAU5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAkBlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,CA6bjE"}
|
package/types/vite/types.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import type { GetTransform } from '@vxrn/compiler';
|
2
2
|
import type { PluginOptions as TSConfigPluginOptions } from 'vite-tsconfig-paths';
|
3
|
-
import type { DepOptimize, DepPatch, AfterBuildProps as VXRNAfterBuildProps, VXRNBuildOptions, VXRNOptions, VXRNServePlatform } from 'vxrn';
|
3
|
+
import type { AutoDepOptimizationOptions, DepOptimize, DepPatch, AfterBuildProps as VXRNAfterBuildProps, VXRNBuildOptions, VXRNOptions, VXRNServePlatform } from 'vxrn';
|
4
4
|
import type { RouteNode } from '../router/Route';
|
5
|
+
import type { Options as ReactScanOptions } from 'react-scan';
|
5
6
|
export type RouteInfo<TRegex = string> = {
|
6
7
|
file: string;
|
7
8
|
page: string;
|
@@ -23,19 +24,6 @@ export declare namespace One {
|
|
23
24
|
export type FixDependencies = {
|
24
25
|
[key: string]: DepOptimize | DepPatch['patchFiles'];
|
25
26
|
};
|
26
|
-
export type ReactScanOptions = {
|
27
|
-
enabled?: boolean;
|
28
|
-
includeChildren?: boolean;
|
29
|
-
playSound?: boolean;
|
30
|
-
log?: boolean;
|
31
|
-
showToolbar?: boolean;
|
32
|
-
renderCountThreshold?: number;
|
33
|
-
resetCountTimeout?: number;
|
34
|
-
maxRenders?: number;
|
35
|
-
report?: boolean;
|
36
|
-
alwaysShowLabels?: boolean;
|
37
|
-
animationSpeed?: 'slow' | 'fast' | 'off';
|
38
|
-
};
|
39
27
|
type PluginPlatformTarget = 'native' | 'web';
|
40
28
|
export type PluginOptions = {
|
41
29
|
/**
|
@@ -44,7 +32,6 @@ export declare namespace One {
|
|
44
32
|
* - It makes zero hand of seamelessly from server to client without flicker
|
45
33
|
*
|
46
34
|
*/
|
47
|
-
zero?: boolean;
|
48
35
|
/**
|
49
36
|
* Per-file control over how code transforms.
|
50
37
|
* Defaults to SWC, runs babel before SWC if:
|
@@ -206,9 +193,15 @@ export declare namespace One {
|
|
206
193
|
deps?: FixDependencies;
|
207
194
|
ssr?: {
|
208
195
|
/**
|
209
|
-
*
|
196
|
+
* One scans dependencies on startup and decides which ones to optimize based on known broken
|
197
|
+
* dependencies. These include react-native and react, which need to be optimized to work.
|
198
|
+
* It finds all parent dependencies of the know bad deps and adds them to ssr.optimizeDeps.include.
|
199
|
+
*
|
200
|
+
* You can disable with false, or configure the include/exclude with options.
|
201
|
+
*
|
202
|
+
* @default { include: /node_modules/ }
|
210
203
|
*/
|
211
|
-
|
204
|
+
autoDepsOptimization?: boolean | AutoDepOptimizationOptions;
|
212
205
|
};
|
213
206
|
};
|
214
207
|
export interface RouteContext {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACjF,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,eAAe,IAAI,m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