@antv/g-lite 0.0.7 → 1.0.1

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 (297) hide show
  1. package/README.md +36 -0
  2. package/dist/AbstractRenderer.d.ts +45 -0
  3. package/dist/AbstractRenderer.d.ts.map +1 -0
  4. package/dist/Canvas.d.ts +159 -0
  5. package/dist/Canvas.d.ts.map +1 -0
  6. package/dist/camera/Camera.d.ts +274 -0
  7. package/dist/camera/Camera.d.ts.map +1 -0
  8. package/dist/camera/Landmark.d.ts +24 -0
  9. package/dist/camera/Landmark.d.ts.map +1 -0
  10. package/dist/camera/index.d.ts +4 -0
  11. package/dist/camera/index.d.ts.map +1 -0
  12. package/dist/camera/interfaces.d.ts +196 -0
  13. package/dist/camera/interfaces.d.ts.map +1 -0
  14. package/dist/canvas-module.d.ts +2 -0
  15. package/dist/canvas-module.d.ts.map +1 -0
  16. package/dist/components/Cullable.d.ts +13 -0
  17. package/dist/components/Cullable.d.ts.map +1 -0
  18. package/dist/components/Geometry.d.ts +12 -0
  19. package/dist/components/Geometry.d.ts.map +1 -0
  20. package/dist/components/RBushNode.d.ts +13 -0
  21. package/dist/components/RBushNode.d.ts.map +1 -0
  22. package/dist/components/Renderable.d.ts +28 -0
  23. package/dist/components/Renderable.d.ts.map +1 -0
  24. package/dist/components/Sortable.d.ts +20 -0
  25. package/dist/components/Sortable.d.ts.map +1 -0
  26. package/dist/components/Transform.d.ts +32 -0
  27. package/dist/components/Transform.d.ts.map +1 -0
  28. package/dist/components/index.d.ts +7 -0
  29. package/dist/components/index.d.ts.map +1 -0
  30. package/dist/css/CSS.d.ts +88 -0
  31. package/dist/css/CSS.d.ts.map +1 -0
  32. package/dist/css/CSSProperty.d.ts +46 -0
  33. package/dist/css/CSSProperty.d.ts.map +1 -0
  34. package/dist/css/CSSStyleValuePool.d.ts +22 -0
  35. package/dist/css/CSSStyleValuePool.d.ts.map +1 -0
  36. package/dist/css/StyleValueRegistry.d.ts +60 -0
  37. package/dist/css/StyleValueRegistry.d.ts.map +1 -0
  38. package/dist/css/cssom/CSSColorValue.d.ts +24 -0
  39. package/dist/css/cssom/CSSColorValue.d.ts.map +1 -0
  40. package/dist/css/cssom/CSSGradientValue.d.ts +27 -0
  41. package/dist/css/cssom/CSSGradientValue.d.ts.map +1 -0
  42. package/dist/css/cssom/CSSKeywordValue.d.ts +16 -0
  43. package/dist/css/cssom/CSSKeywordValue.d.ts.map +1 -0
  44. package/dist/css/cssom/CSSMathOperator.d.ts +12 -0
  45. package/dist/css/cssom/CSSMathOperator.d.ts.map +1 -0
  46. package/dist/css/cssom/CSSNumericSumValue.d.ts +8 -0
  47. package/dist/css/cssom/CSSNumericSumValue.d.ts.map +1 -0
  48. package/dist/css/cssom/CSSNumericValue.d.ts +208 -0
  49. package/dist/css/cssom/CSSNumericValue.d.ts.map +1 -0
  50. package/dist/css/cssom/CSSRGB.d.ts +26 -0
  51. package/dist/css/cssom/CSSRGB.d.ts.map +1 -0
  52. package/dist/css/cssom/CSSStyleValue.d.ts +46 -0
  53. package/dist/css/cssom/CSSStyleValue.d.ts.map +1 -0
  54. package/dist/css/cssom/index.d.ts +17 -0
  55. package/dist/css/cssom/index.d.ts.map +1 -0
  56. package/dist/css/cssom/types.d.ts +39 -0
  57. package/dist/css/cssom/types.d.ts.map +1 -0
  58. package/dist/css/index.d.ts +12 -0
  59. package/dist/css/index.d.ts.map +1 -0
  60. package/dist/css/interfaces.d.ts +140 -0
  61. package/dist/css/interfaces.d.ts.map +1 -0
  62. package/dist/css/parser/color.d.ts +19 -0
  63. package/dist/css/parser/color.d.ts.map +1 -0
  64. package/dist/css/parser/dimension.d.ts +49 -0
  65. package/dist/css/parser/dimension.d.ts.map +1 -0
  66. package/dist/css/parser/filter.d.ts +8 -0
  67. package/dist/css/parser/filter.d.ts.map +1 -0
  68. package/dist/css/parser/gradient.d.ts +5 -0
  69. package/dist/css/parser/gradient.d.ts.map +1 -0
  70. package/dist/css/parser/index.d.ts +16 -0
  71. package/dist/css/parser/index.d.ts.map +1 -0
  72. package/dist/css/parser/numeric.d.ts +25 -0
  73. package/dist/css/parser/numeric.d.ts.map +1 -0
  74. package/dist/css/parser/path.d.ts +6 -0
  75. package/dist/css/parser/path.d.ts.map +1 -0
  76. package/dist/css/parser/points.d.ts +13 -0
  77. package/dist/css/parser/points.d.ts.map +1 -0
  78. package/dist/css/parser/transform-origin.d.ts +9 -0
  79. package/dist/css/parser/transform-origin.d.ts.map +1 -0
  80. package/dist/css/parser/transform.d.ts +16 -0
  81. package/dist/css/parser/transform.d.ts.map +1 -0
  82. package/dist/css/parser/types.d.ts +3 -0
  83. package/dist/css/parser/types.d.ts.map +1 -0
  84. package/dist/css/properties/CSSPropertyAngle.d.ts +13 -0
  85. package/dist/css/properties/CSSPropertyAngle.d.ts.map +1 -0
  86. package/dist/css/properties/CSSPropertyClipPath.d.ts +26 -0
  87. package/dist/css/properties/CSSPropertyClipPath.d.ts.map +1 -0
  88. package/dist/css/properties/CSSPropertyColor.d.ts +15 -0
  89. package/dist/css/properties/CSSPropertyColor.d.ts.map +1 -0
  90. package/dist/css/properties/CSSPropertyFilter.d.ts +8 -0
  91. package/dist/css/properties/CSSPropertyFilter.d.ts.map +1 -0
  92. package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts +23 -0
  93. package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts.map +1 -0
  94. package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts +17 -0
  95. package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts.map +1 -0
  96. package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts +27 -0
  97. package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts.map +1 -0
  98. package/dist/css/properties/CSSPropertyLocalPosition.d.ts +14 -0
  99. package/dist/css/properties/CSSPropertyLocalPosition.d.ts.map +1 -0
  100. package/dist/css/properties/CSSPropertyMarker.d.ts +6 -0
  101. package/dist/css/properties/CSSPropertyMarker.d.ts.map +1 -0
  102. package/dist/css/properties/CSSPropertyNumber.d.ts +12 -0
  103. package/dist/css/properties/CSSPropertyNumber.d.ts.map +1 -0
  104. package/dist/css/properties/CSSPropertyOffsetDistance.d.ts +13 -0
  105. package/dist/css/properties/CSSPropertyOffsetDistance.d.ts.map +1 -0
  106. package/dist/css/properties/CSSPropertyOffsetPath.d.ts +6 -0
  107. package/dist/css/properties/CSSPropertyOffsetPath.d.ts.map +1 -0
  108. package/dist/css/properties/CSSPropertyOpacity.d.ts +14 -0
  109. package/dist/css/properties/CSSPropertyOpacity.d.ts.map +1 -0
  110. package/dist/css/properties/CSSPropertyPath.d.ts +28 -0
  111. package/dist/css/properties/CSSPropertyPath.d.ts.map +1 -0
  112. package/dist/css/properties/CSSPropertyPoints.d.ts +19 -0
  113. package/dist/css/properties/CSSPropertyPoints.d.ts.map +1 -0
  114. package/dist/css/properties/CSSPropertyShadowBlur.d.ts +5 -0
  115. package/dist/css/properties/CSSPropertyShadowBlur.d.ts.map +1 -0
  116. package/dist/css/properties/CSSPropertyText.d.ts +8 -0
  117. package/dist/css/properties/CSSPropertyText.d.ts.map +1 -0
  118. package/dist/css/properties/CSSPropertyTextTransform.d.ts +12 -0
  119. package/dist/css/properties/CSSPropertyTextTransform.d.ts.map +1 -0
  120. package/dist/css/properties/CSSPropertyTransform.d.ts +43 -0
  121. package/dist/css/properties/CSSPropertyTransform.d.ts.map +1 -0
  122. package/dist/css/properties/CSSPropertyTransformOrigin.d.ts +14 -0
  123. package/dist/css/properties/CSSPropertyTransformOrigin.d.ts.map +1 -0
  124. package/dist/css/properties/CSSPropertyZIndex.d.ts +12 -0
  125. package/dist/css/properties/CSSPropertyZIndex.d.ts.map +1 -0
  126. package/dist/css/properties/index.d.ts +22 -0
  127. package/dist/css/properties/index.d.ts.map +1 -0
  128. package/dist/display-objects/Circle.d.ts +17 -0
  129. package/dist/display-objects/Circle.d.ts.map +1 -0
  130. package/dist/display-objects/CustomElement.d.ts +25 -0
  131. package/dist/display-objects/CustomElement.d.ts.map +1 -0
  132. package/dist/display-objects/DisplayObject.d.ts +188 -0
  133. package/dist/display-objects/DisplayObject.d.ts.map +1 -0
  134. package/dist/display-objects/DisplayObjectPool.d.ts +9 -0
  135. package/dist/display-objects/DisplayObjectPool.d.ts.map +1 -0
  136. package/dist/display-objects/Ellipse.d.ts +19 -0
  137. package/dist/display-objects/Ellipse.d.ts.map +1 -0
  138. package/dist/display-objects/Group.d.ts +30 -0
  139. package/dist/display-objects/Group.d.ts.map +1 -0
  140. package/dist/display-objects/HTML.d.ts +42 -0
  141. package/dist/display-objects/HTML.d.ts.map +1 -0
  142. package/dist/display-objects/Image.d.ts +23 -0
  143. package/dist/display-objects/Image.d.ts.map +1 -0
  144. package/dist/display-objects/Line.d.ts +61 -0
  145. package/dist/display-objects/Line.d.ts.map +1 -0
  146. package/dist/display-objects/Path.d.ts +100 -0
  147. package/dist/display-objects/Path.d.ts.map +1 -0
  148. package/dist/display-objects/Polygon.d.ts +50 -0
  149. package/dist/display-objects/Polygon.d.ts.map +1 -0
  150. package/dist/display-objects/Polyline.d.ts +49 -0
  151. package/dist/display-objects/Polyline.d.ts.map +1 -0
  152. package/dist/display-objects/Rect.d.ts +24 -0
  153. package/dist/display-objects/Rect.d.ts.map +1 -0
  154. package/dist/display-objects/Text.d.ts +76 -0
  155. package/dist/display-objects/Text.d.ts.map +1 -0
  156. package/dist/display-objects/index.d.ts +15 -0
  157. package/dist/display-objects/index.d.ts.map +1 -0
  158. package/dist/dom/CustomElementRegistry.d.ts +16 -0
  159. package/dist/dom/CustomElementRegistry.d.ts.map +1 -0
  160. package/dist/dom/CustomEvent.d.ts +17 -0
  161. package/dist/dom/CustomEvent.d.ts.map +1 -0
  162. package/dist/dom/Document.d.ts +76 -0
  163. package/dist/dom/Document.d.ts.map +1 -0
  164. package/dist/dom/Element.d.ts +205 -0
  165. package/dist/dom/Element.d.ts.map +1 -0
  166. package/dist/dom/EventTarget.d.ts +40 -0
  167. package/dist/dom/EventTarget.d.ts.map +1 -0
  168. package/dist/dom/FederatedEvent.d.ts +147 -0
  169. package/dist/dom/FederatedEvent.d.ts.map +1 -0
  170. package/dist/dom/FederatedMouseEvent.d.ts +53 -0
  171. package/dist/dom/FederatedMouseEvent.d.ts.map +1 -0
  172. package/dist/dom/FederatedPointerEvent.d.ts +88 -0
  173. package/dist/dom/FederatedPointerEvent.d.ts.map +1 -0
  174. package/dist/dom/FederatedWheelEvent.d.ts +22 -0
  175. package/dist/dom/FederatedWheelEvent.d.ts.map +1 -0
  176. package/dist/dom/MutationEvent.d.ts +16 -0
  177. package/dist/dom/MutationEvent.d.ts.map +1 -0
  178. package/dist/dom/Node.d.ts +139 -0
  179. package/dist/dom/Node.d.ts.map +1 -0
  180. package/dist/dom/index.d.ts +13 -0
  181. package/dist/dom/index.d.ts.map +1 -0
  182. package/dist/dom/interfaces.d.ts +422 -0
  183. package/dist/dom/interfaces.d.ts.map +1 -0
  184. package/dist/global-module.d.ts +2 -0
  185. package/dist/global-module.d.ts.map +1 -0
  186. package/dist/index.d.ts +16 -1
  187. package/dist/index.d.ts.map +1 -1
  188. package/dist/index.esm.js +18740 -0
  189. package/dist/index.js +18835 -0
  190. package/dist/index.umd.js +29382 -4
  191. package/dist/index.umd.min.js +3 -1
  192. package/dist/plugins/CullingPlugin.d.ts +22 -0
  193. package/dist/plugins/CullingPlugin.d.ts.map +1 -0
  194. package/dist/plugins/DirtyCheckPlugin.d.ts +9 -0
  195. package/dist/plugins/DirtyCheckPlugin.d.ts.map +1 -0
  196. package/dist/plugins/EventPlugin.d.ts +32 -0
  197. package/dist/plugins/EventPlugin.d.ts.map +1 -0
  198. package/dist/plugins/FrustumCullingStrategy.d.ts +24 -0
  199. package/dist/plugins/FrustumCullingStrategy.d.ts.map +1 -0
  200. package/dist/plugins/PrepareRendererPlugin.d.ts +28 -0
  201. package/dist/plugins/PrepareRendererPlugin.d.ts.map +1 -0
  202. package/dist/services/ContextService.d.ts +30 -0
  203. package/dist/services/ContextService.d.ts.map +1 -0
  204. package/dist/services/EventService.d.ts +82 -0
  205. package/dist/services/EventService.d.ts.map +1 -0
  206. package/dist/services/OffscreenCanvasCreator.d.ts +15 -0
  207. package/dist/services/OffscreenCanvasCreator.d.ts.map +1 -0
  208. package/dist/services/RenderingContext.d.ts +29 -0
  209. package/dist/services/RenderingContext.d.ts.map +1 -0
  210. package/dist/services/RenderingService.d.ts +118 -0
  211. package/dist/services/RenderingService.d.ts.map +1 -0
  212. package/dist/services/SceneGraphSelector.d.ts +27 -0
  213. package/dist/services/SceneGraphSelector.d.ts.map +1 -0
  214. package/dist/services/SceneGraphService.d.ts +123 -0
  215. package/dist/services/SceneGraphService.d.ts.map +1 -0
  216. package/dist/services/TextService.d.ts +39 -0
  217. package/dist/services/TextService.d.ts.map +1 -0
  218. package/dist/services/aabb/CircleUpdater.d.ts +9 -0
  219. package/dist/services/aabb/CircleUpdater.d.ts.map +1 -0
  220. package/dist/services/aabb/EllipseUpdater.d.ts +9 -0
  221. package/dist/services/aabb/EllipseUpdater.d.ts.map +1 -0
  222. package/dist/services/aabb/LineUpdater.d.ts +9 -0
  223. package/dist/services/aabb/LineUpdater.d.ts.map +1 -0
  224. package/dist/services/aabb/PathUpdater.d.ts +9 -0
  225. package/dist/services/aabb/PathUpdater.d.ts.map +1 -0
  226. package/dist/services/aabb/PolylineUpdater.d.ts +9 -0
  227. package/dist/services/aabb/PolylineUpdater.d.ts.map +1 -0
  228. package/dist/services/aabb/RectUpdater.d.ts +9 -0
  229. package/dist/services/aabb/RectUpdater.d.ts.map +1 -0
  230. package/dist/services/aabb/TextUpdater.d.ts +24 -0
  231. package/dist/services/aabb/TextUpdater.d.ts.map +1 -0
  232. package/dist/services/aabb/index.d.ts +9 -0
  233. package/dist/services/aabb/index.d.ts.map +1 -0
  234. package/dist/services/aabb/interfaces.d.ts +16 -0
  235. package/dist/services/aabb/interfaces.d.ts.map +1 -0
  236. package/dist/services/index.d.ts +12 -0
  237. package/dist/services/index.d.ts.map +1 -0
  238. package/dist/services/interfaces.d.ts +47 -0
  239. package/dist/services/interfaces.d.ts.map +1 -0
  240. package/dist/shapes/AABB.d.ts +36 -0
  241. package/dist/shapes/AABB.d.ts.map +1 -0
  242. package/dist/shapes/BoundingSphere.d.ts +9 -0
  243. package/dist/shapes/BoundingSphere.d.ts.map +1 -0
  244. package/dist/shapes/Frustum.d.ts +17 -0
  245. package/dist/shapes/Frustum.d.ts.map +1 -0
  246. package/dist/shapes/Plane.d.ts +15 -0
  247. package/dist/shapes/Plane.d.ts.map +1 -0
  248. package/dist/shapes/Point.d.ts +12 -0
  249. package/dist/shapes/Point.d.ts.map +1 -0
  250. package/dist/shapes/Ray.d.ts +25 -0
  251. package/dist/shapes/Ray.d.ts.map +1 -0
  252. package/dist/shapes/Rectangle.d.ts +13 -0
  253. package/dist/shapes/Rectangle.d.ts.map +1 -0
  254. package/dist/shapes/index.d.ts +6 -0
  255. package/dist/shapes/index.d.ts.map +1 -0
  256. package/dist/types.d.ts +318 -0
  257. package/dist/types.d.ts.map +1 -0
  258. package/dist/utils/assert.d.ts +8 -0
  259. package/dist/utils/assert.d.ts.map +1 -0
  260. package/dist/utils/canvas.d.ts +7 -0
  261. package/dist/utils/canvas.d.ts.map +1 -0
  262. package/dist/utils/dom.d.ts +10 -0
  263. package/dist/utils/dom.d.ts.map +1 -0
  264. package/dist/utils/error.d.ts +3 -0
  265. package/dist/utils/error.d.ts.map +1 -0
  266. package/dist/utils/event.d.ts +36 -0
  267. package/dist/utils/event.d.ts.map +1 -0
  268. package/dist/utils/gradient.d.ts +106 -0
  269. package/dist/utils/gradient.d.ts.map +1 -0
  270. package/dist/utils/index.d.ts +13 -0
  271. package/dist/utils/index.d.ts.map +1 -0
  272. package/dist/utils/math.d.ts +30 -0
  273. package/dist/utils/math.d.ts.map +1 -0
  274. package/dist/utils/path.d.ts +22 -0
  275. package/dist/utils/path.d.ts.map +1 -0
  276. package/dist/utils/pointer-events.d.ts +3 -0
  277. package/dist/utils/pointer-events.d.ts.map +1 -0
  278. package/dist/utils/string.d.ts +5 -0
  279. package/dist/utils/string.d.ts.map +1 -0
  280. package/dist/utils/tapable/AsyncParallelHook.d.ts +6 -0
  281. package/dist/utils/tapable/AsyncParallelHook.d.ts.map +1 -0
  282. package/dist/utils/tapable/AsyncSeriesWaterfallHook.d.ts +6 -0
  283. package/dist/utils/tapable/AsyncSeriesWaterfallHook.d.ts.map +1 -0
  284. package/dist/utils/tapable/Hook.d.ts +52 -0
  285. package/dist/utils/tapable/Hook.d.ts.map +1 -0
  286. package/dist/utils/tapable/HookCodeFactory.d.ts +47 -0
  287. package/dist/utils/tapable/HookCodeFactory.d.ts.map +1 -0
  288. package/dist/utils/tapable/SyncHook.d.ts +6 -0
  289. package/dist/utils/tapable/SyncHook.d.ts.map +1 -0
  290. package/dist/utils/tapable/SyncWaterfallHook.d.ts +6 -0
  291. package/dist/utils/tapable/SyncWaterfallHook.d.ts.map +1 -0
  292. package/dist/utils/tapable/index.d.ts +5 -0
  293. package/dist/utils/tapable/index.d.ts.map +1 -0
  294. package/dist/utils/text.d.ts +3 -0
  295. package/dist/utils/text.d.ts.map +1 -0
  296. package/package.json +4 -6
  297. package/LICENSE +0 -21
