html2canvas-pro 1.5.3 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/html2canvas-pro.esm.js +606 -604
- package/dist/html2canvas-pro.esm.js.map +1 -1
- package/dist/html2canvas-pro.js +606 -604
- package/dist/html2canvas-pro.js.map +1 -1
- package/dist/html2canvas-pro.min.js +2 -2
- package/dist/lib/__tests__/index.js +5 -5
- package/dist/lib/__tests__/index.js.map +1 -1
- package/dist/lib/core/__tests__/cache-storage.js +31 -31
- package/dist/lib/core/__tests__/cache-storage.js.map +1 -1
- package/dist/lib/core/cache-storage.js +6 -6
- package/dist/lib/core/cache-storage.js.map +1 -1
- package/dist/lib/core/context.js +1 -1
- package/dist/lib/core/context.js.map +1 -1
- package/dist/lib/core/debugger.js +6 -6
- package/dist/lib/core/debugger.js.map +1 -1
- package/dist/lib/core/features.js +8 -8
- package/dist/lib/core/features.js.map +1 -1
- package/dist/lib/core/logger.js +12 -8
- package/dist/lib/core/logger.js.map +1 -1
- package/dist/lib/css/index.js +18 -18
- package/dist/lib/css/index.js.map +1 -1
- package/dist/lib/css/layout/text.js +9 -9
- package/dist/lib/css/layout/text.js.map +1 -1
- package/dist/lib/css/property-descriptors/__tests__/background-tests.js +10 -10
- package/dist/lib/css/property-descriptors/__tests__/background-tests.js.map +1 -1
- package/dist/lib/css/property-descriptors/__tests__/font-family.js +4 -4
- package/dist/lib/css/property-descriptors/__tests__/font-family.js.map +1 -1
- package/dist/lib/css/property-descriptors/__tests__/paint-order.js +44 -44
- package/dist/lib/css/property-descriptors/__tests__/paint-order.js.map +1 -1
- package/dist/lib/css/property-descriptors/__tests__/text-shadow.js +8 -8
- package/dist/lib/css/property-descriptors/__tests__/text-shadow.js.map +1 -1
- package/dist/lib/css/property-descriptors/__tests__/transform-tests.js +3 -3
- package/dist/lib/css/property-descriptors/__tests__/transform-tests.js.map +1 -1
- package/dist/lib/css/property-descriptors/background-clip.js +5 -5
- package/dist/lib/css/property-descriptors/background-clip.js.map +1 -1
- package/dist/lib/css/property-descriptors/background-color.js +1 -1
- package/dist/lib/css/property-descriptors/background-color.js.map +1 -1
- package/dist/lib/css/property-descriptors/background-image.js +3 -3
- package/dist/lib/css/property-descriptors/background-image.js.map +1 -1
- package/dist/lib/css/property-descriptors/background-origin.js +5 -5
- package/dist/lib/css/property-descriptors/background-origin.js.map +1 -1
- package/dist/lib/css/property-descriptors/background-position.js +2 -2
- package/dist/lib/css/property-descriptors/background-position.js.map +1 -1
- package/dist/lib/css/property-descriptors/background-repeat.js +6 -6
- package/dist/lib/css/property-descriptors/background-repeat.js.map +1 -1
- package/dist/lib/css/property-descriptors/background-size.js +3 -3
- package/dist/lib/css/property-descriptors/background-size.js.map +1 -1
- package/dist/lib/css/property-descriptors/border-color.js +2 -2
- package/dist/lib/css/property-descriptors/border-color.js.map +1 -1
- package/dist/lib/css/property-descriptors/border-radius.js +3 -3
- package/dist/lib/css/property-descriptors/border-radius.js.map +1 -1
- package/dist/lib/css/property-descriptors/border-style.js +7 -7
- package/dist/lib/css/property-descriptors/border-style.js.map +1 -1
- package/dist/lib/css/property-descriptors/border-width.js +3 -3
- package/dist/lib/css/property-descriptors/border-width.js.map +1 -1
- package/dist/lib/css/property-descriptors/box-shadow.js +5 -5
- package/dist/lib/css/property-descriptors/box-shadow.js.map +1 -1
- package/dist/lib/css/property-descriptors/color.js +1 -1
- package/dist/lib/css/property-descriptors/color.js.map +1 -1
- package/dist/lib/css/property-descriptors/content.js +2 -2
- package/dist/lib/css/property-descriptors/content.js.map +1 -1
- package/dist/lib/css/property-descriptors/counter-increment.js +4 -4
- package/dist/lib/css/property-descriptors/counter-increment.js.map +1 -1
- package/dist/lib/css/property-descriptors/counter-reset.js +3 -3
- package/dist/lib/css/property-descriptors/counter-reset.js.map +1 -1
- package/dist/lib/css/property-descriptors/direction.js +3 -3
- package/dist/lib/css/property-descriptors/direction.js.map +1 -1
- package/dist/lib/css/property-descriptors/display.js +32 -32
- package/dist/lib/css/property-descriptors/display.js.map +1 -1
- package/dist/lib/css/property-descriptors/duration.js +1 -1
- package/dist/lib/css/property-descriptors/duration.js.map +1 -1
- package/dist/lib/css/property-descriptors/float.js +6 -6
- package/dist/lib/css/property-descriptors/float.js.map +1 -1
- package/dist/lib/css/property-descriptors/font-family.js +6 -6
- package/dist/lib/css/property-descriptors/font-family.js.map +1 -1
- package/dist/lib/css/property-descriptors/font-size.js +1 -1
- package/dist/lib/css/property-descriptors/font-size.js.map +1 -1
- package/dist/lib/css/property-descriptors/font-style.js +4 -4
- package/dist/lib/css/property-descriptors/font-style.js.map +1 -1
- package/dist/lib/css/property-descriptors/font-variant.js +1 -1
- package/dist/lib/css/property-descriptors/font-variant.js.map +1 -1
- package/dist/lib/css/property-descriptors/font-weight.js +3 -3
- package/dist/lib/css/property-descriptors/font-weight.js.map +1 -1
- package/dist/lib/css/property-descriptors/letter-spacing.js +4 -4
- package/dist/lib/css/property-descriptors/letter-spacing.js.map +1 -1
- package/dist/lib/css/property-descriptors/line-break.js +1 -1
- package/dist/lib/css/property-descriptors/line-break.js.map +1 -1
- package/dist/lib/css/property-descriptors/line-height.js +5 -5
- package/dist/lib/css/property-descriptors/line-height.js.map +1 -1
- package/dist/lib/css/property-descriptors/list-style-image.js +2 -2
- package/dist/lib/css/property-descriptors/list-style-image.js.map +1 -1
- package/dist/lib/css/property-descriptors/list-style-position.js +3 -3
- package/dist/lib/css/property-descriptors/list-style-position.js.map +1 -1
- package/dist/lib/css/property-descriptors/list-style-type.js +55 -55
- package/dist/lib/css/property-descriptors/list-style-type.js.map +1 -1
- package/dist/lib/css/property-descriptors/margin.js +2 -2
- package/dist/lib/css/property-descriptors/margin.js.map +1 -1
- package/dist/lib/css/property-descriptors/object-fit.js +7 -7
- package/dist/lib/css/property-descriptors/object-fit.js.map +1 -1
- package/dist/lib/css/property-descriptors/opacity.js +2 -2
- package/dist/lib/css/property-descriptors/opacity.js.map +1 -1
- package/dist/lib/css/property-descriptors/overflow-wrap.js +3 -3
- package/dist/lib/css/property-descriptors/overflow-wrap.js.map +1 -1
- package/dist/lib/css/property-descriptors/overflow.js +6 -6
- package/dist/lib/css/property-descriptors/overflow.js.map +1 -1
- package/dist/lib/css/property-descriptors/padding.js +2 -2
- package/dist/lib/css/property-descriptors/padding.js.map +1 -1
- package/dist/lib/css/property-descriptors/paint-order.js +5 -5
- package/dist/lib/css/property-descriptors/paint-order.js.map +1 -1
- package/dist/lib/css/property-descriptors/position.js +6 -6
- package/dist/lib/css/property-descriptors/position.js.map +1 -1
- package/dist/lib/css/property-descriptors/quotes.js +2 -2
- package/dist/lib/css/property-descriptors/quotes.js.map +1 -1
- package/dist/lib/css/property-descriptors/text-align.js +4 -4
- package/dist/lib/css/property-descriptors/text-align.js.map +1 -1
- package/dist/lib/css/property-descriptors/text-decoration-color.js +1 -1
- package/dist/lib/css/property-descriptors/text-decoration-color.js.map +1 -1
- package/dist/lib/css/property-descriptors/text-decoration-line.js +7 -7
- package/dist/lib/css/property-descriptors/text-decoration-line.js.map +1 -1
- package/dist/lib/css/property-descriptors/text-shadow.js +4 -4
- package/dist/lib/css/property-descriptors/text-shadow.js.map +1 -1
- package/dist/lib/css/property-descriptors/text-transform.js +5 -5
- package/dist/lib/css/property-descriptors/text-transform.js.map +1 -1
- package/dist/lib/css/property-descriptors/transform-origin.js +2 -2
- package/dist/lib/css/property-descriptors/transform-origin.js.map +1 -1
- package/dist/lib/css/property-descriptors/transform.js +6 -6
- package/dist/lib/css/property-descriptors/transform.js.map +1 -1
- package/dist/lib/css/property-descriptors/visibility.js +4 -4
- package/dist/lib/css/property-descriptors/visibility.js.map +1 -1
- package/dist/lib/css/property-descriptors/webkit-text-stroke-color.js +1 -1
- package/dist/lib/css/property-descriptors/webkit-text-stroke-color.js.map +1 -1
- package/dist/lib/css/property-descriptors/webkit-text-stroke-width.js +2 -2
- package/dist/lib/css/property-descriptors/webkit-text-stroke-width.js.map +1 -1
- package/dist/lib/css/property-descriptors/word-break.js +1 -1
- package/dist/lib/css/property-descriptors/word-break.js.map +1 -1
- package/dist/lib/css/property-descriptors/z-index.js +3 -3
- package/dist/lib/css/property-descriptors/z-index.js.map +1 -1
- package/dist/lib/css/syntax/__tests__/tokernizer-tests.js +9 -9
- package/dist/lib/css/syntax/__tests__/tokernizer-tests.js.map +1 -1
- package/dist/lib/css/syntax/parser.js +24 -24
- package/dist/lib/css/syntax/parser.js.map +1 -1
- package/dist/lib/css/syntax/tokenizer.js +44 -44
- package/dist/lib/css/syntax/tokenizer.js.map +1 -1
- package/dist/lib/css/types/__tests__/color-tests.js +91 -91
- package/dist/lib/css/types/__tests__/color-tests.js.map +1 -1
- package/dist/lib/css/types/__tests__/image-tests.js +48 -48
- package/dist/lib/css/types/__tests__/image-tests.js.map +1 -1
- package/dist/lib/css/types/angle.js +6 -6
- package/dist/lib/css/types/angle.js.map +1 -1
- package/dist/lib/css/types/color-spaces/a98.js +5 -5
- package/dist/lib/css/types/color-spaces/a98.js.map +1 -1
- package/dist/lib/css/types/color-spaces/p3.js +8 -8
- package/dist/lib/css/types/color-spaces/p3.js.map +1 -1
- package/dist/lib/css/types/color-spaces/pro-photo.js +7 -7
- package/dist/lib/css/types/color-spaces/pro-photo.js.map +1 -1
- package/dist/lib/css/types/color-spaces/rec2020.js +7 -7
- package/dist/lib/css/types/color-spaces/rec2020.js.map +1 -1
- package/dist/lib/css/types/color-spaces/srgb.js +7 -7
- package/dist/lib/css/types/color-spaces/srgb.js.map +1 -1
- package/dist/lib/css/types/color-utilities.js +54 -54
- package/dist/lib/css/types/color-utilities.js.map +1 -1
- package/dist/lib/css/types/color.js +38 -38
- package/dist/lib/css/types/color.js.map +1 -1
- package/dist/lib/css/types/functions/-prefix-linear-gradient.js +8 -8
- package/dist/lib/css/types/functions/-prefix-linear-gradient.js.map +1 -1
- package/dist/lib/css/types/functions/-prefix-radial-gradient.js +15 -15
- package/dist/lib/css/types/functions/-prefix-radial-gradient.js.map +1 -1
- package/dist/lib/css/types/functions/-webkit-gradient.js +14 -14
- package/dist/lib/css/types/functions/-webkit-gradient.js.map +1 -1
- package/dist/lib/css/types/functions/__tests__/radial-gradient.js +22 -22
- package/dist/lib/css/types/functions/__tests__/radial-gradient.js.map +1 -1
- package/dist/lib/css/types/functions/counter.js +63 -63
- package/dist/lib/css/types/functions/counter.js.map +1 -1
- package/dist/lib/css/types/functions/gradient.js +18 -18
- package/dist/lib/css/types/functions/gradient.js.map +1 -1
- package/dist/lib/css/types/functions/linear-gradient.js +7 -7
- package/dist/lib/css/types/functions/linear-gradient.js.map +1 -1
- package/dist/lib/css/types/functions/radial-gradient.js +15 -15
- package/dist/lib/css/types/functions/radial-gradient.js.map +1 -1
- package/dist/lib/css/types/image.js +9 -9
- package/dist/lib/css/types/image.js.map +1 -1
- package/dist/lib/css/types/length-percentage.js +7 -7
- package/dist/lib/css/types/length-percentage.js.map +1 -1
- package/dist/lib/css/types/length.js +1 -1
- package/dist/lib/css/types/length.js.map +1 -1
- package/dist/lib/css/types/time.js +1 -1
- package/dist/lib/css/types/time.js.map +1 -1
- package/dist/lib/dom/document-cloner.js +48 -48
- package/dist/lib/dom/document-cloner.js.map +1 -1
- package/dist/lib/dom/element-container.js +5 -5
- package/dist/lib/dom/element-container.js.map +1 -1
- package/dist/lib/dom/node-parser.js +21 -21
- package/dist/lib/dom/node-parser.js.map +1 -1
- package/dist/lib/dom/replaced-elements/iframe-element-container.js +5 -5
- package/dist/lib/dom/replaced-elements/iframe-element-container.js.map +1 -1
- package/dist/lib/dom/replaced-elements/input-element-container.js +5 -5
- package/dist/lib/dom/replaced-elements/input-element-container.js.map +1 -1
- package/dist/lib/dom/replaced-elements/svg-element-container.js +4 -4
- package/dist/lib/dom/replaced-elements/svg-element-container.js.map +1 -1
- package/dist/lib/dom/text-container.js +4 -4
- package/dist/lib/dom/text-container.js.map +1 -1
- package/dist/lib/index.js +13 -13
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/render/background.js +35 -33
- package/dist/lib/render/background.js.map +1 -1
- package/dist/lib/render/bezier-curve.js +2 -2
- package/dist/lib/render/bezier-curve.js.map +1 -1
- package/dist/lib/render/border.js +6 -6
- package/dist/lib/render/border.js.map +1 -1
- package/dist/lib/render/bound-curves.js +8 -8
- package/dist/lib/render/bound-curves.js.map +1 -1
- package/dist/lib/render/box-sizing.js +4 -4
- package/dist/lib/render/box-sizing.js.map +1 -1
- package/dist/lib/render/canvas/canvas-renderer.js +108 -108
- package/dist/lib/render/canvas/canvas-renderer.js.map +1 -1
- package/dist/lib/render/canvas/foreignobject-renderer.js +8 -8
- package/dist/lib/render/canvas/foreignobject-renderer.js.map +1 -1
- package/dist/lib/render/effects.js +8 -8
- package/dist/lib/render/effects.js.map +1 -1
- package/dist/lib/render/font-metrics.js +1 -1
- package/dist/lib/render/font-metrics.js.map +1 -1
- package/dist/lib/render/stacking-context.js +24 -24
- package/dist/lib/render/stacking-context.js.map +1 -1
- package/dist/lib/render/vector.js +2 -2
- package/dist/lib/render/vector.js.map +1 -1
- package/dist/types/core/context.d.ts +1 -1
- package/dist/types/css/IPropertyDescriptor.d.ts +1 -1
- package/dist/types/css/property-descriptors/background-clip.d.ts +1 -1
- package/dist/types/css/property-descriptors/background-origin.d.ts +1 -1
- package/dist/types/css/property-descriptors/background-position.d.ts +2 -2
- package/dist/types/css/property-descriptors/background-repeat.d.ts +1 -1
- package/dist/types/css/property-descriptors/background-size.d.ts +2 -2
- package/dist/types/css/property-descriptors/border-radius.d.ts +1 -1
- package/dist/types/css/property-descriptors/box-shadow.d.ts +1 -1
- package/dist/types/css/property-descriptors/content.d.ts +1 -1
- package/dist/types/css/property-descriptors/counter-increment.d.ts +1 -1
- package/dist/types/css/property-descriptors/counter-reset.d.ts +1 -1
- package/dist/types/css/property-descriptors/display.d.ts +1 -1
- package/dist/types/css/property-descriptors/font-family.d.ts +2 -2
- package/dist/types/css/property-descriptors/object-fit.d.ts +1 -1
- package/dist/types/css/property-descriptors/paint-order.d.ts +1 -1
- package/dist/types/css/property-descriptors/quotes.d.ts +1 -1
- package/dist/types/css/property-descriptors/text-decoration-line.d.ts +1 -1
- package/dist/types/css/property-descriptors/text-shadow.d.ts +1 -1
- package/dist/types/css/property-descriptors/transform-origin.d.ts +1 -1
- package/dist/types/css/property-descriptors/transform.d.ts +2 -2
- package/dist/types/css/syntax/parser.d.ts +2 -2
- package/dist/types/css/syntax/tokenizer.d.ts +1 -1
- package/dist/types/css/types/color-utilities.d.ts +1 -1
- package/dist/types/css/types/color.d.ts +1 -1
- package/dist/types/css/types/image.d.ts +2 -2
- package/dist/types/css/types/index.d.ts +1 -1
- package/dist/types/css/types/length-percentage.d.ts +2 -2
- package/dist/types/css/types/length.d.ts +1 -1
- package/dist/types/dom/document-cloner.d.ts +2 -2
- package/dist/types/dom/replaced-elements/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/render/canvas/canvas-renderer.d.ts +1 -1
- package/dist/types/render/path.d.ts +1 -1
- package/package.json +14 -14
- package/.commitlintrc.json +0 -23
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -4
- package/.versionrc.json +0 -12
- package/CHANGELOG.md +0 -45
- package/tsconfig.json +0 -21
|
@@ -3,6 +3,6 @@ export interface QUOTE {
|
|
|
3
3
|
open: string;
|
|
4
4
|
close: string;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type Quotes = QUOTE[] | null;
|
|
7
7
|
export declare const quotes: IPropertyListDescriptor<Quotes>;
|
|
8
8
|
export declare const getQuote: (quotes: Quotes, depth: number, open: boolean) => string;
|
|
@@ -6,5 +6,5 @@ export declare const enum TEXT_DECORATION_LINE {
|
|
|
6
6
|
LINE_THROUGH = 3,
|
|
7
7
|
BLINK = 4
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type TextDecorationLine = TEXT_DECORATION_LINE[];
|
|
10
10
|
export declare const textDecorationLine: IPropertyListDescriptor<TextDecorationLine>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IPropertyListDescriptor } from '../IPropertyDescriptor';
|
|
2
2
|
import { Color } from '../types/color';
|
|
3
3
|
import { Length } from '../types/length';
|
|
4
|
-
export
|
|
4
|
+
export type TextShadow = TextShadowItem[];
|
|
5
5
|
interface TextShadowItem {
|
|
6
6
|
color: Color;
|
|
7
7
|
offsetX: Length;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IPropertyListDescriptor } from '../IPropertyDescriptor';
|
|
2
2
|
import { LengthPercentage } from '../types/length-percentage';
|
|
3
|
-
export
|
|
3
|
+
export type TransformOrigin = [LengthPercentage, LengthPercentage];
|
|
4
4
|
export declare const transformOrigin: IPropertyListDescriptor<TransformOrigin>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IPropertyValueDescriptor } from '../IPropertyDescriptor';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type Matrix = [number, number, number, number, number, number];
|
|
3
|
+
export type Transform = Matrix | null;
|
|
4
4
|
export declare const transform: IPropertyValueDescriptor<Transform>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSToken, DimensionToken, NumberValueToken, StringValueToken, TokenType } from './tokenizer';
|
|
2
|
-
export
|
|
2
|
+
export type CSSBlockType = TokenType.LEFT_PARENTHESIS_TOKEN | TokenType.LEFT_SQUARE_BRACKET_TOKEN | TokenType.LEFT_CURLY_BRACKET_TOKEN;
|
|
3
3
|
export interface CSSBlock {
|
|
4
4
|
type: CSSBlockType;
|
|
5
5
|
values: CSSValue[];
|
|
@@ -9,7 +9,7 @@ export interface CSSFunction {
|
|
|
9
9
|
name: string;
|
|
10
10
|
values: CSSValue[];
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type CSSValue = CSSFunction | CSSToken | CSSBlock;
|
|
13
13
|
export declare class Parser {
|
|
14
14
|
private _tokens;
|
|
15
15
|
constructor(tokens: CSSToken[]);
|
|
@@ -64,7 +64,7 @@ export interface UnicodeRangeToken extends IToken {
|
|
|
64
64
|
start: number;
|
|
65
65
|
end: number;
|
|
66
66
|
}
|
|
67
|
-
export
|
|
67
|
+
export type CSSToken = Token | StringValueToken | NumberValueToken | DimensionToken | UnicodeRangeToken | HashToken;
|
|
68
68
|
export declare const FLAG_UNRESTRICTED: number;
|
|
69
69
|
export declare const FLAG_ID: number;
|
|
70
70
|
export declare const FLAG_INTEGER: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from '../../core/context';
|
|
2
2
|
import { CSSValue } from '../syntax/parser';
|
|
3
|
-
|
|
3
|
+
type Color = number;
|
|
4
4
|
export declare const isTransparent: (color: Color) => boolean;
|
|
5
5
|
export declare const asString: (color: Color) => string;
|
|
6
6
|
export declare const pack: (r: number, g: number, b: number, a: number) => Color;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITypeDescriptor } from '../ITypeDescriptor';
|
|
2
2
|
import { Context } from '../../core/context';
|
|
3
|
-
export
|
|
3
|
+
export type Color = number;
|
|
4
4
|
export declare const color: ITypeDescriptor<Color>;
|
|
5
5
|
export declare const parseColor: (context: Context, value: string) => Color;
|
|
6
6
|
export declare const COLORS: {
|
|
@@ -24,7 +24,7 @@ export interface CSSURLImage extends ICSSImage {
|
|
|
24
24
|
url: string;
|
|
25
25
|
type: CSSImageType.URL;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type GradientCorner = [LengthPercentage, LengthPercentage];
|
|
28
28
|
interface ICSSGradientImage extends ICSSImage {
|
|
29
29
|
stops: UnprocessedGradientColorStop[];
|
|
30
30
|
}
|
|
@@ -42,7 +42,7 @@ export declare const enum CSSRadialExtent {
|
|
|
42
42
|
CLOSEST_CORNER = 2,
|
|
43
43
|
FARTHEST_CORNER = 3
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export type CSSRadialSize = CSSRadialExtent | LengthPercentage[];
|
|
46
46
|
export interface CSSRadialGradientImage extends ICSSGradientImage {
|
|
47
47
|
type: CSSImageType.RADIAL_GRADIENT;
|
|
48
48
|
shape: CSSRadialShape;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type CSSTypes = 'angle' | 'color' | 'image' | 'length' | 'length-percentage' | 'time';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DimensionToken, NumberValueToken } from '../syntax/tokenizer';
|
|
2
2
|
import { CSSValue } from '../syntax/parser';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type LengthPercentage = DimensionToken | NumberValueToken;
|
|
4
|
+
export type LengthPercentageTuple = [LengthPercentage] | [LengthPercentage, LengthPercentage];
|
|
5
5
|
export declare const isLengthPercentage: (token: CSSValue) => token is LengthPercentage;
|
|
6
6
|
export declare const parseLengthPercentageTuple: (tokens: LengthPercentage[]) => LengthPercentageTuple;
|
|
7
7
|
export declare const ZERO_LENGTH: NumberValueToken;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CSSValue } from '../syntax/parser';
|
|
2
2
|
import { DimensionToken, NumberValueToken } from '../syntax/tokenizer';
|
|
3
|
-
export
|
|
3
|
+
export type Length = DimensionToken | NumberValueToken;
|
|
4
4
|
export declare const isLength: (token: CSSValue) => token is Length;
|
|
@@ -11,7 +11,7 @@ export interface WindowOptions {
|
|
|
11
11
|
windowWidth: number;
|
|
12
12
|
windowHeight: number;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type CloneConfigurations = CloneOptions & {
|
|
15
15
|
inlineImages: boolean;
|
|
16
16
|
copyStyles: boolean;
|
|
17
17
|
};
|
|
@@ -41,5 +41,5 @@ declare enum PseudoElementType {
|
|
|
41
41
|
BEFORE = 0,
|
|
42
42
|
AFTER = 1
|
|
43
43
|
}
|
|
44
|
-
export declare const copyCSSStyles: <T extends
|
|
44
|
+
export declare const copyCSSStyles: <T extends SVGElement | HTMLElement>(style: CSSStyleDeclaration, target: T) => T;
|
|
45
45
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CanvasElementContainer } from './canvas-element-container';
|
|
2
2
|
import { ImageElementContainer } from './image-element-container';
|
|
3
3
|
import { SVGElementContainer } from './svg-element-container';
|
|
4
|
-
export
|
|
4
|
+
export type ReplacedElementContainer = CanvasElementContainer | ImageElementContainer | SVGElementContainer;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CloneOptions, WindowOptions } from './dom/document-cloner';
|
|
2
2
|
import { RenderOptions } from './render/canvas/canvas-renderer';
|
|
3
3
|
import { ContextOptions } from './core/context';
|
|
4
|
-
export
|
|
4
|
+
export type Options = CloneOptions & WindowOptions & RenderOptions & ContextOptions & {
|
|
5
5
|
backgroundColor: string | null;
|
|
6
6
|
foreignObjectRendering: boolean;
|
|
7
7
|
removeContainer?: boolean;
|
|
@@ -11,7 +11,7 @@ import { ReplacedElementContainer } from '../../dom/replaced-elements';
|
|
|
11
11
|
import { IElementEffect } from '../effects';
|
|
12
12
|
import { Renderer } from '../renderer';
|
|
13
13
|
import { Context } from '../../core/context';
|
|
14
|
-
export
|
|
14
|
+
export type RenderConfigurations = RenderOptions & {
|
|
15
15
|
backgroundColor: Color | null;
|
|
16
16
|
};
|
|
17
17
|
export interface RenderOptions {
|
|
@@ -10,4 +10,4 @@ export interface IPath {
|
|
|
10
10
|
}
|
|
11
11
|
export declare const equalPath: (a: Path[], b: Path[]) => boolean;
|
|
12
12
|
export declare const transformPath: (path: Path[], deltaX: number, deltaY: number, deltaW: number, deltaH: number) => Path[];
|
|
13
|
-
export
|
|
13
|
+
export type Path = Vector | BezierCurve;
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"module": "dist/html2canvas-pro.esm.js",
|
|
7
7
|
"typings": "dist/types/index.d.ts",
|
|
8
8
|
"browser": "dist/html2canvas-pro.js",
|
|
9
|
-
"version": "1.5.
|
|
9
|
+
"version": "1.5.5",
|
|
10
10
|
"author": {
|
|
11
11
|
"name": "yorickshan",
|
|
12
12
|
"email": "yorickshan@gmail.com",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"@types/chai": "^4.1.7",
|
|
41
41
|
"@types/express": "^4.17.13",
|
|
42
42
|
"@types/glob": "^7.1.1",
|
|
43
|
-
"@types/jest": "^
|
|
44
|
-
"@types/jest-image-snapshot": "^4.
|
|
43
|
+
"@types/jest": "^29.5.12",
|
|
44
|
+
"@types/jest-image-snapshot": "^6.4.0",
|
|
45
45
|
"@types/karma": "^6.3.0",
|
|
46
46
|
"@types/mocha": "^8.2.3",
|
|
47
47
|
"@types/node": "^16.3.1",
|
|
48
48
|
"@types/platform": "^1.3.4",
|
|
49
49
|
"@types/promise-polyfill": "^6.0.3",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
51
|
-
"@typescript-eslint/parser": "^4.
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
51
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
52
52
|
"appium-ios-simulator": "^3.10.0",
|
|
53
53
|
"babel-eslint": "^10.0.1",
|
|
54
54
|
"babel-loader": "^8.0.5",
|
|
@@ -57,12 +57,11 @@
|
|
|
57
57
|
"base64-arraybuffer": "1.0.1",
|
|
58
58
|
"body-parser": "^1.19.0",
|
|
59
59
|
"chai": "4.1.1",
|
|
60
|
-
"chromeless": "^1.5.2",
|
|
61
60
|
"conventional-changelog-cli": "^2.1.1",
|
|
62
61
|
"cors": "^2.8.5",
|
|
63
62
|
"cz-conventional-changelog": "^3.3.0",
|
|
64
63
|
"es6-promise": "^4.2.8",
|
|
65
|
-
"eslint": "^7.
|
|
64
|
+
"eslint": "^7.32.0",
|
|
66
65
|
"eslint-config-prettier": "^8.3.0",
|
|
67
66
|
"eslint-plugin-prettier": "3.4.0",
|
|
68
67
|
"express": "^4.17.1",
|
|
@@ -70,8 +69,9 @@
|
|
|
70
69
|
"glob": "7.1.3",
|
|
71
70
|
"html2canvas-proxy": "1.0.1",
|
|
72
71
|
"husky": "^8.0.0",
|
|
73
|
-
"jest": "^
|
|
74
|
-
"jest-
|
|
72
|
+
"jest": "^29.7.0",
|
|
73
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
74
|
+
"jest-image-snapshot": "^6.4.0",
|
|
75
75
|
"jquery": "^3.5.1",
|
|
76
76
|
"js-polyfills": "^0.1.42",
|
|
77
77
|
"karma": "^6.3.2",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"node-simctl": "^5.3.0",
|
|
89
89
|
"platform": "^1.3.6",
|
|
90
90
|
"prettier": "^2.3.2",
|
|
91
|
+
"puppeteer": "^22.12.1",
|
|
91
92
|
"replace-in-file": "^3.0.0",
|
|
92
93
|
"rimraf": "^3.0.2",
|
|
93
94
|
"rollup": "^2.53.1",
|
|
@@ -95,13 +96,12 @@
|
|
|
95
96
|
"serve-index": "^1.9.1",
|
|
96
97
|
"slash": "1.0.0",
|
|
97
98
|
"standard-version": "^9.5.0",
|
|
98
|
-
"ts-jest": "^
|
|
99
|
+
"ts-jest": "^29.1.5",
|
|
99
100
|
"ts-loader": "^8.3.0",
|
|
100
|
-
"ts-node": "^10.
|
|
101
|
+
"ts-node": "^10.9.2",
|
|
101
102
|
"tslib": "^2.3.0",
|
|
102
|
-
"typescript": "^4.
|
|
103
|
+
"typescript": "^4.9.5",
|
|
103
104
|
"uglify-js": "^3.13.10",
|
|
104
|
-
"uglifyjs-webpack-plugin": "^2.2.0",
|
|
105
105
|
"webpack": "^4.46.0",
|
|
106
106
|
"webpack-cli": "^3.3.12",
|
|
107
107
|
"yargs": "^17.0.1"
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"text-segmentation": "^1.0.3"
|
|
135
135
|
},
|
|
136
136
|
"lint-staged": {
|
|
137
|
-
"**/*.
|
|
137
|
+
"**/*.ts": [
|
|
138
138
|
"prettier --write",
|
|
139
139
|
"eslint --fix"
|
|
140
140
|
]
|
package/.commitlintrc.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["@commitlint/config-conventional"],
|
|
3
|
-
"rules": {
|
|
4
|
-
"type-enum": [
|
|
5
|
-
2,
|
|
6
|
-
"always",
|
|
7
|
-
[
|
|
8
|
-
"feat",
|
|
9
|
-
"fix",
|
|
10
|
-
"docs",
|
|
11
|
-
"style",
|
|
12
|
-
"refactor",
|
|
13
|
-
"perf",
|
|
14
|
-
"test",
|
|
15
|
-
"chore",
|
|
16
|
-
"revert",
|
|
17
|
-
"build",
|
|
18
|
-
"ci"
|
|
19
|
-
]
|
|
20
|
-
],
|
|
21
|
-
"subject-case": [0]
|
|
22
|
-
}
|
|
23
|
-
}
|
package/.husky/commit-msg
DELETED
package/.husky/pre-commit
DELETED
package/.versionrc.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"header": "",
|
|
3
|
-
"types": [
|
|
4
|
-
{ "type": "feat", "section": "Features" },
|
|
5
|
-
{ "type": "fix", "section": "Fixes" },
|
|
6
|
-
{ "type": "docs", "section": "Documentation" },
|
|
7
|
-
{ "type": "refactor", "section": "Refactor" },
|
|
8
|
-
{ "type": "perf", "section": "Performance" },
|
|
9
|
-
{ "type": "chore", "section": "Chore" },
|
|
10
|
-
{ "type": "test", "section": "Chore" }
|
|
11
|
-
]
|
|
12
|
-
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
### [1.5.3](https://github.com/yorickshan/html2canvas-pro/compare/v1.5.2...v1.5.3) (2024-07-04)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
### Fixes
|
|
6
|
-
|
|
7
|
-
* added fix for Firefox issue ([c807c3f](https://github.com/yorickshan/html2canvas-pro/commit/c807c3fed1360a752c8ee5659992b52fcfb02613))
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
### Chore
|
|
11
|
-
|
|
12
|
-
* add commitlint ([75c196f](https://github.com/yorickshan/html2canvas-pro/commit/75c196fa884b635d5207824fb52d38f225f39646))
|
|
13
|
-
* npm publish ([107672d](https://github.com/yorickshan/html2canvas-pro/commit/107672d74dda264a39b8989142ec99dbacdeb13d))
|
|
14
|
-
|
|
15
|
-
### [1.5.2](https://github.com/yorickshan/html2canvas-pro/compare/v1.5.1...v1.5.2) (2024-07-03)
|
|
16
|
-
|
|
17
|
-
### 1.5.1 (2024-07-01)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Fixes
|
|
21
|
-
|
|
22
|
-
* operation is insecure on safari ([71f7c28](https://github.com/yorickshan/html2canvas-pro/commit/71f7c283dfe5a8cd64b39343bc7cec85e3932200))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Features
|
|
26
|
-
|
|
27
|
-
* better color() support ([2559164](https://github.com/yorickshan/html2canvas-pro/commit/2559164c9890ea4985ce4cf09d27184da6ee22f8))
|
|
28
|
-
* color functions ([1c9ece3](https://github.com/yorickshan/html2canvas-pro/commit/1c9ece3887e229eb69b34a5bb082c059355518e2))
|
|
29
|
-
* complete work on relative from colors in the color() function ([ac6e331](https://github.com/yorickshan/html2canvas-pro/commit/ac6e33118be76734ff9b1f5cd92e147babd46548))
|
|
30
|
-
* work on relative color support ([88e6aba](https://github.com/yorickshan/html2canvas-pro/commit/88e6abaa47b9c59e49a7bc3c0008849cc365f787))
|
|
31
|
-
|
|
32
|
-
### 1.5.0 (2024-05-27)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
### Features
|
|
36
|
-
|
|
37
|
-
* better color() support ([2559164](https://github.com/yorickshan/html2canvas-pro/commit/2559164c9890ea4985ce4cf09d27184da6ee22f8))
|
|
38
|
-
* color functions ([1c9ece3](https://github.com/yorickshan/html2canvas-pro/commit/1c9ece3887e229eb69b34a5bb082c059355518e2))
|
|
39
|
-
* complete work on relative from colors in the color() function ([ac6e331](https://github.com/yorickshan/html2canvas-pro/commit/ac6e33118be76734ff9b1f5cd92e147babd46548))
|
|
40
|
-
* work on relative color support ([88e6aba](https://github.com/yorickshan/html2canvas-pro/commit/88e6abaa47b9c59e49a7bc3c0008849cc365f787))
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
### Fixes
|
|
44
|
-
|
|
45
|
-
* color function display-p3 conversion ([b9fd943](https://github.com/yorickshan/html2canvas-pro/commit/b9fd943332a5627a9cd86c62bd6029d461356c14))
|
package/tsconfig.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"noImplicitAny": true,
|
|
4
|
-
"noImplicitThis": true,
|
|
5
|
-
"noUnusedLocals": true,
|
|
6
|
-
"noUnusedParameters": true,
|
|
7
|
-
"strictNullChecks": true,
|
|
8
|
-
"strictPropertyInitialization": true,
|
|
9
|
-
"types": ["node", "jest"],
|
|
10
|
-
"target": "es5",
|
|
11
|
-
"lib": ["es2015", "dom"],
|
|
12
|
-
"sourceMap": true,
|
|
13
|
-
"outDir": "dist/lib",
|
|
14
|
-
"declaration": true,
|
|
15
|
-
"declarationDir": "dist/types",
|
|
16
|
-
"resolveJsonModule": true
|
|
17
|
-
},
|
|
18
|
-
"include": [
|
|
19
|
-
"src"
|
|
20
|
-
]
|
|
21
|
-
}
|