V1_commit_RGC

This commit is contained in:
2026-02-11 13:57:54 +01:00
commit ef397eedac
4901 changed files with 292881 additions and 0 deletions

21
SuiviREForamteur/node_modules/canvg/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2010 - present Gabe Lerner (gabelerner@gmail.com) - https://github.com/canvg/canvg
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.

314
SuiviREForamteur/node_modules/canvg/README.md generated vendored Normal file
View File

@@ -0,0 +1,314 @@
# canvg
[![NPM version][npm]][npm-url]
[![Dependencies status][deps]][deps-url]
[![Build status][build]][build-url]
[![Coverage status][coverage]][coverage-url]
[![Dependabot badge][dependabot]][dependabot-url]
[![Documentation badge][documentation]][documentation-url]
[npm]: https://img.shields.io/npm/v/canvg.svg
[npm-url]: https://npmjs.com/package/canvg
[deps]: https://david-dm.org/canvg/canvg.svg
[deps-url]: https://david-dm.org/canvg/canvg
[build]: https://img.shields.io/github/workflow/status/canvg/canvg/CI.svg
[build-url]: https://github.com/canvg/canvg/actions
[coverage]: https://img.shields.io/coveralls/canvg/canvg.svg
[coverage-url]: https://coveralls.io/r/canvg/canvg
[dependabot]: https://api.dependabot.com/badges/status?host=github&repo=canvg/canvg
[dependabot-url]: https://dependabot.com/
[documentation]: https://img.shields.io/badge/API-Documentation-2b7489.svg
[documentation-url]: https://canvg.github.io/canvg
JavaScript SVG parser and renderer on Canvas. It takes the URL to the SVG file or the text of the SVG file, parses it in JavaScript and renders the result on Canvas.
[Demo](https://canvg.github.io/canvg/demo/index.html)
[Playground](https://jsfiddle.net/0q1vrjxk/)
## Install
```sh
npm i canvg
# or
yarn add canvg
```
## Usage
Basic module exports:
```js
export default Canvg;
export {
presets
};
```
[Description of all exports you can find in Documentation.](https://canvg.github.io/canvg/index.html)
### Example
```js
import Canvg from 'canvg';
let v = null;
window.onload = async () => {
const canvas = document.querySelector('canvas');
const ctx = canvas.getContext('2d');
v = await Canvg.from(ctx, './svgs/1.svg');
// Start SVG rendering with animations and mouse handling.
v.start();
};
window.onbeforeunload = () => {
v.stop();
};
```
<details>
<summary>
<b>OffscreenCanvas</b>
</summary>
```js
import Canvg, {
presets
} from 'canvg';
self.onmessage = async (event) => {
const {
width,
height,
svg
} = event.data;
const canvas = new OffscreenCanvas(width, height);
const ctx = canvas.getContext('2d');
const v = await Canvg.from(ctx, svg, presets.offscreen());
// Render only first frame, ignoring animations and mouse.
await v.render();
const blob = await canvas.convertToBlob();
const pngUrl = URL.createObjectURL(blob);
self.postMessage({
pngUrl
});
};
```
[`OffscreenCanvas` browsers compatibility.](https://caniuse.com/offscreencanvas)
</details>
<details>
<summary>
<b>NodeJS</b>
</summary>
```js
import {
promises as fs
} from 'fs';
import {
DOMParser
} from 'xmldom';
import * as canvas from 'canvas';
import fetch from 'node-fetch';
import Canvg, {
presets
} from 'canvg';
const preset = presets.node({
DOMParser,
canvas,
fetch
});
(async (output, input) => {
const svg = await fs.readFile(input, 'utf8');
const canvas = preset.createCanvas(800, 600);
const ctx = canvas.getContext('2d');
const v = Canvg.fromString(ctx, svg, preset);
// Render only first frame, ignoring animations.
await v.render();
const png = canvas.toBuffer();
await fs.writeFile(output, png);
})(
process.argv.pop(),
process.argv.pop()
);
```
</details>
<details>
<summary>
<b>Resize</b>
</summary>
```js
import Canvg, {
presets
} from 'canvg';
self.onmessage = async (event) => {
const {
width,
height,
svg
} = event.data;
const canvas = new OffscreenCanvas(width, height);
const ctx = canvas.getContext('2d');
const v = await Canvg.from(ctx, svg, presets.offscreen());
/**
* Resize SVG to fit in given size.
* @param width
* @param height
* @param preserveAspectRatio
*/
v.resize(width, height, 'xMidYMid meet');
// Render only first frame, ignoring animations and mouse.
await v.render();
const blob = await canvas.convertToBlob();
const pngUrl = URL.createObjectURL(blob);
self.postMessage({
pngUrl
});
};
```
</details>
<details>
<summary>
<b>Browser</b>
</summary>
```html
<script type="text/javascript" src="https://unpkg.com/canvg@3.0.4/lib/umd.js"></script>
<script type="text/javascript">
window.onload = () => {
const canvas = document.querySelector('canvas');
const ctx = canvas.getContext('2d');
v = canvg.Canvg.fromString(ctx, '<svg width="600" height="600"><text x="50" y="50">Hello World!</text></svg>');
// Start SVG rendering with animations and mouse handling.
v.start();
};
</script>
<canvas />
```
</details>
### Options
The third parameter of `new Canvg(...)`, `Canvg.from(...)` and `Canvg.fromString(...)` is options:
```ts
interface IOptions {
/**
* WHATWG-compatible `fetch` function.
*/
fetch?: typeof fetch;
/**
* XML/HTML parser from string into DOM Document.
*/
DOMParser?: typeof DOMParser;
/**
* Window object.
*/
window?: Window;
/**
* Whether enable the redraw.
*/
enableRedraw?: boolean;
/**
* Ignore mouse events.
*/
ignoreMouse?: boolean;
/**
* Ignore animations.
*/
ignoreAnimation?: boolean;
/**
* Does not try to resize canvas.
*/
ignoreDimensions?: boolean;
/**
* Does not clear canvas.
*/
ignoreClear?: boolean;
/**
* Scales horizontally to width.
*/
scaleWidth?: number;
/**
* Scales vertically to height.
*/
scaleHeight?: number;
/**
* Draws at a x offset.
*/
offsetX?: number;
/**
* Draws at a y offset.
*/
offsetY?: number;
/**
* Will call the function on every frame, if it returns true, will redraw.
*/
forceRedraw?(): boolean;
/**
* Default `rem` size.
*/
rootEmSize?: number;
/**
* Default `em` size.
*/
emSize?: number;
/**
* Function to create new canvas.
*/
createCanvas?: (width: number, height: number) => HTMLCanvasElement | OffscreenCanvas;
/**
* Function to create new image.
*/
createImage?: (src: string, anonymousCrossOrigin?: boolean) => Promise<CanvasImageSource>;
/**
* Load images anonymously.
*/
anonymousCrossOrigin?: boolean;
}
```
#### Options presets
There are two options presets:
- `presets.offscreen()`: options for [`OffscreenCanvas`](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas);
- `presets.node({ DOMParser, canvas, fetch })`: options for NodeJS with [`node-canvas`](https://github.com/Automattic/node-canvas).
## What's implemented?
The end goal is everything from the [SVG spec](http://www.w3.org/TR/SVG/). The majority of the rendering and animation is working. If you would like to see a feature implemented, don't hesitate to add it to the issues list, or better is to create pull request 😎

View File

@@ -0,0 +1,21 @@
export default class BoundingBox {
x1: number;
y1: number;
x2: number;
y2: number;
constructor(x1?: number, y1?: number, x2?: number, y2?: number);
get x(): number;
get y(): number;
get width(): number;
get height(): number;
addPoint(x: number, y: number): void;
addX(x: number): void;
addY(y: number): void;
addBoundingBox(boundingBox: BoundingBox): void;
private sumCubic;
private bezierCurveAdd;
addBezierCurve(p0x: number, p0y: number, p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): void;
addQuadraticCurve(p0x: number, p0y: number, p1x: number, p1y: number, p2x: number, p2y: number): void;
isPointInBox(x: number, y: number): boolean;
}
//# sourceMappingURL=BoundingBox.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BoundingBox.d.ts","sourceRoot":"","sources":["../src/BoundingBox.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,OAAO,WAAW;IAEvB,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;gBAHF,EAAE,SAAa,EACf,EAAE,SAAa,EACf,EAAE,SAAa,EACf,EAAE,SAAa;IAMvB,IAAI,CAAC,WAEJ;IAED,IAAI,CAAC,WAEJ;IAED,IAAI,KAAK,WAER;IAED,IAAI,MAAM,WAET;IAED,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAgC7B,IAAI,CAAC,CAAC,EAAE,MAAM;IAId,IAAI,CAAC,CAAC,EAAE,MAAM;IAId,cAAc,CAAC,WAAW,EAAE,WAAW;IAgBvC,OAAO,CAAC,QAAQ;IAehB,OAAO,CAAC,cAAc;IA6DtB,cAAc,CACb,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM;IAQZ,iBAAiB,CAChB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM;IAUZ,YAAY,CACX,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM;CAgBV"}

98
SuiviREForamteur/node_modules/canvg/lib/Canvg.d.ts generated vendored Normal file
View File

@@ -0,0 +1,98 @@
import { RenderingContext2D } from './types';
import Parser, { IParserOptions } from './Parser';
import Screen, { IScreenOptions, IScreenStartOptions } from './Screen';
import Document, { IDocumentOptions } from './Document';
declare type DOMDocument = typeof window.document;
export interface IOptions extends IParserOptions, IScreenOptions, IScreenStartOptions, IDocumentOptions {
}
/**
* SVG renderer on canvas.
*/
export default class Canvg {
/**
* Create Canvg instance from SVG source string or URL.
* @param ctx - Rendering context.
* @param svg - SVG source string or URL.
* @param options - Rendering options.
* @returns Canvg instance.
*/
static from(ctx: RenderingContext2D, svg: string, options?: IOptions): Promise<Canvg>;
/**
* Create Canvg instance from SVG source string.
* @param ctx - Rendering context.
* @param svg - SVG source string.
* @param options - Rendering options.
* @returns Canvg instance.
*/
static fromString(ctx: RenderingContext2D, svg: string, options?: IOptions): Canvg;
/**
* XML/HTML parser instance.
*/
readonly parser: Parser;
/**
* Screen instance.
*/
readonly screen: Screen;
/**
* Canvg Document.
*/
readonly document: Document;
private readonly documentElement;
private readonly options;
/**
* Main constructor.
* @param ctx - Rendering context.
* @param svg - SVG Document.
* @param options - Rendering options.
*/
constructor(ctx: RenderingContext2D, svg: DOMDocument, options?: IOptions);
/**
* Create new Canvg instance with inherited options.
* @param ctx - Rendering context.
* @param svg - SVG source string or URL.
* @param options - Rendering options.
* @returns Canvg instance.
*/
fork(ctx: RenderingContext2D, svg: string, options?: IOptions): Promise<Canvg>;
/**
* Create new Canvg instance with inherited options.
* @param ctx - Rendering context.
* @param svg - SVG source string.
* @param options - Rendering options.
* @returns Canvg instance.
*/
forkString(ctx: RenderingContext2D, svg: string, options?: IOptions): Canvg;
/**
* Document is ready promise.
* @returns Ready promise.
*/
ready(): Promise<void>;
/**
* Document is ready value.
* @returns Is ready or not.
*/
isReady(): boolean;
/**
* Render only first frame, ignoring animations and mouse.
* @param options - Rendering options.
*/
render(options?: IScreenStartOptions): Promise<void>;
/**
* Start rendering.
* @param options - Render options.
*/
start(options?: IScreenStartOptions): void;
/**
* Stop rendering.
*/
stop(): void;
/**
* Resize SVG to fit in given size.
* @param width
* @param height
* @param preserveAspectRatio
*/
resize(width: number, height?: number, preserveAspectRatio?: boolean | string): void;
}
export {};
//# sourceMappingURL=Canvg.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Canvg.d.ts","sourceRoot":"","sources":["../src/Canvg.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,MAAM,EAAE,EACd,cAAc,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,MAAM,EAAE,EACd,cAAc,EACd,mBAAmB,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,EAAE,EAChB,gBAAgB,EAEhB,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,EACd,mBAAmB,GAAE,OAAO,GAAC,MAAc;CAI5C"}

View File

@@ -0,0 +1,14 @@
import { RenderingContext2D } from '../types';
import Document from './Document';
import TextElement from './TextElement';
export default class AElement extends TextElement {
type: string;
protected readonly hasText: boolean;
protected readonly text: string;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
getText(): string;
renderChildren(ctx: RenderingContext2D): void;
onClick(): void;
onMouseMove(): void;
}
//# sourceMappingURL=AElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AElement.d.ts","sourceRoot":"","sources":["../../src/Document/AElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAChD,IAAI,SAAO;IACX,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IACpC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAG/B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAiB3B,OAAO;IAIP,cAAc,CAAC,GAAG,EAAE,kBAAkB;IA6CtC,OAAO;IAUP,WAAW;CAKX"}

View File

@@ -0,0 +1,6 @@
import AnimateElement from './AnimateElement';
export default class AnimateColorElement extends AnimateElement {
type: string;
calcValue(): string;
}
//# sourceMappingURL=AnimateColorElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AnimateColorElement.d.ts","sourceRoot":"","sources":["../../src/Document/AnimateColorElement.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,cAAc;IAC9D,IAAI,SAAkB;IAEtB,SAAS;CA2BT"}

View File

@@ -0,0 +1,27 @@
import Property from '../Property';
import Document from './Document';
import Element from './Element';
export interface IProgress {
from?: Property;
to?: Property;
progress: number;
}
export default class AnimateElement extends Element {
type: string;
protected readonly begin: number;
protected readonly maxDuration: number;
protected readonly from: Property;
protected readonly to: Property;
protected readonly values: Property<string[]>;
protected duration: number;
protected initialValue: string;
protected initialUnits: string;
protected removed: boolean;
protected frozen: boolean;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
protected getProperty(): Property<any>;
calcValue(): string;
update(delta: number): boolean;
getProgress(): IProgress;
}
//# sourceMappingURL=AnimateElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AnimateElement.d.ts","sourceRoot":"","sources":["../../src/Document/AnimateElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,WAAW,SAAS;IACzB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IAClD,IAAI,SAAa;IACjB,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IACvC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAClC,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IAChC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,SAAS,CAAC,QAAQ,SAAK;IACvB,SAAS,CAAC,YAAY,EAAE,MAAM,CAAQ;IACtC,SAAS,CAAC,YAAY,SAAM;IAC5B,SAAS,CAAC,OAAO,UAAS;IAC1B,SAAS,CAAC,MAAM,UAAS;gBAGxB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAmB3B,SAAS,CAAC,WAAW;IAWrB,SAAS;IAmBT,MAAM,CAAC,KAAK,EAAE,MAAM;IA+DpB,WAAW;CAgCX"}

View File

@@ -0,0 +1,6 @@
import AnimateElement from './AnimateElement';
export default class AnimateTransformElement extends AnimateElement {
type: string;
calcValue(): string;
}
//# sourceMappingURL=AnimateTransformElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AnimateTransformElement.d.ts","sourceRoot":"","sources":["../../src/Document/AnimateTransformElement.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,cAAc;IAClE,IAAI,SAAsB;IAE1B,SAAS;CAiBT"}

View File

@@ -0,0 +1,9 @@
import { RenderingContext2D } from '../types';
import BoundingBox from '../BoundingBox';
import PathElement from './PathElement';
export default class CircleElement extends PathElement {
type: string;
path(ctx: RenderingContext2D): BoundingBox;
getMarkers(): any;
}
//# sourceMappingURL=CircleElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CircleElement.d.ts","sourceRoot":"","sources":["../../src/Document/CircleElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACrD,IAAI,SAAY;IAEhB,IAAI,CAAC,GAAG,EAAE,kBAAkB;IAmB5B,UAAU;CAGV"}

View File

@@ -0,0 +1,8 @@
import { RenderingContext2D } from '../types';
import Element from './Element';
export default class ClipPathElement extends Element {
type: string;
apply(ctx: RenderingContext2D): void;
render(_: RenderingContext2D): void;
}
//# sourceMappingURL=ClipPathElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClipPathElement.d.ts","sourceRoot":"","sources":["../../src/Document/ClipPathElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,OAAO,MAAM,WAAW,CAAC;AAOhC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IACnD,IAAI,SAAc;IAElB,KAAK,CAAC,GAAG,EAAE,kBAAkB;IAsD7B,MAAM,CAAC,CAAC,EAAE,kBAAkB;CAG5B"}

View File

@@ -0,0 +1,6 @@
import Element from './Element';
export default class DefsElement extends Element {
type: string;
render(): void;
}
//# sourceMappingURL=DefsElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DefsElement.d.ts","sourceRoot":"","sources":["../../src/Document/DefsElement.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,IAAI,SAAU;IAEd,MAAM;CAGN"}

View File

@@ -0,0 +1,5 @@
import Element from './Element';
export default class DescElement extends Element {
type: string;
}
//# sourceMappingURL=DescElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DescElement.d.ts","sourceRoot":"","sources":["../../src/Document/DescElement.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,IAAI,SAAU;CACd"}

View File

@@ -0,0 +1,119 @@
import Canvg from '../Canvg';
import Screen, { IScreenViewBoxConfig } from '../Screen';
import Property from '../Property';
import SVGFontLoader from '../SVGFontLoader';
import Element from './Element';
import TextNode from './TextNode';
import ImageElement from './ImageElement';
import SVGElement from './SVGElement';
/**
* Function to create new canvas.
*/
export declare type CreateCanvas = (width: number, height: number) => HTMLCanvasElement | OffscreenCanvas;
/**
* Function to create new image.
*/
export declare type CreateImage = (src: string, anonymousCrossOrigin?: boolean) => Promise<CanvasImageSource>;
export interface IDocumentOptions {
/**
* Default `rem` size.
*/
rootEmSize?: number;
/**
* Default `em` size.
*/
emSize?: number;
/**
* Function to create new canvas.
*/
createCanvas?: CreateCanvas;
/**
* Function to create new image.
*/
createImage?: CreateImage;
/**
* Load images anonymously.
*/
anonymousCrossOrigin?: boolean;
}
export declare type IViewBoxConfig = Omit<IScreenViewBoxConfig, 'document'>;
declare type DOMDocument = typeof window.document;
declare function createCanvas(width: number, height: number): HTMLCanvasElement;
declare function createImage(src: string, anonymousCrossOrigin?: boolean): Promise<HTMLImageElement>;
export default class Document {
readonly canvg: Canvg;
static readonly createCanvas: typeof createCanvas;
static readonly createImage: typeof createImage;
static readonly elementTypes: {
svg: typeof SVGElement;
rect: typeof import("./RectElement").default;
circle: typeof import("./CircleElement").default;
ellipse: typeof import("./EllipseElement").default;
line: typeof import("./LineElement").default;
polyline: typeof import("./PolylineElement").default;
polygon: typeof import("./PolygonElement").default;
path: typeof import("./PathElement").default;
pattern: typeof import("./PatternElement").default;
marker: typeof import("./MarkerElement").default;
defs: typeof import("./DefsElement").default;
linearGradient: typeof import("./LinearGradientElement").default;
radialGradient: typeof import("./RadialGradientElement").default;
stop: typeof import("./StopElement").default;
animate: typeof import("./AnimateElement").default;
animateColor: typeof import("./AnimateColorElement").default;
animateTransform: typeof import("./AnimateTransformElement").default;
font: typeof import("./FontElement").default;
'font-face': typeof import("./FontFaceElement").default;
'missing-glyph': typeof import("./MissingGlyphElement").default;
glyph: typeof import("./GlyphElement").default;
text: typeof import("./TextElement").default;
tspan: typeof import("./TSpanElement").default;
tref: typeof import("./TRefElement").default;
a: typeof import("./AElement").default;
textPath: typeof import("./TextPathElement").default;
image: typeof ImageElement;
g: typeof import("./GElement").default;
symbol: typeof import("./SymbolElement").default;
style: typeof import("./StyleElement").default;
use: typeof import("./UseElement").default;
mask: typeof import("./MaskElement").default;
clipPath: typeof import("./ClipPathElement").default;
filter: typeof import("./FilterElement").default;
feDropShadow: typeof import("./FeDropShadowElement").default;
feMorphology: typeof import("./FeMorphologyElement").default;
feComposite: typeof import("./FeCompositeElement").default;
feColorMatrix: typeof import("./FeColorMatrixElement").default;
feGaussianBlur: typeof import("./FeGaussianBlurElement").default;
title: typeof import("./TitleElement").default;
desc: typeof import("./DescElement").default;
};
rootEmSize: number;
documentElement: SVGElement;
readonly screen: Screen;
readonly createCanvas: CreateCanvas;
readonly createImage: CreateImage;
readonly definitions: Record<string, Element>;
readonly styles: Record<string, Record<string, Property<any>>>;
readonly stylesSpecificity: Record<string, string>;
readonly images: ImageElement[];
readonly fonts: SVGFontLoader[];
private readonly emSizeStack;
private uniqueId;
constructor(canvg: Canvg, { rootEmSize, emSize, createCanvas, createImage, anonymousCrossOrigin }?: IDocumentOptions);
private bindCreateImage;
get window(): Window;
get fetch(): typeof fetch;
get ctx(): import("..").RenderingContext2D;
get emSize(): number;
set emSize(value: number);
popEmSize(): void;
getUniqueId(): string;
isImagesLoaded(): boolean;
isFontsLoaded(): boolean;
createDocumentElement(document: DOMDocument): SVGElement;
createElement<T extends Element>(node: HTMLElement): T;
createTextNode(node: HTMLElement): TextNode;
setViewBox(config: IViewBoxConfig): void;
}
export {};
//# sourceMappingURL=Document.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Document.d.ts","sourceRoot":"","sources":["../../src/Document/Document.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,MAAM,EAAE,EACd,oBAAoB,EACpB,MAAM,WAAW,CAAC;AACnB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,UAAU,MAAM,cAAc,CAAC;AAKtC;;GAEG;AACH,o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WAAW,CAAC;IAClC,QAAQ,CAAC,WAAW,0BAAkD;IACtE,QAAQ,CAAC,MAAM,gDAAmE;IAClF,QAAQ,CAAC,iBAAiB,yBAAiD;IAC3E,QAAQ,CAAC,MAAM,EAAE,YAAY,EAAE,CAAM;IACrC,QAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,CAAM;IACrC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgB;IAC5C,OAAO,CAAC,QAAQ,CAAK;gBAGX,KAAK,EAAE,KAAK,EACrB,EACC,UAAe,EACf,MAAW,EACX,YAAoC,EACpC,WAAkC,EAClC,oBAAoB,EACpB,GAAE,gBAAqB;IAYzB,OAAO,CAAC,eAAe;IAavB,IAAI,MAAM,WAET;IAED,IAAI,KAAK,iBAER;IAED,IAAI,GAAG,oCAEN;IAED,IAAI,MAAM,IAQQ,MAAM,CAFvB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAMvB;IAED,SAAS;IAQT,WAAW;IAIX,cAAc;IAId,aAAa;IAIb,qBAAqB,CAAC,QAAQ,EAAE,WAAW;IAW3C,aAAa,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,WAAW;IAWlD,cAAc,CAAC,IAAI,EAAE,WAAW;IAIhC,UAAU,CAAC,MAAM,EAAE,cAAc;CAMjC"}

View File

@@ -0,0 +1,33 @@
import { RenderingContext2D } from '../types';
import Property from '../Property';
import Document from './Document';
export default abstract class Element {
protected readonly document: Document;
protected readonly node: HTMLElement;
protected readonly captureTextNodes: boolean;
static readonly ignoreChildTypes: string[];
readonly type: string;
readonly attributes: Record<string, Property<any>>;
readonly styles: Record<string, Property<any>>;
readonly stylesSpecificity: Record<string, string>;
animationFrozen: boolean;
animationFrozenValue: string;
parent: Element;
children: Element[];
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
getAttribute(name: string, createIfNotExists?: boolean): Property<any>;
getHrefAttribute(): Property<any>;
getStyle(name: string, createIfNotExists?: boolean, skipAncestors?: boolean): Property;
render(ctx: RenderingContext2D): void;
setContext(_: RenderingContext2D): void;
protected applyEffects(ctx: RenderingContext2D): void;
clearContext(_: RenderingContext2D): void;
renderChildren(ctx: RenderingContext2D): void;
protected addChild(childNode: Element | HTMLElement): void;
protected matchesSelector(selector: string): boolean;
addStylesFromStyleDefinition(): void;
protected removeStyles(element: Element, ignoreStyles: string[]): [string, string][];
protected restoreStyles(element: Element, styles: [string, string][]): void;
isFirstChild(): boolean;
}
//# sourceMappingURL=Element.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Element.d.ts","sourceRoot":"","sources":["../../src/Document/Element.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAMlC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,OAAO;IAenC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ;IACrC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW;IACpC,SAAS,CAAC,QAAQ,CAAC,gBAAgB;IAhBpC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,WAE9B;IAEF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,gCAAmD;IACtE,QAAQ,CAAC,MAAM,gCAAmD;IAClE,QAAQ,CAAC,iBAAiB,yBAAiD;IAC3E,eAAe,UAAS;IACxB,oBAAoB,SAAM;IAC1B,MAAM,EAAE,OAAO,CAAQ;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAM;gBAGL,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,UAAQ;IAiE5C,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,UAAQ;IAcpD,gBAAgB;IAUhB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,UAAQ,EAAE,aAAa,UAAQ,GAAG,QAAQ;IAuClF,MAAM,CAAC,GAAG,EAAE,kBAAkB;IAmC9B,UAAU,CAAC,CAAC,EAAE,kBAAkB;IAIhC,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,kBAAkB;IAoB9C,YAAY,CAAC,CAAC,EAAE,kBAAkB;IAIlC,cAAc,CAAC,GAAG,EAAE,kBAAkB;IAMtC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAC,WAAW;IAYjD,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM;IAkB1C,4BAA4B;IA6B5B,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE;IAqB/D,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;IASpE,YAAY;CAGZ"}

View File

@@ -0,0 +1,9 @@
import { RenderingContext2D } from '../types';
import BoundingBox from '../BoundingBox';
import PathElement from './PathElement';
export default class EllipseElement extends PathElement {
type: string;
path(ctx: RenderingContext2D): BoundingBox;
getMarkers(): any;
}
//# sourceMappingURL=EllipseElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"EllipseElement.d.ts","sourceRoot":"","sources":["../../src/Document/EllipseElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACtD,IAAI,SAAa;IAEjB,IAAI,CAAC,GAAG,EAAE,kBAAkB;IAqD5B,UAAU;CAGV"}

View File

@@ -0,0 +1,11 @@
import { RenderingContext2D } from '../types';
import Document from './Document';
import Element from './Element';
export default class FeColorMatrixElement extends Element {
type: string;
protected readonly matrix: number[];
protected readonly includeOpacity: boolean;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
apply(ctx: RenderingContext2D, _x: number, _y: number, width: number, height: number): void;
}
//# sourceMappingURL=FeColorMatrixElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FeColorMatrixElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeColorMatrixElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AA4ChC,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,OAAO;IACxD,IAAI,SAAmB;IACvB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IACpC,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;gBAG1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAwD3B,KAAK,CACJ,GAAG,EAAE,kBAAkB,EACvB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM;CAqCf"}

View File

@@ -0,0 +1,7 @@
import { RenderingContext2D } from '../types';
import Element from './Element';
export default class FeCompositeElement extends Element {
type: string;
apply(_: RenderingContext2D, _x: number, _y: number, _width: number, _height: number): void;
}
//# sourceMappingURL=FeCompositeElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FeCompositeElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeCompositeElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,OAAO;IACtD,IAAI,SAAiB;IAErB,KAAK,CACJ,CAAC,EAAE,kBAAkB,EACrB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;CAIhB"}

View File

@@ -0,0 +1,9 @@
import { RenderingContext2D } from '../types';
import Document from './Document';
import Element from './Element';
export default class FeDropShadowElement extends Element {
type: string;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
apply(_: RenderingContext2D, _x: number, _y: number, _width: number, _height: number): void;
}
//# sourceMappingURL=FeDropShadowElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FeDropShadowElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeDropShadowElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,OAAO;IACvD,IAAI,SAAkB;gBAGrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAO3B,KAAK,CACJ,CAAC,EAAE,kBAAkB,EACrB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;CAIhB"}

View File

@@ -0,0 +1,11 @@
import { RenderingContext2D } from '../types';
import Document from './Document';
import Element from './Element';
export default class FeGaussianBlurElement extends Element {
type: string;
readonly extraFilterDistance: number;
protected readonly blurRadius: number;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
apply(ctx: RenderingContext2D, x: number, y: number, width: number, height: number): void;
}
//# sourceMappingURL=FeGaussianBlurElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FeGaussianBlurElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeGaussianBlurElement.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,OAAO;IACzD,IAAI,SAAoB;IACxB,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAGrC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAQ3B,KAAK,CACJ,GAAG,EAAE,kBAAkB,EACvB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM;CAyBf"}

View File

@@ -0,0 +1,7 @@
import { RenderingContext2D } from '../types';
import Element from './Element';
export default class FeMorphologyElement extends Element {
type: string;
apply(_: RenderingContext2D, _x: number, _y: number, _width: number, _height: number): void;
}
//# sourceMappingURL=FeMorphologyElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FeMorphologyElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeMorphologyElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,OAAO;IACvD,IAAI,SAAkB;IAEtB,KAAK,CACJ,CAAC,EAAE,kBAAkB,EACrB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;CAIhB"}

View File

@@ -0,0 +1,10 @@
import { RenderingContext2D } from '../types';
import Element from './Element';
import PathElement from './PathElement';
export default class FilterElement extends Element {
static ignoreStyles: string[];
type: string;
apply(ctx: RenderingContext2D, element: PathElement): void;
render(_: RenderingContext2D): void;
}
//# sourceMappingURL=FilterElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FilterElement.d.ts","sourceRoot":"","sources":["../../src/Document/FilterElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IACjD,MAAM,CAAC,YAAY,WAIjB;IAEF,IAAI,SAAY;IAEhB,KAAK,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW;IAsEnD,MAAM,CAAC,CAAC,EAAE,kBAAkB;CAG5B"}

View File

@@ -0,0 +1,17 @@
import Document from './Document';
import Element from './Element';
import FontFaceElement from './FontFaceElement';
import MissingGlyphElement from './MissingGlyphElement';
import GlyphElement from './GlyphElement';
export default class FontElement extends Element {
type: string;
readonly isArabic: boolean;
readonly missingGlyph: MissingGlyphElement;
readonly glyphs: Record<string, GlyphElement | Record<string, GlyphElement>>;
readonly horizAdvX: number;
readonly isRTL: boolean;
readonly fontFace: FontFaceElement;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
render(): void;
}
//# sourceMappingURL=FontElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FontElement.d.ts","sourceRoot":"","sources":["../../src/Document/FontElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,IAAI,SAAU;IACd,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,QAAQ,CAAC,MAAM,8DAAsF;IACrG,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;gBAGlC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAuD3B,MAAM;CAGN"}

View File

@@ -0,0 +1,10 @@
import Document from './Document';
import Element from './Element';
export default class FontFaceElement extends Element {
type: string;
readonly ascent: number;
readonly descent: number;
readonly unitsPerEm: number;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
}
//# sourceMappingURL=FontFaceElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FontFaceElement.d.ts","sourceRoot":"","sources":["../../src/Document/FontFaceElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IACnD,IAAI,SAAe;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAG3B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAQ3B"}

View File

@@ -0,0 +1,8 @@
import { RenderingContext2D } from '../types';
import BoundingBox from '../BoundingBox';
import RenderedElement from './RenderedElement';
export default class GElement extends RenderedElement {
type: string;
getBoundingBox(ctx: RenderingContext2D): BoundingBox;
}
//# sourceMappingURL=GElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GElement.d.ts","sourceRoot":"","sources":["../../src/Document/GElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,eAAe;IACpD,IAAI,SAAO;IAEX,cAAc,CAAC,GAAG,EAAE,kBAAkB;CAStC"}

View File

@@ -0,0 +1,10 @@
import Document from './Document';
import PathElement from './PathElement';
export default class GlyphElement extends PathElement {
type: string;
readonly horizAdvX: number;
readonly unicode: string;
readonly arabicForm: string;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
}
//# sourceMappingURL=GlyphElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlyphElement.d.ts","sourceRoot":"","sources":["../../src/Document/GlyphElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IACpD,IAAI,SAAW;IACf,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAG3B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAQ3B"}

View File

@@ -0,0 +1,17 @@
import { RenderingContext2D } from '../types';
import Property from '../Property';
import Document from './Document';
import Element from './Element';
import PathElement from './PathElement';
import StopElement from './StopElement';
export default abstract class GradientElement extends Element {
readonly attributesToInherit: string[];
protected readonly stops: StopElement[];
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
abstract getGradient(ctx: RenderingContext2D, element: PathElement): CanvasGradient;
getGradientUnits(): string;
createGradient(ctx: RenderingContext2D, element: any, parentOpacityProp: Property): string | CanvasGradient | CanvasPattern;
protected inheritStopContainer(stopsContainer: Element): void;
protected addParentOpacity(parentOpacityProp: Property, color: string): string;
}
//# sourceMappingURL=GradientElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GradientElement.d.ts","sourceRoot":"","sources":["../../src/Document/GradientElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,eAAgB,SAAQ,OAAO;IAC5D,QAAQ,CAAC,mBAAmB,WAE1B;IAEF,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,CAAM;gBAG5C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAgB3B,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,GAAG,cAAc;IAEnF,gBAAgB;IAIhB,cAAc,CACb,GAAG,EAAE,kBAAkB,EACvB,OAAO,KAAA,EACP,iBAAiB,EAAE,QAAQ;IAuH5B,SAAS,CAAC,oBAAoB,CAAC,cAAc,EAAE,OAAO;IAWtD,SAAS,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM;CAarE"}

View File

@@ -0,0 +1,16 @@
import { RenderingContext2D } from '../types';
import BoundingBox from '../BoundingBox';
import Document from './Document';
import RenderedElement from './RenderedElement';
export default class ImageElement extends RenderedElement {
type: string;
loaded: boolean;
protected readonly isSvg: boolean;
protected image: CanvasImageSource | string;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
protected loadImage(href: string): Promise<void>;
protected loadSvg(href: string): Promise<void>;
renderChildren(ctx: RenderingContext2D): void;
getBoundingBox(): BoundingBox;
}
//# sourceMappingURL=ImageElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ImageElement.d.ts","sourceRoot":"","sources":["../../src/Document/ImageElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAKhD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,eAAe;IACxD,IAAI,SAAW;IACf,MAAM,UAAS;IACf,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAClC,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAAC;gBAG3C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;cAuBX,SAAS,CAAC,IAAI,EAAE,MAAM;cAYtB,OAAO,CAAC,IAAI,EAAE,MAAM;IAyBpC,cAAc,CAAC,GAAG,EAAE,kBAAkB;IA6DtC,cAAc;CAQd"}

View File

@@ -0,0 +1,11 @@
import { RenderingContext2D } from '../types';
import Point from '../Point';
import BoundingBox from '../BoundingBox';
import PathElement, { Marker } from './PathElement';
export default class LineElement extends PathElement {
type: string;
getPoints(): Point[];
path(ctx: RenderingContext2D): BoundingBox;
getMarkers(): Marker[];
}
//# sourceMappingURL=LineElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"LineElement.d.ts","sourceRoot":"","sources":["../../src/Document/LineElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,WAAW,EAAE,EACnB,MAAM,EACN,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IACnD,IAAI,SAAU;IAEd,SAAS;IAaT,IAAI,CAAC,GAAG,EAAE,kBAAkB;IA0B5B,UAAU,IAAI,MAAM,EAAE;CAYtB"}

View File

@@ -0,0 +1,10 @@
import { RenderingContext2D } from '../types';
import Document from './Document';
import PathElement from './PathElement';
import GradientElement from './GradientElement';
export default class LinearGradientElement extends GradientElement {
type: string;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
getGradient(ctx: RenderingContext2D, element: PathElement): CanvasGradient;
}
//# sourceMappingURL=LinearGradientElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"LinearGradientElement.d.ts","sourceRoot":"","sources":["../../src/Document/LinearGradientElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,eAAe;IACjE,IAAI,SAAoB;gBAGvB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAY3B,WAAW,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW;CAwCzD"}

View File

@@ -0,0 +1,8 @@
import { RenderingContext2D } from '../types';
import Point from '../Point';
import Element from './Element';
export default class MarkerElement extends Element {
type: string;
render(ctx: RenderingContext2D, point?: Point, angle?: number): void;
}
//# sourceMappingURL=MarkerElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MarkerElement.d.ts","sourceRoot":"","sources":["../../src/Document/MarkerElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IACjD,IAAI,SAAY;IAEhB,MAAM,CAAC,GAAG,EAAE,kBAAkB,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;CAuF7D"}

View File

@@ -0,0 +1,9 @@
import { RenderingContext2D } from '../types';
import Element from './Element';
export default class MaskElement extends Element {
static ignoreStyles: string[];
type: string;
apply(ctx: RenderingContext2D, element: Element): void;
render(_: RenderingContext2D): void;
}
//# sourceMappingURL=MaskElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MaskElement.d.ts","sourceRoot":"","sources":["../../src/Document/MaskElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,OAAO,MAAM,WAAW,CAAC;AAIhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,MAAM,CAAC,YAAY,WAIjB;IAEF,IAAI,SAAU;IAEd,KAAK,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO;IAmE/C,MAAM,CAAC,CAAC,EAAE,kBAAkB;CAG5B"}

View File

@@ -0,0 +1,6 @@
import PathElement from './PathElement';
export default class MissingGlyphElement extends PathElement {
type: string;
readonly horizAdvX = 0;
}
//# sourceMappingURL=MissingGlyphElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MissingGlyphElement.d.ts","sourceRoot":"","sources":["../../src/Document/MissingGlyphElement.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC3D,IAAI,SAAmB;IACvB,QAAQ,CAAC,SAAS,KAAK;CACvB"}

View File

@@ -0,0 +1,75 @@
import { RenderingContext2D } from '../types';
import Point from '../Point';
import BoundingBox from '../BoundingBox';
import PathParser from '../PathParser';
import Document from './Document';
import RenderedElement from './RenderedElement';
export declare type Marker = [Point, number];
export default class PathElement extends RenderedElement {
type: string;
readonly pathParser: PathParser;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
path(ctx?: RenderingContext2D): BoundingBox;
getBoundingBox(_?: RenderingContext2D): BoundingBox;
getMarkers(): Marker[];
renderChildren(ctx: RenderingContext2D): void;
static pathM(pathParser: PathParser): {
point: Point;
};
protected pathM(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
static pathL(pathParser: PathParser): {
current: Point;
point: Point;
};
protected pathL(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
static pathH(pathParser: PathParser): {
current: Point;
point: Point;
};
protected pathH(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
static pathV(pathParser: PathParser): {
current: Point;
point: Point;
};
protected pathV(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
static pathC(pathParser: PathParser): {
current: Point;
point: Point;
controlPoint: Point;
currentPoint: Point;
};
protected pathC(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
static pathS(pathParser: PathParser): {
current: Point;
point: Point;
controlPoint: Point;
currentPoint: Point;
};
protected pathS(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
static pathQ(pathParser: PathParser): {
current: Point;
controlPoint: Point;
currentPoint: Point;
};
protected pathQ(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
static pathT(pathParser: PathParser): {
current: Point;
controlPoint: Point;
currentPoint: Point;
};
protected pathT(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
static pathA(pathParser: PathParser): {
currentPoint: Point;
rX: number;
rY: number;
sweepFlag: 0 | 1;
xAxisRotation: number;
centp: Point;
a1: number;
ad: number;
};
protected pathA(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
static pathZ(pathParser: PathParser): void;
protected pathZ(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
}
//# sourceMappingURL=PathElement.d.ts.map

View File

@@ -0,0 +1 @@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W,EAAE,WAAW;IAsBzB,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU;;;;;;IAgBnC,SAAS,CAAC,KAAK,CACd,GAAG,EAAE,kBAAkB,EACvB,WAAW,EAAE,WAAW;IAoCzB,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU;;;;;;IAgBnC,SAAS,CAAC,KAAK,CACd,GAAG,EAAE,kBAAkB,EACvB,WAAW,EAAE,WAAW;IAoCzB,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU;;;;;IAcnC,SAAS,CAAC,KAAK,CACd,GAAG,EAAE,kBAAkB,EACvB,WAAW,EAAE,WAAW;IA+BzB,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU;;;;;IAiBnC,SAAS,CAAC,KAAK,CACd,GAAG,EAAE,kBAAkB,EACvB,WAAW,EAAE,WAAW;IA+BzB,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU;;;;;;;;;;IAyFnC,SAAS,CAAC,KAAK,CACd,GAAG,EAAE,kBAAkB,EACvB,WAAW,EAAE,WAAW;IA0CzB,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU;IAInC,SAAS,CAAC,KAAK,CACd,GAAG,EAAE,kBAAkB,EACvB,WAAW,EAAE,WAAW;CAazB"}

View File

@@ -0,0 +1,8 @@
import { RenderingContext2D } from '../types';
import Property from '../Property';
import Element from './Element';
export default class PatternElement extends Element {
type: string;
createPattern(ctx: RenderingContext2D, _: Element, parentOpacityProp: Property): CanvasPattern;
}
//# sourceMappingURL=PatternElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"PatternElement.d.ts","sourceRoot":"","sources":["../../src/Document/PatternElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IAClD,IAAI,SAAa;IAEjB,aAAa,CACZ,GAAG,EAAE,kBAAkB,EACvB,CAAC,EAAE,OAAO,EACV,iBAAiB,EAAE,QAAQ;CAyE5B"}

View File

@@ -0,0 +1,7 @@
import { RenderingContext2D } from '../types';
import PolylineElement from './PolylineElement';
export default class PolygonElement extends PolylineElement {
type: string;
path(ctx: RenderingContext2D): import("..").BoundingBox;
}
//# sourceMappingURL=PolygonElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"PolygonElement.d.ts","sourceRoot":"","sources":["../../src/Document/PolygonElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,eAAe;IAC1D,IAAI,SAAa;IAEjB,IAAI,CAAC,GAAG,EAAE,kBAAkB;CAc5B"}

View File

@@ -0,0 +1,13 @@
import { RenderingContext2D } from '../types';
import Point from '../Point';
import BoundingBox from '../BoundingBox';
import Document from './Document';
import PathElement, { Marker } from './PathElement';
export default class PolylineElement extends PathElement {
type: string;
protected readonly points: Point[];
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
path(ctx: RenderingContext2D): BoundingBox;
getMarkers(): Marker[];
}
//# sourceMappingURL=PolylineElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"PolylineElement.d.ts","sourceRoot":"","sources":["../../src/Document/PolylineElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,EAAE,EACnB,MAAM,EACN,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW;IACvD,IAAI,SAAc;IAClB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,CAAM;gBAGvC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAS3B,IAAI,CAAC,GAAG,EAAE,kBAAkB;IA6B5B,UAAU;CA2BV"}

View File

@@ -0,0 +1,10 @@
import { RenderingContext2D } from '../types';
import Document from './Document';
import PathElement from './PathElement';
import GradientElement from './GradientElement';
export default class RadialGradientElement extends GradientElement {
type: string;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
getGradient(ctx: RenderingContext2D, element: PathElement): CanvasGradient;
}
//# sourceMappingURL=RadialGradientElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"RadialGradientElement.d.ts","sourceRoot":"","sources":["../../src/Document/RadialGradientElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,eAAe;IACjE,IAAI,SAAoB;gBAGvB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAc3B,WAAW,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW;CAgDzD"}

View File

@@ -0,0 +1,9 @@
import { RenderingContext2D } from '../types';
import BoundingBox from '../BoundingBox';
import PathElement from './PathElement';
export default class RectElement extends PathElement {
type: string;
path(ctx: RenderingContext2D): BoundingBox;
getMarkers(): any;
}
//# sourceMappingURL=RectElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"RectElement.d.ts","sourceRoot":"","sources":["../../src/Document/RectElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IACnD,IAAI,SAAU;IAEd,IAAI,CAAC,GAAG,EAAE,kBAAkB;IAkD5B,UAAU;CAGV"}

View File

@@ -0,0 +1,9 @@
import { RenderingContext2D } from '../types';
import Element from './Element';
export default abstract class RenderedElement extends Element {
private modifiedEmSizeStack;
protected calculateOpacity(): number;
setContext(ctx: RenderingContext2D, fromMeasure?: boolean): void;
clearContext(ctx: RenderingContext2D): void;
}
//# sourceMappingURL=RenderedElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"RenderedElement.d.ts","sourceRoot":"","sources":["../../src/Document/RenderedElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAOlB,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,eAAgB,SAAQ,OAAO;IAC5D,OAAO,CAAC,mBAAmB,CAAS;IAEpC,SAAS,CAAC,gBAAgB;IAkB1B,UAAU,CAAC,GAAG,EAAE,kBAAkB,EAAE,WAAW,UAAQ;IAwLvD,YAAY,CAAC,GAAG,EAAE,kBAAkB;CAOpC"}

View File

@@ -0,0 +1,16 @@
import { RenderingContext2D } from '../types';
import RenderedElement from './RenderedElement';
export default class SVGElement extends RenderedElement {
type: string;
root: boolean;
setContext(ctx: RenderingContext2D): void;
clearContext(ctx: RenderingContext2D): void;
/**
* Resize SVG to fit in given size.
* @param width
* @param height
* @param preserveAspectRatio
*/
resize(width: number, height?: number, preserveAspectRatio?: boolean | string): void;
}
//# sourceMappingURL=SVGElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SVGElement.d.ts","sourceRoot":"","sources":["../../src/Document/SVGElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAMlB,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,eAAe;IACtD,IAAI,SAAS;IACb,IAAI,UAAS;IAEb,UAAU,CAAC,GAAG,EAAE,kBAAkB;IAqIlC,YAAY,CAAC,GAAG,EAAE,kBAAkB;IAMpC;;;;;OAKG;IACH,MAAM,CACL,KAAK,EAAE,MAAM,EACb,MAAM,SAAQ,EACd,mBAAmB,GAAE,OAAO,GAAG,MAAc;CAyC9C"}

View File

@@ -0,0 +1,9 @@
import Document from './Document';
import Element from './Element';
export default class StopElement extends Element {
type: string;
readonly offset: number;
readonly color: string;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
}
//# sourceMappingURL=StopElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"StopElement.d.ts","sourceRoot":"","sources":["../../src/Document/StopElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,IAAI,SAAU;IACd,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAGtB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAmB3B"}

View File

@@ -0,0 +1,9 @@
import { parseExternalUrl } from '../util';
import Document from './Document';
import Element from './Element';
export default class StyleElement extends Element {
static readonly parseExternalUrl: typeof parseExternalUrl;
type: string;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
}
//# sourceMappingURL=StyleElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"StyleElement.d.ts","sourceRoot":"","sources":["../../src/Document/StyleElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAGjB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAChD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,0BAAoB;IAEpD,IAAI,SAAW;gBAGd,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAgE3B"}

View File

@@ -0,0 +1,7 @@
import { RenderingContext2D } from '../types';
import RenderedElement from './RenderedElement';
export default class SymbolElement extends RenderedElement {
type: string;
render(_: RenderingContext2D): void;
}
//# sourceMappingURL=SymbolElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SymbolElement.d.ts","sourceRoot":"","sources":["../../src/Document/SymbolElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,eAAe;IACzD,IAAI,SAAY;IAEhB,MAAM,CAAC,CAAC,EAAE,kBAAkB;CAG5B"}

View File

@@ -0,0 +1,6 @@
import TextElement from './TextElement';
export default class TRefElement extends TextElement {
type: string;
getText(): string;
}
//# sourceMappingURL=TRefElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TRefElement.d.ts","sourceRoot":"","sources":["../../src/Document/TRefElement.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IACnD,IAAI,SAAU;IAEd,OAAO;CAaP"}

View File

@@ -0,0 +1,9 @@
import Document from './Document';
import TextElement from './TextElement';
export default class TSpanElement extends TextElement {
type: string;
protected readonly text: string;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
getText(): string;
}
//# sourceMappingURL=TSpanElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TSpanElement.d.ts","sourceRoot":"","sources":["../../src/Document/TSpanElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IACpD,IAAI,SAAW;IACf,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAG/B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAgB3B,OAAO;CAGP"}

View File

@@ -0,0 +1,44 @@
import { RenderingContext2D } from '../types';
import BoundingBox from '../BoundingBox';
import Document from './Document';
import Element from './Element';
import FontElement from './FontElement';
import GlyphElement from './GlyphElement';
import RenderedElement from './RenderedElement';
export default class TextElement extends RenderedElement {
type: string;
protected x: number;
protected y: number;
private leafTexts;
private textChunkStart;
private minX;
private maxX;
private measureCache;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
setContext(ctx: RenderingContext2D, fromMeasure?: boolean): void;
protected initializeCoordinates(): void;
getBoundingBox(ctx: RenderingContext2D): BoundingBox;
protected getFontSize(): number;
protected getTElementBoundingBox(ctx: RenderingContext2D): BoundingBox;
getGlyph(font: FontElement, text: string, i: number): GlyphElement;
getText(): string;
protected getTextFromNode(node?: ChildNode): string;
renderChildren(ctx: RenderingContext2D): void;
protected renderTElementChildren(ctx: RenderingContext2D): void;
protected applyAnchoring(): void;
protected adjustChildCoordinatesRecursive(ctx: RenderingContext2D): void;
protected adjustChildCoordinatesRecursiveCore(ctx: RenderingContext2D, textParent: TextElement, parent: Element, i: number): void;
protected adjustChildCoordinates(ctx: RenderingContext2D, textParent: TextElement, parent: Element, i: number): TextElement;
protected getChildBoundingBox(ctx: RenderingContext2D, textParent: TextElement, parent: Element, i: number): BoundingBox;
protected renderChild(ctx: RenderingContext2D, textParent: TextElement, parent: Element, i: number): void;
protected measureText(ctx: RenderingContext2D): number;
protected measureTargetText(ctx: RenderingContext2D, targetText: string): number;
/**
* Inherits positional attributes from {@link TextElement} parent(s). Attributes
* are only inherited from a parent to its first child.
* @param name - The attribute name.
* @returns The attribute value or null.
*/
protected getInheritedAttribute(name: string): string | null;
}
//# sourceMappingURL=TextElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TextElement.d.ts","sourceRoot":"","sources":["../../src/Document/TextElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAQlB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,eAAe;IACvD,IAAI,SAAU;IACd,SAAS,CAAC,CAAC,SAAK;IAChB,SAAS,CAAC,CAAC,SAAK;IAChB,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,YAAY,CAAM;gBAGzB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAW3B,UAAU,CAAC,GAAG,EAAE,kBAAkB,EAAE,WAAW,UAAQ;IAWvD,SAAS,CAAC,qBAAqB;IAS/B,cAAc,CAAC,GAAG,EAAE,kBAAkB;IAyBtC,SAAS,CAAC,WAAW;IAWrB,SAAS,CAAC,sBAAsB,CAAC,GAAG,EAAE,kBAAkB;IAWxD,QAAQ,CACP,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,MAAM;IA0CV,OAAO;IAIP,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,SAAS;IAuB1C,cAAc,CAAC,GAAG,EAAE,kBAAkB;IA4BtC,SAAS,CAAC,sBAAsB,CAAC,GAAG,EAAE,kBAAkB;IAiFxD,SAAS,CAAC,cAAc;IAgCxB,SAAS,CAAC,+BAA+B,CAAC,GAAG,EAAE,kBAAkB;IAOjE,SAAS,CAAC,mCAAmC,CAC5C,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,WAAW,EACvB,MAAM,EAAE,OAAO,EACf,CAAC,EAAE,MAAM,GACP,IAAI;IAaP,SAAS,CAAC,sBAAsB,CAC/B,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,WAAW,EACvB,MAAM,EAAE,OAAO,EACf,CAAC,EAAE,MAAM;IA8FV,SAAS,CAAC,mBAAmB,CAC5B,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,WAAW,EACvB,MAAM,EAAE,OAAO,EACf,CAAC,EAAE,MAAM;IAwBV,SAAS,CAAC,WAAW,CACpB,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,WAAW,EACvB,MAAM,EAAE,OAAO,EACf,CAAC,EAAE,MAAM;IAUV,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,kBAAkB;IAiB7C,SAAS,CAAC,iBAAiB,CAC1B,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,MAAM;IAoDnB;;;;;OAKG;IACH,SAAS,CAAC,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAgB5D"}

View File

@@ -0,0 +1,5 @@
import TSpanElement from './TSpanElement';
export default class TextNode extends TSpanElement {
type: string;
}
//# sourceMappingURL=TextNode.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TextNode.d.ts","sourceRoot":"","sources":["../../src/Document/TextNode.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,YAAY;IACjD,IAAI,SAAc;CAClB"}

View File

@@ -0,0 +1,73 @@
import { RenderingContext2D } from '../types';
import PathParser, { CommandType } from '../PathParser';
import Document from './Document';
import TextElement from './TextElement';
import PathElement from './PathElement';
export interface IPoint {
x: number;
y: number;
}
export interface IPathCommand {
type: CommandType;
points: number[];
start?: IPoint;
pathLength: number;
}
interface ICachedPoint extends IPoint {
distance: number;
}
interface IGlyphInfo {
text: string;
rotation: number;
p0: ICachedPoint;
p1: ICachedPoint;
}
export default class TextPathElement extends TextElement {
type: string;
protected textWidth: number;
protected textHeight: number;
protected pathLength: number;
protected glyphInfo: IGlyphInfo[];
protected readonly text: string;
protected readonly dataArray: IPathCommand[];
private letterSpacingCache;
private equidistantCache;
private readonly measuresCache;
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
getText(): string;
path(ctx: RenderingContext2D): void;
renderChildren(ctx: RenderingContext2D): void;
protected getLetterSpacingAt(idx?: number): number;
protected findSegmentToFitChar(ctx: RenderingContext2D, anchor: string, textFullWidth: number, fullPathWidth: number, spacesNumber: number, inputOffset: number, dy: number, c: string, charI: number): {
offset: number;
segment: {
p0: ICachedPoint;
p1: ICachedPoint;
};
rotation: number;
};
protected measureText(ctx: RenderingContext2D, text?: string): number;
protected setTextData(ctx: RenderingContext2D): void;
protected parsePathData(path: PathElement): IPathCommand[];
protected pathM(pathParser: PathParser, points: number[]): void;
protected pathL(pathParser: PathParser, points: number[]): 16;
protected pathH(pathParser: PathParser, points: number[]): 16;
protected pathV(pathParser: PathParser, points: number[]): 16;
protected pathC(pathParser: PathParser, points: number[]): void;
protected pathS(pathParser: PathParser, points: number[]): 32;
protected pathQ(pathParser: PathParser, points: number[]): void;
protected pathT(pathParser: PathParser, points: number[]): 128;
protected pathA(pathParser: PathParser): number[];
protected calcLength(x: number, y: number, commandType: CommandType, points: number[]): number;
protected getPointOnLine(dist: number, p1x: number, p1y: number, p2x: number, p2y: number, fromX?: number, fromY?: number): IPoint;
protected getPointOnPath(distance: number): IPoint;
protected getLineLength(x1: number, y1: number, x2: number, y2: number): number;
protected getPathLength(): number;
protected getPointOnCubicBezier(pct: number, p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number, p4x: number, p4y: number): IPoint;
protected getPointOnQuadraticBezier(pct: number, p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): IPoint;
protected getPointOnEllipticalArc(cx: number, cy: number, rx: number, ry: number, theta: number, psi: number): IPoint;
protected buildEquidistantCache(inputStep: number, inputPrecision: number): void;
protected getEquidistantPointOnPath(targetDistance: number, step?: number, precision?: number): ICachedPoint;
}
export {};
//# sourceMappingURL=TextPathElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TextPathElement.d.ts","sourceRoot":"","sources":["../../src/Document/TextPathElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAWlB,OAAO,UAAU,EAAE,EAClB,WAAW,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,WAAW,MAAM;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,YAAa,SAAQ,MAAM;IACpC,QAAQ,EAAE,MAAM,CAAC;CACjB;AAQD,UAAU,UAAU;IAGnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;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EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACT,MAAM;IAUT,SAAS,CAAC,yBAAyB,CAClC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACT,MAAM;IAUT,SAAS,CAAC,uBAAuB,CAChC,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACT,MAAM;IAeT,SAAS,CAAC,qBAAqB,CAC9B,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM;IA0CvB,SAAS,CAAC,yBAAyB,CAClC,cAAc,EAAE,MAAM,EACtB,IAAI,CAAC,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM;CAkBnB"}

View File

@@ -0,0 +1,5 @@
import Element from './Element';
export default class TitleElement extends Element {
type: string;
}
//# sourceMappingURL=TitleElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TitleElement.d.ts","sourceRoot":"","sources":["../../src/Document/TitleElement.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAChD,IAAI,SAAW;CACf"}

View File

@@ -0,0 +1,6 @@
import Document from './Document';
import Element from './Element';
export default class UnknownElement extends Element {
constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
}
//# sourceMappingURL=UnknownElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"UnknownElement.d.ts","sourceRoot":"","sources":["../../src/Document/UnknownElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;gBAEjD,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAQ3B"}

View File

@@ -0,0 +1,15 @@
import { RenderingContext2D } from '../types';
import Transform from '../Transform';
import RenderedElement from './RenderedElement';
import PathElement from './PathElement';
export default class UseElement extends RenderedElement {
type: string;
private cachedElement;
setContext(ctx: RenderingContext2D): void;
path(ctx: RenderingContext2D): void;
renderChildren(ctx: RenderingContext2D): void;
getBoundingBox(ctx: RenderingContext2D): import("..").BoundingBox;
elementTransform(): Transform;
protected get element(): PathElement;
}
//# sourceMappingURL=UseElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"UseElement.d.ts","sourceRoot":"","sources":["../../src/Document/UseElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,eAAe;IACtD,IAAI,SAAS;IACb,OAAO,CAAC,aAAa,CAAc;IAEnC,UAAU,CAAC,GAAG,EAAE,kBAAkB;IAelC,IAAI,CAAC,GAAG,EAAE,kBAAkB;IAU5B,cAAc,CAAC,GAAG,EAAE,kBAAkB;IAsEtC,cAAc,CAAC,GAAG,EAAE,kBAAkB;IAYtC,gBAAgB;IAShB,SAAS,KAAK,OAAO,gBAMpB;CACD"}

Some files were not shown because too many files have changed in this diff Show More