@ng-native/template 0.17.1 → 0.18.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/AGENTS.md CHANGED
@@ -83,3 +83,7 @@ change; both are fast.
83
83
  `getByText` or `getByTestId` (which matches `nativeID` and `testID`), and act with
84
84
  `userEvent.setup().press(...)` or `.type(...)`, all from `@ng-native/testing`. Tests run in Node
85
85
  with no simulator, so write one alongside a change.
86
+
87
+ A service that depends on the platform injects `OS` and `OS_VERSION` from `@ng-native/device`
88
+ rather than importing `Platform` from `react-native`, which a test cannot load. A test provides
89
+ the values it wants: `{ provide: OS, useValue: 'android' }`.
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "name": "@ng-native/template",
3
- "version": "0.17.1",
3
+ "version": "0.18.0",
4
4
  "description": "An Angular app rendering real native views. Use with create-expo-app --template.",
5
5
  "license": "MIT",
6
6
  "main": "src/main.ts",
7
7
  "dependencies": {
8
- "@ng-native/components": "0.17.1",
9
- "@ng-native/device": "0.17.1",
10
- "@ng-native/fabric": "0.17.1",
11
- "@ng-native/metro": "0.17.1",
12
- "@ng-native/platform": "0.17.1",
8
+ "@ng-native/components": "0.18.0",
9
+ "@ng-native/device": "0.18.0",
10
+ "@ng-native/fabric": "0.18.0",
11
+ "@ng-native/metro": "0.18.0",
12
+ "@ng-native/platform": "0.18.0",
13
13
  "@angular/common": "^22.0.0",
14
14
  "@angular/core": "^22.0.0",
15
- "expo": "~57.0.26",
16
- "expo-status-bar": "~57.0.1",
17
- "expo-system-ui": "~57.0.4",
18
- "react": "19.2.3",
19
- "react-native": "0.86.3",
20
- "react-native-safe-area-context": "~5.7.0"
15
+ "expo": "~58.0.16",
16
+ "expo-status-bar": "~58.0.3",
17
+ "expo-system-ui": "~58.0.6",
18
+ "react": "19.3.0",
19
+ "react-native": "0.88.0",
20
+ "react-native-safe-area-context": "~5.10.1"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@angular/compiler-cli": "^22.0.0",
24
24
  "@babel/core": "^7.29.7",
25
- "@ng-native/testing": "0.17.1",
26
- "@types/react": "~19.2.2",
25
+ "@ng-native/testing": "0.18.0",
26
+ "@types/react": "~19.3.0",
27
27
  "typescript": "~6.0.3",
28
28
  "vitest": "^5.0.0"
29
29
  },
package/src/main.ts CHANGED
@@ -10,7 +10,7 @@ import { App } from './app/app.ts';
10
10
 
11
11
  registerPlatformComponents(Platform.OS);
12
12
 
13
- AppRegistry.registerRunnable('main', ({ rootTag }: { rootTag: number | string }) => {
13
+ AppRegistry.registerRunnable('main', ({ rootTag }) => {
14
14
  const app = mount(Number(rootTag), App, getFabricUIManager(), {
15
15
  // Colours, as the integers the platform wants.
16
16
  processColor,
@@ -26,6 +26,8 @@ AppRegistry.registerRunnable('main', ({ rootTag }: { rootTag: number | string })
26
26
 
27
27
  // Re-resolves the conditions when the device rotates or the theme changes. A rotation dirties
28
28
  // no component and no binding, so without this nothing re-renders and `dark:` stops following
29
- // the system switch.
30
- watchConditions(app.engine);
29
+ // the system switch. It stops with the app, which Android destroys when it recreates the
30
+ // activity, so the app mounted in its place is the only one still watching.
31
+ const stopWatching = watchConditions(app.engine);
32
+ app.applicationRef.onDestroy(stopWatching);
31
33
  });
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "expo/tsconfig.base",
2
+ "extends": "expo/tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "strict": true,
5
5
  "allowImportingTsExtensions": true