one 1.1.388 → 1.1.389
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/layouts/Tabs.js +32 -28
- package/dist/cjs/layouts/Tabs.js.map +1 -1
- package/dist/cjs/layouts/Tabs.native.js.map +1 -1
- package/dist/cjs/layouts/withLayoutContext.cjs +14 -9
- package/dist/cjs/layouts/withLayoutContext.js +11 -7
- package/dist/cjs/layouts/withLayoutContext.js.map +1 -1
- package/dist/cjs/layouts/withLayoutContext.native.js +10 -7
- package/dist/cjs/layouts/withLayoutContext.native.js.map +2 -2
- package/dist/cjs/useScreens.cjs +6 -6
- package/dist/cjs/useScreens.js +6 -6
- package/dist/cjs/useScreens.js.map +2 -2
- package/dist/cjs/useScreens.native.js +6 -6
- package/dist/cjs/useScreens.native.js.map +2 -2
- package/dist/cjs/utils/withStaticProperties.cjs +56 -0
- package/dist/cjs/utils/withStaticProperties.js +44 -0
- package/dist/cjs/utils/withStaticProperties.js.map +6 -0
- package/dist/cjs/utils/withStaticProperties.native.js +53 -0
- package/dist/cjs/utils/withStaticProperties.native.js.map +6 -0
- package/dist/cjs/vite/one.cjs +1 -27
- package/dist/cjs/vite/one.js +0 -25
- package/dist/cjs/vite/one.js.map +1 -1
- package/dist/cjs/vite/one.native.js +0 -25
- package/dist/cjs/vite/one.native.js.map +1 -1
- package/dist/cjs/vite/plugins/fixDependenciesPlugin.cjs +1 -1
- package/dist/cjs/vite/plugins/fixDependenciesPlugin.js +1 -1
- package/dist/cjs/vite/plugins/fixDependenciesPlugin.js.map +1 -1
- package/dist/cjs/vite/plugins/fixDependenciesPlugin.native.js +1 -1
- package/dist/cjs/vite/plugins/fixDependenciesPlugin.native.js.map +1 -1
- package/dist/esm/layouts/Tabs.js +32 -28
- package/dist/esm/layouts/Tabs.js.map +1 -1
- package/dist/esm/layouts/Tabs.mjs.map +1 -1
- package/dist/esm/layouts/Tabs.native.js.map +1 -1
- package/dist/esm/layouts/withLayoutContext.js +11 -6
- package/dist/esm/layouts/withLayoutContext.js.map +1 -1
- package/dist/esm/layouts/withLayoutContext.mjs +14 -9
- package/dist/esm/layouts/withLayoutContext.mjs.map +1 -1
- package/dist/esm/layouts/withLayoutContext.native.js +10 -6
- package/dist/esm/layouts/withLayoutContext.native.js.map +2 -2
- package/dist/esm/useScreens.js +6 -6
- package/dist/esm/useScreens.js.map +2 -2
- package/dist/esm/useScreens.mjs +6 -6
- package/dist/esm/useScreens.mjs.map +1 -1
- package/dist/esm/useScreens.native.js +6 -6
- package/dist/esm/useScreens.native.js.map +2 -2
- package/dist/esm/utils/withStaticProperties.js +20 -0
- package/dist/esm/utils/withStaticProperties.js.map +6 -0
- package/dist/esm/utils/withStaticProperties.mjs +22 -0
- package/dist/esm/utils/withStaticProperties.mjs.map +1 -0
- package/dist/esm/utils/withStaticProperties.native.js +25 -0
- package/dist/esm/utils/withStaticProperties.native.js.map +6 -0
- package/dist/esm/vite/one.js +0 -25
- package/dist/esm/vite/one.js.map +1 -1
- package/dist/esm/vite/one.mjs +1 -27
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +0 -25
- package/dist/esm/vite/one.native.js.map +1 -1
- package/dist/esm/vite/plugins/fixDependenciesPlugin.js +1 -1
- package/dist/esm/vite/plugins/fixDependenciesPlugin.js.map +1 -1
- package/dist/esm/vite/plugins/fixDependenciesPlugin.mjs +1 -1
- package/dist/esm/vite/plugins/fixDependenciesPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/fixDependenciesPlugin.native.js +1 -1
- package/dist/esm/vite/plugins/fixDependenciesPlugin.native.js.map +1 -1
- package/package.json +7 -7
- package/src/layouts/Tabs.tsx +40 -33
- package/src/layouts/withLayoutContext.tsx +14 -19
- package/src/useScreens.tsx +15 -6
- package/src/utils/withStaticProperties.ts +32 -0
- package/src/vite/one.ts +0 -28
- package/src/vite/plugins/fixDependenciesPlugin.ts +2 -1
- package/types/layouts/Drawer.d.ts +1 -1
- package/types/layouts/Stack.d.ts +1 -1
- package/types/layouts/Tabs.d.ts +1 -5
- package/types/layouts/Tabs.d.ts.map +1 -1
- package/types/layouts/withLayoutContext.d.ts +4 -3
- package/types/layouts/withLayoutContext.d.ts.map +1 -1
- package/types/useScreens.d.ts +3 -1
- package/types/useScreens.d.ts.map +1 -1
- package/types/utils/withStaticProperties.d.ts +4 -0
- package/types/utils/withStaticProperties.d.ts.map +1 -0
- package/types/vite/one.d.ts.map +1 -1
- package/types/vite/plugins/fixDependenciesPlugin.d.ts.map +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/vite/plugins/Users/n8/one/packages/one/src/vite/plugins/fixDependenciesPlugin.ts"],
|
4
|
-
"mappings": "AACA,SAASA,wBAAwBC,4BAA2C;AAI5E,IAAIC,aAAa;AAEV,SAASC,sBAAsBC,SAA6B;AACjE,MAAMC,UAAsB,CAAA;AAC5B,WAAWC,OAAOF,SAAS;AACzB,QAAMG,QAAQH,QAAQE,GAAAA;AACtBD,YAAQG,KAAK;MACXC,QAAQH;MACRI,YACEH,SAAS,OAAOA,SAAU,WACtBA,QACA;QACEI,UAAUJ;MACZ;IACR,CAAA;EACF;AAEA,SAAO;IACLK,MAAM;IAEN,MAAMC,OAAOA,QAAM;AACjB,MAAI,CAACX,cAAcG,QAAQS,WACzBZ,aAAa,IACb,MAAMD,qBAAqBI,SAASQ,MAAAA;IAExC;IAEA,MAAME,eAAeF,QAAM;AACzB,
|
4
|
+
"mappings": "AACA,SAASA,wBAAwBC,4BAA2C;AAI5E,IAAIC,aAAa;AAEV,SAASC,sBAAsBC,SAA6B;AACjE,MAAMC,UAAsB,CAAA;AAC5B,WAAWC,OAAOF,SAAS;AACzB,QAAMG,QAAQH,QAAQE,GAAAA;AACtBD,YAAQG,KAAK;MACXC,QAAQH;MACRI,YACEH,SAAS,OAAOA,SAAU,WACtBA,QACA;QACEI,UAAUJ;MACZ;IACR,CAAA;EACF;AAEA,SAAO;IACLK,MAAM;IAEN,MAAMC,OAAOA,QAAM;AACjB,MAAI,CAACX,cAAcG,QAAQS,WACzBZ,aAAa,IACb,MAAMD,qBAAqBI,SAASQ,MAAAA;IAExC;IAEA,MAAME,eAAeF,QAAM;AACzB,MAAI,CAACX,cAAcG,QAAQS,WACzBZ,aAAa,IACb,MAAMF,uBAAuBK,SAASQ,MAAAA;IAE1C;EACF;AACF;",
|
5
5
|
"names": ["applyDependencyPatches", "applyOptimizePatches", "hasApplied", "fixDependenciesPlugin", "options", "patches", "key", "value", "push", "module", "patchFiles", "optimize", "name", "config", "length", "configResolved"]
|
6
6
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "one",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.389",
|
4
4
|
"license": "BSD-3-Clause",
|
5
5
|
"sideEffects": [
|
6
6
|
"setup.mjs",
|
@@ -113,15 +113,15 @@
|
|
113
113
|
"@react-navigation/routers": "~7",
|
114
114
|
"@swc/core": "^1.10.4",
|
115
115
|
"@ungap/structured-clone": "^1.2.0",
|
116
|
-
"@vxrn/resolve": "1.1.
|
117
|
-
"@vxrn/tslib-lite": "1.1.
|
118
|
-
"@vxrn/universal-color-scheme": "1.1.
|
119
|
-
"@vxrn/use-isomorphic-layout-effect": "1.1.
|
116
|
+
"@vxrn/resolve": "1.1.389",
|
117
|
+
"@vxrn/tslib-lite": "1.1.389",
|
118
|
+
"@vxrn/universal-color-scheme": "1.1.389",
|
119
|
+
"@vxrn/use-isomorphic-layout-effect": "1.1.389",
|
120
120
|
"babel-dead-code-elimination": "^1.0.6",
|
121
121
|
"babel-plugin-react-compiler": "^19.0.0-beta-201e55d-20241215",
|
122
122
|
"citty": "^0.1.6",
|
123
123
|
"core-js": "^3.38.1",
|
124
|
-
"create-vxrn": "1.1.
|
124
|
+
"create-vxrn": "1.1.389",
|
125
125
|
"escape-string-regexp": "^5.0.0",
|
126
126
|
"expo-linking": "~6.3.1",
|
127
127
|
"expo-modules-core": "2.1.2",
|
@@ -147,7 +147,7 @@
|
|
147
147
|
"vite": "^6.0.6",
|
148
148
|
"vite-plugin-barrel": "^0.4.1",
|
149
149
|
"vite-tsconfig-paths": "^5.0.1",
|
150
|
-
"vxrn": "1.1.
|
150
|
+
"vxrn": "1.1.389",
|
151
151
|
"ws": "^8.18.0",
|
152
152
|
"xxhashjs": "^0.2.2"
|
153
153
|
},
|
package/src/layouts/Tabs.tsx
CHANGED
@@ -16,6 +16,9 @@ const TabBar = ({ state, ...restProps }: BottomTabBarProps) => {
|
|
16
16
|
/**
|
17
17
|
* With React Navigation v7, spacial routes such as +not-found and _sitemap are being added to `state.routes`, but we don't want them to be shown in the tab bar.
|
18
18
|
*/
|
19
|
+
|
20
|
+
// TODO due to adding onlyMatching, we can remove this now i think (need to make sure)
|
21
|
+
|
19
22
|
const filteredRoutes = state.routes.filter(
|
20
23
|
(r) => r.name !== '+not-found' && !r.name.startsWith('_sitemap')
|
21
24
|
)
|
@@ -43,40 +46,44 @@ export const Tabs = withLayoutContext<
|
|
43
46
|
typeof BottomTabNavigator,
|
44
47
|
TabNavigationState<ParamListBase>,
|
45
48
|
BottomTabNavigationEventMap
|
46
|
-
>(
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
if (options.
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
...
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
49
|
+
>(
|
50
|
+
BottomTabNavigator,
|
51
|
+
(screens) => {
|
52
|
+
// Support the `href` shortcut prop.
|
53
|
+
return screens.map((screen) => {
|
54
|
+
if (typeof screen.options !== 'function' && screen.options?.href !== undefined) {
|
55
|
+
const { href, ...options } = screen.options
|
56
|
+
if (options.tabBarButton) {
|
57
|
+
throw new Error('Cannot use `href` and `tabBarButton` together.')
|
58
|
+
}
|
59
|
+
return {
|
60
|
+
...screen,
|
61
|
+
options: {
|
62
|
+
...options,
|
63
|
+
tabBarButton: (props) => {
|
64
|
+
if (href == null) {
|
65
|
+
return null
|
66
|
+
}
|
67
|
+
const children =
|
68
|
+
Platform.OS === 'web' ? props.children : <Pressable>{props.children}</Pressable>
|
69
|
+
return (
|
70
|
+
<Link
|
71
|
+
{...props}
|
72
|
+
style={[{ display: 'flex' }, props.style]}
|
73
|
+
href={href}
|
74
|
+
asChild={Platform.OS !== 'web'}
|
75
|
+
// biome-ignore lint/correctness/noChildrenProp: <explanation>
|
76
|
+
children={children}
|
77
|
+
/>
|
78
|
+
)
|
79
|
+
},
|
74
80
|
},
|
75
|
-
}
|
81
|
+
}
|
76
82
|
}
|
77
|
-
|
78
|
-
|
79
|
-
}
|
80
|
-
|
83
|
+
return screen
|
84
|
+
})
|
85
|
+
},
|
86
|
+
{ props: { tabBar: TabBar } }
|
87
|
+
)
|
81
88
|
|
82
89
|
export default Tabs
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import type { EventMapBase, NavigationState } from '@react-navigation/native'
|
2
2
|
import React from 'react'
|
3
|
-
|
4
3
|
import { useContextKey } from '../Route'
|
5
4
|
import type { PickPartial } from '../types'
|
6
5
|
import { useSortedScreens, type ScreenProps } from '../useScreens'
|
7
6
|
import { Screen } from '../views/Screen'
|
7
|
+
import { withStaticProperties } from '../utils/withStaticProperties'
|
8
8
|
|
9
9
|
export function useFilterScreenChildren(
|
10
10
|
children: React.ReactNode,
|
@@ -19,6 +19,7 @@ export function useFilterScreenChildren(
|
|
19
19
|
) {
|
20
20
|
return React.useMemo(() => {
|
21
21
|
const customChildren: any[] = []
|
22
|
+
|
22
23
|
const screens = React.Children.map(children, (child) => {
|
23
24
|
if (React.isValidElement(child) && child && child.type === Screen) {
|
24
25
|
if (!child.props.name) {
|
@@ -43,7 +44,7 @@ export function useFilterScreenChildren(
|
|
43
44
|
`Layout children must be of type Screen, all other children are ignored. To use custom children, create a custom <Layout />. Update Layout Route at: "app${contextKey}/_layout"`
|
44
45
|
)
|
45
46
|
}
|
46
|
-
})
|
47
|
+
})?.filter(Boolean)
|
47
48
|
|
48
49
|
// Add an assertion for development
|
49
50
|
if (process.env.NODE_ENV !== 'production') {
|
@@ -73,23 +74,19 @@ export function withLayoutContext<
|
|
73
74
|
options: ScreenProps<TOptions, State, EventMap>[]
|
74
75
|
) => ScreenProps<TOptions, State, EventMap>[],
|
75
76
|
options?: { props: any }
|
76
|
-
)
|
77
|
-
|
78
|
-
React.
|
79
|
-
|
80
|
-
Screen: (props: ScreenProps<TOptions, State, EventMap>) => null
|
81
|
-
} {
|
82
|
-
const Navigator = React.forwardRef<unknown, React.ComponentProps<T>>(
|
83
|
-
({ children: userDefinedChildren, ...props }, ref) => {
|
77
|
+
) {
|
78
|
+
return withStaticProperties(
|
79
|
+
React.forwardRef<unknown, PickPartial<React.ComponentProps<T>, 'children'>>((propsIn, ref) => {
|
80
|
+
const { children, ...props } = propsIn as React.ComponentProps<T>
|
84
81
|
const contextKey = useContextKey()
|
85
|
-
|
86
|
-
const { screens } = useFilterScreenChildren(userDefinedChildren, {
|
82
|
+
const { screens } = useFilterScreenChildren(children, {
|
87
83
|
contextKey,
|
88
84
|
})
|
89
85
|
|
90
86
|
const processed = processor ? processor(screens ?? []) : screens
|
91
|
-
|
92
|
-
|
87
|
+
const sorted = useSortedScreens(processed ?? [], {
|
88
|
+
onlyMatching: true,
|
89
|
+
})
|
93
90
|
|
94
91
|
// Prevent throwing an error when there are no screens.
|
95
92
|
if (!sorted.length) {
|
@@ -101,11 +98,9 @@ export function withLayoutContext<
|
|
101
98
|
{sorted}
|
102
99
|
</Nav>
|
103
100
|
)
|
101
|
+
}),
|
102
|
+
{
|
103
|
+
Screen,
|
104
104
|
}
|
105
105
|
)
|
106
|
-
|
107
|
-
// @ts-expect-error
|
108
|
-
Navigator.Screen = Screen
|
109
|
-
// @ts-expect-error
|
110
|
-
return Navigator
|
111
106
|
}
|
package/src/useScreens.tsx
CHANGED
@@ -52,13 +52,15 @@ export type ScreenProps<
|
|
52
52
|
function getSortedChildren(
|
53
53
|
children: RouteNode[],
|
54
54
|
order?: ScreenProps[],
|
55
|
-
initialRouteName?: string
|
55
|
+
initialRouteName?: string,
|
56
|
+
options?: { onlyMatching?: boolean }
|
56
57
|
): { route: RouteNode; props: Partial<ScreenProps> }[] {
|
57
58
|
if (!order?.length) {
|
58
59
|
return children
|
59
60
|
.sort(sortRoutesWithInitial(initialRouteName))
|
60
61
|
.map((route) => ({ route, props: {} }))
|
61
62
|
}
|
63
|
+
|
62
64
|
const entries = [...children]
|
63
65
|
|
64
66
|
const ordered = order
|
@@ -98,9 +100,13 @@ function getSortedChildren(
|
|
98
100
|
}[]
|
99
101
|
|
100
102
|
// Add any remaining children
|
101
|
-
|
102
|
-
|
103
|
-
|
103
|
+
if (!options?.onlyMatching) {
|
104
|
+
ordered.push(
|
105
|
+
...entries
|
106
|
+
.sort(sortRoutesWithInitial(initialRouteName))
|
107
|
+
.map((route) => ({ route, props: {} }))
|
108
|
+
)
|
109
|
+
}
|
104
110
|
|
105
111
|
return ordered
|
106
112
|
}
|
@@ -108,12 +114,15 @@ function getSortedChildren(
|
|
108
114
|
/**
|
109
115
|
* @returns React Navigation screens sorted by the `route` property.
|
110
116
|
*/
|
111
|
-
export function useSortedScreens(
|
117
|
+
export function useSortedScreens(
|
118
|
+
order: ScreenProps[],
|
119
|
+
options?: { onlyMatching?: boolean }
|
120
|
+
): React.ReactNode[] {
|
112
121
|
const node = useRouteNode()
|
113
122
|
|
114
123
|
const sortedScreens = React.useMemo(() => {
|
115
124
|
const sorted = node?.children?.length
|
116
|
-
? getSortedChildren(node.children, order, node.initialRouteName)
|
125
|
+
? getSortedChildren(node.children, order, node.initialRouteName, options)
|
117
126
|
: []
|
118
127
|
|
119
128
|
return sorted.map((value) => routeToScreen(value.route, value.props))
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
const Decorated = Symbol()
|
4
|
+
|
5
|
+
type Combined<A, B> = A & B
|
6
|
+
|
7
|
+
export const withStaticProperties = <A extends Function, B>(
|
8
|
+
component: A,
|
9
|
+
staticProps: B
|
10
|
+
): Combined<A, B> => {
|
11
|
+
// clone component if already wrapped once
|
12
|
+
const next = (() => {
|
13
|
+
if (component[Decorated]) {
|
14
|
+
const _ = React.forwardRef((props, ref) =>
|
15
|
+
React.createElement(component as any, { ...props, ref })
|
16
|
+
)
|
17
|
+
// attach existing things again
|
18
|
+
for (const key in component) {
|
19
|
+
const v = component[key]
|
20
|
+
// @ts-ignore
|
21
|
+
_[key] = v && typeof v === 'object' ? { ...v } : v
|
22
|
+
}
|
23
|
+
}
|
24
|
+
return component
|
25
|
+
})()
|
26
|
+
|
27
|
+
// add new things
|
28
|
+
Object.assign(next, staticProps)
|
29
|
+
next[Decorated] = true
|
30
|
+
|
31
|
+
return next as any as A & B
|
32
|
+
}
|
package/src/vite/one.ts
CHANGED
@@ -410,34 +410,6 @@ export function one(options: One.PluginOptions = {}): PluginOption {
|
|
410
410
|
},
|
411
411
|
} satisfies Plugin,
|
412
412
|
|
413
|
-
// {
|
414
|
-
// name: 'one-use-react-18-for-native',
|
415
|
-
// enforce: 'pre',
|
416
|
-
|
417
|
-
// async config() {
|
418
|
-
// const sharedNativeConfig = {
|
419
|
-
// resolve: {
|
420
|
-
// alias: {
|
421
|
-
// react: resolvePath('one/react-18', process.cwd()),
|
422
|
-
// 'react-dom': resolvePath('one/react-dom-18', process.cwd()),
|
423
|
-
// },
|
424
|
-
// },
|
425
|
-
// } satisfies UserConfig
|
426
|
-
|
427
|
-
// return {
|
428
|
-
// environments: {
|
429
|
-
// ios: {
|
430
|
-
// ...sharedNativeConfig,
|
431
|
-
// },
|
432
|
-
// android: {
|
433
|
-
// ...sharedNativeConfig,
|
434
|
-
// },
|
435
|
-
// // this started erroring for no reason..
|
436
|
-
// } as any,
|
437
|
-
// }
|
438
|
-
// },
|
439
|
-
// } satisfies Plugin,
|
440
|
-
|
441
413
|
{
|
442
414
|
name: 'one:optimize-deps-load-web-extensions-web-only',
|
443
415
|
enforce: 'pre',
|
@@ -31,7 +31,8 @@ export function fixDependenciesPlugin(options?: One.FixDependencies): Plugin {
|
|
31
31
|
},
|
32
32
|
|
33
33
|
async configResolved(config) {
|
34
|
-
if (patches.length) {
|
34
|
+
if (!hasApplied && patches.length) {
|
35
|
+
hasApplied = true
|
35
36
|
await applyDependencyPatches(patches, config)
|
36
37
|
}
|
37
38
|
},
|
@@ -97,7 +97,7 @@ export declare const Drawer: import("react").ForwardRefExoticComponent<Omit<Omit
|
|
97
97
|
} & {
|
98
98
|
id?: undefined;
|
99
99
|
}, "children">> & import("react").RefAttributes<unknown>> & {
|
100
|
-
Screen:
|
100
|
+
Screen: typeof import("../views/Screen").Screen;
|
101
101
|
};
|
102
102
|
export default Drawer;
|
103
103
|
//# sourceMappingURL=Drawer.d.ts.map
|
package/types/layouts/Stack.d.ts
CHANGED
@@ -89,7 +89,7 @@ export declare const Stack: import("react").ForwardRefExoticComponent<Omit<Omit<
|
|
89
89
|
} & {
|
90
90
|
id?: undefined;
|
91
91
|
}, "children">> & import("react").RefAttributes<unknown>> & {
|
92
|
-
Screen:
|
92
|
+
Screen: typeof import("../views/Screen").Screen;
|
93
93
|
};
|
94
94
|
export default Stack;
|
95
95
|
//# sourceMappingURL=Stack.d.ts.map
|
package/types/layouts/Tabs.d.ts
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
import { type BottomTabNavigationEventMap, type BottomTabNavigationOptions } from '@react-navigation/bottom-tabs';
|
2
2
|
import type { ParamListBase, TabNavigationState } from '@react-navigation/native';
|
3
|
-
import type { OneRouter } from '../interfaces/router';
|
4
|
-
type BottomTabNavigationOptionsWithHref = BottomTabNavigationOptions & {
|
5
|
-
href?: OneRouter.Href | null;
|
6
|
-
};
|
7
3
|
export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<Omit<import("@react-navigation/bottom-tabs").BottomTabNavigatorProps, "initialRouteName" | "children" | "screenOptions" | "id" | "layout" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
8
4
|
children: React.ReactNode;
|
9
5
|
layout?: ((props: {
|
@@ -93,7 +89,7 @@ export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<Omit<i
|
|
93
89
|
} & {
|
94
90
|
id?: undefined;
|
95
91
|
}, "children">> & import("react").RefAttributes<unknown>> & {
|
96
|
-
Screen:
|
92
|
+
Screen: typeof import("../views/Screen").Screen;
|
97
93
|
};
|
98
94
|
export default Tabs;
|
99
95
|
//# sourceMappingURL=Tabs.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/layouts/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAGhC,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/layouts/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAGhC,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAoCjF,eAAO,MAAM,IAAI;cAP4B,MAC1C,SAAS;;;;;kBAeO,MAAO,SAAS;UAC1B,MAAQ,YAAW;;;;;;;;;;;;;;;;;;;;;;;;;;eAcZ,gBAAI,KAAK;;;;;eAKP,gBACA,KAAR;kBAAmB,MAAO,YAAY;UAE9B,MAAA,YADU;;;;;cAtCiB,MAC1C,SAAS;;;;;kBAeO,MAAO,SAAS;UAC1B,MAAQ,YAAW;;;;;;;;;;;;;;;;;;;;;;;;;;eAcZ,gBAAI,KAAK;;;;;eAKP,gBACA,KAAR;kBAAmB,MAAO,YAAY;UAE9B,MAAA,YADU;;;;;;CAY3B,CAAA;AAED,eAAe,IAAI,CAAA"}
|
@@ -2,18 +2,19 @@ import type { EventMapBase, NavigationState } from '@react-navigation/native';
|
|
2
2
|
import React from 'react';
|
3
3
|
import type { PickPartial } from '../types';
|
4
4
|
import { type ScreenProps } from '../useScreens';
|
5
|
+
import { Screen } from '../views/Screen';
|
5
6
|
export declare function useFilterScreenChildren(children: React.ReactNode, { isCustomNavigator, contextKey, }?: {
|
6
7
|
isCustomNavigator?: boolean;
|
7
8
|
/** Used for sending developer hints */
|
8
9
|
contextKey?: string;
|
9
10
|
}): {
|
10
|
-
screens: any[] |
|
11
|
+
screens: any[] | undefined;
|
11
12
|
children: any[];
|
12
13
|
};
|
13
14
|
/** Return a navigator that automatically injects matched routes and renders nothing when there are no children. Return type with children prop optional */
|
14
15
|
export declare function withLayoutContext<TOptions extends object, T extends React.ComponentType<any>, State extends NavigationState, EventMap extends EventMapBase>(Nav: T, processor?: (options: ScreenProps<TOptions, State, EventMap>[]) => ScreenProps<TOptions, State, EventMap>[], options?: {
|
15
16
|
props: any;
|
16
|
-
}): React.ForwardRefExoticComponent<React.PropsWithoutRef<PickPartial<React.ComponentProps<T>,
|
17
|
-
Screen:
|
17
|
+
}): React.ForwardRefExoticComponent<React.PropsWithoutRef<PickPartial<React.ComponentProps<T>, "children">> & React.RefAttributes<unknown>> & {
|
18
|
+
Screen: typeof Screen;
|
18
19
|
};
|
19
20
|
//# sourceMappingURL=withLayoutContext.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"withLayoutContext.d.ts","sourceRoot":"","sources":["../../src/layouts/withLayoutContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"withLayoutContext.d.ts","sourceRoot":"","sources":["../../src/layouts/withLayoutContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAGxC,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,EACE,iBAAiB,EACjB,UAAU,GACX,GAAE;IACD,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAA;CACf;;;EA6CP;AAED,2JAA2J;AAC3J,wBAAgB,iBAAiB,CAC/B,QAAQ,SAAS,MAAM,EACvB,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EAClC,KAAK,SAAS,eAAe,EAC7B,QAAQ,SAAS,YAAY,EAE7B,GAAG,EAAE,CAAC,EACN,SAAS,CAAC,EAAE,CACV,OAAO,EAAE,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,KAC9C,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,EAC7C,OAAO,CAAC,EAAE;IAAE,KAAK,EAAE,GAAG,CAAA;CAAE;;EA8BzB"}
|
package/types/useScreens.d.ts
CHANGED
@@ -23,7 +23,9 @@ export type ScreenProps<TOptions extends Record<string, any> = Record<string, an
|
|
23
23
|
/**
|
24
24
|
* @returns React Navigation screens sorted by the `route` property.
|
25
25
|
*/
|
26
|
-
export declare function useSortedScreens(order: ScreenProps[]
|
26
|
+
export declare function useSortedScreens(order: ScreenProps[], options?: {
|
27
|
+
onlyMatching?: boolean;
|
28
|
+
}): React.ReactNode[];
|
27
29
|
/** Wrap the component with various enhancements and add access to child routes. */
|
28
30
|
export declare function getQualifiedRouteComponent(value: RouteNode): React.ComponentType<any> | React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
29
31
|
/** @returns a function which provides a screen id that matches the dynamic route name in params. */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useScreens.d.ts","sourceRoot":"","sources":["../src/useScreens.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,SAAS,EACT,eAAe,EAChB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,SAAS,CAAA;AAShB,eAAO,MAAQ,MAAM,OAAE,KAAK,KAAwC,CAAA;AAEpE,MAAM,MAAM,WAAW,CACrB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1D,KAAK,SAAS,eAAe,GAAG,eAAe,EAC/C,QAAQ,SAAS,YAAY,GAAG,YAAY,IAC1C;IACF,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,QAAQ,CAAA;IAElB,SAAS,CAAC,EACN,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,GAChC,CAAC,CAAC,IAAI,EAAE;QACN,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;QACvC,UAAU,EAAE,GAAG,CAAA;KAChB,KAAK,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAA;IAE3C,KAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,KAAK,MAAM,GAAG,SAAS,CAAA;CAC7E,CAAA;
|
1
|
+
{"version":3,"file":"useScreens.d.ts","sourceRoot":"","sources":["../src/useScreens.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,SAAS,EACT,eAAe,EAChB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,SAAS,CAAA;AAShB,eAAO,MAAQ,MAAM,OAAE,KAAK,KAAwC,CAAA;AAEpE,MAAM,MAAM,WAAW,CACrB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1D,KAAK,SAAS,eAAe,GAAG,eAAe,EAC/C,QAAQ,SAAS,YAAY,GAAG,YAAY,IAC1C;IACF,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,QAAQ,CAAA;IAElB,SAAS,CAAC,EACN,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,GAChC,CAAC,CAAC,IAAI,EAAE;QACN,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;QACvC,UAAU,EAAE,GAAG,CAAA;KAChB,KAAK,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAA;IAE3C,KAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,KAAK,MAAM,GAAG,SAAS,CAAA;CAC7E,CAAA;AAgED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,KAAK,CAAC,SAAS,EAAE,CAYnB;AA4BD,mFAAmF;AACnF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,SAAS,+GAgI1D;AAED,oGAAoG;AACpG,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,UAAU,CAAC;aAU5B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;aAoB/D"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"withStaticProperties.d.ts","sourceRoot":"","sources":["../../src/utils/withStaticProperties.ts"],"names":[],"mappings":"AAIA,KAAK,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAE3B,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,QAAQ,EAAE,CAAC,aAC7C,CAAC,eACC,CAAC,KACb,QAAQ,CAAC,CAAC,EAAE,CAAC,CAsBf,CAAA"}
|
package/types/vite/one.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAU,YAAY,EAAc,MAAM,MAAM,CAAA;AAW5D,OAAO,qBAAqB,CAAA;AAY5B,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":"AAGA,OAAO,KAAK,EAAU,YAAY,EAAc,MAAM,MAAM,CAAA;AAW5D,OAAO,qBAAqB,CAAA;AAY5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAkBlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,CAkZjE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fixDependenciesPlugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/fixDependenciesPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAKnC,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,eAAe,GAAG,MAAM,
|
1
|
+
{"version":3,"file":"fixDependenciesPlugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/fixDependenciesPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAKnC,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,eAAe,GAAG,MAAM,CAgC3E"}
|