html2pdf-accessible 0.0.0-stage → 0.1.4

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.
Files changed (183) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +215 -2
  3. package/THIRD_PARTY_NOTICES.md +15 -0
  4. package/deps/canvaskit-pdf/CHROMIUM-LICENSE +27 -0
  5. package/deps/canvaskit-pdf/LICENSE +29 -0
  6. package/deps/canvaskit-pdf/README.md +35 -0
  7. package/deps/canvaskit-pdf/THIRD_PARTY_LICENSES.txt +2152 -0
  8. package/deps/canvaskit-pdf/bin/canvaskit.js +215 -0
  9. package/deps/canvaskit-pdf/chromium-license-source.json +5 -0
  10. package/deps/canvaskit-pdf/package.json +22 -0
  11. package/deps/canvaskit-pdf/pdf_bindings.cpp +179 -0
  12. package/deps/canvaskit-pdf/provenance.json +37 -0
  13. package/deps/canvaskit-pdf/types/google-types.d.ts +4948 -0
  14. package/deps/canvaskit-pdf/types/index.d.ts +48 -0
  15. package/lib/html2pdf-accessible.cjs.js +3 -0
  16. package/lib/html2pdf-accessible.cjs.js.LICENSE.txt +14 -0
  17. package/lib/html2pdf-accessible.cjs.js.map +1 -0
  18. package/lib/html2pdf-accessible.esm.mjs +3 -0
  19. package/lib/html2pdf-accessible.esm.mjs.LICENSE.txt +14 -0
  20. package/lib/html2pdf-accessible.esm.mjs.map +1 -0
  21. package/lib/html2pdf-accessible.js +3 -0
  22. package/lib/html2pdf-accessible.js.LICENSE.txt +14 -0
  23. package/lib/html2pdf-accessible.js.map +1 -0
  24. package/lib/html2pdf-accessible.min.js +17 -0
  25. package/lib/html2pdf-accessible.min.js.map +1 -0
  26. package/lib/types/core/bitwise.d.ts +1 -0
  27. package/lib/types/core/cache-storage.d.ts +27 -0
  28. package/lib/types/core/context.d.ts +17 -0
  29. package/lib/types/core/debugger.d.ts +8 -0
  30. package/lib/types/core/features.d.ts +12 -0
  31. package/lib/types/core/logger.d.ts +18 -0
  32. package/lib/types/core/util.d.ts +1 -0
  33. package/lib/types/css/IPropertyDescriptor.d.ts +36 -0
  34. package/lib/types/css/ITypeDescriptor.d.ts +6 -0
  35. package/lib/types/css/index.d.ts +134 -0
  36. package/lib/types/css/layout/bounds.d.ts +14 -0
  37. package/lib/types/css/layout/text.d.ts +13 -0
  38. package/lib/types/css/property-descriptors/background-clip.d.ts +8 -0
  39. package/lib/types/css/property-descriptors/background-color.d.ts +2 -0
  40. package/lib/types/css/property-descriptors/background-image.d.ts +3 -0
  41. package/lib/types/css/property-descriptors/background-origin.d.ts +8 -0
  42. package/lib/types/css/property-descriptors/background-position.d.ts +5 -0
  43. package/lib/types/css/property-descriptors/background-repeat.d.ts +9 -0
  44. package/lib/types/css/property-descriptors/background-size.d.ts +11 -0
  45. package/lib/types/css/property-descriptors/border-color.d.ts +5 -0
  46. package/lib/types/css/property-descriptors/border-radius.d.ts +7 -0
  47. package/lib/types/css/property-descriptors/border-style.d.ts +12 -0
  48. package/lib/types/css/property-descriptors/border-width.d.ts +5 -0
  49. package/lib/types/css/property-descriptors/box-shadow.d.ts +14 -0
  50. package/lib/types/css/property-descriptors/color.d.ts +2 -0
  51. package/lib/types/css/property-descriptors/content.d.ts +4 -0
  52. package/lib/types/css/property-descriptors/counter-increment.d.ts +7 -0
  53. package/lib/types/css/property-descriptors/counter-reset.d.ts +7 -0
  54. package/lib/types/css/property-descriptors/direction.d.ts +6 -0
  55. package/lib/types/css/property-descriptors/display.d.ts +35 -0
  56. package/lib/types/css/property-descriptors/duration.d.ts +2 -0
  57. package/lib/types/css/property-descriptors/float.d.ts +9 -0
  58. package/lib/types/css/property-descriptors/font-family.d.ts +4 -0
  59. package/lib/types/css/property-descriptors/font-size.d.ts +2 -0
  60. package/lib/types/css/property-descriptors/font-style.d.ts +7 -0
  61. package/lib/types/css/property-descriptors/font-variant.d.ts +2 -0
  62. package/lib/types/css/property-descriptors/font-weight.d.ts +2 -0
  63. package/lib/types/css/property-descriptors/letter-spacing.d.ts +2 -0
  64. package/lib/types/css/property-descriptors/line-break.d.ts +6 -0
  65. package/lib/types/css/property-descriptors/line-height.d.ts +4 -0
  66. package/lib/types/css/property-descriptors/list-style-image.d.ts +3 -0
  67. package/lib/types/css/property-descriptors/list-style-position.d.ts +6 -0
  68. package/lib/types/css/property-descriptors/list-style-type.d.ts +58 -0
  69. package/lib/types/css/property-descriptors/margin.d.ts +5 -0
  70. package/lib/types/css/property-descriptors/object-fit.d.ts +10 -0
  71. package/lib/types/css/property-descriptors/opacity.d.ts +2 -0
  72. package/lib/types/css/property-descriptors/overflow-wrap.d.ts +6 -0
  73. package/lib/types/css/property-descriptors/overflow.d.ts +9 -0
  74. package/lib/types/css/property-descriptors/padding.d.ts +5 -0
  75. package/lib/types/css/property-descriptors/paint-order.d.ts +8 -0
  76. package/lib/types/css/property-descriptors/position.d.ts +9 -0
  77. package/lib/types/css/property-descriptors/quotes.d.ts +8 -0
  78. package/lib/types/css/property-descriptors/text-align.d.ts +7 -0
  79. package/lib/types/css/property-descriptors/text-decoration-color.d.ts +2 -0
  80. package/lib/types/css/property-descriptors/text-decoration-line.d.ts +10 -0
  81. package/lib/types/css/property-descriptors/text-shadow.d.ts +12 -0
  82. package/lib/types/css/property-descriptors/text-transform.d.ts +8 -0
  83. package/lib/types/css/property-descriptors/transform-origin.d.ts +4 -0
  84. package/lib/types/css/property-descriptors/transform.d.ts +4 -0
  85. package/lib/types/css/property-descriptors/visibility.d.ts +7 -0
  86. package/lib/types/css/property-descriptors/webkit-text-stroke-color.d.ts +2 -0
  87. package/lib/types/css/property-descriptors/webkit-text-stroke-width.d.ts +2 -0
  88. package/lib/types/css/property-descriptors/word-break.d.ts +7 -0
  89. package/lib/types/css/property-descriptors/z-index.d.ts +7 -0
  90. package/lib/types/css/syntax/parser.d.ts +34 -0
  91. package/lib/types/css/syntax/tokenizer.d.ts +94 -0
  92. package/lib/types/css/types/angle.d.ts +7 -0
  93. package/lib/types/css/types/color-calculation.d.ts +3 -0
  94. package/lib/types/css/types/color-spaces/a98.d.ts +39 -0
  95. package/lib/types/css/types/color-spaces/p3.d.ts +45 -0
  96. package/lib/types/css/types/color-spaces/pro-photo.d.ts +45 -0
  97. package/lib/types/css/types/color-spaces/rec2020.d.ts +45 -0
  98. package/lib/types/css/types/color-spaces/srgb.d.ts +38 -0
  99. package/lib/types/css/types/color-utilities.d.ts +108 -0
  100. package/lib/types/css/types/color.d.ts +8 -0
  101. package/lib/types/css/types/functions/-prefix-linear-gradient.d.ts +4 -0
  102. package/lib/types/css/types/functions/-prefix-radial-gradient.d.ts +4 -0
  103. package/lib/types/css/types/functions/-webkit-gradient.d.ts +4 -0
  104. package/lib/types/css/types/functions/counter.d.ts +10 -0
  105. package/lib/types/css/types/functions/gradient.d.ts +7 -0
  106. package/lib/types/css/types/functions/linear-gradient.d.ts +4 -0
  107. package/lib/types/css/types/functions/radial-gradient.d.ts +12 -0
  108. package/lib/types/css/types/image.d.ts +54 -0
  109. package/lib/types/css/types/index.d.ts +1 -0
  110. package/lib/types/css/types/length-percentage.d.ts +11 -0
  111. package/lib/types/css/types/length.d.ts +4 -0
  112. package/lib/types/css/types/time.d.ts +2 -0
  113. package/lib/types/dom/document-cloner.d.ts +45 -0
  114. package/lib/types/dom/element-container.d.ts +20 -0
  115. package/lib/types/dom/elements/li-element-container.d.ts +6 -0
  116. package/lib/types/dom/elements/ol-element-container.d.ts +7 -0
  117. package/lib/types/dom/elements/select-element-container.d.ts +6 -0
  118. package/lib/types/dom/elements/textarea-element-container.d.ts +6 -0
  119. package/lib/types/dom/node-parser.d.ts +25 -0
  120. package/lib/types/dom/replaced-elements/canvas-element-container.d.ts +8 -0
  121. package/lib/types/dom/replaced-elements/iframe-element-container.d.ts +11 -0
  122. package/lib/types/dom/replaced-elements/image-element-container.d.ts +8 -0
  123. package/lib/types/dom/replaced-elements/index.d.ts +4 -0
  124. package/lib/types/dom/replaced-elements/input-element-container.d.ts +12 -0
  125. package/lib/types/dom/replaced-elements/pseudo-elements.d.ts +0 -0
  126. package/lib/types/dom/replaced-elements/svg-element-container.d.ts +8 -0
  127. package/lib/types/dom/text-container.d.ts +8 -0
  128. package/lib/types/fonts/font-collection.d.ts +25 -0
  129. package/lib/types/fonts/font-enumeration.d.ts +5 -0
  130. package/lib/types/fonts/font-style-mapping.d.ts +3 -0
  131. package/lib/types/fonts/interfaces.d.ts +27 -0
  132. package/lib/types/html2canvas.d.ts +10 -0
  133. package/lib/types/index.d.ts +7 -0
  134. package/lib/types/invariant.d.ts +1 -0
  135. package/lib/types/pdf/bookmarks.d.ts +4 -0
  136. package/lib/types/pdf/canvaskit-loader.d.ts +56 -0
  137. package/lib/types/pdf/document-structure.d.ts +105 -0
  138. package/lib/types/pdf/dom-updates.d.ts +6 -0
  139. package/lib/types/pdf/finalize-structure.d.ts +6 -0
  140. package/lib/types/pdf/hidden-captions.d.ts +15 -0
  141. package/lib/types/pdf/html-page-break.d.ts +11 -0
  142. package/lib/types/pdf/link-annotations.d.ts +8 -0
  143. package/lib/types/pdf/link-uri.d.ts +2 -0
  144. package/lib/types/pdf/logical-structure.d.ts +3 -0
  145. package/lib/types/pdf/pdf-export.d.ts +29 -0
  146. package/lib/types/pdf/single-html-multi-page.d.ts +14 -0
  147. package/lib/types/pdf/table-headers.d.ts +6 -0
  148. package/lib/types/pdf/xmp-metadata.d.ts +5 -0
  149. package/lib/types/render/background.d.ts +16 -0
  150. package/lib/types/render/bezier-curve.d.ts +14 -0
  151. package/lib/types/render/border.d.ts +6 -0
  152. package/lib/types/render/bound-curves.d.ts +32 -0
  153. package/lib/types/render/box-sizing.d.ts +4 -0
  154. package/lib/types/render/canvas/canvas-renderer.d.ts +53 -0
  155. package/lib/types/render/canvas/foreignobject-renderer.d.ts +11 -0
  156. package/lib/types/render/effects.d.ts +38 -0
  157. package/lib/types/render/font-metrics.d.ts +11 -0
  158. package/lib/types/render/path.d.ts +13 -0
  159. package/lib/types/render/renderer.d.ts +7 -0
  160. package/lib/types/render/skia/skia-font.d.ts +27 -0
  161. package/lib/types/render/skia/skia-renderer.d.ts +69 -0
  162. package/lib/types/render/stacking-context.d.ts +24 -0
  163. package/lib/types/render/vector.d.ts +9 -0
  164. package/lib/wasm/canvaskit-pdf.wasm +0 -0
  165. package/node_modules/@html2pdf-skia/canvaskit-pdf/CHROMIUM-LICENSE +27 -0
  166. package/node_modules/@html2pdf-skia/canvaskit-pdf/LICENSE +29 -0
  167. package/node_modules/@html2pdf-skia/canvaskit-pdf/README.md +35 -0
  168. package/node_modules/@html2pdf-skia/canvaskit-pdf/THIRD_PARTY_LICENSES.txt +2152 -0
  169. package/node_modules/@html2pdf-skia/canvaskit-pdf/bin/canvaskit.js +215 -0
  170. package/node_modules/@html2pdf-skia/canvaskit-pdf/chromium-license-source.json +5 -0
  171. package/node_modules/@html2pdf-skia/canvaskit-pdf/package.json +22 -0
  172. package/node_modules/@html2pdf-skia/canvaskit-pdf/pdf_bindings.cpp +179 -0
  173. package/node_modules/@html2pdf-skia/canvaskit-pdf/provenance.json +37 -0
  174. package/node_modules/@html2pdf-skia/canvaskit-pdf/types/google-types.d.ts +4948 -0
  175. package/node_modules/@html2pdf-skia/canvaskit-pdf/types/index.d.ts +48 -0
  176. package/node_modules/@webgpu/types/LICENSE +26 -0
  177. package/node_modules/@webgpu/types/README.md +132 -0
  178. package/node_modules/@webgpu/types/dist/index.d.ts +3426 -0
  179. package/node_modules/@webgpu/types/package.json +23 -0
  180. package/package.json +126 -4
  181. package/scripts/canvaskit/build.cjs +74 -0
  182. package/scripts/canvaskit/build.py +143 -0
  183. package/scripts/canvaskit/verify.cjs +82 -0
