html2canvas-pro 1.4.3

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 (394) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/dist/html2canvas-pro.esm.js +7943 -0
  4. package/dist/html2canvas-pro.esm.js.map +1 -0
  5. package/dist/html2canvas-pro.js +7951 -0
  6. package/dist/html2canvas-pro.js.map +1 -0
  7. package/dist/html2canvas-pro.min.js +20 -0
  8. package/dist/lib/__tests__/index.js +144 -0
  9. package/dist/lib/__tests__/index.js.map +1 -0
  10. package/dist/lib/core/__mocks__/cache-storage.js +10 -0
  11. package/dist/lib/core/__mocks__/cache-storage.js.map +1 -0
  12. package/dist/lib/core/__mocks__/context.js +22 -0
  13. package/dist/lib/core/__mocks__/context.js.map +1 -0
  14. package/dist/lib/core/__mocks__/features.js +12 -0
  15. package/dist/lib/core/__mocks__/features.js.map +1 -0
  16. package/dist/lib/core/__mocks__/logger.js +24 -0
  17. package/dist/lib/core/__mocks__/logger.js.map +1 -0
  18. package/dist/lib/core/__tests__/cache-storage.js +420 -0
  19. package/dist/lib/core/__tests__/cache-storage.js.map +1 -0
  20. package/dist/lib/core/__tests__/logger.js +28 -0
  21. package/dist/lib/core/__tests__/logger.js.map +1 -0
  22. package/dist/lib/core/bitwise.js +6 -0
  23. package/dist/lib/core/bitwise.js.map +1 -0
  24. package/dist/lib/core/cache-storage.js +198 -0
  25. package/dist/lib/core/cache-storage.js.map +1 -0
  26. package/dist/lib/core/context.js +18 -0
  27. package/dist/lib/core/context.js.map +1 -0
  28. package/dist/lib/core/debugger.js +25 -0
  29. package/dist/lib/core/debugger.js.map +1 -0
  30. package/dist/lib/core/features.js +193 -0
  31. package/dist/lib/core/features.js.map +1 -0
  32. package/dist/lib/core/logger.js +88 -0
  33. package/dist/lib/core/logger.js.map +1 -0
  34. package/dist/lib/core/util.js +5 -0
  35. package/dist/lib/core/util.js.map +1 -0
  36. package/dist/lib/css/IPropertyDescriptor.js +3 -0
  37. package/dist/lib/css/IPropertyDescriptor.js.map +1 -0
  38. package/dist/lib/css/ITypeDescriptor.js +3 -0
  39. package/dist/lib/css/ITypeDescriptor.js.map +1 -0
  40. package/dist/lib/css/index.js +218 -0
  41. package/dist/lib/css/index.js.map +1 -0
  42. package/dist/lib/css/layout/__mocks__/bounds.js +9 -0
  43. package/dist/lib/css/layout/__mocks__/bounds.js.map +1 -0
  44. package/dist/lib/css/layout/bounds.js +42 -0
  45. package/dist/lib/css/layout/bounds.js.map +1 -0
  46. package/dist/lib/css/layout/text.js +137 -0
  47. package/dist/lib/css/layout/text.js.map +1 -0
  48. package/dist/lib/css/property-descriptors/__tests__/background-tests.js +48 -0
  49. package/dist/lib/css/property-descriptors/__tests__/background-tests.js.map +1 -0
  50. package/dist/lib/css/property-descriptors/__tests__/font-family.js +25 -0
  51. package/dist/lib/css/property-descriptors/__tests__/font-family.js.map +1 -0
  52. package/dist/lib/css/property-descriptors/__tests__/paint-order.js +88 -0
  53. package/dist/lib/css/property-descriptors/__tests__/paint-order.js.map +1 -0
  54. package/dist/lib/css/property-descriptors/__tests__/text-shadow.js +94 -0
  55. package/dist/lib/css/property-descriptors/__tests__/text-shadow.js.map +1 -0
  56. package/dist/lib/css/property-descriptors/__tests__/transform-tests.js +18 -0
  57. package/dist/lib/css/property-descriptors/__tests__/transform-tests.js.map +1 -0
  58. package/dist/lib/css/property-descriptors/background-clip.js +24 -0
  59. package/dist/lib/css/property-descriptors/background-clip.js.map +1 -0
  60. package/dist/lib/css/property-descriptors/background-color.js +11 -0
  61. package/dist/lib/css/property-descriptors/background-color.js.map +1 -0
  62. package/dist/lib/css/property-descriptors/background-image.js +24 -0
  63. package/dist/lib/css/property-descriptors/background-image.js.map +1 -0
  64. package/dist/lib/css/property-descriptors/background-origin.js +24 -0
  65. package/dist/lib/css/property-descriptors/background-origin.js.map +1 -0
  66. package/dist/lib/css/property-descriptors/background-position.js +17 -0
  67. package/dist/lib/css/property-descriptors/background-position.js.map +1 -0
  68. package/dist/lib/css/property-descriptors/background-repeat.js +36 -0
  69. package/dist/lib/css/property-descriptors/background-repeat.js.map +1 -0
  70. package/dist/lib/css/property-descriptors/background-size.js +24 -0
  71. package/dist/lib/css/property-descriptors/background-size.js.map +1 -0
  72. package/dist/lib/css/property-descriptors/border-color.js +15 -0
  73. package/dist/lib/css/property-descriptors/border-color.js.map +1 -0
  74. package/dist/lib/css/property-descriptors/border-radius.js +18 -0
  75. package/dist/lib/css/property-descriptors/border-radius.js.map +1 -0
  76. package/dist/lib/css/property-descriptors/border-style.js +27 -0
  77. package/dist/lib/css/property-descriptors/border-style.js.map +1 -0
  78. package/dist/lib/css/property-descriptors/border-width.js +21 -0
  79. package/dist/lib/css/property-descriptors/border-width.js.map +1 -0
  80. package/dist/lib/css/property-descriptors/box-shadow.js +55 -0
  81. package/dist/lib/css/property-descriptors/box-shadow.js.map +1 -0
  82. package/dist/lib/css/property-descriptors/color.js +11 -0
  83. package/dist/lib/css/property-descriptors/color.js.map +1 -0
  84. package/dist/lib/css/property-descriptors/content.js +20 -0
  85. package/dist/lib/css/property-descriptors/content.js.map +1 -0
  86. package/dist/lib/css/property-descriptors/counter-increment.js +31 -0
  87. package/dist/lib/css/property-descriptors/counter-increment.js.map +1 -0
  88. package/dist/lib/css/property-descriptors/counter-reset.js +27 -0
  89. package/dist/lib/css/property-descriptors/counter-reset.js.map +1 -0
  90. package/dist/lib/css/property-descriptors/direction.js +19 -0
  91. package/dist/lib/css/property-descriptors/direction.js.map +1 -0
  92. package/dist/lib/css/property-descriptors/display.js +82 -0
  93. package/dist/lib/css/property-descriptors/display.js.map +1 -0
  94. package/dist/lib/css/property-descriptors/duration.js +15 -0
  95. package/dist/lib/css/property-descriptors/duration.js.map +1 -0
  96. package/dist/lib/css/property-descriptors/float.js +23 -0
  97. package/dist/lib/css/property-descriptors/float.js.map +1 -0
  98. package/dist/lib/css/property-descriptors/font-family.js +33 -0
  99. package/dist/lib/css/property-descriptors/font-family.js.map +1 -0
  100. package/dist/lib/css/property-descriptors/font-size.js +11 -0
  101. package/dist/lib/css/property-descriptors/font-size.js.map +1 -0
  102. package/dist/lib/css/property-descriptors/font-style.js +21 -0
  103. package/dist/lib/css/property-descriptors/font-style.js.map +1 -0
  104. package/dist/lib/css/property-descriptors/font-variant.js +14 -0
  105. package/dist/lib/css/property-descriptors/font-variant.js.map +1 -0
  106. package/dist/lib/css/property-descriptors/font-weight.js +26 -0
  107. package/dist/lib/css/property-descriptors/font-weight.js.map +1 -0
  108. package/dist/lib/css/property-descriptors/letter-spacing.js +22 -0
  109. package/dist/lib/css/property-descriptors/letter-spacing.js.map +1 -0
  110. package/dist/lib/css/property-descriptors/line-break.js +24 -0
  111. package/dist/lib/css/property-descriptors/line-break.js.map +1 -0
  112. package/dist/lib/css/property-descriptors/line-height.js +25 -0
  113. package/dist/lib/css/property-descriptors/line-height.js.map +1 -0
  114. package/dist/lib/css/property-descriptors/list-style-image.js +17 -0
  115. package/dist/lib/css/property-descriptors/list-style-image.js.map +1 -0
  116. package/dist/lib/css/property-descriptors/list-style-position.js +19 -0
  117. package/dist/lib/css/property-descriptors/list-style-position.js.map +1 -0
  118. package/dist/lib/css/property-descriptors/list-style-type.js +123 -0
  119. package/dist/lib/css/property-descriptors/list-style-type.js.map +1 -0
  120. package/dist/lib/css/property-descriptors/margin.js +14 -0
  121. package/dist/lib/css/property-descriptors/margin.js.map +1 -0
  122. package/dist/lib/css/property-descriptors/object-fit.js +29 -0
  123. package/dist/lib/css/property-descriptors/object-fit.js.map +1 -0
  124. package/dist/lib/css/property-descriptors/opacity.js +17 -0
  125. package/dist/lib/css/property-descriptors/opacity.js.map +1 -0
  126. package/dist/lib/css/property-descriptors/overflow-wrap.js +19 -0
  127. package/dist/lib/css/property-descriptors/overflow-wrap.js.map +1 -0
  128. package/dist/lib/css/property-descriptors/overflow.js +28 -0
  129. package/dist/lib/css/property-descriptors/overflow.js.map +1 -0
  130. package/dist/lib/css/property-descriptors/padding.js +15 -0
  131. package/dist/lib/css/property-descriptors/padding.js.map +1 -0
  132. package/dist/lib/css/property-descriptors/paint-order.js +34 -0
  133. package/dist/lib/css/property-descriptors/paint-order.js.map +1 -0
  134. package/dist/lib/css/property-descriptors/position.js +23 -0
  135. package/dist/lib/css/property-descriptors/position.js.map +1 -0
  136. package/dist/lib/css/property-descriptors/quotes.js +42 -0
  137. package/dist/lib/css/property-descriptors/quotes.js.map +1 -0
  138. package/dist/lib/css/property-descriptors/text-align.js +22 -0
  139. package/dist/lib/css/property-descriptors/text-align.js.map +1 -0
  140. package/dist/lib/css/property-descriptors/text-decoration-color.js +11 -0
  141. package/dist/lib/css/property-descriptors/text-decoration-color.js.map +1 -0
  142. package/dist/lib/css/property-descriptors/text-decoration-line.js +29 -0
  143. package/dist/lib/css/property-descriptors/text-decoration-line.js.map +1 -0
  144. package/dist/lib/css/property-descriptors/text-shadow.js +47 -0
  145. package/dist/lib/css/property-descriptors/text-shadow.js.map +1 -0
  146. package/dist/lib/css/property-descriptors/text-transform.js +21 -0
  147. package/dist/lib/css/property-descriptors/text-transform.js.map +1 -0
  148. package/dist/lib/css/property-descriptors/transform-origin.js +25 -0
  149. package/dist/lib/css/property-descriptors/transform-origin.js.map +1 -0
  150. package/dist/lib/css/property-descriptors/transform.js +37 -0
  151. package/dist/lib/css/property-descriptors/transform.js.map +1 -0
  152. package/dist/lib/css/property-descriptors/visibility.js +21 -0
  153. package/dist/lib/css/property-descriptors/visibility.js.map +1 -0
  154. package/dist/lib/css/property-descriptors/webkit-text-stroke-color.js +11 -0
  155. package/dist/lib/css/property-descriptors/webkit-text-stroke-color.js.map +1 -0
  156. package/dist/lib/css/property-descriptors/webkit-text-stroke-width.js +17 -0
  157. package/dist/lib/css/property-descriptors/webkit-text-stroke-width.js.map +1 -0
  158. package/dist/lib/css/property-descriptors/word-break.js +27 -0
  159. package/dist/lib/css/property-descriptors/word-break.js.map +1 -0
  160. package/dist/lib/css/property-descriptors/z-index.js +20 -0
  161. package/dist/lib/css/property-descriptors/z-index.js.map +1 -0
  162. package/dist/lib/css/syntax/__tests__/tokernizer-tests.js +34 -0
  163. package/dist/lib/css/syntax/__tests__/tokernizer-tests.js.map +1 -0
  164. package/dist/lib/css/syntax/parser.js +147 -0
  165. package/dist/lib/css/syntax/parser.js.map +1 -0
  166. package/dist/lib/css/syntax/tokenizer.js +630 -0
  167. package/dist/lib/css/syntax/tokenizer.js.map +1 -0
  168. package/dist/lib/css/types/__tests__/color-tests.js +66 -0
  169. package/dist/lib/css/types/__tests__/color-tests.js.map +1 -0
  170. package/dist/lib/css/types/__tests__/image-tests.js +233 -0
  171. package/dist/lib/css/types/__tests__/image-tests.js.map +1 -0
  172. package/dist/lib/css/types/angle.js +81 -0
  173. package/dist/lib/css/types/angle.js.map +1 -0
  174. package/dist/lib/css/types/color.js +307 -0
  175. package/dist/lib/css/types/color.js.map +1 -0
  176. package/dist/lib/css/types/functions/-prefix-linear-gradient.js +33 -0
  177. package/dist/lib/css/types/functions/-prefix-linear-gradient.js.map +1 -0
  178. package/dist/lib/css/types/functions/-prefix-radial-gradient.js +84 -0
  179. package/dist/lib/css/types/functions/-prefix-radial-gradient.js.map +1 -0
  180. package/dist/lib/css/types/functions/-webkit-gradient.js +60 -0
  181. package/dist/lib/css/types/functions/-webkit-gradient.js.map +1 -0
  182. package/dist/lib/css/types/functions/__tests__/radial-gradient.js +68 -0
  183. package/dist/lib/css/types/functions/__tests__/radial-gradient.js.map +1 -0
  184. package/dist/lib/css/types/functions/counter.js +374 -0
  185. package/dist/lib/css/types/functions/counter.js.map +1 -0
  186. package/dist/lib/css/types/functions/gradient.js +165 -0
  187. package/dist/lib/css/types/functions/gradient.js.map +1 -0
  188. package/dist/lib/css/types/functions/linear-gradient.js +28 -0
  189. package/dist/lib/css/types/functions/linear-gradient.js.map +1 -0
  190. package/dist/lib/css/types/functions/radial-gradient.js +91 -0
  191. package/dist/lib/css/types/functions/radial-gradient.js.map +1 -0
  192. package/dist/lib/css/types/image.js +53 -0
  193. package/dist/lib/css/types/image.js.map +1 -0
  194. package/dist/lib/css/types/index.js +3 -0
  195. package/dist/lib/css/types/index.js.map +1 -0
  196. package/dist/lib/css/types/length-percentage.js +52 -0
  197. package/dist/lib/css/types/length-percentage.js.map +1 -0
  198. package/dist/lib/css/types/length.js +8 -0
  199. package/dist/lib/css/types/length.js.map +1 -0
  200. package/dist/lib/css/types/time.js +18 -0
  201. package/dist/lib/css/types/time.js.map +1 -0
  202. package/dist/lib/dom/__mocks__/document-cloner.js +24 -0
  203. package/dist/lib/dom/__mocks__/document-cloner.js.map +1 -0
  204. package/dist/lib/dom/document-cloner.js +530 -0
  205. package/dist/lib/dom/document-cloner.js.map +1 -0
  206. package/dist/lib/dom/element-container.js +35 -0
  207. package/dist/lib/dom/element-container.js.map +1 -0
  208. package/dist/lib/dom/elements/li-element-container.js +30 -0
  209. package/dist/lib/dom/elements/li-element-container.js.map +1 -0
  210. package/dist/lib/dom/elements/ol-element-container.js +31 -0
  211. package/dist/lib/dom/elements/ol-element-container.js.map +1 -0
  212. package/dist/lib/dom/elements/select-element-container.js +31 -0
  213. package/dist/lib/dom/elements/select-element-container.js.map +1 -0
  214. package/dist/lib/dom/elements/textarea-element-container.js +30 -0
  215. package/dist/lib/dom/elements/textarea-element-container.js.map +1 -0
  216. package/dist/lib/dom/node-parser.js +142 -0
  217. package/dist/lib/dom/node-parser.js.map +1 -0
  218. package/dist/lib/dom/replaced-elements/canvas-element-container.js +32 -0
  219. package/dist/lib/dom/replaced-elements/canvas-element-container.js.map +1 -0
  220. package/dist/lib/dom/replaced-elements/iframe-element-container.js +55 -0
  221. package/dist/lib/dom/replaced-elements/iframe-element-container.js.map +1 -0
  222. package/dist/lib/dom/replaced-elements/image-element-container.js +33 -0
  223. package/dist/lib/dom/replaced-elements/image-element-container.js.map +1 -0
  224. package/dist/lib/dom/replaced-elements/index.js +3 -0
  225. package/dist/lib/dom/replaced-elements/index.js.map +1 -0
  226. package/dist/lib/dom/replaced-elements/input-element-container.js +102 -0
  227. package/dist/lib/dom/replaced-elements/input-element-container.js.map +1 -0
  228. package/dist/lib/dom/replaced-elements/pseudo-elements.js +1 -0
  229. package/dist/lib/dom/replaced-elements/pseudo-elements.js.map +1 -0
  230. package/dist/lib/dom/replaced-elements/svg-element-container.js +38 -0
  231. package/dist/lib/dom/replaced-elements/svg-element-container.js.map +1 -0
  232. package/dist/lib/dom/text-container.js +32 -0
  233. package/dist/lib/dom/text-container.js.map +1 -0
  234. package/dist/lib/index.js +181 -0
  235. package/dist/lib/index.js.map +1 -0
  236. package/dist/lib/invariant.js +10 -0
  237. package/dist/lib/invariant.js.map +1 -0
  238. package/dist/lib/render/background.js +187 -0
  239. package/dist/lib/render/background.js.map +1 -0
  240. package/dist/lib/render/bezier-curve.js +36 -0
  241. package/dist/lib/render/bezier-curve.js.map +1 -0
  242. package/dist/lib/render/border.js +105 -0
  243. package/dist/lib/render/border.js.map +1 -0
  244. package/dist/lib/render/bound-curves.js +190 -0
  245. package/dist/lib/render/bound-curves.js.map +1 -0
  246. package/dist/lib/render/box-sizing.js +21 -0
  247. package/dist/lib/render/box-sizing.js.map +1 -0
  248. package/dist/lib/render/canvas/canvas-renderer.js +1106 -0
  249. package/dist/lib/render/canvas/canvas-renderer.js.map +1 -0
  250. package/dist/lib/render/canvas/foreignobject-renderer.js +108 -0
  251. package/dist/lib/render/canvas/foreignobject-renderer.js.map +1 -0
  252. package/dist/lib/render/effects.js +41 -0
  253. package/dist/lib/render/effects.js.map +1 -0
  254. package/dist/lib/render/font-metrics.js +55 -0
  255. package/dist/lib/render/font-metrics.js.map +1 -0
  256. package/dist/lib/render/path.js +27 -0
  257. package/dist/lib/render/path.js.map +1 -0
  258. package/dist/lib/render/renderer.js +12 -0
  259. package/dist/lib/render/renderer.js.map +1 -0
  260. package/dist/lib/render/stacking-context.js +172 -0
  261. package/dist/lib/render/stacking-context.js.map +1 -0
  262. package/dist/lib/render/vector.js +18 -0
  263. package/dist/lib/render/vector.js.map +1 -0
  264. package/dist/types/__tests__/index.d.ts +1 -0
  265. package/dist/types/core/__mocks__/cache-storage.d.ts +2 -0
  266. package/dist/types/core/__mocks__/context.d.ts +9 -0
  267. package/dist/types/core/__mocks__/features.d.ts +8 -0
  268. package/dist/types/core/__mocks__/logger.d.ts +9 -0
  269. package/dist/types/core/__tests__/cache-storage.d.ts +1 -0
  270. package/dist/types/core/__tests__/logger.d.ts +1 -0
  271. package/dist/types/core/bitwise.d.ts +1 -0
  272. package/dist/types/core/cache-storage.d.ts +26 -0
  273. package/dist/types/core/context.d.ts +15 -0
  274. package/dist/types/core/debugger.d.ts +8 -0
  275. package/dist/types/core/features.d.ts +12 -0
  276. package/dist/types/core/logger.d.ts +18 -0
  277. package/dist/types/core/util.d.ts +1 -0
  278. package/dist/types/css/IPropertyDescriptor.d.ts +36 -0
  279. package/dist/types/css/ITypeDescriptor.d.ts +6 -0
  280. package/dist/types/css/index.d.ts +134 -0
  281. package/dist/types/css/layout/__mocks__/bounds.d.ts +2 -0
  282. package/dist/types/css/layout/bounds.d.ts +14 -0
  283. package/dist/types/css/layout/text.d.ts +10 -0
  284. package/dist/types/css/property-descriptors/__tests__/background-tests.d.ts +1 -0
  285. package/dist/types/css/property-descriptors/__tests__/font-family.d.ts +1 -0
  286. package/dist/types/css/property-descriptors/__tests__/paint-order.d.ts +1 -0
  287. package/dist/types/css/property-descriptors/__tests__/text-shadow.d.ts +1 -0
  288. package/dist/types/css/property-descriptors/__tests__/transform-tests.d.ts +1 -0
  289. package/dist/types/css/property-descriptors/background-clip.d.ts +8 -0
  290. package/dist/types/css/property-descriptors/background-color.d.ts +2 -0
  291. package/dist/types/css/property-descriptors/background-image.d.ts +3 -0
  292. package/dist/types/css/property-descriptors/background-origin.d.ts +8 -0
  293. package/dist/types/css/property-descriptors/background-position.d.ts +5 -0
  294. package/dist/types/css/property-descriptors/background-repeat.d.ts +9 -0
  295. package/dist/types/css/property-descriptors/background-size.d.ts +11 -0
  296. package/dist/types/css/property-descriptors/border-color.d.ts +5 -0
  297. package/dist/types/css/property-descriptors/border-radius.d.ts +7 -0
  298. package/dist/types/css/property-descriptors/border-style.d.ts +12 -0
  299. package/dist/types/css/property-descriptors/border-width.d.ts +5 -0
  300. package/dist/types/css/property-descriptors/box-shadow.d.ts +14 -0
  301. package/dist/types/css/property-descriptors/color.d.ts +2 -0
  302. package/dist/types/css/property-descriptors/content.d.ts +4 -0
  303. package/dist/types/css/property-descriptors/counter-increment.d.ts +7 -0
  304. package/dist/types/css/property-descriptors/counter-reset.d.ts +7 -0
  305. package/dist/types/css/property-descriptors/direction.d.ts +6 -0
  306. package/dist/types/css/property-descriptors/display.d.ts +35 -0
  307. package/dist/types/css/property-descriptors/duration.d.ts +2 -0
  308. package/dist/types/css/property-descriptors/float.d.ts +9 -0
  309. package/dist/types/css/property-descriptors/font-family.d.ts +4 -0
  310. package/dist/types/css/property-descriptors/font-size.d.ts +2 -0
  311. package/dist/types/css/property-descriptors/font-style.d.ts +7 -0
  312. package/dist/types/css/property-descriptors/font-variant.d.ts +2 -0
  313. package/dist/types/css/property-descriptors/font-weight.d.ts +2 -0
  314. package/dist/types/css/property-descriptors/letter-spacing.d.ts +2 -0
  315. package/dist/types/css/property-descriptors/line-break.d.ts +6 -0
  316. package/dist/types/css/property-descriptors/line-height.d.ts +4 -0
  317. package/dist/types/css/property-descriptors/list-style-image.d.ts +3 -0
  318. package/dist/types/css/property-descriptors/list-style-position.d.ts +6 -0
  319. package/dist/types/css/property-descriptors/list-style-type.d.ts +58 -0
  320. package/dist/types/css/property-descriptors/margin.d.ts +5 -0
  321. package/dist/types/css/property-descriptors/object-fit.d.ts +10 -0
  322. package/dist/types/css/property-descriptors/opacity.d.ts +2 -0
  323. package/dist/types/css/property-descriptors/overflow-wrap.d.ts +6 -0
  324. package/dist/types/css/property-descriptors/overflow.d.ts +9 -0
  325. package/dist/types/css/property-descriptors/padding.d.ts +5 -0
  326. package/dist/types/css/property-descriptors/paint-order.d.ts +8 -0
  327. package/dist/types/css/property-descriptors/position.d.ts +9 -0
  328. package/dist/types/css/property-descriptors/quotes.d.ts +8 -0
  329. package/dist/types/css/property-descriptors/text-align.d.ts +7 -0
  330. package/dist/types/css/property-descriptors/text-decoration-color.d.ts +2 -0
  331. package/dist/types/css/property-descriptors/text-decoration-line.d.ts +10 -0
  332. package/dist/types/css/property-descriptors/text-shadow.d.ts +12 -0
  333. package/dist/types/css/property-descriptors/text-transform.d.ts +8 -0
  334. package/dist/types/css/property-descriptors/transform-origin.d.ts +4 -0
  335. package/dist/types/css/property-descriptors/transform.d.ts +4 -0
  336. package/dist/types/css/property-descriptors/visibility.d.ts +7 -0
  337. package/dist/types/css/property-descriptors/webkit-text-stroke-color.d.ts +2 -0
  338. package/dist/types/css/property-descriptors/webkit-text-stroke-width.d.ts +2 -0
  339. package/dist/types/css/property-descriptors/word-break.d.ts +7 -0
  340. package/dist/types/css/property-descriptors/z-index.d.ts +7 -0
  341. package/dist/types/css/syntax/__tests__/tokernizer-tests.d.ts +1 -0
  342. package/dist/types/css/syntax/parser.d.ts +34 -0
  343. package/dist/types/css/syntax/tokenizer.d.ts +94 -0
  344. package/dist/types/css/types/__tests__/color-tests.d.ts +1 -0
  345. package/dist/types/css/types/__tests__/image-tests.d.ts +1 -0
  346. package/dist/types/css/types/angle.d.ts +7 -0
  347. package/dist/types/css/types/color.d.ts +11 -0
  348. package/dist/types/css/types/functions/-prefix-linear-gradient.d.ts +4 -0
  349. package/dist/types/css/types/functions/-prefix-radial-gradient.d.ts +4 -0
  350. package/dist/types/css/types/functions/-webkit-gradient.d.ts +4 -0
  351. package/dist/types/css/types/functions/__tests__/radial-gradient.d.ts +1 -0
  352. package/dist/types/css/types/functions/counter.d.ts +10 -0
  353. package/dist/types/css/types/functions/gradient.d.ts +7 -0
  354. package/dist/types/css/types/functions/linear-gradient.d.ts +4 -0
  355. package/dist/types/css/types/functions/radial-gradient.d.ts +12 -0
  356. package/dist/types/css/types/image.d.ts +54 -0
  357. package/dist/types/css/types/index.d.ts +1 -0
  358. package/dist/types/css/types/length-percentage.d.ts +11 -0
  359. package/dist/types/css/types/length.d.ts +4 -0
  360. package/dist/types/css/types/time.d.ts +2 -0
  361. package/dist/types/dom/__mocks__/document-cloner.d.ts +6 -0
  362. package/dist/types/dom/document-cloner.d.ts +45 -0
  363. package/dist/types/dom/element-container.d.ts +19 -0
  364. package/dist/types/dom/elements/li-element-container.d.ts +6 -0
  365. package/dist/types/dom/elements/ol-element-container.d.ts +7 -0
  366. package/dist/types/dom/elements/select-element-container.d.ts +6 -0
  367. package/dist/types/dom/elements/textarea-element-container.d.ts +6 -0
  368. package/dist/types/dom/node-parser.d.ts +23 -0
  369. package/dist/types/dom/replaced-elements/canvas-element-container.d.ts +8 -0
  370. package/dist/types/dom/replaced-elements/iframe-element-container.d.ts +11 -0
  371. package/dist/types/dom/replaced-elements/image-element-container.d.ts +8 -0
  372. package/dist/types/dom/replaced-elements/index.d.ts +4 -0
  373. package/dist/types/dom/replaced-elements/input-element-container.d.ts +12 -0
  374. package/dist/types/dom/replaced-elements/pseudo-elements.d.ts +0 -0
  375. package/dist/types/dom/replaced-elements/svg-element-container.d.ts +8 -0
  376. package/dist/types/dom/text-container.d.ts +8 -0
  377. package/dist/types/index.d.ts +10 -0
  378. package/dist/types/invariant.d.ts +1 -0
  379. package/dist/types/render/background.d.ts +16 -0
  380. package/dist/types/render/bezier-curve.d.ts +14 -0
  381. package/dist/types/render/border.d.ts +6 -0
  382. package/dist/types/render/bound-curves.d.ts +32 -0
  383. package/dist/types/render/box-sizing.d.ts +4 -0
  384. package/dist/types/render/canvas/canvas-renderer.d.ts +53 -0
  385. package/dist/types/render/canvas/foreignobject-renderer.d.ts +11 -0
  386. package/dist/types/render/effects.d.ts +38 -0
  387. package/dist/types/render/font-metrics.d.ts +11 -0
  388. package/dist/types/render/path.d.ts +13 -0
  389. package/dist/types/render/renderer.d.ts +7 -0
  390. package/dist/types/render/stacking-context.d.ts +24 -0
  391. package/dist/types/render/vector.d.ts +9 -0
  392. package/package.json +124 -0
  393. package/publish.sh +8 -0
  394. package/tsconfig.json +21 -0
