Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #17 from Dynamsoft/_dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Cube authored Jan 12, 2024
2 parents 8e59396 + 41faad3 commit 843d9a3
Show file tree
Hide file tree
Showing 25 changed files with 179 additions and 348 deletions.
57 changes: 0 additions & 57 deletions .gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion Api Reference.url → API Reference.url
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[InternetShortcut]
URL=https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/api-reference/?ver=4.0.0
URL=https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/api-reference/?ver=4.0.1
33 changes: 33 additions & 0 deletions LEGAL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Legal Notices:

This SDK contains parts of following softwares which are used under license.

===================================================================================
fabric.js

Copyright (c) 2008-2015 Printio (Juriy Zaytsev, Maxim Chernyak)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
===================================================================================

===================================================================================
howler

Copyright (c) 2013-2020 James Simpson and GoldFire Studios, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
===================================================================================
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2003–2023 Dynamsoft. All Rights Reserved.
Copyright © 2003–2024 Dynamsoft. All Rights Reserved.

The use of this software is governed by the Dynamsoft Terms and Conditions.
https://www.dynamsoft.com/company/license-agreement/
136 changes: 65 additions & 71 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/dce.esm.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/dce.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/dce.mjs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/dce.ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<select class="dce-sel-camera" style="display: block;"></select>
<select class="dce-sel-resolution" style="display: block;margin-top: 5px;">
<option class="dce-opt-gotResolution" value="got"></option>
<option data-width="1920" data-height="1080">1920x1080</option>
<option data-width="1280" data-height="720">1280x720</option>
<option data-width="640" data-height="480">640x480</option>
<option data-width="1920" data-height="1080">ask 1920x1080</option>
<option data-width="1280" data-height="720">ask 1280x720</option>
<option data-width="640" data-height="480">ask 640x480</option>
</select>
</div>
<!-- The "Powered by Dynamsoft" logo can be easily removed by eliminating the following line. -->
Expand Down
29 changes: 5 additions & 24 deletions dist/types/class/CameraView.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ export declare class CameraView extends View {
*/
static _onLog: (message: any) => void;
static uiComponentName: string;
private static _hasEngineResourceLoaded;
private static _engineResourcePath?;
/**
* ```js
* Dynamsoft.DCE.CameraEnhancer.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer/dist/";
* ```
*/
static set engineResourcePath(value: string);
static get engineResourcePath(): string;
private static get engineResourcePath();
private static _defaultUIElementURL;
/**
* The url of the default UI.
Expand Down Expand Up @@ -109,23 +101,15 @@ export declare class CameraView extends View {
/**
* @ignore
*/
set _singleFrameMode(value: boolean);
get _singleFrameMode(): boolean;
set _singleFrameMode(value: "disabled" | "camera" | "image");
get _singleFrameMode(): "disabled" | "camera" | "image";
_onSingleFrameAcquired: (canvas: HTMLCanvasElement) => void;
private _singleFrameModeIpt;
private _singleFrameInputContainer;
_clickIptSingleFrameMode: () => void;
/**
* @ignore
*/
extraBindings: Array<(el: Element) => void>;
/**
* @ignore
*/
_ddnUnverifiedResultsStyle: any;
/**
* @ignore
*/
_styleIdsOfUnverifiedResults: any;
_capturedResultReceiver: any;
get disposed(): boolean;
private constructor();
Expand Down Expand Up @@ -236,10 +220,7 @@ export declare class CameraView extends View {
* @ignore
*/
updateLayers(): void;
/**
* @ignore
*/
_clearInnerDrawingItems(): void;
clearAllInnerDrawingItems(): void;
/**
* Remove added elements. Remove event listeners.
*/
Expand Down
12 changes: 12 additions & 0 deletions dist/types/class/DrawingStyleManager.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
import { DrawingStyle } from "../interface";
export declare class DrawingStyleManager {
#private;
static STYLE_BLUE_STROKE: number;
static STYLE_GREEN_STROKE: number;
static STYLE_ORANGE_STROKE: number;
static STYLE_YELLOW_STROKE: number;
static STYLE_BLUE_STROKE_FILL: number;
static STYLE_GREEN_STROKE_FILL: number;
static STYLE_ORANGE_STROKE_FILL: number;
static STYLE_YELLOW_STROKE_FILL: number;
static STYLE_BLUE_STROKE_TRANSPARENT: number;
static STYLE_GREEN_STROKE_TRANSPARENT: number;
static STYLE_ORANGE_STROKE_TRANSPARENT: number;
static USER_START_STYLE_ID: number;
static createDrawingStyle(styleDefinition: DrawingStyle): number;
private static _getDrawingStyle;
static getDrawingStyle(styleId: number): DrawingStyle;
Expand Down
13 changes: 2 additions & 11 deletions dist/types/class/Feedback.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
import { Howl } from "dm-howler";
export declare class Feedback {
#private;
/**
* @ignore
*/
static vibrateDuration: number;
/** @ignore */
static beepSound: Howl;
/**
* @ignore
*/
static get soundSource(): string;
static set soundSource(value: string);
static get beepSoundSource(): string;
static set beepSoundSource(value: string);
static vibrate(): void;
static beep(): void;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/types/class/ImageEditorView.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export declare class ImageEditorView extends View {
* @returns
* @ignore
*/
_createDrawingLayer(width?: number, height?: number, objectFit?: string, drawingLayerId?: number): DrawingLayer;
_createDrawingLayer(drawingLayerId: number, width?: number, height?: number, objectFit?: string): DrawingLayer;
dispose(): void;
}
//# sourceMappingURL=ImageEditorView.d.ts.map
6 changes: 3 additions & 3 deletions dist/types/class/InnerComponent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export declare class InnerComponent extends HTMLElement {
#private;
constructor();
getWrapper(): HTMLDivElement;
setContent(content: HTMLElement): void;
getContent(): HTMLElement;
removeContent(): void;
setElement(slot: "content" | "single-frame-input-container" | "drawing-layer", el: HTMLElement): void;
getElement(slot: "content" | "single-frame-input-container" | "drawing-layer"): HTMLElement;
removeElement(slot: "content" | "single-frame-input-container" | "drawing-layer"): void;
}
//# sourceMappingURL=InnerComponent.d.ts.map
2 changes: 1 addition & 1 deletion dist/types/class/View.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export declare abstract class View {
* @returns
* @ignore
*/
_createDrawingLayer(width?: number, height?: number, objectFit?: string, drawingLayerId?: number): DrawingLayer;
_createDrawingLayer(drawingLayerId: number, width?: number, height?: number, objectFit?: string): DrawingLayer;
createDrawingLayer(): DrawingLayer;
protected deleteDrawingLayer(drawingLayerId: number): void;
deleteUserDefinedDrawingLayer(id: number): void;
Expand Down
16 changes: 8 additions & 8 deletions dist/types/class/cameraenhancer.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ImageSourceAdapter, IntermediateResultReceiver, EnumImagePixelFormat, Point, DSRect, Rect } from "dynamsoft-core";
import { ImageSourceAdapter, EnumImagePixelFormat, Point, DSRect, Rect, Warning, ImageSourceErrorListener } from "dynamsoft-core";
import { CameraView } from "./CameraView";
import { VideoDeviceInfo, Warning, DCEFrame, PlayCallbackInfo, Resolution } from "../interface";
import { VideoDeviceInfo, DCEFrame, PlayCallbackInfo, Resolution } from "../interface";
import { EnumEnhancedFeatures } from "../enum";
export declare class CameraEnhancer extends ImageSourceAdapter {
#private;
Expand Down Expand Up @@ -44,16 +44,15 @@ export declare class CameraEnhancer extends ImageSourceAdapter {
get ifSaveLastUsedCamera(): boolean;
set ifSkipCameraInspection(value: boolean);
get ifSkipCameraInspection(): boolean;
set singleFrameMode(value: boolean);
get singleFrameMode(): boolean;
set cameraOpenTimeout(value: number);
get cameraOpenTimeout(): number;
set singleFrameMode(value: "disabled" | "camera" | "image");
get singleFrameMode(): "disabled" | "camera" | "image";
private _onCameraSelChange;
private _onResolutionSelChange;
private _onCloseBtnClick;
private _onSingleFrameAcquired;
/**
* @ignore
*/
_intermediateResultReceiver: IntermediateResultReceiver;
_intermediateResultReceiver: any;
/**
* @ignore
*/
Expand Down Expand Up @@ -180,6 +179,7 @@ export declare class CameraEnhancer extends ImageSourceAdapter {
_setScanRegion(region: DSRect | Rect): void;
setScanRegion(region: DSRect | Rect): void;
getScanRegion(): any;
setErrorListener(listener: ImageSourceErrorListener): void;
hasNextImageToFetch(): boolean;
startFetching(): void;
stopFetching(): void;
Expand Down
2 changes: 2 additions & 0 deletions dist/types/class/drawingItem/image.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { DrawingItem } from "./drawingitem";
export declare class DT_Image extends DrawingItem {
#private;
private image;
set maintainAspectRatio(value: boolean);
get maintainAspectRatio(): boolean;
constructor(image: DSImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, rect: Rect, maintainAspectRatio: boolean, drawingStyleId?: number);
protected extendSet(property: string, value: any): boolean;
protected extendGet(property: string): any;
Expand Down
4 changes: 4 additions & 0 deletions dist/types/class/drawinglayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export default class DrawingLayer {
static DBR_LAYER_ID: number;
static DLR_LAYER_ID: number;
static USER_DEFINED_LAYER_BASE_ID: number;
/**
* @ignore
*/
static TIP_LAYER_ID: number;
fabricCanvas: fabric.Canvas;
private id;
get width(): number;
Expand Down
6 changes: 1 addition & 5 deletions dist/types/class/drawinglayermanager.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import DrawingLayer from "./drawinglayer";
export declare class DrawingLayersManager {
static DDN_LAYER_ID: number;
static DBR_LAYER_ID: number;
static DLR_LAYER_ID: number;
static USER_DEFINED_LAYER_BASE_ID: number;
_arrDrawingLayer: DrawingLayer[];
createDrawingLayer(baseCvs: HTMLCanvasElement, drawingLayerId?: number): DrawingLayer;
createDrawingLayer(baseCvs: HTMLCanvasElement, drawingLayerId: number): DrawingLayer;
deleteDrawingLayer(drawingLayerId: number): void;
clearDrawingLayers(): void;
getDrawingLayer(drawingLayerId: number): DrawingLayer;
Expand Down
1 change: 0 additions & 1 deletion dist/types/interface/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ export * from "./Resolution";
export * from "./TipConfig";
export * from "./videodeviceinfo";
export * from "./VideoFrameTag";
export * from "./warning";
//# sourceMappingURL=index.d.ts.map
5 changes: 0 additions & 5 deletions dist/types/interface/warning.d.ts

This file was deleted.

3 changes: 2 additions & 1 deletion dist/types/utils/EventHandler.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ export declare class EventHandler {
off(event: string, listener: Function): void;
offAll(event: string): void;
fire(event: string, params?: Array<any>, options?: {
target?: Object;
target?: object;
async?: boolean;
copy?: boolean;
}): Promise<void>;
dispose(): void;
}
Expand Down
Loading

0 comments on commit 843d9a3

Please sign in to comment.