@ng-native/template 0.3.0 → 0.5.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 +8 -3
- package/README.md +3 -3
- package/package.json +8 -7
package/AGENTS.md
CHANGED
|
@@ -31,12 +31,17 @@ change; both are fast.
|
|
|
31
31
|
imported from `@ng-native/components` into the component's `imports`, like any Angular
|
|
32
32
|
component: `imports: [View, Text]`. `<View>` compiles to an empty template, and an element used
|
|
33
33
|
without its import renders as a plain view.
|
|
34
|
-
- **There is no DOM.** No `document`, no `window`, no `<
|
|
35
|
-
|
|
34
|
+
- **There is no DOM.** No `document`, no `window`, no `<button>`, `<a>`, `<input>` or `<img>`, no
|
|
35
|
+
`@angular/platform-browser`, and no `@angular/animations`. Use the native elements above. HTML's
|
|
36
|
+
text elements (`p`, `span`, `h1`, `strong`) draw as text and its layout elements (`div`,
|
|
37
|
+
`section`, `ul`) as plain views, with none of a browser's default styles.
|
|
36
38
|
- **A component's host is a flex item.** `<app-case-list />` commits as a view of its own, with no
|
|
37
39
|
`flex`, so a `flex: 1` scroll view inside it gets a height of zero and shows nothing. A component
|
|
38
40
|
that fills the space it is given sets `host: { style: 'flex: 1' }` (or `:host { flex: 1; }`).
|
|
39
|
-
- **Text
|
|
41
|
+
- **Text is drawn in a text element.** `<text>` is the one with inputs and outputs (`numberOfLines`,
|
|
42
|
+
`(press)`). `p`, `span` and the other HTML text elements are text while they hold only text and
|
|
43
|
+
other text elements; one that holds a view is a view. Text written straight into a view is given
|
|
44
|
+
a paragraph of its own, one per run, and never flows inline with the elements beside it.
|
|
40
45
|
- **Events are native:** `(press)` on `<pressable>`, not `(click)`; `[(value)]` or `(changeText)` on
|
|
41
46
|
`<text-input>`; `(scroll)`, `(layout)`. A pressable text is `<text pressable (press)="...">`.
|
|
42
47
|
- **Signals, zoneless, AOT.** State is signals and `computed()`; there is no zone.js, so nothing
|
package/README.md
CHANGED
|
@@ -14,9 +14,9 @@ npm run typecheck
|
|
|
14
14
|
release build or a native module Expo Go does not include needs a development build
|
|
15
15
|
(`npx expo run:ios`).
|
|
16
16
|
|
|
17
|
-
The app targets iOS and Android, so
|
|
18
|
-
|
|
19
|
-
https://ng-native.com/
|
|
17
|
+
The app targets iOS and Android, so `npm run web`, which `create-expo-app` suggests as it finishes,
|
|
18
|
+
only says so and exits. Angular Native components can also render in a browser, set up as
|
|
19
|
+
https://ng-native.com/packages/web#beside-a-native-app describes.
|
|
20
20
|
|
|
21
21
|
`AGENTS.md` tells a coding agent how this framework differs from the web Angular it knows
|
|
22
22
|
(Claude Code reads it through `CLAUDE.md`). Add your own conventions to it as the app grows.
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-native/template",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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.
|
|
9
|
-
"@ng-native/device": "0.
|
|
10
|
-
"@ng-native/fabric": "0.
|
|
11
|
-
"@ng-native/metro": "0.
|
|
12
|
-
"@ng-native/platform": "0.
|
|
8
|
+
"@ng-native/components": "0.5.0",
|
|
9
|
+
"@ng-native/device": "0.5.0",
|
|
10
|
+
"@ng-native/fabric": "0.5.0",
|
|
11
|
+
"@ng-native/metro": "0.5.0",
|
|
12
|
+
"@ng-native/platform": "0.5.0",
|
|
13
13
|
"@angular/common": "^22.0.0",
|
|
14
14
|
"@angular/core": "^22.0.0",
|
|
15
15
|
"expo": "~57.0.26",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@angular/compiler-cli": "^22.0.0",
|
|
24
24
|
"@babel/core": "^7.29.7",
|
|
25
|
-
"@ng-native/testing": "0.
|
|
25
|
+
"@ng-native/testing": "0.5.0",
|
|
26
26
|
"@types/react": "~19.2.2",
|
|
27
27
|
"typescript": "~6.0.3",
|
|
28
28
|
"vitest": "^5.0.0"
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"start": "expo start",
|
|
37
37
|
"android": "expo start --android",
|
|
38
38
|
"ios": "expo start --ios",
|
|
39
|
+
"web": "node -e \"console.error('This app targets iOS and Android: use npm start, npm run ios or npm run android. To render it in a browser, see https://ng-native.com/packages/web#beside-a-native-app'); process.exit(1)\"",
|
|
39
40
|
"typecheck": "node metro.config.js && ngc -p tsconfig.json --noEmit",
|
|
40
41
|
"test": "vitest run"
|
|
41
42
|
}
|