dompdf.js 1.0.0

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 (141) hide show
  1. package/CHANGELOG.md +566 -0
  2. package/LICENSE +22 -0
  3. package/README.md +155 -0
  4. package/README_CN.md +305 -0
  5. package/dist/__tests__/index.d.ts +1 -0
  6. package/dist/core/__mocks__/cache-storage.d.ts +2 -0
  7. package/dist/core/__mocks__/context.d.ts +9 -0
  8. package/dist/core/__mocks__/features.d.ts +8 -0
  9. package/dist/core/__mocks__/logger.d.ts +9 -0
  10. package/dist/core/__tests__/cache-storage.d.ts +1 -0
  11. package/dist/core/__tests__/logger.d.ts +1 -0
  12. package/dist/core/bitwise.d.ts +1 -0
  13. package/dist/core/cache-storage.d.ts +26 -0
  14. package/dist/core/context.d.ts +15 -0
  15. package/dist/core/debugger.d.ts +8 -0
  16. package/dist/core/features.d.ts +12 -0
  17. package/dist/core/logger.d.ts +18 -0
  18. package/dist/core/util.d.ts +1 -0
  19. package/dist/css/IPropertyDescriptor.d.ts +36 -0
  20. package/dist/css/ITypeDescriptor.d.ts +6 -0
  21. package/dist/css/index.d.ts +132 -0
  22. package/dist/css/layout/__mocks__/bounds.d.ts +2 -0
  23. package/dist/css/layout/bounds.d.ts +14 -0
  24. package/dist/css/layout/text.d.ts +10 -0
  25. package/dist/css/property-descriptors/__tests__/background-tests.d.ts +1 -0
  26. package/dist/css/property-descriptors/__tests__/font-family.d.ts +1 -0
  27. package/dist/css/property-descriptors/__tests__/paint-order.d.ts +1 -0
  28. package/dist/css/property-descriptors/__tests__/text-shadow.d.ts +1 -0
  29. package/dist/css/property-descriptors/__tests__/transform-tests.d.ts +1 -0
  30. package/dist/css/property-descriptors/background-clip.d.ts +8 -0
  31. package/dist/css/property-descriptors/background-color.d.ts +2 -0
  32. package/dist/css/property-descriptors/background-image.d.ts +3 -0
  33. package/dist/css/property-descriptors/background-origin.d.ts +8 -0
  34. package/dist/css/property-descriptors/background-position.d.ts +5 -0
  35. package/dist/css/property-descriptors/background-repeat.d.ts +9 -0
  36. package/dist/css/property-descriptors/background-size.d.ts +11 -0
  37. package/dist/css/property-descriptors/border-color.d.ts +5 -0
  38. package/dist/css/property-descriptors/border-radius.d.ts +7 -0
  39. package/dist/css/property-descriptors/border-style.d.ts +12 -0
  40. package/dist/css/property-descriptors/border-width.d.ts +5 -0
  41. package/dist/css/property-descriptors/box-shadow.d.ts +14 -0
  42. package/dist/css/property-descriptors/color.d.ts +2 -0
  43. package/dist/css/property-descriptors/content.d.ts +4 -0
  44. package/dist/css/property-descriptors/counter-increment.d.ts +7 -0
  45. package/dist/css/property-descriptors/counter-reset.d.ts +7 -0
  46. package/dist/css/property-descriptors/direction.d.ts +6 -0
  47. package/dist/css/property-descriptors/display.d.ts +35 -0
  48. package/dist/css/property-descriptors/duration.d.ts +2 -0
  49. package/dist/css/property-descriptors/float.d.ts +9 -0
  50. package/dist/css/property-descriptors/font-family.d.ts +4 -0
  51. package/dist/css/property-descriptors/font-size.d.ts +2 -0
  52. package/dist/css/property-descriptors/font-style.d.ts +7 -0
  53. package/dist/css/property-descriptors/font-variant.d.ts +2 -0
  54. package/dist/css/property-descriptors/font-weight.d.ts +2 -0
  55. package/dist/css/property-descriptors/letter-spacing.d.ts +2 -0
  56. package/dist/css/property-descriptors/line-break.d.ts +6 -0
  57. package/dist/css/property-descriptors/line-height.d.ts +4 -0
  58. package/dist/css/property-descriptors/list-style-image.d.ts +3 -0
  59. package/dist/css/property-descriptors/list-style-position.d.ts +6 -0
  60. package/dist/css/property-descriptors/list-style-type.d.ts +58 -0
  61. package/dist/css/property-descriptors/margin.d.ts +5 -0
  62. package/dist/css/property-descriptors/opacity.d.ts +2 -0
  63. package/dist/css/property-descriptors/overflow-wrap.d.ts +6 -0
  64. package/dist/css/property-descriptors/overflow.d.ts +9 -0
  65. package/dist/css/property-descriptors/padding.d.ts +5 -0
  66. package/dist/css/property-descriptors/paint-order.d.ts +8 -0
  67. package/dist/css/property-descriptors/position.d.ts +9 -0
  68. package/dist/css/property-descriptors/quotes.d.ts +8 -0
  69. package/dist/css/property-descriptors/text-align.d.ts +7 -0
  70. package/dist/css/property-descriptors/text-decoration-color.d.ts +2 -0
  71. package/dist/css/property-descriptors/text-decoration-line.d.ts +10 -0
  72. package/dist/css/property-descriptors/text-shadow.d.ts +12 -0
  73. package/dist/css/property-descriptors/text-transform.d.ts +8 -0
  74. package/dist/css/property-descriptors/transform-origin.d.ts +4 -0
  75. package/dist/css/property-descriptors/transform.d.ts +4 -0
  76. package/dist/css/property-descriptors/visibility.d.ts +7 -0
  77. package/dist/css/property-descriptors/webkit-text-stroke-color.d.ts +2 -0
  78. package/dist/css/property-descriptors/webkit-text-stroke-width.d.ts +2 -0
  79. package/dist/css/property-descriptors/word-break.d.ts +7 -0
  80. package/dist/css/property-descriptors/z-index.d.ts +7 -0
  81. package/dist/css/syntax/__tests__/tokernizer-tests.d.ts +1 -0
  82. package/dist/css/syntax/parser.d.ts +34 -0
  83. package/dist/css/syntax/tokenizer.d.ts +94 -0
  84. package/dist/css/types/__tests__/color-tests.d.ts +1 -0
  85. package/dist/css/types/__tests__/image-tests.d.ts +1 -0
  86. package/dist/css/types/angle.d.ts +7 -0
  87. package/dist/css/types/color.d.ts +11 -0
  88. package/dist/css/types/functions/-prefix-linear-gradient.d.ts +4 -0
  89. package/dist/css/types/functions/-prefix-radial-gradient.d.ts +4 -0
  90. package/dist/css/types/functions/-webkit-gradient.d.ts +4 -0
  91. package/dist/css/types/functions/__tests__/radial-gradient.d.ts +1 -0
  92. package/dist/css/types/functions/counter.d.ts +10 -0
  93. package/dist/css/types/functions/gradient.d.ts +7 -0
  94. package/dist/css/types/functions/linear-gradient.d.ts +4 -0
  95. package/dist/css/types/functions/radial-gradient.d.ts +12 -0
  96. package/dist/css/types/image.d.ts +54 -0
  97. package/dist/css/types/index.d.ts +1 -0
  98. package/dist/css/types/length-percentage.d.ts +11 -0
  99. package/dist/css/types/length.d.ts +4 -0
  100. package/dist/css/types/time.d.ts +2 -0
  101. package/dist/dom/__mocks__/document-cloner.d.ts +6 -0
  102. package/dist/dom/document-cloner.d.ts +45 -0
  103. package/dist/dom/element-container.d.ts +21 -0
  104. package/dist/dom/elements/li-element-container.d.ts +6 -0
  105. package/dist/dom/elements/ol-element-container.d.ts +7 -0
  106. package/dist/dom/elements/select-element-container.d.ts +6 -0
  107. package/dist/dom/elements/textarea-element-container.d.ts +6 -0
  108. package/dist/dom/node-parser.d.ts +23 -0
  109. package/dist/dom/replaced-elements/canvas-element-container.d.ts +8 -0
  110. package/dist/dom/replaced-elements/iframe-element-container.d.ts +11 -0
  111. package/dist/dom/replaced-elements/image-element-container.d.ts +8 -0
  112. package/dist/dom/replaced-elements/index.d.ts +4 -0
  113. package/dist/dom/replaced-elements/input-element-container.d.ts +12 -0
  114. package/dist/dom/replaced-elements/svg-element-container.d.ts +8 -0
  115. package/dist/dom/text-container.d.ts +8 -0
  116. package/dist/dompdf.esm.js +33182 -0
  117. package/dist/dompdf.esm.js.map +1 -0
  118. package/dist/dompdf.js +33190 -0
  119. package/dist/dompdf.js.map +1 -0
  120. package/dist/index.d.ts +18 -0
  121. package/dist/invariant.d.ts +1 -0
  122. package/dist/render/background.d.ts +16 -0
  123. package/dist/render/bezier-curve.d.ts +14 -0
  124. package/dist/render/border.d.ts +6 -0
  125. package/dist/render/bound-curves.d.ts +32 -0
  126. package/dist/render/box-sizing.d.ts +4 -0
  127. package/dist/render/canvas/canvas-renderer2.d.ts +81 -0
  128. package/dist/render/canvas/foreignobject-renderer.d.ts +11 -0
  129. package/dist/render/canvas/pdf-renderer.d.ts +82 -0
  130. package/dist/render/effects.d.ts +38 -0
  131. package/dist/render/font-metrics.d.ts +11 -0
  132. package/dist/render/path.d.ts +13 -0
  133. package/dist/render/renderer.d.ts +7 -0
  134. package/dist/render/stacking-context.d.ts +24 -0
  135. package/dist/render/vector.d.ts +9 -0
  136. package/html2pdf-userscript.js +936 -0
  137. package/package.json +134 -0
  138. package/tsconfig.json +23 -0
  139. package/userscript.js +372 -0
  140. package/webpack.base.js +31 -0
  141. package/webpack.dev.js +21 -0
