Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-viewers-core

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-viewers-core - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

174

dist/ts-viewers-core.d.ts

@@ -65,26 +65,46 @@ // Generated by dts-bundle-generator v5.9.0

}
export declare class DomUtils {
static htmlToElements(html: string): HTMLElement[];
static promisify<T>(callback: () => T): Promise<T>;
static runEmptyTimeout(): Promise<void>;
static downloadFile(blob: Blob, name?: string): void;
static loadImageAsync(url: string, revoke?: boolean): Promise<HTMLImageElement>;
export declare class ContextMenu {
private _container;
private _shown;
private _content;
set content(value: HTMLElement[]);
private _enabled;
get enabled(): boolean;
set enabled(value: boolean);
constructor();
destroy(): void;
show(pointerPosition: Vec2, parent: HTMLElement): void;
hide(): void;
clear(): void;
private onPointerDownOutside;
private setContextMenuPosition;
}
export interface BBox {
ll: Vec2;
lr: Vec2;
ur: Vec2;
ul: Vec2;
}
export declare type CurveData = [
control1: Vec2,
control2: Vec2,
end: Vec2
export declare type Double = readonly [
x: number,
y: number
];
export declare class CloudCurveData {
start: Vec2;
curves: CurveData[];
static buildFromPolyline(polylinePoints: Vec2[], maxArcSize: number): CloudCurveData;
static buildFromEllipse(rx: number, ry: number, maxArcSize: number, matrix?: Mat3): CloudCurveData;
}
export declare type Quadruple = readonly [
x1: number,
y1: number,
x2: number,
y2: number
];
export declare type Hextuple = readonly [
a: number,
b: number,
d: number,
e: number,
g: number,
h: number
];
export declare type Octuple = readonly [
x1: number,
y1: number,
x2: number,
y2: number,
x3: number,
y3: number,
x4: number,
y4: number
];
export interface SmoothPathData {

@@ -116,30 +136,86 @@ positions: Vec2[];

}
export declare type Double = readonly [
x: number,
y: number
export interface CanvasSmoothPathData extends SmoothPathData {
path: Path2D;
strokeWidth: number;
color: Quadruple;
}
export interface CanvasSmoothPathOptions extends SmoothPathOptions {
canvasWidth: number;
canvasHeight: number;
}
export declare class CanvasSmoothPathEditor extends SmoothPath {
private static readonly _defaultStrokeWidth;
private static readonly _colors;
protected readonly _container: HTMLElement;
protected readonly _canvas: HTMLCanvasElement;
get canvas(): HTMLCanvasElement;
get ctx(): CanvasRenderingContext2D;
get canvasSize(): [
w: number,
h: number
];
set canvasSize(value: [
w: number,
h: number
]);
protected readonly _contextMenu: ContextMenu;
protected _strokeWidth: number;
protected _color: Quadruple;
protected _currentPath: CanvasSmoothPathData;
protected _paths: CanvasSmoothPathData[];
get paths(): CanvasSmoothPathData[];
constructor(container: HTMLElement, options: CanvasSmoothPathOptions);
destroy(): void;
getImageData(): Uint8ClampedArray;
newPath(startPosition: Vec2): void;
removePath(path: Path2D): void;
removeLastPath(): void;
removeAllPaths(): void;
protected updateCurrentPath(): string;
protected refreshEditor(): void;
protected drawPaths(): void;
protected convertClientCoordsToCanvas(clX: number, clY: number): [
caX: number,
caY: number
];
protected onContextMenu: (event: MouseEvent) => void;
protected onPointerDown: (e: PointerEvent) => void;
protected onPointerMove: (e: PointerEvent) => void;
protected onPointerUp: (e: PointerEvent) => void;
protected fillContextMenu(): void;
protected buildColorPicker(): HTMLElement;
protected buildWidthSliderWithButtons(): HTMLElement;
}
export declare class Loader {
static readonly loaderHtml = "\n <div class=\"abs-full-size-overlay\">\n <div class=\"loader\">\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>\n ";
protected readonly _loaderElement: HTMLElement;
protected _isShown: boolean;
constructor();
show(parent: HTMLElement, zIndex?: number): void;
hide(): void;
}
export declare class DomUtils {
static htmlToElements(html: string): HTMLElement[];
static promisify<T>(callback: () => T): Promise<T>;
static runEmptyTimeout(): Promise<void>;
static downloadFile(blob: Blob, name?: string): void;
static loadImageAsync(url: string, revoke?: boolean): Promise<HTMLImageElement>;
}
export interface BBox {
ll: Vec2;
lr: Vec2;
ur: Vec2;
ul: Vec2;
}
export declare type CurveData = [
control1: Vec2,
control2: Vec2,
end: Vec2
];
export declare type Quadruple = readonly [
x1: number,
y1: number,
x2: number,
y2: number
];
export declare type Hextuple = readonly [
a: number,
b: number,
d: number,
e: number,
g: number,
h: number
];
export declare type Octuple = readonly [
x1: number,
y1: number,
x2: number,
y2: number,
x3: number,
y3: number,
x4: number,
y4: number
];
export declare class CloudCurveData {
start: Vec2;
curves: CurveData[];
static buildFromPolyline(polylinePoints: Vec2[], maxArcSize: number): CloudCurveData;
static buildFromEllipse(rx: number, ry: number, maxArcSize: number, matrix?: Mat3): CloudCurveData;
}
export interface SvgSmoothPathData extends SmoothPathData {

@@ -146,0 +222,0 @@ path: SVGPathElement;

{
"name": "ts-viewers-core",
"version": "0.0.10",
"version": "0.0.11",
"description": "browser image viewer with basic painting support",

@@ -5,0 +5,0 @@ "module": "dist/ts-viewers-core.esm.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc