dwt 18.0.0 → 18.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/dynamsoft.webtwain.min.js +33 -107
- package/dist/dynamsoft.webtwain.min.mjs +136 -209
- package/dist/src/dynamsoft.lts.js +10 -10
- package/dist/types/Dynamsoft.d.ts +4 -4
- package/dist/types/WebTwain.Viewer.d.ts +0 -14
- package/dist/types/WebTwain.d.ts +0 -2
- package/package.json +1 -1
- package/dist/addon/dbrjs/dbr-9.2.13.browser.worker.js +0 -11
- package/dist/addon/dbrjs/dbr-9.2.13.full.wasm +0 -0
- package/dist/addon/dbrjs/dbr-9.2.13.full.wasm.js +0 -285
- package/dist/addon/dbrjs/dbr.js +0 -21
- package/dist/addon/dynamsoft.webtwain.addon.camera.css +0 -7
- package/dist/src/dynamsoft.crypto-1.8.0.wasm +0 -0
- package/dist/src/dynamsoft.imageProc-1.8.0.wasm +0 -0
- package/dist/src/dynamsoft.imageProc-sn-1.8.0.wasm +0 -0
- package/dist/src/dynamsoft.imagecore-1.8.0.wasm +0 -0
- package/dist/src/dynamsoft.imageio-1.8.0.wasm +0 -0
- package/dist/src/dynamsoft.imageio_wasm-1.8.0.js +0 -34
- package/dist/src/dynamsoft.pdfReader-1.8.0.wasm +0 -0
- package/dist/src/dynamsoft.pdfReader_wasm-1.8.0.js +0 -34
- package/dist/src/dynamsoft.pdfWriter-1.8.0.wasm +0 -0
- package/dist/src/fastcomp/dynamsoft.crypto-1.8.0.wasm +0 -0
- package/dist/src/fastcomp/dynamsoft.imageProc-1.8.0.wasm +0 -0
- package/dist/src/fastcomp/dynamsoft.imagecore-1.8.0.wasm +0 -0
- package/dist/src/fastcomp/dynamsoft.imageio-1.8.0.wasm +0 -0
- package/dist/src/fastcomp/dynamsoft.imageio_wasm-1.8.0.js +0 -34
- package/dist/src/fastcomp/dynamsoft.pdfWriter-1.8.0.wasm +0 -0
- package/dist/types/Addon.Camera.d.ts +0 -301
|
Binary file
|
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
import { DynamsoftEnumsDWT } from "./Dynamsoft.Enum";
|
|
2
|
-
export interface Camera {
|
|
3
|
-
/**
|
|
4
|
-
* Hide the camera interface.
|
|
5
|
-
*/
|
|
6
|
-
hide(): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Show the camera interface.
|
|
9
|
-
*/
|
|
10
|
-
show(): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Return a list of all available cameras.
|
|
13
|
-
*/
|
|
14
|
-
getSourceList(): Promise<DeviceInfo[]>;
|
|
15
|
-
/**
|
|
16
|
-
* Select a camera to use.
|
|
17
|
-
* @param deviceId Specify the camera with its deviceId.
|
|
18
|
-
*/
|
|
19
|
-
selectSource(deviceId: string): Promise<DeviceInfo>;
|
|
20
|
-
/**
|
|
21
|
-
* Return the info about the current camera.
|
|
22
|
-
*/
|
|
23
|
-
getCurrentSource(): DeviceInfo;
|
|
24
|
-
/**
|
|
25
|
-
* Close the current camera.
|
|
26
|
-
*/
|
|
27
|
-
closeSource(): Promise<DeviceInfo>;
|
|
28
|
-
/**
|
|
29
|
-
* Return the resolutions supported by the current camera.
|
|
30
|
-
*/
|
|
31
|
-
getResolution(): Promise<Resolution[]>;
|
|
32
|
-
/**
|
|
33
|
-
* Set the resolution for the current camera.
|
|
34
|
-
* @param resolution Specify the resolution.
|
|
35
|
-
*/
|
|
36
|
-
setResolution(resolution: Resolution): Promise<Resolution>;
|
|
37
|
-
/**
|
|
38
|
-
* Return the resolution of the current camera.
|
|
39
|
-
*/
|
|
40
|
-
getCurrentResolution(): Promise<Resolution>;
|
|
41
|
-
/**
|
|
42
|
-
* Start streaming video from the current camera.
|
|
43
|
-
* @param element Specify an HTML element to put the video stream in.
|
|
44
|
-
* @param resolution Specify the initial resolution.
|
|
45
|
-
*/
|
|
46
|
-
play(element?: HTMLElement,
|
|
47
|
-
resolution?: Resolution,
|
|
48
|
-
fill?: boolean
|
|
49
|
-
): Promise<Resolution>;
|
|
50
|
-
/**
|
|
51
|
-
* Pause the video stream.
|
|
52
|
-
*/
|
|
53
|
-
pause(): void;
|
|
54
|
-
/**
|
|
55
|
-
* Resume the video stream.
|
|
56
|
-
*/
|
|
57
|
-
resume(): void;
|
|
58
|
-
/**
|
|
59
|
-
* Stop the video stream.
|
|
60
|
-
*/
|
|
61
|
-
stop(): void;
|
|
62
|
-
/**
|
|
63
|
-
* Return the status of the current camera.
|
|
64
|
-
*/
|
|
65
|
-
getStatus(): string;
|
|
66
|
-
/**
|
|
67
|
-
* Capture a frame from the video stream.
|
|
68
|
-
*/
|
|
69
|
-
capture(): Promise<Blob>;
|
|
70
|
-
/**
|
|
71
|
-
* Start streaming video from the current camera in the viewer.
|
|
72
|
-
* @param deviceId Specify a camera.
|
|
73
|
-
* @param resolution Specify the initial resolution.
|
|
74
|
-
* @param mode Specify the mode. Allowed values are 'picture' and 'document'. Setting to 'document' mode will enable border detection.
|
|
75
|
-
* @param fill Whether to leave blank margins when showing
|
|
76
|
-
*/
|
|
77
|
-
showVideo(deviceId?: string,
|
|
78
|
-
resolution?: Resolution,
|
|
79
|
-
mode?: string,
|
|
80
|
-
fill?: boolean
|
|
81
|
-
): Promise<Resolution>;
|
|
82
|
-
/**
|
|
83
|
-
* Start streaming video from the current camera in the viewer.
|
|
84
|
-
* @param documentConfiguration The documentConfiguration settings. If not set, the default setting is used.
|
|
85
|
-
*/
|
|
86
|
-
scanDocument(documentConfiguration?: DocumentConfiguration): Promise<Resolution>;
|
|
87
|
-
/**
|
|
88
|
-
* Close the camera and hide the video streaming UI.
|
|
89
|
-
*/
|
|
90
|
-
closeVideo(): void;
|
|
91
|
-
/**
|
|
92
|
-
* Turn on the torch/flashlight.
|
|
93
|
-
*/
|
|
94
|
-
turnOnTorch(): Promise<void>;
|
|
95
|
-
/**
|
|
96
|
-
* Turn off the torch/flashlight.
|
|
97
|
-
*/
|
|
98
|
-
turnOffTorch(): Promise<void>;
|
|
99
|
-
/**
|
|
100
|
-
* Get the camera capabilities. The return type is MediaTrackCapabilities
|
|
101
|
-
*/
|
|
102
|
-
getCapabilities(): MediaTrackCapabilities;
|
|
103
|
-
/**
|
|
104
|
-
* Specify an event listener for the specified built-in viewer event.
|
|
105
|
-
* @param eventName Specify the event name.
|
|
106
|
-
* @param callback The event listener.
|
|
107
|
-
*/
|
|
108
|
-
on(eventName: string, callback: (...param: any[]) => void): void;
|
|
109
|
-
/**
|
|
110
|
-
* Remove a built-in viewer event handler.
|
|
111
|
-
* @param eventName Specify the event name.
|
|
112
|
-
*/
|
|
113
|
-
off(eventName: string, callback?: (...param: any[]) => void): void;
|
|
114
|
-
}
|
|
115
|
-
export interface DeviceInfo {
|
|
116
|
-
deviceId: string;
|
|
117
|
-
label: string;
|
|
118
|
-
}
|
|
119
|
-
export interface Resolution {
|
|
120
|
-
width: number;
|
|
121
|
-
height: number;
|
|
122
|
-
}
|
|
123
|
-
export interface ViewerEvent {
|
|
124
|
-
/**
|
|
125
|
-
* The index of the current image.
|
|
126
|
-
*/
|
|
127
|
-
index: number;
|
|
128
|
-
/**
|
|
129
|
-
* The x-coordinate of the upper-left corner of the image.
|
|
130
|
-
*/
|
|
131
|
-
imageX: number;
|
|
132
|
-
/**
|
|
133
|
-
* The y-coordinate of the upper-left corner of the image.
|
|
134
|
-
*/
|
|
135
|
-
imageY: number;
|
|
136
|
-
/**
|
|
137
|
-
* The x-coordinate relative to the browser page.
|
|
138
|
-
*/
|
|
139
|
-
pageX: number;
|
|
140
|
-
/**
|
|
141
|
-
* The y-coordinate relative to the browser page.
|
|
142
|
-
*/
|
|
143
|
-
pageY: number;
|
|
144
|
-
}
|
|
145
|
-
export interface DocumentConfiguration {
|
|
146
|
-
scannerViewer?: ScannerViewer;
|
|
147
|
-
documentEditorSettings?: DocumentEditorSettings;
|
|
148
|
-
}
|
|
149
|
-
export interface ScannerViewer {
|
|
150
|
-
deviceId?: string; //camera id
|
|
151
|
-
maxDocuments?:number; //The maximum documents can be captured/loaded in to the buffer.
|
|
152
|
-
enableBorderDetection?: boolean; //Whether to enable border detection. The default value is true.
|
|
153
|
-
fullScreen?: boolean; //Whether to display the video in full screen. The default value is false.
|
|
154
|
-
polygonStyle?:{ //The sytle of the auto detect border.
|
|
155
|
-
stroke?: string; //default: "#fe8e14". Only supports #16 hexadecimal.
|
|
156
|
-
strokeWidth?: string; //default: "2px"
|
|
157
|
-
dash?: string; //The allowed value are "solid" and "dashed", the default value is "solid".
|
|
158
|
-
};
|
|
159
|
-
element?: HTMLDivElement | HTMLElement | string; //Bind the elment or elment id.
|
|
160
|
-
//After binding, display the video in the spcified element, otherwise, display the video in full screen.
|
|
161
|
-
headerStyle?:{
|
|
162
|
-
background?: string; //background color of the head, default : "#000000". Only supports #16 hexadecimal.
|
|
163
|
-
color?: string; //The color of the icons, default : "#ffffff". Only supports #16 hexadecimal.
|
|
164
|
-
selectedColor?: string; //The color of the selected icon, default : "#fe8e14". Only supports #16 hexadecimal.
|
|
165
|
-
};
|
|
166
|
-
bodyStyle?:{
|
|
167
|
-
background?: string; //Background color when the video streaming is not full-screen, default : "#ffffff". Only supports #16 hexadecimal.
|
|
168
|
-
loaderBarSource?: string; //Waiting for the document to appear
|
|
169
|
-
};
|
|
170
|
-
footerStyle?:{
|
|
171
|
-
background?: string; //background color of the foot, default : "#000000". Only supports #16 hexadecimal.
|
|
172
|
-
color?: string; //The color of the icons, default : "#ffffff". Only supports #16 hexadecimal.
|
|
173
|
-
selectedColor?: string; //The color of the selected icon, default : "#fe8e14". Only supports #16 hexadecimal.
|
|
174
|
-
};
|
|
175
|
-
scanButtonStyle?:{
|
|
176
|
-
background?: string; //background color, default : "#fe8e14". Only supports #16 hexadecimal.
|
|
177
|
-
color?: string; //icon color, default : "#ffffff". Only supports #16 hexadecimal.
|
|
178
|
-
};
|
|
179
|
-
resolution?: {
|
|
180
|
-
visibility?: string; //Whether to display the resolution icon in the upper left corner, the value "visible":"hidden". The default value is "visible".
|
|
181
|
-
valueList?: any;
|
|
182
|
-
defaultValue?: Resolution; //Set the default value according to the value set in the valueList.
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
torch?: { //
|
|
186
|
-
visibility?:string; //Whether to show torch icon. The allowed values are "visible" and "hidden". The default value is "visible".
|
|
187
|
-
enableTorch?: boolean; //Whether to enable torch. The default value is false.
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
autoScan?: { //Automatically capture when a clear document is detected. Only applicable to video scanning.
|
|
191
|
-
visibility?:string; //Whether to display the automatic scan icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
192
|
-
enableAutoScan?: boolean; //Whether to enable automatic scan. The default value is false.
|
|
193
|
-
};
|
|
194
|
-
autoDetect?: { //Only applicable to video scanning.
|
|
195
|
-
visibility?:string; //Whether to display the automatic border detection icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
196
|
-
enableAutoDetect?: boolean; //Whether to enable automatic border detection. The default value is false.
|
|
197
|
-
acceptedPolygonConfidence?:number; //The default value is 80. The higher the setting, the more accurate the automatic border detection.
|
|
198
|
-
fpsLimit?: number; //The maximum number of frames detected per second. The default value is 3.
|
|
199
|
-
acceptedBlurryScore?:number; //The default value is 0.
|
|
200
|
-
autoCaptureDelay?: number; //The default value is 1000ms.
|
|
201
|
-
};
|
|
202
|
-
continuousScan?: boolean; //Whether to continuou capture. The default value is true.
|
|
203
|
-
switchCamera?: { //The default camera is the rear camera.
|
|
204
|
-
visibility?:string; //Whether to display the switch camera icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
loadLocalFile?: {
|
|
208
|
-
visibility?:string; //Whether to display the load local file icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
funcConfirmExit?: (bExistImage: boolean) => Promise<boolean>;
|
|
212
|
-
//funcConfirmExit is the callback funtion,
|
|
213
|
-
//Return Promise.resolve(true): End this capture without saving the image data. Return Promise.resolve(false): Stay on the original viewer
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface DocumentEditorSettings {
|
|
217
|
-
visibility?:string; //Whether to display the documentEditor. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
218
|
-
element?: HTMLDivElement | HTMLElement | string; //Bind the elment or elment id.
|
|
219
|
-
//After binding, display the video in the spcified element, otherwise, display the video in full screen.
|
|
220
|
-
defaultViewerName?:string; // default viewer. The allowed value are "cropViewer" and "mainViewer".
|
|
221
|
-
headerStyle?:{
|
|
222
|
-
background?: string; //background color of the head, default: "#000000". Only supports #16 hexadecimal.
|
|
223
|
-
color?: string; //The color of the icons, default : "#ffffff". Only supports #16 hexadecimal.
|
|
224
|
-
selectedColor?: string; //Selected icon color, default : "#fe8e14". Only supports #16 hexadecimal.
|
|
225
|
-
disabledColor?: string; //disabled color. default: "#808080"
|
|
226
|
-
};
|
|
227
|
-
bodyStyle?:{
|
|
228
|
-
background?: string; //Background color when the video streaming is not full-screen, default : "#ffffff". Only supports #16 hexadecimal.
|
|
229
|
-
loaderBarSource?: string; //Waiting for the document to appear
|
|
230
|
-
};
|
|
231
|
-
footerStyle?:{
|
|
232
|
-
background?: string; //background color of the foot, default : "#000000". Only supports #16 hexadecimal.
|
|
233
|
-
color?: string; //The color of the icons, default : "#ffffff". Only supports #16 hexadecimal.
|
|
234
|
-
selectedColor?: string; //Selected icon color, default: "#fe8e14". Only supports #16 hexadecimal.
|
|
235
|
-
};
|
|
236
|
-
insert?: { //Insert an image
|
|
237
|
-
visibility?:string; //Whether to display the insert icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
238
|
-
position?: string; //Set whether to insert the image "before" or "after" the current image. The default value is "before".
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
remove?: { //Remove an image
|
|
242
|
-
visibility?:string; //Whether to display the remove icon.The allowed value are "visible" and "hidden". The default value is "visible".
|
|
243
|
-
funcConfirmRemove?: () => Promise<boolean>;
|
|
244
|
-
//funcConfirmRemove is the callback funtion,
|
|
245
|
-
//Return Promise.resolve(true): delete the image data. Return Promise.resolve(false): Stay on the original viewer
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
rotateLeft?: {
|
|
249
|
-
visibility?:string; //Whether to display the rotate left icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
filter?: {
|
|
253
|
-
visibility?:string; //Whether to display the filter icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
254
|
-
valueList?:any;
|
|
255
|
-
defaultValue?: string; //Filter selected by default. By default, the original filter is selected.
|
|
256
|
-
applyToAll?: { //Apply to all documents
|
|
257
|
-
visibility?:string; //Whether to display the applyToAll icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
258
|
-
enableApplyToAll?: boolean; //Whether to enable to apply to all documents, Default:false.
|
|
259
|
-
label?: string; //the label of the applyToAll, default: "Apply to all"
|
|
260
|
-
};
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
crop?:{
|
|
264
|
-
visibility?:string; //Whether to display the crop icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
cropViewer?:CropViewer;
|
|
268
|
-
funcConfirmExit?: (bChanged: boolean, previousViewerName: string) => Promise<Number | DynamsoftEnumsDWT.EnumDWT_ConfirmExitType>;
|
|
269
|
-
//funcConfirmExit is the callback funtion.
|
|
270
|
-
//Return Promise.resolve(EnumDWT_ConfirmExitType.Exit): Exit original viewer without saving the image data.
|
|
271
|
-
//Return Promise.resolve(EnumDWT_ConfirmExitType.SaveAndExit): Exit original viewer with saving the image data.
|
|
272
|
-
//Return Promise.resolve(EnumDWT_ConfirmExitType.Cancel): Stay on the original viewer
|
|
273
|
-
funcConfirmExitAfterSave?: (firedByDocumentEdit: boolean) => void;
|
|
274
|
-
//funcConfirmExitAfterSave is the callback funtion
|
|
275
|
-
}
|
|
276
|
-
export interface CropViewer {
|
|
277
|
-
visibility?: boolean; //Whether to display the crop viewer. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
278
|
-
|
|
279
|
-
polygonStyle?:{ //The polygon style in the crop viewer.
|
|
280
|
-
stroke?: string; //default : "#fe8e14". Only supports #16 hexadecimal.
|
|
281
|
-
strokeWidth?: string; //default: "2px"
|
|
282
|
-
dash?: string; //The allowed value are "solid" and "dashed", the default value is "solid".
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
rotateLeft?:{
|
|
286
|
-
visibility?: string; //Whether to display the rotate left icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
287
|
-
};
|
|
288
|
-
rotateRight?:{
|
|
289
|
-
visibility?: string; //Whether to display the rotate right icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
290
|
-
};
|
|
291
|
-
autoDetectBorder?:{
|
|
292
|
-
visibility?: string; //Whether to display the automatic border detection icon. The allowed value are "visible" and "hidden". The default value is "visible".
|
|
293
|
-
};
|
|
294
|
-
funcConfirmExit?: (bChanged: boolean, previousViewerName: string) => Promise<Number | DynamsoftEnumsDWT.EnumDWT_ConfirmExitType>;
|
|
295
|
-
//funcConfirmExit is the callback funtion.
|
|
296
|
-
//Return Promise.resolve(EnumDWT_ConfirmExitType.Exit): Exit original viewer without saving the image data.
|
|
297
|
-
//Return Promise.resolve(EnumDWT_ConfirmExitType.SaveAndExit): Exit original viewer with saving the image data.
|
|
298
|
-
//Return Promise.resolve(EnumDWT_ConfirmExitType.Cancel): Stay on the original viewer
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|