@symbiote-native/angular 3.2.0 → 3.3.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/babel-register-composed.cjs +1 -0
- package/build/angular/components/checkbox-props.d.ts +2 -0
- package/build/angular/components/checkbox-props.js +2 -0
- package/build/angular/components/checkbox-props.js.map +1 -0
- package/build/angular/components.d.ts +1 -0
- package/build/angular/components.js.map +1 -1
- package/build/angular/descriptor-to-angular/descriptor-host.d.ts +8 -0
- package/build/angular/descriptor-to-angular/descriptor-host.js +38 -0
- package/build/angular/descriptor-to-angular/descriptor-host.js.map +1 -0
- package/build/angular/descriptor-to-angular/index.d.ts +1 -0
- package/build/angular/descriptor-to-angular/index.js +4 -0
- package/build/angular/descriptor-to-angular/index.js.map +1 -1
- package/build/angular/element-base.d.ts +153 -0
- package/build/angular/element-base.js +272 -0
- package/build/angular/element-base.js.map +1 -0
- package/build/angular/elements-controls.d.ts +165 -0
- package/build/angular/elements-controls.js +382 -0
- package/build/angular/elements-controls.js.map +1 -0
- package/build/angular/elements-layout.d.ts +122 -0
- package/build/angular/elements-layout.js +242 -0
- package/build/angular/elements-layout.js.map +1 -0
- package/build/angular/elements-press.d.ts +96 -0
- package/build/angular/elements-press.js +227 -0
- package/build/angular/elements-press.js.map +1 -0
- package/build/angular/elements.d.ts +6 -516
- package/build/angular/elements.js +8 -1091
- package/build/angular/elements.js.map +1 -1
- package/build/angular/host-instance/index.d.ts +2 -0
- package/build/angular/host-instance/index.js +4 -4
- package/build/angular/host-instance/index.js.map +1 -1
- package/build/angular/index.d.ts +5 -4
- package/build/angular/index.js +4 -3
- package/build/angular/index.js.map +1 -1
- package/build/angular/native-view-base.d.ts +10 -2
- package/build/angular/native-view-base.js +23 -2
- package/build/angular/native-view-base.js.map +1 -1
- package/build/angular/services/index.d.ts +1 -0
- package/build/angular/services/index.js +1 -0
- package/build/angular/services/index.js.map +1 -1
- package/build/angular/services/inject-event.d.ts +6 -0
- package/build/angular/services/inject-event.js +24 -0
- package/build/angular/services/inject-event.js.map +1 -0
- package/package.json +6 -6
- package/src/components/checkbox-props.ts +12 -0
- package/src/components.ts +1 -0
- package/src/descriptor-to-angular/descriptor-host.ts +27 -0
- package/src/descriptor-to-angular/index.ts +5 -0
- package/src/element-base.ts +272 -0
- package/src/elements-controls.ts +282 -0
- package/src/elements-layout.ts +141 -0
- package/src/elements-press.ts +145 -0
- package/src/elements.ts +73 -788
- package/src/host-instance/index.ts +4 -4
- package/src/index.ts +6 -1
- package/src/native-view-base.ts +37 -2
- package/src/services/index.ts +1 -0
- package/src/services/inject-event.ts +52 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { Directive, Input } from '@angular/core';
|
|
2
|
+
import type { IImageProps } from '@symbiote-native/components';
|
|
3
|
+
import type { IAngularImageBackgroundProps } from './components/image-background-props';
|
|
4
|
+
import type { IAngularScrollViewProps } from './components/scroll-view-props';
|
|
5
|
+
import { SymbioteElement } from './element-base';
|
|
6
|
+
|
|
7
|
+
@Directive({ selector: 'image, symbiote-image', standalone: true })
|
|
8
|
+
export class ImageElement extends SymbioteElement {
|
|
9
|
+
@Input() source?: IImageProps['source'];
|
|
10
|
+
@Input() src?: IImageProps['src'];
|
|
11
|
+
@Input() srcSet?: IImageProps['srcSet'];
|
|
12
|
+
@Input() alt?: IImageProps['alt'];
|
|
13
|
+
@Input() width?: IImageProps['width'];
|
|
14
|
+
@Input() height?: IImageProps['height'];
|
|
15
|
+
@Input() resizeMode?: IImageProps['resizeMode'];
|
|
16
|
+
@Input() resizeMethod?: IImageProps['resizeMethod'];
|
|
17
|
+
@Input() defaultSource?: IImageProps['defaultSource'];
|
|
18
|
+
@Input() loadingIndicatorSource?: IImageProps['loadingIndicatorSource'];
|
|
19
|
+
@Input() blurRadius?: IImageProps['blurRadius'];
|
|
20
|
+
@Input() capInsets?: IImageProps['capInsets'];
|
|
21
|
+
@Input() crossOrigin?: IImageProps['crossOrigin'];
|
|
22
|
+
@Input() referrerPolicy?: IImageProps['referrerPolicy'];
|
|
23
|
+
@Input() fadeDuration?: IImageProps['fadeDuration'];
|
|
24
|
+
@Input()
|
|
25
|
+
progressiveRenderingEnabled?: IImageProps['progressiveRenderingEnabled'];
|
|
26
|
+
@Input() tintColor?: IImageProps['tintColor'];
|
|
27
|
+
@Input() onLoad?: IImageProps['onLoad'];
|
|
28
|
+
@Input() onLoadStart?: IImageProps['onLoadStart'];
|
|
29
|
+
@Input() onLoadEnd?: IImageProps['onLoadEnd'];
|
|
30
|
+
@Input() onError?: IImageProps['onError'];
|
|
31
|
+
@Input() onProgress?: IImageProps['onProgress'];
|
|
32
|
+
@Input() onPartialLoad?: IImageProps['onPartialLoad'];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// The box, not the image. Every Image prop below rides the engine's `slotPropsExcept` redirect onto
|
|
36
|
+
// the absolutely-filled image the behavior builds, exactly as RN's own `...props` spread does
|
|
37
|
+
// (ImageBackground.js:81) — so this directive declares them to make the BINDING legal, and the
|
|
38
|
+
// engine decides which node each lands on.
|
|
39
|
+
@Directive({ selector: 'image-background', standalone: true })
|
|
40
|
+
export class ImageBackgroundElement extends SymbioteElement {
|
|
41
|
+
@Input() imageStyle?: IAngularImageBackgroundProps['imageStyle'];
|
|
42
|
+
@Input() source?: IImageProps['source'];
|
|
43
|
+
@Input() src?: IImageProps['src'];
|
|
44
|
+
@Input() srcSet?: IImageProps['srcSet'];
|
|
45
|
+
@Input() alt?: IImageProps['alt'];
|
|
46
|
+
@Input() width?: IImageProps['width'];
|
|
47
|
+
@Input() height?: IImageProps['height'];
|
|
48
|
+
@Input() resizeMode?: IImageProps['resizeMode'];
|
|
49
|
+
@Input() resizeMethod?: IImageProps['resizeMethod'];
|
|
50
|
+
@Input() defaultSource?: IImageProps['defaultSource'];
|
|
51
|
+
@Input() loadingIndicatorSource?: IImageProps['loadingIndicatorSource'];
|
|
52
|
+
@Input() blurRadius?: IImageProps['blurRadius'];
|
|
53
|
+
@Input() capInsets?: IImageProps['capInsets'];
|
|
54
|
+
@Input() crossOrigin?: IImageProps['crossOrigin'];
|
|
55
|
+
@Input() referrerPolicy?: IImageProps['referrerPolicy'];
|
|
56
|
+
@Input() fadeDuration?: IImageProps['fadeDuration'];
|
|
57
|
+
@Input()
|
|
58
|
+
progressiveRenderingEnabled?: IImageProps['progressiveRenderingEnabled'];
|
|
59
|
+
@Input() tintColor?: IImageProps['tintColor'];
|
|
60
|
+
@Input() onLoad?: IImageProps['onLoad'];
|
|
61
|
+
@Input() onLoadStart?: IImageProps['onLoadStart'];
|
|
62
|
+
@Input() onLoadEnd?: IImageProps['onLoadEnd'];
|
|
63
|
+
@Input() onError?: IImageProps['onError'];
|
|
64
|
+
@Input() onProgress?: IImageProps['onProgress'];
|
|
65
|
+
@Input() onPartialLoad?: IImageProps['onPartialLoad'];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@Directive({ selector: 'scroll-view', standalone: true })
|
|
69
|
+
export class ScrollViewElement extends SymbioteElement {
|
|
70
|
+
// No `horizontal` @Input: the axis is the TAG you write, never a prop — see
|
|
71
|
+
// `../components/scroll-view-props.ts`'s header. `HorizontalScrollViewElement` below is the
|
|
72
|
+
// other spelling, not a variant of this one.
|
|
73
|
+
@Input() scrollEnabled?: IAngularScrollViewProps['scrollEnabled'];
|
|
74
|
+
@Input() scrollEventThrottle?: IAngularScrollViewProps['scrollEventThrottle'];
|
|
75
|
+
@Input()
|
|
76
|
+
contentContainerStyle?: IAngularScrollViewProps['contentContainerStyle'];
|
|
77
|
+
@Input() contentInset?: IAngularScrollViewProps['contentInset'];
|
|
78
|
+
@Input()
|
|
79
|
+
contentInsetAdjustmentBehavior?: IAngularScrollViewProps['contentInsetAdjustmentBehavior'];
|
|
80
|
+
@Input() contentOffset?: IAngularScrollViewProps['contentOffset'];
|
|
81
|
+
@Input()
|
|
82
|
+
scrollIndicatorInsets?: IAngularScrollViewProps['scrollIndicatorInsets'];
|
|
83
|
+
@Input()
|
|
84
|
+
showsHorizontalScrollIndicator?: IAngularScrollViewProps['showsHorizontalScrollIndicator'];
|
|
85
|
+
@Input()
|
|
86
|
+
showsVerticalScrollIndicator?: IAngularScrollViewProps['showsVerticalScrollIndicator'];
|
|
87
|
+
@Input()
|
|
88
|
+
alwaysBounceHorizontal?: IAngularScrollViewProps['alwaysBounceHorizontal'];
|
|
89
|
+
@Input()
|
|
90
|
+
alwaysBounceVertical?: IAngularScrollViewProps['alwaysBounceVertical'];
|
|
91
|
+
@Input() bounces?: IAngularScrollViewProps['bounces'];
|
|
92
|
+
@Input() bouncesZoom?: IAngularScrollViewProps['bouncesZoom'];
|
|
93
|
+
@Input() centerContent?: IAngularScrollViewProps['centerContent'];
|
|
94
|
+
@Input() decelerationRate?: IAngularScrollViewProps['decelerationRate'];
|
|
95
|
+
@Input()
|
|
96
|
+
directionalLockEnabled?: IAngularScrollViewProps['directionalLockEnabled'];
|
|
97
|
+
@Input()
|
|
98
|
+
disableIntervalMomentum?: IAngularScrollViewProps['disableIntervalMomentum'];
|
|
99
|
+
@Input() endFillColor?: IAngularScrollViewProps['endFillColor'];
|
|
100
|
+
@Input() fadingEdgeLength?: IAngularScrollViewProps['fadingEdgeLength'];
|
|
101
|
+
@Input() indicatorStyle?: IAngularScrollViewProps['indicatorStyle'];
|
|
102
|
+
@Input() invertStickyHeaders?: IAngularScrollViewProps['invertStickyHeaders'];
|
|
103
|
+
@Input() keyboardDismissMode?: IAngularScrollViewProps['keyboardDismissMode'];
|
|
104
|
+
@Input()
|
|
105
|
+
keyboardShouldPersistTaps?: IAngularScrollViewProps['keyboardShouldPersistTaps'];
|
|
106
|
+
@Input()
|
|
107
|
+
automaticallyAdjustKeyboardInsets?: IAngularScrollViewProps['automaticallyAdjustKeyboardInsets'];
|
|
108
|
+
@Input()
|
|
109
|
+
maintainVisibleContentPosition?: IAngularScrollViewProps['maintainVisibleContentPosition'];
|
|
110
|
+
@Input() maximumZoomScale?: IAngularScrollViewProps['maximumZoomScale'];
|
|
111
|
+
@Input() minimumZoomScale?: IAngularScrollViewProps['minimumZoomScale'];
|
|
112
|
+
@Input() zoomScale?: IAngularScrollViewProps['zoomScale'];
|
|
113
|
+
@Input() nestedScrollEnabled?: IAngularScrollViewProps['nestedScrollEnabled'];
|
|
114
|
+
@Input() overScrollMode?: IAngularScrollViewProps['overScrollMode'];
|
|
115
|
+
@Input() pagingEnabled?: IAngularScrollViewProps['pagingEnabled'];
|
|
116
|
+
@Input() persistentScrollbar?: IAngularScrollViewProps['persistentScrollbar'];
|
|
117
|
+
@Input() pinchGestureEnabled?: IAngularScrollViewProps['pinchGestureEnabled'];
|
|
118
|
+
@Input() snapToAlignment?: IAngularScrollViewProps['snapToAlignment'];
|
|
119
|
+
@Input() snapToEnd?: IAngularScrollViewProps['snapToEnd'];
|
|
120
|
+
@Input() snapToInterval?: IAngularScrollViewProps['snapToInterval'];
|
|
121
|
+
@Input() snapToOffsets?: IAngularScrollViewProps['snapToOffsets'];
|
|
122
|
+
@Input() snapToStart?: IAngularScrollViewProps['snapToStart'];
|
|
123
|
+
@Input() stickyHeaderIndices?: IAngularScrollViewProps['stickyHeaderIndices'];
|
|
124
|
+
@Input() onScroll?: IAngularScrollViewProps['onScroll'];
|
|
125
|
+
@Input() onScrollBeginDrag?: IAngularScrollViewProps['onScrollBeginDrag'];
|
|
126
|
+
@Input() onScrollEndDrag?: IAngularScrollViewProps['onScrollEndDrag'];
|
|
127
|
+
@Input()
|
|
128
|
+
onMomentumScrollBegin?: IAngularScrollViewProps['onMomentumScrollBegin'];
|
|
129
|
+
@Input() onMomentumScrollEnd?: IAngularScrollViewProps['onMomentumScrollEnd'];
|
|
130
|
+
@Input() onScrollToTop?: IAngularScrollViewProps['onScrollToTop'];
|
|
131
|
+
@Input() onContentSizeChange?: IAngularScrollViewProps['onContentSizeChange'];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@Directive({ selector: 'horizontal-scroll-view', standalone: true })
|
|
135
|
+
export class HorizontalScrollViewElement extends ScrollViewElement {}
|
|
136
|
+
|
|
137
|
+
@Directive({ selector: 'scroll-content', standalone: true })
|
|
138
|
+
export class ScrollContentElement extends SymbioteElement {}
|
|
139
|
+
|
|
140
|
+
@Directive({ selector: 'horizontal-scroll-content', standalone: true })
|
|
141
|
+
export class HorizontalScrollContentElement extends SymbioteElement {}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { Directive, Input } from '@angular/core';
|
|
2
|
+
import type { INativeFeedbackBackground } from '@symbiote-native/components';
|
|
3
|
+
import type { ITextElementProps } from './element-props';
|
|
4
|
+
import type { ICheckboxProps } from './components/checkbox-props';
|
|
5
|
+
import type { IAngularPressableProps } from './components/pressable-props';
|
|
6
|
+
import type {
|
|
7
|
+
IAngularTouchableHighlightProps,
|
|
8
|
+
IAngularTouchableOpacityProps,
|
|
9
|
+
} from './components/touchable-props';
|
|
10
|
+
import { SymbioteElement } from './element-base';
|
|
11
|
+
|
|
12
|
+
// BOTH SPELLINGS ON THE SEVEN DASHLESS TAGS, and it is a correctness fix rather than a convenience.
|
|
13
|
+
//
|
|
14
|
+
// The renderer has always mapped `symbiote-view` onto `view` (`PRIMITIVE_SELECTOR_ALIAS`), because
|
|
15
|
+
// `CUSTOM_ELEMENTS_SCHEMA` admits an unknown element only when the name carries a hyphen — so the
|
|
16
|
+
// hyphenated form is the spelling an app WITHOUT these directives has to use. It is the same tag and
|
|
17
|
+
// commits the same node.
|
|
18
|
+
//
|
|
19
|
+
// It was not the same tag HERE. A selector of `view` alone meant an app that imports
|
|
20
|
+
// `SYMBIOTE_ELEMENTS` and writes `<symbiote-view>` matched nothing: no type check on its props, no
|
|
21
|
+
// declared inputs, none of `SymbioteElement`'s forwarding or callback wrapping — silently, with the
|
|
22
|
+
// tree still looking right. Measured, that shape also ran ~8.6 us per element FASTER, which is what
|
|
23
|
+
// made it look like an optimization instead of a hole (`angular-directive-cost.itest.ts`).
|
|
24
|
+
//
|
|
25
|
+
// Only the seven dashless tags need it: `hyphenatedIntrinsicAliases` skips any tag that already
|
|
26
|
+
// carries a dash, so `symbiote-scroll-view` resolves nowhere on either side and the two halves agree
|
|
27
|
+
// already.
|
|
28
|
+
@Directive({ selector: 'view, symbiote-view', standalone: true })
|
|
29
|
+
export class ViewElement extends SymbioteElement {}
|
|
30
|
+
|
|
31
|
+
@Directive({ selector: 'pressable, symbiote-pressable', standalone: true })
|
|
32
|
+
export class PressableElement extends SymbioteElement {
|
|
33
|
+
@Input() disabled?: IAngularPressableProps['disabled'];
|
|
34
|
+
@Input() cancelable?: IAngularPressableProps['cancelable'];
|
|
35
|
+
@Input()
|
|
36
|
+
blockNativeResponder?: IAngularPressableProps['blockNativeResponder'];
|
|
37
|
+
@Input() delayLongPress?: IAngularPressableProps['delayLongPress'];
|
|
38
|
+
@Input() delayHoverIn?: IAngularPressableProps['delayHoverIn'];
|
|
39
|
+
@Input() delayHoverOut?: IAngularPressableProps['delayHoverOut'];
|
|
40
|
+
@Input() onHoverIn?: IAngularPressableProps['onHoverIn'];
|
|
41
|
+
@Input() onHoverOut?: IAngularPressableProps['onHoverOut'];
|
|
42
|
+
@Input()
|
|
43
|
+
pressRetentionOffset?: IAngularPressableProps['pressRetentionOffset'];
|
|
44
|
+
@Input() unstable_pressDelay?: IAngularPressableProps['unstable_pressDelay'];
|
|
45
|
+
@Input() android_ripple?: IAngularPressableProps['android_ripple'];
|
|
46
|
+
// ON THE BASE, so both touchables inherit it — the prop is Pressable's AND
|
|
47
|
+
// TouchableHighlight's upstream, and they extend this rather than repeat its surface.
|
|
48
|
+
@Input() testOnly_pressed?: IAngularPressableProps['testOnly_pressed'];
|
|
49
|
+
@Input()
|
|
50
|
+
android_disableSound?: IAngularPressableProps['android_disableSound'];
|
|
51
|
+
@Input() hasTVPreferredFocus?: IAngularPressableProps['hasTVPreferredFocus'];
|
|
52
|
+
@Input() nextFocusDown?: IAngularPressableProps['nextFocusDown'];
|
|
53
|
+
@Input() nextFocusForward?: IAngularPressableProps['nextFocusForward'];
|
|
54
|
+
@Input() nextFocusLeft?: IAngularPressableProps['nextFocusLeft'];
|
|
55
|
+
@Input() nextFocusRight?: IAngularPressableProps['nextFocusRight'];
|
|
56
|
+
@Input() nextFocusUp?: IAngularPressableProps['nextFocusUp'];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// RN's TouchableOpacity is a Pressable that also fades, and both halves are on the engine node —
|
|
60
|
+
// so it takes the same inputs and adds only the fade's own knob.
|
|
61
|
+
@Directive({ selector: 'touchable-opacity', standalone: true })
|
|
62
|
+
export class TouchableOpacityElement extends PressableElement {
|
|
63
|
+
@Input() activeOpacity?: number;
|
|
64
|
+
@Input() delayPressIn?: number;
|
|
65
|
+
@Input() delayPressOut?: number;
|
|
66
|
+
@Input() minPressDuration?: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// RN's TouchableHighlight is a Pressable that swaps its own background while pressed
|
|
70
|
+
// (TouchableHighlight.js), and the underlay machine runs on the engine node — so the tag takes the
|
|
71
|
+
// press surface plus the two knobs that describe the underlay. `onShowUnderlay`/`onHideUnderlay`
|
|
72
|
+
// need no @Input: they are events, bound as `(showUnderlay)` through the renderer's own listen.
|
|
73
|
+
@Directive({ selector: 'touchable-highlight', standalone: true })
|
|
74
|
+
export class TouchableHighlightElement extends PressableElement {
|
|
75
|
+
@Input() activeOpacity?: number;
|
|
76
|
+
@Input() underlayColor?: string;
|
|
77
|
+
@Input() delayPressIn?: number;
|
|
78
|
+
@Input() delayPressOut?: number;
|
|
79
|
+
@Input() minPressDuration?: number;
|
|
80
|
+
// TouchableHighlight.js:205 — forwarded to Pressability as `android_disableSound`.
|
|
81
|
+
@Input() touchSoundDisabled?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// RN's TouchableNativeFeedback is a Pressable that CLONES onto its single child instead of
|
|
85
|
+
// rendering anything (TouchableNativeFeedback.js:339) — so the tag takes the press surface plus the
|
|
86
|
+
// two props that pick the Android ripple drawable. The tag itself commits no native view; the
|
|
87
|
+
// behavior configures the child, which is why `elements.test.ts` reads it as an anchor.
|
|
88
|
+
@Directive({ selector: 'touchable-native-feedback', standalone: true })
|
|
89
|
+
export class TouchableNativeFeedbackElement extends PressableElement {
|
|
90
|
+
@Input() background?: INativeFeedbackBackground;
|
|
91
|
+
@Input() useForeground?: boolean;
|
|
92
|
+
// TouchableNativeFeedback.js:228 — forwarded to Pressability as `android_disableSound`.
|
|
93
|
+
@Input() touchSoundDisabled?: boolean;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// RN's TouchableWithoutFeedback clones onto its single child the same way
|
|
97
|
+
// (TouchableWithoutFeedback.js:286) and installs no drawable, so it takes the press surface plus the
|
|
98
|
+
// three timing knobs it forwards to Pressability (:186-190) and nothing else. Like the tag above it
|
|
99
|
+
// commits no native view; `elements.test.ts` reads it as an anchor.
|
|
100
|
+
@Directive({ selector: 'touchable-without-feedback', standalone: true })
|
|
101
|
+
export class TouchableWithoutFeedbackElement extends PressableElement {
|
|
102
|
+
@Input() delayPressIn?: number;
|
|
103
|
+
@Input() delayPressOut?: number;
|
|
104
|
+
@Input() minPressDuration?: number;
|
|
105
|
+
// TouchableWithoutFeedback.js:199 — forwarded to Pressability as `android_disableSound`.
|
|
106
|
+
@Input() touchSoundDisabled?: boolean;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// RN's Button IS a TouchableOpacity (Button.js:384), and the behavior builds the view and the
|
|
110
|
+
// label under it — so the tag takes the touchable's surface plus the four props Button owns. There
|
|
111
|
+
// is no `style`: RN's Button has no such prop, and the label/background come from `color`.
|
|
112
|
+
@Directive({ selector: 'button, symbiote-button', standalone: true })
|
|
113
|
+
export class ButtonElement extends TouchableOpacityElement {
|
|
114
|
+
@Input() title?: string;
|
|
115
|
+
@Input() color?: string;
|
|
116
|
+
@Input() touchSoundDisabled?: boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// expo-checkbox: View-like box plus the toggle on the engine node, поэтому только свои пять полей
|
|
120
|
+
// Нет `(valueChange)`: тоггл зовёт `onValueChange` как проп, он не engine-событие с read-back
|
|
121
|
+
@Directive({ selector: 'checkbox, symbiote-checkbox', standalone: true })
|
|
122
|
+
export class CheckboxElement extends SymbioteElement {
|
|
123
|
+
@Input() value?: ICheckboxProps['value'];
|
|
124
|
+
@Input() disabled?: ICheckboxProps['disabled'];
|
|
125
|
+
@Input() color?: ICheckboxProps['color'];
|
|
126
|
+
@Input() onValueChange?: ICheckboxProps['onValueChange'];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@Directive({ selector: 'text, symbiote-text', standalone: true })
|
|
130
|
+
export class TextElement extends SymbioteElement {
|
|
131
|
+
// Narrows the inherited input to a TEXT style so `fontSize`/`fontWeight` type-check here. The
|
|
132
|
+
// initializer is what TS2612 asks for to accept a redeclaration as deliberate; `declare` would
|
|
133
|
+
// be the other answer and cannot carry a decorator.
|
|
134
|
+
@Input() override style?: ITextElementProps['style'] = undefined;
|
|
135
|
+
@Input() override styleProp?: ITextElementProps['styleProp'] = undefined;
|
|
136
|
+
@Input() numberOfLines?: ITextElementProps['numberOfLines'];
|
|
137
|
+
@Input() ellipsizeMode?: ITextElementProps['ellipsizeMode'];
|
|
138
|
+
@Input() selectable?: ITextElementProps['selectable'];
|
|
139
|
+
@Input() adjustsFontSizeToFit?: ITextElementProps['adjustsFontSizeToFit'];
|
|
140
|
+
@Input() minimumFontScale?: ITextElementProps['minimumFontScale'];
|
|
141
|
+
@Input() allowFontScaling?: ITextElementProps['allowFontScaling'];
|
|
142
|
+
@Input() maxFontSizeMultiplier?: ITextElementProps['maxFontSizeMultiplier'];
|
|
143
|
+
@Input() selectionColor?: ITextElementProps['selectionColor'];
|
|
144
|
+
@Input() disabled?: ITextElementProps['disabled'];
|
|
145
|
+
}
|