@symbiote-native/engine 0.1.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/LICENSE +21 -0
- package/README.md +124 -0
- package/build/accessibility-info/index.android.d.ts +3 -0
- package/build/accessibility-info/index.android.js +166 -0
- package/build/accessibility-info/index.d.ts +1 -0
- package/build/accessibility-info/index.ios.d.ts +3 -0
- package/build/accessibility-info/index.ios.js +219 -0
- package/build/accessibility-info/index.js +5 -0
- package/build/accessibility-info/shared.d.ts +34 -0
- package/build/accessibility-info/shared.js +13 -0
- package/build/action-sheet-ios/index.d.ts +36 -0
- package/build/action-sheet-ios/index.js +74 -0
- package/build/alert/index.android.d.ts +5 -0
- package/build/alert/index.android.js +117 -0
- package/build/alert/index.d.ts +1 -0
- package/build/alert/index.ios.d.ts +7 -0
- package/build/alert/index.ios.js +83 -0
- package/build/alert/index.js +8 -0
- package/build/alert/shared.d.ts +19 -0
- package/build/alert/shared.js +17 -0
- package/build/animated/animated-component-shared.d.ts +5 -0
- package/build/animated/animated-component-shared.js +54 -0
- package/build/animated/animation.d.ts +9 -0
- package/build/animated/animation.js +6 -0
- package/build/animated/animations/base.d.ts +27 -0
- package/build/animated/animations/base.js +90 -0
- package/build/animated/animations/composition.d.ts +38 -0
- package/build/animated/animations/composition.js +236 -0
- package/build/animated/animations/decay.d.ts +22 -0
- package/build/animated/animations/decay.js +65 -0
- package/build/animated/animations/raf.d.ts +5 -0
- package/build/animated/animations/raf.js +39 -0
- package/build/animated/animations/spring-config.d.ts +6 -0
- package/build/animated/animations/spring-config.js +55 -0
- package/build/animated/animations/spring.d.ts +50 -0
- package/build/animated/animations/spring.js +207 -0
- package/build/animated/animations/timing.d.ts +27 -0
- package/build/animated/animations/timing.js +101 -0
- package/build/animated/animations/tracking.d.ts +14 -0
- package/build/animated/animations/tracking.js +43 -0
- package/build/animated/bezier.d.ts +1 -0
- package/build/animated/bezier.js +101 -0
- package/build/animated/color.d.ts +37 -0
- package/build/animated/color.js +183 -0
- package/build/animated/easing.d.ts +20 -0
- package/build/animated/easing.js +96 -0
- package/build/animated/event.d.ts +36 -0
- package/build/animated/event.js +252 -0
- package/build/animated/graph.d.ts +38 -0
- package/build/animated/graph.js +227 -0
- package/build/animated/index.d.ts +20 -0
- package/build/animated/index.js +28 -0
- package/build/animated/interpolation-node.d.ts +16 -0
- package/build/animated/interpolation-node.js +57 -0
- package/build/animated/interpolation.d.ts +22 -0
- package/build/animated/interpolation.js +199 -0
- package/build/animated/mock.d.ts +56 -0
- package/build/animated/mock.js +127 -0
- package/build/animated/native/native-animated.d.ts +43 -0
- package/build/animated/native/native-animated.js +146 -0
- package/build/animated/operators.d.ts +80 -0
- package/build/animated/operators.js +266 -0
- package/build/animated/props.d.ts +20 -0
- package/build/animated/props.js +187 -0
- package/build/animated/style.d.ts +26 -0
- package/build/animated/style.js +187 -0
- package/build/animated/value-xy.d.ts +35 -0
- package/build/animated/value-xy.js +106 -0
- package/build/animated/value.d.ts +36 -0
- package/build/animated/value.js +185 -0
- package/build/app-registry/index.d.ts +40 -0
- package/build/app-registry/index.js +144 -0
- package/build/app-state/index.d.ts +16 -0
- package/build/app-state/index.js +105 -0
- package/build/appearance/index.d.ts +12 -0
- package/build/appearance/index.js +84 -0
- package/build/back-handler/index.d.ts +14 -0
- package/build/back-handler/index.js +106 -0
- package/build/commit.d.ts +16 -0
- package/build/commit.js +678 -0
- package/build/debug.d.ts +5 -0
- package/build/debug.js +18 -0
- package/build/dimensions/index.d.ts +28 -0
- package/build/dimensions/index.js +148 -0
- package/build/dispatch.d.ts +2 -0
- package/build/dispatch.js +18 -0
- package/build/events/index.d.ts +1 -0
- package/build/events/index.js +691 -0
- package/build/fabric.d.ts +32 -0
- package/build/fabric.js +59 -0
- package/build/host-instance/index.d.ts +11 -0
- package/build/host-instance/index.js +49 -0
- package/build/i18n-manager/index.d.ts +13 -0
- package/build/i18n-manager/index.js +91 -0
- package/build/index.d.ts +80 -0
- package/build/index.js +72 -0
- package/build/interaction-manager/index.d.ts +45 -0
- package/build/interaction-manager/index.js +222 -0
- package/build/keyboard/index.d.ts +31 -0
- package/build/keyboard/index.js +142 -0
- package/build/layout-animation/index.d.ts +66 -0
- package/build/layout-animation/index.js +183 -0
- package/build/linking/index.android.d.ts +2 -0
- package/build/linking/index.android.js +18 -0
- package/build/linking/index.d.ts +1 -0
- package/build/linking/index.ios.d.ts +2 -0
- package/build/linking/index.ios.js +9 -0
- package/build/linking/index.js +6 -0
- package/build/linking/shared.d.ts +32 -0
- package/build/linking/shared.js +98 -0
- package/build/native-events.d.ts +24 -0
- package/build/native-events.js +129 -0
- package/build/native-modules.d.ts +6 -0
- package/build/native-modules.js +57 -0
- package/build/node.d.ts +36 -0
- package/build/node.js +194 -0
- package/build/pan-responder/index.d.ts +53 -0
- package/build/pan-responder/index.js +353 -0
- package/build/permissions-android/index.d.ts +115 -0
- package/build/permissions-android/index.js +185 -0
- package/build/pixel-ratio/index.d.ts +8 -0
- package/build/pixel-ratio/index.js +27 -0
- package/build/platform/index.android.d.ts +22 -0
- package/build/platform/index.android.js +60 -0
- package/build/platform/index.d.ts +1 -0
- package/build/platform/index.ios.d.ts +18 -0
- package/build/platform/index.ios.js +62 -0
- package/build/platform/index.js +5 -0
- package/build/platform/shared.d.ts +25 -0
- package/build/platform/shared.js +41 -0
- package/build/platform-color.d.ts +19 -0
- package/build/platform-color.js +25 -0
- package/build/post-commit.d.ts +4 -0
- package/build/post-commit.js +16 -0
- package/build/process-aspect-ratio.d.ts +1 -0
- package/build/process-aspect-ratio.js +34 -0
- package/build/process-background-image/index.d.ts +28 -0
- package/build/process-background-image/index.js +557 -0
- package/build/process-box-shadow/index.d.ts +11 -0
- package/build/process-box-shadow/index.js +193 -0
- package/build/process-filter.d.ts +31 -0
- package/build/process-filter.js +304 -0
- package/build/process-font-variant.d.ts +1 -0
- package/build/process-font-variant.js +17 -0
- package/build/process-transform/index.d.ts +5 -0
- package/build/process-transform/index.js +120 -0
- package/build/process-transform-origin/index.d.ts +3 -0
- package/build/process-transform-origin/index.js +108 -0
- package/build/registry.d.ts +31 -0
- package/build/registry.js +145 -0
- package/build/settings/index.d.ts +8 -0
- package/build/settings/index.js +126 -0
- package/build/share/index.android.d.ts +3 -0
- package/build/share/index.android.js +56 -0
- package/build/share/index.d.ts +1 -0
- package/build/share/index.ios.d.ts +3 -0
- package/build/share/index.ios.js +47 -0
- package/build/share/index.js +6 -0
- package/build/share/shared.d.ts +32 -0
- package/build/share/shared.js +32 -0
- package/build/status-bar/index.android.d.ts +5 -0
- package/build/status-bar/index.android.js +83 -0
- package/build/status-bar/index.d.ts +1 -0
- package/build/status-bar/index.ios.d.ts +5 -0
- package/build/status-bar/index.ios.js +66 -0
- package/build/status-bar/index.js +4 -0
- package/build/status-bar/shared.d.ts +22 -0
- package/build/status-bar/shared.js +22 -0
- package/build/style/index.d.ts +1 -0
- package/build/style/index.js +30 -0
- package/build/style-registry/index.d.ts +11 -0
- package/build/style-registry/index.js +165 -0
- package/build/style-sheet/index.d.ts +20 -0
- package/build/style-sheet/index.js +121 -0
- package/build/styles.d.ts +220 -0
- package/build/styles.js +7 -0
- package/build/surface.d.ts +16 -0
- package/build/surface.js +67 -0
- package/build/tags.d.ts +1 -0
- package/build/tags.js +10 -0
- package/build/text-input-state.d.ts +5 -0
- package/build/text-input-state.js +29 -0
- package/build/toast-android/index.d.ts +10 -0
- package/build/toast-android/index.js +108 -0
- package/build/vibration/index.android.d.ts +2 -0
- package/build/vibration/index.android.js +18 -0
- package/build/vibration/index.d.ts +1 -0
- package/build/vibration/index.ios.d.ts +2 -0
- package/build/vibration/index.ios.js +54 -0
- package/build/vibration/index.js +6 -0
- package/build/vibration/shared.d.ts +15 -0
- package/build/vibration/shared.js +68 -0
- package/build/view-config.d.ts +1 -0
- package/build/view-config.js +114 -0
- package/package.json +41 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import type { IColorValue } from './platform-color';
|
|
2
|
+
export type IDimensionValue = number | string;
|
|
3
|
+
export type IFlexAlign = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
4
|
+
export type IFlexJustify = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
5
|
+
export type ITransformProp = {
|
|
6
|
+
translateX: number;
|
|
7
|
+
} | {
|
|
8
|
+
translateY: number;
|
|
9
|
+
} | {
|
|
10
|
+
scale: number;
|
|
11
|
+
} | {
|
|
12
|
+
scaleX: number;
|
|
13
|
+
} | {
|
|
14
|
+
scaleY: number;
|
|
15
|
+
} | {
|
|
16
|
+
rotate: string;
|
|
17
|
+
} | {
|
|
18
|
+
rotateX: string;
|
|
19
|
+
} | {
|
|
20
|
+
rotateY: string;
|
|
21
|
+
} | {
|
|
22
|
+
rotateZ: string;
|
|
23
|
+
} | {
|
|
24
|
+
skewX: string;
|
|
25
|
+
} | {
|
|
26
|
+
skewY: string;
|
|
27
|
+
} | {
|
|
28
|
+
perspective: number;
|
|
29
|
+
} | {
|
|
30
|
+
matrix: number[];
|
|
31
|
+
};
|
|
32
|
+
export interface IBoxShadowValue {
|
|
33
|
+
offsetX: number | string;
|
|
34
|
+
offsetY: number | string;
|
|
35
|
+
color?: IColorValue;
|
|
36
|
+
blurRadius?: number | string;
|
|
37
|
+
spreadDistance?: number | string;
|
|
38
|
+
inset?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface IDropShadowValue {
|
|
41
|
+
offsetX: number | string;
|
|
42
|
+
offsetY: number | string;
|
|
43
|
+
standardDeviation?: number | string;
|
|
44
|
+
color?: IColorValue;
|
|
45
|
+
}
|
|
46
|
+
export type IFilterFunction = {
|
|
47
|
+
brightness: number | string;
|
|
48
|
+
} | {
|
|
49
|
+
blur: number | string;
|
|
50
|
+
} | {
|
|
51
|
+
contrast: number | string;
|
|
52
|
+
} | {
|
|
53
|
+
grayscale: number | string;
|
|
54
|
+
} | {
|
|
55
|
+
hueRotate: number | string;
|
|
56
|
+
} | {
|
|
57
|
+
invert: number | string;
|
|
58
|
+
} | {
|
|
59
|
+
opacity: number | string;
|
|
60
|
+
} | {
|
|
61
|
+
saturate: number | string;
|
|
62
|
+
} | {
|
|
63
|
+
sepia: number | string;
|
|
64
|
+
} | {
|
|
65
|
+
dropShadow: IDropShadowValue | string;
|
|
66
|
+
};
|
|
67
|
+
export type IColorStopValue = {
|
|
68
|
+
color: IColorValue;
|
|
69
|
+
positions?: ReadonlyArray<string>;
|
|
70
|
+
};
|
|
71
|
+
export type ILinearGradientValue = {
|
|
72
|
+
type: 'linear-gradient';
|
|
73
|
+
direction?: string;
|
|
74
|
+
colorStops: ReadonlyArray<IColorStopValue>;
|
|
75
|
+
};
|
|
76
|
+
export type IRadialGradientPosition = {
|
|
77
|
+
top: number | string;
|
|
78
|
+
left: number | string;
|
|
79
|
+
} | {
|
|
80
|
+
top: number | string;
|
|
81
|
+
right: number | string;
|
|
82
|
+
} | {
|
|
83
|
+
bottom: number | string;
|
|
84
|
+
left: number | string;
|
|
85
|
+
} | {
|
|
86
|
+
bottom: number | string;
|
|
87
|
+
right: number | string;
|
|
88
|
+
};
|
|
89
|
+
export type IRadialGradientShape = 'circle' | 'ellipse';
|
|
90
|
+
export type IRadialGradientSize = 'closest-corner' | 'closest-side' | 'farthest-corner' | 'farthest-side' | {
|
|
91
|
+
x: string | number;
|
|
92
|
+
y: string | number;
|
|
93
|
+
};
|
|
94
|
+
export type IRadialGradientValue = {
|
|
95
|
+
type: 'radial-gradient';
|
|
96
|
+
shape?: IRadialGradientShape;
|
|
97
|
+
size?: IRadialGradientSize;
|
|
98
|
+
position?: IRadialGradientPosition;
|
|
99
|
+
colorStops: ReadonlyArray<IColorStopValue>;
|
|
100
|
+
};
|
|
101
|
+
export type IBackgroundImageValue = ILinearGradientValue | IRadialGradientValue;
|
|
102
|
+
export type IBlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity' | 'plus-lighter';
|
|
103
|
+
export interface IViewStyle {
|
|
104
|
+
width?: IDimensionValue;
|
|
105
|
+
height?: IDimensionValue;
|
|
106
|
+
minWidth?: IDimensionValue;
|
|
107
|
+
minHeight?: IDimensionValue;
|
|
108
|
+
maxWidth?: IDimensionValue;
|
|
109
|
+
maxHeight?: IDimensionValue;
|
|
110
|
+
aspectRatio?: number | string;
|
|
111
|
+
flex?: number;
|
|
112
|
+
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
113
|
+
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
114
|
+
flexBasis?: IDimensionValue;
|
|
115
|
+
flexGrow?: number;
|
|
116
|
+
flexShrink?: number;
|
|
117
|
+
alignItems?: IFlexAlign;
|
|
118
|
+
alignSelf?: 'auto' | IFlexAlign;
|
|
119
|
+
alignContent?: IFlexJustify | 'stretch';
|
|
120
|
+
justifyContent?: IFlexJustify;
|
|
121
|
+
direction?: 'inherit' | 'ltr' | 'rtl';
|
|
122
|
+
gap?: number | string;
|
|
123
|
+
rowGap?: number | string;
|
|
124
|
+
columnGap?: number | string;
|
|
125
|
+
position?: 'absolute' | 'relative' | 'static';
|
|
126
|
+
top?: IDimensionValue;
|
|
127
|
+
right?: IDimensionValue;
|
|
128
|
+
bottom?: IDimensionValue;
|
|
129
|
+
left?: IDimensionValue;
|
|
130
|
+
start?: IDimensionValue;
|
|
131
|
+
end?: IDimensionValue;
|
|
132
|
+
zIndex?: number;
|
|
133
|
+
padding?: IDimensionValue;
|
|
134
|
+
paddingHorizontal?: IDimensionValue;
|
|
135
|
+
paddingVertical?: IDimensionValue;
|
|
136
|
+
paddingTop?: IDimensionValue;
|
|
137
|
+
paddingRight?: IDimensionValue;
|
|
138
|
+
paddingBottom?: IDimensionValue;
|
|
139
|
+
paddingLeft?: IDimensionValue;
|
|
140
|
+
paddingStart?: IDimensionValue;
|
|
141
|
+
paddingEnd?: IDimensionValue;
|
|
142
|
+
margin?: IDimensionValue;
|
|
143
|
+
marginHorizontal?: IDimensionValue;
|
|
144
|
+
marginVertical?: IDimensionValue;
|
|
145
|
+
marginTop?: IDimensionValue;
|
|
146
|
+
marginRight?: IDimensionValue;
|
|
147
|
+
marginBottom?: IDimensionValue;
|
|
148
|
+
marginLeft?: IDimensionValue;
|
|
149
|
+
marginStart?: IDimensionValue;
|
|
150
|
+
marginEnd?: IDimensionValue;
|
|
151
|
+
borderRadius?: number | string;
|
|
152
|
+
borderTopLeftRadius?: number | string;
|
|
153
|
+
borderTopRightRadius?: number | string;
|
|
154
|
+
borderBottomLeftRadius?: number | string;
|
|
155
|
+
borderBottomRightRadius?: number | string;
|
|
156
|
+
borderStartStartRadius?: number | string;
|
|
157
|
+
borderStartEndRadius?: number | string;
|
|
158
|
+
borderEndStartRadius?: number | string;
|
|
159
|
+
borderEndEndRadius?: number | string;
|
|
160
|
+
borderCurve?: 'circular' | 'continuous';
|
|
161
|
+
borderWidth?: number;
|
|
162
|
+
borderTopWidth?: number;
|
|
163
|
+
borderRightWidth?: number;
|
|
164
|
+
borderBottomWidth?: number;
|
|
165
|
+
borderLeftWidth?: number;
|
|
166
|
+
borderStartWidth?: number;
|
|
167
|
+
borderEndWidth?: number;
|
|
168
|
+
borderColor?: IColorValue;
|
|
169
|
+
borderTopColor?: IColorValue;
|
|
170
|
+
borderRightColor?: IColorValue;
|
|
171
|
+
borderBottomColor?: IColorValue;
|
|
172
|
+
borderLeftColor?: IColorValue;
|
|
173
|
+
borderStartColor?: IColorValue;
|
|
174
|
+
borderEndColor?: IColorValue;
|
|
175
|
+
borderStyle?: 'solid' | 'dotted' | 'dashed';
|
|
176
|
+
backgroundColor?: IColorValue;
|
|
177
|
+
opacity?: number;
|
|
178
|
+
overflow?: 'visible' | 'hidden' | 'scroll';
|
|
179
|
+
display?: 'none' | 'flex';
|
|
180
|
+
backfaceVisibility?: 'visible' | 'hidden';
|
|
181
|
+
shadowColor?: IColorValue;
|
|
182
|
+
shadowOffset?: {
|
|
183
|
+
width: number;
|
|
184
|
+
height: number;
|
|
185
|
+
};
|
|
186
|
+
shadowOpacity?: number;
|
|
187
|
+
shadowRadius?: number;
|
|
188
|
+
elevation?: number;
|
|
189
|
+
transform?: ITransformProp[];
|
|
190
|
+
transformOrigin?: [string | number, string | number, string | number] | string;
|
|
191
|
+
boxShadow?: IBoxShadowValue[] | string;
|
|
192
|
+
filter?: IFilterFunction[] | string;
|
|
193
|
+
experimental_backgroundImage?: IBackgroundImageValue[] | string;
|
|
194
|
+
mixBlendMode?: IBlendMode;
|
|
195
|
+
}
|
|
196
|
+
export interface ITextStyle extends IViewStyle {
|
|
197
|
+
color?: IColorValue;
|
|
198
|
+
fontFamily?: string;
|
|
199
|
+
fontSize?: number;
|
|
200
|
+
fontStyle?: 'normal' | 'italic';
|
|
201
|
+
fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
202
|
+
letterSpacing?: number;
|
|
203
|
+
lineHeight?: number;
|
|
204
|
+
textAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
205
|
+
textAlignVertical?: 'auto' | 'top' | 'bottom' | 'center';
|
|
206
|
+
textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase';
|
|
207
|
+
textDecorationLine?: 'none' | 'underline' | 'line-through' | 'underline line-through';
|
|
208
|
+
textDecorationColor?: IColorValue;
|
|
209
|
+
textDecorationStyle?: 'solid' | 'double' | 'dotted' | 'dashed';
|
|
210
|
+
fontVariant?: string[];
|
|
211
|
+
writingDirection?: 'auto' | 'ltr' | 'rtl';
|
|
212
|
+
includeFontPadding?: boolean;
|
|
213
|
+
}
|
|
214
|
+
type IStyleFalsy = false | null | undefined | '';
|
|
215
|
+
type IRecursiveArray<T> = ReadonlyArray<T | IRecursiveArray<T>>;
|
|
216
|
+
export type IStyleProp<T> = T | IStyleFalsy | IRecursiveArray<T | IStyleFalsy>;
|
|
217
|
+
export type INamedStyles<T> = {
|
|
218
|
+
[P in keyof T]: IViewStyle | ITextStyle;
|
|
219
|
+
};
|
|
220
|
+
export {};
|
package/build/styles.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// The typed style surface (ViewStyle / TextStyle and friends). Maps onto Yoga layout
|
|
2
|
+
// props and RN's view/text props, which Fabric's C++ reads off the props payload.
|
|
3
|
+
// A correctly-typed subset of RN's StyleSheet surface (see
|
|
4
|
+
// react-native/Libraries/StyleSheet/StyleSheetTypes): the load-bearing layout / box /
|
|
5
|
+
// shadow / transform / text props, not the full surface. Agnostic types, so they
|
|
6
|
+
// live in the engine next to the style processors; every adapter re-exports them.
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IRootTag } from './fabric';
|
|
2
|
+
import type { ISymbioteNode } from './node';
|
|
3
|
+
export declare class SymbioteSurface {
|
|
4
|
+
readonly rootTag: IRootTag;
|
|
5
|
+
readonly children: ISymbioteNode[];
|
|
6
|
+
private commitScheduled;
|
|
7
|
+
constructor(rootTag: IRootTag);
|
|
8
|
+
appendChild(child: ISymbioteNode): void;
|
|
9
|
+
insertBefore(child: ISymbioteNode, beforeChild: ISymbioteNode): void;
|
|
10
|
+
removeChild(child: ISymbioteNode): void;
|
|
11
|
+
clear(): void;
|
|
12
|
+
commit(): void;
|
|
13
|
+
requestCommit(): void;
|
|
14
|
+
private detach;
|
|
15
|
+
}
|
|
16
|
+
export declare function createSurface(rootTag: IRootTag): SymbioteSurface;
|
package/build/surface.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// A surface is one mounted root: it owns the rootTag handed down by the native
|
|
2
|
+
// Fabric host and the list of top-level retained nodes. Adapters mutate it and
|
|
3
|
+
// ask it to commit; the surface coalesces commits and drives the engine.
|
|
4
|
+
import { commitChildren } from './commit';
|
|
5
|
+
import { dlog } from './debug';
|
|
6
|
+
import { installEventHandler } from './events';
|
|
7
|
+
export class SymbioteSurface {
|
|
8
|
+
rootTag;
|
|
9
|
+
children = [];
|
|
10
|
+
commitScheduled = false;
|
|
11
|
+
constructor(rootTag) {
|
|
12
|
+
this.rootTag = rootTag;
|
|
13
|
+
}
|
|
14
|
+
appendChild(child) {
|
|
15
|
+
this.detach(child);
|
|
16
|
+
child.parent = undefined;
|
|
17
|
+
this.children.push(child);
|
|
18
|
+
}
|
|
19
|
+
insertBefore(child, beforeChild) {
|
|
20
|
+
this.detach(child);
|
|
21
|
+
child.parent = undefined;
|
|
22
|
+
const index = this.children.indexOf(beforeChild);
|
|
23
|
+
this.children.splice(index < 0 ? this.children.length : index, 0, child);
|
|
24
|
+
}
|
|
25
|
+
removeChild(child) {
|
|
26
|
+
const index = this.children.indexOf(child);
|
|
27
|
+
if (index >= 0)
|
|
28
|
+
this.children.splice(index, 1);
|
|
29
|
+
}
|
|
30
|
+
clear() {
|
|
31
|
+
this.children.length = 0;
|
|
32
|
+
}
|
|
33
|
+
// Synchronous commit: used by React's resetAfterCommit, which already
|
|
34
|
+
// batches per logical update.
|
|
35
|
+
commit() {
|
|
36
|
+
commitChildren(this.rootTag, this.children);
|
|
37
|
+
}
|
|
38
|
+
// Coalesced commit: for reactive frameworks that emit many mutations per
|
|
39
|
+
// tick. Collapses to a single completeRoot at the microtask boundary.
|
|
40
|
+
requestCommit() {
|
|
41
|
+
if (this.commitScheduled)
|
|
42
|
+
return;
|
|
43
|
+
this.commitScheduled = true;
|
|
44
|
+
queueMicrotask(() => {
|
|
45
|
+
this.commitScheduled = false;
|
|
46
|
+
this.commit();
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
detach(child) {
|
|
50
|
+
const parent = child.parent;
|
|
51
|
+
if (parent) {
|
|
52
|
+
const index = parent.children.indexOf(child);
|
|
53
|
+
if (index >= 0)
|
|
54
|
+
parent.children.splice(index, 1);
|
|
55
|
+
child.parent = undefined;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const topIndex = this.children.indexOf(child);
|
|
59
|
+
if (topIndex >= 0)
|
|
60
|
+
this.children.splice(topIndex, 1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export function createSurface(rootTag) {
|
|
64
|
+
installEventHandler();
|
|
65
|
+
dlog(`surface created root=${rootTag}`);
|
|
66
|
+
return new SymbioteSurface(rootTag);
|
|
67
|
+
}
|
package/build/tags.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nextTag(): number;
|
package/build/tags.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Fabric reactTags are caller-allocated: even numbers (odd-mod-10 is reserved
|
|
2
|
+
// for root tags). A tag is minted once when a node is first created and then
|
|
3
|
+
// stays with it across clone-on-write commits (the clone keeps the family), so
|
|
4
|
+
// this counter only ever moves forward: one tag per node, not per commit.
|
|
5
|
+
let next = 2;
|
|
6
|
+
export function nextTag() {
|
|
7
|
+
const tag = next;
|
|
8
|
+
next += 2;
|
|
9
|
+
return tag;
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ISymbioteNode } from './node';
|
|
2
|
+
export declare function currentlyFocusedInput(): ISymbioteNode | null;
|
|
3
|
+
export declare function setInputFocused(node: ISymbioteNode): void;
|
|
4
|
+
export declare function setInputBlurred(node: ISymbioteNode): void;
|
|
5
|
+
export declare function blurTextInput(node: ISymbioteNode | null): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Mirrors RN's TextInput/TextInputState: the single currently-focused input, tracked
|
|
2
|
+
// JS-side because native exposes no focus getter. TextInput reports focus/blur here so
|
|
3
|
+
// Keyboard.dismiss can blur whatever holds focus without a ref, exactly how RN's
|
|
4
|
+
// dismissKeyboard() works (blurTextInput(currentlyFocusedInput())).
|
|
5
|
+
import { dispatchViewCommand } from './commit';
|
|
6
|
+
import { dlog } from './debug';
|
|
7
|
+
let currentlyFocused = null;
|
|
8
|
+
// The input that last reported focus and hasn't reported blur, or null.
|
|
9
|
+
export function currentlyFocusedInput() {
|
|
10
|
+
return currentlyFocused;
|
|
11
|
+
}
|
|
12
|
+
// TextInput's focus event reports the node here; its blur event clears it (only if it
|
|
13
|
+
// is still the current one; a later input may have taken focus in between).
|
|
14
|
+
export function setInputFocused(node) {
|
|
15
|
+
currentlyFocused = node;
|
|
16
|
+
}
|
|
17
|
+
export function setInputBlurred(node) {
|
|
18
|
+
if (currentlyFocused === node)
|
|
19
|
+
currentlyFocused = null;
|
|
20
|
+
}
|
|
21
|
+
// Imperative blur: drive the native `blur` view command and drop the tracked focus.
|
|
22
|
+
// Used by TextInput.blur() and Keyboard.dismiss().
|
|
23
|
+
export function blurTextInput(node) {
|
|
24
|
+
if (node === null)
|
|
25
|
+
return;
|
|
26
|
+
dlog('TextInputState.blurTextInput -> blur command');
|
|
27
|
+
dispatchViewCommand(node, 'blur', []);
|
|
28
|
+
setInputBlurred(node);
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ToastAndroid: {
|
|
2
|
+
SHORT: number;
|
|
3
|
+
LONG: number;
|
|
4
|
+
TOP: number;
|
|
5
|
+
BOTTOM: number;
|
|
6
|
+
CENTER: number;
|
|
7
|
+
show(message: string, duration: number): void;
|
|
8
|
+
showWithGravity(message: string, duration: number, gravity: number): void;
|
|
9
|
+
showWithGravityAndOffset(message: string, duration: number, gravity: number, xOffset: number, yOffset: number): void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// ToastAndroid module: pops a brief Android system toast from JS. Mirrors RN's
|
|
2
|
+
// Libraries/Components/ToastAndroid/ToastAndroid.android.js: `show` takes a message
|
|
3
|
+
// and a duration; `showWithGravity` adds a layout gravity; `showWithGravityAndOffset`
|
|
4
|
+
// adds an x/y pixel offset. No Fabric view, pure JS->native.
|
|
5
|
+
//
|
|
6
|
+
// symbiote is iOS-first and this is an Android-only module. RN's iOS fallback
|
|
7
|
+
// (ToastAndroid.ios.js) throws "not supported"; we prefer a no-op + dlog so a
|
|
8
|
+
// cross-platform smoke never crashes when the native module is absent.
|
|
9
|
+
//
|
|
10
|
+
// The native contract is confirmed from RN's TurboModule spec at
|
|
11
|
+
// specs_DEPRECATED/modules/INativeToastAndroid.js:
|
|
12
|
+
// getConstants(): { SHORT, LONG, TOP, BOTTOM, CENTER }
|
|
13
|
+
// show(message: string, duration: number)
|
|
14
|
+
// showWithGravity(message: string, duration: number, gravity: number)
|
|
15
|
+
// showWithGravityAndOffset(message, duration, gravity, xOffset, yOffset)
|
|
16
|
+
import { dlog } from '../debug';
|
|
17
|
+
import { getNativeModule } from '../native-modules';
|
|
18
|
+
// The native module name RN registers this under. NOTE: this is the name the spec
|
|
19
|
+
// resolves via `TurboModuleRegistry.getEnforcing<Spec>('ToastAndroid')`, NOT the
|
|
20
|
+
// spec filename `INativeToastAndroid`. Per the symbiote invariant, a module name is
|
|
21
|
+
// only provable on a real host (a headless fake answers to any name); this Android
|
|
22
|
+
// name is device-verify-pending. See .docs/native-module-platform-routing.md.
|
|
23
|
+
const TOAST_MODULE = 'ToastAndroid';
|
|
24
|
+
// Conventional RN values for SHORT/LONG/TOP/BOTTOM/CENTER. On a real device the
|
|
25
|
+
// numbers come from native getConstants() (resolved below); these are the fallbacks
|
|
26
|
+
// that keep the constants object populated headless and on a host without the module.
|
|
27
|
+
const FALLBACK_CONSTANTS = {
|
|
28
|
+
SHORT: 0,
|
|
29
|
+
LONG: 1,
|
|
30
|
+
TOP: 48,
|
|
31
|
+
BOTTOM: 80,
|
|
32
|
+
CENTER: 17,
|
|
33
|
+
};
|
|
34
|
+
// Lazily resolved so importing this module has no native side effect.
|
|
35
|
+
let toastModule;
|
|
36
|
+
function getModule() {
|
|
37
|
+
if (toastModule === undefined) {
|
|
38
|
+
toastModule = getNativeModule(TOAST_MODULE);
|
|
39
|
+
dlog(`ToastAndroid: ToastAndroid module ${toastModule ? 'resolved' : 'NOT resolved (null)'}`);
|
|
40
|
+
}
|
|
41
|
+
return toastModule;
|
|
42
|
+
}
|
|
43
|
+
// Read a single numeric constant from the native getConstants() payload, narrowing
|
|
44
|
+
// with a `typeof` guard (no cast) and falling back to the conventional RN value when
|
|
45
|
+
// the module or the key is absent.
|
|
46
|
+
function readConstant(raw, key) {
|
|
47
|
+
const value = raw[key];
|
|
48
|
+
return typeof value === 'number' ? value : FALLBACK_CONSTANTS[key];
|
|
49
|
+
}
|
|
50
|
+
// Resolve the constants once: real numbers from native on a device, fallbacks
|
|
51
|
+
// otherwise. Always returns a fully-populated object so the constants are never
|
|
52
|
+
// undefined, even headless.
|
|
53
|
+
function resolveConstants() {
|
|
54
|
+
const module = getModule();
|
|
55
|
+
if (module === null) {
|
|
56
|
+
dlog('ToastAndroid: constants from fallbacks (native module unavailable)');
|
|
57
|
+
return { ...FALLBACK_CONSTANTS };
|
|
58
|
+
}
|
|
59
|
+
const raw = module.getConstants();
|
|
60
|
+
return {
|
|
61
|
+
SHORT: readConstant(raw, 'SHORT'),
|
|
62
|
+
LONG: readConstant(raw, 'LONG'),
|
|
63
|
+
TOP: readConstant(raw, 'TOP'),
|
|
64
|
+
BOTTOM: readConstant(raw, 'BOTTOM'),
|
|
65
|
+
CENTER: readConstant(raw, 'CENTER'),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const constants = resolveConstants();
|
|
69
|
+
export const ToastAndroid = {
|
|
70
|
+
// Toast duration constants.
|
|
71
|
+
SHORT: constants.SHORT,
|
|
72
|
+
LONG: constants.LONG,
|
|
73
|
+
// Toast gravity constants.
|
|
74
|
+
TOP: constants.TOP,
|
|
75
|
+
BOTTOM: constants.BOTTOM,
|
|
76
|
+
CENTER: constants.CENTER,
|
|
77
|
+
// Show a toast with the given message and duration. Degrades to a no-op (logged)
|
|
78
|
+
// when the module is absent; a missing optional native module must never throw.
|
|
79
|
+
show(message, duration) {
|
|
80
|
+
const module = getModule();
|
|
81
|
+
if (module === null) {
|
|
82
|
+
dlog('ToastAndroid.show -> ToastAndroid native module unavailable, no-op');
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
dlog(`ToastAndroid.show -> "${message}" (${duration})`);
|
|
86
|
+
module.show(message, duration);
|
|
87
|
+
},
|
|
88
|
+
// Show a toast at the given layout gravity (TOP / BOTTOM / CENTER).
|
|
89
|
+
showWithGravity(message, duration, gravity) {
|
|
90
|
+
const module = getModule();
|
|
91
|
+
if (module === null) {
|
|
92
|
+
dlog('ToastAndroid.showWithGravity -> ToastAndroid native module unavailable, no-op');
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
dlog(`ToastAndroid.showWithGravity -> "${message}" (${duration}, gravity=${gravity})`);
|
|
96
|
+
module.showWithGravity(message, duration, gravity);
|
|
97
|
+
},
|
|
98
|
+
// Show a toast at the given gravity, offset by xOffset/yOffset pixels.
|
|
99
|
+
showWithGravityAndOffset(message, duration, gravity, xOffset, yOffset) {
|
|
100
|
+
const module = getModule();
|
|
101
|
+
if (module === null) {
|
|
102
|
+
dlog('ToastAndroid.showWithGravityAndOffset -> ToastAndroid native module unavailable, no-op');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
dlog(`ToastAndroid.showWithGravityAndOffset -> "${message}" (${duration}, gravity=${gravity}, ${xOffset}, ${yOffset})`);
|
|
106
|
+
module.showWithGravityAndOffset(message, duration, gravity, xOffset, yOffset);
|
|
107
|
+
},
|
|
108
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Vibration: Android build. Android has a native pattern scheduler, so the whole pattern
|
|
2
|
+
// goes to native `vibrateByPattern(pattern, repeat)`: RN encodes "do not repeat" as -1
|
|
3
|
+
// and "repeat from start" as 0. Everything else is the shared core. Metro picks this file
|
|
4
|
+
// on an Android host.
|
|
5
|
+
//
|
|
6
|
+
// device-verify-pending: the `Vibration` name and the `vibrateByPattern` routing are
|
|
7
|
+
// confirmed from RN source but not yet exercised on a real Android host: only a
|
|
8
|
+
// bridgeless resolution log there can prove the name. See
|
|
9
|
+
// .docs/native-module-platform-routing.md.
|
|
10
|
+
import { createVibration } from './shared';
|
|
11
|
+
// RN encodes "do not repeat" as -1 and "repeat from start" as 0 in vibrateByPattern.
|
|
12
|
+
const REPEAT_NONE = -1;
|
|
13
|
+
const REPEAT_FROM_START = 0;
|
|
14
|
+
export const Vibration = createVibration({
|
|
15
|
+
vibratePattern: (module, pattern, repeat) => {
|
|
16
|
+
module.vibrateByPattern(pattern, repeat ? REPEAT_FROM_START : REPEAT_NONE);
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index.ios';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Vibration (iOS build). iOS has no native pattern scheduler, so per RN's Vibration.js we
|
|
2
|
+
// walk the segments JS-side with setTimeout (buzz, wait, buzz, …), looping when `repeat`.
|
|
3
|
+
// Everything else (the single-number buzz, cancel, the module resolver) is the shared
|
|
4
|
+
// core. Metro picks this file on an iOS host; the base vibration.ts re-exports it for
|
|
5
|
+
// web/headless.
|
|
6
|
+
import { createVibration, DEFAULT_VIBRATION_LENGTH } from './shared';
|
|
7
|
+
// JS scheduler state, mirroring RN's _vibrating / _id. `scheduleId` guards against a
|
|
8
|
+
// stale timer from a previous run firing into a new one.
|
|
9
|
+
let vibrating = false;
|
|
10
|
+
let scheduleId = 0;
|
|
11
|
+
// Walk one pattern step: buzz, then arm the next step (or repeat / stop). Bails if
|
|
12
|
+
// vibration was canceled (vibrating=false) or superseded by a newer run (id mismatch).
|
|
13
|
+
function vibrateScheduler(module, id, pattern, repeat, nextIndex) {
|
|
14
|
+
if (!vibrating || id !== scheduleId) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
module.vibrate(DEFAULT_VIBRATION_LENGTH);
|
|
18
|
+
let index = nextIndex;
|
|
19
|
+
if (index >= pattern.length) {
|
|
20
|
+
if (repeat) {
|
|
21
|
+
index = 0;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
vibrating = false;
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
setTimeout(() => vibrateScheduler(module, id, pattern, repeat, index + 1), pattern[index]);
|
|
29
|
+
}
|
|
30
|
+
// iOS pattern entry point: a leading 0 means "buzz immediately", otherwise the first
|
|
31
|
+
// entry is the initial wait before the first buzz.
|
|
32
|
+
function vibratePattern(module, inputPattern, repeat) {
|
|
33
|
+
if (vibrating) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
vibrating = true;
|
|
37
|
+
let pattern = inputPattern;
|
|
38
|
+
if (pattern[0] === 0) {
|
|
39
|
+
module.vibrate(DEFAULT_VIBRATION_LENGTH);
|
|
40
|
+
pattern = pattern.slice(1);
|
|
41
|
+
}
|
|
42
|
+
if (pattern.length === 0) {
|
|
43
|
+
vibrating = false;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
setTimeout(() => vibrateScheduler(module, ++scheduleId, pattern, repeat, 1), pattern[0]);
|
|
47
|
+
}
|
|
48
|
+
export const Vibration = createVibration({
|
|
49
|
+
vibratePattern,
|
|
50
|
+
// cancel stops the JS scheduler: the next tick sees vibrating=false and bails.
|
|
51
|
+
stopPattern: () => {
|
|
52
|
+
vibrating = false;
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Vibration: base / default build (web, headless tsx, any target without a dedicated
|
|
2
|
+
// platform file). Metro overrides this with vibration.ios.ts / vibration.android.ts on a
|
|
3
|
+
// real iOS/Android host; off those, the iOS build is the fallback (its Vibration module
|
|
4
|
+
// resolves null elsewhere → graceful no-op). The barrel imports './vibration', which
|
|
5
|
+
// resolves here under tsc/tsx and to the platform file under Metro. See ADR 0019.
|
|
6
|
+
export * from './index.ios';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const DEFAULT_VIBRATION_LENGTH = 400;
|
|
2
|
+
export interface INativeVibration {
|
|
3
|
+
vibrate(pattern: number): void;
|
|
4
|
+
vibrateByPattern(pattern: number[], repeat: number): void;
|
|
5
|
+
cancel(): void;
|
|
6
|
+
}
|
|
7
|
+
export interface IVibrationStatic {
|
|
8
|
+
vibrate(pattern?: number | number[], repeat?: boolean): void;
|
|
9
|
+
cancel(): void;
|
|
10
|
+
}
|
|
11
|
+
export interface IVibrationPlatform {
|
|
12
|
+
vibratePattern(module: INativeVibration, pattern: number[], repeat: boolean): void;
|
|
13
|
+
stopPattern?(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare function createVibration(platform: IVibrationPlatform): IVibrationStatic;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Shared core of the Vibration module, everything that does NOT differ by platform:
|
|
2
|
+
// the public contract, the lazy native-module resolver, the single-number `vibrate`
|
|
3
|
+
// path, and `cancel`. The per-platform files (vibration.ios.ts / vibration.android.ts)
|
|
4
|
+
// supply ONLY what genuinely diverges (how an array PATTERN is walked) and hand it to
|
|
5
|
+
// `createVibration`. Mirrors RN's Libraries/Vibration/Vibration.js: a number is a single
|
|
6
|
+
// buzz, an array is a pattern.
|
|
7
|
+
//
|
|
8
|
+
// Native module name is `Vibration` on BOTH iOS and Android (see
|
|
9
|
+
// .docs/native-module-platform-routing.md), so unlike Linking the module name is shared,
|
|
10
|
+
// not divergent. The TurboModule spec lives at specs_DEPRECATED/modules/INativeVibration.js:
|
|
11
|
+
// vibrate(pattern: number)
|
|
12
|
+
// vibrateByPattern(pattern: number[], repeat: number)
|
|
13
|
+
// cancel()
|
|
14
|
+
//
|
|
15
|
+
// Metro selects the platform file on a real host (vibration.android.ts > vibration.ts);
|
|
16
|
+
// the base vibration.ts re-exports the iOS build for web/headless. There is no runtime
|
|
17
|
+
// `Platform.OS` read; the filename is the selector. See ADR 0019. No Fabric view,
|
|
18
|
+
// pure JS->native.
|
|
19
|
+
import { dlog } from '../debug';
|
|
20
|
+
import { getNativeModule } from '../native-modules';
|
|
21
|
+
const VIBRATION_MODULE = 'Vibration';
|
|
22
|
+
// RN's _default_vibration_length: the single-buzz duration when no pattern is given,
|
|
23
|
+
// and the per-segment buzz length the iOS scheduler emits between waits.
|
|
24
|
+
export const DEFAULT_VIBRATION_LENGTH = 400;
|
|
25
|
+
// Build a platform's Vibration from its array-pattern strategy. Each call owns its own
|
|
26
|
+
// lazy module cache, so importing both platform builds in a smoke keeps them independent.
|
|
27
|
+
// On a real host only one platform file is ever bundled.
|
|
28
|
+
export function createVibration(platform) {
|
|
29
|
+
let vibrationModule;
|
|
30
|
+
function getModule() {
|
|
31
|
+
if (vibrationModule === undefined) {
|
|
32
|
+
vibrationModule = getNativeModule(VIBRATION_MODULE);
|
|
33
|
+
dlog(`Vibration: Vibration module ${vibrationModule ? 'resolved' : 'NOT resolved (null)'}`);
|
|
34
|
+
}
|
|
35
|
+
return vibrationModule;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
// Trigger a vibration. A number is a single buzz of that many ms; an array is a
|
|
39
|
+
// pattern delegated to the platform strategy. Degrades to a no-op (logged) when the
|
|
40
|
+
// module is absent; a missing optional native module must never throw on a device.
|
|
41
|
+
vibrate(pattern = DEFAULT_VIBRATION_LENGTH, repeat = false) {
|
|
42
|
+
const module = getModule();
|
|
43
|
+
if (module === null) {
|
|
44
|
+
dlog('Vibration.vibrate -> Vibration native module unavailable, no-op');
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (typeof pattern === 'number') {
|
|
48
|
+
dlog(`Vibration.vibrate -> ${pattern}ms`);
|
|
49
|
+
module.vibrate(pattern);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
dlog(`Vibration.vibrate -> pattern[${pattern.length}], repeat=${repeat}`);
|
|
53
|
+
platform.vibratePattern(module, pattern, repeat);
|
|
54
|
+
},
|
|
55
|
+
// Stop an ongoing vibration. The iOS scheduler bails on its next tick once it clears
|
|
56
|
+
// its own JS state (stopPattern); both platforms then tell native to cancel.
|
|
57
|
+
cancel() {
|
|
58
|
+
const module = getModule();
|
|
59
|
+
if (module === null) {
|
|
60
|
+
dlog('Vibration.cancel -> Vibration native module unavailable, no-op');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
dlog('Vibration.cancel');
|
|
64
|
+
platform.stopPattern?.();
|
|
65
|
+
module.cancel();
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isEventFor(component: string, listenerName: string): boolean;
|