@qontinui/ui-bridge-native 0.6.14 → 0.6.16
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 +17 -0
- package/dist/control/index.js.map +1 -1
- package/dist/control/index.mjs.map +1 -1
- package/dist/core/index.js +42 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +42 -0
- package/dist/core/index.mjs.map +1 -1
- package/dist/core/registry.d.ts +23 -1
- package/dist/core/registry.d.ts.map +1 -1
- package/dist/core/types.d.ts +66 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +117 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +113 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +117 -2
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +113 -3
- package/dist/react/index.mjs.map +1 -1
- package/dist/react/routePattern.d.ts +145 -0
- package/dist/react/routePattern.d.ts.map +1 -0
- package/dist/react/useRouteAwareness.d.ts +106 -0
- package/dist/react/useRouteAwareness.d.ts.map +1 -0
- package/dist/server/http-server.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +1 -1
- package/dist/server/index.mjs.map +1 -1
- package/dist/transport/DeviceAnnouncer.d.ts +1 -0
- package/dist/transport/DeviceAnnouncer.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -152,6 +152,23 @@ const buttons = await find({ types: ['button'] });
|
|
|
152
152
|
await executeAction('submit-button', { action: 'press' });
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
+
### useRouteAwareness
|
|
156
|
+
|
|
157
|
+
Report the current screen as a route **template** (never the concrete path), emitted on every snapshot as `page.route`. Derive the template with `expoRouterPattern(useSegments())` (Expo Router) or `reactNavigationPattern(state)` (React Navigation), and set `patternSource: 'router'`.
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import { useSegments } from 'expo-router';
|
|
161
|
+
import { expoRouterPattern, isExpoRouterUnmatched, useRouteAwareness } from '@qontinui/ui-bridge-native';
|
|
162
|
+
|
|
163
|
+
const segments = useSegments();
|
|
164
|
+
useRouteAwareness(
|
|
165
|
+
{ pattern: expoRouterPattern(segments), patternSource: 'router' },
|
|
166
|
+
{ unmatched: isExpoRouterUnmatched(segments) }
|
|
167
|
+
);
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The rules, and a React Navigation example: [Route Awareness in the React Native / Expo guide](https://qontinui.github.io/ui-bridge/docs/guides/mobile#route-awareness).
|
|
171
|
+
|
|
155
172
|
## Element Types
|
|
156
173
|
|
|
157
174
|
- `button` - Pressable buttons
|