@@ -0,0 +1,26 @@
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
+ }
15
+ export declare class Cache {
16
+ private readonly context;
17
+ private readonly _options;
18
+ private readonly _cache;
19
+ constructor(context: Context, _options: ResourceOptions);
20
+ addImage(src: string): Promise<void>;
21
+ match(src: string): Promise<any>;
22
+ private loadImage;
23
+ private has;
24
+ keys(): Promise<string[]>;
25
+ private proxy;
26
+ }
@@ -0,0 +1,15 @@
1
+ import { Logger } from './logger';
2
+ import { Cache, ResourceOptions } from './cache-storage';
3
+ import { Bounds } from '../css/layout/bounds';
4
+ export declare type ContextOptions = {
5
+ logging: boolean;
6
+ cache?: Cache;
7
+ } & ResourceOptions;
8
+ export declare class Context {
9
+ windowBounds: Bounds;
10
+ private readonly instanceName;
11
+ readonly logger: Logger;
12
+ readonly cache: Cache;
13
+ private static instanceCount;
14
+ constructor(options: ContextOptions, windowBounds: Bounds);
15
+ }
@@ -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 declare 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,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
+ 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,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 declare 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 declare 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 declare type BackgroundPosition = BackgroundImagePosition[];
4
+ export declare type BackgroundImagePosition = LengthPercentageTuple;
5
+ export declare const backgroundPosition: IPropertyListDescriptor<BackgroundPosition>;
@@ -0,0 +1,9 @@
1
+ import { IPropertyListDescriptor } from '../IPropertyDescriptor';
2
+ export declare 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 declare type BackgroundSizeInfo = LengthPercentage | StringValueToken;
10
+ export declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare type FONT_FAMILY = string;
3
+ export declare 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>;