@symbiote-native/angular 0.0.0-canary-20260724081123

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.
Files changed (276) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +157 -0
  3. package/babel-linker.cjs +7 -0
  4. package/babel-register-composed.cjs +127 -0
  5. package/bin/symbiote-angular-dev.cjs +93 -0
  6. package/build/angular/anchor-host-registry.d.ts +2 -0
  7. package/build/angular/anchor-host-registry.js +84 -0
  8. package/build/angular/anchor-host-registry.js.map +1 -0
  9. package/build/angular/bootstrap.d.ts +7 -0
  10. package/build/angular/bootstrap.js +15 -0
  11. package/build/angular/bootstrap.js.map +1 -0
  12. package/build/angular/components/activity-indicator/index.android.d.ts +12 -0
  13. package/build/angular/components/activity-indicator/index.android.js +21 -0
  14. package/build/angular/components/activity-indicator/index.android.js.map +1 -0
  15. package/build/angular/components/activity-indicator/index.d.ts +1 -0
  16. package/build/angular/components/activity-indicator/index.ios.d.ts +8 -0
  17. package/build/angular/components/activity-indicator/index.ios.js +21 -0
  18. package/build/angular/components/activity-indicator/index.ios.js.map +1 -0
  19. package/build/angular/components/activity-indicator/index.js +4 -0
  20. package/build/angular/components/activity-indicator/index.js.map +1 -0
  21. package/build/angular/components/activity-indicator/shared.d.ts +67 -0
  22. package/build/angular/components/activity-indicator/shared.js +260 -0
  23. package/build/angular/components/activity-indicator/shared.js.map +1 -0
  24. package/build/angular/components/button.d.ts +63 -0
  25. package/build/angular/components/button.js +332 -0
  26. package/build/angular/components/button.js.map +1 -0
  27. package/build/angular/components/flat-list/index.d.ts +122 -0
  28. package/build/angular/components/flat-list/index.js +688 -0
  29. package/build/angular/components/flat-list/index.js.map +1 -0
  30. package/build/angular/components/image/index.android.d.ts +10 -0
  31. package/build/angular/components/image/index.android.js +59 -0
  32. package/build/angular/components/image/index.android.js.map +1 -0
  33. package/build/angular/components/image/index.d.ts +1 -0
  34. package/build/angular/components/image/index.ios.d.ts +10 -0
  35. package/build/angular/components/image/index.ios.js +59 -0
  36. package/build/angular/components/image/index.ios.js.map +1 -0
  37. package/build/angular/components/image/index.js +3 -0
  38. package/build/angular/components/image/index.js.map +1 -0
  39. package/build/angular/components/image/shared.d.ts +101 -0
  40. package/build/angular/components/image/shared.js +406 -0
  41. package/build/angular/components/image/shared.js.map +1 -0
  42. package/build/angular/components/image-background.d.ts +81 -0
  43. package/build/angular/components/image-background.js +418 -0
  44. package/build/angular/components/image-background.js.map +1 -0
  45. package/build/angular/components/input-accessory-view/index.d.ts +60 -0
  46. package/build/angular/components/input-accessory-view/index.js +251 -0
  47. package/build/angular/components/input-accessory-view/index.js.map +1 -0
  48. package/build/angular/components/keyboard-avoiding-view/index.d.ts +82 -0
  49. package/build/angular/components/keyboard-avoiding-view/index.js +358 -0
  50. package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -0
  51. package/build/angular/components/modal/index.d.ts +92 -0
  52. package/build/angular/components/modal/index.js +360 -0
  53. package/build/angular/components/modal/index.js.map +1 -0
  54. package/build/angular/components/pressable/index.d.ts +123 -0
  55. package/build/angular/components/pressable/index.js +420 -0
  56. package/build/angular/components/pressable/index.js.map +1 -0
  57. package/build/angular/components/refresh-control/index.d.ts +86 -0
  58. package/build/angular/components/refresh-control/index.js +342 -0
  59. package/build/angular/components/refresh-control/index.js.map +1 -0
  60. package/build/angular/components/safe-area-view/index.d.ts +57 -0
  61. package/build/angular/components/safe-area-view/index.js +248 -0
  62. package/build/angular/components/safe-area-view/index.js.map +1 -0
  63. package/build/angular/components/scroll-view/index.android.d.ts +21 -0
  64. package/build/angular/components/scroll-view/index.android.js +235 -0
  65. package/build/angular/components/scroll-view/index.android.js.map +1 -0
  66. package/build/angular/components/scroll-view/index.d.ts +3 -0
  67. package/build/angular/components/scroll-view/index.ios.d.ts +9 -0
  68. package/build/angular/components/scroll-view/index.ios.js +86 -0
  69. package/build/angular/components/scroll-view/index.ios.js.map +1 -0
  70. package/build/angular/components/scroll-view/index.js +6 -0
  71. package/build/angular/components/scroll-view/index.js.map +1 -0
  72. package/build/angular/components/scroll-view/projection.d.ts +32 -0
  73. package/build/angular/components/scroll-view/projection.js +334 -0
  74. package/build/angular/components/scroll-view/projection.js.map +1 -0
  75. package/build/angular/components/scroll-view/shared.d.ts +230 -0
  76. package/build/angular/components/scroll-view/shared.js +682 -0
  77. package/build/angular/components/scroll-view/shared.js.map +1 -0
  78. package/build/angular/components/scroll-view/sticky-header.d.ts +40 -0
  79. package/build/angular/components/scroll-view/sticky-header.js +225 -0
  80. package/build/angular/components/scroll-view/sticky-header.js.map +1 -0
  81. package/build/angular/components/section-list/index.d.ts +116 -0
  82. package/build/angular/components/section-list/index.js +641 -0
  83. package/build/angular/components/section-list/index.js.map +1 -0
  84. package/build/angular/components/switch/index.android.d.ts +20 -0
  85. package/build/angular/components/switch/index.android.js +70 -0
  86. package/build/angular/components/switch/index.android.js.map +1 -0
  87. package/build/angular/components/switch/index.d.ts +1 -0
  88. package/build/angular/components/switch/index.ios.d.ts +19 -0
  89. package/build/angular/components/switch/index.ios.js +69 -0
  90. package/build/angular/components/switch/index.ios.js.map +1 -0
  91. package/build/angular/components/switch/index.js +4 -0
  92. package/build/angular/components/switch/index.js.map +1 -0
  93. package/build/angular/components/switch/shared.d.ts +40 -0
  94. package/build/angular/components/switch/shared.js +127 -0
  95. package/build/angular/components/switch/shared.js.map +1 -0
  96. package/build/angular/components/text-input.d.ts +153 -0
  97. package/build/angular/components/text-input.js +599 -0
  98. package/build/angular/components/text-input.js.map +1 -0
  99. package/build/angular/components/touchable/index.d.ts +245 -0
  100. package/build/angular/components/touchable/index.js +1186 -0
  101. package/build/angular/components/touchable/index.js.map +1 -0
  102. package/build/angular/components/touchable-native-feedback/index.d.ts +83 -0
  103. package/build/angular/components/touchable-native-feedback/index.js +371 -0
  104. package/build/angular/components/touchable-native-feedback/index.js.map +1 -0
  105. package/build/angular/components/virtualized-list/directives.d.ts +54 -0
  106. package/build/angular/components/virtualized-list/directives.js +153 -0
  107. package/build/angular/components/virtualized-list/directives.js.map +1 -0
  108. package/build/angular/components/virtualized-list/index.d.ts +253 -0
  109. package/build/angular/components/virtualized-list/index.js +1031 -0
  110. package/build/angular/components/virtualized-list/index.js.map +1 -0
  111. package/build/angular/components/virtualized-section-list/directives.d.ts +37 -0
  112. package/build/angular/components/virtualized-section-list/directives.js +76 -0
  113. package/build/angular/components/virtualized-section-list/directives.js.map +1 -0
  114. package/build/angular/components/virtualized-section-list/index.d.ts +178 -0
  115. package/build/angular/components/virtualized-section-list/index.js +720 -0
  116. package/build/angular/components/virtualized-section-list/index.js.map +1 -0
  117. package/build/angular/components.d.ts +39 -0
  118. package/build/angular/components.js +38 -0
  119. package/build/angular/components.js.map +1 -0
  120. package/build/angular/create-portal/index.d.ts +22 -0
  121. package/build/angular/create-portal/index.js +74 -0
  122. package/build/angular/create-portal/index.js.map +1 -0
  123. package/build/angular/create-tunnel/index.d.ts +34 -0
  124. package/build/angular/create-tunnel/index.js +126 -0
  125. package/build/angular/create-tunnel/index.js.map +1 -0
  126. package/build/angular/descriptor-to-angular/index.d.ts +22 -0
  127. package/build/angular/descriptor-to-angular/index.js +142 -0
  128. package/build/angular/descriptor-to-angular/index.js.map +1 -0
  129. package/build/angular/host-instance/index.d.ts +2 -0
  130. package/build/angular/host-instance/index.js +37 -0
  131. package/build/angular/host-instance/index.js.map +1 -0
  132. package/build/angular/index.d.ts +22 -0
  133. package/build/angular/index.js +46 -0
  134. package/build/angular/index.js.map +1 -0
  135. package/build/angular/modules/animated/animated-leaf-binder/index.d.ts +14 -0
  136. package/build/angular/modules/animated/animated-leaf-binder/index.js +91 -0
  137. package/build/angular/modules/animated/animated-leaf-binder/index.js.map +1 -0
  138. package/build/angular/modules/animated/animated-leaf-binder.d.ts +14 -0
  139. package/build/angular/modules/animated/animated-leaf-binder.js +91 -0
  140. package/build/angular/modules/animated/animated-leaf-binder.js.map +1 -0
  141. package/build/angular/modules/animated/create-animated-component.d.ts +59 -0
  142. package/build/angular/modules/animated/create-animated-component.js +364 -0
  143. package/build/angular/modules/animated/create-animated-component.js.map +1 -0
  144. package/build/angular/modules/animated/index.d.ts +51 -0
  145. package/build/angular/modules/animated/index.js +59 -0
  146. package/build/angular/modules/animated/index.js.map +1 -0
  147. package/build/angular/modules/app-registry/index.d.ts +7 -0
  148. package/build/angular/modules/app-registry/index.js +23 -0
  149. package/build/angular/modules/app-registry/index.js.map +1 -0
  150. package/build/angular/modules/status-bar/index.d.ts +20 -0
  151. package/build/angular/modules/status-bar/index.js +59 -0
  152. package/build/angular/modules/status-bar/index.js.map +1 -0
  153. package/build/angular/primitives/index.d.ts +63 -0
  154. package/build/angular/primitives/index.js +189 -0
  155. package/build/angular/primitives/index.js.map +1 -0
  156. package/build/angular/primitives/shared.d.ts +88 -0
  157. package/build/angular/primitives/shared.js +171 -0
  158. package/build/angular/primitives/shared.js.map +1 -0
  159. package/build/angular/render/index.d.ts +11 -0
  160. package/build/angular/render/index.js +171 -0
  161. package/build/angular/render/index.js.map +1 -0
  162. package/build/angular/renderer/index.d.ts +37 -0
  163. package/build/angular/renderer/index.js +301 -0
  164. package/build/angular/renderer/index.js.map +1 -0
  165. package/build/angular/services/color-scheme.service.d.ts +16 -0
  166. package/build/angular/services/color-scheme.service.js +31 -0
  167. package/build/angular/services/color-scheme.service.js.map +1 -0
  168. package/build/angular/services/index.d.ts +2 -0
  169. package/build/angular/services/index.js +3 -0
  170. package/build/angular/services/index.js.map +1 -0
  171. package/build/angular/services/window-dimensions.service.d.ts +16 -0
  172. package/build/angular/services/window-dimensions.service.js +42 -0
  173. package/build/angular/services/window-dimensions.service.js.map +1 -0
  174. package/metro-config.cjs +48 -0
  175. package/metro-css-parser.cjs +13 -0
  176. package/package.json +80 -0
  177. package/src/__tests__/responder-change-detection.test.ts +102 -0
  178. package/src/__tests__/responder-nested-cd.test.ts +113 -0
  179. package/src/anchor-host-registry.ts +88 -0
  180. package/src/angular-gaps.test.ts +142 -0
  181. package/src/angular-imports.test.ts +100 -0
  182. package/src/bootstrap.ts +26 -0
  183. package/src/components/activity-indicator/activity-indicator-class-style.test.ts +44 -0
  184. package/src/components/activity-indicator/activity-indicator.test.ts +131 -0
  185. package/src/components/activity-indicator/index.android.ts +16 -0
  186. package/src/components/activity-indicator/index.ios.ts +17 -0
  187. package/src/components/activity-indicator/index.ts +4 -0
  188. package/src/components/activity-indicator/shared.ts +206 -0
  189. package/src/components/button.ts +193 -0
  190. package/src/components/flat-list/column-wrapper-style-class.test.ts +116 -0
  191. package/src/components/flat-list/flat-list-array-style.test.ts +131 -0
  192. package/src/components/flat-list/flat-list-class-style.test.ts +74 -0
  193. package/src/components/flat-list/flat-list-scroll-containment.test.ts +107 -0
  194. package/src/components/flat-list/flat-list.test.ts +99 -0
  195. package/src/components/flat-list/index.ts +574 -0
  196. package/src/components/image/image-class-style.test.ts +46 -0
  197. package/src/components/image/index.android.ts +48 -0
  198. package/src/components/image/index.ios.ts +48 -0
  199. package/src/components/image/index.ts +3 -0
  200. package/src/components/image/shared.ts +479 -0
  201. package/src/components/image-background-class-style.test.ts +48 -0
  202. package/src/components/image-background-style-class.test.ts +79 -0
  203. package/src/components/image-background.ts +270 -0
  204. package/src/components/input-accessory-view/index.ts +185 -0
  205. package/src/components/input-accessory-view/input-accessory-view.test.ts +43 -0
  206. package/src/components/keyboard-avoiding-view/index.ts +303 -0
  207. package/src/components/keyboard-avoiding-view/keyboard-avoiding-view.test.ts +54 -0
  208. package/src/components/modal/index.ts +299 -0
  209. package/src/components/modal/modal.test.ts +43 -0
  210. package/src/components/pressable/index.ts +373 -0
  211. package/src/components/pressable/pressable.test.ts +85 -0
  212. package/src/components/refresh-control/index.ts +284 -0
  213. package/src/components/refresh-control/refresh-control.test.ts +41 -0
  214. package/src/components/safe-area-view/index.ts +177 -0
  215. package/src/components/safe-area-view/safe-area-view.test.ts +43 -0
  216. package/src/components/scroll-view/android-scroll-view-axis-projection.test.ts +123 -0
  217. package/src/components/scroll-view/content-container-style-class.test.ts +75 -0
  218. package/src/components/scroll-view/index.android.ts +190 -0
  219. package/src/components/scroll-view/index.ios.ts +79 -0
  220. package/src/components/scroll-view/index.ts +7 -0
  221. package/src/components/scroll-view/projection.ts +414 -0
  222. package/src/components/scroll-view/scroll-view-class-style.test.ts +134 -0
  223. package/src/components/scroll-view/scroll-view-projection.test.ts +194 -0
  224. package/src/components/scroll-view/shared.ts +844 -0
  225. package/src/components/scroll-view/sticky-header.ts +255 -0
  226. package/src/components/section-list/index.ts +445 -0
  227. package/src/components/switch/android-switch-class.test.ts +42 -0
  228. package/src/components/switch/index.android.ts +61 -0
  229. package/src/components/switch/index.ios.ts +60 -0
  230. package/src/components/switch/index.ts +4 -0
  231. package/src/components/switch/shared.ts +197 -0
  232. package/src/components/switch/switch.test.ts +92 -0
  233. package/src/components/text-input-class-style.test.ts +54 -0
  234. package/src/components/text-input.ts +531 -0
  235. package/src/components/touchable/index.ts +629 -0
  236. package/src/components/touchable/touchable.test.ts +102 -0
  237. package/src/components/touchable-native-feedback/index.ts +254 -0
  238. package/src/components/touchable-native-feedback/touchable-native-feedback.test.ts +49 -0
  239. package/src/components/virtualized-list/directives.ts +168 -0
  240. package/src/components/virtualized-list/index.ts +992 -0
  241. package/src/components/virtualized-list/virtualized-list-class-style.test.ts +76 -0
  242. package/src/components/virtualized-section-list/directives.ts +90 -0
  243. package/src/components/virtualized-section-list/index.ts +601 -0
  244. package/src/components/virtualized-section-list/virtualized-section-list-class-style.test.ts +60 -0
  245. package/src/components.ts +149 -0
  246. package/src/create-portal/create-portal.test.ts +90 -0
  247. package/src/create-portal/index.ts +74 -0
  248. package/src/create-tunnel/create-tunnel.test.ts +120 -0
  249. package/src/create-tunnel/index.ts +136 -0
  250. package/src/descriptor-to-angular/descriptor-outlet.test.ts +94 -0
  251. package/src/descriptor-to-angular/index.ts +190 -0
  252. package/src/host-instance/host-instance.test.ts +49 -0
  253. package/src/host-instance/index.ts +36 -0
  254. package/src/index.ts +261 -0
  255. package/src/modules/animated/animated-leaf-binder/animated-leaf-binder.test.ts +116 -0
  256. package/src/modules/animated/animated-leaf-binder/index.ts +101 -0
  257. package/src/modules/animated/animated-leaf-binder.test.ts +116 -0
  258. package/src/modules/animated/animated-leaf-binder.ts +101 -0
  259. package/src/modules/animated/animated-scroll-view.test.ts +102 -0
  260. package/src/modules/animated/create-animated-component.ts +365 -0
  261. package/src/modules/animated/index.ts +105 -0
  262. package/src/modules/app-registry/app-registry.test.ts +106 -0
  263. package/src/modules/app-registry/index.ts +60 -0
  264. package/src/modules/status-bar/index.ts +57 -0
  265. package/src/modules/status-bar/status-bar.test.ts +50 -0
  266. package/src/primitives/index.ts +119 -0
  267. package/src/primitives/shared.ts +190 -0
  268. package/src/render/index.ts +235 -0
  269. package/src/render/render.test.ts +147 -0
  270. package/src/renderer/index.ts +347 -0
  271. package/src/renderer/renderer.test.ts +203 -0
  272. package/src/services/color-scheme.service.ts +27 -0
  273. package/src/services/index.ts +2 -0
  274. package/src/services/services.test.ts +163 -0
  275. package/src/services/window-dimensions.service.ts +41 -0
  276. package/tsconfig.angular.base.json +30 -0
