@symbiote-native/navigation 1.0.0 → 2.0.1
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 +159 -0
- package/package.json +14 -12
- package/build/angular/drawer/index.d.ts +0 -76
- package/build/angular/drawer/index.js +0 -508
- package/build/angular/drawer-screen.directive.d.ts +0 -14
- package/build/angular/drawer-screen.directive.js +0 -87
- package/build/angular/index.d.ts +0 -23
- package/build/angular/index.js +0 -22
- package/build/angular/injectors/index.d.ts +0 -13
- package/build/angular/injectors/index.js +0 -8
- package/build/angular/injectors/inject-drawer-navigation.d.ts +0 -4
- package/build/angular/injectors/inject-drawer-navigation.js +0 -12
- package/build/angular/injectors/inject-focus-effect.d.ts +0 -2
- package/build/angular/injectors/inject-focus-effect.js +0 -29
- package/build/angular/injectors/inject-is-focused.d.ts +0 -2
- package/build/angular/injectors/inject-is-focused.js +0 -20
- package/build/angular/injectors/inject-navigation-state.d.ts +0 -3
- package/build/angular/injectors/inject-navigation-state.js +0 -35
- package/build/angular/injectors/inject-navigation.d.ts +0 -7
- package/build/angular/injectors/inject-navigation.js +0 -16
- package/build/angular/injectors/inject-route.d.ts +0 -3
- package/build/angular/injectors/inject-route.js +0 -20
- package/build/angular/injectors/inject-stack-navigation.d.ts +0 -4
- package/build/angular/injectors/inject-stack-navigation.js +0 -15
- package/build/angular/injectors/inject-tab-navigation.d.ts +0 -4
- package/build/angular/injectors/inject-tab-navigation.js +0 -11
- package/build/angular/linking.d.ts +0 -3
- package/build/angular/linking.js +0 -43
- package/build/angular/navigation-context.service.d.ts +0 -13
- package/build/angular/navigation-context.service.js +0 -105
- package/build/angular/navigation-scope.directive.d.ts +0 -10
- package/build/angular/navigation-scope.directive.js +0 -90
- package/build/angular/screen.directive.d.ts +0 -22
- package/build/angular/screen.directive.js +0 -90
- package/build/angular/search-bar-ref.directive.d.ts +0 -10
- package/build/angular/search-bar-ref.directive.js +0 -88
- package/build/angular/stack/index.d.ts +0 -55
- package/build/angular/stack/index.js +0 -386
- package/build/angular/tab-screen.directive.d.ts +0 -14
- package/build/angular/tab-screen.directive.js +0 -87
- package/build/angular/tabs/index.d.ts +0 -42
- package/build/angular/tabs/index.js +0 -263
- package/build/core/constants.d.ts +0 -27
- package/build/core/constants.js +0 -61
- package/build/core/drawer-options/index.d.ts +0 -64
- package/build/core/drawer-options/index.js +0 -200
- package/build/core/drawer-router-state/index.d.ts +0 -21
- package/build/core/drawer-router-state/index.js +0 -40
- package/build/core/guards.d.ts +0 -2
- package/build/core/guards.js +0 -22
- package/build/core/header-bar-buttons.d.ts +0 -9
- package/build/core/header-bar-buttons.js +0 -163
- package/build/core/index.d.ts +0 -29
- package/build/core/index.js +0 -32
- package/build/core/linking-config/index.d.ts +0 -13
- package/build/core/linking-config/index.js +0 -171
- package/build/core/navigation-events/index.d.ts +0 -16
- package/build/core/navigation-events/index.js +0 -57
- package/build/core/navigator-handles/index.d.ts +0 -30
- package/build/core/navigator-handles/index.js +0 -15
- package/build/core/navigator-props.d.ts +0 -216
- package/build/core/navigator-props.js +0 -7
- package/build/core/navigator-state/index.d.ts +0 -36
- package/build/core/navigator-state/index.js +0 -81
- package/build/core/render-drawer.d.ts +0 -13
- package/build/core/render-drawer.js +0 -88
- package/build/core/render-stack.d.ts +0 -35
- package/build/core/render-stack.js +0 -294
- package/build/core/render-tabs.d.ts +0 -20
- package/build/core/render-tabs.js +0 -97
- package/build/core/screen-options.d.ts +0 -4
- package/build/core/screen-options.js +0 -133
- package/build/core/search-bar-commands.d.ts +0 -10
- package/build/core/search-bar-commands.js +0 -42
- package/build/core/state-persistence/index.d.ts +0 -3
- package/build/core/state-persistence/index.js +0 -23
- package/build/core/tab-options.d.ts +0 -13
- package/build/core/tab-options.js +0 -10
- package/build/core/tab-router-state/index.d.ts +0 -19
- package/build/core/tab-router-state/index.js +0 -51
- package/build/react/collect-registry.d.ts +0 -4
- package/build/react/collect-registry.js +0 -15
- package/build/react/drawer/index.d.ts +0 -29
- package/build/react/drawer/index.js +0 -277
- package/build/react/drawer-screen.d.ts +0 -14
- package/build/react/drawer-screen.js +0 -8
- package/build/react/hooks/index.d.ts +0 -12
- package/build/react/hooks/index.js +0 -8
- package/build/react/hooks/use-drawer-navigation.d.ts +0 -4
- package/build/react/hooks/use-drawer-navigation.js +0 -12
- package/build/react/hooks/use-focus-effect.d.ts +0 -2
- package/build/react/hooks/use-focus-effect.js +0 -29
- package/build/react/hooks/use-is-focused.d.ts +0 -1
- package/build/react/hooks/use-is-focused.js +0 -22
- package/build/react/hooks/use-navigation-state/index.d.ts +0 -2
- package/build/react/hooks/use-navigation-state/index.js +0 -39
- package/build/react/hooks/use-navigation.d.ts +0 -7
- package/build/react/hooks/use-navigation.js +0 -16
- package/build/react/hooks/use-route.d.ts +0 -2
- package/build/react/hooks/use-route.js +0 -8
- package/build/react/hooks/use-stack-navigation.d.ts +0 -4
- package/build/react/hooks/use-stack-navigation.js +0 -14
- package/build/react/hooks/use-tab-navigation.d.ts +0 -4
- package/build/react/hooks/use-tab-navigation.js +0 -12
- package/build/react/index.d.ts +0 -24
- package/build/react/index.js +0 -21
- package/build/react/linking.d.ts +0 -3
- package/build/react/linking.js +0 -47
- package/build/react/navigation-context.d.ts +0 -10
- package/build/react/navigation-context.js +0 -22
- package/build/react/screen.d.ts +0 -22
- package/build/react/screen.js +0 -7
- package/build/react/stack/index.d.ts +0 -13
- package/build/react/stack/index.js +0 -202
- package/build/react/tab-screen.d.ts +0 -15
- package/build/react/tab-screen.js +0 -8
- package/build/react/tabs/index.d.ts +0 -12
- package/build/react/tabs/index.js +0 -116
- package/build/register.d.ts +0 -7
- package/build/register.js +0 -58
- package/build/vue/composables/index.d.ts +0 -12
- package/build/vue/composables/index.js +0 -8
- package/build/vue/composables/use-drawer-navigation.d.ts +0 -5
- package/build/vue/composables/use-drawer-navigation.js +0 -15
- package/build/vue/composables/use-focus-effect.d.ts +0 -1
- package/build/vue/composables/use-focus-effect.js +0 -31
- package/build/vue/composables/use-is-focused.d.ts +0 -2
- package/build/vue/composables/use-is-focused.js +0 -28
- package/build/vue/composables/use-navigation-state.d.ts +0 -3
- package/build/vue/composables/use-navigation-state.js +0 -29
- package/build/vue/composables/use-navigation.d.ts +0 -8
- package/build/vue/composables/use-navigation.js +0 -13
- package/build/vue/composables/use-route.d.ts +0 -3
- package/build/vue/composables/use-route.js +0 -9
- package/build/vue/composables/use-stack-navigation.d.ts +0 -5
- package/build/vue/composables/use-stack-navigation.js +0 -18
- package/build/vue/composables/use-tab-navigation.d.ts +0 -5
- package/build/vue/composables/use-tab-navigation.js +0 -15
- package/build/vue/drawer/index.d.ts +0 -19
- package/build/vue/drawer/index.js +0 -390
- package/build/vue/drawer-screen.d.ts +0 -14
- package/build/vue/drawer-screen.js +0 -12
- package/build/vue/index.d.ts +0 -21
- package/build/vue/index.js +0 -19
- package/build/vue/linking.d.ts +0 -3
- package/build/vue/linking.js +0 -57
- package/build/vue/navigation-context.d.ts +0 -16
- package/build/vue/navigation-context.js +0 -65
- package/build/vue/screen.d.ts +0 -21
- package/build/vue/screen.js +0 -12
- package/build/vue/stack/index.d.ts +0 -9
- package/build/vue/stack/index.js +0 -279
- package/build/vue/tab-screen.d.ts +0 -14
- package/build/vue/tab-screen.js +0 -11
- package/build/vue/tabs/index.d.ts +0 -10
- package/build/vue/tabs/index.js +0 -209
- package/build-ngc/angular/drawer.d.ts +0 -79
- package/build-ngc/angular/drawer.js +0 -475
- package/build-ngc/angular/drawer.js.map +0 -1
- package/build-ngc/angular/stack.d.ts +0 -58
- package/build-ngc/angular/stack.js +0 -402
- package/build-ngc/angular/stack.js.map +0 -1
- package/build-ngc/angular/tabs.d.ts +0 -45
- package/build-ngc/angular/tabs.js +0 -231
- package/build-ngc/angular/tabs.js.map +0 -1
- package/build-ngc/core/drawer-options.d.ts +0 -64
- package/build-ngc/core/drawer-options.js +0 -201
- package/build-ngc/core/drawer-options.js.map +0 -1
- package/build-ngc/core/drawer-router-state.d.ts +0 -21
- package/build-ngc/core/drawer-router-state.js +0 -41
- package/build-ngc/core/drawer-router-state.js.map +0 -1
- package/build-ngc/core/href.d.ts +0 -16
- package/build-ngc/core/href.js +0 -55
- package/build-ngc/core/href.js.map +0 -1
- package/build-ngc/core/linking-config.d.ts +0 -13
- package/build-ngc/core/linking-config.js +0 -172
- package/build-ngc/core/linking-config.js.map +0 -1
- package/build-ngc/core/navigation-events.d.ts +0 -16
- package/build-ngc/core/navigation-events.js +0 -58
- package/build-ngc/core/navigation-events.js.map +0 -1
- package/build-ngc/core/navigator-handles.d.ts +0 -30
- package/build-ngc/core/navigator-handles.js +0 -16
- package/build-ngc/core/navigator-handles.js.map +0 -1
- package/build-ngc/core/navigator-state.d.ts +0 -36
- package/build-ngc/core/navigator-state.js +0 -82
- package/build-ngc/core/navigator-state.js.map +0 -1
- package/build-ngc/core/search-params.d.ts +0 -9
- package/build-ngc/core/search-params.js +0 -60
- package/build-ngc/core/search-params.js.map +0 -1
- package/build-ngc/core/state-persistence.d.ts +0 -3
- package/build-ngc/core/state-persistence.js +0 -24
- package/build-ngc/core/state-persistence.js.map +0 -1
- package/build-ngc/core/tab-router-state.d.ts +0 -19
- package/build-ngc/core/tab-router-state.js +0 -52
- package/build-ngc/core/tab-router-state.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# @symbiote-native/navigation
|
|
2
|
+
|
|
3
|
+
A native stack/tab/drawer navigator for [SymbioteNative](../../README.md), built directly on
|
|
4
|
+
[`react-native-screens`](https://github.com/software-mansion/react-native-screens)' native view
|
|
5
|
+
primitives (`RNSScreen`/`RNSScreenStack`/`RNSScreenStackHeaderConfig`/`RNSSearchBar`) — reachable
|
|
6
|
+
from **every** adapter: React, Vue, and Angular. Unlike the third-party-view wrappers
|
|
7
|
+
([`@symbiote-native/slider`](../slider), [`@symbiote-native/splash-screen`](../splash-screen)),
|
|
8
|
+
there is no upstream React component to route around here at all — `react-navigation`'s own
|
|
9
|
+
navigator UI is itself React-only (it calls hooks off the React dispatcher), so wrapping it was
|
|
10
|
+
never on the table. This package is a genuine new shared component instead: a
|
|
11
|
+
framework-agnostic route-stack reducer, `react-native-screens` prop folds, and native-leaf
|
|
12
|
+
resolvers, written once in `core/` and driven by a thin per-adapter lifecycle bridge — the same
|
|
13
|
+
logic/view/lifecycle split every other SymbioteNative component follows.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @symbiote-native/navigation
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Only this package — never `react-native-screens` directly. `@symbiote-native/navigation` depends
|
|
22
|
+
on it and ships as the sole autolinked native proxy (`react-native.config.cjs` +
|
|
23
|
+
`symbiote-navigation.podspec`), the same one-dependency packaging as `@symbiote-native/slider` and
|
|
24
|
+
`@symbiote-native/splash-screen`.
|
|
25
|
+
|
|
26
|
+
## Shape
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
src/
|
|
30
|
+
├── core/ framework-agnostic: the Stack route reducer (navigator-state) and Tab
|
|
31
|
+
│ focused-index reducer (tab-router-state), react-native-screens prop folds
|
|
32
|
+
│ (render-stack, screen-options), the drawer swipe/geometry math
|
|
33
|
+
│ (drawer-options, drawer-router-state), linking-config's URL<->route matcher,
|
|
34
|
+
│ state-persistence's serialize/deserialize, and the search-bar command builder
|
|
35
|
+
├── register.ts side-effect import of react-native-screens' vendored codegen specs
|
|
36
|
+
│ (codegen-specs/) — registers RNSScreen/RNSScreenStack/
|
|
37
|
+
│ RNSScreenStackHeaderConfig/RNSSearchBar's ViewConfigs (never
|
|
38
|
+
│ react-native-screens' own React components)
|
|
39
|
+
├── react/ @symbiote-native/navigation/react — Stack/Tab/Drawer + hooks
|
|
40
|
+
├── vue/ @symbiote-native/navigation/vue — Stack/Tab/Drawer + composables
|
|
41
|
+
└── angular/ @symbiote-native/navigation/angular — Stack/Tab/Drawer + directives + inject*
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Each adapter entry imports `../register` first (so every native view's `ViewConfig` is registered
|
|
45
|
+
before a screen ever mounts), then exposes `Stack`, `Tab`, and `Drawer`. The router/reducer logic
|
|
46
|
+
and every `react-native-screens` prop fold are written once in `core/` and shared verbatim; each
|
|
47
|
+
adapter supplies only its own lifecycle (hooks / composables / `inject*` functions) and the
|
|
48
|
+
descriptor bridge.
|
|
49
|
+
|
|
50
|
+
## Use it
|
|
51
|
+
|
|
52
|
+
### Stack
|
|
53
|
+
|
|
54
|
+
The primary navigator — native, `react-native-screens`-backed push/pop/replace/reset over a
|
|
55
|
+
`RNSScreenStack`.
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
// React — examples/react/App.tsx
|
|
59
|
+
import { useState } from 'react';
|
|
60
|
+
import { Stack } from '@symbiote-native/navigation/react';
|
|
61
|
+
import type { INavigatorHandle } from '@symbiote-native/navigation/react';
|
|
62
|
+
|
|
63
|
+
function App() {
|
|
64
|
+
const [stackHandle, setStackHandle] = useState<INavigatorHandle | null>(null);
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<Stack ref={setStackHandle} initialRouteName="Menu">
|
|
68
|
+
<Stack.Screen name="Menu" component={MenuScreen} options={{ title: 'Navigation Demos' }} />
|
|
69
|
+
<Stack.Screen name="Details" component={DetailsScreen} options={{ title: 'Details' }} />
|
|
70
|
+
</Stack>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```vue
|
|
76
|
+
<!-- Vue — examples/vue-sfc/App.vue -->
|
|
77
|
+
<script setup lang="ts">
|
|
78
|
+
import { ref } from 'vue';
|
|
79
|
+
import { Screen, Stack } from '@symbiote-native/navigation/vue';
|
|
80
|
+
import type { INavigatorHandle } from '@symbiote-native/navigation/vue';
|
|
81
|
+
|
|
82
|
+
const stackHandle = ref<INavigatorHandle | null>(null);
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<template>
|
|
86
|
+
<Stack ref="stackHandle" initial-route-name="Menu">
|
|
87
|
+
<Screen name="Menu" :component="MenuScreen" :options="{ title: 'Navigation Demos' }" />
|
|
88
|
+
<Screen name="Details" :component="DetailsScreen" :options="{ title: 'Details' }" />
|
|
89
|
+
</Stack>
|
|
90
|
+
</template>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
// Angular — examples/angular/src/App.ts
|
|
95
|
+
import { Component, ViewChild } from '@angular/core';
|
|
96
|
+
import { Stack, ScreenDirective } from '@symbiote-native/navigation/angular';
|
|
97
|
+
|
|
98
|
+
@Component({
|
|
99
|
+
standalone: true,
|
|
100
|
+
imports: [Stack, ScreenDirective],
|
|
101
|
+
template: `
|
|
102
|
+
<Stack #nav initialRouteName="Menu">
|
|
103
|
+
<ng-template symbioteScreen name="Menu" [component]="menuScreen" [options]="menuOptions"></ng-template>
|
|
104
|
+
<ng-template symbioteScreen name="Details" [component]="detailsScreen" [options]="detailsOptions"></ng-template>
|
|
105
|
+
</Stack>
|
|
106
|
+
`,
|
|
107
|
+
})
|
|
108
|
+
export class AppComponent {
|
|
109
|
+
@ViewChild('nav') private readonly nav!: Stack;
|
|
110
|
+
readonly menuScreen = MenuScreen;
|
|
111
|
+
readonly menuOptions = { title: 'Navigation Demos' };
|
|
112
|
+
readonly detailsScreen = DetailsScreen;
|
|
113
|
+
readonly detailsOptions = { title: 'Details' };
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`Stack` itself implements `INavigatorHandle` in Angular — `@ViewChild` gives you the handle
|
|
118
|
+
directly, no separate ref callback. In React/Vue, the ref only attaches during commit — code that
|
|
119
|
+
needs the handle (e.g. `useLinkingIntegration` below) must gate on it being non-null first.
|
|
120
|
+
|
|
121
|
+
### Tabs, Drawer, hooks, deep linking, and state persistence
|
|
122
|
+
|
|
123
|
+
`@symbiote-native/navigation` also ships a pure-JS bottom-tabs navigator (`Tab`/`Tab.Screen`), a
|
|
124
|
+
swipeable drawer navigator (`Drawer`/`Drawer.Screen`, built on `PanResponder`/`Animated` since this
|
|
125
|
+
codebase doesn't depend on `react-native-gesture-handler`/`react-native-reanimated` — see
|
|
126
|
+
[Known gaps](#known-gaps-drawer-parity) below), the full `useNavigation`/`useRoute`/
|
|
127
|
+
`useIsFocused`/`useFocusEffect`/`useNavigationState` hook family (narrowed per navigator as
|
|
128
|
+
`useStackNavigation`/`useTabNavigation`/`useDrawerNavigation`, with Vue composable and Angular
|
|
129
|
+
`inject*` twins of all of them), header/search-bar screen options (bar buttons, menus,
|
|
130
|
+
`formSheet`/modal presentation, `sheetAllowedDetents`), a `resolveRouteFromUrl`/
|
|
131
|
+
`useLinkingIntegration` deep-linking layer, and `serializeNavigatorState`/
|
|
132
|
+
`deserializeNavigatorState` for state persistence. See the docs-site package page
|
|
133
|
+
(`docs/packages/navigation`) for the full config surface and every adapter's exact syntax — or the
|
|
134
|
+
canary demo screens themselves (`examples/*/screens/{TabsDemoScreen,DrawerDemoScreen,
|
|
135
|
+
HeaderOptionsScreen,SheetDemoScreen,DeepLinkingScreen,StatePersistenceScreen}`), which the docs
|
|
136
|
+
page mirrors verbatim.
|
|
137
|
+
|
|
138
|
+
## Known gaps: drawer parity
|
|
139
|
+
|
|
140
|
+
The real `@react-navigation/drawer` is built on `react-native-gesture-handler` +
|
|
141
|
+
`react-native-reanimated`, neither of which this codebase depends on. `Drawer` reaches the same
|
|
142
|
+
swipe-to-open/close + `front`/`back`/`slide`/`permanent` behavior using only `PanResponder` +
|
|
143
|
+
`Animated` — sufficient for a solid drawer, but not byte-for-byte parity. Not ported:
|
|
144
|
+
`configureGestureHandler` (a raw gesture-handler escape hatch, no `PanResponder` equivalent),
|
|
145
|
+
gesture-handler's declarative simultaneous/failure gesture relationships (more prone to a nested
|
|
146
|
+
horizontal `ScrollView` hijacking the swipe), `useDrawerProgress` as a UI-thread `SharedValue`
|
|
147
|
+
(here `progress` is a JS-thread `Animated.Value`), and `hideStatusBarOnOpen`/`keyboardDismissMode`/
|
|
148
|
+
`statusBarAnimation`/`overlayStyle`. The core option surface (`drawerWidth`, `overlayColor`,
|
|
149
|
+
`swipeEnabled`, `swipeEdgeWidth`, `swipeMinDistance`, `swipeMinVelocity`) otherwise mirrors
|
|
150
|
+
`react-navigation`'s own defaults.
|
|
151
|
+
|
|
152
|
+
## Test it
|
|
153
|
+
|
|
154
|
+
Headless tests live next to each adapter entry and the shared core
|
|
155
|
+
(`src/{core,react,vue,angular}/**/*.test.{ts,tsx}`) and drive the same reducers/prop folds every
|
|
156
|
+
adapter shares, plus per-adapter component tests against a fake `nativeFabricUIManager` slot.
|
|
157
|
+
Native rendering (the real `RNSScreenStack` push/pop transitions, header/search-bar chrome,
|
|
158
|
+
`formSheet` detents) is verified on-device (see the parent [README](../../README.md) for the
|
|
159
|
+
project's testing model).
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/navigation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
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, and Angular adapters.",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "git+https://github.com/OneEyed1366/symbiote-native.git",
|
|
@@ -137,19 +138,19 @@
|
|
|
137
138
|
},
|
|
138
139
|
"dependencies": {
|
|
139
140
|
"react-native-screens": "4.26.0",
|
|
140
|
-
"@symbiote-native/components": "0.
|
|
141
|
+
"@symbiote-native/components": "0.3.0"
|
|
141
142
|
},
|
|
142
143
|
"peerDependencies": {
|
|
143
144
|
"@angular/common": ">=20",
|
|
144
145
|
"@angular/core": ">=20",
|
|
145
|
-
"@symbiote-native/engine": ">=0.1.
|
|
146
|
+
"@symbiote-native/engine": ">=0.1.7",
|
|
146
147
|
"@vue/runtime-core": "^3.5.13",
|
|
147
148
|
"react": ">=19.0.0",
|
|
148
149
|
"react-native": ">=0.86",
|
|
149
150
|
"vue": ">=3.5.0",
|
|
150
|
-
"@symbiote-native/angular": "0.
|
|
151
|
-
"@symbiote-native/react": "0.2.
|
|
152
|
-
"@symbiote-native/vue": "0.3.
|
|
151
|
+
"@symbiote-native/angular": "0.6.1",
|
|
152
|
+
"@symbiote-native/react": "0.2.8",
|
|
153
|
+
"@symbiote-native/vue": "0.3.8"
|
|
153
154
|
},
|
|
154
155
|
"peerDependenciesMeta": {
|
|
155
156
|
"@angular/common": {
|
|
@@ -187,14 +188,15 @@
|
|
|
187
188
|
"@vue/runtime-core": "^3.5.13",
|
|
188
189
|
"react": "19.2.3",
|
|
189
190
|
"typescript": "~6.0.0",
|
|
190
|
-
"@symbiote-native/
|
|
191
|
-
"@symbiote-native/
|
|
192
|
-
"@symbiote-native/
|
|
193
|
-
"@symbiote-native/
|
|
194
|
-
"@symbiote-native/
|
|
191
|
+
"@symbiote-native/angular": "0.6.1",
|
|
192
|
+
"@symbiote-native/react": "0.2.8",
|
|
193
|
+
"@symbiote-native/test-utils": "0.1.6",
|
|
194
|
+
"@symbiote-native/engine": "0.1.7",
|
|
195
|
+
"@symbiote-native/vue": "0.3.8"
|
|
195
196
|
},
|
|
196
197
|
"scripts": {
|
|
197
|
-
"
|
|
198
|
+
"clean": "rm -rf build",
|
|
199
|
+
"ng:build": "pnpm run clean && ngc -p tsconfig.angular.json",
|
|
198
200
|
"typecheck": "tsc --build",
|
|
199
201
|
"format": "prettier --write \"src/**/*.{ts,tsx}\""
|
|
200
202
|
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { TemplateRef, type AfterContentInit, type OnChanges, type OnDestroy, type Type } from '@angular/core';
|
|
2
|
-
import { type IStyleProp, type IViewStyle } from '@symbiote-native/engine';
|
|
3
|
-
import type { IDrawerDescriptorMap, IDrawerNavigatorHandle, IDrawerPosition, IDrawerRouterState, IDrawerSlot, IDrawerType, INavigationEmitter, IRoute } from '../../core';
|
|
4
|
-
export type { IDrawerNavigatorHandle, IDrawerDescriptorMap } from '../../core';
|
|
5
|
-
export type IDrawerContentContext = {
|
|
6
|
-
$implicit: {
|
|
7
|
-
state: IDrawerRouterState;
|
|
8
|
-
descriptors: IDrawerDescriptorMap;
|
|
9
|
-
navigation: IDrawerNavigatorHandle;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare class Drawer implements AfterContentInit, OnChanges, OnDestroy, IDrawerNavigatorHandle {
|
|
13
|
-
private readonly drawerScreenChildren;
|
|
14
|
-
drawerContentTemplate?: TemplateRef<IDrawerContentContext>;
|
|
15
|
-
initialRouteName?: string;
|
|
16
|
-
drawerStyle?: IStyleProp<IViewStyle>;
|
|
17
|
-
drawerType?: IDrawerType;
|
|
18
|
-
drawerPosition?: IDrawerPosition;
|
|
19
|
-
drawerWidth?: number;
|
|
20
|
-
overlayColor?: string;
|
|
21
|
-
swipeEnabled?: boolean;
|
|
22
|
-
swipeEdgeWidth?: number;
|
|
23
|
-
swipeMinDistance?: number;
|
|
24
|
-
swipeMinVelocity?: number;
|
|
25
|
-
private readonly windowDimensions;
|
|
26
|
-
private readonly routeIdPrefix;
|
|
27
|
-
private readonly registry;
|
|
28
|
-
private drawerScreenChildrenSubscription;
|
|
29
|
-
private readonly stateSignal;
|
|
30
|
-
readonly state: import("@angular/core").Signal<Readonly<{
|
|
31
|
-
routes: readonly Readonly<{
|
|
32
|
-
key: string;
|
|
33
|
-
name: string;
|
|
34
|
-
params: unknown;
|
|
35
|
-
}>[];
|
|
36
|
-
index: number;
|
|
37
|
-
isOpen: boolean;
|
|
38
|
-
}> | undefined>;
|
|
39
|
-
private currentEmitterKey;
|
|
40
|
-
private currentEmitter;
|
|
41
|
-
private readonly progress;
|
|
42
|
-
private dragStartProgress;
|
|
43
|
-
readonly openDrawer: () => void;
|
|
44
|
-
readonly closeDrawer: () => void;
|
|
45
|
-
readonly toggleDrawer: () => void;
|
|
46
|
-
readonly jumpTo: (name: string) => void;
|
|
47
|
-
readonly panResponder: import("@symbiote-native/engine").IPanResponderInstance;
|
|
48
|
-
ngAfterContentInit(): void;
|
|
49
|
-
ngOnDestroy(): void;
|
|
50
|
-
private rebuildRegistry;
|
|
51
|
-
private routesFromRegistry;
|
|
52
|
-
private initializeState;
|
|
53
|
-
private dispatch;
|
|
54
|
-
private animateProgressTo;
|
|
55
|
-
private readonly optionsSnapshot;
|
|
56
|
-
private readonly drawerStyleSnapshot;
|
|
57
|
-
ngOnChanges(): void;
|
|
58
|
-
private buildOptionsSnapshot;
|
|
59
|
-
private overlayResponderPassthrough;
|
|
60
|
-
private readonly drawerRoot;
|
|
61
|
-
private readonly slotsMap;
|
|
62
|
-
isAnimated(): boolean;
|
|
63
|
-
slotOrder(): readonly IDrawerSlot[];
|
|
64
|
-
rootStyle(): Record<string, unknown>;
|
|
65
|
-
rootPanHandlers(): Record<string, unknown>;
|
|
66
|
-
slotAnimatedProps(slot: IDrawerSlot): Record<string, unknown>;
|
|
67
|
-
private slotStyle;
|
|
68
|
-
contentStyle(): Record<string, unknown>;
|
|
69
|
-
overlayStyle(): Record<string, unknown>;
|
|
70
|
-
panelStyle(): Record<string, unknown>;
|
|
71
|
-
focusedRoute(): IRoute<unknown> | undefined;
|
|
72
|
-
componentForRoute(route: IRoute<unknown>): Type<unknown> | null;
|
|
73
|
-
private resolveDrawerScreenOptions;
|
|
74
|
-
focusedRouteEmitter(): INavigationEmitter;
|
|
75
|
-
drawerContentContext(currentState: IDrawerRouterState): IDrawerContentContext;
|
|
76
|
-
}
|