@symbiote-native/angular 0.1.1 → 0.2.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 CHANGED
@@ -19,6 +19,19 @@ already-validated engine with zero changes to it.
19
19
 
20
20
  ---
21
21
 
22
+ ## Install
23
+
24
+ ```bash
25
+ npm install @symbiote-native/angular react-native @angular/core
26
+ ```
27
+
28
+ `react-native` and `@angular/core` (**>=20**, for stable zoneless change detection) stay your app's
29
+ own top-level dependencies. There's no `create-symbiote` scaffolder yet, so the AOT pipeline
30
+ (`ngc --watch` alongside Metro — see [Run it](#run-it)) and the Metro config come from
31
+ [`examples/angular`](../../examples/angular) rather than a generator.
32
+
33
+ ---
34
+
22
35
  ## Use it
23
36
 
24
37
  The native entry reaches the *same* `registerRunnable` seam as React and Vue — only the adapter
@@ -0,0 +1,7 @@
1
+ import type { Type } from '@angular/core';
2
+ import { type IBootstrapHostOptions } from '@symbiote-native/components/bootstrap';
3
+ export type { IBootstrapHostOptions } from '@symbiote-native/components/bootstrap';
4
+ export type IBootstrapApplicationOptions = IBootstrapHostOptions & {
5
+ appName: string;
6
+ };
7
+ export declare function bootstrapApplication(AppComponent: Type<unknown>, options: IBootstrapApplicationOptions): void;
@@ -0,0 +1,15 @@
1
+ // Zero-config app entry, the Angular twin of adapters/react/src/bootstrap.ts. Lives OUTSIDE the
2
+ // package's main barrel — see that file's header for why anything importing react-native must
3
+ // stay there. No @Component/@Directive decorators here, so unlike the package's main "." entry
4
+ // this needs no ngc/AOT build step and can stay a plain source reference.
5
+ import { AppRegistry as RNAppRegistry } from 'react-native';
6
+ import { bootstrapHost } from '@symbiote-native/components/bootstrap';
7
+ import { AppRegistry, setHostRegistrar } from './modules/app-registry';
8
+ // Mirrors real Angular's bootstrapApplication(RootComponent, config) idiom.
9
+ export function bootstrapApplication(AppComponent, options) {
10
+ const { appName, ...bootstrapOptions } = options;
11
+ bootstrapHost(bootstrapOptions);
12
+ setHostRegistrar(RNAppRegistry);
13
+ AppRegistry.registerComponent(appName, () => AppComponent);
14
+ }
15
+ //# sourceMappingURL=bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/bootstrap.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,8FAA8F;AAC9F,+FAA+F;AAC/F,0EAA0E;AAE1E,OAAO,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,aAAa,EAA8B,MAAM,uCAAuC,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAQvE,4EAA4E;AAC5E,MAAM,UAAU,oBAAoB,CAClC,YAA2B,EAC3B,OAAqC;IAErC,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACjD,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAChC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAChC,WAAW,CAAC,iBAAiB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Type } from '@angular/core';
2
+ import { type IBootstrapHostOptions } from '@symbiote-native/components/bootstrap';
3
+ export type { IBootstrapHostOptions } from '@symbiote-native/components/bootstrap';
4
+ export type IBootstrapApplicationOptions = IBootstrapHostOptions & {
5
+ appName: string;
6
+ };
7
+ export declare function bootstrapApplication(AppComponent: Type<unknown>, options: IBootstrapApplicationOptions): void;
@@ -0,0 +1,14 @@
1
+ // Zero-config app entry, the Angular twin of adapters/react/src/bootstrap.ts. Lives OUTSIDE the
2
+ // package's main barrel — see that file's header for why anything importing react-native must
3
+ // stay there. No @Component/@Directive decorators here, so unlike the package's main "." entry
4
+ // this needs no ngc/AOT build step and can stay a plain source reference.
5
+ import { AppRegistry as RNAppRegistry } from 'react-native';
6
+ import { bootstrapHost } from '@symbiote-native/components/bootstrap';
7
+ import { AppRegistry, setHostRegistrar } from './modules/app-registry';
8
+ // Mirrors real Angular's bootstrapApplication(RootComponent, config) idiom.
9
+ export function bootstrapApplication(AppComponent, options) {
10
+ const { appName, ...bootstrapOptions } = options;
11
+ bootstrapHost(bootstrapOptions);
12
+ setHostRegistrar(RNAppRegistry);
13
+ AppRegistry.registerComponent(appName, () => AppComponent);
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/angular",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "SymbioteNative's Angular adapter — a Renderer2/RendererFactory2 with DOM-less bootstrap driving real native iOS/Android views through the same engine as the other adapters.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,6 +22,11 @@
22
22
  "react-native": "./build/angular/index.js",
23
23
  "default": "./src/index.ts"
24
24
  },
25
+ "./bootstrap": {
26
+ "types": "./build/angular/bootstrap.d.ts",
27
+ "react-native": "./build/angular/bootstrap.js",
28
+ "default": "./src/bootstrap.ts"
29
+ },
25
30
  "./metro-css-parser": "./metro-css-parser.cjs"
26
31
  },
27
32
  "files": [
@@ -33,9 +38,9 @@
33
38
  "access": "public"
34
39
  },
35
40
  "dependencies": {
36
- "@symbiote-native/components": "0.1.1",
41
+ "@symbiote-native/engine": "0.1.1",
37
42
  "@symbiote-native/css-parser": "0.1.1",
38
- "@symbiote-native/engine": "0.1.1"
43
+ "@symbiote-native/components": "0.2.0"
39
44
  },
40
45
  "peerDependencies": {
41
46
  "@angular/core": ">=20",
@@ -47,7 +52,7 @@
47
52
  "@angular/core": "^22",
48
53
  "@types/node": "^26.0.0",
49
54
  "typescript": "~6.0.0",
50
- "@symbiote-native/test-utils": "0.0.0"
55
+ "@symbiote-native/test-utils": "0.1.1"
51
56
  },
52
57
  "scripts": {
53
58
  "ng:build": "ngc -p tsconfig.angular.json",
@@ -0,0 +1,26 @@
1
+ // Zero-config app entry, the Angular twin of adapters/react/src/bootstrap.ts. Lives OUTSIDE the
2
+ // package's main barrel — see that file's header for why anything importing react-native must
3
+ // stay there. No @Component/@Directive decorators here, so unlike the package's main "." entry
4
+ // this needs no ngc/AOT build step and can stay a plain source reference.
5
+
6
+ import { AppRegistry as RNAppRegistry } from 'react-native';
7
+ import type { Type } from '@angular/core';
8
+ import { bootstrapHost, type IBootstrapHostOptions } from '@symbiote-native/components/bootstrap';
9
+ import { AppRegistry, setHostRegistrar } from './modules/app-registry';
10
+
11
+ export type { IBootstrapHostOptions } from '@symbiote-native/components/bootstrap';
12
+
13
+ export type IBootstrapApplicationOptions = IBootstrapHostOptions & {
14
+ appName: string;
15
+ };
16
+
17
+ // Mirrors real Angular's bootstrapApplication(RootComponent, config) idiom.
18
+ export function bootstrapApplication(
19
+ AppComponent: Type<unknown>,
20
+ options: IBootstrapApplicationOptions,
21
+ ): void {
22
+ const { appName, ...bootstrapOptions } = options;
23
+ bootstrapHost(bootstrapOptions);
24
+ setHostRegistrar(RNAppRegistry);
25
+ AppRegistry.registerComponent(appName, () => AppComponent);
26
+ }