@@ -0,0 +1,20 @@
1
+ import { SwitchBase } from './shared';
2
+ import * as i0 from "@angular/core";
3
+ export type { ISwitchProps, ISwitchTrackColor } from './shared';
4
+ export declare class Switch extends SwitchBase {
5
+ private readonly elementRef;
6
+ protected readonly platform: {
7
+ snapBackCommand: string;
8
+ trackColorProps: (value: boolean, trackColor?: {
9
+ false?: string;
10
+ true?: string;
11
+ }) => {
12
+ trackColorForFalse: string | undefined;
13
+ trackColorForTrue: string | undefined;
14
+ trackTintColor: string | undefined;
15
+ };
16
+ };
17
+ get hostProps(): Record<string, unknown>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<Switch, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<Switch, "Switch", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "trackColor": { "alias": "trackColor"; "required": false; }; "thumbColor": { "alias": "thumbColor"; "required": false; }; "ios_backgroundColor": { "alias": "ios_backgroundColor"; "required": false; }; "style": { "alias": "style"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; }; "accessible": { "alias": "accessible"; "required": false; }; "role": { "alias": "role"; "required": false; }; "aria-label": { "alias": "aria-label"; "required": false; }; "aria-disabled": { "alias": "aria-disabled"; "required": false; }; "aria-checked": { "alias": "aria-checked"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; }, never, never, true, never>;
20
+ }
@@ -0,0 +1,70 @@
1
+ import { CUSTOM_ELEMENTS_SCHEMA, Component, ElementRef, inject } from '@angular/core';
2
+ import { anchorHostStyle, SwitchHost, SymbioteHostPropsDirective } from '../../primitives';
3
+ import { SwitchBase } from './shared';
4
+ import * as i0 from "@angular/core";
5
+ export class Switch extends SwitchBase {
6
+ // This component's OWN host — the non-painting anchor `class="..."` at the use site resolves
7
+ // onto (see anchorHostStyle's doc comment) — NOT the <symbiote-switch> leaf one level down.
8
+ elementRef = inject(ElementRef);
9
+ platform = {
10
+ snapBackCommand: 'setNativeValue',
11
+ trackColorProps: (value, trackColor) => ({
12
+ trackColorForFalse: trackColor?.false,
13
+ trackColorForTrue: trackColor?.true,
14
+ trackTintColor: value ? trackColor?.true : trackColor?.false,
15
+ }),
16
+ };
17
+ // The anchor's class-derived style goes first, then whatever SwitchBase already resolved
18
+ // (its own explicit `style` @Input plus the ios_backgroundColor fold), so an explicit [style]
19
+ // still beats the ambient class.
20
+ get hostProps() {
21
+ const props = super.hostProps;
22
+ return { ...props, style: [anchorHostStyle(this.elementRef), props['style']] };
23
+ }
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Switch, deps: null, target: i0.ɵɵFactoryTarget.Component });
25
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: Switch, isStandalone: true, selector: "Switch", inputs: { value: "value", disabled: "disabled", trackColor: "trackColor", thumbColor: "thumbColor", ios_backgroundColor: "ios_backgroundColor", style: "style", nativeID: "nativeID", testID: "testID", accessibilityLabel: "accessibilityLabel", accessibilityRole: "accessibilityRole", accessibilityState: "accessibilityState", accessibilityValue: "accessibilityValue", accessibilityHint: "accessibilityHint", accessible: "accessible", role: "role", "aria-label": "aria-label", "aria-disabled": "aria-disabled", "aria-checked": "aria-checked" }, outputs: { valueChange: "valueChange", change: "change" }, usesInheritance: true, ngImport: i0, template: `
26
+ <symbiote-switch
27
+ #nativeSwitch="symbioteHost"
28
+ [symbioteHostProps]="hostProps"
29
+ (change)="handleChange($event, nativeSwitch)"
30
+ />
31
+ `, isInline: true, dependencies: [{ kind: "component", type: SwitchHost, selector: "symbiote-switch" }, { kind: "directive", type: SymbioteHostPropsDirective, selector: "[symbioteHostProps]", inputs: ["symbioteHostProps"], exportAs: ["symbioteHost"] }] });
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Switch, decorators: [{
34
+ type: Component,
35
+ args: [{
36
+ selector: 'Switch',
37
+ standalone: true,
38
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
39
+ imports: [SwitchHost, SymbioteHostPropsDirective],
40
+ inputs: [
41
+ 'value',
42
+ 'disabled',
43
+ 'trackColor',
44
+ 'thumbColor',
45
+ 'ios_backgroundColor',
46
+ 'style',
47
+ 'nativeID',
48
+ 'testID',
49
+ 'accessibilityLabel',
50
+ 'accessibilityRole',
51
+ 'accessibilityState',
52
+ 'accessibilityValue',
53
+ 'accessibilityHint',
54
+ 'accessible',
55
+ 'role',
56
+ 'aria-label',
57
+ 'aria-disabled',
58
+ 'aria-checked',
59
+ ],
60
+ outputs: ['valueChange', 'change'],
61
+ template: `
62
+ <symbiote-switch
63
+ #nativeSwitch="symbioteHost"
64
+ [symbioteHostProps]="hostProps"
65
+ (change)="handleChange($event, nativeSwitch)"
66
+ />
67
+ `,
68
+ }]
69
+ }] });
70
+ //# sourceMappingURL=index.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../src/components/switch/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;;AAqCtC,MAAM,OAAO,MAAO,SAAQ,UAAU;IACpC,6FAA6F;IAC7F,4FAA4F;IAC3E,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAE9B,QAAQ,GAAG;QAC5B,eAAe,EAAE,gBAAgB;QACjC,eAAe,EAAE,CAAC,KAAc,EAAE,UAA8C,EAAE,EAAE,CAAC,CAAC;YACpF,kBAAkB,EAAE,UAAU,EAAE,KAAK;YACrC,iBAAiB,EAAE,UAAU,EAAE,IAAI;YACnC,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,EAAE,KAAK;SAC7D,CAAC;KACH,CAAC;IAEF,yFAAyF;IACzF,8FAA8F;IAC9F,iCAAiC;IACjC,IAAa,SAAS;QACpB,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC;QAC9B,OAAO,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;IACjF,CAAC;uGApBU,MAAM;2FAAN,MAAM,krBARP;;;;;;GAMT,4DA5BS,UAAU,4DAAE,0BAA0B;;2FA8BrC,MAAM;kBAlClB,SAAS;mBAAC;oBACT,QAAQ,EAAE,QAAQ;oBAClB,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,UAAU,EAAE,0BAA0B,CAAC;oBACjD,MAAM,EAAE;wBACN,OAAO;wBACP,UAAU;wBACV,YAAY;wBACZ,YAAY;wBACZ,qBAAqB;wBACrB,OAAO;wBACP,UAAU;wBACV,QAAQ;wBACR,oBAAoB;wBACpB,mBAAmB;wBACnB,oBAAoB;wBACpB,oBAAoB;wBACpB,mBAAmB;wBACnB,YAAY;wBACZ,MAAM;wBACN,YAAY;wBACZ,eAAe;wBACf,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC;oBAClC,QAAQ,EAAE;;;;;;GAMT;iBACF"}
@@ -0,0 +1 @@
1
+ export * from './index.ios';
@@ -0,0 +1,19 @@
1
+ import { SwitchBase } from './shared';
2
+ import * as i0 from "@angular/core";
3
+ export type { ISwitchProps, ISwitchTrackColor } from './shared';
4
+ export declare class Switch extends SwitchBase {
5
+ private readonly elementRef;
6
+ protected readonly platform: {
7
+ snapBackCommand: string;
8
+ trackColorProps: (_value: boolean, trackColor?: {
9
+ false?: string;
10
+ true?: string;
11
+ }) => {
12
+ onTintColor: string | undefined;
13
+ tintColor: string | undefined;
14
+ };
15
+ };
16
+ get hostProps(): Record<string, unknown>;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<Switch, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<Switch, "Switch", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "trackColor": { "alias": "trackColor"; "required": false; }; "thumbColor": { "alias": "thumbColor"; "required": false; }; "ios_backgroundColor": { "alias": "ios_backgroundColor"; "required": false; }; "style": { "alias": "style"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; }; "accessible": { "alias": "accessible"; "required": false; }; "role": { "alias": "role"; "required": false; }; "aria-label": { "alias": "aria-label"; "required": false; }; "aria-disabled": { "alias": "aria-disabled"; "required": false; }; "aria-checked": { "alias": "aria-checked"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; }, never, never, true, never>;
19
+ }
@@ -0,0 +1,69 @@
1
+ import { CUSTOM_ELEMENTS_SCHEMA, Component, ElementRef, inject } from '@angular/core';
2
+ import { anchorHostStyle, SwitchHost, SymbioteHostPropsDirective } from '../../primitives';
3
+ import { SwitchBase } from './shared';
4
+ import * as i0 from "@angular/core";
5
+ export class Switch extends SwitchBase {
6
+ // This component's OWN host — the non-painting anchor `class="..."` at the use site resolves
7
+ // onto (see anchorHostStyle's doc comment) — NOT the <symbiote-switch> leaf one level down.
8
+ elementRef = inject(ElementRef);
9
+ platform = {
10
+ snapBackCommand: 'setValue',
11
+ trackColorProps: (_value, trackColor) => ({
12
+ onTintColor: trackColor?.true,
13
+ tintColor: trackColor?.false,
14
+ }),
15
+ };
16
+ // The anchor's class-derived style goes first, then whatever SwitchBase already resolved
17
+ // (its own explicit `style` @Input plus the ios_backgroundColor fold), so an explicit [style]
18
+ // still beats the ambient class.
19
+ get hostProps() {
20
+ const props = super.hostProps;
21
+ return { ...props, style: [anchorHostStyle(this.elementRef), props['style']] };
22
+ }
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Switch, deps: null, target: i0.ɵɵFactoryTarget.Component });
24
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: Switch, isStandalone: true, selector: "Switch", inputs: { value: "value", disabled: "disabled", trackColor: "trackColor", thumbColor: "thumbColor", ios_backgroundColor: "ios_backgroundColor", style: "style", nativeID: "nativeID", testID: "testID", accessibilityLabel: "accessibilityLabel", accessibilityRole: "accessibilityRole", accessibilityState: "accessibilityState", accessibilityValue: "accessibilityValue", accessibilityHint: "accessibilityHint", accessible: "accessible", role: "role", "aria-label": "aria-label", "aria-disabled": "aria-disabled", "aria-checked": "aria-checked" }, outputs: { valueChange: "valueChange", change: "change" }, usesInheritance: true, ngImport: i0, template: `
25
+ <symbiote-switch
26
+ #nativeSwitch="symbioteHost"
27
+ [symbioteHostProps]="hostProps"
28
+ (change)="handleChange($event, nativeSwitch)"
29
+ />
30
+ `, isInline: true, dependencies: [{ kind: "component", type: SwitchHost, selector: "symbiote-switch" }, { kind: "directive", type: SymbioteHostPropsDirective, selector: "[symbioteHostProps]", inputs: ["symbioteHostProps"], exportAs: ["symbioteHost"] }] });
31
+ }
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Switch, decorators: [{
33
+ type: Component,
34
+ args: [{
35
+ selector: 'Switch',
36
+ standalone: true,
37
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
38
+ imports: [SwitchHost, SymbioteHostPropsDirective],
39
+ inputs: [
40
+ 'value',
41
+ 'disabled',
42
+ 'trackColor',
43
+ 'thumbColor',
44
+ 'ios_backgroundColor',
45
+ 'style',
46
+ 'nativeID',
47
+ 'testID',
48
+ 'accessibilityLabel',
49
+ 'accessibilityRole',
50
+ 'accessibilityState',
51
+ 'accessibilityValue',
52
+ 'accessibilityHint',
53
+ 'accessible',
54
+ 'role',
55
+ 'aria-label',
56
+ 'aria-disabled',
57
+ 'aria-checked',
58
+ ],
59
+ outputs: ['valueChange', 'change'],
60
+ template: `
61
+ <symbiote-switch
62
+ #nativeSwitch="symbioteHost"
63
+ [symbioteHostProps]="hostProps"
64
+ (change)="handleChange($event, nativeSwitch)"
65
+ />
66
+ `,
67
+ }]
68
+ }] });
69
+ //# sourceMappingURL=index.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../src/components/switch/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;;AAqCtC,MAAM,OAAO,MAAO,SAAQ,UAAU;IACpC,6FAA6F;IAC7F,4FAA4F;IAC3E,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAE9B,QAAQ,GAAG;QAC5B,eAAe,EAAE,UAAU;QAC3B,eAAe,EAAE,CAAC,MAAe,EAAE,UAA8C,EAAE,EAAE,CAAC,CAAC;YACrF,WAAW,EAAE,UAAU,EAAE,IAAI;YAC7B,SAAS,EAAE,UAAU,EAAE,KAAK;SAC7B,CAAC;KACH,CAAC;IAEF,yFAAyF;IACzF,8FAA8F;IAC9F,iCAAiC;IACjC,IAAa,SAAS;QACpB,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC;QAC9B,OAAO,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;IACjF,CAAC;uGAnBU,MAAM;2FAAN,MAAM,krBARP;;;;;;GAMT,4DA5BS,UAAU,4DAAE,0BAA0B;;2FA8BrC,MAAM;kBAlClB,SAAS;mBAAC;oBACT,QAAQ,EAAE,QAAQ;oBAClB,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,UAAU,EAAE,0BAA0B,CAAC;oBACjD,MAAM,EAAE;wBACN,OAAO;wBACP,UAAU;wBACV,YAAY;wBACZ,YAAY;wBACZ,qBAAqB;wBACrB,OAAO;wBACP,UAAU;wBACV,QAAQ;wBACR,oBAAoB;wBACpB,mBAAmB;wBACnB,oBAAoB;wBACpB,oBAAoB;wBACpB,mBAAmB;wBACnB,YAAY;wBACZ,MAAM;wBACN,YAAY;wBACZ,eAAe;wBACf,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC;oBAClC,QAAQ,EAAE;;;;;;GAMT;iBACF"}
@@ -0,0 +1,4 @@
1
+ // Base/default Switch. Re-exports the iOS build; Metro picks index.ios.ts / index.android.ts
2
+ // in platform bundles. The Angular lifecycle reuses the shared Switch reducer + render fold.
3
+ export * from './index.ios';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/switch/index.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,6FAA6F;AAE7F,cAAc,aAAa,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import type { ISwitchPlatform, ISwitchProps, ISwitchTrackColor } from '@symbiote-native/components';
3
+ import { type ISymbioteEvent, type IStyleProp, type IViewStyle } from '@symbiote-native/engine';
4
+ import * as i0 from "@angular/core";
5
+ export type { ISwitchProps, ISwitchTrackColor } from '@symbiote-native/components';
6
+ export type ISwitchInputs = Pick<ISwitchProps, 'value' | 'disabled' | 'trackColor' | 'thumbColor' | 'ios_backgroundColor' | 'style' | 'nativeID' | 'testID' | 'accessibilityLabel' | 'accessibilityRole' | 'accessibilityState' | 'accessibilityValue' | 'accessibilityHint' | 'accessible' | 'role' | 'aria-label' | 'aria-disabled' | 'aria-checked'>;
7
+ type ISwitchHostPlatform = ISwitchPlatform & {
8
+ snapBackCommand: string;
9
+ };
10
+ type IHostProps = Record<string, unknown>;
11
+ export declare abstract class SwitchBase implements ISwitchInputs {
12
+ readonly valueChange: EventEmitter<boolean>;
13
+ readonly change: EventEmitter<ISymbioteEvent>;
14
+ value: boolean | undefined;
15
+ disabled: boolean | undefined;
16
+ trackColor: ISwitchTrackColor | undefined;
17
+ thumbColor: string | undefined;
18
+ ios_backgroundColor: string | undefined;
19
+ style: IStyleProp<IViewStyle> | undefined;
20
+ nativeID: string | undefined;
21
+ testID: string | undefined;
22
+ accessibilityLabel: string | undefined;
23
+ accessibilityRole: ISwitchInputs['accessibilityRole'];
24
+ accessibilityState: ISwitchInputs['accessibilityState'];
25
+ accessibilityValue: ISwitchInputs['accessibilityValue'];
26
+ accessibilityHint: string | undefined;
27
+ accessible: boolean | undefined;
28
+ role: ISwitchInputs['role'];
29
+ 'aria-label': string | undefined;
30
+ 'aria-disabled': boolean | undefined;
31
+ 'aria-checked': boolean | 'mixed' | undefined;
32
+ protected abstract readonly platform: ISwitchHostPlatform;
33
+ private switchState;
34
+ get hostProps(): IHostProps;
35
+ handleChange(event: unknown, node: unknown): void;
36
+ private snapBackIfNeeded;
37
+ private inputProps;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<SwitchBase, never>;
39
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SwitchBase, never, never, {}, { "valueChange": "valueChange"; "change": "change"; }, never, never, true, never>;
40
+ }
@@ -0,0 +1,127 @@
1
+ import { Directive, EventEmitter, Output } from '@angular/core';
2
+ import { renderSwitch, resolveAccessibilityProps } from '@symbiote-native/components';
3
+ import { createInitialSwitchState, shouldSnapBack, switchReducer, valueFromChange, } from '@symbiote-native/components';
4
+ import { dispatchViewCommand, dlog, isSymbioteNode, whenCommitted, } from '@symbiote-native/engine';
5
+ import * as i0 from "@angular/core";
6
+ function readSwitchNode(value) {
7
+ if (isSymbioteNode(value))
8
+ return value;
9
+ if (typeof value === 'object' &&
10
+ value !== null &&
11
+ 'node' in value &&
12
+ isSymbioteNode(value.node)) {
13
+ return value.node;
14
+ }
15
+ return null;
16
+ }
17
+ function isSwitchEvent(event) {
18
+ return (typeof event === 'object' &&
19
+ event !== null &&
20
+ 'nativeEvent' in event &&
21
+ typeof event.nativeEvent === 'object' &&
22
+ event.nativeEvent !== null);
23
+ }
24
+ // @Directive() (no selector) is the Angular-sanctioned decorator for an abstract base whose
25
+ // concrete subclasses are real @Components — ngc's AOT build (NG2007) requires it the moment the
26
+ // base itself carries decorated members (@Output() here), mirroring ScrollViewBase.
27
+ export class SwitchBase {
28
+ // The value/change lifecycle as real Angular events: `(valueChange)="onToggle($event)"`, not
29
+ // `[onValueChange]="onToggle"` — mirrors Pressable's press/hover @Output() conversion. Unlike
30
+ // Pressable's createPressHandlers, handleChange() below calls `.emit()` unconditionally: it needs
31
+ // no "was this bound" adapter because EventEmitter.emit() is already a safe no-op with no subscribers.
32
+ valueChange = new EventEmitter();
33
+ change = new EventEmitter();
34
+ value;
35
+ disabled;
36
+ trackColor;
37
+ thumbColor;
38
+ ios_backgroundColor;
39
+ style;
40
+ nativeID;
41
+ testID;
42
+ accessibilityLabel;
43
+ accessibilityRole;
44
+ accessibilityState;
45
+ accessibilityValue;
46
+ accessibilityHint;
47
+ accessible;
48
+ role;
49
+ 'aria-label';
50
+ 'aria-disabled';
51
+ 'aria-checked';
52
+ switchState = createInitialSwitchState();
53
+ get hostProps() {
54
+ const props = resolveAccessibilityProps(this.inputProps());
55
+ const { value, disabled, trackColor, thumbColor, ios_backgroundColor, style, onValueChange: _onValueChange, ...passthrough } = props;
56
+ return renderSwitch({
57
+ value: value === true,
58
+ disabled,
59
+ trackColor,
60
+ thumbColor,
61
+ ios_backgroundColor,
62
+ style,
63
+ passthrough,
64
+ }, this.platform).props;
65
+ }
66
+ handleChange(event, node) {
67
+ if (!isSwitchEvent(event))
68
+ return;
69
+ this.change.emit(event);
70
+ const next = valueFromChange(event);
71
+ dlog(`Switch onChange value=${String(next)} eventCount=${String(event.nativeEvent.eventCount)}`);
72
+ if (next === undefined)
73
+ return;
74
+ this.valueChange.emit(next);
75
+ this.switchState = switchReducer(this.switchState, { type: 'native-reported', value: next });
76
+ const hostNode = readSwitchNode(node);
77
+ if (hostNode === null)
78
+ return;
79
+ queueMicrotask(() => this.snapBackIfNeeded(hostNode));
80
+ }
81
+ snapBackIfNeeded(node) {
82
+ const fabricValue = this.value === true;
83
+ if (!shouldSnapBack(this.switchState, fabricValue)) {
84
+ dlog(`Switch snap-back no-op reported=${String(this.switchState.lastNativeReport)} value=${fabricValue}`);
85
+ return;
86
+ }
87
+ dlog(`Switch ${this.platform.snapBackCommand} snap-back reported=${String(this.switchState.lastNativeReport)} value=${fabricValue}`);
88
+ whenCommitted(node, () => {
89
+ dispatchViewCommand(node, this.platform.snapBackCommand, [fabricValue]);
90
+ });
91
+ }
92
+ inputProps() {
93
+ const props = {
94
+ value: this.value,
95
+ disabled: this.disabled,
96
+ trackColor: this.trackColor,
97
+ thumbColor: this.thumbColor,
98
+ ios_backgroundColor: this.ios_backgroundColor,
99
+ style: this.style,
100
+ };
101
+ return {
102
+ ...props,
103
+ nativeID: this.nativeID,
104
+ testID: this.testID,
105
+ accessibilityLabel: this.accessibilityLabel,
106
+ accessibilityRole: this.accessibilityRole,
107
+ accessibilityState: this.accessibilityState,
108
+ accessibilityValue: this.accessibilityValue,
109
+ accessibilityHint: this.accessibilityHint,
110
+ accessible: this.accessible,
111
+ role: this.role,
112
+ 'aria-label': this['aria-label'],
113
+ 'aria-disabled': this['aria-disabled'],
114
+ 'aria-checked': this['aria-checked'],
115
+ };
116
+ }
117
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SwitchBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
118
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: SwitchBase, isStandalone: true, outputs: { valueChange: "valueChange", change: "change" }, ngImport: i0 });
119
+ }
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SwitchBase, decorators: [{
121
+ type: Directive
122
+ }], propDecorators: { valueChange: [{
123
+ type: Output
124
+ }], change: [{
125
+ type: Output
126
+ }] } });
127
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/components/switch/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAOtF,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,aAAa,EACb,eAAe,GAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,IAAI,EACJ,cAAc,EACd,aAAa,GAKd,MAAM,yBAAyB,CAAC;;AA8BjC,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,cAAc,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,MAAM,IAAI,KAAK;QACf,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,EAC1B,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC;IACpB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,aAAa,IAAI,KAAK;QACtB,OAAO,KAAK,CAAC,WAAW,KAAK,QAAQ;QACrC,KAAK,CAAC,WAAW,KAAK,IAAI,CAC3B,CAAC;AACJ,CAAC;AAED,4FAA4F;AAC5F,iGAAiG;AACjG,oFAAoF;AAEpF,MAAM,OAAgB,UAAU;IAC9B,6FAA6F;IAC7F,8FAA8F;IAC9F,kGAAkG;IAClG,uGAAuG;IACpF,WAAW,GAAG,IAAI,YAAY,EAAW,CAAC;IAC1C,MAAM,GAAG,IAAI,YAAY,EAAkB,CAAC;IAC/D,KAAK,CAAsB;IAC3B,QAAQ,CAAsB;IAC9B,UAAU,CAAgC;IAC1C,UAAU,CAAqB;IAC/B,mBAAmB,CAAqB;IACxC,KAAK,CAAqC;IAC1C,QAAQ,CAAqB;IAC7B,MAAM,CAAqB;IAC3B,kBAAkB,CAAqB;IACvC,iBAAiB,CAAqC;IACtD,kBAAkB,CAAsC;IACxD,kBAAkB,CAAsC;IACxD,iBAAiB,CAAqB;IACtC,UAAU,CAAsB;IAChC,IAAI,CAAwB;IAC5B,YAAY,CAAqB;IACjC,eAAe,CAAsB;IACrC,cAAc,CAAgC;IAGtC,WAAW,GAAiB,wBAAwB,EAAE,CAAC;IAE/D,IAAI,SAAS;QACX,MAAM,KAAK,GAAG,yBAAyB,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAC3D,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,KAAK,EACL,aAAa,EAAE,cAAc,EAC7B,GAAG,WAAW,EACf,GAAG,KAAK,CAAC;QAEV,OAAO,YAAY,CACjB;YACE,KAAK,EAAE,KAAK,KAAK,IAAI;YACrB,QAAQ;YACR,UAAU;YACV,UAAU;YACV,mBAAmB;YACnB,KAAK;YACL,WAAW;SACZ,EACD,IAAI,CAAC,QAAQ,CACd,CAAC,KAAK,CAAC;IACV,CAAC;IAED,YAAY,CAAC,KAAc,EAAE,IAAa;QACxC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;YAAE,OAAO;QAClC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,MAAM,IAAI,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;QACpC,IAAI,CACF,yBAAyB,MAAM,CAAC,IAAI,CAAC,eAAe,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAC3F,CAAC;QACF,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO;QAE/B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAE7F,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,QAAQ,KAAK,IAAI;YAAE,OAAO;QAC9B,cAAc,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxD,CAAC;IAEO,gBAAgB,CAAC,IAAmB;QAC1C,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC;QACxC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,CAAC;YACnD,IAAI,CACF,mCAAmC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,WAAW,EAAE,CACpG,CAAC;YACF,OAAO;QACT,CAAC;QAED,IAAI,CACF,UAAU,IAAI,CAAC,QAAQ,CAAC,eAAe,uBAAuB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,WAAW,EAAE,CAC/H,CAAC;QACF,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE;YACvB,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,UAAU;QAChB,MAAM,KAAK,GAA0B;YACnC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;QAEF,OAAO;YACL,GAAG,KAAK;YACR,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;YAChC,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC;YACtC,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC;SACrC,CAAC;IACJ,CAAC;uGAnHmB,UAAU;2FAAV,UAAU;;2FAAV,UAAU;kBAD/B,SAAS;;sBAMP,MAAM;;sBACN,MAAM"}
@@ -0,0 +1,153 @@
1
+ import { EventEmitter, type AfterViewInit, type OnChanges, type OnDestroy, type SimpleChanges } from '@angular/core';
2
+ import { type IAccessibilityProps, type IAccessibilityStateValue, type IAriaProps, type IEnterKeyHint, type IInputMode, type ISubmitBehavior, type ITextInputEventHandler, type ITextInputHandle, type ITextInputSelection } from '@symbiote-native/components';
3
+ import { type IStyleProp, type ISymbioteEvent, type ITextStyle } from '@symbiote-native/engine';
4
+ import * as i0 from "@angular/core";
5
+ export type { ITextInputHandle, ITextInputSelection, IInputMode, IEnterKeyHint, ISubmitBehavior };
6
+ export interface IAngularTextInputProps extends IAccessibilityProps, IAriaProps {
7
+ value?: string;
8
+ defaultValue?: string;
9
+ placeholder?: string;
10
+ placeholderTextColor?: string;
11
+ editable?: boolean;
12
+ keyboardType?: string;
13
+ secureTextEntry?: boolean;
14
+ maxLength?: number;
15
+ multiline?: boolean;
16
+ selection?: ITextInputSelection;
17
+ autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
18
+ autoCorrect?: boolean;
19
+ autoComplete?: string;
20
+ textContentType?: string;
21
+ autoFocus?: boolean;
22
+ showSoftInputOnFocus?: boolean;
23
+ returnKeyType?: string;
24
+ selectTextOnFocus?: boolean;
25
+ scrollEnabled?: boolean;
26
+ numberOfLines?: number;
27
+ textAlign?: 'left' | 'center' | 'right';
28
+ blurOnSubmit?: boolean;
29
+ inputMode?: IInputMode;
30
+ enterKeyHint?: IEnterKeyHint;
31
+ readOnly?: boolean;
32
+ submitBehavior?: ISubmitBehavior;
33
+ cursorColor?: string;
34
+ selectionColor?: string;
35
+ selectionHandleColor?: string;
36
+ underlineColorAndroid?: string;
37
+ inputAccessoryViewID?: string;
38
+ style?: IStyleProp<ITextStyle>;
39
+ onValueChange?: (text: string) => void;
40
+ onChange?: ITextInputEventHandler;
41
+ onFocus?: ITextInputEventHandler;
42
+ onBlur?: ITextInputEventHandler;
43
+ onEndEditing?: ITextInputEventHandler;
44
+ onSubmitEditing?: ITextInputEventHandler;
45
+ onKeyPress?: ITextInputEventHandler;
46
+ onSelectionChange?: ITextInputEventHandler;
47
+ onContentSizeChange?: ITextInputEventHandler;
48
+ }
49
+ export type IAngularTextInputInputs = Omit<IAngularTextInputProps, 'onValueChange' | 'onChange' | 'onFocus' | 'onBlur' | 'onEndEditing' | 'onSubmitEditing' | 'onKeyPress' | 'onSelectionChange' | 'onContentSizeChange' | 'onAccessibilityAction' | 'onAccessibilityTap' | 'onMagicTap' | 'onAccessibilityEscape'>;
50
+ export declare class TextInput implements IAngularTextInputInputs, ITextInputHandle, OnChanges, AfterViewInit, OnDestroy {
51
+ value?: string;
52
+ defaultValue?: string;
53
+ placeholder?: string;
54
+ placeholderTextColor?: string;
55
+ editable?: boolean;
56
+ keyboardType?: string;
57
+ secureTextEntry?: boolean;
58
+ maxLength?: number;
59
+ multiline?: boolean;
60
+ selection?: ITextInputSelection;
61
+ autoCapitalize?: IAngularTextInputProps['autoCapitalize'];
62
+ autoCorrect?: boolean;
63
+ autoComplete?: string;
64
+ textContentType?: string;
65
+ autoFocus?: boolean;
66
+ showSoftInputOnFocus?: boolean;
67
+ returnKeyType?: string;
68
+ selectTextOnFocus?: boolean;
69
+ scrollEnabled?: boolean;
70
+ numberOfLines?: number;
71
+ textAlign?: IAngularTextInputProps['textAlign'];
72
+ blurOnSubmit?: boolean;
73
+ inputMode?: IInputMode;
74
+ enterKeyHint?: IEnterKeyHint;
75
+ readOnly?: boolean;
76
+ submitBehavior?: ISubmitBehavior;
77
+ cursorColor?: string;
78
+ selectionColor?: string;
79
+ selectionHandleColor?: string;
80
+ underlineColorAndroid?: string;
81
+ inputAccessoryViewID?: string;
82
+ style?: IStyleProp<ITextStyle>;
83
+ testID?: string;
84
+ nativeID?: string;
85
+ readonly valueChange: EventEmitter<string>;
86
+ readonly change: EventEmitter<ISymbioteEvent>;
87
+ readonly focusEvent: EventEmitter<ISymbioteEvent>;
88
+ readonly blurEvent: EventEmitter<ISymbioteEvent>;
89
+ readonly endEditing: EventEmitter<ISymbioteEvent>;
90
+ readonly submitEditing: EventEmitter<ISymbioteEvent>;
91
+ readonly keyPress: EventEmitter<ISymbioteEvent>;
92
+ readonly selectionChange: EventEmitter<ISymbioteEvent>;
93
+ readonly contentSizeChange: EventEmitter<ISymbioteEvent>;
94
+ readonly accessibilityAction: EventEmitter<ISymbioteEvent>;
95
+ readonly accessibilityTap: EventEmitter<ISymbioteEvent>;
96
+ readonly magicTap: EventEmitter<ISymbioteEvent>;
97
+ readonly accessibilityEscape: EventEmitter<ISymbioteEvent>;
98
+ accessible?: boolean;
99
+ accessibilityLabel?: string;
100
+ accessibilityHint?: string;
101
+ accessibilityRole?: IAccessibilityProps['accessibilityRole'];
102
+ accessibilityState?: IAccessibilityStateValue;
103
+ accessibilityValue?: IAccessibilityProps['accessibilityValue'];
104
+ accessibilityActions?: IAccessibilityProps['accessibilityActions'];
105
+ accessibilityLabelledBy?: string | string[];
106
+ importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
107
+ accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
108
+ screenReaderFocusable?: boolean;
109
+ accessibilityViewIsModal?: boolean;
110
+ accessibilityElementsHidden?: boolean;
111
+ accessibilityIgnoresInvertColors?: boolean;
112
+ accessibilityLanguage?: string;
113
+ accessibilityRespondsToUserInteraction?: boolean;
114
+ accessibilityShowsLargeContentViewer?: boolean;
115
+ accessibilityLargeContentTitle?: string;
116
+ role?: IAriaProps['role'];
117
+ ariaLabel?: string;
118
+ ariaLabelledBy?: string;
119
+ ariaLive?: IAriaProps['aria-live'];
120
+ ariaHidden?: boolean;
121
+ ariaBusy?: boolean;
122
+ ariaChecked?: boolean | 'mixed';
123
+ ariaDisabled?: boolean;
124
+ ariaExpanded?: boolean;
125
+ ariaSelected?: boolean;
126
+ private hostRef?;
127
+ private readonly elementRef;
128
+ private mostRecentEventCount;
129
+ private lastNativeText;
130
+ private focused;
131
+ private cancelAutoFocus?;
132
+ get isMultiline(): boolean;
133
+ get hostProps(): Record<string, unknown>;
134
+ ngOnChanges(changes: SimpleChanges): void;
135
+ ngAfterViewInit(): void;
136
+ ngOnDestroy(): void;
137
+ handleChange(event: unknown): void;
138
+ handleFocus(event: unknown): void;
139
+ handleBlur(event: unknown): void;
140
+ emit(emitter: EventEmitter<ISymbioteEvent>, event: unknown): void;
141
+ focus(): void;
142
+ blur(): void;
143
+ clear(): void;
144
+ isFocused(): boolean;
145
+ setSelection(start: number, end: number): void;
146
+ private commitControlledValue;
147
+ private buildPassthrough;
148
+ private get foldedNativeProps();
149
+ private get foldedAccessibility();
150
+ private get hostNode();
151
+ static ɵfac: i0.ɵɵFactoryDeclaration<TextInput, never>;
152
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextInput, "TextInput", never, { "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "placeholderTextColor": { "alias": "placeholderTextColor"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "keyboardType": { "alias": "keyboardType"; "required": false; }; "secureTextEntry": { "alias": "secureTextEntry"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "autoCapitalize": { "alias": "autoCapitalize"; "required": false; }; "autoCorrect": { "alias": "autoCorrect"; "required": false; }; "autoComplete": { "alias": "autoComplete"; "required": false; }; "textContentType": { "alias": "textContentType"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "showSoftInputOnFocus": { "alias": "showSoftInputOnFocus"; "required": false; }; "returnKeyType": { "alias": "returnKeyType"; "required": false; }; "selectTextOnFocus": { "alias": "selectTextOnFocus"; "required": false; }; "scrollEnabled": { "alias": "scrollEnabled"; "required": false; }; "numberOfLines": { "alias": "numberOfLines"; "required": false; }; "textAlign": { "alias": "textAlign"; "required": false; }; "blurOnSubmit": { "alias": "blurOnSubmit"; "required": false; }; "inputMode": { "alias": "inputMode"; "required": false; }; "enterKeyHint": { "alias": "enterKeyHint"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "submitBehavior": { "alias": "submitBehavior"; "required": false; }; "cursorColor": { "alias": "cursorColor"; "required": false; }; "selectionColor": { "alias": "selectionColor"; "required": false; }; "selectionHandleColor": { "alias": "selectionHandleColor"; "required": false; }; "underlineColorAndroid": { "alias": "underlineColorAndroid"; "required": false; }; "inputAccessoryViewID": { "alias": "inputAccessoryViewID"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; "accessible": { "alias": "accessible"; "required": false; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; }; "accessibilityActions": { "alias": "accessibilityActions"; "required": false; }; "accessibilityLabelledBy": { "alias": "accessibilityLabelledBy"; "required": false; }; "importantForAccessibility": { "alias": "importantForAccessibility"; "required": false; }; "accessibilityLiveRegion": { "alias": "accessibilityLiveRegion"; "required": false; }; "screenReaderFocusable": { "alias": "screenReaderFocusable"; "required": false; }; "accessibilityViewIsModal": { "alias": "accessibilityViewIsModal"; "required": false; }; "accessibilityElementsHidden": { "alias": "accessibilityElementsHidden"; "required": false; }; "accessibilityIgnoresInvertColors": { "alias": "accessibilityIgnoresInvertColors"; "required": false; }; "accessibilityLanguage": { "alias": "accessibilityLanguage"; "required": false; }; "accessibilityRespondsToUserInteraction": { "alias": "accessibilityRespondsToUserInteraction"; "required": false; }; "accessibilityShowsLargeContentViewer": { "alias": "accessibilityShowsLargeContentViewer"; "required": false; }; "accessibilityLargeContentTitle": { "alias": "accessibilityLargeContentTitle"; "required": false; }; "role": { "alias": "role"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; }; "ariaLive": { "alias": "aria-live"; "required": false; }; "ariaHidden": { "alias": "aria-hidden"; "required": false; }; "ariaBusy": { "alias": "aria-busy"; "required": false; }; "ariaChecked": { "alias": "aria-checked"; "required": false; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; }; "ariaExpanded": { "alias": "aria-expanded"; "required": false; }; "ariaSelected": { "alias": "aria-selected"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; "focusEvent": "focus"; "blurEvent": "blur"; "endEditing": "endEditing"; "submitEditing": "submitEditing"; "keyPress": "keyPress"; "selectionChange": "selectionChange"; "contentSizeChange": "contentSizeChange"; "accessibilityAction": "accessibilityAction"; "accessibilityTap": "accessibilityTap"; "magicTap": "magicTap"; "accessibilityEscape": "accessibilityEscape"; }, never, never, true, never>;
153
+ }