@@ -0,0 +1,27 @@
1
+ import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
2
+ import type { Nested, ParenLess } from './types';
3
+ export interface LinearGradient {
4
+ angle: number;
5
+ steps: [number, string][];
6
+ hash: string;
7
+ }
8
+ export interface RadialGradient {
9
+ cx: number;
10
+ cy: number;
11
+ steps: [number, string][];
12
+ hash: string;
13
+ }
14
+ export declare enum GradientType {
15
+ Constant = 0,
16
+ LinearGradient = 1,
17
+ RadialGradient = 2
18
+ }
19
+ export declare class CSSGradientValue extends CSSStyleValue {
20
+ type: GradientType;
21
+ value: LinearGradient | RadialGradient;
22
+ constructor(type: GradientType, value: LinearGradient | RadialGradient);
23
+ clone(): CSSGradientValue;
24
+ buildCSSText(n: Nested, p: ParenLess, result: string): string;
25
+ getType(): CSSStyleValueType;
26
+ }
27
+ //# sourceMappingURL=CSSGradientValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CSSGradientValue.d.ts","sourceRoot":"","sources":["../src/css/cssom/CSSGradientValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oBAAY,YAAY;IACtB,QAAQ,IAAA;IACR,cAAc,IAAA;IACd,cAAc,IAAA;CACf;AAED,qBAAa,gBAAiB,SAAQ,aAAa;IAC9B,IAAI,EAAE,YAAY;IAAS,KAAK,EAAE,cAAc,GAAG,cAAc;gBAAjE,IAAI,EAAE,YAAY,EAAS,KAAK,EAAE,cAAc,GAAG,cAAc;IAIpF,KAAK;IAIL,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAI7D,OAAO;CAGR"}
@@ -0,0 +1,16 @@
1
+ import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
2
+ import type { Nested, ParenLess } from './types';
3
+ /**
4
+ * CSSKeywordValue represents CSS Values that are specified as keywords
5
+ * eg. 'initial'
6
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSKeywordValue
7
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_keyword_value.idl
8
+ */
9
+ export declare class CSSKeywordValue extends CSSStyleValue {
10
+ value: string;
11
+ constructor(value: string);
12
+ clone(): CSSKeywordValue;
13
+ getType(): CSSStyleValueType;
14
+ buildCSSText(n: Nested, p: ParenLess, result: string): string;
15
+ }
16
+ //# sourceMappingURL=CSSKeywordValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CSSKeywordValue.d.ts","sourceRoot":"","sources":["../src/css/cssom/CSSKeywordValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,aAAa;IAC7B,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;IAIhC,KAAK;IAIL,OAAO;IAIP,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM;CAGrD"}
@@ -0,0 +1,12 @@
1
+ export declare enum CSSMathOperator {
2
+ kAdd = "+",
3
+ kSubtract = "-",
4
+ kMultiply = "*",
5
+ kDivide = "/",
6
+ kMin = "min",
7
+ kMax = "max",
8
+ kClamp = "clamp",
9
+ kInvalid = ""
10
+ }
11
+ export declare function isComparison(op: CSSMathOperator): boolean;
12
+ //# sourceMappingURL=CSSMathOperator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CSSMathOperator.d.ts","sourceRoot":"","sources":["../src/css/cssom/CSSMathOperator.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,IAAI,MAAM;IACV,SAAS,MAAM;IACf,SAAS,MAAM;IACf,OAAO,MAAM;IACb,IAAI,QAAQ;IACZ,IAAI,QAAQ;IACZ,MAAM,UAAU;IAChB,QAAQ,KAAK;CACd;AAmBD,wBAAgB,YAAY,CAAC,EAAE,EAAE,eAAe,WAI/C"}
@@ -0,0 +1,8 @@
1
+ import type { UnitType } from './types';
2
+ export declare type UnitMap = Record<UnitType, number>;
3
+ export interface Term {
4
+ value: number;
5
+ units: UnitMap;
6
+ }
7
+ export declare type CSSNumericSumValue = Term[];
8
+ //# sourceMappingURL=CSSNumericSumValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CSSNumericSumValue.d.ts","sourceRoot":"","sources":["../src/css/cssom/CSSNumericSumValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,oBAAY,OAAO,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAI/C,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IAId,KAAK,EAAE,OAAO,CAAC;CAChB;AAKD,oBAAY,kBAAkB,GAAG,IAAI,EAAE,CAAC"}
@@ -0,0 +1,208 @@
1
+ import type { CSSNumericSumValue, UnitMap } from './CSSNumericSumValue';
2
+ import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
3
+ import { Nested, ParenLess, UnitType } from './types';
4
+ export declare type CSSNumberish = number | CSSNumericValue;
5
+ declare type CSSNumericBaseType = 'length' | 'angle' | 'time' | 'frequency' | 'resolution' | 'flex' | 'percent';
6
+ interface CSSNumericType {
7
+ length: number;
8
+ angle: number;
9
+ time: number;
10
+ frequency: number;
11
+ resolution: number;
12
+ flex: number;
13
+ percent: number;
14
+ percentHint: CSSNumericBaseType;
15
+ }
16
+ export declare enum BaseType {
17
+ kLength = 0,
18
+ kAngle = 1,
19
+ kTime = 2,
20
+ kFrequency = 3,
21
+ kResolution = 4,
22
+ kFlex = 5,
23
+ kPercent = 6,
24
+ kNumBaseTypes = 7
25
+ }
26
+ export declare function unitTypeToBaseType(unit: UnitType): BaseType.kLength | BaseType.kAngle | BaseType.kTime | BaseType.kPercent;
27
+ export declare function baseTypeToString(baseType: BaseType): "length" | "angle" | "time" | "frequency" | "resolution" | "flex" | "percent" | "";
28
+ export declare class CSSNumericValueType {
29
+ private exponents;
30
+ private numNonZeroEntries;
31
+ percentHint: BaseType;
32
+ hasPercentHint: boolean;
33
+ constructor(unit?: UnitType, exponent?: number);
34
+ applyPercentHint(hint: BaseType): void;
35
+ hasNonZeroEntries(): boolean;
36
+ isOnlyNonZeroEntry(baseType: BaseType, value: number): boolean;
37
+ exponent(type: BaseType): number;
38
+ setExponent(type: BaseType, newValue: number): void;
39
+ static negateExponents(type: CSSNumericValueType): CSSNumericValueType;
40
+ matchesBaseType(baseType: BaseType): boolean;
41
+ matchesPercentage(): boolean;
42
+ matchesBaseTypePercentage(baseType: BaseType): boolean;
43
+ matchesNumber(): boolean;
44
+ matchesNumberPercentage(): boolean;
45
+ static add(type1: CSSNumericValueType, type2: CSSNumericValueType, error: boolean): CSSNumericValueType;
46
+ static multiply(type1: CSSNumericValueType, type2: CSSNumericValueType, error: boolean): CSSNumericValueType;
47
+ }
48
+ /**
49
+ * CSSNumericValue is the base class for numeric and length typed CSS Values.
50
+ * @see https://drafts.css-houdini.org/css-typed-om/#numeric-objects
51
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue
52
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.idl
53
+ */
54
+ export declare abstract class CSSNumericValue extends CSSStyleValue {
55
+ type_: CSSNumericValueType;
56
+ /**
57
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc#296
58
+ */
59
+ constructor(type_: CSSNumericValueType);
60
+ getType(): CSSStyleValueType;
61
+ /**
62
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue/equals
63
+ */
64
+ equals(...numberishes: CSSNumberish[]): any;
65
+ /**
66
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc#439
67
+ */
68
+ add(...numberishes: CSSNumberish[]): CSSNumericValue;
69
+ /**
70
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc#452
71
+ */
72
+ sub(...numberishes: CSSNumberish[]): CSSNumericValue;
73
+ /**
74
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue/mul
75
+ */
76
+ mul(...numberishes: CSSNumberish[]): CSSNumericValue;
77
+ /**
78
+ * eg. calc(24px / 4%)
79
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue/div
80
+ */
81
+ div(...numberishes: CSSNumberish[]): CSSNumericValue;
82
+ min(...numberishes: CSSNumberish[]): CSSNumericValue;
83
+ max(...numberishes: CSSNumberish[]): CSSNumericValue;
84
+ /**
85
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue/to
86
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc#331
87
+ */
88
+ to(unitOrName: UnitType | string): CSSUnitValue;
89
+ /**
90
+ * converts the object's value to a CSSMathSum object to values of the specified unit.
91
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue/toSum
92
+ */
93
+ toSum(...unit_strings: string[]): CSSMathSum;
94
+ /**
95
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue/type
96
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc#414
97
+ */
98
+ type(): CSSNumericType;
99
+ static isValidUnit(unit: UnitType): boolean;
100
+ abstract sumValue(): CSSNumericSumValue;
101
+ negate(): CSSNumericValue;
102
+ invert(): CSSNumericValue;
103
+ }
104
+ export declare const toCanonicalUnit: (unit: UnitType) => UnitType.kUnknown | UnitType.kNumber | UnitType.kPercentage | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds;
105
+ /**
106
+ * Represents numeric values that can be expressed as a single number plus a
107
+ * unit (or a naked number or percentage).
108
+ * @see https://drafts.css-houdini.org/css-typed-om/#cssunitvalue
109
+ */
110
+ export declare class CSSUnitValue extends CSSNumericValue {
111
+ unit: UnitType;
112
+ value: number;
113
+ constructor(value: number, unitOrName?: UnitType | string);
114
+ clone(): CSSUnitValue;
115
+ convertTo(target_unit: UnitType): CSSUnitValue;
116
+ equals(other: CSSNumericValue): boolean;
117
+ getType(): CSSStyleValueType;
118
+ sumValue(): CSSNumericSumValue;
119
+ negate(): CSSUnitValue;
120
+ invert(): CSSUnitValue | CSSMathInvert;
121
+ buildCSSText(n: Nested, p: ParenLess, result: string): string;
122
+ }
123
+ /**
124
+ * The CSSMathValue interface of the CSS_Object_Model a base class for classes representing complex numeric values.
125
+ *
126
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSMathValue
127
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_math_value.idl
128
+ */
129
+ export declare abstract class CSSMathValue extends CSSNumericValue {
130
+ abstract operator: string;
131
+ isUnitValue(): boolean;
132
+ }
133
+ export declare class CSSMathInvert extends CSSMathValue {
134
+ private value;
135
+ static create(value: CSSNumericValue): CSSMathInvert;
136
+ constructor(value: CSSNumericValue, type: CSSNumericValueType);
137
+ operator: string;
138
+ clone(): CSSMathInvert;
139
+ getType(): CSSStyleValueType;
140
+ equals(other: CSSNumericValue): any;
141
+ sumValue(): CSSNumericSumValue;
142
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
143
+ }
144
+ export declare class CSSMathNegate extends CSSMathValue {
145
+ value: CSSNumericValue;
146
+ static create(value: CSSNumericValue): CSSMathNegate;
147
+ constructor(value: CSSNumericValue, type: CSSNumericValueType);
148
+ operator: string;
149
+ clone(): CSSMathNegate;
150
+ getType(): CSSStyleValueType;
151
+ equals(other: CSSNumericValue): any;
152
+ sumValue(): CSSNumericSumValue;
153
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
154
+ }
155
+ export declare function typeCheck(values: CSSNumericValue[], op: Function, error: boolean): CSSNumericValueType;
156
+ export declare abstract class CSSMathVariadic extends CSSMathValue {
157
+ values: CSSNumericValue[];
158
+ constructor(values: CSSNumericValue[], type: CSSNumericValueType);
159
+ numericValues(): CSSNumericValue[];
160
+ equals(other: CSSNumericValue): boolean;
161
+ }
162
+ export declare class CSSMathMin extends CSSMathVariadic {
163
+ static create(values: CSSNumericValue[]): CSSMathMin;
164
+ operator: string;
165
+ clone(): CSSMathMin;
166
+ getType(): CSSStyleValueType;
167
+ sumValue(): CSSNumericSumValue;
168
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
169
+ }
170
+ export declare class CSSMathMax extends CSSMathVariadic {
171
+ static create(values: CSSNumericValue[]): CSSMathMax;
172
+ operator: string;
173
+ clone(): CSSMathMax;
174
+ getType(): CSSStyleValueType;
175
+ sumValue(): CSSNumericSumValue;
176
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
177
+ }
178
+ /**
179
+ * Represents the sum of one or more CSSNumericValues.
180
+ * @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
181
+ */
182
+ export declare class CSSMathSum extends CSSMathVariadic {
183
+ static create(values: CSSNumericValue[]): CSSMathSum;
184
+ static numericTypeFromUnitMap(units: UnitMap): CSSNumericValueType;
185
+ static canCreateNumericTypeFromSumValue(sum: CSSNumericSumValue): boolean;
186
+ operator: string;
187
+ clone(): CSSMathSum;
188
+ getType(): CSSStyleValueType;
189
+ sumValue(): CSSNumericSumValue;
190
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
191
+ }
192
+ /**
193
+ * Represents the product of one or more CSSNumericValues.
194
+ * @see https://drafts.css-houdini.org/css-typed-om/#cssmathproduct
195
+ */
196
+ export declare class CSSMathProduct extends CSSMathVariadic {
197
+ static create(values: CSSNumericValue[]): CSSMathProduct;
198
+ static multiplyUnitMaps(a: UnitMap, b: UnitMap): UnitMap;
199
+ operator: string;
200
+ clone(): CSSMathProduct;
201
+ getType(): CSSStyleValueType;
202
+ sumValue(): CSSNumericSumValue;
203
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
204
+ }
205
+ export declare const Opx: CSSUnitValue;
206
+ export declare const Odeg: CSSUnitValue;
207
+ export {};
208
+ //# sourceMappingURL=CSSNumericValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CSSNumericValue.d.ts","sourceRoot":"","sources":["../src/css/cssom/CSSNumericValue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAQ,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAGL,aAAa,EACb,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEtD,oBAAY,YAAY,GAAG,MAAM,GAAG,eAAe,CAAC;AAEpD,aAAK,kBAAkB,GACnB,QAAQ,GACR,OAAO,GACP,MAAM,GACN,WAAW,GACX,YAAY,GACZ,MAAM,GACN,SAAS,CAAC;AAGd,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,kBAAkB,CAAC;CACjC;AAGD,oBAAY,QAAQ;IAClB,OAAO,IAAA;IACP,MAAM,IAAA;IACN,KAAK,IAAA;IACL,UAAU,IAAA;IACV,WAAW,IAAA;IACX,KAAK,IAAA;IACL,QAAQ,IAAA;IACR,aAAa,IAAA;CACd;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,2EAoEhD;AAED,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SSColorValue } from './CSSColorValue';
3
+ import type { Nested, ParenLess } from './types';
4
+ /**
5
+ * The CSSRGB class represents the CSS rgb()/rgba() functions.
6
+ *
7
+ * @see https://drafts.css-houdini.org/css-typed-om-1/#cssrgb
8
+ */
9
+ export declare class CSSRGB extends CSSColorValue {
10
+ r: CSSColorRGBComp;
11
+ g: CSSColorRGBComp;
12
+ b: CSSColorRGBComp;
13
+ alpha: CSSColorPercent;
14
+ /**
15
+ * 'transparent' & 'none' has the same rgba data
16
+ */
17
+ isNone: boolean;
18
+ constructor(r: CSSColorRGBComp, g: CSSColorRGBComp, b: CSSColorRGBComp, alpha?: CSSColorPercent,
19
+ /**
20
+ * 'transparent' & 'none' has the same rgba data
21
+ */
22
+ isNone?: boolean);
23
+ clone(): CSSRGB;
24
+ buildCSSText(n: Nested, p: ParenLess, result: string): string;
25
+ }
26
+ //# sourceMappingURL=CSSRGB.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CSSRGB.d.ts","sourceRoot":"","sources":["../src/css/cssom/CSSRGB.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,aAAa;IAE9B,CAAC,EAAE,eAAe;IAClB,CAAC,EAAE,eAAe;IAClB,CAAC,EAAE,eAAe;IAClB,KAAK,EAAE,eAAe;IAC7B;;OAEG;IACI,MAAM;gBAPN,CAAC,EAAE,eAAe,EAClB,CAAC,EAAE,eAAe,EAClB,CAAC,EAAE,eAAe,EAClB,KAAK,GAAE,eAAmB;IACjC;;OAEG;IACI,MAAM,UAAQ;IAKvB,KAAK;IAIL,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;CAG9D"}
@@ -0,0 +1,46 @@
1
+ import { Nested, ParenLess, UnitCategory, UnitType } from './types';
2
+ export declare enum CSSStyleValueType {
3
+ kUnknownType = 0,
4
+ kUnparsedType = 1,
5
+ kKeywordType = 2,
6
+ kUnitType = 3,
7
+ kSumType = 4,
8
+ kProductType = 5,
9
+ kNegateType = 6,
10
+ kInvertType = 7,
11
+ kMinType = 8,
12
+ kMaxType = 9,
13
+ kClampType = 10,
14
+ kTransformType = 11,
15
+ kPositionType = 12,
16
+ kURLImageType = 13,
17
+ kColorType = 14,
18
+ kUnsupportedColorType = 15
19
+ }
20
+ export declare const unitFromName: (name: string) => UnitType;
21
+ export declare const unitTypeToUnitCategory: (type: UnitType) => UnitCategory;
22
+ export declare const canonicalUnitTypeForCategory: (category: UnitCategory) => UnitType.kUnknown | UnitType.kNumber | UnitType.kPercentage | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds;
23
+ /**
24
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/css_primitive_value.cc#353
25
+ */
26
+ export declare const conversionToCanonicalUnitsScaleFactor: (unit_type: UnitType) => number;
27
+ export declare const unitTypeToString: (type: UnitType) => "em" | "px" | "deg" | "rad" | "grad" | "ms" | "s" | "rem" | "turn" | "" | "%";
28
+ /**
29
+ * CSSStyleValue is the base class for all CSS values accessible from Typed OM.
30
+ * Values that are not yet supported as specific types are also returned as base CSSStyleValues.
31
+ *
32
+ * Spec @see https://drafts.css-houdini.org/css-typed-om/#stylevalue-objects
33
+ * Docs @see https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleValue
34
+ */
35
+ export declare abstract class CSSStyleValue {
36
+ static isAngle(unit: UnitType): boolean;
37
+ static isLength(type: UnitType): boolean;
38
+ static isRelativeUnit(type: UnitType): boolean;
39
+ static isTime(unit: UnitType): boolean;
40
+ protected abstract getType(): CSSStyleValueType;
41
+ abstract buildCSSText(n: Nested, p: ParenLess, result: string): string;
42
+ abstract clone(): CSSStyleValue;
43
+ toString(): string;
44
+ isNumericValue(): boolean;
45
+ }
46
+ //# sourceMappingURL=CSSStyleValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CSSStyleValue.d.ts","sourceRoot":"","sources":["../src/css/cssom/CSSStyleValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAkOpE,oBAAY,iBAAiB;IAC3B,YAAY,IAAA;IACZ,aAAa,IAAA;IACb,YAAY,IAAA;IAEZ,SAAS,IAAA;IACT,QAAQ,IAAA;IACR,YAAY,IAAA;IACZ,WAAW,IAAA;IACX,WAAW,IAAA;IACX,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,UAAU,KAAA;IAEV,cAAc,KAAA;IACd,aAAa,KAAA;IACb,aAAa,KAAA;IACb,UAAU,KAAA;IACV,qBAAqB,KAAA;CACtB;AAkBD,eAAO,MAAM,YAAY,SAAU,MAAM,aAWxC,CAAC;AAEF,eAAO,MAAM,sBAAsB,SAAU,QAAQ,iBAkCpD,CAAC;AAEF,eAAO,MAAM,4BAA4B,aAAc,YAAY,2HAuBlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qCAAqC,cAAe,QAAQ,WAsDxE,CAAC;AAEF,eAAO,MAAM,gBAAgB,SAAU,QAAQ,kFAuH9C,CAAC;AAEF;;;;;;GAMG;AACH,8BAAsB,aAAa;IASjC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ;IAiB7B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ;IAK9B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ;IAYpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ;IAgB5B,SAAS,CAAC,QAAQ,CAAC,OAAO,IAAI,iBAAiB;IAE/C,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAEtE,QAAQ,CAAC,KAAK,IAAI,aAAa;IAI/B,QAAQ,IAAI,MAAM;IAIlB,cAAc;CAMf"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * implements CSS_Typed_OM_API
3
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Typed_OM_API/Guide
4
+ * @see https://github.dev/WebKit/WebKit/blob/main/Source/WebCore/css
5
+ *
6
+ * add CSSProperty API:
7
+ * @see https://codereview.chromium.org/2735093005
8
+ */
9
+ export * from './CSSColorValue';
10
+ export * from './CSSGradientValue';
11
+ export * from './CSSKeywordValue';
12
+ export * from './CSSNumericSumValue';
13
+ export * from './CSSNumericValue';
14
+ export * from './CSSRGB';
15
+ export * from './CSSStyleValue';
16
+ export * from './types';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/css/cssom/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAElC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,39 @@
1
+ export declare enum UnitType {
2
+ kUnknown = 0,
3
+ kNumber = 1,
4
+ kPercentage = 2,
5
+ kEms = 3,
6
+ kPixels = 4,
7
+ kRems = 5,
8
+ kDegrees = 6,
9
+ kRadians = 7,
10
+ kGradians = 8,
11
+ kTurns = 9,
12
+ kMilliseconds = 10,
13
+ kSeconds = 11,
14
+ kInteger = 12
15
+ }
16
+ export declare enum UnitCategory {
17
+ kUNumber = 0,
18
+ kUPercent = 1,
19
+ kULength = 2,
20
+ kUAngle = 3,
21
+ kUTime = 4,
22
+ kUOther = 5
23
+ }
24
+ export declare enum ValueRange {
25
+ kAll = 0,
26
+ kNonNegative = 1,
27
+ kInteger = 2,
28
+ kNonNegativeInteger = 3,
29
+ kPositiveInteger = 4
30
+ }
31
+ export declare enum Nested {
32
+ kYes = 0,
33
+ kNo = 1
34
+ }
35
+ export declare enum ParenLess {
36
+ kYes = 0,
37
+ kNo = 1
38
+ }
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/css/cssom/types.ts"],"names":[],"mappings":"AAEA,oBAAY,QAAQ;IAClB,QAAQ,IAAA;IACR,OAAO,IAAA;IACP,WAAW,IAAA;IAEX,IAAI,IAAA;IAEJ,OAAO,IAAA;IA2CP,KAAK,IAAA;IAIL,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,MAAM,IAAA;IAEN,aAAa,KAAA;IACb,QAAQ,KAAA;IASR,QAAQ,KAAA;CAQT;AAED,oBAAY,YAAY;IACtB,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,QAAQ,IAAA;IACR,OAAO,IAAA;IACP,MAAM,IAAA;IAGN,OAAO,IAAA;CACR;AAED,oBAAY,UAAU;IACpB,IAAI,IAAA;IACJ,YAAY,IAAA;IACZ,QAAQ,IAAA;IACR,mBAAmB,IAAA;IACnB,gBAAgB,IAAA;CACjB;AAED,oBAAY,MAAM;IAChB,IAAI,IAAA;IACJ,GAAG,IAAA;CACJ;AACD,oBAAY,SAAS;IACnB,IAAI,IAAA;IACJ,GAAG,IAAA;CACJ"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model
3
+ */
4
+ export * from './CSS';
5
+ export * from './cssom';
6
+ export * from './CSSProperty';
7
+ export * from './CSSStyleValuePool';
8
+ export * from './interfaces';
9
+ export * from './parser';
10
+ export * from './properties';
11
+ export * from './StyleValueRegistry';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/css/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { Syringe } from 'mana-syringe';
2
+ import type { BaseStyleProps } from '..';
3
+ import type { DisplayObject } from '../display-objects';
4
+ import type { CSSStyleValue } from './cssom';
5
+ import type { CSSProperty } from './CSSProperty';
6
+ /**
7
+ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type
8
+ */
9
+ export declare enum PropertySyntax {
10
+ /**
11
+ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#coordinate
12
+ */
13
+ COORDINATE = "<coordinate>",
14
+ /**
15
+ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#color
16
+ */
17
+ COLOR = "<color>",
18
+ /**
19
+ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#paint
20
+ */
21
+ PAINT = "<paint>",
22
+ /**
23
+ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#number
24
+ */
25
+ NUMBER = "<number>",
26
+ /**
27
+ * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/angle
28
+ */
29
+ ANGLE = "<angle>",
30
+ /**
31
+ * <number> with range 0..1
32
+ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#opacity_value
33
+ */
34
+ OPACITY_VALUE = "<opacity-value>",
35
+ /**
36
+ * <number> with range 0..Infinity
37
+ */
38
+ SHADOW_BLUR = "<shadow-blur>",
39
+ /**
40
+ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#length
41
+ */
42
+ LENGTH = "<length>",
43
+ /**
44
+ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#percentage
45
+ */
46
+ PERCENTAGE = "<percentage>",
47
+ LENGTH_PERCENTAGE = "<length> | <percentage>",
48
+ LENGTH_PERCENTAGE_12 = "[<length> | <percentage>]{1,2}",
49
+ /**
50
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#formal_syntax
51
+ */
52
+ LENGTH_PERCENTAGE_14 = "[<length> | <percentage>]{1,4}",
53
+ /**
54
+ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#list-of-ts
55
+ */
56
+ LIST_OF_POINTS = "<list-of-points>",
57
+ PATH = "<path>",
58
+ /**
59
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/filter#formal_syntax
60
+ */
61
+ FILTER = "<filter>",
62
+ Z_INDEX = "<z-index>",
63
+ OFFSET_PATH = "<offset-path>",
64
+ OFFSET_DISTANCE = "<offset-distance>",
65
+ CLIP_PATH = "<clip-path>",
66
+ MARKER = "<marker>",
67
+ TRANSFORM = "<transform>",
68
+ TRANSFORM_ORIGIN = "<transform-origin>",
69
+ TEXT = "<text>",
70
+ TEXT_TRANSFORM = "<text-transform>"
71
+ }
72
+ export interface PropertyMetadata {
73
+ n: string;
74
+ /**
75
+ * The interpolable flag indicates whether a property can be animated smoothly.
76
+ * Default to `false`.
77
+ */
78
+ int?: boolean;
79
+ /**
80
+ * The property will inherit by default if no value is specified.
81
+ * Default to `false`.
82
+ */
83
+ inh?: boolean;
84
+ /**
85
+ * This property affects only one field on ComputedStyle, and can be set
86
+ * directly during inheritance instead of forcing a recalc.
87
+ */
88
+ ind?: boolean;
89
+ /**
90
+ * This specifies the default value for this field.
91
+ * - for keyword fields, this is the initial keyword
92
+ * - for other fields, this is a string containg the C++ expression that is used to initialise the field.
93
+ */
94
+ d?: string | ((nodeName: string) => string);
95
+ /**
96
+ * The resolved value used for getComputedStyle() depends on layout for this
97
+ * property, which means we may need to update layout to return the correct
98
+ * value from getComputedStyle().
99
+ */
100
+ l?: boolean;
101
+ /**
102
+ * This specifies all valid keyword values for the property.
103
+ */
104
+ k?: string[];
105
+ /**
106
+ * eg. strokeWidth is an alias of lineWidth
107
+ */
108
+ a?: string[];
109
+ /**
110
+ * sort before init attributes according to this priority
111
+ */
112
+ p?: number;
113
+ /**
114
+ * eg. <color> <paint> <number>
115
+ */
116
+ syntax?: string;
117
+ }
118
+ export interface PropertyParseOptions {
119
+ skipUpdateAttribute: boolean;
120
+ skipParse: boolean;
121
+ forceUpdateGeometry: boolean;
122
+ usedAttributes: string[];
123
+ }
124
+ export declare const StyleValueRegistry: Syringe.DefinedToken;
125
+ export interface StyleValueRegistry {
126
+ recalc: (displayObject: DisplayObject) => void;
127
+ registerMetadata: (metadata: PropertyMetadata) => void;
128
+ unregisterMetadata: (name: string) => void;
129
+ getPropertySyntax: (syntax: string) => CSSProperty<any, any>;
130
+ addUnresolveProperty: (object: DisplayObject, name: string) => void;
131
+ processProperties: (object: DisplayObject, attributes: BaseStyleProps, options?: Partial<PropertyParseOptions>) => void;
132
+ parseProperty: (name: string, value: any, object: DisplayObject) => CSSStyleValue;
133
+ computeProperty: (name: string, computed: CSSStyleValue, object: DisplayObject) => any;
134
+ }
135
+ export declare const LayoutRegistry: Syringe.DefinedToken;
136
+ export interface LayoutRegistry {
137
+ hasLayout: (name: string) => boolean;
138
+ getLayout: (name: string) => any;
139
+ }
140
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/css/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,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-0,0 +1,19 @@
1
+ import type { CSSGradientValue } from '../cssom';
2
+ import { CSSRGB } from '../cssom';
3
+ /**
4
+ * @see https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/createPattern
5
+ */
6
+ export interface Pattern {
7
+ image: string | CanvasImageSource;
8
+ repetition: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
9
+ }
10
+ export declare function isPattern(object: any): object is Pattern;
11
+ /**
12
+ * @see https://github.com/WebKit/WebKit/blob/main/Source/WebCore/css/parser/CSSParser.cpp#L97
13
+ */
14
+ export declare const parseColor: {
15
+ (...args: any[]): any;
16
+ cache: Map<any, any>;
17
+ };
18
+ export declare function mergeColors(left: CSSRGB | CSSGradientValue[] | Pattern, right: CSSRGB | CSSGradientValue[] | Pattern): [number[], number[], (color: number[]) => string] | undefined;
19
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../src/css/parser/color.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAAC;IAClC,UAAU,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;CAC9D;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,OAAO,CAExD;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;CAsCrB,CAAC;AAEH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,OAAO,EAC3C,KAAK,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,OAAO,GAC3C,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,GAAG,SAAS,CAkB/D"}