@ohos-ports/html2canvas-pro 0.0.0-stage → 2.3.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +86 -2
- package/dist/html2canvas-pro.cjs +11191 -0
- package/dist/html2canvas-pro.cjs.map +1 -0
- package/dist/html2canvas-pro.esm.js +11182 -0
- package/dist/html2canvas-pro.esm.js.map +1 -0
- package/dist/html2canvas-pro.js +11196 -0
- package/dist/html2canvas-pro.js.map +1 -0
- package/dist/html2canvas-pro.min.js +10 -0
- package/dist/lib/config.js +49 -0
- package/dist/lib/core/abort-helper.js +20 -0
- package/dist/lib/core/background-parser.js +41 -0
- package/dist/lib/core/bitwise.js +5 -0
- package/dist/lib/core/cache-storage.js +268 -0
- package/dist/lib/core/config-assembler.js +88 -0
- package/dist/lib/core/constants.js +25 -0
- package/dist/lib/core/context.js +19 -0
- package/dist/lib/core/debugger.js +27 -0
- package/dist/lib/core/features.js +190 -0
- package/dist/lib/core/logger.js +56 -0
- package/dist/lib/core/lru-map.js +66 -0
- package/dist/lib/core/origin-checker.js +53 -0
- package/dist/lib/core/performance-monitor.js +185 -0
- package/dist/lib/core/render-element.js +132 -0
- package/dist/lib/core/util.js +4 -0
- package/dist/lib/core/validator.js +500 -0
- package/dist/lib/css/grouped/background-styles.js +36 -0
- package/dist/lib/css/grouped/border-styles.js +75 -0
- package/dist/lib/css/grouped/font-styles.js +93 -0
- package/dist/lib/css/grouped/layout-styles.js +127 -0
- package/dist/lib/css/index.js +330 -0
- package/dist/lib/css/layout/bounds.js +52 -0
- package/dist/lib/css/layout/text.js +133 -0
- package/dist/lib/css/property-descriptor.js +2 -0
- package/dist/lib/css/property-descriptors/background-blend-mode.js +41 -0
- package/dist/lib/css/property-descriptors/background-clip.js +23 -0
- package/dist/lib/css/property-descriptors/background-color.js +10 -0
- package/dist/lib/css/property-descriptors/background-image.js +24 -0
- package/dist/lib/css/property-descriptors/background-origin.js +23 -0
- package/dist/lib/css/property-descriptors/background-position.js +19 -0
- package/dist/lib/css/property-descriptors/background-repeat.js +33 -0
- package/dist/lib/css/property-descriptors/background-size.js +23 -0
- package/dist/lib/css/property-descriptors/border-color.js +14 -0
- package/dist/lib/css/property-descriptors/border-image-repeat.js +42 -0
- package/dist/lib/css/property-descriptors/border-image-slice.js +45 -0
- package/dist/lib/css/property-descriptors/border-image-source.js +22 -0
- package/dist/lib/css/property-descriptors/border-radius.js +15 -0
- package/dist/lib/css/property-descriptors/border-style.js +26 -0
- package/dist/lib/css/property-descriptors/border-width.js +20 -0
- package/dist/lib/css/property-descriptors/box-decoration-break.js +18 -0
- package/dist/lib/css/property-descriptors/box-shadow.js +54 -0
- package/dist/lib/css/property-descriptors/clip-path.js +189 -0
- package/dist/lib/css/property-descriptors/color.js +10 -0
- package/dist/lib/css/property-descriptors/content.js +19 -0
- package/dist/lib/css/property-descriptors/counter-increment.js +35 -0
- package/dist/lib/css/property-descriptors/counter-reset.js +18 -0
- package/dist/lib/css/property-descriptors/direction.js +18 -0
- package/dist/lib/css/property-descriptors/display.js +81 -0
- package/dist/lib/css/property-descriptors/duration.js +14 -0
- package/dist/lib/css/property-descriptors/filter.js +76 -0
- package/dist/lib/css/property-descriptors/float.js +22 -0
- package/dist/lib/css/property-descriptors/font-family.js +32 -0
- package/dist/lib/css/property-descriptors/font-size.js +10 -0
- package/dist/lib/css/property-descriptors/font-style.js +20 -0
- package/dist/lib/css/property-descriptors/font-variant-ligatures.js +34 -0
- package/dist/lib/css/property-descriptors/font-variant.js +13 -0
- package/dist/lib/css/property-descriptors/font-weight.js +25 -0
- package/dist/lib/css/property-descriptors/image-rendering.js +33 -0
- package/dist/lib/css/property-descriptors/letter-spacing.js +21 -0
- package/dist/lib/css/property-descriptors/line-break.js +23 -0
- package/dist/lib/css/property-descriptors/line-height.js +24 -0
- package/dist/lib/css/property-descriptors/list-style-image.js +17 -0
- package/dist/lib/css/property-descriptors/list-style-position.js +18 -0
- package/dist/lib/css/property-descriptors/list-style-type.js +122 -0
- package/dist/lib/css/property-descriptors/margin.js +13 -0
- package/dist/lib/css/property-descriptors/mix-blend-mode.js +31 -0
- package/dist/lib/css/property-descriptors/object-fit.js +28 -0
- package/dist/lib/css/property-descriptors/object-position.js +42 -0
- package/dist/lib/css/property-descriptors/opacity.js +16 -0
- package/dist/lib/css/property-descriptors/overflow-wrap.js +18 -0
- package/dist/lib/css/property-descriptors/overflow.js +27 -0
- package/dist/lib/css/property-descriptors/padding.js +14 -0
- package/dist/lib/css/property-descriptors/paint-order.js +33 -0
- package/dist/lib/css/property-descriptors/position.js +22 -0
- package/dist/lib/css/property-descriptors/quotes.js +41 -0
- package/dist/lib/css/property-descriptors/rotate.js +27 -0
- package/dist/lib/css/property-descriptors/text-align.js +21 -0
- package/dist/lib/css/property-descriptors/text-decoration-color.js +10 -0
- package/dist/lib/css/property-descriptors/text-decoration-line.js +28 -0
- package/dist/lib/css/property-descriptors/text-decoration-style.js +24 -0
- package/dist/lib/css/property-descriptors/text-decoration-thickness.js +26 -0
- package/dist/lib/css/property-descriptors/text-overflow.js +18 -0
- package/dist/lib/css/property-descriptors/text-shadow.js +46 -0
- package/dist/lib/css/property-descriptors/text-transform.js +20 -0
- package/dist/lib/css/property-descriptors/text-underline-offset.js +23 -0
- package/dist/lib/css/property-descriptors/transform-origin.js +24 -0
- package/dist/lib/css/property-descriptors/transform.js +57 -0
- package/dist/lib/css/property-descriptors/visibility.js +20 -0
- package/dist/lib/css/property-descriptors/webkit-line-clamp.js +26 -0
- package/dist/lib/css/property-descriptors/webkit-text-stroke-color.js +10 -0
- package/dist/lib/css/property-descriptors/webkit-text-stroke-width.js +16 -0
- package/dist/lib/css/property-descriptors/word-break.js +26 -0
- package/dist/lib/css/property-descriptors/writing-mode.js +28 -0
- package/dist/lib/css/property-descriptors/z-index.js +19 -0
- package/dist/lib/css/property-descriptors/zoom.js +18 -0
- package/dist/lib/css/syntax/parser.js +140 -0
- package/dist/lib/css/syntax/token-constants.js +214 -0
- package/dist/lib/css/syntax/token-singletons.js +36 -0
- package/dist/lib/css/syntax/token-types.js +10 -0
- package/dist/lib/css/syntax/tokenizer.js +502 -0
- package/dist/lib/css/type-descriptor.js +2 -0
- package/dist/lib/css/types/angle.js +80 -0
- package/dist/lib/css/types/color-math.js +25 -0
- package/dist/lib/css/types/color-spaces/a98.js +78 -0
- package/dist/lib/css/types/color-spaces/p3.js +86 -0
- package/dist/lib/css/types/color-spaces/pro-photo.js +83 -0
- package/dist/lib/css/types/color-spaces/rec2020.js +85 -0
- package/dist/lib/css/types/color-spaces/srgb.js +79 -0
- package/dist/lib/css/types/color-utilities.js +342 -0
- package/dist/lib/css/types/color.js +400 -0
- package/dist/lib/css/types/functions/-prefix-linear-gradient.js +32 -0
- package/dist/lib/css/types/functions/-prefix-radial-gradient.js +83 -0
- package/dist/lib/css/types/functions/-webkit-gradient.js +59 -0
- package/dist/lib/css/types/functions/counter.js +367 -0
- package/dist/lib/css/types/functions/gradient.js +163 -0
- package/dist/lib/css/types/functions/linear-gradient.js +27 -0
- package/dist/lib/css/types/functions/radial-gradient.js +90 -0
- package/dist/lib/css/types/functions/repeating-linear-gradient.js +9 -0
- package/dist/lib/css/types/image.js +62 -0
- package/dist/lib/css/types/index.js +2 -0
- package/dist/lib/css/types/length-percentage.js +197 -0
- package/dist/lib/css/types/length.js +5 -0
- package/dist/lib/css/types/safe-eval.js +80 -0
- package/dist/lib/css/types/time.js +17 -0
- package/dist/lib/dom/document-cloner.js +597 -0
- package/dist/lib/dom/dom-normalizer.js +115 -0
- package/dist/lib/dom/element-container.js +56 -0
- package/dist/lib/dom/elements/li-element-container.js +11 -0
- package/dist/lib/dom/elements/ol-element-container.js +12 -0
- package/dist/lib/dom/elements/select-element-container.js +12 -0
- package/dist/lib/dom/elements/textarea-element-container.js +11 -0
- package/dist/lib/dom/node-parser.js +112 -0
- package/dist/lib/dom/node-type-guards.js +81 -0
- package/dist/lib/dom/replaced-elements/canvas-element-container.js +13 -0
- package/dist/lib/dom/replaced-elements/iframe-element-container.js +38 -0
- package/dist/lib/dom/replaced-elements/image-element-container.js +14 -0
- package/dist/lib/dom/replaced-elements/index.js +2 -0
- package/dist/lib/dom/replaced-elements/input-element-container.js +89 -0
- package/dist/lib/dom/replaced-elements/svg-element-container.js +19 -0
- package/dist/lib/dom/slot-cloner.js +176 -0
- package/dist/lib/dom/text-container.js +35 -0
- package/dist/lib/index.js +49 -0
- package/dist/lib/options.js +2 -0
- package/dist/lib/render/background.js +188 -0
- package/dist/lib/render/bezier-curve.js +34 -0
- package/dist/lib/render/border.js +104 -0
- package/dist/lib/render/bound-curves.js +188 -0
- package/dist/lib/render/box-sizing.js +20 -0
- package/dist/lib/render/canvas/background-renderer.js +327 -0
- package/dist/lib/render/canvas/border-image-renderer.js +153 -0
- package/dist/lib/render/canvas/border-renderer.js +184 -0
- package/dist/lib/render/canvas/canvas-path.js +25 -0
- package/dist/lib/render/canvas/canvas-renderer.js +312 -0
- package/dist/lib/render/canvas/content-renderer.js +204 -0
- package/dist/lib/render/canvas/effects-renderer.js +171 -0
- package/dist/lib/render/canvas/font-utils.js +29 -0
- package/dist/lib/render/canvas/foreignobject-renderer.js +38 -0
- package/dist/lib/render/canvas/text/text-decoration-renderer.js +99 -0
- package/dist/lib/render/canvas/text-renderer.js +485 -0
- package/dist/lib/render/effects.js +231 -0
- package/dist/lib/render/font-metrics.js +53 -0
- package/dist/lib/render/object-fit.js +91 -0
- package/dist/lib/render/path.js +26 -0
- package/dist/lib/render/renderer-interface.js +2 -0
- package/dist/lib/render/stacking-context.js +340 -0
- package/dist/lib/render/vector.js +16 -0
- package/dist/types/config.d.ts +44 -0
- package/dist/types/core/abort-helper.d.ts +12 -0
- package/dist/types/core/background-parser.d.ts +16 -0
- package/dist/types/core/bitwise.d.ts +1 -0
- package/dist/types/core/cache-storage.d.ts +68 -0
- package/dist/types/core/config-assembler.d.ts +28 -0
- package/dist/types/core/constants.d.ts +22 -0
- package/dist/types/core/context.d.ts +22 -0
- package/dist/types/core/debugger.d.ts +8 -0
- package/dist/types/core/features.d.ts +12 -0
- package/dist/types/core/logger.d.ts +18 -0
- package/dist/types/core/lru-map.d.ts +37 -0
- package/dist/types/core/origin-checker.d.ts +33 -0
- package/dist/types/core/performance-monitor.d.ts +120 -0
- package/dist/types/core/render-element.d.ts +3 -0
- package/dist/types/core/util.d.ts +1 -0
- package/dist/types/core/validator.d.ts +130 -0
- package/dist/types/css/grouped/background-styles.d.ts +16 -0
- package/dist/types/css/grouped/border-styles.d.ts +31 -0
- package/dist/types/css/grouped/font-styles.d.ts +35 -0
- package/dist/types/css/grouped/layout-styles.d.ts +46 -0
- package/dist/types/css/index.d.ts +185 -0
- package/dist/types/css/layout/bounds.d.ts +14 -0
- package/dist/types/css/layout/text.d.ts +10 -0
- package/dist/types/css/property-descriptor.d.ts +40 -0
- package/dist/types/css/property-descriptors/background-blend-mode.d.ts +23 -0
- package/dist/types/css/property-descriptors/background-clip.d.ts +8 -0
- package/dist/types/css/property-descriptors/background-color.d.ts +2 -0
- package/dist/types/css/property-descriptors/background-image.d.ts +3 -0
- package/dist/types/css/property-descriptors/background-origin.d.ts +8 -0
- package/dist/types/css/property-descriptors/background-position.d.ts +5 -0
- package/dist/types/css/property-descriptors/background-repeat.d.ts +9 -0
- package/dist/types/css/property-descriptors/background-size.d.ts +11 -0
- package/dist/types/css/property-descriptors/border-color.d.ts +5 -0
- package/dist/types/css/property-descriptors/border-image-repeat.d.ts +12 -0
- package/dist/types/css/property-descriptors/border-image-slice.d.ts +10 -0
- package/dist/types/css/property-descriptors/border-image-source.d.ts +4 -0
- package/dist/types/css/property-descriptors/border-radius.d.ts +7 -0
- package/dist/types/css/property-descriptors/border-style.d.ts +12 -0
- package/dist/types/css/property-descriptors/border-width.d.ts +5 -0
- package/dist/types/css/property-descriptors/box-decoration-break.d.ts +6 -0
- package/dist/types/css/property-descriptors/box-shadow.d.ts +14 -0
- package/dist/types/css/property-descriptors/clip-path.d.ts +62 -0
- package/dist/types/css/property-descriptors/color.d.ts +2 -0
- package/dist/types/css/property-descriptors/content.d.ts +4 -0
- package/dist/types/css/property-descriptors/counter-increment.d.ts +10 -0
- package/dist/types/css/property-descriptors/counter-reset.d.ts +7 -0
- package/dist/types/css/property-descriptors/direction.d.ts +6 -0
- package/dist/types/css/property-descriptors/display.d.ts +35 -0
- package/dist/types/css/property-descriptors/duration.d.ts +2 -0
- package/dist/types/css/property-descriptors/filter.d.ts +3 -0
- package/dist/types/css/property-descriptors/float.d.ts +9 -0
- package/dist/types/css/property-descriptors/font-family.d.ts +4 -0
- package/dist/types/css/property-descriptors/font-size.d.ts +2 -0
- package/dist/types/css/property-descriptors/font-style.d.ts +7 -0
- package/dist/types/css/property-descriptors/font-variant-ligatures.d.ts +14 -0
- package/dist/types/css/property-descriptors/font-variant.d.ts +2 -0
- package/dist/types/css/property-descriptors/font-weight.d.ts +2 -0
- package/dist/types/css/property-descriptors/image-rendering.d.ts +8 -0
- package/dist/types/css/property-descriptors/letter-spacing.d.ts +2 -0
- package/dist/types/css/property-descriptors/line-break.d.ts +6 -0
- package/dist/types/css/property-descriptors/line-height.d.ts +4 -0
- package/dist/types/css/property-descriptors/list-style-image.d.ts +3 -0
- package/dist/types/css/property-descriptors/list-style-position.d.ts +6 -0
- package/dist/types/css/property-descriptors/list-style-type.d.ts +58 -0
- package/dist/types/css/property-descriptors/margin.d.ts +5 -0
- package/dist/types/css/property-descriptors/mix-blend-mode.d.ts +21 -0
- package/dist/types/css/property-descriptors/object-fit.d.ts +10 -0
- package/dist/types/css/property-descriptors/object-position.d.ts +4 -0
- package/dist/types/css/property-descriptors/opacity.d.ts +2 -0
- package/dist/types/css/property-descriptors/overflow-wrap.d.ts +6 -0
- package/dist/types/css/property-descriptors/overflow.d.ts +9 -0
- package/dist/types/css/property-descriptors/padding.d.ts +5 -0
- package/dist/types/css/property-descriptors/paint-order.d.ts +8 -0
- package/dist/types/css/property-descriptors/position.d.ts +9 -0
- package/dist/types/css/property-descriptors/quotes.d.ts +8 -0
- package/dist/types/css/property-descriptors/rotate.d.ts +3 -0
- package/dist/types/css/property-descriptors/text-align.d.ts +7 -0
- package/dist/types/css/property-descriptors/text-decoration-color.d.ts +2 -0
- package/dist/types/css/property-descriptors/text-decoration-line.d.ts +10 -0
- package/dist/types/css/property-descriptors/text-decoration-style.d.ts +9 -0
- package/dist/types/css/property-descriptors/text-decoration-thickness.d.ts +3 -0
- package/dist/types/css/property-descriptors/text-overflow.d.ts +6 -0
- package/dist/types/css/property-descriptors/text-shadow.d.ts +12 -0
- package/dist/types/css/property-descriptors/text-transform.d.ts +8 -0
- package/dist/types/css/property-descriptors/text-underline-offset.d.ts +3 -0
- package/dist/types/css/property-descriptors/transform-origin.d.ts +4 -0
- package/dist/types/css/property-descriptors/transform.d.ts +4 -0
- package/dist/types/css/property-descriptors/visibility.d.ts +7 -0
- package/dist/types/css/property-descriptors/webkit-line-clamp.d.ts +7 -0
- package/dist/types/css/property-descriptors/webkit-text-stroke-color.d.ts +2 -0
- package/dist/types/css/property-descriptors/webkit-text-stroke-width.d.ts +2 -0
- package/dist/types/css/property-descriptors/word-break.d.ts +7 -0
- package/dist/types/css/property-descriptors/writing-mode.d.ts +11 -0
- package/dist/types/css/property-descriptors/z-index.d.ts +7 -0
- package/dist/types/css/property-descriptors/zoom.d.ts +3 -0
- package/dist/types/css/syntax/parser.d.ts +34 -0
- package/dist/types/css/syntax/token-constants.d.ts +74 -0
- package/dist/types/css/syntax/token-singletons.d.ts +22 -0
- package/dist/types/css/syntax/token-types.d.ts +72 -0
- package/dist/types/css/syntax/tokenizer.d.ts +32 -0
- package/dist/types/css/type-descriptor.d.ts +6 -0
- package/dist/types/css/types/angle.d.ts +7 -0
- package/dist/types/css/types/color-math.d.ts +12 -0
- package/dist/types/css/types/color-spaces/a98.d.ts +39 -0
- package/dist/types/css/types/color-spaces/p3.d.ts +45 -0
- package/dist/types/css/types/color-spaces/pro-photo.d.ts +45 -0
- package/dist/types/css/types/color-spaces/rec2020.d.ts +45 -0
- package/dist/types/css/types/color-spaces/srgb.d.ts +38 -0
- package/dist/types/css/types/color-utilities.d.ts +107 -0
- package/dist/types/css/types/color.d.ts +8 -0
- package/dist/types/css/types/functions/-prefix-linear-gradient.d.ts +4 -0
- package/dist/types/css/types/functions/-prefix-radial-gradient.d.ts +4 -0
- package/dist/types/css/types/functions/-webkit-gradient.d.ts +4 -0
- package/dist/types/css/types/functions/counter.d.ts +10 -0
- package/dist/types/css/types/functions/gradient.d.ts +7 -0
- package/dist/types/css/types/functions/linear-gradient.d.ts +4 -0
- package/dist/types/css/types/functions/radial-gradient.d.ts +12 -0
- package/dist/types/css/types/functions/repeating-linear-gradient.d.ts +4 -0
- package/dist/types/css/types/image.d.ts +56 -0
- package/dist/types/css/types/index.d.ts +1 -0
- package/dist/types/css/types/length-percentage.d.ts +62 -0
- package/dist/types/css/types/length.d.ts +4 -0
- package/dist/types/css/types/safe-eval.d.ts +8 -0
- package/dist/types/css/types/time.d.ts +2 -0
- package/dist/types/dom/document-cloner.d.ts +57 -0
- package/dist/types/dom/dom-normalizer.d.ts +62 -0
- package/dist/types/dom/element-container.d.ts +31 -0
- package/dist/types/dom/elements/li-element-container.d.ts +6 -0
- package/dist/types/dom/elements/ol-element-container.d.ts +7 -0
- package/dist/types/dom/elements/select-element-container.d.ts +6 -0
- package/dist/types/dom/elements/textarea-element-container.d.ts +6 -0
- package/dist/types/dom/node-parser.d.ts +3 -0
- package/dist/types/dom/node-type-guards.d.ts +32 -0
- package/dist/types/dom/replaced-elements/canvas-element-container.d.ts +8 -0
- package/dist/types/dom/replaced-elements/iframe-element-container.d.ts +14 -0
- package/dist/types/dom/replaced-elements/image-element-container.d.ts +8 -0
- package/dist/types/dom/replaced-elements/index.d.ts +4 -0
- package/dist/types/dom/replaced-elements/input-element-container.d.ts +14 -0
- package/dist/types/dom/replaced-elements/svg-element-container.d.ts +8 -0
- package/dist/types/dom/slot-cloner.d.ts +66 -0
- package/dist/types/dom/text-container.d.ts +8 -0
- package/dist/types/index.d.ts +36 -0
- package/dist/types/options.d.ts +62 -0
- package/dist/types/render/background.d.ts +16 -0
- package/dist/types/render/bezier-curve.d.ts +14 -0
- package/dist/types/render/border.d.ts +6 -0
- package/dist/types/render/bound-curves.d.ts +32 -0
- package/dist/types/render/box-sizing.d.ts +4 -0
- package/dist/types/render/canvas/background-renderer.d.ts +94 -0
- package/dist/types/render/canvas/border-image-renderer.d.ts +18 -0
- package/dist/types/render/canvas/border-renderer.d.ts +67 -0
- package/dist/types/render/canvas/canvas-path.d.ts +3 -0
- package/dist/types/render/canvas/canvas-renderer.d.ts +60 -0
- package/dist/types/render/canvas/content-renderer.d.ts +43 -0
- package/dist/types/render/canvas/effects-renderer.d.ts +90 -0
- package/dist/types/render/canvas/font-utils.d.ts +19 -0
- package/dist/types/render/canvas/foreignobject-renderer.d.ts +10 -0
- package/dist/types/render/canvas/text/text-decoration-renderer.d.ts +18 -0
- package/dist/types/render/canvas/text-renderer.d.ts +103 -0
- package/dist/types/render/effects.d.ts +112 -0
- package/dist/types/render/font-metrics.d.ts +11 -0
- package/dist/types/render/object-fit.d.ts +19 -0
- package/dist/types/render/path.d.ts +13 -0
- package/dist/types/render/renderer-interface.d.ts +28 -0
- package/dist/types/render/stacking-context.d.ts +49 -0
- package/dist/types/render/vector.d.ts +9 -0
- package/package.json +139 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IPropertyListDescriptor } from '../property-descriptor';
|
|
2
|
+
export declare const enum TEXT_DECORATION_LINE {
|
|
3
|
+
NONE = 0,
|
|
4
|
+
UNDERLINE = 1,
|
|
5
|
+
OVERLINE = 2,
|
|
6
|
+
LINE_THROUGH = 3,
|
|
7
|
+
BLINK = 4
|
|
8
|
+
}
|
|
9
|
+
export type TextDecorationLine = TEXT_DECORATION_LINE[];
|
|
10
|
+
export declare const textDecorationLine: IPropertyListDescriptor<TextDecorationLine>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPropertyIdentValueDescriptor } from '../property-descriptor';
|
|
2
|
+
export declare const enum TEXT_DECORATION_STYLE {
|
|
3
|
+
SOLID = 0,
|
|
4
|
+
DOUBLE = 1,
|
|
5
|
+
DOTTED = 2,
|
|
6
|
+
DASHED = 3,
|
|
7
|
+
WAVY = 4
|
|
8
|
+
}
|
|
9
|
+
export declare const textDecorationStyle: IPropertyIdentValueDescriptor<TEXT_DECORATION_STYLE>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPropertyListDescriptor } from '../property-descriptor';
|
|
2
|
+
import { Color } from '../types/color';
|
|
3
|
+
import { Length } from '../types/length';
|
|
4
|
+
export type TextShadow = TextShadowItem[];
|
|
5
|
+
interface TextShadowItem {
|
|
6
|
+
color: Color;
|
|
7
|
+
offsetX: Length;
|
|
8
|
+
offsetY: Length;
|
|
9
|
+
blur: Length;
|
|
10
|
+
}
|
|
11
|
+
export declare const textShadow: IPropertyListDescriptor<TextShadow>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IPropertyIdentValueDescriptor } from '../property-descriptor';
|
|
2
|
+
export declare const enum TEXT_TRANSFORM {
|
|
3
|
+
NONE = 0,
|
|
4
|
+
LOWERCASE = 1,
|
|
5
|
+
UPPERCASE = 2,
|
|
6
|
+
CAPITALIZE = 3
|
|
7
|
+
}
|
|
8
|
+
export declare const textTransform: IPropertyIdentValueDescriptor<TEXT_TRANSFORM>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IPropertyListDescriptor } from '../property-descriptor';
|
|
2
|
+
import { LengthPercentage } from '../types/length-percentage';
|
|
3
|
+
export type TransformOrigin = [LengthPercentage, LengthPercentage];
|
|
4
|
+
export declare const transformOrigin: IPropertyListDescriptor<TransformOrigin>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IPropertyValueDescriptor } from '../property-descriptor';
|
|
2
|
+
/**
|
|
3
|
+
* -webkit-line-clamp property descriptor
|
|
4
|
+
* Used with display: -webkit-box and -webkit-box-orient: vertical
|
|
5
|
+
* to limit text to a specific number of lines
|
|
6
|
+
*/
|
|
7
|
+
export declare const webkitLineClamp: IPropertyValueDescriptor<number>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPropertyIdentValueDescriptor } from '../property-descriptor';
|
|
2
|
+
export declare const enum WRITING_MODE {
|
|
3
|
+
HORIZONTAL_TB = 0,
|
|
4
|
+
VERTICAL_RL = 1,
|
|
5
|
+
VERTICAL_LR = 2,
|
|
6
|
+
SIDEWAYS_RL = 3,
|
|
7
|
+
SIDEWAYS_LR = 4
|
|
8
|
+
}
|
|
9
|
+
export declare const isVerticalWritingMode: (writingMode: WRITING_MODE) => boolean;
|
|
10
|
+
export declare const isSidewaysWritingMode: (writingMode: WRITING_MODE) => boolean;
|
|
11
|
+
export declare const writingMode: IPropertyIdentValueDescriptor<WRITING_MODE>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CSSToken, DimensionToken, NumberValueToken, StringValueToken, TokenType } from './tokenizer';
|
|
2
|
+
export type CSSBlockType = TokenType.LEFT_PARENTHESIS_TOKEN | TokenType.LEFT_SQUARE_BRACKET_TOKEN | TokenType.LEFT_CURLY_BRACKET_TOKEN;
|
|
3
|
+
export interface CSSBlock {
|
|
4
|
+
type: CSSBlockType;
|
|
5
|
+
values: CSSValue[];
|
|
6
|
+
}
|
|
7
|
+
export interface CSSFunction {
|
|
8
|
+
type: TokenType.FUNCTION;
|
|
9
|
+
name: string;
|
|
10
|
+
values: CSSValue[];
|
|
11
|
+
}
|
|
12
|
+
export type CSSValue = CSSFunction | CSSToken | CSSBlock;
|
|
13
|
+
export declare class Parser {
|
|
14
|
+
private _tokens;
|
|
15
|
+
constructor(tokens: CSSToken[]);
|
|
16
|
+
static create(value: string): Parser;
|
|
17
|
+
static parseValue(value: string): CSSValue;
|
|
18
|
+
static parseValues(value: string): CSSValue[];
|
|
19
|
+
parseComponentValue(): CSSValue;
|
|
20
|
+
parseComponentValues(): CSSValue[];
|
|
21
|
+
private consumeComponentValue;
|
|
22
|
+
private consumeSimpleBlock;
|
|
23
|
+
private consumeFunction;
|
|
24
|
+
private consumeToken;
|
|
25
|
+
private reconsumeToken;
|
|
26
|
+
}
|
|
27
|
+
export declare const isDimensionToken: (token: CSSValue) => token is DimensionToken;
|
|
28
|
+
export declare const isNumberToken: (token: CSSValue) => token is NumberValueToken;
|
|
29
|
+
export declare const isIdentToken: (token: CSSValue) => token is StringValueToken;
|
|
30
|
+
export declare const isStringToken: (token: CSSValue) => token is StringValueToken;
|
|
31
|
+
export declare const isIdentWithValue: (token: CSSValue, value: string) => boolean;
|
|
32
|
+
export declare const nonWhiteSpace: (token: CSSValue) => boolean;
|
|
33
|
+
export declare const nonFunctionArgSeparator: (token: CSSValue) => boolean;
|
|
34
|
+
export declare const parseFunctionArgs: (tokens: CSSValue[]) => CSSValue[][];
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
declare const LINE_FEED = 10;
|
|
2
|
+
declare const SOLIDUS = 47;
|
|
3
|
+
declare const REVERSE_SOLIDUS = 92;
|
|
4
|
+
declare const CHARACTER_TABULATION = 9;
|
|
5
|
+
declare const SPACE = 32;
|
|
6
|
+
declare const QUOTATION_MARK = 34;
|
|
7
|
+
declare const EQUALS_SIGN = 61;
|
|
8
|
+
declare const NUMBER_SIGN = 35;
|
|
9
|
+
declare const DOLLAR_SIGN = 36;
|
|
10
|
+
declare const PERCENTAGE_SIGN = 37;
|
|
11
|
+
declare const APOSTROPHE = 39;
|
|
12
|
+
declare const LEFT_PARENTHESIS = 40;
|
|
13
|
+
declare const RIGHT_PARENTHESIS = 41;
|
|
14
|
+
declare const LOW_LINE = 95;
|
|
15
|
+
declare const HYPHEN_MINUS = 45;
|
|
16
|
+
declare const EXCLAMATION_MARK = 33;
|
|
17
|
+
declare const LESS_THAN_SIGN = 60;
|
|
18
|
+
declare const GREATER_THAN_SIGN = 62;
|
|
19
|
+
declare const COMMERCIAL_AT = 64;
|
|
20
|
+
declare const LEFT_SQUARE_BRACKET = 91;
|
|
21
|
+
declare const RIGHT_SQUARE_BRACKET = 93;
|
|
22
|
+
declare const CIRCUMFLEX_ACCENT = 61;
|
|
23
|
+
declare const LEFT_CURLY_BRACKET = 123;
|
|
24
|
+
declare const QUESTION_MARK = 63;
|
|
25
|
+
declare const RIGHT_CURLY_BRACKET = 125;
|
|
26
|
+
declare const VERTICAL_LINE = 124;
|
|
27
|
+
declare const TILDE = 126;
|
|
28
|
+
declare const CONTROL = 128;
|
|
29
|
+
declare const REPLACEMENT_CHARACTER = 65533;
|
|
30
|
+
declare const ASTERISK = 42;
|
|
31
|
+
declare const PLUS_SIGN = 43;
|
|
32
|
+
declare const COMMA = 44;
|
|
33
|
+
declare const COLON = 58;
|
|
34
|
+
declare const SEMICOLON = 59;
|
|
35
|
+
declare const FULL_STOP = 46;
|
|
36
|
+
declare const NULL = 0;
|
|
37
|
+
declare const BACKSPACE = 8;
|
|
38
|
+
declare const LINE_TABULATION = 11;
|
|
39
|
+
declare const SHIFT_OUT = 14;
|
|
40
|
+
declare const INFORMATION_SEPARATOR_ONE = 31;
|
|
41
|
+
declare const DELETE = 127;
|
|
42
|
+
declare const EOF = -1;
|
|
43
|
+
declare const ZERO = 48;
|
|
44
|
+
declare const a = 97;
|
|
45
|
+
declare const e = 101;
|
|
46
|
+
declare const f = 102;
|
|
47
|
+
declare const u = 117;
|
|
48
|
+
declare const z = 122;
|
|
49
|
+
declare const A = 65;
|
|
50
|
+
declare const E = 69;
|
|
51
|
+
declare const F = 70;
|
|
52
|
+
declare const U = 85;
|
|
53
|
+
declare const Z = 90;
|
|
54
|
+
/** Re-exported code-point constants used by the Tokenizer class internally. */
|
|
55
|
+
export { LINE_FEED, SOLIDUS, REVERSE_SOLIDUS, CHARACTER_TABULATION, SPACE, QUOTATION_MARK, EQUALS_SIGN, NUMBER_SIGN, DOLLAR_SIGN, PERCENTAGE_SIGN, APOSTROPHE, LEFT_PARENTHESIS, RIGHT_PARENTHESIS, LOW_LINE, HYPHEN_MINUS, EXCLAMATION_MARK, LESS_THAN_SIGN, GREATER_THAN_SIGN, COMMERCIAL_AT, LEFT_SQUARE_BRACKET, RIGHT_SQUARE_BRACKET, CIRCUMFLEX_ACCENT, LEFT_CURLY_BRACKET, QUESTION_MARK, RIGHT_CURLY_BRACKET, VERTICAL_LINE, TILDE, CONTROL, REPLACEMENT_CHARACTER, ASTERISK, PLUS_SIGN, COMMA, COLON, SEMICOLON, FULL_STOP, NULL, BACKSPACE, LINE_TABULATION, SHIFT_OUT, INFORMATION_SEPARATOR_ONE, DELETE, EOF, ZERO, a, e, f, u, z, A, E, F, U, Z };
|
|
56
|
+
declare const isDigit: (codePoint: number) => boolean;
|
|
57
|
+
declare const isSurrogateCodePoint: (codePoint: number) => boolean;
|
|
58
|
+
declare const isHex: (codePoint: number) => boolean;
|
|
59
|
+
declare const isLowerCaseLetter: (codePoint: number) => boolean;
|
|
60
|
+
declare const isUpperCaseLetter: (codePoint: number) => boolean;
|
|
61
|
+
declare const isLetter: (codePoint: number) => boolean;
|
|
62
|
+
declare const isNonASCIICodePoint: (codePoint: number) => boolean;
|
|
63
|
+
declare const isWhiteSpace: (codePoint: number) => boolean;
|
|
64
|
+
declare const isNameStartCodePoint: (codePoint: number) => boolean;
|
|
65
|
+
declare const isNameCodePoint: (codePoint: number) => boolean;
|
|
66
|
+
declare const isNonPrintableCodePoint: (codePoint: number) => boolean;
|
|
67
|
+
declare const isValidEscape: (c1: number, c2: number) => boolean;
|
|
68
|
+
declare const isIdentifierStart: (c1: number, c2: number, c3: number) => boolean;
|
|
69
|
+
declare const isNumberStart: (c1: number, c2: number, c3: number) => boolean;
|
|
70
|
+
/** Re-exported character-classification predicates. */
|
|
71
|
+
export { isDigit, isSurrogateCodePoint, isHex, isLowerCaseLetter, isUpperCaseLetter, isLetter, isNonASCIICodePoint, isWhiteSpace, isNameStartCodePoint, isNameCodePoint, isNonPrintableCodePoint, isValidEscape, isIdentifierStart, isNumberStart };
|
|
72
|
+
declare const stringToNumber: (codePoints: number[]) => number;
|
|
73
|
+
/** Re-exported helper: converts an array of code points to a JS number. */
|
|
74
|
+
export { stringToNumber };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Token } from './token-types';
|
|
2
|
+
export declare const LEFT_PARENTHESIS_TOKEN: Token;
|
|
3
|
+
export declare const RIGHT_PARENTHESIS_TOKEN: Token;
|
|
4
|
+
export declare const COMMA_TOKEN: Token;
|
|
5
|
+
export declare const SUFFIX_MATCH_TOKEN: Token;
|
|
6
|
+
export declare const PREFIX_MATCH_TOKEN: Token;
|
|
7
|
+
export declare const COLUMN_TOKEN: Token;
|
|
8
|
+
export declare const DASH_MATCH_TOKEN: Token;
|
|
9
|
+
export declare const INCLUDE_MATCH_TOKEN: Token;
|
|
10
|
+
export declare const LEFT_CURLY_BRACKET_TOKEN: Token;
|
|
11
|
+
export declare const RIGHT_CURLY_BRACKET_TOKEN: Token;
|
|
12
|
+
export declare const SUBSTRING_MATCH_TOKEN: Token;
|
|
13
|
+
export declare const BAD_URL_TOKEN: Token;
|
|
14
|
+
export declare const BAD_STRING_TOKEN: Token;
|
|
15
|
+
export declare const CDO_TOKEN: Token;
|
|
16
|
+
export declare const CDC_TOKEN: Token;
|
|
17
|
+
export declare const COLON_TOKEN: Token;
|
|
18
|
+
export declare const SEMICOLON_TOKEN: Token;
|
|
19
|
+
export declare const LEFT_SQUARE_BRACKET_TOKEN: Token;
|
|
20
|
+
export declare const RIGHT_SQUARE_BRACKET_TOKEN: Token;
|
|
21
|
+
export declare const WHITESPACE_TOKEN: Token;
|
|
22
|
+
export declare const EOF_TOKEN: Token;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export declare const enum TokenType {
|
|
2
|
+
STRING_TOKEN = 0,
|
|
3
|
+
BAD_STRING_TOKEN = 1,
|
|
4
|
+
LEFT_PARENTHESIS_TOKEN = 2,
|
|
5
|
+
RIGHT_PARENTHESIS_TOKEN = 3,
|
|
6
|
+
COMMA_TOKEN = 4,
|
|
7
|
+
HASH_TOKEN = 5,
|
|
8
|
+
DELIM_TOKEN = 6,
|
|
9
|
+
AT_KEYWORD_TOKEN = 7,
|
|
10
|
+
PREFIX_MATCH_TOKEN = 8,
|
|
11
|
+
DASH_MATCH_TOKEN = 9,
|
|
12
|
+
INCLUDE_MATCH_TOKEN = 10,
|
|
13
|
+
LEFT_CURLY_BRACKET_TOKEN = 11,
|
|
14
|
+
RIGHT_CURLY_BRACKET_TOKEN = 12,
|
|
15
|
+
SUFFIX_MATCH_TOKEN = 13,
|
|
16
|
+
SUBSTRING_MATCH_TOKEN = 14,
|
|
17
|
+
DIMENSION_TOKEN = 15,
|
|
18
|
+
PERCENTAGE_TOKEN = 16,
|
|
19
|
+
NUMBER_TOKEN = 17,
|
|
20
|
+
FUNCTION = 18,
|
|
21
|
+
FUNCTION_TOKEN = 19,
|
|
22
|
+
IDENT_TOKEN = 20,
|
|
23
|
+
COLUMN_TOKEN = 21,
|
|
24
|
+
URL_TOKEN = 22,
|
|
25
|
+
BAD_URL_TOKEN = 23,
|
|
26
|
+
CDC_TOKEN = 24,
|
|
27
|
+
CDO_TOKEN = 25,
|
|
28
|
+
COLON_TOKEN = 26,
|
|
29
|
+
SEMICOLON_TOKEN = 27,
|
|
30
|
+
LEFT_SQUARE_BRACKET_TOKEN = 28,
|
|
31
|
+
RIGHT_SQUARE_BRACKET_TOKEN = 29,
|
|
32
|
+
UNICODE_RANGE_TOKEN = 30,
|
|
33
|
+
WHITESPACE_TOKEN = 31,
|
|
34
|
+
EOF_TOKEN = 32
|
|
35
|
+
}
|
|
36
|
+
interface IToken {
|
|
37
|
+
type: TokenType;
|
|
38
|
+
}
|
|
39
|
+
export interface Token extends IToken {
|
|
40
|
+
type: TokenType.BAD_URL_TOKEN | TokenType.BAD_STRING_TOKEN | TokenType.LEFT_PARENTHESIS_TOKEN | TokenType.RIGHT_PARENTHESIS_TOKEN | TokenType.COMMA_TOKEN | TokenType.SUBSTRING_MATCH_TOKEN | TokenType.PREFIX_MATCH_TOKEN | TokenType.SUFFIX_MATCH_TOKEN | TokenType.COLON_TOKEN | TokenType.SEMICOLON_TOKEN | TokenType.LEFT_SQUARE_BRACKET_TOKEN | TokenType.RIGHT_SQUARE_BRACKET_TOKEN | TokenType.LEFT_CURLY_BRACKET_TOKEN | TokenType.RIGHT_CURLY_BRACKET_TOKEN | TokenType.DASH_MATCH_TOKEN | TokenType.INCLUDE_MATCH_TOKEN | TokenType.COLUMN_TOKEN | TokenType.WHITESPACE_TOKEN | TokenType.CDC_TOKEN | TokenType.CDO_TOKEN | TokenType.EOF_TOKEN;
|
|
41
|
+
}
|
|
42
|
+
export interface StringValueToken extends IToken {
|
|
43
|
+
type: TokenType.STRING_TOKEN | TokenType.DELIM_TOKEN | TokenType.FUNCTION_TOKEN | TokenType.IDENT_TOKEN | TokenType.URL_TOKEN | TokenType.AT_KEYWORD_TOKEN;
|
|
44
|
+
value: string;
|
|
45
|
+
}
|
|
46
|
+
export interface HashToken extends IToken {
|
|
47
|
+
type: TokenType.HASH_TOKEN;
|
|
48
|
+
flags: number;
|
|
49
|
+
value: string;
|
|
50
|
+
}
|
|
51
|
+
export interface NumberValueToken extends IToken {
|
|
52
|
+
type: TokenType.PERCENTAGE_TOKEN | TokenType.NUMBER_TOKEN;
|
|
53
|
+
flags: number;
|
|
54
|
+
number: number;
|
|
55
|
+
}
|
|
56
|
+
export interface DimensionToken extends IToken {
|
|
57
|
+
type: TokenType.DIMENSION_TOKEN;
|
|
58
|
+
flags: number;
|
|
59
|
+
unit: string;
|
|
60
|
+
number: number;
|
|
61
|
+
}
|
|
62
|
+
export interface UnicodeRangeToken extends IToken {
|
|
63
|
+
type: TokenType.UNICODE_RANGE_TOKEN;
|
|
64
|
+
start: number;
|
|
65
|
+
end: number;
|
|
66
|
+
}
|
|
67
|
+
export type CSSToken = Token | StringValueToken | NumberValueToken | DimensionToken | UnicodeRangeToken | HashToken;
|
|
68
|
+
export declare const FLAG_UNRESTRICTED: number;
|
|
69
|
+
export declare const FLAG_ID: number;
|
|
70
|
+
export declare const FLAG_INTEGER: number;
|
|
71
|
+
export declare const FLAG_NUMBER: number;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { CSSToken } from './token-types';
|
|
2
|
+
export { TokenType } from './token-types';
|
|
3
|
+
export type { Token, StringValueToken, HashToken, NumberValueToken, DimensionToken, UnicodeRangeToken, CSSToken } from './token-types';
|
|
4
|
+
export { FLAG_UNRESTRICTED, FLAG_ID, FLAG_INTEGER, FLAG_NUMBER } from './token-types';
|
|
5
|
+
export { isDigit, isHex, isWhiteSpace, isNameCodePoint, isValidEscape, isIdentifierStart, isNameStartCodePoint, isNumberStart } from './token-constants';
|
|
6
|
+
export { COMMA_TOKEN, COLON_TOKEN, SEMICOLON_TOKEN, LEFT_PARENTHESIS_TOKEN, RIGHT_PARENTHESIS_TOKEN, LEFT_CURLY_BRACKET_TOKEN, RIGHT_CURLY_BRACKET_TOKEN, LEFT_SQUARE_BRACKET_TOKEN, RIGHT_SQUARE_BRACKET_TOKEN, WHITESPACE_TOKEN, EOF_TOKEN, BAD_URL_TOKEN, BAD_STRING_TOKEN, CDC_TOKEN, CDO_TOKEN, PREFIX_MATCH_TOKEN, SUFFIX_MATCH_TOKEN, SUBSTRING_MATCH_TOKEN, DASH_MATCH_TOKEN, INCLUDE_MATCH_TOKEN, COLUMN_TOKEN } from './token-singletons';
|
|
7
|
+
export declare class Tokenizer {
|
|
8
|
+
private static _pool;
|
|
9
|
+
private static readonly MAX_POOL_SIZE;
|
|
10
|
+
static get(): Tokenizer;
|
|
11
|
+
static release(tokenizer: Tokenizer): void;
|
|
12
|
+
private _value;
|
|
13
|
+
constructor();
|
|
14
|
+
private _reset;
|
|
15
|
+
write(chunk: string): void;
|
|
16
|
+
read(): CSSToken[];
|
|
17
|
+
private consumeToken;
|
|
18
|
+
private consumeCodePoint;
|
|
19
|
+
private reconsumeCodePoint;
|
|
20
|
+
private peekCodePoint;
|
|
21
|
+
private consumeUnicodeRangeToken;
|
|
22
|
+
private consumeIdentLikeToken;
|
|
23
|
+
private consumeUrlToken;
|
|
24
|
+
private consumeWhiteSpace;
|
|
25
|
+
private consumeBadUrlRemnants;
|
|
26
|
+
private consumeStringSlice;
|
|
27
|
+
private consumeStringToken;
|
|
28
|
+
private consumeNumber;
|
|
29
|
+
private consumeNumericToken;
|
|
30
|
+
private consumeEscapedCodePoint;
|
|
31
|
+
private consumeName;
|
|
32
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CSSValue } from '../syntax/parser';
|
|
2
|
+
import { ITypeDescriptor } from '../type-descriptor';
|
|
3
|
+
import { GradientCorner } from './image';
|
|
4
|
+
export declare const angle: ITypeDescriptor<number>;
|
|
5
|
+
export declare const isAngle: (value: CSSValue) => boolean;
|
|
6
|
+
export declare const parseNamedSide: (tokens: CSSValue[]) => number | GradientCorner;
|
|
7
|
+
export declare const deg: (deg: number) => number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color mathematics utilities
|
|
3
|
+
* Extracted to break circular dependency between srgb.ts and color-utilities.ts
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Clamp a value between min and max
|
|
7
|
+
*/
|
|
8
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
9
|
+
/**
|
|
10
|
+
* Multiply two 3x3 matrices
|
|
11
|
+
*/
|
|
12
|
+
export declare const multiplyMatrices: (A: number[], B: number[]) => [number, number, number];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A98-RGB related functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert XYZ to a98 linear
|
|
6
|
+
*
|
|
7
|
+
* @param xyz
|
|
8
|
+
*/
|
|
9
|
+
export declare const xyz2a98Linear: (xyz: [number, number, number]) => [number, number, number];
|
|
10
|
+
/**
|
|
11
|
+
* Convert XYZ to a98 linear
|
|
12
|
+
*
|
|
13
|
+
* @param a98
|
|
14
|
+
*/
|
|
15
|
+
export declare const a98Linear2xyz: (a98: [number, number, number]) => [number, number, number];
|
|
16
|
+
/**
|
|
17
|
+
* Convert A98 RGB to rgb linear
|
|
18
|
+
*
|
|
19
|
+
* @param rgb
|
|
20
|
+
*/
|
|
21
|
+
export declare const a982a98Linear: (rgb: [number, number, number]) => [number, number, number];
|
|
22
|
+
/**
|
|
23
|
+
* Convert A98 RGB Linear to A98
|
|
24
|
+
*
|
|
25
|
+
* @param rgb
|
|
26
|
+
*/
|
|
27
|
+
export declare const a98Linear2a98: (rgb: [number, number, number]) => [number, number, number];
|
|
28
|
+
/**
|
|
29
|
+
* Convert XYZ to A98
|
|
30
|
+
*
|
|
31
|
+
* @param args
|
|
32
|
+
*/
|
|
33
|
+
export declare const a98FromXYZ: (args: [number, number, number, number]) => [number, number, number, number];
|
|
34
|
+
/**
|
|
35
|
+
* Convert A98 to XYZ and Pack
|
|
36
|
+
*
|
|
37
|
+
* @param args
|
|
38
|
+
*/
|
|
39
|
+
export declare const convertA98rgb: (args: number[]) => number;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display-P3 related functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert P3 Linear to xyz
|
|
6
|
+
*
|
|
7
|
+
* @param p3l
|
|
8
|
+
*/
|
|
9
|
+
export declare const p3LinearToXyz: (p3l: [number, number, number]) => [number, number, number];
|
|
10
|
+
/**
|
|
11
|
+
* Convert XYZ to P3 Linear
|
|
12
|
+
*
|
|
13
|
+
* @param xyz
|
|
14
|
+
*/
|
|
15
|
+
export declare const xyzToP3Linear: (xyz: [number, number, number]) => [number, number, number];
|
|
16
|
+
/**
|
|
17
|
+
* Convert P3 to P3 linear
|
|
18
|
+
*
|
|
19
|
+
* @param p3
|
|
20
|
+
*/
|
|
21
|
+
export declare const p32p3Linear: (p3: [number, number, number]) => number[];
|
|
22
|
+
/**
|
|
23
|
+
* Convert P3 Linear to P3
|
|
24
|
+
*
|
|
25
|
+
* @param p3l
|
|
26
|
+
*/
|
|
27
|
+
export declare const p3Linear2p3: (p3l: [number, number, number]) => number[];
|
|
28
|
+
/**
|
|
29
|
+
* Convert P3 to XYZ
|
|
30
|
+
*
|
|
31
|
+
* @param args
|
|
32
|
+
*/
|
|
33
|
+
export declare const p3ToXYZ: (args: number[]) => number[];
|
|
34
|
+
/**
|
|
35
|
+
* Convert XYZ to P3
|
|
36
|
+
*
|
|
37
|
+
* @param args
|
|
38
|
+
*/
|
|
39
|
+
export declare const p3FromXYZ: (args: [number, number, number, number]) => [number, number, number, number];
|
|
40
|
+
/**
|
|
41
|
+
* Convert P3 to SRGB and Pack
|
|
42
|
+
*
|
|
43
|
+
* @param args
|
|
44
|
+
*/
|
|
45
|
+
export declare const convertP3: (args: number[]) => number;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pro Photo related functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert linear-light display-p3 to XYZ D65
|
|
6
|
+
*
|
|
7
|
+
* @param p3
|
|
8
|
+
*/
|
|
9
|
+
export declare const proPhotoLinearToXyz: (p3: [number, number, number]) => [number, number, number];
|
|
10
|
+
/**
|
|
11
|
+
* Convert XYZ D65 to linear-light display-p3
|
|
12
|
+
*
|
|
13
|
+
* @param xyz
|
|
14
|
+
*/
|
|
15
|
+
export declare const xyzToProPhotoLinear: (xyz: [number, number, number]) => [number, number, number];
|
|
16
|
+
/**
|
|
17
|
+
* Convert Pro-Photo to Pro-Photo Linear
|
|
18
|
+
*
|
|
19
|
+
* @param p3
|
|
20
|
+
*/
|
|
21
|
+
export declare const proPhotoToProPhotoLinear: (p3: [number, number, number]) => number[];
|
|
22
|
+
/**
|
|
23
|
+
* Convert Pro-Photo Linear to Pro-Photo
|
|
24
|
+
*
|
|
25
|
+
* @param p3
|
|
26
|
+
*/
|
|
27
|
+
export declare const proPhotoLinearToProPhoto: (p3: [number, number, number]) => number[];
|
|
28
|
+
/**
|
|
29
|
+
* Convert Pro-Photo to XYZ
|
|
30
|
+
*
|
|
31
|
+
* @param args
|
|
32
|
+
*/
|
|
33
|
+
export declare const proPhotoToXYZ: (args: number[]) => [number, number, number];
|
|
34
|
+
/**
|
|
35
|
+
* Convert XYZ to Pro-Photo
|
|
36
|
+
*
|
|
37
|
+
* @param args
|
|
38
|
+
*/
|
|
39
|
+
export declare const proPhotoFromXYZ: (args: [number, number, number, number]) => [number, number, number, number];
|
|
40
|
+
/**
|
|
41
|
+
* Convert Pro-Photo to XYZ and Pack
|
|
42
|
+
*
|
|
43
|
+
* @param args
|
|
44
|
+
*/
|
|
45
|
+
export declare const convertProPhoto: (args: number[]) => number;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* REC2020 related functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert rec2020 to rec2020 linear
|
|
6
|
+
*
|
|
7
|
+
* @param rgb
|
|
8
|
+
*/
|
|
9
|
+
export declare const rec20202rec2020Linear: (rgb: [number, number, number]) => number[];
|
|
10
|
+
/**
|
|
11
|
+
* Convert rec2020 linear to rec2020
|
|
12
|
+
*
|
|
13
|
+
* @param rgb
|
|
14
|
+
*/
|
|
15
|
+
export declare const rec2020Linear2rec2020: (rgb: [number, number, number]) => number[];
|
|
16
|
+
/**
|
|
17
|
+
* Convert rec2020 linear to XYZ D65
|
|
18
|
+
*
|
|
19
|
+
* @param rec
|
|
20
|
+
*/
|
|
21
|
+
export declare const rec2020LinearToXyz: (rec: [number, number, number]) => [number, number, number];
|
|
22
|
+
/**
|
|
23
|
+
* Convert XYZ D65 to rec2020 linear
|
|
24
|
+
*
|
|
25
|
+
* @param xyz
|
|
26
|
+
*/
|
|
27
|
+
export declare const xyzToRec2020Linear: (xyz: [number, number, number]) => [number, number, number];
|
|
28
|
+
/**
|
|
29
|
+
* Convert Rec2020 to XYZ
|
|
30
|
+
*
|
|
31
|
+
* @param args
|
|
32
|
+
*/
|
|
33
|
+
export declare const rec2020ToXYZ: (args: number[]) => [number, number, number];
|
|
34
|
+
/**
|
|
35
|
+
* Convert XYZ to Rec2020
|
|
36
|
+
*
|
|
37
|
+
* @param args
|
|
38
|
+
*/
|
|
39
|
+
export declare const rec2020FromXYZ: (args: [number, number, number, number]) => [number, number, number, number];
|
|
40
|
+
/**
|
|
41
|
+
* Convert Rec2020 to SRGB and Pack
|
|
42
|
+
*
|
|
43
|
+
* @param args
|
|
44
|
+
*/
|
|
45
|
+
export declare const convertRec2020: (args: number[]) => number;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SRGB related functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert XYZ to linear-light sRGB
|
|
6
|
+
*
|
|
7
|
+
* @param xyz
|
|
8
|
+
*/
|
|
9
|
+
export declare const xyz2rgbLinear: (xyz: [number, number, number]) => [number, number, number];
|
|
10
|
+
/**
|
|
11
|
+
* Convert XYZ to linear-light sRGB
|
|
12
|
+
*
|
|
13
|
+
* @param xyz
|
|
14
|
+
*/
|
|
15
|
+
export declare const rgbLinear2xyz: (xyz: [number, number, number]) => [number, number, number];
|
|
16
|
+
/**
|
|
17
|
+
* Convert sRGB to RGB
|
|
18
|
+
*
|
|
19
|
+
* @param rgb
|
|
20
|
+
*/
|
|
21
|
+
export declare const srgbLinear2rgb: (rgb: [number, number, number]) => number[];
|
|
22
|
+
/**
|
|
23
|
+
* Convert RGB to sRGB
|
|
24
|
+
*
|
|
25
|
+
* @param rgb
|
|
26
|
+
*/
|
|
27
|
+
export declare const rgb2rgbLinear: (rgb: [number, number, number]) => number[];
|
|
28
|
+
/**
|
|
29
|
+
* XYZ to SRGB
|
|
30
|
+
*
|
|
31
|
+
* @param args
|
|
32
|
+
*/
|
|
33
|
+
export declare const srgbFromXYZ: (args: [number, number, number, number]) => [number, number, number, number];
|
|
34
|
+
/**
|
|
35
|
+
* XYZ to SRGB-Linear
|
|
36
|
+
* @param args
|
|
37
|
+
*/
|
|
38
|
+
export declare const srgbLinearFromXYZ: (args: [number, number, number, number]) => [number, number, number, number];
|