@symbiote-native/angular 0.6.2 → 0.8.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 +3 -3
- package/bin/symbiote-angular-dev.cjs +20 -19
- package/build/angular/anchor-host-registry.js +2 -2
- package/build/angular/anchor-host-registry.js.map +1 -1
- package/build/angular/bootstrap.js +1 -1
- package/build/angular/bootstrap.js.map +1 -1
- package/build/angular/components/activity-indicator/index.android.d.ts +2 -1
- package/build/angular/components/activity-indicator/index.android.js +12 -4
- package/build/angular/components/activity-indicator/index.android.js.map +1 -1
- package/build/angular/components/activity-indicator/index.ios.d.ts +2 -1
- package/build/angular/components/activity-indicator/index.ios.js +8 -3
- package/build/angular/components/activity-indicator/index.ios.js.map +1 -1
- package/build/angular/components/activity-indicator/shared.d.ts +1 -1
- package/build/angular/components/activity-indicator/shared.js +4 -4
- package/build/angular/components/activity-indicator/shared.js.map +1 -1
- package/build/angular/components/button.d.ts +4 -2
- package/build/angular/components/button.js +41 -22
- package/build/angular/components/button.js.map +1 -1
- package/build/angular/components/flat-list/index.d.ts +6 -4
- package/build/angular/components/flat-list/index.js +80 -50
- package/build/angular/components/flat-list/index.js.map +1 -1
- package/build/angular/components/image/index.android.d.ts +8 -3
- package/build/angular/components/image/index.android.js +42 -10
- package/build/angular/components/image/index.android.js.map +1 -1
- package/build/angular/components/image/index.ios.d.ts +8 -3
- package/build/angular/components/image/index.ios.js +42 -10
- package/build/angular/components/image/index.ios.js.map +1 -1
- package/build/angular/components/image/shared.d.ts +4 -1
- package/build/angular/components/image/shared.js +51 -8
- package/build/angular/components/image/shared.js.map +1 -1
- package/build/angular/components/image-background.d.ts +2 -1
- package/build/angular/components/image-background.js +26 -10
- package/build/angular/components/image-background.js.map +1 -1
- package/build/angular/components/input-accessory-view/index.d.ts +9 -4
- package/build/angular/components/input-accessory-view/index.js +49 -10
- package/build/angular/components/input-accessory-view/index.js.map +1 -1
- package/build/angular/components/keyboard-avoiding-view/index.d.ts +3 -1
- package/build/angular/components/keyboard-avoiding-view/index.js +44 -12
- package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -1
- package/build/angular/components/modal/index.d.ts +11 -8
- package/build/angular/components/modal/index.js +51 -29
- package/build/angular/components/modal/index.js.map +1 -1
- package/build/angular/components/pressable/index.d.ts +12 -6
- package/build/angular/components/pressable/index.js +66 -13
- package/build/angular/components/pressable/index.js.map +1 -1
- package/build/angular/components/refresh-control/index.d.ts +8 -4
- package/build/angular/components/refresh-control/index.js +54 -16
- package/build/angular/components/refresh-control/index.js.map +1 -1
- package/build/angular/components/safe-area-view/index.d.ts +9 -4
- package/build/angular/components/safe-area-view/index.js +48 -9
- package/build/angular/components/safe-area-view/index.js.map +1 -1
- package/build/angular/components/scroll-view/index.android.d.ts +2 -3
- package/build/angular/components/scroll-view/index.android.js +88 -61
- package/build/angular/components/scroll-view/index.android.js.map +1 -1
- package/build/angular/components/scroll-view/index.ios.d.ts +2 -3
- package/build/angular/components/scroll-view/index.ios.js +24 -18
- package/build/angular/components/scroll-view/index.ios.js.map +1 -1
- package/build/angular/components/scroll-view/projection.d.ts +35 -0
- package/build/angular/components/scroll-view/projection.js +279 -53
- package/build/angular/components/scroll-view/projection.js.map +1 -1
- package/build/angular/components/scroll-view/shared.d.ts +14 -5
- package/build/angular/components/scroll-view/shared.js +225 -75
- package/build/angular/components/scroll-view/shared.js.map +1 -1
- package/build/angular/components/scroll-view/sticky-header.js +21 -22
- package/build/angular/components/scroll-view/sticky-header.js.map +1 -1
- package/build/angular/components/section-list/index.d.ts +7 -1
- package/build/angular/components/section-list/index.js +91 -54
- package/build/angular/components/section-list/index.js.map +1 -1
- package/build/angular/components/switch/index.android.d.ts +7 -3
- package/build/angular/components/switch/index.android.js +52 -10
- package/build/angular/components/switch/index.android.js.map +1 -1
- package/build/angular/components/switch/index.ios.d.ts +7 -3
- package/build/angular/components/switch/index.ios.js +52 -10
- package/build/angular/components/switch/index.ios.js.map +1 -1
- package/build/angular/components/switch/shared.d.ts +13 -4
- package/build/angular/components/switch/shared.js +71 -7
- package/build/angular/components/switch/shared.js.map +1 -1
- package/build/angular/components/text-input.d.ts +11 -3
- package/build/angular/components/text-input.js +68 -8
- package/build/angular/components/text-input.js.map +1 -1
- package/build/angular/components/touchable/index.d.ts +40 -9
- package/build/angular/components/touchable/index.js +303 -67
- package/build/angular/components/touchable/index.js.map +1 -1
- package/build/angular/components/touchable-native-feedback/index.d.ts +6 -3
- package/build/angular/components/touchable-native-feedback/index.js +63 -27
- package/build/angular/components/touchable-native-feedback/index.js.map +1 -1
- package/build/angular/components/virtualized-list/directives.js +22 -18
- package/build/angular/components/virtualized-list/directives.js.map +1 -1
- package/build/angular/components/virtualized-list/index.d.ts +15 -4
- package/build/angular/components/virtualized-list/index.js +326 -94
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/directives.js +12 -12
- package/build/angular/components/virtualized-section-list/directives.js.map +1 -1
- package/build/angular/components/virtualized-section-list/index.d.ts +19 -1
- package/build/angular/components/virtualized-section-list/index.js +93 -22
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/components.d.ts +2 -2
- package/build/angular/components.js +5 -0
- package/build/angular/components.js.map +1 -1
- package/build/angular/create-portal/index.js +34 -36
- package/build/angular/create-portal/index.js.map +1 -1
- package/build/angular/create-tunnel/index.js +19 -22
- package/build/angular/create-tunnel/index.js.map +1 -1
- package/build/angular/descriptor-to-angular/index.js +6 -4
- package/build/angular/descriptor-to-angular/index.js.map +1 -1
- package/build/angular/diagnostics.d.ts +33 -0
- package/build/angular/diagnostics.js +82 -0
- package/build/angular/diagnostics.js.map +1 -0
- package/build/angular/host-instance/index.js +1 -1
- package/build/angular/host-instance/index.js.map +1 -1
- package/build/angular/index.d.ts +9 -4
- package/build/angular/index.js +17 -3
- package/build/angular/index.js.map +1 -1
- package/build/angular/modules/animated/animated-leaf-binder.d.ts +1 -7
- package/build/angular/modules/animated/animated-leaf-binder.js +22 -72
- package/build/angular/modules/animated/animated-leaf-binder.js.map +1 -1
- package/build/angular/modules/animated/create-animated-component.d.ts +11 -6
- package/build/angular/modules/animated/create-animated-component.js +106 -55
- package/build/angular/modules/animated/create-animated-component.js.map +1 -1
- package/build/angular/modules/status-bar/index.js +4 -4
- package/build/angular/modules/status-bar/index.js.map +1 -1
- package/build/angular/primitives/index.d.ts +20 -3
- package/build/angular/primitives/index.js +84 -48
- package/build/angular/primitives/index.js.map +1 -1
- package/build/angular/primitives/shared.d.ts +48 -2
- package/build/angular/primitives/shared.js +158 -11
- package/build/angular/primitives/shared.js.map +1 -1
- package/build/angular/render/index.js +69 -38
- package/build/angular/render/index.js.map +1 -1
- package/build/angular/renderer/index.d.ts +1 -0
- package/build/angular/renderer/index.js +37 -2
- package/build/angular/renderer/index.js.map +1 -1
- package/build/angular/services/color-scheme.service.js +3 -3
- package/build/angular/services/color-scheme.service.js.map +1 -1
- package/build/angular/services/window-dimensions.service.js +4 -4
- package/build/angular/services/window-dimensions.service.js.map +1 -1
- package/package.json +10 -8
- package/src/anchor-host-registry.ts +2 -2
- package/src/bootstrap.ts +4 -1
- package/src/components/activity-indicator/index.android.ts +8 -1
- package/src/components/activity-indicator/index.ios.ts +4 -0
- package/src/components/activity-indicator/shared.ts +32 -13
- package/src/components/button.ts +46 -19
- package/src/components/flat-list/index.ts +122 -62
- package/src/components/image/index.android.ts +58 -7
- package/src/components/image/index.ios.ts +58 -7
- package/src/components/image/shared.ts +92 -21
- package/src/components/image-background.ts +29 -9
- package/src/components/input-accessory-view/index.ts +67 -12
- package/src/components/keyboard-avoiding-view/index.ts +61 -15
- package/src/components/modal/index.ts +72 -33
- package/src/components/pressable/index.ts +117 -28
- package/src/components/refresh-control/index.ts +74 -18
- package/src/components/safe-area-view/index.ts +64 -10
- package/src/components/scroll-view/index.android.ts +62 -47
- package/src/components/scroll-view/index.ios.ts +19 -17
- package/src/components/scroll-view/projection.ts +363 -64
- package/src/components/scroll-view/shared.ts +312 -90
- package/src/components/scroll-view/sticky-header.ts +36 -24
- package/src/components/section-list/index.ts +86 -53
- package/src/components/switch/index.android.ts +60 -8
- package/src/components/switch/index.ios.ts +60 -8
- package/src/components/switch/shared.ts +93 -6
- package/src/components/text-input.ts +95 -13
- package/src/components/touchable/index.ts +348 -64
- package/src/components/touchable-native-feedback/index.ts +94 -31
- package/src/components/virtualized-list/directives.ts +19 -5
- package/src/components/virtualized-list/index.ts +380 -85
- package/src/components/virtualized-section-list/directives.ts +6 -3
- package/src/components/virtualized-section-list/index.ts +146 -33
- package/src/components.ts +9 -1
- package/src/create-portal/index.ts +31 -31
- package/src/create-tunnel/index.ts +16 -17
- package/src/descriptor-to-angular/index.ts +29 -8
- package/src/diagnostics.ts +138 -0
- package/src/host-instance/index.ts +9 -3
- package/src/index.ts +61 -3
- package/src/modules/animated/animated-leaf-binder.ts +28 -77
- package/src/modules/animated/create-animated-component.ts +115 -47
- package/src/modules/app-registry/index.ts +9 -9
- package/src/modules/status-bar/index.ts +13 -4
- package/src/primitives/index.ts +47 -2
- package/src/primitives/shared.ts +170 -10
- package/src/render/index.ts +77 -39
- package/src/renderer/index.ts +76 -14
- package/src/services/color-scheme.service.ts +3 -1
- package/src/services/window-dimensions.service.ts +11 -4
- package/build/angular/modules/animated/animated-leaf-binder/index.d.ts +0 -14
- package/build/angular/modules/animated/animated-leaf-binder/index.js +0 -91
- package/build/angular/modules/animated/animated-leaf-binder/index.js.map +0 -1
- package/src/modules/animated/animated-leaf-binder/index.ts +0 -101
|
@@ -21,10 +21,10 @@ export class ColorSchemeService {
|
|
|
21
21
|
subscription.remove();
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
25
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ColorSchemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
25
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ColorSchemeService, providedIn: 'root' });
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ColorSchemeService, decorators: [{
|
|
28
28
|
type: Injectable,
|
|
29
29
|
args: [{ providedIn: 'root' }]
|
|
30
30
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-scheme.service.js","sourceRoot":"","sources":["../../../src/services/color-scheme.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,UAAU,EAAyB,MAAM,yBAAyB,CAAC;;AAE5E;;;;;;;GAOG;AAEH,MAAM,OAAO,kBAAkB;IACpB,WAAW,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"color-scheme.service.js","sourceRoot":"","sources":["../../../src/services/color-scheme.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,UAAU,EAAyB,MAAM,yBAAyB,CAAC;;AAE5E;;;;;;;GAOG;AAEH,MAAM,OAAO,kBAAkB;IACpB,WAAW,GAAG,MAAM,CAC3B,UAAU,CAAC,cAAc,EAAE;oFAC5B,CAAC;IAEF;QACE,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAEtC,MAAM,YAAY,GAAG,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;YAC9D,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE;YACxB,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;uGAfU,kBAAkB;2GAAlB,kBAAkB,cADL,MAAM;;2FACnB,kBAAkB;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DestroyRef, inject, Injectable, signal } from '@angular/core';
|
|
2
|
-
import { Dimensions } from '@symbiote-native/engine';
|
|
2
|
+
import { Dimensions, } from '@symbiote-native/engine';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* Angular twin of React's `useWindowDimensions` and Vue's `useWindowDimensions` composable. The
|
|
@@ -32,10 +32,10 @@ export class WindowDimensionsService {
|
|
|
32
32
|
subscription.remove();
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
36
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: WindowDimensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
36
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: WindowDimensionsService, providedIn: 'root' });
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: WindowDimensionsService, decorators: [{
|
|
39
39
|
type: Injectable,
|
|
40
40
|
args: [{ providedIn: 'root' }]
|
|
41
41
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-dimensions.service.js","sourceRoot":"","sources":["../../../src/services/window-dimensions.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"window-dimensions.service.js","sourceRoot":"","sources":["../../../src/services/window-dimensions.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,UAAU,GAGX,MAAM,yBAAyB,CAAC;;AAEjC;;;;;;;GAOG;AAEH,MAAM,OAAO,uBAAuB;IACzB,UAAU,GAAG,MAAM,CAAkB,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC;mFAAC,CAAC;IAExE;QACE,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAEtC,MAAM,YAAY,GAAG,CAAC,MAAuB,EAAQ,EAAE;YACrD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YAClC,IACE,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;gBAC9B,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM;gBAChC,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;gBAC9B,OAAO,CAAC,SAAS,KAAK,MAAM,CAAC,SAAS,EACtC,CAAC;gBACD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;QAEF,MAAM,YAAY,GAAG,UAAU,CAAC,gBAAgB,CAC9C,QAAQ,EACR,CAAC,GAAmB,EAAE,EAAE;YACtB,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC,CACF,CAAC;QACF,0FAA0F;QAC1F,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEvC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE;YACxB,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;uGA9BU,uBAAuB;2GAAvB,uBAAuB,cADV,MAAM;;2FACnB,uBAAuB;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.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
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -54,25 +54,27 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@angular/compiler-cli": "
|
|
57
|
+
"@angular/compiler-cli": "~22.0.8",
|
|
58
58
|
"@react-native/typescript-config": "0.86.0",
|
|
59
|
-
"@symbiote-native/components": "0.
|
|
60
|
-
"@symbiote-native/css-parser": "0.
|
|
59
|
+
"@symbiote-native/components": "0.5.0",
|
|
60
|
+
"@symbiote-native/css-parser": "0.4.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@angular/core": ">=20",
|
|
64
|
+
"@angular/forms": ">=20",
|
|
64
65
|
"@symbiote-native/engine": ">=0.1.7",
|
|
65
66
|
"react-native": ">=0.86"
|
|
66
67
|
},
|
|
67
68
|
"devDependencies": {
|
|
68
|
-
"@angular/compiler": "
|
|
69
|
-
"@angular/core": "
|
|
69
|
+
"@angular/compiler": "~22.0.8",
|
|
70
|
+
"@angular/core": "~22.0.8",
|
|
71
|
+
"@angular/forms": "~22.0.8",
|
|
70
72
|
"@babel/core": "^7.25.2",
|
|
71
73
|
"@types/babel__core": "^7.20.5",
|
|
72
74
|
"@types/node": "^26.0.0",
|
|
73
75
|
"typescript": "~6.0.0",
|
|
74
|
-
"@symbiote-native/engine": "0.
|
|
75
|
-
"@symbiote-native/test-utils": "0.
|
|
76
|
+
"@symbiote-native/engine": "0.3.0",
|
|
77
|
+
"@symbiote-native/test-utils": "0.2.0"
|
|
76
78
|
},
|
|
77
79
|
"scripts": {
|
|
78
80
|
"clean": "rm -rf build",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
// Housing the registry here rather than inline in `renderer/index.ts` keeps it out of the require
|
|
12
12
|
// cycle (cheap insurance against a load-order strand). The bug that actually surfaced this,
|
|
13
13
|
// though, was STALE BUILD ARTIFACTS, not the cycle: `ngc -p` never deletes orphaned outputs, so
|
|
14
|
-
// after the renderer moved `renderer.ts`
|
|
14
|
+
// after the renderer moved `renderer.ts` -> `renderer/index.ts` the orphaned `build/angular/
|
|
15
15
|
// renderer.js` lingered and SHADOWED `build/angular/renderer/index.js` (a file beats a folder in
|
|
16
16
|
// Node/Metro resolution), giving the bundle a second, stale registry Set — fixed by cleaning
|
|
17
17
|
// `build/` before every ngc build (see each Angular package's `clean` script). Full record:
|
|
18
|
-
// angular-adapter §11c
|
|
18
|
+
// angular-adapter §11c.
|
|
19
19
|
|
|
20
20
|
// Lowercased at construction — isAnchorHostComponent and registerComposedComponent both normalize
|
|
21
21
|
// to lowercase (Angular lowercases a dynamically-mounted component's selector at runtime, see
|
package/src/bootstrap.ts
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import { AppRegistry as RNAppRegistry } from 'react-native';
|
|
7
7
|
import type { Type } from '@angular/core';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
bootstrapHost,
|
|
10
|
+
type IBootstrapHostOptions,
|
|
11
|
+
} from '@symbiote-native/components/bootstrap';
|
|
9
12
|
import { AppRegistry, setHostRegistrar } from './modules/app-registry';
|
|
10
13
|
|
|
11
14
|
export type { IBootstrapHostOptions } from '@symbiote-native/components/bootstrap';
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
2
|
import { DescriptorOutlet } from '../../descriptor-to-angular';
|
|
3
3
|
import { ActivityIndicatorBase } from './shared';
|
|
4
|
+
import { SymbioteStyleInputDirective } from '../../primitives';
|
|
4
5
|
export type { IActivityIndicatorProps } from './shared';
|
|
5
6
|
|
|
6
7
|
@Component({
|
|
7
8
|
selector: 'ActivityIndicator',
|
|
8
9
|
standalone: true,
|
|
10
|
+
hostDirectives: [
|
|
11
|
+
{ directive: SymbioteStyleInputDirective, inputs: ['style'] },
|
|
12
|
+
],
|
|
9
13
|
imports: [DescriptorOutlet],
|
|
10
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
15
|
template: `<symbiote-descriptor-outlet [node]="descriptor" />`,
|
|
12
16
|
})
|
|
13
17
|
export class ActivityIndicator extends ActivityIndicatorBase {
|
|
14
18
|
protected readonly defaultColor = null;
|
|
15
|
-
protected override readonly nativeExtras = {
|
|
19
|
+
protected override readonly nativeExtras = {
|
|
20
|
+
styleAttr: 'Normal',
|
|
21
|
+
indeterminate: true,
|
|
22
|
+
};
|
|
16
23
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
2
|
import { DescriptorOutlet } from '../../descriptor-to-angular';
|
|
3
3
|
import { ActivityIndicatorBase } from './shared';
|
|
4
|
+
import { SymbioteStyleInputDirective } from '../../primitives';
|
|
4
5
|
export type { IActivityIndicatorProps } from './shared';
|
|
5
6
|
|
|
6
7
|
const IOS_DEFAULT_COLOR = '#999999';
|
|
@@ -8,6 +9,9 @@ const IOS_DEFAULT_COLOR = '#999999';
|
|
|
8
9
|
@Component({
|
|
9
10
|
selector: 'ActivityIndicator',
|
|
10
11
|
standalone: true,
|
|
12
|
+
hostDirectives: [
|
|
13
|
+
{ directive: SymbioteStyleInputDirective, inputs: ['style'] },
|
|
14
|
+
],
|
|
11
15
|
imports: [DescriptorOutlet],
|
|
12
16
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
17
|
template: `<symbiote-descriptor-outlet [node]="descriptor" />`,
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Directive,
|
|
3
|
+
ElementRef,
|
|
4
|
+
EventEmitter,
|
|
5
|
+
inject,
|
|
6
|
+
Input,
|
|
7
|
+
Output,
|
|
8
|
+
} from '@angular/core';
|
|
2
9
|
import {
|
|
3
10
|
renderActivityIndicator,
|
|
4
11
|
resolveAccessibilityProps,
|
|
@@ -13,7 +20,10 @@ import type { ISymbioteEvent } from '@symbiote-native/engine';
|
|
|
13
20
|
import type { IDescriptor } from '@symbiote-native/components';
|
|
14
21
|
import { anchorHostStyle } from '../../primitives';
|
|
15
22
|
|
|
16
|
-
export type {
|
|
23
|
+
export type {
|
|
24
|
+
IActivityIndicatorProps,
|
|
25
|
+
IActivityIndicatorSize,
|
|
26
|
+
} from '@symbiote-native/components';
|
|
17
27
|
|
|
18
28
|
// Narrows anchorHostStyle's `unknown` (it reads an opaque engine prop bag) to the shape
|
|
19
29
|
// IActivityIndicatorProps['style'] actually declares, the same runtime guard image/shared.ts's
|
|
@@ -61,8 +71,10 @@ export abstract class ActivityIndicatorBase implements IActivityIndicatorInputs
|
|
|
61
71
|
@Input() accessibilityValue?: IAccessibilityProps['accessibilityValue'];
|
|
62
72
|
@Input() accessibilityActions?: IAccessibilityProps['accessibilityActions'];
|
|
63
73
|
@Input() accessibilityLabelledBy?: string | string[];
|
|
64
|
-
@Input()
|
|
65
|
-
|
|
74
|
+
@Input()
|
|
75
|
+
importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
|
|
76
|
+
@Input()
|
|
77
|
+
accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
|
|
66
78
|
@Input() screenReaderFocusable?: boolean;
|
|
67
79
|
@Input() accessibilityViewIsModal?: boolean;
|
|
68
80
|
@Input() accessibilityElementsHidden?: boolean;
|
|
@@ -107,14 +119,18 @@ export abstract class ActivityIndicatorBase implements IActivityIndicatorInputs
|
|
|
107
119
|
// closure even when nothing changed — every CD pass would read as "props changed" and force a
|
|
108
120
|
// real Fabric re-clone cascading up every ancestor to the root (the same hazard
|
|
109
121
|
// AnimatedComponentBase.reconcile() and ScrollViewStickyHeader's onHostLayout guard against).
|
|
110
|
-
private readonly onLayoutHandler = (event: ISymbioteEvent): void =>
|
|
111
|
-
|
|
112
|
-
|
|
122
|
+
private readonly onLayoutHandler = (event: ISymbioteEvent): void =>
|
|
123
|
+
this.layout.emit(event);
|
|
124
|
+
private readonly onAccessibilityActionHandler = (
|
|
125
|
+
event: ISymbioteEvent,
|
|
126
|
+
): void => this.accessibilityAction.emit(event);
|
|
113
127
|
private readonly onAccessibilityTapHandler = (event: ISymbioteEvent): void =>
|
|
114
128
|
this.accessibilityTap.emit(event);
|
|
115
|
-
private readonly onMagicTapHandler = (event: ISymbioteEvent): void =>
|
|
116
|
-
|
|
117
|
-
|
|
129
|
+
private readonly onMagicTapHandler = (event: ISymbioteEvent): void =>
|
|
130
|
+
this.magicTap.emit(event);
|
|
131
|
+
private readonly onAccessibilityEscapeHandler = (
|
|
132
|
+
event: ISymbioteEvent,
|
|
133
|
+
): void => this.accessibilityEscape.emit(event);
|
|
118
134
|
|
|
119
135
|
get descriptor(): IDescriptor {
|
|
120
136
|
const props = resolveAccessibilityProps<IActivityIndicatorProps>({
|
|
@@ -141,8 +157,10 @@ export abstract class ActivityIndicatorBase implements IActivityIndicatorInputs
|
|
|
141
157
|
accessibilityElementsHidden: this.accessibilityElementsHidden,
|
|
142
158
|
accessibilityIgnoresInvertColors: this.accessibilityIgnoresInvertColors,
|
|
143
159
|
accessibilityLanguage: this.accessibilityLanguage,
|
|
144
|
-
accessibilityRespondsToUserInteraction:
|
|
145
|
-
|
|
160
|
+
accessibilityRespondsToUserInteraction:
|
|
161
|
+
this.accessibilityRespondsToUserInteraction,
|
|
162
|
+
accessibilityShowsLargeContentViewer:
|
|
163
|
+
this.accessibilityShowsLargeContentViewer,
|
|
146
164
|
accessibilityLargeContentTitle: this.accessibilityLargeContentTitle,
|
|
147
165
|
onAccessibilityAction: this.emitterHandler(
|
|
148
166
|
this.accessibilityAction,
|
|
@@ -174,7 +192,8 @@ export abstract class ActivityIndicatorBase implements IActivityIndicatorInputs
|
|
|
174
192
|
'aria-valuetext': this.ariaValueText,
|
|
175
193
|
});
|
|
176
194
|
|
|
177
|
-
const { animating, color, hidesWhenStopped, size, style, ...passthrough } =
|
|
195
|
+
const { animating, color, hidesWhenStopped, size, style, ...passthrough } =
|
|
196
|
+
props;
|
|
178
197
|
return renderActivityIndicator(
|
|
179
198
|
{
|
|
180
199
|
animating: animating !== false,
|
package/src/components/button.ts
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
// Button for Angular. The minimal cross-platform button in RN's iOS shape (Button.js): a
|
|
2
2
|
// TouchableOpacity wrapping a Text. The base text style, the role constant, and the color fold are
|
|
3
|
-
// shared in @symbiote-native/components/view;
|
|
4
|
-
// symbiote-text child and re-maps the few Button-owned props.
|
|
5
|
-
//
|
|
3
|
+
// shared in @symbiote-native/components/view; Angular only composes its TouchableOpacity + a
|
|
4
|
+
// symbiote-text child and re-maps the few Button-owned props. No JS-side platform branch, so this
|
|
5
|
+
// stays a flat single file.
|
|
6
6
|
//
|
|
7
|
-
// RN's Button fixes accessibilityRole="button", marks the root accessible, and propagates
|
|
8
|
-
// into the accessibility state; those three win over any caller value. `title` becomes
|
|
9
|
-
// child; disabled forwards straight; touchSoundDisabled maps to the pressable's
|
|
10
|
-
// Every
|
|
11
|
-
//
|
|
12
|
-
// verbatim. onPress and the four accessibility callbacks are the
|
|
7
|
+
// RN's Button fixes accessibilityRole="button", marks the root accessible, and propagates
|
|
8
|
+
// `disabled` into the accessibility state; those three win over any caller value. `title` becomes
|
|
9
|
+
// the Text child; disabled forwards straight; touchSoundDisabled maps to the pressable's
|
|
10
|
+
// android_disableSound. Every other field of the shared IButtonProps stays RE-EXPORTED from
|
|
11
|
+
// @symbiote-native/components verbatim. onPress and the four accessibility callbacks are the
|
|
13
12
|
// exceptions: each is a real @Output() here (`press`, `accessibilityAction`, `accessibilityTap`,
|
|
14
|
-
// `magicTap`, `accessibilityEscape`), mirroring the Vue adapter's Button, which forks the
|
|
15
|
-
// field the same way
|
|
16
|
-
// existing one extended to accessibility.
|
|
13
|
+
// `magicTap`, `accessibilityEscape`), mirroring the Vue adapter's Button, which forks the same
|
|
14
|
+
// onPress field the same way — not a new precedent, the existing one extended to accessibility.
|
|
17
15
|
|
|
18
16
|
import {
|
|
19
17
|
CUSTOM_ELEMENTS_SCHEMA,
|
|
@@ -24,6 +22,8 @@ import {
|
|
|
24
22
|
inject,
|
|
25
23
|
Input,
|
|
26
24
|
Output,
|
|
25
|
+
signal,
|
|
26
|
+
type DoCheck,
|
|
27
27
|
} from '@angular/core';
|
|
28
28
|
import {
|
|
29
29
|
BUTTON_ACCESSIBILITY_ROLE,
|
|
@@ -33,7 +33,12 @@ import {
|
|
|
33
33
|
type IAriaProps,
|
|
34
34
|
type IButtonProps as ICoreButtonProps,
|
|
35
35
|
} from '@symbiote-native/components';
|
|
36
|
-
import type {
|
|
36
|
+
import type {
|
|
37
|
+
ISymbioteEvent,
|
|
38
|
+
ITextStyle,
|
|
39
|
+
IStyleProp,
|
|
40
|
+
IViewStyle,
|
|
41
|
+
} from '@symbiote-native/engine';
|
|
37
42
|
import { anchorStyleProp, TextHost } from '../primitives';
|
|
38
43
|
import { TouchableOpacity } from './touchable';
|
|
39
44
|
|
|
@@ -81,8 +86,12 @@ export type IButtonProps = Omit<
|
|
|
81
86
|
[accessibilityElementsHidden]="accessibilityElementsHidden"
|
|
82
87
|
[accessibilityIgnoresInvertColors]="accessibilityIgnoresInvertColors"
|
|
83
88
|
[accessibilityLanguage]="accessibilityLanguage"
|
|
84
|
-
[accessibilityRespondsToUserInteraction]="
|
|
85
|
-
|
|
89
|
+
[accessibilityRespondsToUserInteraction]="
|
|
90
|
+
accessibilityRespondsToUserInteraction
|
|
91
|
+
"
|
|
92
|
+
[accessibilityShowsLargeContentViewer]="
|
|
93
|
+
accessibilityShowsLargeContentViewer
|
|
94
|
+
"
|
|
86
95
|
[accessibilityLargeContentTitle]="accessibilityLargeContentTitle"
|
|
87
96
|
(accessibilityAction)="accessibilityAction.emit($event)"
|
|
88
97
|
(accessibilityTap)="accessibilityTap.emit($event)"
|
|
@@ -108,7 +117,7 @@ export type IButtonProps = Omit<
|
|
|
108
117
|
</TouchableOpacity>
|
|
109
118
|
`,
|
|
110
119
|
})
|
|
111
|
-
export class Button implements IButtonProps {
|
|
120
|
+
export class Button implements IButtonProps, DoCheck {
|
|
112
121
|
// This component's OWN host — the non-painting anchor `class="..."` at the use site resolves
|
|
113
122
|
// onto (see anchorHostStyle's doc comment in primitives/shared.ts) — NOT the inner
|
|
114
123
|
// TouchableOpacity/Pressable one level down. RN's real Button takes no `style` prop, so this
|
|
@@ -149,8 +158,10 @@ export class Button implements IButtonProps {
|
|
|
149
158
|
@Input() accessibilityValue?: IAccessibilityProps['accessibilityValue'];
|
|
150
159
|
@Input() accessibilityActions?: IAccessibilityProps['accessibilityActions'];
|
|
151
160
|
@Input() accessibilityLabelledBy?: string | string[];
|
|
152
|
-
@Input()
|
|
153
|
-
|
|
161
|
+
@Input()
|
|
162
|
+
importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
|
|
163
|
+
@Input()
|
|
164
|
+
accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
|
|
154
165
|
@Input() screenReaderFocusable?: boolean;
|
|
155
166
|
@Input() accessibilityViewIsModal?: boolean;
|
|
156
167
|
@Input() accessibilityElementsHidden?: boolean;
|
|
@@ -187,7 +198,23 @@ export class Button implements IButtonProps {
|
|
|
187
198
|
return resolveButtonTextStyle(this.color, this.disabled);
|
|
188
199
|
}
|
|
189
200
|
|
|
201
|
+
// Polled, not read live: a class toggled after mount reaches the anchor through
|
|
202
|
+
// addClass/removeClass, which dirties nothing, so a plain getter froze at its creation value.
|
|
203
|
+
// Button cannot use SymbioteStyleInputDirective instead - RN's Button has no `style` prop, so
|
|
204
|
+
// there is no `style` @Input for it to hang off.
|
|
205
|
+
//
|
|
206
|
+
// ngDoCheck runs during the PARENT's refresh even when this view is skipped; the signal write is
|
|
207
|
+
// what marks this view. The anchor returns the same props.style reference until a commit changes
|
|
208
|
+
// it, so Object.is makes an unchanged poll free.
|
|
209
|
+
private readonly anchorStyleValue = signal<
|
|
210
|
+
IStyleProp<IViewStyle> | undefined
|
|
211
|
+
>(undefined);
|
|
212
|
+
|
|
213
|
+
ngDoCheck(): void {
|
|
214
|
+
this.anchorStyleValue.set(anchorStyleProp<IViewStyle>(this.elementRef));
|
|
215
|
+
}
|
|
216
|
+
|
|
190
217
|
get anchorStyle(): IStyleProp<IViewStyle> | undefined {
|
|
191
|
-
return
|
|
218
|
+
return this.anchorStyleValue();
|
|
192
219
|
}
|
|
193
220
|
}
|