scandit-react-native-datacapture-core 8.5.2 → 8.6.0-beta.1
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/android/build.gradle +1 -1
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ui/ScanditViewGroupManager.kt +15 -0
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/utils/ViewWindowEvents.kt +32 -0
- package/android/src/main/newArch/kotlin/com/scandit/datacapture/reactnative/core/ScanditDataCaptureCoreModule.kt +4 -0
- package/android/src/main/oldArch/kotlin/com/scandit/datacapture/reactnative/core/ScanditDataCaptureCoreModule.kt +4 -0
- package/dist/core.js +471 -1
- package/dist/core.js.flow +2337 -0
- package/dist/core.js.map +1 -1
- package/dist/dts/core.d.ts +2151 -0
- package/dist/dts/experimental.d.ts +1 -9
- package/dist/dts/index.d.ts +672 -96
- package/dist/experimental.js.flow +3 -3
- package/dist/index.js +583 -143
- package/dist/index.js.flow +948 -96
- package/dist/index.js.map +1 -1
- package/ios/Sources/ScanditDataCaptureCore.swift +10 -1
- package/ios/Sources/Shared/DataCaptureViewWrapper.swift +7 -0
- package/package.json +9 -8
- package/scandit-react-native-datacapture-core.podspec +1 -1
- package/dist/dts/DataCaptureVersion.d.ts +0 -4
- package/dist/dts/DataCaptureView.d.ts +0 -61
- package/dist/dts/hooks/ScanditProvider.d.ts +0 -46
- package/dist/dts/hooks/index.d.ts +0 -5
- package/dist/dts/hooks/useCameraPermission.d.ts +0 -28
- package/dist/dts/hooks/useIsForeground.d.ts +0 -11
- package/dist/dts/hooks/useScanditContext.d.ts +0 -21
- package/dist/dts/native/CoreNativeCallerProvider.d.ts +0 -4
- package/dist/dts/native/RNNativeCaller.d.ts +0 -23
- package/dist/dts/native/ScanditNativeModule.d.ts +0 -6
- package/dist/dts/native/initProxy.d.ts +0 -1
- package/dist/dts/private/Defaults.d.ts +0 -1
- package/dist/dts/private/hooks/useMode.d.ts +0 -49
- package/dist/dts/private/hooks/useModeListener.d.ts +0 -40
- package/dist/dts/private/hooks/useNativeControl.d.ts +0 -14
- package/dist/dts/private/hooks/useOverlay.d.ts +0 -68
- package/dist/dts/private/hooks/useStableProp.d.ts +0 -22
- package/dist/dts/private/hooks/useViewHandle.d.ts +0 -41
- package/dist/dts/private/index.d.ts +0 -11
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,2151 @@
|
|
|
1
|
+
import EventEmitter from 'eventemitter3';
|
|
2
|
+
export { default as EventEmitter } from 'eventemitter3';
|
|
3
|
+
|
|
4
|
+
declare enum FontFamily {
|
|
5
|
+
SystemDefault = "systemDefault",
|
|
6
|
+
ModernMono = "modernMono",
|
|
7
|
+
SystemSans = "systemSans"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare enum TextAlignment {
|
|
11
|
+
Left = "left",
|
|
12
|
+
Right = "right",
|
|
13
|
+
Center = "center",
|
|
14
|
+
Start = "start",
|
|
15
|
+
End = "end"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface Serializeable {
|
|
19
|
+
toJSON: () => object;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface StringSerializeable {
|
|
23
|
+
toJSON: () => string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare function ignoreFromSerialization(target: any, propertyName: string): void;
|
|
27
|
+
|
|
28
|
+
declare function nameForSerialization(customName: string): (target: any, propertyName: string) => void;
|
|
29
|
+
|
|
30
|
+
declare function ignoreFromSerializationIfNull(target: any, propertyName: string): void;
|
|
31
|
+
|
|
32
|
+
declare function serializationDefault(defaultValue: any): (target: any, propertyName: string) => void;
|
|
33
|
+
|
|
34
|
+
declare class DefaultSerializeable implements Serializeable {
|
|
35
|
+
toJSON(): object;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface PointJSON {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
}
|
|
42
|
+
interface PrivatePoint {
|
|
43
|
+
fromJSON(json: PointJSON): Point;
|
|
44
|
+
}
|
|
45
|
+
declare class Point extends DefaultSerializeable {
|
|
46
|
+
private _x;
|
|
47
|
+
private _y;
|
|
48
|
+
get x(): number;
|
|
49
|
+
get y(): number;
|
|
50
|
+
private static fromJSON;
|
|
51
|
+
constructor(x: number, y: number);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface QuadrilateralJSON {
|
|
55
|
+
topLeft: PointJSON;
|
|
56
|
+
topRight: PointJSON;
|
|
57
|
+
bottomRight: PointJSON;
|
|
58
|
+
bottomLeft: PointJSON;
|
|
59
|
+
}
|
|
60
|
+
interface PrivateQuadrilateral {
|
|
61
|
+
fromJSON(json: QuadrilateralJSON): Quadrilateral;
|
|
62
|
+
}
|
|
63
|
+
declare class Quadrilateral extends DefaultSerializeable {
|
|
64
|
+
private _topLeft;
|
|
65
|
+
private _topRight;
|
|
66
|
+
private _bottomRight;
|
|
67
|
+
private _bottomLeft;
|
|
68
|
+
get topLeft(): Point;
|
|
69
|
+
get topRight(): Point;
|
|
70
|
+
get bottomRight(): Point;
|
|
71
|
+
get bottomLeft(): Point;
|
|
72
|
+
private static fromJSON;
|
|
73
|
+
constructor(topLeft: Point, topRight: Point, bottomRight: Point, bottomLeft: Point);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare enum MeasureUnit {
|
|
77
|
+
DIP = "dip",
|
|
78
|
+
Pixel = "pixel",
|
|
79
|
+
Fraction = "fraction"
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface NumberWithUnitJSON {
|
|
83
|
+
value: number;
|
|
84
|
+
unit: string;
|
|
85
|
+
}
|
|
86
|
+
interface PrivateNumberWithUnit {
|
|
87
|
+
fromJSON(json: NumberWithUnitJSON): NumberWithUnit;
|
|
88
|
+
}
|
|
89
|
+
declare class NumberWithUnit extends DefaultSerializeable {
|
|
90
|
+
private _value;
|
|
91
|
+
private _unit;
|
|
92
|
+
get value(): number;
|
|
93
|
+
get unit(): MeasureUnit;
|
|
94
|
+
private static fromJSON;
|
|
95
|
+
constructor(value: number, unit: MeasureUnit);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface PointWithUnitJSON {
|
|
99
|
+
x: NumberWithUnitJSON;
|
|
100
|
+
y: NumberWithUnitJSON;
|
|
101
|
+
}
|
|
102
|
+
interface PrivatePointWithUnit {
|
|
103
|
+
readonly zero: PointWithUnit;
|
|
104
|
+
fromJSON(json: PointWithUnitJSON): PointWithUnit;
|
|
105
|
+
}
|
|
106
|
+
declare class PointWithUnit extends DefaultSerializeable {
|
|
107
|
+
private _x;
|
|
108
|
+
private _y;
|
|
109
|
+
get x(): NumberWithUnit;
|
|
110
|
+
get y(): NumberWithUnit;
|
|
111
|
+
private static fromJSON;
|
|
112
|
+
private static get zero();
|
|
113
|
+
constructor(x: NumberWithUnit, y: NumberWithUnit);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface SizeJSON {
|
|
117
|
+
width: number;
|
|
118
|
+
height: number;
|
|
119
|
+
}
|
|
120
|
+
interface PrivateSize {
|
|
121
|
+
fromJSON(json: SizeJSON): Size;
|
|
122
|
+
}
|
|
123
|
+
declare class Size extends DefaultSerializeable {
|
|
124
|
+
private _width;
|
|
125
|
+
private _height;
|
|
126
|
+
get width(): number;
|
|
127
|
+
get height(): number;
|
|
128
|
+
private static fromJSON;
|
|
129
|
+
constructor(width: number, height: number);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
declare class Rect extends DefaultSerializeable {
|
|
133
|
+
private _origin;
|
|
134
|
+
private _size;
|
|
135
|
+
get origin(): Point;
|
|
136
|
+
get size(): Size;
|
|
137
|
+
constructor(origin: Point, size: Size);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
declare class SizeWithUnit extends DefaultSerializeable {
|
|
141
|
+
private _width;
|
|
142
|
+
private _height;
|
|
143
|
+
get width(): NumberWithUnit;
|
|
144
|
+
get height(): NumberWithUnit;
|
|
145
|
+
constructor(width: NumberWithUnit, height: NumberWithUnit);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare class RectWithUnit extends DefaultSerializeable {
|
|
149
|
+
private _origin;
|
|
150
|
+
private _size;
|
|
151
|
+
get origin(): PointWithUnit;
|
|
152
|
+
get size(): SizeWithUnit;
|
|
153
|
+
constructor(origin: PointWithUnit, size: SizeWithUnit);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type ColorJSON = string;
|
|
157
|
+
interface PrivateColor {
|
|
158
|
+
fromJSON(json: ColorJSON): Color;
|
|
159
|
+
}
|
|
160
|
+
declare class Color implements StringSerializeable {
|
|
161
|
+
private hexadecimalString;
|
|
162
|
+
get redComponent(): string;
|
|
163
|
+
get greenComponent(): string;
|
|
164
|
+
get blueComponent(): string;
|
|
165
|
+
get alphaComponent(): string;
|
|
166
|
+
get red(): number;
|
|
167
|
+
get green(): number;
|
|
168
|
+
get blue(): number;
|
|
169
|
+
get alpha(): number;
|
|
170
|
+
static fromHex(hex: string): Color;
|
|
171
|
+
static fromRGBA(red: number, green: number, blue: number, alpha?: number): Color;
|
|
172
|
+
private static hexToNumber;
|
|
173
|
+
private static fromJSON;
|
|
174
|
+
private static numberToHex;
|
|
175
|
+
private static normalizeHex;
|
|
176
|
+
private static normalizeAlpha;
|
|
177
|
+
private constructor();
|
|
178
|
+
withAlpha(alpha: number): Color;
|
|
179
|
+
toJSON(): string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
declare enum ScanditIconShape {
|
|
183
|
+
Circle = "circle",
|
|
184
|
+
Square = "square"
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
declare enum ScanditIconType {
|
|
188
|
+
ArrowRight = "arrowRight",
|
|
189
|
+
ArrowLeft = "arrowLeft",
|
|
190
|
+
ArrowUp = "arrowUp",
|
|
191
|
+
ArrowDown = "arrowDown",
|
|
192
|
+
ToPick = "toPick",
|
|
193
|
+
Checkmark = "checkmark",
|
|
194
|
+
XMark = "xMark",
|
|
195
|
+
QuestionMark = "questionMark",
|
|
196
|
+
ExclamationMark = "exclamationMark",
|
|
197
|
+
LowStock = "lowStock",
|
|
198
|
+
ExpiredItem = "expiredItem",
|
|
199
|
+
WrongItem = "wrongItem",
|
|
200
|
+
FragileItem = "fragileItem",
|
|
201
|
+
StarFilled = "starFilled",
|
|
202
|
+
StarHalfFilled = "starHalfFilled",
|
|
203
|
+
ChevronUp = "chevronUp",
|
|
204
|
+
ChevronDown = "chevronDown",
|
|
205
|
+
ChevronLeft = "chevronLeft",
|
|
206
|
+
ChevronRight = "chevronRight",
|
|
207
|
+
InspectItem = "inspectItem",
|
|
208
|
+
StarOutlined = "starOutlined",
|
|
209
|
+
Print = "print",
|
|
210
|
+
Plus = "plus",
|
|
211
|
+
Minus = "minus",
|
|
212
|
+
Delete = "delete",
|
|
213
|
+
Slash = "slash"
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
type ScanditIconJSON = {
|
|
217
|
+
backgroundColor: Color | null;
|
|
218
|
+
backgroundShape: ScanditIconShape | null;
|
|
219
|
+
icon: ScanditIconType | null;
|
|
220
|
+
iconColor: Color | null;
|
|
221
|
+
backgroundStrokeColor: Color | null;
|
|
222
|
+
backgroundStrokeWidth: number;
|
|
223
|
+
};
|
|
224
|
+
interface PrivateScanditIcon {
|
|
225
|
+
fromJSON(json: ScanditIconJSON): ScanditIcon;
|
|
226
|
+
}
|
|
227
|
+
declare class ScanditIcon extends DefaultSerializeable {
|
|
228
|
+
private _backgroundColor;
|
|
229
|
+
private _backgroundShape;
|
|
230
|
+
private _icon;
|
|
231
|
+
private _iconColor;
|
|
232
|
+
private _backgroundStrokeColor;
|
|
233
|
+
private _backgroundStrokeWidth;
|
|
234
|
+
private static fromJSON;
|
|
235
|
+
constructor(iconColor: Color | null, backgroundColor: Color | null, backgroundShape: ScanditIconShape | null, icon: ScanditIconType | null, backgroundStrokeColor: Color | null, backgroundStrokeWidth: number);
|
|
236
|
+
get backgroundColor(): Color | null;
|
|
237
|
+
get backgroundShape(): ScanditIconShape | null;
|
|
238
|
+
get icon(): ScanditIconType | null;
|
|
239
|
+
get iconColor(): Color | null;
|
|
240
|
+
get backgroundStrokeColor(): Color | null;
|
|
241
|
+
get backgroundStrokeWidth(): number;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
declare class ScanditIconBuilder {
|
|
245
|
+
private _iconColor;
|
|
246
|
+
private _backgroundColor;
|
|
247
|
+
private _backgroundShape;
|
|
248
|
+
private _icon;
|
|
249
|
+
private _backgroundStrokeColor;
|
|
250
|
+
private _backgroundStrokeWidth;
|
|
251
|
+
withIconColor(iconColor: Color | null): ScanditIconBuilder;
|
|
252
|
+
withBackgroundColor(backgroundColor: Color | null): ScanditIconBuilder;
|
|
253
|
+
withBackgroundShape(backgroundShape: ScanditIconShape | null): ScanditIconBuilder;
|
|
254
|
+
withIcon(iconType: ScanditIconType | null): ScanditIconBuilder;
|
|
255
|
+
withBackgroundStrokeColor(backgroundStrokeColor: Color | null): ScanditIconBuilder;
|
|
256
|
+
withBackgroundStrokeWidth(backgroundStrokeWidth: number): ScanditIconBuilder;
|
|
257
|
+
build(): ScanditIcon;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
declare class SizeWithAspect extends DefaultSerializeable {
|
|
261
|
+
private _size;
|
|
262
|
+
private _aspect;
|
|
263
|
+
get size(): NumberWithUnit;
|
|
264
|
+
get aspect(): number;
|
|
265
|
+
constructor(size: NumberWithUnit, aspect: number);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
declare enum SizingMode {
|
|
269
|
+
WidthAndHeight = "widthAndHeight",
|
|
270
|
+
WidthAndAspectRatio = "widthAndAspectRatio",
|
|
271
|
+
HeightAndAspectRatio = "heightAndAspectRatio",
|
|
272
|
+
ShorterDimensionAndAspectRatio = "shorterDimensionAndAspectRatio"
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
interface SizeWithUnitAndAspectJSON {
|
|
276
|
+
width?: NumberWithUnitJSON;
|
|
277
|
+
height?: NumberWithUnitJSON;
|
|
278
|
+
shorterDimension?: NumberWithUnitJSON;
|
|
279
|
+
aspect?: number;
|
|
280
|
+
}
|
|
281
|
+
interface PrivateSizeWithUnitAndAspect {
|
|
282
|
+
fromJSON(json: SizeWithUnitAndAspectJSON): SizeWithUnitAndAspect;
|
|
283
|
+
}
|
|
284
|
+
declare class SizeWithUnitAndAspect implements Serializeable {
|
|
285
|
+
private _widthAndHeight;
|
|
286
|
+
private _widthAndAspectRatio;
|
|
287
|
+
private _heightAndAspectRatio;
|
|
288
|
+
private _shorterDimensionAndAspectRatio;
|
|
289
|
+
get widthAndHeight(): SizeWithUnit | null;
|
|
290
|
+
get widthAndAspectRatio(): SizeWithAspect | null;
|
|
291
|
+
get heightAndAspectRatio(): SizeWithAspect | null;
|
|
292
|
+
get shorterDimensionAndAspectRatio(): SizeWithAspect | null;
|
|
293
|
+
get sizingMode(): SizingMode;
|
|
294
|
+
private static sizeWithWidthAndHeight;
|
|
295
|
+
private static sizeWithWidthAndAspectRatio;
|
|
296
|
+
private static sizeWithHeightAndAspectRatio;
|
|
297
|
+
private static sizeWithShorterDimensionAndAspectRatio;
|
|
298
|
+
private static fromJSON;
|
|
299
|
+
toJSON(): object;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
interface MarginsWithUnitJSON {
|
|
303
|
+
left: NumberWithUnitJSON;
|
|
304
|
+
right: NumberWithUnitJSON;
|
|
305
|
+
top: NumberWithUnitJSON;
|
|
306
|
+
bottom: NumberWithUnitJSON;
|
|
307
|
+
}
|
|
308
|
+
interface PrivateMarginsWithUnit {
|
|
309
|
+
readonly zero: MarginsWithUnit;
|
|
310
|
+
fromJSON(json: MarginsWithUnitJSON): MarginsWithUnit;
|
|
311
|
+
}
|
|
312
|
+
declare class MarginsWithUnit extends DefaultSerializeable {
|
|
313
|
+
private _left;
|
|
314
|
+
private _right;
|
|
315
|
+
private _top;
|
|
316
|
+
private _bottom;
|
|
317
|
+
get left(): NumberWithUnit;
|
|
318
|
+
get right(): NumberWithUnit;
|
|
319
|
+
get top(): NumberWithUnit;
|
|
320
|
+
get bottom(): NumberWithUnit;
|
|
321
|
+
private static fromJSON;
|
|
322
|
+
private static get zero();
|
|
323
|
+
constructor(left: NumberWithUnit, right: NumberWithUnit, top: NumberWithUnit, bottom: NumberWithUnit);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
interface PrivateBrush {
|
|
327
|
+
readonly copy: Brush;
|
|
328
|
+
defaults: unknown;
|
|
329
|
+
fromJSON(json: unknown): Brush;
|
|
330
|
+
toJSON(): BrushJSON;
|
|
331
|
+
}
|
|
332
|
+
interface BrushJSON {
|
|
333
|
+
fill: {
|
|
334
|
+
color: Color;
|
|
335
|
+
};
|
|
336
|
+
stroke: {
|
|
337
|
+
color: Color;
|
|
338
|
+
width: number;
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
declare class Brush extends DefaultSerializeable {
|
|
342
|
+
private static defaults;
|
|
343
|
+
private fill;
|
|
344
|
+
private stroke;
|
|
345
|
+
static get transparent(): Brush;
|
|
346
|
+
get fillColor(): Color;
|
|
347
|
+
get strokeColor(): Color;
|
|
348
|
+
get strokeWidth(): number;
|
|
349
|
+
private get copy();
|
|
350
|
+
private static fromJSON;
|
|
351
|
+
constructor();
|
|
352
|
+
constructor(fillColor: Color, strokeColor: Color, strokeWidth: number);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
declare enum Anchor {
|
|
356
|
+
TopLeft = "topLeft",
|
|
357
|
+
TopCenter = "topCenter",
|
|
358
|
+
TopRight = "topRight",
|
|
359
|
+
CenterLeft = "centerLeft",
|
|
360
|
+
Center = "center",
|
|
361
|
+
CenterRight = "centerRight",
|
|
362
|
+
BottomLeft = "bottomLeft",
|
|
363
|
+
BottomCenter = "bottomCenter",
|
|
364
|
+
BottomRight = "bottomRight"
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
declare enum Orientation {
|
|
368
|
+
Unknown = "unknown",
|
|
369
|
+
Portrait = "portrait",
|
|
370
|
+
PortraitUpsideDown = "portraitUpsideDown",
|
|
371
|
+
LandscapeRight = "landscapeRight",
|
|
372
|
+
LandscapeLeft = "landscapeLeft"
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
declare enum Direction {
|
|
376
|
+
None = "none",
|
|
377
|
+
Horizontal = "horizontal",
|
|
378
|
+
LeftToRight = "leftToRight",
|
|
379
|
+
RightToLeft = "rightToLeft",
|
|
380
|
+
Vertical = "vertical",
|
|
381
|
+
TopToBottom = "topToBottom",
|
|
382
|
+
BottomToTop = "bottomToTop"
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
declare enum ScanIntention {
|
|
386
|
+
Manual = "manual",
|
|
387
|
+
Smart = "smart",
|
|
388
|
+
/**
|
|
389
|
+
* @deprecated Use SelectionMode.Auto instead. Will be removed in 9.0.
|
|
390
|
+
*/
|
|
391
|
+
SmartSelection = "smartSelection"
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
declare enum SelectionMode {
|
|
395
|
+
Off = "off",
|
|
396
|
+
On = "on",
|
|
397
|
+
Auto = "auto"
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
declare enum CameraPosition {
|
|
401
|
+
WorldFacing = "worldFacing",
|
|
402
|
+
UserFacing = "userFacing",
|
|
403
|
+
Unspecified = "unspecified"
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
declare enum FrameSourceState {
|
|
407
|
+
On = "on",
|
|
408
|
+
Off = "off",
|
|
409
|
+
Starting = "starting",
|
|
410
|
+
Stopping = "stopping",
|
|
411
|
+
Standby = "standby",
|
|
412
|
+
BootingUp = "bootingUp",
|
|
413
|
+
WakingUp = "wakingUp",
|
|
414
|
+
GoingToSleep = "goingToSleep",
|
|
415
|
+
ShuttingDown = "shuttingDown"
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
interface DidChangeSizeEventPayload {
|
|
419
|
+
viewId: number;
|
|
420
|
+
size: SizeJSON;
|
|
421
|
+
orientation: string;
|
|
422
|
+
}
|
|
423
|
+
interface DidChangeStatusEventPayload {
|
|
424
|
+
status: string;
|
|
425
|
+
}
|
|
426
|
+
interface DidChangeStateEventPayload {
|
|
427
|
+
state: string;
|
|
428
|
+
}
|
|
429
|
+
interface EventPayload {
|
|
430
|
+
name: string;
|
|
431
|
+
data: string;
|
|
432
|
+
viewId?: number;
|
|
433
|
+
modeId?: number;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Symbol returned by parseIfShouldHandle when an event should be skipped
|
|
437
|
+
* (filtered out based on viewId/modeId mismatch).
|
|
438
|
+
*/
|
|
439
|
+
declare const SKIP: unique symbol;
|
|
440
|
+
declare class EventDataParser {
|
|
441
|
+
private static parse;
|
|
442
|
+
/**
|
|
443
|
+
* Check if an event should be handled based on viewId/modeId filtering.
|
|
444
|
+
* Used by React Native new architecture for pre-parse filtering to avoid
|
|
445
|
+
* unnecessary JSON parsing of events not intended for this consumer.
|
|
446
|
+
*
|
|
447
|
+
* @param ev The event payload to check
|
|
448
|
+
* @param ids Object containing optional viewId and/or modeId to match against
|
|
449
|
+
* @returns true if the event should be handled, false if it should be skipped
|
|
450
|
+
*/
|
|
451
|
+
static shouldHandle(ev: EventPayload, ids: {
|
|
452
|
+
viewId?: number;
|
|
453
|
+
modeId?: number;
|
|
454
|
+
}): boolean;
|
|
455
|
+
/**
|
|
456
|
+
* Parse event data if it should be handled, otherwise return SKIP.
|
|
457
|
+
*
|
|
458
|
+
* Filtering is performed in two stages:
|
|
459
|
+
* 1. Pre-parse: if the event wrapper carries viewId/modeId, skip parsing entirely on mismatch.
|
|
460
|
+
* 2. Post-parse: verify the parsed payload's viewId/modeId matches the expected ids.
|
|
461
|
+
*
|
|
462
|
+
* @param ev The event payload to check and parse
|
|
463
|
+
* @param ids Object containing optional viewId and/or modeId to match against
|
|
464
|
+
* @returns SKIP if filtered out, null if parse failed, or parsed data
|
|
465
|
+
*/
|
|
466
|
+
static parseIfShouldHandle<T>(ev: EventPayload, ids: {
|
|
467
|
+
viewId?: number;
|
|
468
|
+
modeId?: number;
|
|
469
|
+
}): T | null | typeof SKIP;
|
|
470
|
+
}
|
|
471
|
+
interface NativeCallResult {
|
|
472
|
+
data: string;
|
|
473
|
+
}
|
|
474
|
+
interface FrameSourceDidChangeStateEventPayload {
|
|
475
|
+
state: FrameSourceState;
|
|
476
|
+
cameraPosition: CameraPosition;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
interface PropertyChangeListener {
|
|
480
|
+
(property: string, value: any): void;
|
|
481
|
+
}
|
|
482
|
+
declare class Observable extends DefaultSerializeable {
|
|
483
|
+
private listeners;
|
|
484
|
+
addListener(listener: PropertyChangeListener): void;
|
|
485
|
+
removeListener(listener: PropertyChangeListener): void;
|
|
486
|
+
protected notifyListeners(property: string, value: any): void;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
declare class HtmlElementPosition {
|
|
490
|
+
readonly top: number;
|
|
491
|
+
readonly left: number;
|
|
492
|
+
constructor(top: number, left: number);
|
|
493
|
+
didChangeComparedTo(other: HtmlElementPosition | null): boolean;
|
|
494
|
+
}
|
|
495
|
+
declare class HtmlElementSize {
|
|
496
|
+
readonly width: number;
|
|
497
|
+
readonly height: number;
|
|
498
|
+
constructor(width: number, height: number);
|
|
499
|
+
didChangeComparedTo(other: HtmlElementSize | null): boolean;
|
|
500
|
+
}
|
|
501
|
+
declare class HTMLElementState {
|
|
502
|
+
isShown: boolean;
|
|
503
|
+
position: HtmlElementPosition | null;
|
|
504
|
+
size: HtmlElementSize | null;
|
|
505
|
+
shouldBeUnderContent: boolean;
|
|
506
|
+
get isValid(): boolean;
|
|
507
|
+
didChangeComparedTo(other: HTMLElementState | null): boolean;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
interface FocusGestureListener {
|
|
511
|
+
didFocusGesture?(focusGesture: FocusGesture, point: PointWithUnit): void;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
interface FocusGesture {
|
|
515
|
+
showUIIndicator: boolean;
|
|
516
|
+
addListener(listener: FocusGestureListener): void;
|
|
517
|
+
removeListener(listener: FocusGestureListener): void;
|
|
518
|
+
triggerFocus(point: PointWithUnit): Promise<void>;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
declare enum FocusGestureStrategy {
|
|
522
|
+
None = "none",
|
|
523
|
+
Manual = "manual",
|
|
524
|
+
ManualUntilCapture = "manualUntilCapture",
|
|
525
|
+
AutoOnLocation = "autoOnLocation"
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
declare enum FocusRange {
|
|
529
|
+
Full = "full",
|
|
530
|
+
Near = "near",
|
|
531
|
+
Far = "far"
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
declare enum LogoStyle {
|
|
535
|
+
Minimal = "minimal",
|
|
536
|
+
Extended = "extended"
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
declare enum MacroMode {
|
|
540
|
+
Auto = "auto",
|
|
541
|
+
Off = "off",
|
|
542
|
+
On = "on"
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
declare enum VideoResolution {
|
|
546
|
+
/** @deprecated Auto is deprecated. Please use the capture mode's recommendedCameraSettings for the best results. */
|
|
547
|
+
Auto = "auto",
|
|
548
|
+
HD = "hd",
|
|
549
|
+
FullHD = "fullHd",
|
|
550
|
+
UHD4K = "uhd4k"
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
interface ZoomGestureListener {
|
|
554
|
+
didZoomInGesture?(zoomGesture: ZoomGesture): void;
|
|
555
|
+
didZoomOutGesture?(zoomGesture: ZoomGesture): void;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
interface ZoomGesture {
|
|
559
|
+
addListener(listener: ZoomGestureListener): void;
|
|
560
|
+
removeListener(listener: ZoomGestureListener): void;
|
|
561
|
+
triggerZoomIn(): Promise<void>;
|
|
562
|
+
triggerZoomOut(): Promise<void>;
|
|
563
|
+
}
|
|
564
|
+
interface ZoomGestureJSON {
|
|
565
|
+
type: string;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
declare enum ZoomSwitchOrientation {
|
|
569
|
+
Default = "default",
|
|
570
|
+
Horizontal = "horizontal",
|
|
571
|
+
Vertical = "vertical"
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
interface RectangularViewfinderAnimationJSON {
|
|
575
|
+
readonly looping: boolean;
|
|
576
|
+
}
|
|
577
|
+
interface PrivateRectangularViewfinderAnimation {
|
|
578
|
+
fromJSON(json: RectangularViewfinderAnimationJSON): RectangularViewfinderAnimation;
|
|
579
|
+
}
|
|
580
|
+
declare class RectangularViewfinderAnimation extends DefaultSerializeable {
|
|
581
|
+
private readonly _isLooping;
|
|
582
|
+
private static fromJSON;
|
|
583
|
+
get isLooping(): boolean;
|
|
584
|
+
constructor(isLooping: boolean);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
declare enum RectangularViewfinderLineStyle {
|
|
588
|
+
Light = "light",
|
|
589
|
+
Bold = "bold"
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
declare enum RectangularViewfinderStyle {
|
|
593
|
+
Rounded = "rounded",
|
|
594
|
+
Square = "square"
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
interface CameraSettingsDefaults {
|
|
598
|
+
preferredResolution: VideoResolution;
|
|
599
|
+
zoomFactor: number;
|
|
600
|
+
focusRange: FocusRange;
|
|
601
|
+
zoomGestureZoomFactor: number;
|
|
602
|
+
focusGestureStrategy: FocusGestureStrategy;
|
|
603
|
+
shouldPreferSmoothAutoFocus: boolean;
|
|
604
|
+
manualLensPosition: number;
|
|
605
|
+
focusStrategy: string;
|
|
606
|
+
zoomLevels: number[];
|
|
607
|
+
torchLevel: number;
|
|
608
|
+
macroMode: MacroMode;
|
|
609
|
+
adaptiveExposure: boolean;
|
|
610
|
+
properties: {
|
|
611
|
+
[key: string]: unknown;
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
interface ZoomSwitchControlDefaults {
|
|
615
|
+
orientation: ZoomSwitchOrientation;
|
|
616
|
+
isAlwaysExpanded: boolean;
|
|
617
|
+
isExpanded: boolean;
|
|
618
|
+
accessibilityLabel: string;
|
|
619
|
+
accessibilityHint: string;
|
|
620
|
+
}
|
|
621
|
+
interface CoreDefaults {
|
|
622
|
+
Camera: {
|
|
623
|
+
Settings: CameraSettingsDefaults;
|
|
624
|
+
defaultPosition: CameraPosition | null;
|
|
625
|
+
availablePositions: CameraPosition[];
|
|
626
|
+
};
|
|
627
|
+
ZoomSwitchControl: ZoomSwitchControlDefaults;
|
|
628
|
+
DataCaptureView: {
|
|
629
|
+
scanAreaMargins: MarginsWithUnit;
|
|
630
|
+
pointOfInterest: PointWithUnit;
|
|
631
|
+
logoAnchor: Anchor;
|
|
632
|
+
logoOffset: PointWithUnit;
|
|
633
|
+
focusGesture: FocusGesture | null;
|
|
634
|
+
zoomGesture: ZoomGesture | null;
|
|
635
|
+
zoomGestures: ZoomGesture[];
|
|
636
|
+
logoStyle: LogoStyle;
|
|
637
|
+
shouldShowZoomNotification?: boolean;
|
|
638
|
+
};
|
|
639
|
+
RectangularViewfinder: {
|
|
640
|
+
defaultStyle: string;
|
|
641
|
+
styles: {
|
|
642
|
+
[key: string]: {
|
|
643
|
+
size: SizeWithUnitAndAspect;
|
|
644
|
+
color: Color;
|
|
645
|
+
style: RectangularViewfinderStyle;
|
|
646
|
+
lineStyle: RectangularViewfinderLineStyle;
|
|
647
|
+
dimming: string;
|
|
648
|
+
disabledDimming: string;
|
|
649
|
+
animation: RectangularViewfinderAnimation | null;
|
|
650
|
+
disabledColor: Color;
|
|
651
|
+
};
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
AimerViewfinder: {
|
|
655
|
+
frameColor: Color;
|
|
656
|
+
dotColor: Color;
|
|
657
|
+
};
|
|
658
|
+
LaserlineViewfinder: {
|
|
659
|
+
width: NumberWithUnit;
|
|
660
|
+
enabledColor: Color;
|
|
661
|
+
disabledColor: Color;
|
|
662
|
+
};
|
|
663
|
+
Brush: Brush;
|
|
664
|
+
deviceID: string | null;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
declare function getCoreDefaults(): CoreDefaults;
|
|
668
|
+
|
|
669
|
+
declare function setCoreDefaultsLoader(loader: () => void): void;
|
|
670
|
+
declare function ensureCoreDefaults(): CoreDefaults;
|
|
671
|
+
declare function loadCoreDefaults(jsonDefaults: unknown): void;
|
|
672
|
+
|
|
673
|
+
interface ContextStatusJSON {
|
|
674
|
+
code: number;
|
|
675
|
+
isValid: boolean;
|
|
676
|
+
message: string;
|
|
677
|
+
}
|
|
678
|
+
interface PrivateContextStatus {
|
|
679
|
+
fromJSON(json: ContextStatusJSON): ContextStatus;
|
|
680
|
+
}
|
|
681
|
+
declare class ContextStatus {
|
|
682
|
+
private _message;
|
|
683
|
+
private _code;
|
|
684
|
+
private _isValid;
|
|
685
|
+
private static fromJSON;
|
|
686
|
+
get message(): string;
|
|
687
|
+
get code(): number;
|
|
688
|
+
get isValid(): boolean;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
declare enum FocusGestureListenerEvents {
|
|
692
|
+
onFocusGesture = "FocusGestureListener.onFocusGesture"
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
interface PrivateTapToFocus {
|
|
696
|
+
listeners: FocusGestureListener[];
|
|
697
|
+
onListenersChanged?(): void;
|
|
698
|
+
_controller?: DataCaptureViewController | null;
|
|
699
|
+
}
|
|
700
|
+
declare class TapToFocus extends DefaultSerializeable implements FocusGesture {
|
|
701
|
+
private type;
|
|
702
|
+
showUIIndicator: boolean;
|
|
703
|
+
private listeners;
|
|
704
|
+
private onListenersChanged?;
|
|
705
|
+
private _controller?;
|
|
706
|
+
constructor();
|
|
707
|
+
addListener(listener: FocusGestureListener): void;
|
|
708
|
+
removeListener(listener: FocusGestureListener): void;
|
|
709
|
+
triggerFocus(point: PointWithUnit): Promise<void>;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
interface FocusGestureJSON {
|
|
713
|
+
type: string;
|
|
714
|
+
}
|
|
715
|
+
declare class PrivateFocusGestureDeserializer {
|
|
716
|
+
static fromJSON(json: FocusGestureJSON | null): FocusGesture | null;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
declare class PrivateZoomGestureDeserializer {
|
|
720
|
+
static fromJSON(json: ZoomGestureJSON | null): ZoomGesture | null;
|
|
721
|
+
static fromJSONArray(jsonArray: ZoomGestureJSON[]): ZoomGesture[];
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
declare enum ZoomGestureListenerEvents {
|
|
725
|
+
onZoomInGesture = "ZoomGestureListener.onZoomInGesture",
|
|
726
|
+
onZoomOutGesture = "ZoomGestureListener.onZoomOutGesture"
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
interface FrameSourceListener {
|
|
730
|
+
didChangeState?(frameSource: FrameSource, newState: FrameSourceState): void;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
interface FrameSource extends Serializeable {
|
|
734
|
+
readonly desiredState: FrameSourceState;
|
|
735
|
+
switchToDesiredState(desiredState: FrameSourceState): Promise<void>;
|
|
736
|
+
getCurrentState(): Promise<FrameSourceState>;
|
|
737
|
+
addListener(listener: FrameSourceListener): void;
|
|
738
|
+
removeListener(listener: FrameSourceListener): void;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
declare enum TorchState {
|
|
742
|
+
On = "on",
|
|
743
|
+
Off = "off",
|
|
744
|
+
Auto = "auto"
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
interface TorchListener {
|
|
748
|
+
didChangeTorchToState?(state: TorchState): void;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
interface MacroModeListener {
|
|
752
|
+
didChangeMacroMode?(macroMode: MacroMode): void;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
interface ZoomListener {
|
|
756
|
+
didChangeZoomLevel?(oldZoomLevel: number, newZoomLevel: number): void;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
declare class ImageBuffer {
|
|
760
|
+
private _width;
|
|
761
|
+
private _height;
|
|
762
|
+
private _data;
|
|
763
|
+
get width(): number;
|
|
764
|
+
get height(): number;
|
|
765
|
+
get data(): string;
|
|
766
|
+
}
|
|
767
|
+
interface PrivateImageBuffer {
|
|
768
|
+
_width: number;
|
|
769
|
+
_height: number;
|
|
770
|
+
_data: string;
|
|
771
|
+
}
|
|
772
|
+
interface ImageBufferJSON {
|
|
773
|
+
width: number;
|
|
774
|
+
height: number;
|
|
775
|
+
data: string;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
interface FrameData {
|
|
779
|
+
readonly imageBuffers: ImageBuffer[];
|
|
780
|
+
readonly imageBuffer: ImageBuffer;
|
|
781
|
+
readonly orientation: number;
|
|
782
|
+
readonly timestamp: number;
|
|
783
|
+
}
|
|
784
|
+
interface FrameDataJSON {
|
|
785
|
+
imageBuffers: ImageBufferJSON[];
|
|
786
|
+
orientation: number;
|
|
787
|
+
timestamp?: number;
|
|
788
|
+
}
|
|
789
|
+
declare class PrivateFrameData implements FrameData {
|
|
790
|
+
private _imageBuffers;
|
|
791
|
+
private _orientation;
|
|
792
|
+
private _timestamp;
|
|
793
|
+
get imageBuffers(): ImageBuffer[];
|
|
794
|
+
get imageBuffer(): ImageBuffer;
|
|
795
|
+
get orientation(): number;
|
|
796
|
+
get timestamp(): number;
|
|
797
|
+
static fromJSON(json: FrameDataJSON): FrameData;
|
|
798
|
+
static empty(): FrameData;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
declare class FrameDataSettings extends DefaultSerializeable {
|
|
802
|
+
private _isFileSystemCacheEnabled;
|
|
803
|
+
private _imageQuality;
|
|
804
|
+
private _isAutoRotateEnabled;
|
|
805
|
+
constructor();
|
|
806
|
+
get isFileSystemCacheEnabled(): boolean;
|
|
807
|
+
set isFileSystemCacheEnabled(enabled: boolean);
|
|
808
|
+
get imageQuality(): number;
|
|
809
|
+
set imageQuality(quality: number);
|
|
810
|
+
get isAutoRotateEnabled(): boolean;
|
|
811
|
+
set isAutoRotateEnabled(enabled: boolean);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
declare class FrameDataSettingsBuilder {
|
|
815
|
+
private settings;
|
|
816
|
+
constructor(settings: FrameDataSettings);
|
|
817
|
+
enableFileSystemCache(enabled: boolean): FrameDataSettingsBuilder;
|
|
818
|
+
setImageQuality(quality: number): FrameDataSettingsBuilder;
|
|
819
|
+
enableAutoRotate(enabled: boolean): FrameDataSettingsBuilder;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
declare class BaseController<PROXY> {
|
|
823
|
+
private _cachedProxy;
|
|
824
|
+
protected get _proxy(): PROXY;
|
|
825
|
+
constructor(proxyName: string);
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
interface BaseProxy {
|
|
829
|
+
subscribeForEvents(events: string[]): void;
|
|
830
|
+
unsubscribeFromEvents(events: string[]): void;
|
|
831
|
+
dispose(): void;
|
|
832
|
+
eventEmitter: EventEmitter;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* The datacapture core module
|
|
837
|
+
* Generated from schema definition.
|
|
838
|
+
*
|
|
839
|
+
* Single entry point interface - all operations go through $executeCore.
|
|
840
|
+
* The CoreController handles method-specific logic and calls this proxy.
|
|
841
|
+
* The NativeProxy automatically handles the `$` prefix for native method calls.
|
|
842
|
+
*/
|
|
843
|
+
interface CoreProxy extends BaseProxy {
|
|
844
|
+
/**
|
|
845
|
+
* Single entry point for all Core operations.
|
|
846
|
+
* Routes to appropriate native command based on moduleName and methodName.
|
|
847
|
+
*
|
|
848
|
+
* @param params Object containing:
|
|
849
|
+
* - moduleName: The name of the module to execute against
|
|
850
|
+
* - methodName: The name of the method to execute
|
|
851
|
+
* - ...other parameters specific to the method
|
|
852
|
+
*
|
|
853
|
+
* @returns Promise resolving to the result (type depends on methodName)
|
|
854
|
+
*
|
|
855
|
+
* Note: This method is called with the `$` prefix ($executeCore) which is
|
|
856
|
+
* automatically handled by NativeProxy to route to native implementation.
|
|
857
|
+
*/
|
|
858
|
+
$executeCore(params: {
|
|
859
|
+
moduleName: string;
|
|
860
|
+
methodName: string;
|
|
861
|
+
[key: string]: any;
|
|
862
|
+
}): Promise<any>;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Adapter class for Core operations.
|
|
867
|
+
* Provides typed methods that internally call $executeCore.
|
|
868
|
+
* Generated from schema definition to ensure parameter and method name consistency.
|
|
869
|
+
*/
|
|
870
|
+
declare class CoreProxyAdapter {
|
|
871
|
+
private proxy;
|
|
872
|
+
constructor(proxy: CoreProxy);
|
|
873
|
+
/**
|
|
874
|
+
* Gets the camera state for a given position
|
|
875
|
+
* @param cameraPosition Camera position as JSON string
|
|
876
|
+
*/
|
|
877
|
+
getCameraState({ cameraPosition }: {
|
|
878
|
+
cameraPosition: string;
|
|
879
|
+
}): Promise<FrameSourceState>;
|
|
880
|
+
/**
|
|
881
|
+
* Switches the camera to the desired state
|
|
882
|
+
* @param stateJson Desired camera state as JSON string
|
|
883
|
+
*/
|
|
884
|
+
switchCameraToDesiredState({ stateJson }: {
|
|
885
|
+
stateJson: string;
|
|
886
|
+
}): Promise<void>;
|
|
887
|
+
/**
|
|
888
|
+
* Checks if torch is available for the given camera position
|
|
889
|
+
* @param cameraPosition Camera position as JSON string
|
|
890
|
+
*/
|
|
891
|
+
isTorchAvailable({ cameraPosition }: {
|
|
892
|
+
cameraPosition: string;
|
|
893
|
+
}): Promise<boolean>;
|
|
894
|
+
/**
|
|
895
|
+
* Checks if macro mode is available for the current device
|
|
896
|
+
*/
|
|
897
|
+
isMacroModeAvailable(): Promise<boolean>;
|
|
898
|
+
/**
|
|
899
|
+
* Registers a persistent listener for frame source state change events
|
|
900
|
+
*/
|
|
901
|
+
registerFrameSourceListener(): Promise<void>;
|
|
902
|
+
/**
|
|
903
|
+
* Unregisters the frame source event listener
|
|
904
|
+
*/
|
|
905
|
+
unregisterFrameSourceListener(): Promise<void>;
|
|
906
|
+
/**
|
|
907
|
+
* Adds an NV21 frame to the tracked sequence frame source with the given id
|
|
908
|
+
* @param frameSourceId The id of the sequence frame source the frame is added to
|
|
909
|
+
* @param width Frame width in pixels
|
|
910
|
+
* @param height Frame height in pixels
|
|
911
|
+
* @param frameData Base64-encoded NV21 frame bytes
|
|
912
|
+
*/
|
|
913
|
+
addFrameToSequenceFrameSource({ frameSourceId, width, height, frameData, }: {
|
|
914
|
+
frameSourceId: string;
|
|
915
|
+
width: number;
|
|
916
|
+
height: number;
|
|
917
|
+
frameData: string;
|
|
918
|
+
}): Promise<void>;
|
|
919
|
+
/**
|
|
920
|
+
* Returns the current state of the tracked sequence frame source with the given id
|
|
921
|
+
* @param frameSourceId The id of the sequence frame source to get the state of
|
|
922
|
+
*/
|
|
923
|
+
getSequenceFrameSourceState({ frameSourceId }: {
|
|
924
|
+
frameSourceId: string;
|
|
925
|
+
}): Promise<FrameSourceState>;
|
|
926
|
+
/**
|
|
927
|
+
* Registers a persistent listener for torch state change events
|
|
928
|
+
*/
|
|
929
|
+
registerTorchStateListener(): Promise<void>;
|
|
930
|
+
/**
|
|
931
|
+
* Unregisters the torch state event listener
|
|
932
|
+
*/
|
|
933
|
+
unregisterTorchStateListener(): Promise<void>;
|
|
934
|
+
/**
|
|
935
|
+
* Registers a persistent listener for zoom level change events
|
|
936
|
+
*/
|
|
937
|
+
registerZoomLevelListener(): Promise<void>;
|
|
938
|
+
/**
|
|
939
|
+
* Unregisters the zoom level event listener
|
|
940
|
+
*/
|
|
941
|
+
unregisterZoomLevelListener(): Promise<void>;
|
|
942
|
+
/**
|
|
943
|
+
* Selects the zoom level on the ZoomSwitchControl. Returns the actual zoom level applied.
|
|
944
|
+
* @param viewId View identifier
|
|
945
|
+
* @param zoomLevel Desired zoom level as a zoom factor
|
|
946
|
+
*/
|
|
947
|
+
selectZoomLevel({ viewId, zoomLevel }: {
|
|
948
|
+
viewId: number;
|
|
949
|
+
zoomLevel: number;
|
|
950
|
+
}): Promise<number>;
|
|
951
|
+
/**
|
|
952
|
+
* Registers a persistent listener for macro mode change events
|
|
953
|
+
*/
|
|
954
|
+
registerMacroModeListener(): Promise<void>;
|
|
955
|
+
/**
|
|
956
|
+
* Unregisters the macro mode event listener
|
|
957
|
+
*/
|
|
958
|
+
unregisterMacroModeListener(): Promise<void>;
|
|
959
|
+
/**
|
|
960
|
+
* Gets the last frame data by frame ID as JSON
|
|
961
|
+
* @param frameId Unique frame identifier
|
|
962
|
+
*/
|
|
963
|
+
getLastFrameAsJson({ frameId }: {
|
|
964
|
+
frameId: string;
|
|
965
|
+
}): Promise<string>;
|
|
966
|
+
/**
|
|
967
|
+
* Gets the last frame data by frame ID as JSON, or null if not found
|
|
968
|
+
* @param frameId Unique frame identifier
|
|
969
|
+
*/
|
|
970
|
+
getLastFrameOrNullAsJson({ frameId }: {
|
|
971
|
+
frameId: string;
|
|
972
|
+
}): Promise<string | null>;
|
|
973
|
+
/**
|
|
974
|
+
* Creates a DataCaptureContext from JSON
|
|
975
|
+
* @param contextJson DataCaptureContext configuration as JSON string
|
|
976
|
+
*/
|
|
977
|
+
createContextFromJson({ contextJson }: {
|
|
978
|
+
contextJson: string;
|
|
979
|
+
}): Promise<void>;
|
|
980
|
+
/**
|
|
981
|
+
* Updates a DataCaptureContext from JSON
|
|
982
|
+
* @param contextJson Updated DataCaptureContext configuration as JSON string
|
|
983
|
+
*/
|
|
984
|
+
updateContextFromJson({ contextJson }: {
|
|
985
|
+
contextJson: string;
|
|
986
|
+
}): Promise<void>;
|
|
987
|
+
/**
|
|
988
|
+
* Subscribes to context events with persistent listener
|
|
989
|
+
*/
|
|
990
|
+
subscribeContextListener(): Promise<void>;
|
|
991
|
+
/**
|
|
992
|
+
* Unsubscribes from context events
|
|
993
|
+
*/
|
|
994
|
+
unsubscribeContextListener(): Promise<void>;
|
|
995
|
+
/**
|
|
996
|
+
* Adds a mode to the DataCaptureContext
|
|
997
|
+
* @param modeJson Mode configuration as JSON string
|
|
998
|
+
*/
|
|
999
|
+
addModeToContext({ modeJson }: {
|
|
1000
|
+
modeJson: string;
|
|
1001
|
+
}): Promise<void>;
|
|
1002
|
+
/**
|
|
1003
|
+
* Removes a mode from the DataCaptureContext
|
|
1004
|
+
* @param modeJson Mode configuration as JSON string
|
|
1005
|
+
*/
|
|
1006
|
+
removeModeFromContext({ modeJson }: {
|
|
1007
|
+
modeJson: string;
|
|
1008
|
+
}): Promise<void>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Removes all modes from the DataCaptureContext
|
|
1011
|
+
*/
|
|
1012
|
+
removeAllModes(): Promise<void>;
|
|
1013
|
+
/**
|
|
1014
|
+
* Gets open source software license information
|
|
1015
|
+
*/
|
|
1016
|
+
getOpenSourceSoftwareLicenseInfo(): Promise<string>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Disposes the DataCaptureContext and releases resources
|
|
1019
|
+
*/
|
|
1020
|
+
disposeContext(): Promise<void>;
|
|
1021
|
+
/**
|
|
1022
|
+
* Converts a point from frame coordinates to view coordinates
|
|
1023
|
+
* @param viewId View identifier
|
|
1024
|
+
* @param pointJson Point in frame coordinates as JSON string
|
|
1025
|
+
*/
|
|
1026
|
+
viewPointForFramePoint({ viewId, pointJson }: {
|
|
1027
|
+
viewId: number;
|
|
1028
|
+
pointJson: string;
|
|
1029
|
+
}): Promise<string>;
|
|
1030
|
+
/**
|
|
1031
|
+
* Converts a quadrilateral from frame coordinates to view coordinates
|
|
1032
|
+
* @param viewId View identifier
|
|
1033
|
+
* @param quadrilateralJson Quadrilateral in frame coordinates as JSON string
|
|
1034
|
+
*/
|
|
1035
|
+
viewQuadrilateralForFrameQuadrilateral({ viewId, quadrilateralJson, }: {
|
|
1036
|
+
viewId: number;
|
|
1037
|
+
quadrilateralJson: string;
|
|
1038
|
+
}): Promise<string>;
|
|
1039
|
+
/**
|
|
1040
|
+
* Registers persistent event listener for view events
|
|
1041
|
+
* @param viewId View identifier
|
|
1042
|
+
*/
|
|
1043
|
+
registerListenerForViewEvents({ viewId }: {
|
|
1044
|
+
viewId: number;
|
|
1045
|
+
}): Promise<void>;
|
|
1046
|
+
/**
|
|
1047
|
+
* Unregisters the view event listener
|
|
1048
|
+
* @param viewId View identifier
|
|
1049
|
+
*/
|
|
1050
|
+
unregisterListenerForViewEvents({ viewId }: {
|
|
1051
|
+
viewId: number;
|
|
1052
|
+
}): Promise<void>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Registers a persistent listener for focus gesture events
|
|
1055
|
+
* @param viewId View identifier
|
|
1056
|
+
*/
|
|
1057
|
+
registerFocusGestureListener({ viewId }: {
|
|
1058
|
+
viewId: number;
|
|
1059
|
+
}): Promise<void>;
|
|
1060
|
+
/**
|
|
1061
|
+
* Unregisters the focus gesture event listener
|
|
1062
|
+
* @param viewId View identifier
|
|
1063
|
+
*/
|
|
1064
|
+
unregisterFocusGestureListener({ viewId }: {
|
|
1065
|
+
viewId: number;
|
|
1066
|
+
}): Promise<void>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Triggers a focus as if the focus gesture was performed
|
|
1069
|
+
* @param viewId View identifier
|
|
1070
|
+
* @param pointJson Point in view coordinates as JSON string
|
|
1071
|
+
*/
|
|
1072
|
+
triggerFocus({ viewId, pointJson }: {
|
|
1073
|
+
viewId: number;
|
|
1074
|
+
pointJson: string;
|
|
1075
|
+
}): Promise<void>;
|
|
1076
|
+
/**
|
|
1077
|
+
* Triggers a zoom in gesture as if the zoom gesture was performed
|
|
1078
|
+
* @param viewId View identifier
|
|
1079
|
+
*/
|
|
1080
|
+
triggerZoomIn({ viewId }: {
|
|
1081
|
+
viewId: number;
|
|
1082
|
+
}): Promise<void>;
|
|
1083
|
+
/**
|
|
1084
|
+
* Triggers a zoom out gesture as if the zoom gesture was performed
|
|
1085
|
+
* @param viewId View identifier
|
|
1086
|
+
*/
|
|
1087
|
+
triggerZoomOut({ viewId }: {
|
|
1088
|
+
viewId: number;
|
|
1089
|
+
}): Promise<void>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Registers a persistent listener for zoom gesture events
|
|
1092
|
+
* @param viewId View identifier
|
|
1093
|
+
*/
|
|
1094
|
+
registerZoomGestureListener({ viewId }: {
|
|
1095
|
+
viewId: number;
|
|
1096
|
+
}): Promise<void>;
|
|
1097
|
+
/**
|
|
1098
|
+
* Unregisters the zoom gesture event listener
|
|
1099
|
+
* @param viewId View identifier
|
|
1100
|
+
*/
|
|
1101
|
+
unregisterZoomGestureListener({ viewId }: {
|
|
1102
|
+
viewId: number;
|
|
1103
|
+
}): Promise<void>;
|
|
1104
|
+
/**
|
|
1105
|
+
* Updates the DataCaptureView configuration
|
|
1106
|
+
* @param viewJson Updated view configuration as JSON string
|
|
1107
|
+
*/
|
|
1108
|
+
updateDataCaptureView({ viewJson }: {
|
|
1109
|
+
viewJson: object | string;
|
|
1110
|
+
}): Promise<void>;
|
|
1111
|
+
/**
|
|
1112
|
+
* Emits haptic/audio feedback
|
|
1113
|
+
* @param feedbackJson Feedback configuration as JSON string
|
|
1114
|
+
*/
|
|
1115
|
+
emitFeedback({ feedbackJson }: {
|
|
1116
|
+
feedbackJson: string;
|
|
1117
|
+
}): Promise<void>;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
declare class ImageFrameSource extends DefaultSerializeable implements FrameSource {
|
|
1121
|
+
private set context(value);
|
|
1122
|
+
private get context();
|
|
1123
|
+
get desiredState(): FrameSourceState;
|
|
1124
|
+
private position;
|
|
1125
|
+
private type;
|
|
1126
|
+
private image;
|
|
1127
|
+
private _id;
|
|
1128
|
+
private _desiredState;
|
|
1129
|
+
private listeners;
|
|
1130
|
+
private _context;
|
|
1131
|
+
private controller;
|
|
1132
|
+
static create(image: string): ImageFrameSource;
|
|
1133
|
+
private static fromJSON;
|
|
1134
|
+
private constructor();
|
|
1135
|
+
switchToDesiredState(state: FrameSourceState): Promise<void>;
|
|
1136
|
+
addListener(listener: FrameSourceListener | null): void;
|
|
1137
|
+
removeListener(listener: FrameSourceListener | null): void;
|
|
1138
|
+
getCurrentState(): Promise<FrameSourceState>;
|
|
1139
|
+
private didChange;
|
|
1140
|
+
private setNativeFrameSourceIsBeingCreated;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* A frame source that processes frames fed to it via {@link SequenceFrameSource.addFrame},
|
|
1145
|
+
* in the order they are added. Use it when the camera is not handled by the SDK (e.g. when
|
|
1146
|
+
* another framework owns the camera).
|
|
1147
|
+
*/
|
|
1148
|
+
declare class SequenceFrameSource extends DefaultSerializeable implements FrameSource {
|
|
1149
|
+
private set context(value);
|
|
1150
|
+
private get context();
|
|
1151
|
+
get desiredState(): FrameSourceState;
|
|
1152
|
+
private position;
|
|
1153
|
+
private type;
|
|
1154
|
+
private _lensPosition;
|
|
1155
|
+
private static nextInstanceId;
|
|
1156
|
+
private _id;
|
|
1157
|
+
private _desiredState;
|
|
1158
|
+
private listeners;
|
|
1159
|
+
private _context;
|
|
1160
|
+
private controller;
|
|
1161
|
+
/**
|
|
1162
|
+
* Creates a sequence frame source for the given camera position. On iOS the lens position
|
|
1163
|
+
* (0.0-1.0) sets the capture device lens position; on Android it is ignored.
|
|
1164
|
+
*/
|
|
1165
|
+
static create(position: CameraPosition, lensPosition?: number): SequenceFrameSource;
|
|
1166
|
+
private static fromJSON;
|
|
1167
|
+
private constructor();
|
|
1168
|
+
switchToDesiredState(state: FrameSourceState): Promise<void>;
|
|
1169
|
+
/**
|
|
1170
|
+
* Adds a frame with the given width and height. The frame data must be the Base64 encoding
|
|
1171
|
+
* of the raw NV21 bytes of the frame. If this frame source is on and connected to a
|
|
1172
|
+
* data capture context, this is the next frame that will be processed.
|
|
1173
|
+
*/
|
|
1174
|
+
addFrame(width: number, height: number, frameData: string): Promise<void>;
|
|
1175
|
+
addListener(listener: FrameSourceListener): void;
|
|
1176
|
+
removeListener(listener: FrameSourceListener): void;
|
|
1177
|
+
getCurrentState(): Promise<FrameSourceState>;
|
|
1178
|
+
private didChange;
|
|
1179
|
+
private setNativeFrameSourceIsBeingCreated;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
interface CameraSettingsJSON {
|
|
1183
|
+
preferredResolution: string;
|
|
1184
|
+
zoomFactor: number;
|
|
1185
|
+
zoomGestureZoomFactor: number;
|
|
1186
|
+
zoomLevels?: number[];
|
|
1187
|
+
macroMode?: string;
|
|
1188
|
+
adaptiveExposure?: boolean;
|
|
1189
|
+
torchLevel?: number;
|
|
1190
|
+
focusRange?: string;
|
|
1191
|
+
focusGestureStrategy?: string;
|
|
1192
|
+
shouldPreferSmoothAutoFocus: boolean;
|
|
1193
|
+
properties?: {
|
|
1194
|
+
[key: string]: any;
|
|
1195
|
+
};
|
|
1196
|
+
}
|
|
1197
|
+
interface PrivateCameraSettings {
|
|
1198
|
+
fromJSON(json: CameraSettingsJSON): CameraSettings;
|
|
1199
|
+
}
|
|
1200
|
+
declare class CameraSettings extends DefaultSerializeable {
|
|
1201
|
+
preferredResolution: VideoResolution;
|
|
1202
|
+
zoomFactor: number;
|
|
1203
|
+
/** @deprecated Use zoomLevels instead. */
|
|
1204
|
+
zoomGestureZoomFactor: number;
|
|
1205
|
+
zoomLevels: number[];
|
|
1206
|
+
torchLevel: number;
|
|
1207
|
+
macroMode: MacroMode;
|
|
1208
|
+
adaptiveExposure: boolean;
|
|
1209
|
+
private static get coreDefaults();
|
|
1210
|
+
private focusHiddenProperties;
|
|
1211
|
+
private focus;
|
|
1212
|
+
get focusRange(): FocusRange;
|
|
1213
|
+
set focusRange(newRange: FocusRange);
|
|
1214
|
+
get focusGestureStrategy(): FocusGestureStrategy;
|
|
1215
|
+
set focusGestureStrategy(newStrategy: FocusGestureStrategy);
|
|
1216
|
+
get shouldPreferSmoothAutoFocus(): boolean;
|
|
1217
|
+
set shouldPreferSmoothAutoFocus(newShouldPreferSmoothAutoFocus: boolean);
|
|
1218
|
+
private static fromJSON;
|
|
1219
|
+
constructor();
|
|
1220
|
+
constructor(settings: CameraSettings);
|
|
1221
|
+
setProperty(name: string, value: any): void;
|
|
1222
|
+
getProperty(name: string): any;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* Camera lifecycle and operation handling:
|
|
1227
|
+
*
|
|
1228
|
+
* Phase 1 - Initial State (before native creation starts):
|
|
1229
|
+
* - Camera object exists in TypeScript but not yet being created on native side
|
|
1230
|
+
* - State changes (torch, desired state, settings) only update TypeScript properties
|
|
1231
|
+
* - No native calls are triggered
|
|
1232
|
+
*
|
|
1233
|
+
* Phase 2 - Native Creation In Progress (after setFrameSource, before context set):
|
|
1234
|
+
* - setFrameSource() called on DataCaptureContext, triggering setNativeFrameSourceIsBeingCreated()
|
|
1235
|
+
* - A promise is created that will resolve when the native camera is ready
|
|
1236
|
+
* - State changes during this phase await the native ready promise before executing
|
|
1237
|
+
* - Native camera is created asynchronously
|
|
1238
|
+
*
|
|
1239
|
+
* Phase 3 - Active State (after context set):
|
|
1240
|
+
* - Native camera is ready and available
|
|
1241
|
+
* - The native ready promise is resolved
|
|
1242
|
+
* - All state changes execute immediately on native side
|
|
1243
|
+
*/
|
|
1244
|
+
declare class Camera extends DefaultSerializeable implements FrameSource {
|
|
1245
|
+
private static readonly _cameraInstances;
|
|
1246
|
+
private controller;
|
|
1247
|
+
private type;
|
|
1248
|
+
private settings;
|
|
1249
|
+
private _position;
|
|
1250
|
+
private _desiredTorchState;
|
|
1251
|
+
private _desiredState;
|
|
1252
|
+
private _hasTorchStateListeners;
|
|
1253
|
+
private _hasMacroModeListeners;
|
|
1254
|
+
private currentCameraState;
|
|
1255
|
+
private listeners;
|
|
1256
|
+
private torchListeners;
|
|
1257
|
+
private macroModeListeners;
|
|
1258
|
+
private zoomListeners;
|
|
1259
|
+
private _hasZoomListeners;
|
|
1260
|
+
private _context;
|
|
1261
|
+
private nativeReadyResolver;
|
|
1262
|
+
private nativeReadyRejecter;
|
|
1263
|
+
private nativeReadyPromise;
|
|
1264
|
+
private nativeReadyTimeout;
|
|
1265
|
+
private static get coreDefaults();
|
|
1266
|
+
static create(position?: CameraPosition, settings?: CameraSettings | null, desiredTorchState?: TorchState, desiredState?: FrameSourceState): Camera | null;
|
|
1267
|
+
static withSettings(settings: CameraSettings): Camera | null;
|
|
1268
|
+
static asPositionWithSettings(cameraPosition: CameraPosition, settings: CameraSettings): Camera | null;
|
|
1269
|
+
static atPosition(cameraPosition: CameraPosition): Camera | null;
|
|
1270
|
+
private constructor();
|
|
1271
|
+
switchToDesiredState(state: FrameSourceState): Promise<void>;
|
|
1272
|
+
getCurrentState(): Promise<FrameSourceState>;
|
|
1273
|
+
getIsTorchAvailable(): Promise<boolean>;
|
|
1274
|
+
addListener(listener: FrameSourceListener | null): void;
|
|
1275
|
+
removeListener(listener: FrameSourceListener | null): void;
|
|
1276
|
+
addTorchListener(listener: TorchListener): void;
|
|
1277
|
+
removeTorchListener(listener: TorchListener): void;
|
|
1278
|
+
addMacroModeListener(listener: MacroModeListener): void;
|
|
1279
|
+
removeMacroModeListener(listener: MacroModeListener): void;
|
|
1280
|
+
addZoomListener(listener: ZoomListener): void;
|
|
1281
|
+
removeZoomListener(listener: ZoomListener): void;
|
|
1282
|
+
applySettings(settings: CameraSettings): Promise<void>;
|
|
1283
|
+
private set context(value);
|
|
1284
|
+
private get context();
|
|
1285
|
+
private setNativeFrameSourceIsBeingCreated;
|
|
1286
|
+
private get isActiveCamera();
|
|
1287
|
+
static get default(): Camera | null;
|
|
1288
|
+
static isMacroModeAvailable(): Promise<boolean>;
|
|
1289
|
+
get position(): CameraPosition;
|
|
1290
|
+
get isTorchAvailable(): Promise<boolean>;
|
|
1291
|
+
get desiredState(): FrameSourceState;
|
|
1292
|
+
set desiredTorchState(desiredTorchState: TorchState);
|
|
1293
|
+
get desiredTorchState(): TorchState;
|
|
1294
|
+
private didChange;
|
|
1295
|
+
private resetPhaseState;
|
|
1296
|
+
}
|
|
1297
|
+
interface PrivateCamera {
|
|
1298
|
+
context: DataCaptureContext | null;
|
|
1299
|
+
_position: CameraPosition;
|
|
1300
|
+
_desiredState: FrameSourceState;
|
|
1301
|
+
currentCameraState: FrameSourceState;
|
|
1302
|
+
desiredTorchState: TorchState;
|
|
1303
|
+
settings: CameraSettings | null;
|
|
1304
|
+
listeners: FrameSourceListener[];
|
|
1305
|
+
torchListeners: TorchListener[];
|
|
1306
|
+
macroModeListeners: MacroModeListener[];
|
|
1307
|
+
zoomListeners: ZoomListener[];
|
|
1308
|
+
controller: CameraController;
|
|
1309
|
+
get isActiveCamera(): boolean;
|
|
1310
|
+
initialize: () => void;
|
|
1311
|
+
didChange: () => Promise<void>;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
declare class CameraController extends BaseController<CoreProxy> {
|
|
1315
|
+
private camera;
|
|
1316
|
+
private adapter;
|
|
1317
|
+
constructor(camera: Camera);
|
|
1318
|
+
private get privateCamera();
|
|
1319
|
+
getCurrentState(): Promise<FrameSourceState>;
|
|
1320
|
+
getIsTorchAvailable(): Promise<boolean>;
|
|
1321
|
+
switchCameraToDesiredState(desiredState: FrameSourceState): Promise<void>;
|
|
1322
|
+
subscribeListener(): Promise<void>;
|
|
1323
|
+
unsubscribeListener(): Promise<void>;
|
|
1324
|
+
subscribeTorchListener(): Promise<void>;
|
|
1325
|
+
unsubscribeTorchListener(): Promise<void>;
|
|
1326
|
+
subscribeMacroModeListener(): Promise<void>;
|
|
1327
|
+
unsubscribeMacroModeListener(): Promise<void>;
|
|
1328
|
+
subscribeZoomListener(): Promise<void>;
|
|
1329
|
+
unsubscribeZoomListener(): Promise<void>;
|
|
1330
|
+
dispose(): void;
|
|
1331
|
+
private handleDidChangeStateEvent;
|
|
1332
|
+
private handleDidChangeStateEventWrapper;
|
|
1333
|
+
private handleDidChangeTorchToStateEvent;
|
|
1334
|
+
private handleDidChangeTorchToStateEventWrapper;
|
|
1335
|
+
private handleDidChangeMacroModeEvent;
|
|
1336
|
+
private handleDidChangeMacroModeEventWrapper;
|
|
1337
|
+
private handleDidChangeZoomLevelEvent;
|
|
1338
|
+
private handleDidChangeZoomLevelEventWrapper;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
declare class CameraSwitchControl extends DefaultSerializeable implements Control {
|
|
1342
|
+
private type;
|
|
1343
|
+
private _primaryCamera;
|
|
1344
|
+
private _secondaryCamera;
|
|
1345
|
+
private icon;
|
|
1346
|
+
private _view;
|
|
1347
|
+
private controller;
|
|
1348
|
+
private get view();
|
|
1349
|
+
private set view(value);
|
|
1350
|
+
/** @internal Read-only view access for the sync controller. */
|
|
1351
|
+
get attachedView(): BaseDataCaptureView | null;
|
|
1352
|
+
private anchor;
|
|
1353
|
+
private offset;
|
|
1354
|
+
accessibilityLabelWhenWorldFacing: string | null;
|
|
1355
|
+
accessibilityHintWhenWorldFacing: string | null;
|
|
1356
|
+
accessibilityLabelWhenUserFacing: string | null;
|
|
1357
|
+
accessibilityHintWhenUserFacing: string | null;
|
|
1358
|
+
constructor(primaryCamera: Camera, secondaryCamera: Camera);
|
|
1359
|
+
get primaryCamera(): Camera;
|
|
1360
|
+
get secondaryCamera(): Camera;
|
|
1361
|
+
get primaryCameraImage(): string | null;
|
|
1362
|
+
set primaryCameraImage(primaryCameraImage: string | null);
|
|
1363
|
+
get primaryCameraPressedImage(): string | null;
|
|
1364
|
+
set primaryCameraPressedImage(primaryCameraPressedImage: string | null);
|
|
1365
|
+
get secondaryCameraImage(): string | null;
|
|
1366
|
+
set secondaryCameraImage(secondaryCameraImage: string | null);
|
|
1367
|
+
get secondaryCameraPressedImage(): string | null;
|
|
1368
|
+
set secondaryCameraPressedImage(secondaryCameraPressedImage: string | null);
|
|
1369
|
+
setPrimaryCameraImage(resource: string): void;
|
|
1370
|
+
setPrimaryCameraPressedImage(resource: string): void;
|
|
1371
|
+
setSecondaryCameraImage(resource: string): void;
|
|
1372
|
+
setSecondaryCameraPressedImage(resource: string): void;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* Keeps the TS-side camera state in sync with the native camera switcher.
|
|
1379
|
+
*
|
|
1380
|
+
* The native `CameraSwitchControl` swaps the DataCaptureContext's active camera on its own when
|
|
1381
|
+
* tapped; the TS layer is never told, so `DataCaptureContext.frameSource` and the two cameras'
|
|
1382
|
+
* `_desiredState` drift out of sync (leading to "Unable to switch the camera" rejections when the
|
|
1383
|
+
* app later acts on a camera native no longer treats as active). This controller listens to the
|
|
1384
|
+
* frame-source state events (which carry the camera position) and repoints the TS state to mirror
|
|
1385
|
+
* the native switch — without issuing any native call, since native is already in that state.
|
|
1386
|
+
*/
|
|
1387
|
+
declare class CameraSwitchControlController extends BaseController<CoreProxy> {
|
|
1388
|
+
private control;
|
|
1389
|
+
private adapter;
|
|
1390
|
+
private subscribed;
|
|
1391
|
+
constructor(control: CameraSwitchControl);
|
|
1392
|
+
subscribe(): Promise<void>;
|
|
1393
|
+
unsubscribe(): void;
|
|
1394
|
+
private handleDidChangeStateWrapper;
|
|
1395
|
+
private handleDidChangeState;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
declare class FrameDataController extends BaseController<CoreProxy> {
|
|
1399
|
+
private adapter;
|
|
1400
|
+
constructor();
|
|
1401
|
+
getFrame(frameId: string): Promise<FrameData>;
|
|
1402
|
+
getFrameOrNull(frameId: string): Promise<FrameData | null>;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
declare class ZoomSwitchControl extends DefaultSerializeable implements Control {
|
|
1406
|
+
private type;
|
|
1407
|
+
private icon;
|
|
1408
|
+
private view;
|
|
1409
|
+
private anchor;
|
|
1410
|
+
private offset;
|
|
1411
|
+
private static get coreDefaults();
|
|
1412
|
+
/** @deprecated Use the unified `accessibilityLabel` property instead. */
|
|
1413
|
+
contentDescriptionWhenZoomedOut: string | null;
|
|
1414
|
+
/** @deprecated Use the unified `accessibilityLabel` property instead. */
|
|
1415
|
+
contentDescriptionWhenZoomedIn: string | null;
|
|
1416
|
+
/** @deprecated Use the unified `accessibilityLabel` property instead. */
|
|
1417
|
+
accessibilityLabelWhenZoomedOut: string | null;
|
|
1418
|
+
/** @deprecated Use the unified `accessibilityLabel` property instead. */
|
|
1419
|
+
accessibilityLabelWhenZoomedIn: string | null;
|
|
1420
|
+
/** @deprecated Use the unified `accessibilityHint` property instead. */
|
|
1421
|
+
accessibilityHintWhenZoomedOut: string | null;
|
|
1422
|
+
/** @deprecated Use the unified `accessibilityHint` property instead. */
|
|
1423
|
+
accessibilityHintWhenZoomedIn: string | null;
|
|
1424
|
+
orientation: ZoomSwitchOrientation;
|
|
1425
|
+
isAlwaysExpanded: boolean;
|
|
1426
|
+
isExpanded: boolean;
|
|
1427
|
+
accessibilityLabel: string;
|
|
1428
|
+
accessibilityHint: string;
|
|
1429
|
+
private _selectedZoomLevel;
|
|
1430
|
+
get selectedZoomLevel(): number;
|
|
1431
|
+
constructor();
|
|
1432
|
+
selectZoomLevel(level: number): Promise<number>;
|
|
1433
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1434
|
+
get zoomedOutImage(): string | null;
|
|
1435
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1436
|
+
set zoomedOutImage(zoomedOutImage: string | null);
|
|
1437
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1438
|
+
get zoomedInImage(): string | null;
|
|
1439
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1440
|
+
set zoomedInImage(zoomedInImage: string | null);
|
|
1441
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1442
|
+
get zoomedInPressedImage(): string | null;
|
|
1443
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1444
|
+
set zoomedInPressedImage(zoomedInPressedImage: string | null);
|
|
1445
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1446
|
+
get zoomedOutPressedImage(): string | null;
|
|
1447
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1448
|
+
set zoomedOutPressedImage(zoomedOutPressedImage: string | null);
|
|
1449
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1450
|
+
setZoomedInImage(resource: string): void;
|
|
1451
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1452
|
+
setZoomedInPressedImage(resource: string): void;
|
|
1453
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1454
|
+
setZoomedOutImage(resource: string): void;
|
|
1455
|
+
/** @deprecated Use the new ZoomSwitchControl v2 API. Image-based customization will be removed in 9.0. */
|
|
1456
|
+
setZoomedOutPressedImage(resource: string): void;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
declare class TorchSwitchControl extends DefaultSerializeable implements Control {
|
|
1460
|
+
private type;
|
|
1461
|
+
private icon;
|
|
1462
|
+
private view;
|
|
1463
|
+
private anchor;
|
|
1464
|
+
private offset;
|
|
1465
|
+
accessibilityLabelWhenOff: string | null;
|
|
1466
|
+
accessibilityHintWhenOff: string | null;
|
|
1467
|
+
accessibilityLabelWhenOn: string | null;
|
|
1468
|
+
accessibilityHintWhenOn: string | null;
|
|
1469
|
+
constructor();
|
|
1470
|
+
get torchOffImage(): string | null;
|
|
1471
|
+
set torchOffImage(torchOffImage: string | null);
|
|
1472
|
+
get torchOffPressedImage(): string | null;
|
|
1473
|
+
set torchOffPressedImage(torchOffPressedImage: string | null);
|
|
1474
|
+
get torchOnImage(): string | null;
|
|
1475
|
+
set torchOnImage(torchOnImage: string | null);
|
|
1476
|
+
get torchOnPressedImage(): string | null;
|
|
1477
|
+
setTorchOffImage(resource: string): void;
|
|
1478
|
+
setTorchOffPressedImage(resource: string): void;
|
|
1479
|
+
setTorchOnImage(resource: string): void;
|
|
1480
|
+
setTorchOnPressedImage(resource: string): void;
|
|
1481
|
+
setImageResource(resource: string): void;
|
|
1482
|
+
set torchOnPressedImage(torchOnPressedImage: string | null);
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
interface PrivateSwipeToZoom {
|
|
1486
|
+
listeners: ZoomGestureListener[];
|
|
1487
|
+
onListenersChanged?(): void;
|
|
1488
|
+
_controller?: DataCaptureViewController | null;
|
|
1489
|
+
}
|
|
1490
|
+
declare class SwipeToZoom extends DefaultSerializeable implements ZoomGesture {
|
|
1491
|
+
private type;
|
|
1492
|
+
private listeners;
|
|
1493
|
+
private onListenersChanged?;
|
|
1494
|
+
private _controller?;
|
|
1495
|
+
constructor();
|
|
1496
|
+
addListener(listener: ZoomGestureListener): void;
|
|
1497
|
+
removeListener(listener: ZoomGestureListener): void;
|
|
1498
|
+
triggerZoomIn(): Promise<void>;
|
|
1499
|
+
triggerZoomOut(): Promise<void>;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
interface PrivatePinchToZoom {
|
|
1503
|
+
listeners: ZoomGestureListener[];
|
|
1504
|
+
onListenersChanged?(): void;
|
|
1505
|
+
_controller?: DataCaptureViewController | null;
|
|
1506
|
+
}
|
|
1507
|
+
declare class PinchToZoom extends DefaultSerializeable implements ZoomGesture {
|
|
1508
|
+
private type;
|
|
1509
|
+
private listeners;
|
|
1510
|
+
private onListenersChanged?;
|
|
1511
|
+
private _controller?;
|
|
1512
|
+
constructor();
|
|
1513
|
+
addListener(listener: ZoomGestureListener): void;
|
|
1514
|
+
removeListener(listener: ZoomGestureListener): void;
|
|
1515
|
+
triggerZoomIn(): Promise<void>;
|
|
1516
|
+
triggerZoomOut(): Promise<void>;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
interface DataCaptureOverlay extends Serializeable {
|
|
1520
|
+
}
|
|
1521
|
+
interface PrivateDataCaptureOverlay {
|
|
1522
|
+
view: BaseDataCaptureView | null;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
interface DataCaptureViewListener {
|
|
1526
|
+
didChangeSize?(view: DataCaptureView, size: Size, orientation: Orientation): void;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
interface DataCaptureView {
|
|
1530
|
+
addOverlay(overlay: DataCaptureOverlay): void;
|
|
1531
|
+
removeOverlay(overlay: DataCaptureOverlay): void;
|
|
1532
|
+
}
|
|
1533
|
+
declare class BaseDataCaptureView extends DefaultSerializeable {
|
|
1534
|
+
viewComponent: DataCaptureView;
|
|
1535
|
+
parentId: number | null;
|
|
1536
|
+
overlays: DataCaptureOverlay[];
|
|
1537
|
+
listeners: DataCaptureViewListener[];
|
|
1538
|
+
private _context;
|
|
1539
|
+
get context(): DataCaptureContext | null;
|
|
1540
|
+
set context(context: DataCaptureContext | null);
|
|
1541
|
+
private get coreDefaults();
|
|
1542
|
+
private _scanAreaMargins;
|
|
1543
|
+
get scanAreaMargins(): MarginsWithUnit;
|
|
1544
|
+
private _viewId;
|
|
1545
|
+
get viewId(): number;
|
|
1546
|
+
private set viewId(value);
|
|
1547
|
+
set scanAreaMargins(newValue: MarginsWithUnit);
|
|
1548
|
+
private _pointOfInterest;
|
|
1549
|
+
get pointOfInterest(): PointWithUnit;
|
|
1550
|
+
set pointOfInterest(newValue: PointWithUnit);
|
|
1551
|
+
private _logoAnchor;
|
|
1552
|
+
get logoAnchor(): Anchor;
|
|
1553
|
+
set logoAnchor(newValue: Anchor);
|
|
1554
|
+
private _logoOffset;
|
|
1555
|
+
get logoOffset(): PointWithUnit;
|
|
1556
|
+
set logoOffset(newValue: PointWithUnit);
|
|
1557
|
+
private _focusGesture;
|
|
1558
|
+
get focusGesture(): FocusGesture | null;
|
|
1559
|
+
set focusGesture(newValue: FocusGesture | null);
|
|
1560
|
+
private _zoomGestures;
|
|
1561
|
+
get zoomGestures(): ZoomGesture[];
|
|
1562
|
+
set zoomGestures(newValue: ZoomGesture[]);
|
|
1563
|
+
/** @deprecated Use zoomGestures instead. Will be removed in a future version. */
|
|
1564
|
+
get zoomGesture(): ZoomGesture | null;
|
|
1565
|
+
/** @deprecated Use zoomGestures instead. Will be removed in a future version. */
|
|
1566
|
+
set zoomGesture(newValue: ZoomGesture | null);
|
|
1567
|
+
private _logoStyle;
|
|
1568
|
+
get logoStyle(): LogoStyle;
|
|
1569
|
+
set logoStyle(newValue: LogoStyle);
|
|
1570
|
+
private _shouldShowZoomNotification;
|
|
1571
|
+
get shouldShowZoomNotification(): boolean;
|
|
1572
|
+
set shouldShowZoomNotification(newValue: boolean);
|
|
1573
|
+
private controls;
|
|
1574
|
+
private controller;
|
|
1575
|
+
private isViewCreated;
|
|
1576
|
+
private get privateContext();
|
|
1577
|
+
static forContext(context: DataCaptureContext | null): BaseDataCaptureView;
|
|
1578
|
+
constructor(context: DataCaptureContext | null);
|
|
1579
|
+
addOverlay(overlay: DataCaptureOverlay): Promise<void>;
|
|
1580
|
+
removeOverlay(overlay: DataCaptureOverlay): Promise<void>;
|
|
1581
|
+
removeAllOverlays(): void;
|
|
1582
|
+
addListener(listener: DataCaptureViewListener): void;
|
|
1583
|
+
removeListener(listener: DataCaptureViewListener): void;
|
|
1584
|
+
viewPointForFramePoint(point: Point): Promise<Point>;
|
|
1585
|
+
viewQuadrilateralForFrameQuadrilateral(quadrilateral: Quadrilateral): Promise<Quadrilateral>;
|
|
1586
|
+
triggerFocus(point: PointWithUnit): Promise<void>;
|
|
1587
|
+
triggerZoomIn(): Promise<void>;
|
|
1588
|
+
triggerZoomOut(): Promise<void>;
|
|
1589
|
+
addControl(control: Control): Promise<void>;
|
|
1590
|
+
addControlWithAnchorAndOffset(control: Control, anchor: Anchor, offset: PointWithUnit): void;
|
|
1591
|
+
removeControl(control: Control): void;
|
|
1592
|
+
controlUpdated(): Promise<void>;
|
|
1593
|
+
createNativeView(viewId: number): Promise<void>;
|
|
1594
|
+
private notifyOverlaysOfViewIdChange;
|
|
1595
|
+
removeNativeView(): Promise<void>;
|
|
1596
|
+
dispose(): void;
|
|
1597
|
+
setFrame(frame: Rect, isUnderContent?: boolean): Promise<void>;
|
|
1598
|
+
setPositionAndSize(top: number, left: number, width: number, height: number, shouldBeUnderWebView: boolean): Promise<void>;
|
|
1599
|
+
show(): Promise<void>;
|
|
1600
|
+
hide(): Promise<void>;
|
|
1601
|
+
setProperty<T>(name: string, value: T): void;
|
|
1602
|
+
selectZoomLevel(zoomLevel: number): Promise<number>;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
interface Control {
|
|
1606
|
+
}
|
|
1607
|
+
interface PrivateControl {
|
|
1608
|
+
view: BaseDataCaptureView | null;
|
|
1609
|
+
anchor: Anchor | null;
|
|
1610
|
+
offset: PointWithUnit | null;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
declare class ControlImage extends DefaultSerializeable {
|
|
1614
|
+
private type;
|
|
1615
|
+
private _data;
|
|
1616
|
+
private _name;
|
|
1617
|
+
static fromBase64EncodedImage(data: string | null): ControlImage | null;
|
|
1618
|
+
static fromResourceName(resource: string): ControlImage;
|
|
1619
|
+
private constructor();
|
|
1620
|
+
isBase64EncodedImage(): boolean;
|
|
1621
|
+
get data(): string | null;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
interface DataCaptureViewProxy extends CoreProxy {
|
|
1625
|
+
$showDataCaptureView({ viewId }: {
|
|
1626
|
+
viewId: number;
|
|
1627
|
+
}): Promise<void>;
|
|
1628
|
+
$hideDataCaptureView({ viewId }: {
|
|
1629
|
+
viewId: number;
|
|
1630
|
+
}): Promise<void>;
|
|
1631
|
+
$createDataCaptureView({ viewJson }: {
|
|
1632
|
+
viewJson: string;
|
|
1633
|
+
}): Promise<void>;
|
|
1634
|
+
$removeDataCaptureView({ viewId }: {
|
|
1635
|
+
viewId: number;
|
|
1636
|
+
}): Promise<void>;
|
|
1637
|
+
$setDataCaptureViewPositionAndSize({ top, left, width, height, shouldBeUnderWebView, }: {
|
|
1638
|
+
top: number;
|
|
1639
|
+
left: number;
|
|
1640
|
+
width: number;
|
|
1641
|
+
height: number;
|
|
1642
|
+
shouldBeUnderWebView: boolean;
|
|
1643
|
+
}): Promise<void>;
|
|
1644
|
+
}
|
|
1645
|
+
declare enum DataCaptureViewEvents {
|
|
1646
|
+
didChangeSize = "DataCaptureViewListener.onSizeChanged",
|
|
1647
|
+
onFocusGesture = "FocusGestureListener.onFocusGesture"
|
|
1648
|
+
}
|
|
1649
|
+
declare class DataCaptureViewController extends BaseController<DataCaptureViewProxy> {
|
|
1650
|
+
private view;
|
|
1651
|
+
private _listenerRegistered;
|
|
1652
|
+
private _focusGestureListenerRegistered;
|
|
1653
|
+
private _zoomGestureListenerRegistered;
|
|
1654
|
+
private adapter;
|
|
1655
|
+
constructor(view: BaseDataCaptureView);
|
|
1656
|
+
viewPointForFramePoint(point: Point): Promise<Point>;
|
|
1657
|
+
viewQuadrilateralForFrameQuadrilateral(quadrilateral: Quadrilateral): Promise<Quadrilateral>;
|
|
1658
|
+
triggerFocus(point: PointWithUnit): Promise<void>;
|
|
1659
|
+
triggerZoomIn(): Promise<void>;
|
|
1660
|
+
triggerZoomOut(): Promise<void>;
|
|
1661
|
+
setPositionAndSize(top: number, left: number, width: number, height: number, shouldBeUnderWebView: boolean): Promise<void>;
|
|
1662
|
+
show(): Promise<void>;
|
|
1663
|
+
hide(): Promise<void>;
|
|
1664
|
+
createNativeView(): Promise<void>;
|
|
1665
|
+
removeNativeView(): Promise<void>;
|
|
1666
|
+
updateView(): Promise<void>;
|
|
1667
|
+
dispose(): void;
|
|
1668
|
+
subscribeListener(): Promise<void>;
|
|
1669
|
+
unsubscribeListener(): Promise<void>;
|
|
1670
|
+
updateFocusGestureListenerSubscription(focusGesture: FocusGesture | null, shouldSubscribe: boolean): Promise<void>;
|
|
1671
|
+
private subscribeFocusGestureListener;
|
|
1672
|
+
private unsubscribeFocusGestureListener;
|
|
1673
|
+
private handleOnFocusGestureEvent;
|
|
1674
|
+
private handleOnFocusGestureEventWrapper;
|
|
1675
|
+
updateZoomGestureListenerSubscription(zoomGesture: ZoomGesture | null, shouldSubscribe: boolean): Promise<void>;
|
|
1676
|
+
selectZoomLevel(zoomLevel: number): Promise<number>;
|
|
1677
|
+
private subscribeZoomGestureListener;
|
|
1678
|
+
private unsubscribeZoomGestureListener;
|
|
1679
|
+
private handleOnZoomInGestureEvent;
|
|
1680
|
+
private handleOnZoomInGestureEventWrapper;
|
|
1681
|
+
private handleOnZoomOutGestureEvent;
|
|
1682
|
+
private handleOnZoomOutGestureEventWrapper;
|
|
1683
|
+
private createView;
|
|
1684
|
+
private handleDidChangeSizeEvent;
|
|
1685
|
+
private handleDidChangeSizeEventWrapper;
|
|
1686
|
+
private isViewCreated;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
interface CameraOwner {
|
|
1690
|
+
readonly id: string;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
interface DataCaptureMode extends Serializeable {
|
|
1694
|
+
isEnabled: boolean;
|
|
1695
|
+
readonly context: DataCaptureContext | null;
|
|
1696
|
+
}
|
|
1697
|
+
interface PrivateDataCaptureMode {
|
|
1698
|
+
_context: DataCaptureContext | null;
|
|
1699
|
+
modeId: number;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
declare class OpenSourceSoftwareLicenseInfo {
|
|
1703
|
+
private _licenseText;
|
|
1704
|
+
constructor(licenseText: string);
|
|
1705
|
+
get licenseText(): string;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
interface DataCaptureContextProxy extends CoreProxy {
|
|
1709
|
+
get framework(): string;
|
|
1710
|
+
get frameworkVersion(): string;
|
|
1711
|
+
}
|
|
1712
|
+
declare enum DataCaptureContextEvents {
|
|
1713
|
+
didChangeStatus = "DataCaptureContextListener.onStatusChanged",
|
|
1714
|
+
didStartObservingContext = "DataCaptureContextListener.onObservationStarted"
|
|
1715
|
+
}
|
|
1716
|
+
declare class DataCaptureContextController extends BaseController<DataCaptureContextProxy> {
|
|
1717
|
+
private context;
|
|
1718
|
+
private _listenerRegistered;
|
|
1719
|
+
private adapter;
|
|
1720
|
+
get framework(): string;
|
|
1721
|
+
get frameworkVersion(): string;
|
|
1722
|
+
private get privateContext();
|
|
1723
|
+
static forDataCaptureContext(context: DataCaptureContext): DataCaptureContextController;
|
|
1724
|
+
static getOpenSourceSoftwareLicenseInfo(): Promise<OpenSourceSoftwareLicenseInfo>;
|
|
1725
|
+
private constructor();
|
|
1726
|
+
subscribeListener(): Promise<void>;
|
|
1727
|
+
updateContextFromJSON(): Promise<void>;
|
|
1728
|
+
addModeToContext(mode: DataCaptureMode): Promise<void>;
|
|
1729
|
+
removeModeFromContext(mode: DataCaptureMode): Promise<void>;
|
|
1730
|
+
removeAllModesFromContext(): Promise<void>;
|
|
1731
|
+
dispose(): void;
|
|
1732
|
+
unsubscribeListener(): Promise<void>;
|
|
1733
|
+
initialize(): Promise<void>;
|
|
1734
|
+
private initializeContextFromJSON;
|
|
1735
|
+
private handleDidChangeStatusEvent;
|
|
1736
|
+
private handleDidStartObservingContextEvent;
|
|
1737
|
+
private notifyListenersOfDeserializationError;
|
|
1738
|
+
private notifyListenersOfDidChangeStatus;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
interface DataCaptureContextCreationOptions {
|
|
1742
|
+
deviceName?: string | null;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
interface DataCaptureContextListener {
|
|
1746
|
+
didChangeStatus?(context: DataCaptureContext, contextStatus: ContextStatus): void;
|
|
1747
|
+
didStartObservingContext?(context: DataCaptureContext): void;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
declare class DataCaptureContextSettings extends DefaultSerializeable {
|
|
1751
|
+
private _frameSettings;
|
|
1752
|
+
constructor();
|
|
1753
|
+
get frameDataSettings(): FrameDataSettings;
|
|
1754
|
+
set frameDataSettings(settings: FrameDataSettings);
|
|
1755
|
+
frameDataSettingsBuilder(): FrameDataSettingsBuilder;
|
|
1756
|
+
setProperty(name: string, value: any): void;
|
|
1757
|
+
getProperty(name: string): any;
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
declare class DataCaptureContext extends DefaultSerializeable {
|
|
1761
|
+
private licenseKey;
|
|
1762
|
+
private deviceName;
|
|
1763
|
+
private static _instance;
|
|
1764
|
+
static get sharedInstance(): DataCaptureContext;
|
|
1765
|
+
private controller;
|
|
1766
|
+
private _framework;
|
|
1767
|
+
private _frameworkVersion;
|
|
1768
|
+
private settings;
|
|
1769
|
+
private _frameSource;
|
|
1770
|
+
private view;
|
|
1771
|
+
private modes;
|
|
1772
|
+
private listeners;
|
|
1773
|
+
static getOpenSourceSoftwareLicenseInfo(): Promise<OpenSourceSoftwareLicenseInfo>;
|
|
1774
|
+
private static get coreDefaults();
|
|
1775
|
+
get frameSource(): FrameSource | null;
|
|
1776
|
+
static get deviceID(): string | null;
|
|
1777
|
+
static forLicenseKey(licenseKey: string): DataCaptureContext;
|
|
1778
|
+
static forLicenseKeyWithSettings(licenseKey: string, settings: DataCaptureContextSettings | null): DataCaptureContext;
|
|
1779
|
+
static forLicenseKeyWithOptions(licenseKey: string, options: DataCaptureContextCreationOptions | null): DataCaptureContext;
|
|
1780
|
+
static initialize(licenseKey: string, options?: DataCaptureContextCreationOptions | null, settings?: DataCaptureContextSettings | null): DataCaptureContext;
|
|
1781
|
+
private static create;
|
|
1782
|
+
private constructor();
|
|
1783
|
+
setFrameSource(frameSource: FrameSource | null): Promise<void>;
|
|
1784
|
+
/**
|
|
1785
|
+
* Mirror a frame-source change that already occurred on the native side (e.g. a
|
|
1786
|
+
* CameraSwitchControl tap handled by the native camera switcher, which swaps the context's
|
|
1787
|
+
* active camera on its own). Repoints the TS-side frame source and active-context pointers
|
|
1788
|
+
* WITHOUT re-serializing to native — native is already in this state, so calling
|
|
1789
|
+
* setFrameSource() would trigger a redundant, and failing, swap.
|
|
1790
|
+
*
|
|
1791
|
+
* Private on purpose: framework-internal callers (CameraSwitchControlController) reach it
|
|
1792
|
+
* through the PrivateDataCaptureContext cast, keeping it off the public SDK surface.
|
|
1793
|
+
*/
|
|
1794
|
+
private adoptActiveFrameSource;
|
|
1795
|
+
addListener(listener: DataCaptureContextListener): Promise<void>;
|
|
1796
|
+
removeListener(listener: DataCaptureContextListener): Promise<void>;
|
|
1797
|
+
addMode(mode: DataCaptureMode): Promise<void>;
|
|
1798
|
+
setMode(mode: DataCaptureMode): Promise<void>;
|
|
1799
|
+
removeCurrentMode(): Promise<void>;
|
|
1800
|
+
removeMode(mode: DataCaptureMode): Promise<void>;
|
|
1801
|
+
removeAllModes(): Promise<void>;
|
|
1802
|
+
dispose(): Promise<void>;
|
|
1803
|
+
applySettings(settings: DataCaptureContextSettings): Promise<void>;
|
|
1804
|
+
private update;
|
|
1805
|
+
private addModeInternal;
|
|
1806
|
+
private removeModeInternal;
|
|
1807
|
+
}
|
|
1808
|
+
interface PrivateDataCaptureContext {
|
|
1809
|
+
controller: DataCaptureContextController;
|
|
1810
|
+
modes: [DataCaptureMode];
|
|
1811
|
+
components: [DataCaptureComponent];
|
|
1812
|
+
listeners: DataCaptureContextListener[];
|
|
1813
|
+
view: BaseDataCaptureView | null;
|
|
1814
|
+
update: () => Promise<void>;
|
|
1815
|
+
initialize(): void;
|
|
1816
|
+
adoptActiveFrameSource(frameSource: FrameSource): void;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
interface DataCaptureComponent {
|
|
1820
|
+
readonly id: string;
|
|
1821
|
+
}
|
|
1822
|
+
interface PrivateDataCaptureComponent {
|
|
1823
|
+
_context: DataCaptureContext;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
declare enum VibrationType {
|
|
1827
|
+
default = "default",
|
|
1828
|
+
selectionHaptic = "selectionHaptic",
|
|
1829
|
+
successHaptic = "successHaptic",
|
|
1830
|
+
failureHaptic = "failureHaptic",
|
|
1831
|
+
waveForm = "waveForm",
|
|
1832
|
+
impactHaptic = "impactHaptic"
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
interface VibrationJSON {
|
|
1836
|
+
type: string;
|
|
1837
|
+
timings: number[] | null;
|
|
1838
|
+
amplitudes: number[] | null;
|
|
1839
|
+
}
|
|
1840
|
+
interface PrivateVibration {
|
|
1841
|
+
fromJSON(json: VibrationJSON): Vibration;
|
|
1842
|
+
}
|
|
1843
|
+
declare class Vibration extends DefaultSerializeable {
|
|
1844
|
+
private type;
|
|
1845
|
+
static get defaultVibration(): Vibration;
|
|
1846
|
+
static get selectionHapticFeedback(): Vibration;
|
|
1847
|
+
static get successHapticFeedback(): Vibration;
|
|
1848
|
+
static get failureHapticFeedback(): Vibration;
|
|
1849
|
+
static get impactHapticFeedback(): Vibration;
|
|
1850
|
+
private static fromJSON;
|
|
1851
|
+
protected constructor(type: VibrationType);
|
|
1852
|
+
}
|
|
1853
|
+
declare class WaveFormVibration extends Vibration {
|
|
1854
|
+
private _timings;
|
|
1855
|
+
get timings(): number[];
|
|
1856
|
+
private _amplitudes;
|
|
1857
|
+
get amplitudes(): number[] | null;
|
|
1858
|
+
constructor(timings: number[], amplitudes?: number[] | null);
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
interface SoundJSON {
|
|
1862
|
+
resource: string | null;
|
|
1863
|
+
}
|
|
1864
|
+
interface PrivateSound {
|
|
1865
|
+
fromJSON(json: SoundJSON): Sound;
|
|
1866
|
+
}
|
|
1867
|
+
declare class Sound extends DefaultSerializeable {
|
|
1868
|
+
resource: string | null;
|
|
1869
|
+
static get defaultSound(): Sound;
|
|
1870
|
+
private static fromJSON;
|
|
1871
|
+
constructor(resource: string | null);
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
interface FeedbackJSON {
|
|
1875
|
+
vibration: VibrationJSON | null;
|
|
1876
|
+
sound: SoundJSON | null;
|
|
1877
|
+
}
|
|
1878
|
+
interface PrivateFeedback {
|
|
1879
|
+
fromJSON(json: FeedbackJSON): Feedback;
|
|
1880
|
+
}
|
|
1881
|
+
declare class Feedback extends DefaultSerializeable {
|
|
1882
|
+
static get defaultFeedback(): Feedback;
|
|
1883
|
+
private _vibration;
|
|
1884
|
+
private _sound;
|
|
1885
|
+
private controller;
|
|
1886
|
+
get vibration(): Vibration | null;
|
|
1887
|
+
get sound(): Sound | null;
|
|
1888
|
+
private static fromJSON;
|
|
1889
|
+
constructor(vibration: Vibration | null, sound: Sound | null);
|
|
1890
|
+
emit(): void;
|
|
1891
|
+
toJSON(): object;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
declare enum FrameSourceListenerEvents {
|
|
1895
|
+
didChangeState = "FrameSourceListener.onStateChanged"
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
declare enum TorchListenerEvents {
|
|
1899
|
+
didChangeTorchToState = "TorchListener.onTorchStateChanged"
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
declare enum MacroModeListenerEvents {
|
|
1903
|
+
didChangeMacroMode = "MacroModeListener.onMacroModeChanged"
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
declare class CameraOwnershipManager {
|
|
1907
|
+
private static instance;
|
|
1908
|
+
private readonly owners;
|
|
1909
|
+
private readonly waitingQueue;
|
|
1910
|
+
private readonly protectedCameras;
|
|
1911
|
+
static getInstance(): CameraOwnershipManager;
|
|
1912
|
+
private constructor();
|
|
1913
|
+
requestOwnership(position: CameraPosition, owner: CameraOwner): boolean;
|
|
1914
|
+
requestOwnershipAsync(position: CameraPosition, owner: CameraOwner, timeoutMs?: number): Promise<boolean>;
|
|
1915
|
+
releaseOwnership(position: CameraPosition, owner: CameraOwner): boolean;
|
|
1916
|
+
isOwner(position: CameraPosition, owner: CameraOwner): boolean;
|
|
1917
|
+
getCurrentOwner(position: CameraPosition): CameraOwner | null;
|
|
1918
|
+
checkOwnership(position: CameraPosition, owner: CameraOwner): boolean;
|
|
1919
|
+
getOwnedPosition(owner: CameraOwner): CameraPosition | null;
|
|
1920
|
+
getAllOwnedPositions(owner: CameraOwner): CameraPosition[];
|
|
1921
|
+
private enableProtectionForOwner;
|
|
1922
|
+
private disableProtectionForPosition;
|
|
1923
|
+
private processWaitingQueue;
|
|
1924
|
+
private removeFromQueue;
|
|
1925
|
+
private protectCameraForOwner;
|
|
1926
|
+
private unprotectCamera;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
declare class CameraOwnershipHelper {
|
|
1930
|
+
private static ownershipManager;
|
|
1931
|
+
/**
|
|
1932
|
+
* Get camera instance for the owner (only works if you own it)
|
|
1933
|
+
*/
|
|
1934
|
+
static getCamera(position: CameraPosition, owner: CameraOwner): Camera | null;
|
|
1935
|
+
/**
|
|
1936
|
+
* Safely execute camera operations (only works if you own the camera)
|
|
1937
|
+
*/
|
|
1938
|
+
static withCamera<T>(position: CameraPosition, owner: CameraOwner, operation: (camera: Camera) => Promise<T> | T): Promise<T | null>;
|
|
1939
|
+
/**
|
|
1940
|
+
* Execute camera operations, waiting for ownership if necessary
|
|
1941
|
+
*/
|
|
1942
|
+
static withCameraWhenAvailable<T>(position: CameraPosition, owner: CameraOwner, operation: (camera: Camera) => Promise<T> | T, timeoutMs?: number): Promise<T | null>;
|
|
1943
|
+
/**
|
|
1944
|
+
* Request ownership and wait if necessary
|
|
1945
|
+
*/
|
|
1946
|
+
static requestOwnership(position: CameraPosition, owner: CameraOwner, timeoutMs?: number): Promise<boolean>;
|
|
1947
|
+
/**
|
|
1948
|
+
* Release ownership
|
|
1949
|
+
*/
|
|
1950
|
+
static releaseOwnership(position: CameraPosition, owner: CameraOwner): boolean;
|
|
1951
|
+
/**
|
|
1952
|
+
* Check if owner has ownership
|
|
1953
|
+
*/
|
|
1954
|
+
static hasOwnership(position: CameraPosition, owner: CameraOwner): boolean;
|
|
1955
|
+
/**
|
|
1956
|
+
* Get the camera position currently owned by the owner (if unknown)
|
|
1957
|
+
*/
|
|
1958
|
+
static getOwnedPosition(owner: CameraOwner): CameraPosition | null;
|
|
1959
|
+
/**
|
|
1960
|
+
* Get all camera positions currently owned by the owner
|
|
1961
|
+
*/
|
|
1962
|
+
static getAllOwnedPositions(owner: CameraOwner): CameraPosition[];
|
|
1963
|
+
/**
|
|
1964
|
+
* Release ownership of all cameras owned by the owner
|
|
1965
|
+
*/
|
|
1966
|
+
static releaseAllOwnerships(owner: CameraOwner): void;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
declare enum ZoomListenerEvents {
|
|
1970
|
+
didChangeZoomLevel = "ZoomListener.onZoomLevelChanged"
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
interface Viewfinder {
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
declare const NoViewfinder: {
|
|
1977
|
+
type: string;
|
|
1978
|
+
};
|
|
1979
|
+
|
|
1980
|
+
declare class RectangularViewfinder extends DefaultSerializeable implements Viewfinder {
|
|
1981
|
+
color: Color;
|
|
1982
|
+
private type;
|
|
1983
|
+
private _onChange?;
|
|
1984
|
+
private readonly _style;
|
|
1985
|
+
private readonly _lineStyle;
|
|
1986
|
+
private _dimming;
|
|
1987
|
+
private _disabledDimming;
|
|
1988
|
+
private _animation;
|
|
1989
|
+
private _sizeWithUnitAndAspect;
|
|
1990
|
+
private _disabledColor;
|
|
1991
|
+
get sizeWithUnitAndAspect(): SizeWithUnitAndAspect;
|
|
1992
|
+
private set sizeWithUnitAndAspect(value);
|
|
1993
|
+
private get coreDefaults();
|
|
1994
|
+
constructor();
|
|
1995
|
+
constructor(style: RectangularViewfinderStyle);
|
|
1996
|
+
constructor(style: RectangularViewfinderStyle, lineStyle: RectangularViewfinderLineStyle);
|
|
1997
|
+
get style(): RectangularViewfinderStyle;
|
|
1998
|
+
get lineStyle(): RectangularViewfinderLineStyle;
|
|
1999
|
+
get dimming(): number;
|
|
2000
|
+
set dimming(value: number);
|
|
2001
|
+
get disabledDimming(): number;
|
|
2002
|
+
set disabledDimming(value: number);
|
|
2003
|
+
get animation(): RectangularViewfinderAnimation | null;
|
|
2004
|
+
set animation(animation: RectangularViewfinderAnimation | null);
|
|
2005
|
+
setSize(size: SizeWithUnit): void;
|
|
2006
|
+
setWidthAndAspectRatio(width: NumberWithUnit, heightToWidthAspectRatio: number): void;
|
|
2007
|
+
setHeightAndAspectRatio(height: NumberWithUnit, widthToHeightAspectRatio: number): void;
|
|
2008
|
+
setShorterDimensionAndAspectRatio(fraction: number, aspectRatio: number): void;
|
|
2009
|
+
get disabledColor(): Color;
|
|
2010
|
+
set disabledColor(value: Color);
|
|
2011
|
+
private update;
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
declare class AimerViewfinder extends DefaultSerializeable implements Viewfinder {
|
|
2015
|
+
frameColor: Color;
|
|
2016
|
+
dotColor: Color;
|
|
2017
|
+
private type;
|
|
2018
|
+
private get coreDefaults();
|
|
2019
|
+
constructor();
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
declare class LaserlineViewfinder extends DefaultSerializeable implements Viewfinder {
|
|
2023
|
+
width: NumberWithUnit;
|
|
2024
|
+
enabledColor: Color;
|
|
2025
|
+
disabledColor: Color;
|
|
2026
|
+
private type;
|
|
2027
|
+
private get coreDefaults();
|
|
2028
|
+
constructor();
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
interface LocationSelection {
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
declare const NoneLocationSelection: {
|
|
2035
|
+
type: string;
|
|
2036
|
+
};
|
|
2037
|
+
|
|
2038
|
+
interface RadiusLocationSelectionJSON {
|
|
2039
|
+
radius: NumberWithUnitJSON;
|
|
2040
|
+
}
|
|
2041
|
+
interface PrivateRadiusLocationSelection {
|
|
2042
|
+
fromJSON(JSON: RadiusLocationSelectionJSON): RadiusLocationSelection;
|
|
2043
|
+
}
|
|
2044
|
+
declare class RadiusLocationSelection extends DefaultSerializeable implements LocationSelection {
|
|
2045
|
+
private type;
|
|
2046
|
+
private _radius;
|
|
2047
|
+
get radius(): NumberWithUnit;
|
|
2048
|
+
static fromJSON(locationSelectionJson: RadiusLocationSelectionJSON): RadiusLocationSelection;
|
|
2049
|
+
constructor(radius: NumberWithUnit);
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
interface RectangularLocationSelectionJSON {
|
|
2053
|
+
aspect: SizeWithUnitAndAspectJSON;
|
|
2054
|
+
}
|
|
2055
|
+
interface PrivateRectangularLocationSelection {
|
|
2056
|
+
fromJSON(JSON: RectangularLocationSelectionJSON): RectangularLocationSelection;
|
|
2057
|
+
}
|
|
2058
|
+
declare class RectangularLocationSelection extends DefaultSerializeable implements LocationSelection {
|
|
2059
|
+
private type;
|
|
2060
|
+
private _sizeWithUnitAndAspect;
|
|
2061
|
+
get sizeWithUnitAndAspect(): SizeWithUnitAndAspect;
|
|
2062
|
+
static withSize(size: SizeWithUnit): RectangularLocationSelection;
|
|
2063
|
+
static withWidthAndAspectRatio(width: NumberWithUnit, heightToWidthAspectRatio: number): RectangularLocationSelection;
|
|
2064
|
+
static withHeightAndAspectRatio(height: NumberWithUnit, widthToHeightAspectRatio: number): RectangularLocationSelection;
|
|
2065
|
+
static fromJSON(rectangularLocationSelectionJSON: RectangularLocationSelectionJSON): RectangularLocationSelection;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
declare enum Expiration {
|
|
2069
|
+
Available = "available",
|
|
2070
|
+
Perpetual = "perpetual",
|
|
2071
|
+
NotAvailable = "notAvailable"
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
declare class LicenseInfo extends DefaultSerializeable {
|
|
2075
|
+
private _expiration;
|
|
2076
|
+
get expiration(): Expiration;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
interface ProxyEvent {
|
|
2080
|
+
name: string;
|
|
2081
|
+
nativeEventName: string;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* Framework specific native calls provider
|
|
2086
|
+
*/
|
|
2087
|
+
interface NativeCaller {
|
|
2088
|
+
callFn(fnName: string, args: object | undefined | null, meta?: {
|
|
2089
|
+
isEventRegistration?: boolean;
|
|
2090
|
+
}): Promise<unknown>;
|
|
2091
|
+
registerEvent(evName: string, handler: (args: unknown) => Promise<void>): Promise<unknown>;
|
|
2092
|
+
unregisterEvent(evName: string, subscription: unknown): Promise<void>;
|
|
2093
|
+
eventHook(args: unknown): unknown;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
declare class NativeProxy {
|
|
2097
|
+
eventEmitter: EventEmitter;
|
|
2098
|
+
protected nativeCaller: NativeCaller;
|
|
2099
|
+
protected eventSubscriptions: Map<string, unknown>;
|
|
2100
|
+
private cachedEventHandler;
|
|
2101
|
+
[k: string]: unknown;
|
|
2102
|
+
constructor(nativeCaller: NativeCaller);
|
|
2103
|
+
get framework(): string;
|
|
2104
|
+
get frameworkVersion(): string;
|
|
2105
|
+
subscribeForEvents(events: string[]): Promise<void>;
|
|
2106
|
+
unsubscribeFromEvents(events: string[]): Promise<void>;
|
|
2107
|
+
dispose(): Promise<void>;
|
|
2108
|
+
_call(fnName: string, args: object | undefined | null): Promise<unknown>;
|
|
2109
|
+
_callEventRegistration(fnName: string, args: object | undefined | null): Promise<any>;
|
|
2110
|
+
private _registerEvent;
|
|
2111
|
+
private _unregisterEvent;
|
|
2112
|
+
}
|
|
2113
|
+
declare function createNativeProxy<PROXY>(nativeCaller: NativeCaller): PROXY;
|
|
2114
|
+
|
|
2115
|
+
interface NativeCallerProvider<ProxyType extends string = string> {
|
|
2116
|
+
getNativeCaller(proxyType: ProxyType): NativeCaller;
|
|
2117
|
+
}
|
|
2118
|
+
declare function registerProxies<ProxyType extends string>(proxyTypeNames: readonly ProxyType[], provider: NativeCallerProvider<ProxyType>): void;
|
|
2119
|
+
|
|
2120
|
+
interface FactoryMakerItem {
|
|
2121
|
+
instance?: unknown;
|
|
2122
|
+
builder?: () => unknown;
|
|
2123
|
+
}
|
|
2124
|
+
declare class FactoryMaker {
|
|
2125
|
+
static instances: Map<string, FactoryMakerItem>;
|
|
2126
|
+
static bindInstance(clsName: string, instance: unknown): void;
|
|
2127
|
+
static bindLazyInstance<T>(clsName: string, builder: () => T): void;
|
|
2128
|
+
static bindInstanceIfNotExists(clsName: string, instance: unknown): void;
|
|
2129
|
+
static getInstance<T>(clsName: string): T | undefined;
|
|
2130
|
+
static createInstance<T>(clsName: string): T;
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
declare const CORE_PROXY_TYPE_NAMES: readonly ["CoreProxy", "DataCaptureViewProxy", "DataCaptureContextProxy"];
|
|
2134
|
+
type CoreProxyType = (typeof CORE_PROXY_TYPE_NAMES)[number];
|
|
2135
|
+
interface CoreNativeCallerProvider extends NativeCallerProvider<CoreProxyType> {
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
declare function registerCoreProxies(provider: CoreNativeCallerProvider): void;
|
|
2139
|
+
|
|
2140
|
+
declare function generateIdentifier(): string;
|
|
2141
|
+
|
|
2142
|
+
declare enum ClusteringMode {
|
|
2143
|
+
Disabled = "disabled",
|
|
2144
|
+
Manual = "manual",
|
|
2145
|
+
Auto = "auto",
|
|
2146
|
+
AutoWithManualCorrection = "autoWithManualCorrection"
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
export { AimerViewfinder, Anchor, BaseController, BaseDataCaptureView, Brush, CORE_PROXY_TYPE_NAMES, Camera, CameraController, CameraOwnershipHelper, CameraOwnershipManager, CameraPosition, CameraSettings, CameraSwitchControlController, ClusteringMode, Color, ContextStatus, ControlImage, CoreProxyAdapter, DataCaptureContext, DataCaptureContextEvents, DataCaptureContextSettings, DataCaptureViewController, DataCaptureViewEvents, DefaultSerializeable, Direction, EventDataParser, Expiration, FactoryMaker, Feedback, FocusGestureListenerEvents, FocusGestureStrategy, FocusRange, FontFamily, FrameDataController, FrameDataSettings, FrameDataSettingsBuilder, FrameSourceListenerEvents, FrameSourceState, HTMLElementState, HtmlElementPosition, HtmlElementSize, ImageBuffer, ImageFrameSource, LaserlineViewfinder, LicenseInfo, LogoStyle, MacroMode, MacroModeListenerEvents, MarginsWithUnit, MeasureUnit, NativeProxy, NoViewfinder, NoneLocationSelection, NumberWithUnit, Observable, OpenSourceSoftwareLicenseInfo, Orientation, PinchToZoom, Point, PointWithUnit, PrivateFocusGestureDeserializer, PrivateFrameData, PrivateZoomGestureDeserializer, Quadrilateral, RadiusLocationSelection, Rect, RectWithUnit, RectangularLocationSelection, RectangularViewfinder, RectangularViewfinderAnimation, RectangularViewfinderLineStyle, RectangularViewfinderStyle, SKIP, ScanIntention, ScanditIcon, ScanditIconBuilder, ScanditIconShape, ScanditIconType, SelectionMode, SequenceFrameSource, Size, SizeWithAspect, SizeWithUnit, SizeWithUnitAndAspect, SizingMode, Sound, SwipeToZoom, TapToFocus, TextAlignment, TorchListenerEvents, TorchState, TorchSwitchControl, Vibration, VibrationType, VideoResolution, WaveFormVibration, ZoomGestureListenerEvents, ZoomListenerEvents, ZoomSwitchControl, ZoomSwitchOrientation, createNativeProxy, ensureCoreDefaults, generateIdentifier, getCoreDefaults, ignoreFromSerialization, ignoreFromSerializationIfNull, loadCoreDefaults, nameForSerialization, registerCoreProxies, registerProxies, serializationDefault, setCoreDefaultsLoader };
|
|
2150
|
+
export type { BaseProxy, BrushJSON, CameraOwner, CameraSettingsJSON, ColorJSON, Control, CoreDefaults, CoreNativeCallerProvider, CoreProxy, CoreProxyType, DataCaptureComponent, DataCaptureContextCreationOptions, DataCaptureContextListener, DataCaptureContextProxy, DataCaptureMode, DataCaptureOverlay, DataCaptureView, DataCaptureViewListener, DataCaptureViewProxy, DidChangeSizeEventPayload, DidChangeStateEventPayload, DidChangeStatusEventPayload, EventPayload, FeedbackJSON, FocusGesture, FocusGestureJSON, FocusGestureListener, FrameData, FrameDataJSON, FrameSource, FrameSourceDidChangeStateEventPayload, FrameSourceListener, ImageBufferJSON, LocationSelection, MacroModeListener, MarginsWithUnitJSON, NativeCallResult, NativeCaller, NativeCallerProvider, NumberWithUnitJSON, PointJSON, PointWithUnitJSON, PrivateBrush, PrivateCamera, PrivateCameraSettings, PrivateColor, PrivateContextStatus, PrivateControl, PrivateDataCaptureComponent, PrivateDataCaptureContext, PrivateDataCaptureMode, PrivateDataCaptureOverlay, PrivateFeedback, PrivateImageBuffer, PrivateMarginsWithUnit, PrivateNumberWithUnit, PrivatePinchToZoom, PrivatePoint, PrivatePointWithUnit, PrivateQuadrilateral, PrivateRadiusLocationSelection, PrivateRectangularLocationSelection, PrivateRectangularViewfinderAnimation, PrivateScanditIcon, PrivateSize, PrivateSizeWithUnitAndAspect, PrivateSound, PrivateSwipeToZoom, PrivateTapToFocus, PrivateVibration, PropertyChangeListener, ProxyEvent, QuadrilateralJSON, RadiusLocationSelectionJSON, RectangularLocationSelectionJSON, RectangularViewfinderAnimationJSON, ScanditIconJSON, Serializeable, SizeJSON, SizeWithUnitAndAspectJSON, SoundJSON, StringSerializeable, TorchListener, VibrationJSON, Viewfinder, ZoomGesture, ZoomGestureJSON, ZoomGestureListener, ZoomListener };
|
|
2151
|
+
export { CameraSwitchControl };
|