@@ -0,0 +1 @@
1
+ export declare const contains: (bit: number, value: number) => boolean;
@@ -0,0 +1,27 @@
1
+ import { Context } from "./context";
2
+ export declare class CacheStorage {
3
+ private static _link?;
4
+ private static _origin;
5
+ static getOrigin(url: string): string;
6
+ static isSameOrigin(src: string): boolean;
7
+ static setContext(window: Window): void;
8
+ }
9
+ export interface ResourceOptions {
10
+ imageTimeout: number;
11
+ useCORS: boolean;
12
+ allowTaint: boolean;
13
+ proxy?: string;
14
+ customIsSameOrigin?: (this: void, src: string, oldFn: (src: string) => boolean) => boolean | Promise<boolean>;
15
+ }
16
+ export declare class Cache {
17
+ private readonly context;
18
+ private readonly _options;
19
+ private readonly _cache;
20
+ constructor(context: Context, _options: ResourceOptions);
21
+ addImage(src: string): Promise<void>;
22
+ match(src: string): Promise<any>;
23
+ private loadImage;
24
+ private has;
25
+ keys(): Promise<string[]>;
26
+ private proxy;
27
+ }
@@ -0,0 +1,17 @@
1
+ import { Logger } from "./logger";
2
+ import { Cache, ResourceOptions } from "./cache-storage";
3
+ import { Bounds } from "../css/layout/bounds";
4
+ import { SkiaFontCollection } from "../fonts/font-collection";
5
+ export type ContextOptions = {
6
+ logging: boolean;
7
+ cache?: Cache;
8
+ } & ResourceOptions;
9
+ export declare class Context {
10
+ windowBounds: Bounds;
11
+ readonly fontCollection?: SkiaFontCollection | undefined;
12
+ private readonly instanceName;
13
+ readonly logger: Logger;
14
+ readonly cache: Cache;
15
+ private static instanceCount;
16
+ constructor(options: ContextOptions, windowBounds: Bounds, fontCollection?: SkiaFontCollection | undefined);
17
+ }
@@ -0,0 +1,8 @@
1
+ export declare const enum DebuggerType {
2
+ NONE = 0,
3
+ ALL = 1,
4
+ CLONE = 2,
5
+ PARSE = 3,
6
+ RENDER = 4
7
+ }
8
+ export declare const isDebugging: (element: Element, type: Omit<DebuggerType, DebuggerType.NONE>) => boolean;
@@ -0,0 +1,12 @@
1
+ export declare const createForeignObjectSVG: (width: number, height: number, x: number, y: number, node: Node) => SVGForeignObjectElement;
2
+ export declare const loadSerializedSVG: (svg: Node) => Promise<HTMLImageElement>;
3
+ export declare const FEATURES: {
4
+ readonly SUPPORT_RANGE_BOUNDS: boolean;
5
+ readonly SUPPORT_WORD_BREAKING: boolean;
6
+ readonly SUPPORT_SVG_DRAWING: boolean;
7
+ readonly SUPPORT_FOREIGNOBJECT_DRAWING: Promise<boolean>;
8
+ readonly SUPPORT_CORS_IMAGES: boolean;
9
+ readonly SUPPORT_RESPONSE_TYPE: boolean;
10
+ readonly SUPPORT_CORS_XHR: boolean;
11
+ readonly SUPPORT_NATIVE_TEXT_SEGMENTATION: boolean;
12
+ };
@@ -0,0 +1,18 @@
1
+ export interface LoggerOptions {
2
+ id: string;
3
+ enabled: boolean;
4
+ }
5
+ export declare class Logger {
6
+ static instances: {
7
+ [key: string]: Logger;
8
+ };
9
+ private readonly id;
10
+ private readonly enabled;
11
+ private readonly start;
12
+ constructor({ id, enabled }: LoggerOptions);
13
+ debug(...args: unknown[]): void;
14
+ getTime(): number;
15
+ info(...args: unknown[]): void;
16
+ warn(...args: unknown[]): void;
17
+ error(...args: unknown[]): void;
18
+ }
@@ -0,0 +1 @@
1
+ export declare const SMALL_IMAGE = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
@@ -0,0 +1,36 @@
1
+ import { CSSValue } from "./syntax/parser";
2
+ import { CSSTypes } from "./types";
3
+ import { Context } from "../core/context";
4
+ export declare const enum PropertyDescriptorParsingType {
5
+ VALUE = 0,
6
+ LIST = 1,
7
+ IDENT_VALUE = 2,
8
+ TYPE_VALUE = 3,
9
+ TOKEN_VALUE = 4
10
+ }
11
+ export interface IPropertyDescriptor {
12
+ name: string;
13
+ type: PropertyDescriptorParsingType;
14
+ initialValue: string;
15
+ prefix: boolean;
16
+ }
17
+ export interface IPropertyIdentValueDescriptor<T> extends IPropertyDescriptor {
18
+ type: PropertyDescriptorParsingType.IDENT_VALUE;
19
+ parse: (context: Context, token: string) => T;
20
+ }
21
+ export interface IPropertyTypeValueDescriptor extends IPropertyDescriptor {
22
+ type: PropertyDescriptorParsingType.TYPE_VALUE;
23
+ format: CSSTypes;
24
+ }
25
+ export interface IPropertyValueDescriptor<T> extends IPropertyDescriptor {
26
+ type: PropertyDescriptorParsingType.VALUE;
27
+ parse: (context: Context, token: CSSValue) => T;
28
+ }
29
+ export interface IPropertyListDescriptor<T> extends IPropertyDescriptor {
30
+ type: PropertyDescriptorParsingType.LIST;
31
+ parse: (context: Context, tokens: CSSValue[]) => T;
32
+ }
33
+ export interface IPropertyTokenValueDescriptor extends IPropertyDescriptor {
34
+ type: PropertyDescriptorParsingType.TOKEN_VALUE;
35
+ }
36
+ export type CSSPropertyDescriptor<T> = IPropertyValueDescriptor<T> | IPropertyListDescriptor<T> | IPropertyIdentValueDescriptor<T> | IPropertyTypeValueDescriptor | IPropertyTokenValueDescriptor;
@@ -0,0 +1,6 @@
1
+ import { CSSValue } from "./syntax/parser";
2
+ import { Context } from "../core/context";
3
+ export interface ITypeDescriptor<T> {
4
+ name: string;
5
+ parse: (context: Context, value: CSSValue) => T;
6
+ }
@@ -0,0 +1,134 @@
1
+ import { backgroundClip } from "./property-descriptors/background-clip";
2
+ import { backgroundImage } from "./property-descriptors/background-image";
3
+ import { backgroundOrigin } from "./property-descriptors/background-origin";
4
+ import { backgroundPosition } from "./property-descriptors/background-position";
5
+ import { backgroundRepeat } from "./property-descriptors/background-repeat";
6
+ import { backgroundSize } from "./property-descriptors/background-size";
7
+ import { borderBottomLeftRadius, borderBottomRightRadius, borderTopLeftRadius, borderTopRightRadius } from "./property-descriptors/border-radius";
8
+ import { borderBottomStyle, borderLeftStyle, borderRightStyle, borderTopStyle } from "./property-descriptors/border-style";
9
+ import { borderBottomWidth, borderLeftWidth, borderRightWidth, borderTopWidth } from "./property-descriptors/border-width";
10
+ import { direction } from "./property-descriptors/direction";
11
+ import { display } from "./property-descriptors/display";
12
+ import { float } from "./property-descriptors/float";
13
+ import { letterSpacing } from "./property-descriptors/letter-spacing";
14
+ import { lineBreak } from "./property-descriptors/line-break";
15
+ import { listStyleImage } from "./property-descriptors/list-style-image";
16
+ import { listStylePosition } from "./property-descriptors/list-style-position";
17
+ import { listStyleType } from "./property-descriptors/list-style-type";
18
+ import { OVERFLOW } from "./property-descriptors/overflow";
19
+ import { overflowWrap } from "./property-descriptors/overflow-wrap";
20
+ import { textAlign } from "./property-descriptors/text-align";
21
+ import { position } from "./property-descriptors/position";
22
+ import { textShadow } from "./property-descriptors/text-shadow";
23
+ import { textTransform } from "./property-descriptors/text-transform";
24
+ import { transform } from "./property-descriptors/transform";
25
+ import { transformOrigin } from "./property-descriptors/transform-origin";
26
+ import { visibility } from "./property-descriptors/visibility";
27
+ import { wordBreak } from "./property-descriptors/word-break";
28
+ import { zIndex } from "./property-descriptors/z-index";
29
+ import { CSSValue } from "./syntax/parser";
30
+ import { Color } from "./types/color";
31
+ import { opacity } from "./property-descriptors/opacity";
32
+ import { textDecorationLine } from "./property-descriptors/text-decoration-line";
33
+ import { LengthPercentage } from "./types/length-percentage";
34
+ import { fontFamily } from "./property-descriptors/font-family";
35
+ import { fontWeight } from "./property-descriptors/font-weight";
36
+ import { fontVariant } from "./property-descriptors/font-variant";
37
+ import { fontStyle } from "./property-descriptors/font-style";
38
+ import { content } from "./property-descriptors/content";
39
+ import { counterIncrement } from "./property-descriptors/counter-increment";
40
+ import { counterReset } from "./property-descriptors/counter-reset";
41
+ import { duration } from "./property-descriptors/duration";
42
+ import { quotes } from "./property-descriptors/quotes";
43
+ import { boxShadow } from "./property-descriptors/box-shadow";
44
+ import { paintOrder } from "./property-descriptors/paint-order";
45
+ import { webkitTextStrokeWidth } from "./property-descriptors/webkit-text-stroke-width";
46
+ import { Context } from "../core/context";
47
+ import { objectFit } from "./property-descriptors/object-fit";
48
+ export declare class CSSParsedDeclaration {
49
+ animationDuration: ReturnType<typeof duration.parse>;
50
+ backgroundClip: ReturnType<typeof backgroundClip.parse>;
51
+ backgroundColor: Color;
52
+ backgroundImage: ReturnType<typeof backgroundImage.parse>;
53
+ backgroundOrigin: ReturnType<typeof backgroundOrigin.parse>;
54
+ backgroundPosition: ReturnType<typeof backgroundPosition.parse>;
55
+ backgroundRepeat: ReturnType<typeof backgroundRepeat.parse>;
56
+ backgroundSize: ReturnType<typeof backgroundSize.parse>;
57
+ borderTopColor: Color;
58
+ borderRightColor: Color;
59
+ borderBottomColor: Color;
60
+ borderLeftColor: Color;
61
+ borderTopLeftRadius: ReturnType<typeof borderTopLeftRadius.parse>;
62
+ borderTopRightRadius: ReturnType<typeof borderTopRightRadius.parse>;
63
+ borderBottomRightRadius: ReturnType<typeof borderBottomRightRadius.parse>;
64
+ borderBottomLeftRadius: ReturnType<typeof borderBottomLeftRadius.parse>;
65
+ borderTopStyle: ReturnType<typeof borderTopStyle.parse>;
66
+ borderRightStyle: ReturnType<typeof borderRightStyle.parse>;
67
+ borderBottomStyle: ReturnType<typeof borderBottomStyle.parse>;
68
+ borderLeftStyle: ReturnType<typeof borderLeftStyle.parse>;
69
+ borderTopWidth: ReturnType<typeof borderTopWidth.parse>;
70
+ borderRightWidth: ReturnType<typeof borderRightWidth.parse>;
71
+ borderBottomWidth: ReturnType<typeof borderBottomWidth.parse>;
72
+ borderLeftWidth: ReturnType<typeof borderLeftWidth.parse>;
73
+ boxShadow: ReturnType<typeof boxShadow.parse>;
74
+ color: Color;
75
+ direction: ReturnType<typeof direction.parse>;
76
+ display: ReturnType<typeof display.parse>;
77
+ float: ReturnType<typeof float.parse>;
78
+ fontFamily: ReturnType<typeof fontFamily.parse>;
79
+ fontSize: LengthPercentage;
80
+ fontStyle: ReturnType<typeof fontStyle.parse>;
81
+ fontVariant: ReturnType<typeof fontVariant.parse>;
82
+ fontWeight: ReturnType<typeof fontWeight.parse>;
83
+ letterSpacing: ReturnType<typeof letterSpacing.parse>;
84
+ lineBreak: ReturnType<typeof lineBreak.parse>;
85
+ lineHeight: CSSValue;
86
+ listStyleImage: ReturnType<typeof listStyleImage.parse>;
87
+ listStylePosition: ReturnType<typeof listStylePosition.parse>;
88
+ listStyleType: ReturnType<typeof listStyleType.parse>;
89
+ marginTop: CSSValue;
90
+ marginRight: CSSValue;
91
+ marginBottom: CSSValue;
92
+ marginLeft: CSSValue;
93
+ opacity: ReturnType<typeof opacity.parse>;
94
+ overflowX: OVERFLOW;
95
+ overflowY: OVERFLOW;
96
+ overflowWrap: ReturnType<typeof overflowWrap.parse>;
97
+ paddingTop: LengthPercentage;
98
+ paddingRight: LengthPercentage;
99
+ paddingBottom: LengthPercentage;
100
+ paddingLeft: LengthPercentage;
101
+ paintOrder: ReturnType<typeof paintOrder.parse>;
102
+ position: ReturnType<typeof position.parse>;
103
+ textAlign: ReturnType<typeof textAlign.parse>;
104
+ textDecorationColor: Color;
105
+ textDecorationLine: ReturnType<typeof textDecorationLine.parse>;
106
+ textShadow: ReturnType<typeof textShadow.parse>;
107
+ textTransform: ReturnType<typeof textTransform.parse>;
108
+ transform: ReturnType<typeof transform.parse>;
109
+ transformOrigin: ReturnType<typeof transformOrigin.parse>;
110
+ visibility: ReturnType<typeof visibility.parse>;
111
+ webkitTextStrokeColor: Color;
112
+ webkitTextStrokeWidth: ReturnType<typeof webkitTextStrokeWidth.parse>;
113
+ wordBreak: ReturnType<typeof wordBreak.parse>;
114
+ zIndex: ReturnType<typeof zIndex.parse>;
115
+ objectFit: ReturnType<typeof objectFit.parse>;
116
+ constructor(context: Context, declaration: CSSStyleDeclaration);
117
+ isVisible(): boolean;
118
+ isTransparent(): boolean;
119
+ isTransformed(): boolean;
120
+ isPositioned(): boolean;
121
+ isPositionedWithZIndex(): boolean;
122
+ isFloating(): boolean;
123
+ isInlineLevel(): boolean;
124
+ }
125
+ export declare class CSSParsedPseudoDeclaration {
126
+ content: ReturnType<typeof content.parse>;
127
+ quotes: ReturnType<typeof quotes.parse>;
128
+ constructor(context: Context, declaration: CSSStyleDeclaration);
129
+ }
130
+ export declare class CSSParsedCounterDeclaration {
131
+ counterIncrement: ReturnType<typeof counterIncrement.parse>;
132
+ counterReset: ReturnType<typeof counterReset.parse>;
133
+ constructor(context: Context, declaration: CSSStyleDeclaration);
134
+ }
@@ -0,0 +1,14 @@
1
+ import { Context } from "../../core/context";
2
+ export declare class Bounds {
3
+ readonly left: number;
4
+ readonly top: number;
5
+ readonly width: number;
6
+ readonly height: number;
7
+ constructor(left: number, top: number, width: number, height: number);
8
+ add(x: number, y: number, w: number, h: number): Bounds;
9
+ static fromClientRect(context: Context, clientRect: ClientRect): Bounds;
10
+ static fromDOMRectList(context: Context, domRectList: DOMRectList): Bounds;
11
+ static EMPTY: Bounds;
12
+ }
13
+ export declare const parseBounds: (context: Context, node: Element) => Bounds;
14
+ export declare const parseDocumentSize: (document: Document) => Bounds;
@@ -0,0 +1,13 @@
1
+ import { CSSParsedDeclaration } from "../index";
2
+ import { Bounds } from "./bounds";
3
+ import { Context } from "../../core/context";
4
+ import { Font } from "@html2pdf-skia/canvaskit-pdf";
5
+ export declare class TextBounds {
6
+ readonly text: string;
7
+ readonly bounds: Bounds;
8
+ readonly font?: Font;
9
+ constructor(text: string, bounds: Bounds, font?: Font);
10
+ }
11
+ export declare const parseTextBounds: (context: Context, value: string, styles: CSSParsedDeclaration, node: Text) => TextBounds[];
12
+ export declare const segmentGraphemes: (value: string) => string[];
13
+ export declare const combineLines: (textBounds: TextBounds[]) => TextBounds[];
@@ -0,0 +1,8 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum BACKGROUND_CLIP {
3
+ BORDER_BOX = 0,
4
+ PADDING_BOX = 1,
5
+ CONTENT_BOX = 2
6
+ }
7
+ export type BackgroundClip = BACKGROUND_CLIP[];
8
+ export declare const backgroundClip: IPropertyListDescriptor<BackgroundClip>;
@@ -0,0 +1,2 @@
1
+ import { IPropertyTypeValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const backgroundColor: IPropertyTypeValueDescriptor;
@@ -0,0 +1,3 @@
1
+ import { ICSSImage } from "../types/image";
2
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
3
+ export declare const backgroundImage: IPropertyListDescriptor<ICSSImage[]>;
@@ -0,0 +1,8 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum BACKGROUND_ORIGIN {
3
+ BORDER_BOX = 0,
4
+ PADDING_BOX = 1,
5
+ CONTENT_BOX = 2
6
+ }
7
+ export type BackgroundOrigin = BACKGROUND_ORIGIN[];
8
+ export declare const backgroundOrigin: IPropertyListDescriptor<BackgroundOrigin>;
@@ -0,0 +1,5 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ import { LengthPercentageTuple } from "../types/length-percentage";
3
+ export type BackgroundPosition = BackgroundImagePosition[];
4
+ export type BackgroundImagePosition = LengthPercentageTuple;
5
+ export declare const backgroundPosition: IPropertyListDescriptor<BackgroundPosition>;
@@ -0,0 +1,9 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export type BackgroundRepeat = BACKGROUND_REPEAT[];
3
+ export declare const enum BACKGROUND_REPEAT {
4
+ REPEAT = 0,
5
+ NO_REPEAT = 1,
6
+ REPEAT_X = 2,
7
+ REPEAT_Y = 3
8
+ }
9
+ export declare const backgroundRepeat: IPropertyListDescriptor<BackgroundRepeat>;
@@ -0,0 +1,11 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ import { LengthPercentage } from "../types/length-percentage";
3
+ import { StringValueToken } from "../syntax/tokenizer";
4
+ export declare enum BACKGROUND_SIZE {
5
+ AUTO = "auto",
6
+ CONTAIN = "contain",
7
+ COVER = "cover"
8
+ }
9
+ export type BackgroundSizeInfo = LengthPercentage | StringValueToken;
10
+ export type BackgroundSize = BackgroundSizeInfo[][];
11
+ export declare const backgroundSize: IPropertyListDescriptor<BackgroundSize>;
@@ -0,0 +1,5 @@
1
+ import { IPropertyTypeValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const borderTopColor: IPropertyTypeValueDescriptor;
3
+ export declare const borderRightColor: IPropertyTypeValueDescriptor;
4
+ export declare const borderBottomColor: IPropertyTypeValueDescriptor;
5
+ export declare const borderLeftColor: IPropertyTypeValueDescriptor;
@@ -0,0 +1,7 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ import { LengthPercentageTuple } from "../types/length-percentage";
3
+ export type BorderRadius = LengthPercentageTuple;
4
+ export declare const borderTopLeftRadius: IPropertyListDescriptor<BorderRadius>;
5
+ export declare const borderTopRightRadius: IPropertyListDescriptor<BorderRadius>;
6
+ export declare const borderBottomRightRadius: IPropertyListDescriptor<BorderRadius>;
7
+ export declare const borderBottomLeftRadius: IPropertyListDescriptor<BorderRadius>;
@@ -0,0 +1,12 @@
1
+ import { IPropertyIdentValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum BORDER_STYLE {
3
+ NONE = 0,
4
+ SOLID = 1,
5
+ DASHED = 2,
6
+ DOTTED = 3,
7
+ DOUBLE = 4
8
+ }
9
+ export declare const borderTopStyle: IPropertyIdentValueDescriptor<BORDER_STYLE>;
10
+ export declare const borderRightStyle: IPropertyIdentValueDescriptor<BORDER_STYLE>;
11
+ export declare const borderBottomStyle: IPropertyIdentValueDescriptor<BORDER_STYLE>;
12
+ export declare const borderLeftStyle: IPropertyIdentValueDescriptor<BORDER_STYLE>;
@@ -0,0 +1,5 @@
1
+ import { IPropertyValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const borderTopWidth: IPropertyValueDescriptor<number>;
3
+ export declare const borderRightWidth: IPropertyValueDescriptor<number>;
4
+ export declare const borderBottomWidth: IPropertyValueDescriptor<number>;
5
+ export declare const borderLeftWidth: IPropertyValueDescriptor<number>;
@@ -0,0 +1,14 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ import { Color } from "../types/color";
3
+ import { Length } from "../types/length";
4
+ export type BoxShadow = BoxShadowItem[];
5
+ interface BoxShadowItem {
6
+ inset: boolean;
7
+ color: Color;
8
+ offsetX: Length;
9
+ offsetY: Length;
10
+ blur: Length;
11
+ spread: Length;
12
+ }
13
+ export declare const boxShadow: IPropertyListDescriptor<BoxShadow>;
14
+ export {};
@@ -0,0 +1,2 @@
1
+ import { IPropertyTypeValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const color: IPropertyTypeValueDescriptor;
@@ -0,0 +1,4 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ import { CSSValue } from "../syntax/parser";
3
+ export type Content = CSSValue[];
4
+ export declare const content: IPropertyListDescriptor<Content>;
@@ -0,0 +1,7 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export interface COUNTER_INCREMENT {
3
+ counter: string;
4
+ increment: number;
5
+ }
6
+ export type CounterIncrement = COUNTER_INCREMENT[] | null;
7
+ export declare const counterIncrement: IPropertyListDescriptor<CounterIncrement>;
@@ -0,0 +1,7 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export interface COUNTER_RESET {
3
+ counter: string;
4
+ reset: number;
5
+ }
6
+ export type CounterReset = COUNTER_RESET[];
7
+ export declare const counterReset: IPropertyListDescriptor<CounterReset>;
@@ -0,0 +1,6 @@
1
+ import { IPropertyIdentValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum DIRECTION {
3
+ LTR = 0,
4
+ RTL = 1
5
+ }
6
+ export declare const direction: IPropertyIdentValueDescriptor<DIRECTION>;
@@ -0,0 +1,35 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum DISPLAY {
3
+ NONE = 0,
4
+ BLOCK = 2,
5
+ INLINE = 4,
6
+ RUN_IN = 8,
7
+ FLOW = 16,
8
+ FLOW_ROOT = 32,
9
+ TABLE = 64,
10
+ FLEX = 128,
11
+ GRID = 256,
12
+ RUBY = 512,
13
+ SUBGRID = 1024,
14
+ LIST_ITEM = 2048,
15
+ TABLE_ROW_GROUP = 4096,
16
+ TABLE_HEADER_GROUP = 8192,
17
+ TABLE_FOOTER_GROUP = 16384,
18
+ TABLE_ROW = 32768,
19
+ TABLE_CELL = 65536,
20
+ TABLE_COLUMN_GROUP = 131072,
21
+ TABLE_COLUMN = 262144,
22
+ TABLE_CAPTION = 524288,
23
+ RUBY_BASE = 1048576,
24
+ RUBY_TEXT = 2097152,
25
+ RUBY_BASE_CONTAINER = 4194304,
26
+ RUBY_TEXT_CONTAINER = 8388608,
27
+ CONTENTS = 16777216,
28
+ INLINE_BLOCK = 33554432,
29
+ INLINE_LIST_ITEM = 67108864,
30
+ INLINE_TABLE = 134217728,
31
+ INLINE_FLEX = 268435456,
32
+ INLINE_GRID = 536870912
33
+ }
34
+ export type Display = number;
35
+ export declare const display: IPropertyListDescriptor<Display>;
@@ -0,0 +1,2 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export declare const duration: IPropertyListDescriptor<number[]>;
@@ -0,0 +1,9 @@
1
+ import { IPropertyIdentValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum FLOAT {
3
+ NONE = 0,
4
+ LEFT = 1,
5
+ RIGHT = 2,
6
+ INLINE_START = 3,
7
+ INLINE_END = 4
8
+ }
9
+ export declare const float: IPropertyIdentValueDescriptor<FLOAT>;
@@ -0,0 +1,4 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export type FONT_FAMILY = string;
3
+ export type FontFamily = FONT_FAMILY[];
4
+ export declare const fontFamily: IPropertyListDescriptor<FontFamily>;
@@ -0,0 +1,2 @@
1
+ import { IPropertyTypeValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const fontSize: IPropertyTypeValueDescriptor;
@@ -0,0 +1,7 @@
1
+ import { IPropertyIdentValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum FONT_STYLE {
3
+ NORMAL = "normal",
4
+ ITALIC = "italic",
5
+ OBLIQUE = "oblique"
6
+ }
7
+ export declare const fontStyle: IPropertyIdentValueDescriptor<FONT_STYLE>;
@@ -0,0 +1,2 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export declare const fontVariant: IPropertyListDescriptor<string[]>;
@@ -0,0 +1,2 @@
1
+ import { IPropertyValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const fontWeight: IPropertyValueDescriptor<number>;
@@ -0,0 +1,2 @@
1
+ import { IPropertyValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const letterSpacing: IPropertyValueDescriptor<number>;
@@ -0,0 +1,6 @@
1
+ import { IPropertyIdentValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare enum LINE_BREAK {
3
+ NORMAL = "normal",
4
+ STRICT = "strict"
5
+ }
6
+ export declare const lineBreak: IPropertyIdentValueDescriptor<LINE_BREAK>;
@@ -0,0 +1,4 @@
1
+ import { IPropertyTokenValueDescriptor } from "../IPropertyDescriptor";
2
+ import { CSSValue } from "../syntax/parser";
3
+ export declare const lineHeight: IPropertyTokenValueDescriptor;
4
+ export declare const computeLineHeight: (token: CSSValue, fontSize: number) => number;
@@ -0,0 +1,3 @@
1
+ import { ICSSImage } from "../types/image";
2
+ import { IPropertyValueDescriptor } from "../IPropertyDescriptor";
3
+ export declare const listStyleImage: IPropertyValueDescriptor<ICSSImage | null>;
@@ -0,0 +1,6 @@
1
+ import { IPropertyIdentValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum LIST_STYLE_POSITION {
3
+ INSIDE = 0,
4
+ OUTSIDE = 1
5
+ }
6
+ export declare const listStylePosition: IPropertyIdentValueDescriptor<LIST_STYLE_POSITION>;
@@ -0,0 +1,58 @@
1
+ import { IPropertyIdentValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum LIST_STYLE_TYPE {
3
+ NONE = -1,
4
+ DISC = 0,
5
+ CIRCLE = 1,
6
+ SQUARE = 2,
7
+ DECIMAL = 3,
8
+ CJK_DECIMAL = 4,
9
+ DECIMAL_LEADING_ZERO = 5,
10
+ LOWER_ROMAN = 6,
11
+ UPPER_ROMAN = 7,
12
+ LOWER_GREEK = 8,
13
+ LOWER_ALPHA = 9,
14
+ UPPER_ALPHA = 10,
15
+ ARABIC_INDIC = 11,
16
+ ARMENIAN = 12,
17
+ BENGALI = 13,
18
+ CAMBODIAN = 14,
19
+ CJK_EARTHLY_BRANCH = 15,
20
+ CJK_HEAVENLY_STEM = 16,
21
+ CJK_IDEOGRAPHIC = 17,
22
+ DEVANAGARI = 18,
23
+ ETHIOPIC_NUMERIC = 19,
24
+ GEORGIAN = 20,
25
+ GUJARATI = 21,
26
+ GURMUKHI = 22,
27
+ HIRAGANA = 23,
28
+ HIRAGANA_IROHA = 24,
29
+ JAPANESE_FORMAL = 25,
30
+ JAPANESE_INFORMAL = 26,
31
+ KANNADA = 27,
32
+ KATAKANA = 28,
33
+ KATAKANA_IROHA = 29,
34
+ KHMER = 30,
35
+ KOREAN_HANGUL_FORMAL = 31,
36
+ KOREAN_HANJA_FORMAL = 32,
37
+ KOREAN_HANJA_INFORMAL = 33,
38
+ LAO = 34,
39
+ LOWER_ARMENIAN = 35,
40
+ MALAYALAM = 36,
41
+ MONGOLIAN = 37,
42
+ MYANMAR = 38,
43
+ ORIYA = 39,
44
+ PERSIAN = 40,
45
+ SIMP_CHINESE_FORMAL = 41,
46
+ SIMP_CHINESE_INFORMAL = 42,
47
+ TAMIL = 43,
48
+ TELUGU = 44,
49
+ THAI = 45,
50
+ TIBETAN = 46,
51
+ TRAD_CHINESE_FORMAL = 47,
52
+ TRAD_CHINESE_INFORMAL = 48,
53
+ UPPER_ARMENIAN = 49,
54
+ DISCLOSURE_OPEN = 50,
55
+ DISCLOSURE_CLOSED = 51,
56
+ HEBREW = 52
57
+ }
58
+ export declare const listStyleType: IPropertyIdentValueDescriptor<LIST_STYLE_TYPE>;
@@ -0,0 +1,5 @@
1
+ import { IPropertyTokenValueDescriptor } from "../IPropertyDescriptor";
2
+ export declare const marginTop: IPropertyTokenValueDescriptor;
3
+ export declare const marginRight: IPropertyTokenValueDescriptor;
4
+ export declare const marginBottom: IPropertyTokenValueDescriptor;
5
+ export declare const marginLeft: IPropertyTokenValueDescriptor;
@@ -0,0 +1,10 @@
1
+ import { IPropertyListDescriptor } from "../IPropertyDescriptor";
2
+ export declare const enum OBJECT_FIT {
3
+ FILL = 0,
4
+ CONTAIN = 2,
5
+ COVER = 4,
6
+ NONE = 8,
7
+ SCALE_DOWN = 16
8
+ }
9
+ export type ObjectFit = number;
10
+ export declare const objectFit: IPropertyListDescriptor<ObjectFit>;