@symbiote-native/navigation 2.2.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -2
- package/build/angular/index.js +1 -1
- package/build/react/index.js +1 -1
- package/build/solid/index.js +1 -1
- package/build/svelte/index.js +1 -1
- package/build/vue/index.js +1 -1
- package/package.json +27 -16
package/README.md
CHANGED
|
@@ -142,9 +142,54 @@ export class AppComponent {
|
|
|
142
142
|
}
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
+
```svelte
|
|
146
|
+
<!-- Svelte — examples/svelte/App.svelte -->
|
|
147
|
+
<script lang="ts">
|
|
148
|
+
import { Screen, Stack } from '@symbiote-native/navigation/svelte';
|
|
149
|
+
import type { INavigatorHandle } from '@symbiote-native/navigation/svelte';
|
|
150
|
+
|
|
151
|
+
let stackInstance = $state.raw<INavigatorHandle | null>(null);
|
|
152
|
+
</script>
|
|
153
|
+
|
|
154
|
+
<Stack bind:this={stackInstance} initialRouteName="Menu">
|
|
155
|
+
<Screen name="Menu" component={MenuScreen} options={{ title: 'Navigation Demos' }} />
|
|
156
|
+
<Screen name="Details" component={DetailsScreen} options={{ title: 'Details' }} />
|
|
157
|
+
</Stack>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
```tsx
|
|
161
|
+
// Solid — examples/solid/App.tsx
|
|
162
|
+
import { createSignal } from 'solid-js';
|
|
163
|
+
import { Stack } from '@symbiote-native/navigation/solid';
|
|
164
|
+
import type { INavigatorHandle } from '@symbiote-native/navigation/solid';
|
|
165
|
+
|
|
166
|
+
export default function App() {
|
|
167
|
+
const [stackHandle, setStackHandle] = createSignal<INavigatorHandle | null>(
|
|
168
|
+
null,
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<Stack ref={handle => setStackHandle(handle)} initialRouteName="Menu">
|
|
173
|
+
<Stack.Screen
|
|
174
|
+
name="Menu"
|
|
175
|
+
component={MenuScreen}
|
|
176
|
+
options={{ title: 'Navigation Demos' }}
|
|
177
|
+
/>
|
|
178
|
+
<Stack.Screen
|
|
179
|
+
name="Details"
|
|
180
|
+
component={DetailsScreen}
|
|
181
|
+
options={{ title: 'Details' }}
|
|
182
|
+
/>
|
|
183
|
+
</Stack>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
145
188
|
`Stack` itself implements `INavigatorHandle` in Angular — `@ViewChild` gives you the handle
|
|
146
|
-
directly, no separate ref callback. In React/Vue, the ref only attaches during
|
|
147
|
-
needs the handle (e.g. `useLinkingIntegration` below) must gate on it being
|
|
189
|
+
directly, no separate ref callback. In React/Vue/Svelte/Solid, the ref only attaches during
|
|
190
|
+
commit — code that needs the handle (e.g. `useLinkingIntegration` below) must gate on it being
|
|
191
|
+
non-null first (Svelte's `bind:this` binds during mount, so `$effect`-gate on it; Solid's `ref`
|
|
192
|
+
callback fires during creation, strictly before any effect runs).
|
|
148
193
|
|
|
149
194
|
### Tabs, Drawer, hooks, deep linking, and state persistence
|
|
150
195
|
|
package/build/angular/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// views' ViewConfigs (../register, a side-effect import of the three codegen specs - never
|
|
4
4
|
// react-native-screens' own React components), then exposes Stack/Tab/Drawer with their Screen
|
|
5
5
|
// directives and navigator handles. Mirrors react/index.ts's barrel shape.
|
|
6
|
-
import '../register';
|
|
6
|
+
import '../register.js';
|
|
7
7
|
export { Stack } from './stack/index.js';
|
|
8
8
|
export { ScreenDirective } from './screen.directive.js';
|
|
9
9
|
export { injectNavigation, injectStackNavigation, injectTabNavigation, injectDrawerNavigation, injectRoute, injectIsFocused, injectFocusEffect, injectNavigationState, } from './injectors/index.js';
|
package/build/react/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// native view primitives. Importing this barrel first registers the native views' ViewConfigs
|
|
3
3
|
// (../register, a side-effect import of the three codegen specs - never react-native-screens' own
|
|
4
4
|
// React components), then exposes Stack (with Stack.Screen attached) and the navigator handle.
|
|
5
|
-
import '../register';
|
|
5
|
+
import '../register.js';
|
|
6
6
|
export { Stack } from './stack/index.js';
|
|
7
7
|
export { Screen } from './screen.js';
|
|
8
8
|
export { useNavigation, useRoute, useIsFocused, useFocusEffect, useNavigationState, } from './hooks/index.js';
|
package/build/solid/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// signal, an effect or a subscription (createIsFocused / createFocusEffect / createNavigationState
|
|
11
11
|
// / createLinkingIntegration). Same rule the adapter's `createColorScheme` follows; a blanket `use`
|
|
12
12
|
// would read as a foreign ecosystem's convention (<adapter_src_follows_framework_idioms>).
|
|
13
|
-
import '../register';
|
|
13
|
+
import '../register.js';
|
|
14
14
|
export { Stack } from './stack/index.js';
|
|
15
15
|
export { Screen, TabScreen, DrawerScreen } from './screen.js';
|
|
16
16
|
export { useNavigation, useStackNavigation, useTabNavigation, useDrawerNavigation, useRoute, createIsFocused, createFocusEffect, createNavigationState, } from './primitives/index.js';
|
package/build/svelte/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// views' ViewConfigs (../register, a side-effect import of the codegen specs - never
|
|
4
4
|
// react-native-screens' own React components), then exposes Stack (with Stack.Screen attached)
|
|
5
5
|
// and the navigator handle. Mirrors vue/index.ts's barrel shape.
|
|
6
|
-
import '../register';
|
|
6
|
+
import '../register.js';
|
|
7
7
|
export { Stack } from './stack/index.js';
|
|
8
8
|
export { default as Screen } from './screen.svelte';
|
|
9
9
|
export { useNavigation, useStackNavigation, useTabNavigation, useDrawerNavigation, useRoute, useIsFocused, useFocusEffect, useNavigationState, } from './runes/index.js';
|
package/build/vue/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// native view primitives. Importing this barrel first registers the native views' ViewConfigs
|
|
3
3
|
// (../register, a side-effect import of the three codegen specs - never react-native-screens' own
|
|
4
4
|
// React components), then exposes Stack (with Stack.Screen attached) and the navigator handle.
|
|
5
|
-
import '../register';
|
|
5
|
+
import '../register.js';
|
|
6
6
|
export { Stack } from './stack/index.js';
|
|
7
7
|
export { Screen } from './screen.js';
|
|
8
8
|
export { useNavigation, useStackNavigation, useTabNavigation, useDrawerNavigation, useRoute, useIsFocused, useFocusEffect, useNavigationState, } from './composables/index.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/navigation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Native stack navigator for SymbioteNative, built on react-native-screens' native view primitives (RNSScreen/RNSScreenStack) — one framework-agnostic core, reachable from the React, Vue, Svelte, Solid, and Angular adapters.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react-native",
|
|
7
|
+
"symbiote-native",
|
|
8
|
+
"react",
|
|
9
|
+
"vue",
|
|
10
|
+
"svelte",
|
|
11
|
+
"solid",
|
|
12
|
+
"angular",
|
|
13
|
+
"native-stack",
|
|
14
|
+
"react-native-screens"
|
|
15
|
+
],
|
|
5
16
|
"license": "MIT",
|
|
6
17
|
"repository": {
|
|
7
18
|
"type": "git",
|
|
@@ -149,23 +160,23 @@
|
|
|
149
160
|
},
|
|
150
161
|
"dependencies": {
|
|
151
162
|
"react-native-screens": "4.26.0",
|
|
152
|
-
"@symbiote-native/components": "0.
|
|
163
|
+
"@symbiote-native/components": "1.0.0"
|
|
153
164
|
},
|
|
154
165
|
"peerDependencies": {
|
|
155
166
|
"@angular/common": ">=20",
|
|
156
167
|
"@angular/core": ">=20",
|
|
157
|
-
"@symbiote-native/angular": ">=0.6.2",
|
|
158
|
-
"@symbiote-native/engine": ">=0.1.7",
|
|
159
|
-
"@symbiote-native/react": ">=0.2.8",
|
|
160
|
-
"@symbiote-native/solid": ">=0.0.1",
|
|
161
|
-
"@symbiote-native/svelte": ">=0.1.0",
|
|
162
|
-
"@symbiote-native/vue": ">=0.3.8",
|
|
163
168
|
"@vue/runtime-core": "^3.5.13",
|
|
164
169
|
"react": ">=19.0.0",
|
|
165
170
|
"react-native": ">=0.86",
|
|
166
171
|
"solid-js": ">=1.9.0",
|
|
167
172
|
"svelte": ">=5.56.0",
|
|
168
|
-
"vue": ">=3.5.0"
|
|
173
|
+
"vue": ">=3.5.0",
|
|
174
|
+
"@symbiote-native/angular": "^1.0.0",
|
|
175
|
+
"@symbiote-native/engine": "^0.4.0",
|
|
176
|
+
"@symbiote-native/react": "^1.0.0",
|
|
177
|
+
"@symbiote-native/solid": "^1.0.0",
|
|
178
|
+
"@symbiote-native/svelte": "^1.0.0",
|
|
179
|
+
"@symbiote-native/vue": "^1.0.0"
|
|
169
180
|
},
|
|
170
181
|
"peerDependenciesMeta": {
|
|
171
182
|
"@angular/common": {
|
|
@@ -217,13 +228,13 @@
|
|
|
217
228
|
"solid-js": "^1.9.14",
|
|
218
229
|
"svelte": "^5.56.0",
|
|
219
230
|
"typescript": "~6.0.0",
|
|
220
|
-
"@symbiote-native/angular": "0.
|
|
221
|
-
"@symbiote-native/engine": "0.
|
|
222
|
-
"@symbiote-native/react": "0.
|
|
223
|
-
"@symbiote-native/solid": "
|
|
224
|
-
"@symbiote-native/svelte": "0.
|
|
225
|
-
"@symbiote-native/test-utils": "0.
|
|
226
|
-
"@symbiote-native/vue": "0.
|
|
231
|
+
"@symbiote-native/angular": "1.0.0",
|
|
232
|
+
"@symbiote-native/engine": "0.4.0",
|
|
233
|
+
"@symbiote-native/react": "1.0.0",
|
|
234
|
+
"@symbiote-native/solid": "1.0.0",
|
|
235
|
+
"@symbiote-native/svelte": "1.0.0",
|
|
236
|
+
"@symbiote-native/test-utils": "0.3.0",
|
|
237
|
+
"@symbiote-native/vue": "1.0.0"
|
|
227
238
|
},
|
|
228
239
|
"scripts": {
|
|
229
240
|
"clean": "rm -rf build-ngc",
|