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 #18 from Dynamsoft/_dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Shen-wb authored Apr 9, 2024
2 parents 843d9a3 + 211dba4 commit 2d1a745
Show file tree
Hide file tree
Showing 53 changed files with 110 additions and 142 deletions.
2 changes: 1 addition & 1 deletion 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.1
URL=https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/api-reference/?ver=4.0.2
13 changes: 4 additions & 9 deletions LEGAL.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
===================================================================================
>>>>>>>>>>>>>>>>>>>>>>>>>>>> dynamsoft-camera-enhancer <<<<<<<<<<<<<<<<<<<<<<<<<<<<
===================================================================================

Legal Notices:

This SDK contains parts of following softwares which are used under license.
Expand All @@ -22,12 +26,3 @@ 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.
===================================================================================
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ The simplest way to include the SDK is to use a CDN such as [jsDelivr](https://j
- jsDelivr

```html
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-core@3.0.30/dist/core.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-license@3.0.20/dist/license.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@4.0.1/dist/dce.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-core@3.2.10/dist/core.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-license@3.2.10/dist/license.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@4.0.2/dist/dce.js"></script>
```

- UNPKG

```html
<script src="https://unpkg.com/dynamsoft-core@3.0.30/dist/core.js"></script>
<script src="https://unpkg.com/dynamsoft-license@3.0.20/dist/license.js"></script>
<script src="https://unpkg.com/dynamsoft-camera-enhancer@4.0.1/dist/dce.js"></script>
<script src="https://unpkg.com/dynamsoft-core@3.2.10/dist/core.js"></script>
<script src="https://unpkg.com/dynamsoft-license@3.2.10/dist/license.js"></script>
<script src="https://unpkg.com/dynamsoft-camera-enhancer@4.0.2/dist/dce.js"></script>
```

> In some rare cases, you might not be able to access the CDN. If this happens, you can use
>- [https://download2.dynamsoft.com/packages/dynamsoft-core@3.0.30/dist/core.js](https://download2.dynamsoft.com/packages/dynamsoft-core@3.0.30/dist/core.js)
>- [https://download2.dynamsoft.com/packages/dynamsoft-license@3.0.20/dist/license.js](https://download2.dynamsoft.com/packages/dynamsoft-license@3.0.20/dist/license.js)
>- [https://download2.dynamsoft.com/packages/dynamsoft-camera-enhancer@4.0.1/dist/dce.js](https://download2.dynamsoft.com/packages/dynamsoft-camera-enhancer@4.0.1/dist/dce.js)
>- [https://download2.dynamsoft.com/packages/dynamsoft-core@3.2.10/dist/core.js](https://download2.dynamsoft.com/packages/dynamsoft-core@3.2.10/dist/core.js)
>- [https://download2.dynamsoft.com/packages/dynamsoft-license@3.2.10/dist/license.js](https://download2.dynamsoft.com/packages/dynamsoft-license@3.2.10/dist/license.js)
>- [https://download2.dynamsoft.com/packages/dynamsoft-camera-enhancer@4.0.2/dist/dce.js](https://download2.dynamsoft.com/packages/dynamsoft-camera-enhancer@4.0.2/dist/dce.js)
#### Host the SDK yourself

Expand Down Expand Up @@ -90,8 +90,8 @@ The following shows a few ways to download the SDK.
Depending on how you downloaded the SDK and where you put it. You can typically include it like this:

```html
<script src="./dynamsoft-camera-enhancer-js-4.0.1/dynamsoft/distributables/dynamsoft-core@3.0.30/dist/core.js"></script>
<script src="./dynamsoft-camera-enhancer-js-4.0.1/dynamsoft/distributables/dynamsoft-camera-enhancer@4.0.1/dist/dce.js"></script>
<script src="./dynamsoft-camera-enhancer-js-4.0.2/dynamsoft/distributables/dynamsoft-core@3.2.10/dist/core.js"></script>
<script src="./dynamsoft-camera-enhancer-js-4.0.2/dynamsoft/distributables/dynamsoft-camera-enhancer@4.0.2/dist/dce.js"></script>
```

or
Expand Down
4 changes: 2 additions & 2 deletions dist/dce.esm.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/dce.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/dce.mjs

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/types/class/CameraEnhancerModule.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export declare class CameraEnhancerModule {
static getVersion(): string;
}
//# sourceMappingURL=CameraEnhancerModule.d.ts.map
1 change: 0 additions & 1 deletion dist/types/class/CameraView.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,3 @@ export declare class CameraView extends View {
*/
dispose(): void;
}
//# sourceMappingURL=CameraView.d.ts.map
3 changes: 1 addition & 2 deletions dist/types/class/DrawingStyleManager.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export declare class DrawingStyleManager {
static createDrawingStyle(styleDefinition: DrawingStyle): number;
private static _getDrawingStyle;
static getDrawingStyle(styleId: number): DrawingStyle;
static getDrawingStyles(): Array<DrawingStyle>;
static getAllDrawingStyles(): Array<DrawingStyle>;
private static _updateDrawingStyle;
static updateDrawingStyle(styleId: number, styleDefinition: DrawingStyle): void;
}
//# sourceMappingURL=DrawingStyleManager.d.ts.map
6 changes: 2 additions & 4 deletions dist/types/class/Feedback.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
export declare class Feedback {
#private;
static beepSoundSource: string;
static beep(): void;
static vibrateDuration: number;
static get beepSoundSource(): string;
static set beepSoundSource(value: string);
static vibrate(): void;
static beep(): void;
}
//# sourceMappingURL=Feedback.d.ts.map
7 changes: 5 additions & 2 deletions dist/types/class/ImageEditorView.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DSImageData } from "dynamsoft-core";
import { View } from "./View";
import DrawingLayer from "./drawinglayer";
import { DrawingLayer } from "./DrawingLayer";
export declare class ImageEditorView extends View {
#private;
static createInstance(elementOrUrl?: HTMLElement | string): Promise<ImageEditorView>;
Expand All @@ -9,6 +9,10 @@ export declare class ImageEditorView extends View {
* @ignore
*/
containerClassName: string;
/**
* @ignore
*/
isUseMagnifier: boolean;
get disposed(): boolean;
private constructor();
private _setUIElement;
Expand Down Expand Up @@ -62,4 +66,3 @@ export declare class ImageEditorView extends View {
_createDrawingLayer(drawingLayerId: number, width?: number, height?: number, objectFit?: string): DrawingLayer;
dispose(): void;
}
//# sourceMappingURL=ImageEditorView.d.ts.map
1 change: 0 additions & 1 deletion dist/types/class/InnerComponent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ export declare class InnerComponent extends HTMLElement {
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
15 changes: 15 additions & 0 deletions dist/types/class/Magnifier.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export declare class Magnifier {
#private;
get magnifierCanvas(): HTMLCanvasElement;
constructor();
update(magnifierSize: number, centerPoint: {
x: number;
y: number;
}, magnifiedRegionSize: number, magnifiedImages: Array<{
image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;
width: number;
height: number;
}>): void;
show(): void;
hide(): void;
}
1 change: 0 additions & 1 deletion dist/types/class/TimeCharger.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ export declare class TimeCharger {
startCharging(): void;
stopCharging(): void;
}
//# sourceMappingURL=TimeCharger.d.ts.map
11 changes: 5 additions & 6 deletions dist/types/class/View.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DrawingLayer from "./drawinglayer";
import { DrawingLayersManager } from "./drawinglayermanager";
import { DrawingLayer } from "./DrawingLayer";
import { DrawingLayerManager } from "./DrawingLayerManager";
import { InnerComponent } from "./InnerComponent";
import { DT_Text } from "./drawingItem";
import { DrawingItem, DT_Text } from "./DrawingItem";
import { TipConfig } from "../interface";
declare class DT_Tip extends DT_Text {
#private;
Expand All @@ -20,7 +20,7 @@ export declare abstract class View {
*/
_innerComponent: InnerComponent;
/** @ignore */
_drawingLayersManager: DrawingLayersManager;
_drawingLayerManager: DrawingLayerManager;
/** @ignore */
_layerBaseCvs: HTMLCanvasElement;
/** @ignore */
Expand Down Expand Up @@ -65,12 +65,11 @@ export declare abstract class View {
height: number;
objectFit: string;
}): void;
getSelectedDrawingItems(): any[];
getSelectedDrawingItems(): Array<DrawingItem>;
setTipConfig(tipConfig: TipConfig): void;
getTipConfig(): TipConfig;
setTipVisible(visible: boolean): void;
isTipVisible(): boolean;
updateTipMessage(message: string): void;
}
export {};
//# sourceMappingURL=View.d.ts.map
3 changes: 1 addition & 2 deletions dist/types/class/cameraenhancer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export declare class CameraEnhancer extends ImageSourceAdapter {
/**
* @ignore
*/
_imageDataGetter: any;
private _imageDataGetter;
/**
* @ignore
*/
Expand Down Expand Up @@ -193,4 +193,3 @@ export declare class CameraEnhancer extends ImageSourceAdapter {
convertToClientCoordinates(point: Point): Point;
dispose(): void;
}
//# sourceMappingURL=CameraEnhancer.d.ts.map
3 changes: 1 addition & 2 deletions dist/types/class/drawingItem/arc.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Arc } from "dynamsoft-core";
import { DrawingItem } from "./drawingitem";
import { DrawingItem } from "./DrawingItem";
export declare class DT_Arc extends DrawingItem {
#private;
constructor(arc: Arc, drawingStyleId?: number);
Expand All @@ -13,4 +13,3 @@ export declare class DT_Arc extends DrawingItem {
setArc(arc: Arc): void;
getArc(): Arc;
}
//# sourceMappingURL=arc.d.ts.map
26 changes: 13 additions & 13 deletions dist/types/class/drawingItem/drawingitem.d.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { Note, DrawingItemEvent } from "../../interface";
import { EnumDrawingItemState, EnumDrawingItemMediaType } from "../../enum";
export declare enum EnumItemType {
ARC = "arc",
IMAGE = "image",
LINE = "line",
POLYGON = "polygon",
QUAD = "quad",
RECT = "rect",
TEXT = "text",
GROUP = "group"
declare enum EnumItemType {
ARC = 0,
IMAGE = 1,
LINE = 2,
POLYGON = 3,
QUAD = 4,
RECT = 5,
TEXT = 6,
GROUP = 7
}
export declare enum EnumItemState {
DEFAULT = "default",
SELECTED = "selected"
declare enum EnumItemState {
DEFAULT = 0,
SELECTED = 1
}
export declare abstract class DrawingItem {
#private;
Expand Down Expand Up @@ -131,4 +131,4 @@ export declare abstract class DrawingItem {
*/
abstract updatePosition(): void;
}
//# sourceMappingURL=drawingitem.d.ts.map
export {};
3 changes: 1 addition & 2 deletions dist/types/class/drawingItem/group.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DrawingItem } from "./drawingitem";
import { DrawingItem } from "./DrawingItem";
export declare class DT_Group extends DrawingItem {
constructor(childItems: Array<DrawingItem>);
protected extendSet(property: string, value: any): boolean;
Expand All @@ -12,4 +12,3 @@ export declare class DT_Group extends DrawingItem {
setChildDrawingItems(item: DrawingItem): void;
removeChildItem(item: DrawingItem): void;
}
//# sourceMappingURL=group.d.ts.map
3 changes: 1 addition & 2 deletions dist/types/class/drawingItem/image.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DSImageData, Rect } from "dynamsoft-core";
import { DrawingItem } from "./drawingitem";
import { DrawingItem } from "./DrawingItem";
export declare class DT_Image extends DrawingItem {
#private;
private image;
Expand All @@ -18,4 +18,3 @@ export declare class DT_Image extends DrawingItem {
setImageRect(rect: Rect): void;
getImageRect(): Rect;
}
//# sourceMappingURL=image.d.ts.map
19 changes: 9 additions & 10 deletions dist/types/class/drawingItem/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
export { DrawingItem } from './drawingitem';
export { DT_Rect } from './rect';
export { DT_Arc } from './arc';
export { DT_Polygon } from './polygon';
export { DT_Image } from './image';
export { DT_Text } from './text';
export { DT_Line } from './line';
export { DT_Quad } from './quad';
export { DT_Group } from './group';
//# sourceMappingURL=index.d.ts.map
export { DrawingItem } from "./DrawingItem";
export { DT_Rect } from "./Rect";
export { DT_Arc } from "./Arc";
export { DT_Polygon } from "./Polygon";
export { DT_Image } from "./Image";
export { DT_Text } from "./Text";
export { DT_Line } from "./Line";
export { DT_Quad } from "./Quad";
export { DT_Group } from "./Group";
3 changes: 1 addition & 2 deletions dist/types/class/drawingItem/line.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DT_Polygon } from "./polygon";
import { DT_Polygon } from "./Polygon";
import { LineSegment, Polygon } from "dynamsoft-core";
export declare class DT_Line extends DT_Polygon {
#private;
Expand All @@ -21,4 +21,3 @@ export declare class DT_Line extends DT_Polygon {
setLine(line: LineSegment): void;
getLine(): LineSegment;
}
//# sourceMappingURL=line.d.ts.map
3 changes: 1 addition & 2 deletions dist/types/class/drawingItem/polygon.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fabric } from "dm-fabric";
import { DrawingItem } from "./drawingitem";
import { DrawingItem } from "./DrawingItem";
import { Polygon } from "dynamsoft-core";
export declare function polygonPositionHandler(dim: any, finalMatrix: any, fabricObject: any): fabric.Point;
export declare function actionHandler(eventData: any, transform: any, x: any, y: any): boolean;
Expand All @@ -17,4 +17,3 @@ export declare class DT_Polygon extends DrawingItem {
setPolygon(polygon: Polygon): void;
getPolygon(): Polygon;
}
//# sourceMappingURL=polygon.d.ts.map
3 changes: 1 addition & 2 deletions dist/types/class/drawingItem/quad.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Polygon, Quadrilateral } from "dynamsoft-core";
import { DT_Polygon } from "./polygon";
import { DT_Polygon } from "./Polygon";
export declare class DT_Quad extends DT_Polygon {
#private;
constructor(quad: Quadrilateral, drawingStyleId?: number);
Expand All @@ -17,4 +17,3 @@ export declare class DT_Quad extends DT_Polygon {
setQuad(quad: Quadrilateral): void;
getQuad(): Quadrilateral;
}
//# sourceMappingURL=quad.d.ts.map
3 changes: 1 addition & 2 deletions dist/types/class/drawingItem/rect.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Rect } from "dynamsoft-core";
import { DrawingItem } from "./drawingitem";
import { DrawingItem } from "./DrawingItem";
export declare class DT_Rect extends DrawingItem {
#private;
constructor(rect: Rect, drawingStyleId?: number);
Expand All @@ -13,4 +13,3 @@ export declare class DT_Rect extends DrawingItem {
setRect(rect: Rect): void;
getRect(): Rect;
}
//# sourceMappingURL=rect.d.ts.map
3 changes: 1 addition & 2 deletions dist/types/class/drawingItem/text.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Rect } from "dynamsoft-core";
import { DrawingItem } from "./drawingitem";
import { DrawingItem } from "./DrawingItem";
export declare class DT_Text extends DrawingItem {
#private;
private _text;
Expand All @@ -16,4 +16,3 @@ export declare class DT_Text extends DrawingItem {
setTextRect(rect: Rect): void;
getTextRect(): Rect;
}
//# sourceMappingURL=text.d.ts.map
5 changes: 2 additions & 3 deletions dist/types/class/drawinglayer.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fabric } from "dm-fabric";
import { DrawingItem } from "./drawingItem";
import { DrawingItem } from "./DrawingItem";
import { EnumDrawingItemState, EnumDrawingItemMediaType } from "../enum";
export default class DrawingLayer {
export declare class DrawingLayer {
static DDN_LAYER_ID: number;
static DBR_LAYER_ID: number;
static DLR_LAYER_ID: number;
Expand Down Expand Up @@ -100,4 +100,3 @@ export default class DrawingLayer {
renderAll(): void;
dispose(): void;
}
//# sourceMappingURL=drawinglayer.d.ts.map
Loading

0 comments on commit 2d1a745

Please sign in to comment.