@@ -0,0 +1,132 @@
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
+ export declare class CSSParsedDeclaration {
48
+ animationDuration: ReturnType<typeof duration.parse>;
49
+ backgroundClip: ReturnType<typeof backgroundClip.parse>;
50
+ backgroundColor: Color;
51
+ backgroundImage: ReturnType<typeof backgroundImage.parse>;
52
+ backgroundOrigin: ReturnType<typeof backgroundOrigin.parse>;
53
+ backgroundPosition: ReturnType<typeof backgroundPosition.parse>;
54
+ backgroundRepeat: ReturnType<typeof backgroundRepeat.parse>;
55
+ backgroundSize: ReturnType<typeof backgroundSize.parse>;
56
+ borderTopColor: Color;
57
+ borderRightColor: Color;
58
+ borderBottomColor: Color;
59
+ borderLeftColor: Color;
60
+ borderTopLeftRadius: ReturnType<typeof borderTopLeftRadius.parse>;
61
+ borderTopRightRadius: ReturnType<typeof borderTopRightRadius.parse>;
62
+ borderBottomRightRadius: ReturnType<typeof borderBottomRightRadius.parse>;
63
+ borderBottomLeftRadius: ReturnType<typeof borderBottomLeftRadius.parse>;
64
+ borderTopStyle: ReturnType<typeof borderTopStyle.parse>;
65
+ borderRightStyle: ReturnType<typeof borderRightStyle.parse>;
66
+ borderBottomStyle: ReturnType<typeof borderBottomStyle.parse>;
67
+ borderLeftStyle: ReturnType<typeof borderLeftStyle.parse>;
68
+ borderTopWidth: ReturnType<typeof borderTopWidth.parse>;
69
+ borderRightWidth: ReturnType<typeof borderRightWidth.parse>;
70
+ borderBottomWidth: ReturnType<typeof borderBottomWidth.parse>;
71
+ borderLeftWidth: ReturnType<typeof borderLeftWidth.parse>;
72
+ boxShadow: ReturnType<typeof boxShadow.parse>;
73
+ color: Color;
74
+ direction: ReturnType<typeof direction.parse>;
75
+ display: ReturnType<typeof display.parse>;
76
+ float: ReturnType<typeof float.parse>;
77
+ fontFamily: ReturnType<typeof fontFamily.parse>;
78
+ fontSize: LengthPercentage;
79
+ fontStyle: ReturnType<typeof fontStyle.parse>;
80
+ fontVariant: ReturnType<typeof fontVariant.parse>;
81
+ fontWeight: ReturnType<typeof fontWeight.parse>;
82
+ letterSpacing: ReturnType<typeof letterSpacing.parse>;
83
+ lineBreak: ReturnType<typeof lineBreak.parse>;
84
+ lineHeight: CSSValue;
85
+ listStyleImage: ReturnType<typeof listStyleImage.parse>;
86
+ listStylePosition: ReturnType<typeof listStylePosition.parse>;
87
+ listStyleType: ReturnType<typeof listStyleType.parse>;
88
+ marginTop: CSSValue;
89
+ marginRight: CSSValue;
90
+ marginBottom: CSSValue;
91
+ marginLeft: CSSValue;
92
+ opacity: ReturnType<typeof opacity.parse>;
93
+ overflowX: OVERFLOW;
94
+ overflowY: OVERFLOW;
95
+ overflowWrap: ReturnType<typeof overflowWrap.parse>;
96
+ paddingTop: LengthPercentage;
97
+ paddingRight: LengthPercentage;
98
+ paddingBottom: LengthPercentage;
99
+ paddingLeft: LengthPercentage;
100
+ paintOrder: ReturnType<typeof paintOrder.parse>;
101
+ position: ReturnType<typeof position.parse>;
102
+ textAlign: ReturnType<typeof textAlign.parse>;
103
+ textDecorationColor: Color;
104
+ textDecorationLine: ReturnType<typeof textDecorationLine.parse>;
105
+ textShadow: ReturnType<typeof textShadow.parse>;
106
+ textTransform: ReturnType<typeof textTransform.parse>;
107
+ transform: ReturnType<typeof transform.parse>;
108
+ transformOrigin: ReturnType<typeof transformOrigin.parse>;
109
+ visibility: ReturnType<typeof visibility.parse>;
110
+ webkitTextStrokeColor: Color;
111
+ webkitTextStrokeWidth: ReturnType<typeof webkitTextStrokeWidth.parse>;
112
+ wordBreak: ReturnType<typeof wordBreak.parse>;
113
+ zIndex: ReturnType<typeof zIndex.parse>;
114
+ constructor(context: Context, declaration: CSSStyleDeclaration);
115
+ isVisible(): boolean;
116
+ isTransparent(): boolean;
117
+ isTransformed(): boolean;
118
+ isPositioned(): boolean;
119
+ isPositionedWithZIndex(): boolean;
120
+ isFloating(): boolean;
121
+ isInlineLevel(): boolean;
122
+ }
123
+ export declare class CSSParsedPseudoDeclaration {
124
+ content: ReturnType<typeof content.parse>;
125
+ quotes: ReturnType<typeof quotes.parse>;
126
+ constructor(context: Context, declaration: CSSStyleDeclaration);
127
+ }
128
+ export declare class CSSParsedCounterDeclaration {
129
+ counterIncrement: ReturnType<typeof counterIncrement.parse>;
130
+ counterReset: ReturnType<typeof counterReset.parse>;
131
+ constructor(context: Context, declaration: CSSStyleDeclaration);
132
+ }
@@ -0,0 +1,2 @@
1
+ export declare const Bounds: any;
2
+ export declare const parseBounds: () => typeof Bounds;
@@ -0,0 +1,14 @@
1
+ import { Context } from '../../core/context';
2
+ export declare class Bounds {
3
+ left: number;
4
+ top: number;
5
+ width: number;
6
+ 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,10 @@
1
+ import { CSSParsedDeclaration } from '../index';
2
+ import { Bounds } from './bounds';
3
+ import { Context } from '../../core/context';
4
+ export declare class TextBounds {
5
+ readonly text: string;
6
+ readonly bounds: Bounds;
7
+ constructor(text: string, bounds: Bounds);
8
+ }
9
+ export declare const parseTextBounds: (context: Context, value: string, styles: CSSParsedDeclaration, node: Text) => TextBounds[];
10
+ export declare const segmentGraphemes: (value: string) => string[];
@@ -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
+ HEBREW = 22,
28
+ HIRAGANA = 23,
29
+ HIRAGANA_IROHA = 24,
30
+ JAPANESE_FORMAL = 25,
31
+ JAPANESE_INFORMAL = 26,
32
+ KANNADA = 27,
33
+ KATAKANA = 28,
34
+ KATAKANA_IROHA = 29,
35
+ KHMER = 30,
36
+ KOREAN_HANGUL_FORMAL = 31,
37
+ KOREAN_HANJA_FORMAL = 32,
38
+ KOREAN_HANJA_INFORMAL = 33,
39
+ LAO = 34,
40
+ LOWER_ARMENIAN = 35,
41
+ MALAYALAM = 36,
42
+ MONGOLIAN = 37,
43
+ MYANMAR = 38,
44
+ ORIYA = 39,
45
+ PERSIAN = 40,
46
+ SIMP_CHINESE_FORMAL = 41,
47
+ SIMP_CHINESE_INFORMAL = 42,
48
+ TAMIL = 43,
49
+ TELUGU = 44,
50
+ THAI = 45,
51
+ TIBETAN = 46,
52
+ TRAD_CHINESE_FORMAL = 47,
53
+ TRAD_CHINESE_INFORMAL = 48,
54
+ UPPER_ARMENIAN = 49,
55
+ DISCLOSURE_OPEN = 50,
56
+ DISCLOSURE_CLOSED = 51
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,2 @@
1
+ import { IPropertyValueDescriptor } from '../IPropertyDescriptor';
2
+ export declare const opacity: IPropertyValueDescriptor<number>;
@@ -0,0 +1,6 @@
1
+ import { IPropertyIdentValueDescriptor } from '../IPropertyDescriptor';
2
+ export declare const enum OVERFLOW_WRAP {
3
+ NORMAL = "normal",
4
+ BREAK_WORD = "break-word"
5
+ }
6
+ export declare const overflowWrap: IPropertyIdentValueDescriptor<OVERFLOW_WRAP>;
@@ -0,0 +1,9 @@
1
+ import { IPropertyListDescriptor } from '../IPropertyDescriptor';
2
+ export declare const enum OVERFLOW {
3
+ VISIBLE = 0,
4
+ HIDDEN = 1,
5
+ SCROLL = 2,
6
+ CLIP = 3,
7
+ AUTO = 4
8
+ }
9
+ export declare const overflow: IPropertyListDescriptor<OVERFLOW[]>;
@@ -0,0 +1,5 @@
1
+ import { IPropertyTypeValueDescriptor } from '../IPropertyDescriptor';
2
+ export declare const paddingTop: IPropertyTypeValueDescriptor;
3
+ export declare const paddingRight: IPropertyTypeValueDescriptor;
4
+ export declare const paddingBottom: IPropertyTypeValueDescriptor;
5
+ export declare const paddingLeft: IPropertyTypeValueDescriptor;
@@ -0,0 +1,8 @@
1
+ import { IPropertyListDescriptor } from '../IPropertyDescriptor';
2
+ export declare const enum PAINT_ORDER_LAYER {
3
+ FILL = 0,
4
+ STROKE = 1,
5
+ MARKERS = 2
6
+ }
7
+ export type PaintOrder = PAINT_ORDER_LAYER[];
8
+ export declare const paintOrder: IPropertyListDescriptor<PaintOrder>;
@@ -0,0 +1,9 @@
1
+ import { IPropertyIdentValueDescriptor } from '../IPropertyDescriptor';
2
+ export declare const enum POSITION {
3
+ STATIC = 0,
4
+ RELATIVE = 1,
5
+ ABSOLUTE = 2,
6
+ FIXED = 3,
7
+ STICKY = 4
8
+ }
9
+ export declare const position: IPropertyIdentValueDescriptor<POSITION>;
@@ -0,0 +1,8 @@
1
+ import { IPropertyListDescriptor } from '../IPropertyDescriptor';
2
+ export interface QUOTE {
3
+ open: string;
4
+ close: string;
5
+ }
6
+ export type Quotes = QUOTE[] | null;
7
+ export declare const quotes: IPropertyListDescriptor<Quotes>;
8
+ export declare const getQuote: (quotes: Quotes, depth: number, open: boolean) => string;
@@ -0,0 +1,7 @@
1
+ import { IPropertyIdentValueDescriptor } from '../IPropertyDescriptor';
2
+ export declare const enum TEXT_ALIGN {
3
+ LEFT = 0,
4
+ CENTER = 1,
5
+ RIGHT = 2
6
+ }
7
+ export declare const textAlign: IPropertyIdentValueDescriptor<TEXT_ALIGN>;
@@ -0,0 +1,2 @@
1
+ import { IPropertyTypeValueDescriptor } from '../IPropertyDescriptor';
2
+ export declare const textDecorationColor: IPropertyTypeValueDescriptor;
@@ -0,0 +1,10 @@
1
+ import { IPropertyListDescriptor } from '../IPropertyDescriptor';
2
+ export declare const enum TEXT_DECORATION_LINE {
3
+ NONE = 0,
4
+ UNDERLINE = 1,
5
+ OVERLINE = 2,
6
+ LINE_THROUGH = 3,
7
+ BLINK = 4
8
+ }
9
+ export type TextDecorationLine = TEXT_DECORATION_LINE[];
10
+ export declare const textDecorationLine: IPropertyListDescriptor<TextDecorationLine>;
@@ -0,0 +1,12 @@
1
+ import { IPropertyListDescriptor } from '../IPropertyDescriptor';
2
+ import { Color } from '../types/color';
3
+ import { Length } from '../types/length';
4
+ export type TextShadow = TextShadowItem[];
5
+ interface TextShadowItem {
6
+ color: Color;
7
+ offsetX: Length;
8
+ offsetY: Length;
9
+ blur: Length;
10
+ }
11
+ export declare const textShadow: IPropertyListDescriptor<TextShadow>;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import { IPropertyIdentValueDescriptor } from '../IPropertyDescriptor';
2
+ export declare const enum TEXT_TRANSFORM {
3
+ NONE = 0,
4
+ LOWERCASE = 1,
5
+ UPPERCASE = 2,
6
+ CAPITALIZE = 3
7
+ }
8
+ export declare const textTransform: IPropertyIdentValueDescriptor<TEXT_TRANSFORM>;
@@ -0,0 +1,4 @@
1
+ import { IPropertyListDescriptor } from '../IPropertyDescriptor';
2
+ import { LengthPercentage } from '../types/length-percentage';
3
+ export type TransformOrigin = [LengthPercentage, LengthPercentage];
4
+ export declare const transformOrigin: IPropertyListDescriptor<TransformOrigin>;
@@ -0,0 +1,4 @@
1
+ import { IPropertyValueDescriptor } from '../IPropertyDescriptor';
2
+ export type Matrix = [number, number, number, number, number, number];
3
+ export type Transform = Matrix | null;
4
+ export declare const transform: IPropertyValueDescriptor<Transform>;