dompdf.js 1.1.1 → 1.2.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/.versionrc +8 -0
- package/CHANGELOG.md +32 -543
- package/README.md +172 -160
- package/README_CN.md +233 -238
- package/dist/dompdf.esm.js +124 -124
- package/dist/dompdf.esm.js.map +1 -1
- package/dist/dompdf.js +124 -124
- package/dist/dompdf.js.map +1 -1
- package/dist/dompdf.min.js +67 -0
- package/dist/index.d.ts +2 -1
- package/dist/lib/__tests__/index.js +144 -0
- package/dist/lib/__tests__/index.js.map +1 -0
- package/dist/lib/core/__mocks__/cache-storage.js +10 -0
- package/dist/lib/core/__mocks__/cache-storage.js.map +1 -0
- package/dist/lib/core/__mocks__/context.js +22 -0
- package/dist/lib/core/__mocks__/context.js.map +1 -0
- package/dist/lib/core/__mocks__/features.js +12 -0
- package/dist/lib/core/__mocks__/features.js.map +1 -0
- package/dist/lib/core/__mocks__/logger.js +24 -0
- package/dist/lib/core/__mocks__/logger.js.map +1 -0
- package/dist/lib/core/__tests__/cache-storage.js +420 -0
- package/dist/lib/core/__tests__/cache-storage.js.map +1 -0
- package/dist/lib/core/__tests__/logger.js +28 -0
- package/dist/lib/core/__tests__/logger.js.map +1 -0
- package/dist/lib/core/bitwise.js +6 -0
- package/dist/lib/core/bitwise.js.map +1 -0
- package/dist/lib/core/cache-storage.js +198 -0
- package/dist/lib/core/cache-storage.js.map +1 -0
- package/dist/lib/core/context.js +18 -0
- package/dist/lib/core/context.js.map +1 -0
- package/dist/lib/core/debugger.js +25 -0
- package/dist/lib/core/debugger.js.map +1 -0
- package/dist/lib/core/features.js +193 -0
- package/dist/lib/core/features.js.map +1 -0
- package/dist/lib/core/logger.js +92 -0
- package/dist/lib/core/logger.js.map +1 -0
- package/dist/lib/core/util.js +5 -0
- package/dist/lib/core/util.js.map +1 -0
- package/dist/lib/css/IPropertyDescriptor.js +3 -0
- package/dist/lib/css/IPropertyDescriptor.js.map +1 -0
- package/dist/lib/css/ITypeDescriptor.js +3 -0
- package/dist/lib/css/ITypeDescriptor.js.map +1 -0
- package/dist/lib/css/index.js +216 -0
- package/dist/lib/css/index.js.map +1 -0
- package/dist/lib/css/layout/__mocks__/bounds.js +9 -0
- package/dist/lib/css/layout/__mocks__/bounds.js.map +1 -0
- package/dist/lib/css/layout/bounds.js +42 -0
- package/dist/lib/css/layout/bounds.js.map +1 -0
- package/dist/lib/css/layout/text.js +137 -0
- package/dist/lib/css/layout/text.js.map +1 -0
- package/dist/lib/css/property-descriptors/__tests__/background-tests.js +48 -0
- package/dist/lib/css/property-descriptors/__tests__/background-tests.js.map +1 -0
- package/dist/lib/css/property-descriptors/__tests__/font-family.js +25 -0
- package/dist/lib/css/property-descriptors/__tests__/font-family.js.map +1 -0
- package/dist/lib/css/property-descriptors/__tests__/paint-order.js +88 -0
- package/dist/lib/css/property-descriptors/__tests__/paint-order.js.map +1 -0
- package/dist/lib/css/property-descriptors/__tests__/text-shadow.js +94 -0
- package/dist/lib/css/property-descriptors/__tests__/text-shadow.js.map +1 -0
- package/dist/lib/css/property-descriptors/__tests__/transform-tests.js +18 -0
- package/dist/lib/css/property-descriptors/__tests__/transform-tests.js.map +1 -0
- package/dist/lib/css/property-descriptors/background-clip.js +24 -0
- package/dist/lib/css/property-descriptors/background-clip.js.map +1 -0
- package/dist/lib/css/property-descriptors/background-color.js +11 -0
- package/dist/lib/css/property-descriptors/background-color.js.map +1 -0
- package/dist/lib/css/property-descriptors/background-image.js +24 -0
- package/dist/lib/css/property-descriptors/background-image.js.map +1 -0
- package/dist/lib/css/property-descriptors/background-origin.js +24 -0
- package/dist/lib/css/property-descriptors/background-origin.js.map +1 -0
- package/dist/lib/css/property-descriptors/background-position.js +17 -0
- package/dist/lib/css/property-descriptors/background-position.js.map +1 -0
- package/dist/lib/css/property-descriptors/background-repeat.js +36 -0
- package/dist/lib/css/property-descriptors/background-repeat.js.map +1 -0
- package/dist/lib/css/property-descriptors/background-size.js +24 -0
- package/dist/lib/css/property-descriptors/background-size.js.map +1 -0
- package/dist/lib/css/property-descriptors/border-color.js +15 -0
- package/dist/lib/css/property-descriptors/border-color.js.map +1 -0
- package/dist/lib/css/property-descriptors/border-radius.js +18 -0
- package/dist/lib/css/property-descriptors/border-radius.js.map +1 -0
- package/dist/lib/css/property-descriptors/border-style.js +30 -0
- package/dist/lib/css/property-descriptors/border-style.js.map +1 -0
- package/dist/lib/css/property-descriptors/border-width.js +21 -0
- package/dist/lib/css/property-descriptors/border-width.js.map +1 -0
- package/dist/lib/css/property-descriptors/box-shadow.js +55 -0
- package/dist/lib/css/property-descriptors/box-shadow.js.map +1 -0
- package/dist/lib/css/property-descriptors/color.js +11 -0
- package/dist/lib/css/property-descriptors/color.js.map +1 -0
- package/dist/lib/css/property-descriptors/content.js +20 -0
- package/dist/lib/css/property-descriptors/content.js.map +1 -0
- package/dist/lib/css/property-descriptors/counter-increment.js +31 -0
- package/dist/lib/css/property-descriptors/counter-increment.js.map +1 -0
- package/dist/lib/css/property-descriptors/counter-reset.js +27 -0
- package/dist/lib/css/property-descriptors/counter-reset.js.map +1 -0
- package/dist/lib/css/property-descriptors/direction.js +19 -0
- package/dist/lib/css/property-descriptors/direction.js.map +1 -0
- package/dist/lib/css/property-descriptors/display.js +82 -0
- package/dist/lib/css/property-descriptors/display.js.map +1 -0
- package/dist/lib/css/property-descriptors/duration.js +15 -0
- package/dist/lib/css/property-descriptors/duration.js.map +1 -0
- package/dist/lib/css/property-descriptors/float.js +23 -0
- package/dist/lib/css/property-descriptors/float.js.map +1 -0
- package/dist/lib/css/property-descriptors/font-family.js +33 -0
- package/dist/lib/css/property-descriptors/font-family.js.map +1 -0
- package/dist/lib/css/property-descriptors/font-size.js +11 -0
- package/dist/lib/css/property-descriptors/font-size.js.map +1 -0
- package/dist/lib/css/property-descriptors/font-style.js +21 -0
- package/dist/lib/css/property-descriptors/font-style.js.map +1 -0
- package/dist/lib/css/property-descriptors/font-variant.js +14 -0
- package/dist/lib/css/property-descriptors/font-variant.js.map +1 -0
- package/dist/lib/css/property-descriptors/font-weight.js +26 -0
- package/dist/lib/css/property-descriptors/font-weight.js.map +1 -0
- package/dist/lib/css/property-descriptors/letter-spacing.js +22 -0
- package/dist/lib/css/property-descriptors/letter-spacing.js.map +1 -0
- package/dist/lib/css/property-descriptors/line-break.js +24 -0
- package/dist/lib/css/property-descriptors/line-break.js.map +1 -0
- package/dist/lib/css/property-descriptors/line-height.js +25 -0
- package/dist/lib/css/property-descriptors/line-height.js.map +1 -0
- package/dist/lib/css/property-descriptors/list-style-image.js +17 -0
- package/dist/lib/css/property-descriptors/list-style-image.js.map +1 -0
- package/dist/lib/css/property-descriptors/list-style-position.js +19 -0
- package/dist/lib/css/property-descriptors/list-style-position.js.map +1 -0
- package/dist/lib/css/property-descriptors/list-style-type.js +123 -0
- package/dist/lib/css/property-descriptors/list-style-type.js.map +1 -0
- package/dist/lib/css/property-descriptors/margin.js +14 -0
- package/dist/lib/css/property-descriptors/margin.js.map +1 -0
- package/dist/lib/css/property-descriptors/opacity.js +17 -0
- package/dist/lib/css/property-descriptors/opacity.js.map +1 -0
- package/dist/lib/css/property-descriptors/overflow-wrap.js +19 -0
- package/dist/lib/css/property-descriptors/overflow-wrap.js.map +1 -0
- package/dist/lib/css/property-descriptors/overflow.js +28 -0
- package/dist/lib/css/property-descriptors/overflow.js.map +1 -0
- package/dist/lib/css/property-descriptors/padding.js +15 -0
- package/dist/lib/css/property-descriptors/padding.js.map +1 -0
- package/dist/lib/css/property-descriptors/paint-order.js +34 -0
- package/dist/lib/css/property-descriptors/paint-order.js.map +1 -0
- package/dist/lib/css/property-descriptors/position.js +23 -0
- package/dist/lib/css/property-descriptors/position.js.map +1 -0
- package/dist/lib/css/property-descriptors/quotes.js +42 -0
- package/dist/lib/css/property-descriptors/quotes.js.map +1 -0
- package/dist/lib/css/property-descriptors/text-align.js +22 -0
- package/dist/lib/css/property-descriptors/text-align.js.map +1 -0
- package/dist/lib/css/property-descriptors/text-decoration-color.js +11 -0
- package/dist/lib/css/property-descriptors/text-decoration-color.js.map +1 -0
- package/dist/lib/css/property-descriptors/text-decoration-line.js +29 -0
- package/dist/lib/css/property-descriptors/text-decoration-line.js.map +1 -0
- package/dist/lib/css/property-descriptors/text-shadow.js +47 -0
- package/dist/lib/css/property-descriptors/text-shadow.js.map +1 -0
- package/dist/lib/css/property-descriptors/text-transform.js +21 -0
- package/dist/lib/css/property-descriptors/text-transform.js.map +1 -0
- package/dist/lib/css/property-descriptors/transform-origin.js +25 -0
- package/dist/lib/css/property-descriptors/transform-origin.js.map +1 -0
- package/dist/lib/css/property-descriptors/transform.js +37 -0
- package/dist/lib/css/property-descriptors/transform.js.map +1 -0
- package/dist/lib/css/property-descriptors/visibility.js +21 -0
- package/dist/lib/css/property-descriptors/visibility.js.map +1 -0
- package/dist/lib/css/property-descriptors/webkit-text-stroke-color.js +11 -0
- package/dist/lib/css/property-descriptors/webkit-text-stroke-color.js.map +1 -0
- package/dist/lib/css/property-descriptors/webkit-text-stroke-width.js +17 -0
- package/dist/lib/css/property-descriptors/webkit-text-stroke-width.js.map +1 -0
- package/dist/lib/css/property-descriptors/word-break.js +27 -0
- package/dist/lib/css/property-descriptors/word-break.js.map +1 -0
- package/dist/lib/css/property-descriptors/z-index.js +20 -0
- package/dist/lib/css/property-descriptors/z-index.js.map +1 -0
- package/dist/lib/css/syntax/__tests__/tokernizer-tests.js +34 -0
- package/dist/lib/css/syntax/__tests__/tokernizer-tests.js.map +1 -0
- package/dist/lib/css/syntax/parser.js +147 -0
- package/dist/lib/css/syntax/parser.js.map +1 -0
- package/dist/lib/css/syntax/tokenizer.js +630 -0
- package/dist/lib/css/syntax/tokenizer.js.map +1 -0
- package/dist/lib/css/types/__tests__/color-tests.js +66 -0
- package/dist/lib/css/types/__tests__/color-tests.js.map +1 -0
- package/dist/lib/css/types/__tests__/image-tests.js +233 -0
- package/dist/lib/css/types/__tests__/image-tests.js.map +1 -0
- package/dist/lib/css/types/angle.js +81 -0
- package/dist/lib/css/types/angle.js.map +1 -0
- package/dist/lib/css/types/color.js +311 -0
- package/dist/lib/css/types/color.js.map +1 -0
- package/dist/lib/css/types/functions/-prefix-linear-gradient.js +33 -0
- package/dist/lib/css/types/functions/-prefix-linear-gradient.js.map +1 -0
- package/dist/lib/css/types/functions/-prefix-radial-gradient.js +84 -0
- package/dist/lib/css/types/functions/-prefix-radial-gradient.js.map +1 -0
- package/dist/lib/css/types/functions/-webkit-gradient.js +60 -0
- package/dist/lib/css/types/functions/-webkit-gradient.js.map +1 -0
- package/dist/lib/css/types/functions/__tests__/radial-gradient.js +68 -0
- package/dist/lib/css/types/functions/__tests__/radial-gradient.js.map +1 -0
- package/dist/lib/css/types/functions/counter.js +374 -0
- package/dist/lib/css/types/functions/counter.js.map +1 -0
- package/dist/lib/css/types/functions/gradient.js +165 -0
- package/dist/lib/css/types/functions/gradient.js.map +1 -0
- package/dist/lib/css/types/functions/linear-gradient.js +28 -0
- package/dist/lib/css/types/functions/linear-gradient.js.map +1 -0
- package/dist/lib/css/types/functions/radial-gradient.js +91 -0
- package/dist/lib/css/types/functions/radial-gradient.js.map +1 -0
- package/dist/lib/css/types/image.js +53 -0
- package/dist/lib/css/types/image.js.map +1 -0
- package/dist/lib/css/types/index.js +3 -0
- package/dist/lib/css/types/index.js.map +1 -0
- package/dist/lib/css/types/length-percentage.js +52 -0
- package/dist/lib/css/types/length-percentage.js.map +1 -0
- package/dist/lib/css/types/length.js +8 -0
- package/dist/lib/css/types/length.js.map +1 -0
- package/dist/lib/css/types/time.js +18 -0
- package/dist/lib/css/types/time.js.map +1 -0
- package/dist/lib/dom/__mocks__/document-cloner.js +24 -0
- package/dist/lib/dom/__mocks__/document-cloner.js.map +1 -0
- package/dist/lib/dom/document-cloner.js +530 -0
- package/dist/lib/dom/document-cloner.js.map +1 -0
- package/dist/lib/dom/element-container.js +39 -0
- package/dist/lib/dom/element-container.js.map +1 -0
- package/dist/lib/dom/elements/li-element-container.js +30 -0
- package/dist/lib/dom/elements/li-element-container.js.map +1 -0
- package/dist/lib/dom/elements/ol-element-container.js +31 -0
- package/dist/lib/dom/elements/ol-element-container.js.map +1 -0
- package/dist/lib/dom/elements/select-element-container.js +31 -0
- package/dist/lib/dom/elements/select-element-container.js.map +1 -0
- package/dist/lib/dom/elements/textarea-element-container.js +30 -0
- package/dist/lib/dom/elements/textarea-element-container.js.map +1 -0
- package/dist/lib/dom/node-parser.js +306 -0
- package/dist/lib/dom/node-parser.js.map +1 -0
- package/dist/lib/dom/replaced-elements/canvas-element-container.js +32 -0
- package/dist/lib/dom/replaced-elements/canvas-element-container.js.map +1 -0
- package/dist/lib/dom/replaced-elements/iframe-element-container.js +54 -0
- package/dist/lib/dom/replaced-elements/iframe-element-container.js.map +1 -0
- package/dist/lib/dom/replaced-elements/image-element-container.js +33 -0
- package/dist/lib/dom/replaced-elements/image-element-container.js.map +1 -0
- package/dist/lib/dom/replaced-elements/index.js +3 -0
- package/dist/lib/dom/replaced-elements/index.js.map +1 -0
- package/dist/lib/dom/replaced-elements/input-element-container.js +102 -0
- package/dist/lib/dom/replaced-elements/input-element-container.js.map +1 -0
- package/dist/lib/dom/replaced-elements/pseudo-elements.js +1 -0
- package/dist/lib/dom/replaced-elements/pseudo-elements.js.map +1 -0
- package/dist/lib/dom/replaced-elements/svg-element-container.js +38 -0
- package/dist/lib/dom/replaced-elements/svg-element-container.js.map +1 -0
- package/dist/lib/dom/text-container.js +32 -0
- package/dist/lib/dom/text-container.js.map +1 -0
- package/dist/lib/index.js +274 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/invariant.js +10 -0
- package/dist/lib/invariant.js.map +1 -0
- package/dist/lib/render/background.js +187 -0
- package/dist/lib/render/background.js.map +1 -0
- package/dist/lib/render/bezier-curve.js +36 -0
- package/dist/lib/render/bezier-curve.js.map +1 -0
- package/dist/lib/render/border.js +105 -0
- package/dist/lib/render/border.js.map +1 -0
- package/dist/lib/render/bound-curves.js +190 -0
- package/dist/lib/render/bound-curves.js.map +1 -0
- package/dist/lib/render/box-sizing.js +21 -0
- package/dist/lib/render/box-sizing.js.map +1 -0
- package/dist/lib/render/canvas/foreignobject-renderer.js +108 -0
- package/dist/lib/render/canvas/foreignobject-renderer.js.map +1 -0
- package/dist/lib/render/canvas/pdf-renderer.js +1340 -0
- package/dist/lib/render/canvas/pdf-renderer.js.map +1 -0
- package/dist/lib/render/effects.js +41 -0
- package/dist/lib/render/effects.js.map +1 -0
- package/dist/lib/render/font-metrics.js +55 -0
- package/dist/lib/render/font-metrics.js.map +1 -0
- package/dist/lib/render/page-format-map.js +54 -0
- package/dist/lib/render/page-format-map.js.map +1 -0
- package/dist/lib/render/paginate copy 2.js +178 -0
- package/dist/lib/render/paginate copy 2.js.map +1 -0
- package/dist/lib/render/paginate.js +211 -0
- package/dist/lib/render/paginate.js.map +1 -0
- package/dist/lib/render/path.js +27 -0
- package/dist/lib/render/path.js.map +1 -0
- package/dist/lib/render/renderer.js +12 -0
- package/dist/lib/render/renderer.js.map +1 -0
- package/dist/lib/render/stacking-context.js +172 -0
- package/dist/lib/render/stacking-context.js.map +1 -0
- package/dist/lib/render/vector.js +18 -0
- package/dist/lib/render/vector.js.map +1 -0
- package/dist/lib/utils/css-utils.js +19 -0
- package/dist/lib/utils/css-utils.js.map +1 -0
- package/dist/lib/utils/element-utils.js +25 -0
- package/dist/lib/utils/element-utils.js.map +1 -0
- package/dist/lib/utils/font-utils.js +70 -0
- package/dist/lib/utils/font-utils.js.map +1 -0
- package/dist/lib/utils/index.js +22 -0
- package/dist/lib/utils/index.js.map +1 -0
- package/dist/lib/utils/type-utils.js +40 -0
- package/dist/lib/utils/type-utils.js.map +1 -0
- package/dist/lib/utils/url-path.js +22 -0
- package/dist/lib/utils/url-path.js.map +1 -0
- package/dist/render/canvas/pdf-renderer.d.ts +2 -2
- package/dist/render/paginate copy 2.d.ts +3 -0
- package/dist/render/paginate.d.ts +1 -1
- package/dist/types/__tests__/index.d.ts +1 -0
- package/dist/types/core/__mocks__/cache-storage.d.ts +2 -0
- package/dist/types/core/__mocks__/context.d.ts +9 -0
- package/dist/types/core/__mocks__/features.d.ts +8 -0
- package/dist/types/core/__mocks__/logger.d.ts +9 -0
- package/dist/types/core/__tests__/cache-storage.d.ts +1 -0
- package/dist/types/core/__tests__/logger.d.ts +1 -0
- package/dist/types/core/bitwise.d.ts +1 -0
- package/dist/types/core/cache-storage.d.ts +26 -0
- package/dist/types/core/context.d.ts +15 -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/util.d.ts +1 -0
- package/dist/types/css/IPropertyDescriptor.d.ts +36 -0
- package/dist/types/css/ITypeDescriptor.d.ts +6 -0
- package/dist/types/css/index.d.ts +132 -0
- package/dist/types/css/layout/__mocks__/bounds.d.ts +2 -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-descriptors/__tests__/background-tests.d.ts +1 -0
- package/dist/types/css/property-descriptors/__tests__/font-family.d.ts +1 -0
- package/dist/types/css/property-descriptors/__tests__/paint-order.d.ts +1 -0
- package/dist/types/css/property-descriptors/__tests__/text-shadow.d.ts +1 -0
- package/dist/types/css/property-descriptors/__tests__/transform-tests.d.ts +1 -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-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-shadow.d.ts +14 -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 +7 -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/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.d.ts +2 -0
- package/dist/types/css/property-descriptors/font-weight.d.ts +2 -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/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/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-shadow.d.ts +12 -0
- package/dist/types/css/property-descriptors/text-transform.d.ts +8 -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-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/z-index.d.ts +7 -0
- package/dist/types/css/syntax/__tests__/tokernizer-tests.d.ts +1 -0
- package/dist/types/css/syntax/parser.d.ts +34 -0
- package/dist/types/css/syntax/tokenizer.d.ts +94 -0
- package/dist/types/css/types/__tests__/color-tests.d.ts +1 -0
- package/dist/types/css/types/__tests__/image-tests.d.ts +1 -0
- package/dist/types/css/types/angle.d.ts +7 -0
- package/dist/types/css/types/color.d.ts +11 -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/__tests__/radial-gradient.d.ts +1 -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/image.d.ts +54 -0
- package/dist/types/css/types/index.d.ts +1 -0
- package/dist/types/css/types/length-percentage.d.ts +11 -0
- package/dist/types/css/types/length.d.ts +4 -0
- package/dist/types/css/types/time.d.ts +2 -0
- package/dist/types/dom/__mocks__/document-cloner.d.ts +6 -0
- package/dist/types/dom/document-cloner.d.ts +45 -0
- package/dist/types/dom/element-container.d.ts +23 -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 +23 -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 +11 -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 +12 -0
- package/dist/types/dom/replaced-elements/pseudo-elements.d.ts +0 -0
- package/dist/types/dom/replaced-elements/svg-element-container.d.ts +8 -0
- package/dist/types/dom/text-container.d.ts +8 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/invariant.d.ts +1 -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/foreignobject-renderer.d.ts +11 -0
- package/dist/types/render/canvas/pdf-renderer.d.ts +110 -0
- package/dist/types/render/effects.d.ts +38 -0
- package/dist/types/render/font-metrics.d.ts +11 -0
- package/dist/types/render/page-format-map.d.ts +4 -0
- package/dist/types/render/paginate copy 2.d.ts +3 -0
- package/dist/types/render/paginate.d.ts +3 -0
- package/dist/types/render/path.d.ts +13 -0
- package/dist/types/render/renderer.d.ts +7 -0
- package/dist/types/render/stacking-context.d.ts +24 -0
- package/dist/types/render/vector.d.ts +9 -0
- package/dist/types/utils/css-utils.d.ts +2 -0
- package/dist/types/utils/element-utils.d.ts +7 -0
- package/dist/types/utils/font-utils.d.ts +9 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/type-utils.d.ts +4 -0
- package/dist/types/utils/url-path.d.ts +7 -0
- package/dist/utils/font-utils.d.ts +2 -0
- package/fontconverter/fontconverter.html +2 -2
- package/package.json +135 -135
- package/page_sizes.md +50 -0
- package/.vscode/settings.json +0 -5
- package/html2pdf-userscript.js +0 -936
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateBackgroundRepeatPath = exports.getBackgroundValueForIndex = exports.calculateBackgroundSize = exports.isAuto = exports.calculateBackgroundRendering = exports.calculateBackgroundPaintingArea = exports.calculateBackgroundPositioningArea = void 0;
|
|
4
|
+
var background_size_1 = require("../css/property-descriptors/background-size");
|
|
5
|
+
var vector_1 = require("./vector");
|
|
6
|
+
var length_percentage_1 = require("../css/types/length-percentage");
|
|
7
|
+
var parser_1 = require("../css/syntax/parser");
|
|
8
|
+
var box_sizing_1 = require("./box-sizing");
|
|
9
|
+
var calculateBackgroundPositioningArea = function (backgroundOrigin, element) {
|
|
10
|
+
if (backgroundOrigin === 0 /* BACKGROUND_ORIGIN.BORDER_BOX */) {
|
|
11
|
+
return element.bounds;
|
|
12
|
+
}
|
|
13
|
+
if (backgroundOrigin === 2 /* BACKGROUND_ORIGIN.CONTENT_BOX */) {
|
|
14
|
+
return (0, box_sizing_1.contentBox)(element);
|
|
15
|
+
}
|
|
16
|
+
return (0, box_sizing_1.paddingBox)(element);
|
|
17
|
+
};
|
|
18
|
+
exports.calculateBackgroundPositioningArea = calculateBackgroundPositioningArea;
|
|
19
|
+
var calculateBackgroundPaintingArea = function (backgroundClip, element) {
|
|
20
|
+
if (backgroundClip === 0 /* BACKGROUND_CLIP.BORDER_BOX */) {
|
|
21
|
+
return element.bounds;
|
|
22
|
+
}
|
|
23
|
+
if (backgroundClip === 2 /* BACKGROUND_CLIP.CONTENT_BOX */) {
|
|
24
|
+
return (0, box_sizing_1.contentBox)(element);
|
|
25
|
+
}
|
|
26
|
+
return (0, box_sizing_1.paddingBox)(element);
|
|
27
|
+
};
|
|
28
|
+
exports.calculateBackgroundPaintingArea = calculateBackgroundPaintingArea;
|
|
29
|
+
var calculateBackgroundRendering = function (container, index, intrinsicSize) {
|
|
30
|
+
var backgroundPositioningArea = (0, exports.calculateBackgroundPositioningArea)((0, exports.getBackgroundValueForIndex)(container.styles.backgroundOrigin, index), container);
|
|
31
|
+
var backgroundPaintingArea = (0, exports.calculateBackgroundPaintingArea)((0, exports.getBackgroundValueForIndex)(container.styles.backgroundClip, index), container);
|
|
32
|
+
var backgroundImageSize = (0, exports.calculateBackgroundSize)((0, exports.getBackgroundValueForIndex)(container.styles.backgroundSize, index), intrinsicSize, backgroundPositioningArea);
|
|
33
|
+
var sizeWidth = backgroundImageSize[0], sizeHeight = backgroundImageSize[1];
|
|
34
|
+
var position = (0, length_percentage_1.getAbsoluteValueForTuple)((0, exports.getBackgroundValueForIndex)(container.styles.backgroundPosition, index), backgroundPositioningArea.width - sizeWidth, backgroundPositioningArea.height - sizeHeight);
|
|
35
|
+
var path = (0, exports.calculateBackgroundRepeatPath)((0, exports.getBackgroundValueForIndex)(container.styles.backgroundRepeat, index), position, backgroundImageSize, backgroundPositioningArea, backgroundPaintingArea);
|
|
36
|
+
var offsetX = Math.round(backgroundPositioningArea.left + position[0]);
|
|
37
|
+
var offsetY = Math.round(backgroundPositioningArea.top + position[1]);
|
|
38
|
+
return [path, offsetX, offsetY, sizeWidth, sizeHeight];
|
|
39
|
+
};
|
|
40
|
+
exports.calculateBackgroundRendering = calculateBackgroundRendering;
|
|
41
|
+
var isAuto = function (token) { return (0, parser_1.isIdentToken)(token) && token.value === background_size_1.BACKGROUND_SIZE.AUTO; };
|
|
42
|
+
exports.isAuto = isAuto;
|
|
43
|
+
var hasIntrinsicValue = function (value) { return typeof value === 'number'; };
|
|
44
|
+
var calculateBackgroundSize = function (size, _a, bounds) {
|
|
45
|
+
var intrinsicWidth = _a[0], intrinsicHeight = _a[1], intrinsicProportion = _a[2];
|
|
46
|
+
var first = size[0], second = size[1];
|
|
47
|
+
if (!first) {
|
|
48
|
+
return [0, 0];
|
|
49
|
+
}
|
|
50
|
+
if ((0, length_percentage_1.isLengthPercentage)(first) && second && (0, length_percentage_1.isLengthPercentage)(second)) {
|
|
51
|
+
return [(0, length_percentage_1.getAbsoluteValue)(first, bounds.width), (0, length_percentage_1.getAbsoluteValue)(second, bounds.height)];
|
|
52
|
+
}
|
|
53
|
+
var hasIntrinsicProportion = hasIntrinsicValue(intrinsicProportion);
|
|
54
|
+
if ((0, parser_1.isIdentToken)(first) && (first.value === background_size_1.BACKGROUND_SIZE.CONTAIN || first.value === background_size_1.BACKGROUND_SIZE.COVER)) {
|
|
55
|
+
if (hasIntrinsicValue(intrinsicProportion)) {
|
|
56
|
+
var targetRatio = bounds.width / bounds.height;
|
|
57
|
+
return targetRatio < intrinsicProportion !== (first.value === background_size_1.BACKGROUND_SIZE.COVER)
|
|
58
|
+
? [bounds.width, bounds.width / intrinsicProportion]
|
|
59
|
+
: [bounds.height * intrinsicProportion, bounds.height];
|
|
60
|
+
}
|
|
61
|
+
return [bounds.width, bounds.height];
|
|
62
|
+
}
|
|
63
|
+
var hasIntrinsicWidth = hasIntrinsicValue(intrinsicWidth);
|
|
64
|
+
var hasIntrinsicHeight = hasIntrinsicValue(intrinsicHeight);
|
|
65
|
+
var hasIntrinsicDimensions = hasIntrinsicWidth || hasIntrinsicHeight;
|
|
66
|
+
// If the background-size is auto or auto auto:
|
|
67
|
+
if ((0, exports.isAuto)(first) && (!second || (0, exports.isAuto)(second))) {
|
|
68
|
+
// If the image has both horizontal and vertical intrinsic dimensions, it's rendered at that size.
|
|
69
|
+
if (hasIntrinsicWidth && hasIntrinsicHeight) {
|
|
70
|
+
return [intrinsicWidth, intrinsicHeight];
|
|
71
|
+
}
|
|
72
|
+
// If the image has no intrinsic dimensions and has no intrinsic proportions,
|
|
73
|
+
// it's rendered at the size of the background positioning area.
|
|
74
|
+
if (!hasIntrinsicProportion && !hasIntrinsicDimensions) {
|
|
75
|
+
return [bounds.width, bounds.height];
|
|
76
|
+
}
|
|
77
|
+
// TODO If the image has no intrinsic dimensions but has intrinsic proportions, it's rendered as if contain had been specified instead.
|
|
78
|
+
// If the image has only one intrinsic dimension and has intrinsic proportions, it's rendered at the size corresponding to that one dimension.
|
|
79
|
+
// The other dimension is computed using the specified dimension and the intrinsic proportions.
|
|
80
|
+
if (hasIntrinsicDimensions && hasIntrinsicProportion) {
|
|
81
|
+
var width_1 = hasIntrinsicWidth
|
|
82
|
+
? intrinsicWidth
|
|
83
|
+
: intrinsicHeight * intrinsicProportion;
|
|
84
|
+
var height_1 = hasIntrinsicHeight
|
|
85
|
+
? intrinsicHeight
|
|
86
|
+
: intrinsicWidth / intrinsicProportion;
|
|
87
|
+
return [width_1, height_1];
|
|
88
|
+
}
|
|
89
|
+
// If the image has only one intrinsic dimension but has no intrinsic proportions,
|
|
90
|
+
// it's rendered using the specified dimension and the other dimension of the background positioning area.
|
|
91
|
+
var width_2 = hasIntrinsicWidth ? intrinsicWidth : bounds.width;
|
|
92
|
+
var height_2 = hasIntrinsicHeight ? intrinsicHeight : bounds.height;
|
|
93
|
+
return [width_2, height_2];
|
|
94
|
+
}
|
|
95
|
+
// If the image has intrinsic proportions, it's stretched to the specified dimension.
|
|
96
|
+
// The unspecified dimension is computed using the specified dimension and the intrinsic proportions.
|
|
97
|
+
if (hasIntrinsicProportion) {
|
|
98
|
+
var width_3 = 0;
|
|
99
|
+
var height_3 = 0;
|
|
100
|
+
if ((0, length_percentage_1.isLengthPercentage)(first)) {
|
|
101
|
+
width_3 = (0, length_percentage_1.getAbsoluteValue)(first, bounds.width);
|
|
102
|
+
}
|
|
103
|
+
else if ((0, length_percentage_1.isLengthPercentage)(second)) {
|
|
104
|
+
height_3 = (0, length_percentage_1.getAbsoluteValue)(second, bounds.height);
|
|
105
|
+
}
|
|
106
|
+
if ((0, exports.isAuto)(first)) {
|
|
107
|
+
width_3 = height_3 * intrinsicProportion;
|
|
108
|
+
}
|
|
109
|
+
else if (!second || (0, exports.isAuto)(second)) {
|
|
110
|
+
height_3 = width_3 / intrinsicProportion;
|
|
111
|
+
}
|
|
112
|
+
return [width_3, height_3];
|
|
113
|
+
}
|
|
114
|
+
// If the image has no intrinsic proportions, it's stretched to the specified dimension.
|
|
115
|
+
// The unspecified dimension is computed using the image's corresponding intrinsic dimension,
|
|
116
|
+
// if there is one. If there is no such intrinsic dimension,
|
|
117
|
+
// it becomes the corresponding dimension of the background positioning area.
|
|
118
|
+
var width = null;
|
|
119
|
+
var height = null;
|
|
120
|
+
if ((0, length_percentage_1.isLengthPercentage)(first)) {
|
|
121
|
+
width = (0, length_percentage_1.getAbsoluteValue)(first, bounds.width);
|
|
122
|
+
}
|
|
123
|
+
else if (second && (0, length_percentage_1.isLengthPercentage)(second)) {
|
|
124
|
+
height = (0, length_percentage_1.getAbsoluteValue)(second, bounds.height);
|
|
125
|
+
}
|
|
126
|
+
if (width !== null && (!second || (0, exports.isAuto)(second))) {
|
|
127
|
+
height =
|
|
128
|
+
hasIntrinsicWidth && hasIntrinsicHeight
|
|
129
|
+
? (width / intrinsicWidth) * intrinsicHeight
|
|
130
|
+
: bounds.height;
|
|
131
|
+
}
|
|
132
|
+
if (height !== null && (0, exports.isAuto)(first)) {
|
|
133
|
+
width =
|
|
134
|
+
hasIntrinsicWidth && hasIntrinsicHeight
|
|
135
|
+
? (height / intrinsicHeight) * intrinsicWidth
|
|
136
|
+
: bounds.width;
|
|
137
|
+
}
|
|
138
|
+
if (width !== null && height !== null) {
|
|
139
|
+
return [width, height];
|
|
140
|
+
}
|
|
141
|
+
throw new Error("Unable to calculate background-size for element");
|
|
142
|
+
};
|
|
143
|
+
exports.calculateBackgroundSize = calculateBackgroundSize;
|
|
144
|
+
var getBackgroundValueForIndex = function (values, index) {
|
|
145
|
+
var value = values[index];
|
|
146
|
+
if (typeof value === 'undefined') {
|
|
147
|
+
return values[0];
|
|
148
|
+
}
|
|
149
|
+
return value;
|
|
150
|
+
};
|
|
151
|
+
exports.getBackgroundValueForIndex = getBackgroundValueForIndex;
|
|
152
|
+
var calculateBackgroundRepeatPath = function (repeat, _a, _b, backgroundPositioningArea, backgroundPaintingArea) {
|
|
153
|
+
var x = _a[0], y = _a[1];
|
|
154
|
+
var width = _b[0], height = _b[1];
|
|
155
|
+
switch (repeat) {
|
|
156
|
+
case 2 /* BACKGROUND_REPEAT.REPEAT_X */:
|
|
157
|
+
return [
|
|
158
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left), Math.round(backgroundPositioningArea.top + y)),
|
|
159
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(backgroundPositioningArea.top + y)),
|
|
160
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(height + backgroundPositioningArea.top + y)),
|
|
161
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left), Math.round(height + backgroundPositioningArea.top + y))
|
|
162
|
+
];
|
|
163
|
+
case 3 /* BACKGROUND_REPEAT.REPEAT_Y */:
|
|
164
|
+
return [
|
|
165
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top)),
|
|
166
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top)),
|
|
167
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top)),
|
|
168
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top))
|
|
169
|
+
];
|
|
170
|
+
case 1 /* BACKGROUND_REPEAT.NO_REPEAT */:
|
|
171
|
+
return [
|
|
172
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y)),
|
|
173
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y)),
|
|
174
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y + height)),
|
|
175
|
+
new vector_1.Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y + height))
|
|
176
|
+
];
|
|
177
|
+
default:
|
|
178
|
+
return [
|
|
179
|
+
new vector_1.Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.top)),
|
|
180
|
+
new vector_1.Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.top)),
|
|
181
|
+
new vector_1.Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top)),
|
|
182
|
+
new vector_1.Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top))
|
|
183
|
+
];
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
exports.calculateBackgroundRepeatPath = calculateBackgroundRepeatPath;
|
|
187
|
+
//# sourceMappingURL=background.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background.js","sourceRoot":"","sources":["../../../src/render/background.ts"],"names":[],"mappings":";;;AAGA,+EAAgG;AAChG,mCAAgC;AAEhC,oEAA8G;AAC9G,+CAA4D;AAC5D,2CAAoD;AAI7C,IAAM,kCAAkC,GAAG,UAC9C,gBAAmC,EACnC,OAAyB;IAEzB,IAAI,gBAAgB,yCAAiC,EAAE;QACnD,OAAO,OAAO,CAAC,MAAM,CAAC;KACzB;IAED,IAAI,gBAAgB,0CAAkC,EAAE;QACpD,OAAO,IAAA,uBAAU,EAAC,OAAO,CAAC,CAAC;KAC9B;IAED,OAAO,IAAA,uBAAU,EAAC,OAAO,CAAC,CAAC;AAC/B,CAAC,CAAC;AAbW,QAAA,kCAAkC,sCAa7C;AAEK,IAAM,+BAA+B,GAAG,UAAC,cAA+B,EAAE,OAAyB;IACtG,IAAI,cAAc,uCAA+B,EAAE;QAC/C,OAAO,OAAO,CAAC,MAAM,CAAC;KACzB;IAED,IAAI,cAAc,wCAAgC,EAAE;QAChD,OAAO,IAAA,uBAAU,EA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CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC;gBAC3F,IAAI,eAAM,CACN,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,IAAI,GAAG,sBAAsB,CAAC,KAAK,CAAC,EACtE,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,GAAG,CAAC,CACzC;gBACD,IAAI,eAAM,CACN,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,IAAI,GAAG,sBAAsB,CAAC,KAAK,CAAC,EACtE,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,MAAM,GAAG,sBAAsB,CAAC,GAAG,CAAC,CACzE;gBACD,IAAI,eAAM,CACN,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,IAAI,CAAC,EACvC,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,MAAM,GAAG,sBAAsB,CAAC,GAAG,CAAC,CACzE;aACJ,CAAC;KACT;AACL,CAAC,CAAC;AA5EW,QAAA,6BAA6B,iCA4ExC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isBezierCurve = exports.BezierCurve = void 0;
|
|
4
|
+
var vector_1 = require("./vector");
|
|
5
|
+
var lerp = function (a, b, t) {
|
|
6
|
+
return new vector_1.Vector(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);
|
|
7
|
+
};
|
|
8
|
+
var BezierCurve = /** @class */ (function () {
|
|
9
|
+
function BezierCurve(start, startControl, endControl, end) {
|
|
10
|
+
this.type = 1 /* PathType.BEZIER_CURVE */;
|
|
11
|
+
this.start = start;
|
|
12
|
+
this.startControl = startControl;
|
|
13
|
+
this.endControl = endControl;
|
|
14
|
+
this.end = end;
|
|
15
|
+
}
|
|
16
|
+
BezierCurve.prototype.subdivide = function (t, firstHalf) {
|
|
17
|
+
var ab = lerp(this.start, this.startControl, t);
|
|
18
|
+
var bc = lerp(this.startControl, this.endControl, t);
|
|
19
|
+
var cd = lerp(this.endControl, this.end, t);
|
|
20
|
+
var abbc = lerp(ab, bc, t);
|
|
21
|
+
var bccd = lerp(bc, cd, t);
|
|
22
|
+
var dest = lerp(abbc, bccd, t);
|
|
23
|
+
return firstHalf ? new BezierCurve(this.start, ab, abbc, dest) : new BezierCurve(dest, bccd, cd, this.end);
|
|
24
|
+
};
|
|
25
|
+
BezierCurve.prototype.add = function (deltaX, deltaY) {
|
|
26
|
+
return new BezierCurve(this.start.add(deltaX, deltaY), this.startControl.add(deltaX, deltaY), this.endControl.add(deltaX, deltaY), this.end.add(deltaX, deltaY));
|
|
27
|
+
};
|
|
28
|
+
BezierCurve.prototype.reverse = function () {
|
|
29
|
+
return new BezierCurve(this.end, this.endControl, this.startControl, this.start);
|
|
30
|
+
};
|
|
31
|
+
return BezierCurve;
|
|
32
|
+
}());
|
|
33
|
+
exports.BezierCurve = BezierCurve;
|
|
34
|
+
var isBezierCurve = function (path) { return path.type === 1 /* PathType.BEZIER_CURVE */; };
|
|
35
|
+
exports.isBezierCurve = isBezierCurve;
|
|
36
|
+
//# sourceMappingURL=bezier-curve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bezier-curve.js","sourceRoot":"","sources":["../../../src/render/bezier-curve.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAGhC,IAAM,IAAI,GAAG,UAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IACzC,OAAO,IAAI,eAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF;IAOI,qBAAY,KAAa,EAAE,YAA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,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAC/B,CAAC;IACN,CAAC;IAED,6BAAO,GAAP;QACI,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACrF,CAAC;IACL,kBAAC;AAAD,CAAC,AArCD,IAqCC;AArCY,kCAAW;AAuCjB,IAAM,aAAa,GAAG,UAAC,IAAU,IAA0B,OAAA,IAAI,CAAC,IAAI,kCAA0B,EAAnC,CAAmC,CAAC;AAAzF,QAAA,aAAa,iBAA4E"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parsePathForBorderStroke = exports.parsePathForBorderDoubleInner = exports.parsePathForBorderDoubleOuter = exports.parsePathForBorder = void 0;
|
|
4
|
+
var bezier_curve_1 = require("./bezier-curve");
|
|
5
|
+
var parsePathForBorder = function (curves, borderSide) {
|
|
6
|
+
switch (borderSide) {
|
|
7
|
+
case 0:
|
|
8
|
+
return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftPaddingBox, curves.topRightBorderBox, curves.topRightPaddingBox);
|
|
9
|
+
case 1:
|
|
10
|
+
return createPathFromCurves(curves.topRightBorderBox, curves.topRightPaddingBox, curves.bottomRightBorderBox, curves.bottomRightPaddingBox);
|
|
11
|
+
case 2:
|
|
12
|
+
return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox);
|
|
13
|
+
case 3:
|
|
14
|
+
default:
|
|
15
|
+
return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox, curves.topLeftBorderBox, curves.topLeftPaddingBox);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.parsePathForBorder = parsePathForBorder;
|
|
19
|
+
var parsePathForBorderDoubleOuter = function (curves, borderSide) {
|
|
20
|
+
switch (borderSide) {
|
|
21
|
+
case 0:
|
|
22
|
+
return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox, curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox);
|
|
23
|
+
case 1:
|
|
24
|
+
return createPathFromCurves(curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox, curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox);
|
|
25
|
+
case 2:
|
|
26
|
+
return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox, curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox);
|
|
27
|
+
case 3:
|
|
28
|
+
default:
|
|
29
|
+
return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox, curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.parsePathForBorderDoubleOuter = parsePathForBorderDoubleOuter;
|
|
33
|
+
var parsePathForBorderDoubleInner = function (curves, borderSide) {
|
|
34
|
+
switch (borderSide) {
|
|
35
|
+
case 0:
|
|
36
|
+
return createPathFromCurves(curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox, curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox);
|
|
37
|
+
case 1:
|
|
38
|
+
return createPathFromCurves(curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox, curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox);
|
|
39
|
+
case 2:
|
|
40
|
+
return createPathFromCurves(curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox);
|
|
41
|
+
case 3:
|
|
42
|
+
default:
|
|
43
|
+
return createPathFromCurves(curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox, curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.parsePathForBorderDoubleInner = parsePathForBorderDoubleInner;
|
|
47
|
+
var parsePathForBorderStroke = function (curves, borderSide) {
|
|
48
|
+
switch (borderSide) {
|
|
49
|
+
case 0:
|
|
50
|
+
return createStrokePathFromCurves(curves.topLeftBorderStroke, curves.topRightBorderStroke);
|
|
51
|
+
case 1:
|
|
52
|
+
return createStrokePathFromCurves(curves.topRightBorderStroke, curves.bottomRightBorderStroke);
|
|
53
|
+
case 2:
|
|
54
|
+
return createStrokePathFromCurves(curves.bottomRightBorderStroke, curves.bottomLeftBorderStroke);
|
|
55
|
+
case 3:
|
|
56
|
+
default:
|
|
57
|
+
return createStrokePathFromCurves(curves.bottomLeftBorderStroke, curves.topLeftBorderStroke);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.parsePathForBorderStroke = parsePathForBorderStroke;
|
|
61
|
+
var createStrokePathFromCurves = function (outer1, outer2) {
|
|
62
|
+
var path = [];
|
|
63
|
+
if ((0, bezier_curve_1.isBezierCurve)(outer1)) {
|
|
64
|
+
path.push(outer1.subdivide(0.5, false));
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
path.push(outer1);
|
|
68
|
+
}
|
|
69
|
+
if ((0, bezier_curve_1.isBezierCurve)(outer2)) {
|
|
70
|
+
path.push(outer2.subdivide(0.5, true));
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
path.push(outer2);
|
|
74
|
+
}
|
|
75
|
+
return path;
|
|
76
|
+
};
|
|
77
|
+
var createPathFromCurves = function (outer1, inner1, outer2, inner2) {
|
|
78
|
+
var path = [];
|
|
79
|
+
if ((0, bezier_curve_1.isBezierCurve)(outer1)) {
|
|
80
|
+
path.push(outer1.subdivide(0.5, false));
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
path.push(outer1);
|
|
84
|
+
}
|
|
85
|
+
if ((0, bezier_curve_1.isBezierCurve)(outer2)) {
|
|
86
|
+
path.push(outer2.subdivide(0.5, true));
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
path.push(outer2);
|
|
90
|
+
}
|
|
91
|
+
if ((0, bezier_curve_1.isBezierCurve)(inner2)) {
|
|
92
|
+
path.push(inner2.subdivide(0.5, true).reverse());
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
path.push(inner2);
|
|
96
|
+
}
|
|
97
|
+
if ((0, bezier_curve_1.isBezierCurve)(inner1)) {
|
|
98
|
+
path.push(inner1.subdivide(0.5, false).reverse());
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
path.push(inner1);
|
|
102
|
+
}
|
|
103
|
+
return path;
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=border.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"border.js","sourceRoot":"","sources":["../../../src/render/border.ts"],"names":[],"mappings":";;;AAEA,+CAA6C;AAEtC,IAAM,kBAAkB,GAAG,UAAC,MAAmB,EAAE,UAAkB;IACtE,QAAQ,UAAU,EAAE;QAChB,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,gBAAgB,EACvB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,kBAAkB,CAC5B,CAAC;QACN,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,kBAAkB,EACzB,MAAM,CAAC,oBAAoB,EAC3B,MAAM,CAAC,qBAAqB,CAC/B,CAAC;QACN,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,oBAAoB,EAC3B,MAAM,CAAC,qBAAqB,EAC5B,MAAM,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AAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACrD;SAAM;QACH,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculatePaddingBoxPath = exports.calculateContentBoxPath = exports.calculateBorderBoxPath = exports.BoundCurves = void 0;
|
|
4
|
+
var length_percentage_1 = require("../css/types/length-percentage");
|
|
5
|
+
var vector_1 = require("./vector");
|
|
6
|
+
var bezier_curve_1 = require("./bezier-curve");
|
|
7
|
+
var BoundCurves = /** @class */ (function () {
|
|
8
|
+
function BoundCurves(element) {
|
|
9
|
+
var styles = element.styles;
|
|
10
|
+
var bounds = element.bounds;
|
|
11
|
+
var _a = (0, length_percentage_1.getAbsoluteValueForTuple)(styles.borderTopLeftRadius, bounds.width, bounds.height), tlh = _a[0], tlv = _a[1];
|
|
12
|
+
var _b = (0, length_percentage_1.getAbsoluteValueForTuple)(styles.borderTopRightRadius, bounds.width, bounds.height), trh = _b[0], trv = _b[1];
|
|
13
|
+
var _c = (0, length_percentage_1.getAbsoluteValueForTuple)(styles.borderBottomRightRadius, bounds.width, bounds.height), brh = _c[0], brv = _c[1];
|
|
14
|
+
var _d = (0, length_percentage_1.getAbsoluteValueForTuple)(styles.borderBottomLeftRadius, bounds.width, bounds.height), blh = _d[0], blv = _d[1];
|
|
15
|
+
var factors = [];
|
|
16
|
+
factors.push((tlh + trh) / bounds.width);
|
|
17
|
+
factors.push((blh + brh) / bounds.width);
|
|
18
|
+
factors.push((tlv + blv) / bounds.height);
|
|
19
|
+
factors.push((trv + brv) / bounds.height);
|
|
20
|
+
var maxFactor = Math.max.apply(Math, factors);
|
|
21
|
+
if (maxFactor > 1) {
|
|
22
|
+
tlh /= maxFactor;
|
|
23
|
+
tlv /= maxFactor;
|
|
24
|
+
trh /= maxFactor;
|
|
25
|
+
trv /= maxFactor;
|
|
26
|
+
brh /= maxFactor;
|
|
27
|
+
brv /= maxFactor;
|
|
28
|
+
blh /= maxFactor;
|
|
29
|
+
blv /= maxFactor;
|
|
30
|
+
}
|
|
31
|
+
var topWidth = bounds.width - trh;
|
|
32
|
+
var rightHeight = bounds.height - brv;
|
|
33
|
+
var bottomWidth = bounds.width - brh;
|
|
34
|
+
var leftHeight = bounds.height - blv;
|
|
35
|
+
var borderTopWidth = styles.borderTopWidth;
|
|
36
|
+
var borderRightWidth = styles.borderRightWidth;
|
|
37
|
+
var borderBottomWidth = styles.borderBottomWidth;
|
|
38
|
+
var borderLeftWidth = styles.borderLeftWidth;
|
|
39
|
+
var paddingTop = (0, length_percentage_1.getAbsoluteValue)(styles.paddingTop, element.bounds.width);
|
|
40
|
+
var paddingRight = (0, length_percentage_1.getAbsoluteValue)(styles.paddingRight, element.bounds.width);
|
|
41
|
+
var paddingBottom = (0, length_percentage_1.getAbsoluteValue)(styles.paddingBottom, element.bounds.width);
|
|
42
|
+
var paddingLeft = (0, length_percentage_1.getAbsoluteValue)(styles.paddingLeft, element.bounds.width);
|
|
43
|
+
this.topLeftBorderDoubleOuterBox =
|
|
44
|
+
tlh > 0 || tlv > 0
|
|
45
|
+
? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3, tlh - borderLeftWidth / 3, tlv - borderTopWidth / 3, CORNER.TOP_LEFT)
|
|
46
|
+
: new vector_1.Vector(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3);
|
|
47
|
+
this.topRightBorderDoubleOuterBox =
|
|
48
|
+
tlh > 0 || tlv > 0
|
|
49
|
+
? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 3, trh - borderRightWidth / 3, trv - borderTopWidth / 3, CORNER.TOP_RIGHT)
|
|
50
|
+
: new vector_1.Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + borderTopWidth / 3);
|
|
51
|
+
this.bottomRightBorderDoubleOuterBox =
|
|
52
|
+
brh > 0 || brv > 0
|
|
53
|
+
? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 3, brv - borderBottomWidth / 3, CORNER.BOTTOM_RIGHT)
|
|
54
|
+
: new vector_1.Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);
|
|
55
|
+
this.bottomLeftBorderDoubleOuterBox =
|
|
56
|
+
blh > 0 || blv > 0
|
|
57
|
+
? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + leftHeight, blh - borderLeftWidth / 3, blv - borderBottomWidth / 3, CORNER.BOTTOM_LEFT)
|
|
58
|
+
: new vector_1.Vector(bounds.left + borderLeftWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);
|
|
59
|
+
this.topLeftBorderDoubleInnerBox =
|
|
60
|
+
tlh > 0 || tlv > 0
|
|
61
|
+
? getCurvePoints(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3, tlh - (borderLeftWidth * 2) / 3, tlv - (borderTopWidth * 2) / 3, CORNER.TOP_LEFT)
|
|
62
|
+
: new vector_1.Vector(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3);
|
|
63
|
+
this.topRightBorderDoubleInnerBox =
|
|
64
|
+
tlh > 0 || tlv > 0
|
|
65
|
+
? getCurvePoints(bounds.left + topWidth, bounds.top + (borderTopWidth * 2) / 3, trh - (borderRightWidth * 2) / 3, trv - (borderTopWidth * 2) / 3, CORNER.TOP_RIGHT)
|
|
66
|
+
: new vector_1.Vector(bounds.left + bounds.width - (borderRightWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3);
|
|
67
|
+
this.bottomRightBorderDoubleInnerBox =
|
|
68
|
+
brh > 0 || brv > 0
|
|
69
|
+
? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - (borderRightWidth * 2) / 3, brv - (borderBottomWidth * 2) / 3, CORNER.BOTTOM_RIGHT)
|
|
70
|
+
: new vector_1.Vector(bounds.left + bounds.width - (borderRightWidth * 2) / 3, bounds.top + bounds.height - (borderBottomWidth * 2) / 3);
|
|
71
|
+
this.bottomLeftBorderDoubleInnerBox =
|
|
72
|
+
blh > 0 || blv > 0
|
|
73
|
+
? getCurvePoints(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + leftHeight, blh - (borderLeftWidth * 2) / 3, blv - (borderBottomWidth * 2) / 3, CORNER.BOTTOM_LEFT)
|
|
74
|
+
: new vector_1.Vector(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + bounds.height - (borderBottomWidth * 2) / 3);
|
|
75
|
+
this.topLeftBorderStroke =
|
|
76
|
+
tlh > 0 || tlv > 0
|
|
77
|
+
? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2, tlh - borderLeftWidth / 2, tlv - borderTopWidth / 2, CORNER.TOP_LEFT)
|
|
78
|
+
: new vector_1.Vector(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2);
|
|
79
|
+
this.topRightBorderStroke =
|
|
80
|
+
tlh > 0 || tlv > 0
|
|
81
|
+
? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 2, trh - borderRightWidth / 2, trv - borderTopWidth / 2, CORNER.TOP_RIGHT)
|
|
82
|
+
: new vector_1.Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + borderTopWidth / 2);
|
|
83
|
+
this.bottomRightBorderStroke =
|
|
84
|
+
brh > 0 || brv > 0
|
|
85
|
+
? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 2, brv - borderBottomWidth / 2, CORNER.BOTTOM_RIGHT)
|
|
86
|
+
: new vector_1.Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);
|
|
87
|
+
this.bottomLeftBorderStroke =
|
|
88
|
+
blh > 0 || blv > 0
|
|
89
|
+
? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + leftHeight, blh - borderLeftWidth / 2, blv - borderBottomWidth / 2, CORNER.BOTTOM_LEFT)
|
|
90
|
+
: new vector_1.Vector(bounds.left + borderLeftWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);
|
|
91
|
+
this.topLeftBorderBox =
|
|
92
|
+
tlh > 0 || tlv > 0
|
|
93
|
+
? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT)
|
|
94
|
+
: new vector_1.Vector(bounds.left, bounds.top);
|
|
95
|
+
this.topRightBorderBox =
|
|
96
|
+
trh > 0 || trv > 0
|
|
97
|
+
? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT)
|
|
98
|
+
: new vector_1.Vector(bounds.left + bounds.width, bounds.top);
|
|
99
|
+
this.bottomRightBorderBox =
|
|
100
|
+
brh > 0 || brv > 0
|
|
101
|
+
? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT)
|
|
102
|
+
: new vector_1.Vector(bounds.left + bounds.width, bounds.top + bounds.height);
|
|
103
|
+
this.bottomLeftBorderBox =
|
|
104
|
+
blh > 0 || blv > 0
|
|
105
|
+
? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT)
|
|
106
|
+
: new vector_1.Vector(bounds.left, bounds.top + bounds.height);
|
|
107
|
+
this.topLeftPaddingBox =
|
|
108
|
+
tlh > 0 || tlv > 0
|
|
109
|
+
? getCurvePoints(bounds.left + borderLeftWidth, bounds.top + borderTopWidth, Math.max(0, tlh - borderLeftWidth), Math.max(0, tlv - borderTopWidth), CORNER.TOP_LEFT)
|
|
110
|
+
: new vector_1.Vector(bounds.left + borderLeftWidth, bounds.top + borderTopWidth);
|
|
111
|
+
this.topRightPaddingBox =
|
|
112
|
+
trh > 0 || trv > 0
|
|
113
|
+
? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width - borderRightWidth), bounds.top + borderTopWidth, topWidth > bounds.width + borderRightWidth ? 0 : Math.max(0, trh - borderRightWidth), Math.max(0, trv - borderTopWidth), CORNER.TOP_RIGHT)
|
|
114
|
+
: new vector_1.Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + borderTopWidth);
|
|
115
|
+
this.bottomRightPaddingBox =
|
|
116
|
+
brh > 0 || brv > 0
|
|
117
|
+
? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borderLeftWidth), bounds.top + Math.min(rightHeight, bounds.height - borderBottomWidth), Math.max(0, brh - borderRightWidth), Math.max(0, brv - borderBottomWidth), CORNER.BOTTOM_RIGHT)
|
|
118
|
+
: new vector_1.Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + bounds.height - borderBottomWidth);
|
|
119
|
+
this.bottomLeftPaddingBox =
|
|
120
|
+
blh > 0 || blv > 0
|
|
121
|
+
? getCurvePoints(bounds.left + borderLeftWidth, bounds.top + Math.min(leftHeight, bounds.height - borderBottomWidth), Math.max(0, blh - borderLeftWidth), Math.max(0, blv - borderBottomWidth), CORNER.BOTTOM_LEFT)
|
|
122
|
+
: new vector_1.Vector(bounds.left + borderLeftWidth, bounds.top + bounds.height - borderBottomWidth);
|
|
123
|
+
this.topLeftContentBox =
|
|
124
|
+
tlh > 0 || tlv > 0
|
|
125
|
+
? getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop, Math.max(0, tlh - (borderLeftWidth + paddingLeft)), Math.max(0, tlv - (borderTopWidth + paddingTop)), CORNER.TOP_LEFT)
|
|
126
|
+
: new vector_1.Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop);
|
|
127
|
+
this.topRightContentBox =
|
|
128
|
+
trh > 0 || trv > 0
|
|
129
|
+
? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth + paddingLeft), bounds.top + borderTopWidth + paddingTop, topWidth > bounds.width + borderLeftWidth + paddingLeft ? 0 : trh - borderLeftWidth + paddingLeft, trv - (borderTopWidth + paddingTop), CORNER.TOP_RIGHT)
|
|
130
|
+
: new vector_1.Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + borderTopWidth + paddingTop);
|
|
131
|
+
this.bottomRightContentBox =
|
|
132
|
+
brh > 0 || brv > 0
|
|
133
|
+
? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - (borderLeftWidth + paddingLeft)), bounds.top + Math.min(rightHeight, bounds.height + borderTopWidth + paddingTop), Math.max(0, brh - (borderRightWidth + paddingRight)), brv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_RIGHT)
|
|
134
|
+
: new vector_1.Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + bounds.height - (borderBottomWidth + paddingBottom));
|
|
135
|
+
this.bottomLeftContentBox =
|
|
136
|
+
blh > 0 || blv > 0
|
|
137
|
+
? getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + leftHeight, Math.max(0, blh - (borderLeftWidth + paddingLeft)), blv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_LEFT)
|
|
138
|
+
: new vector_1.Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + bounds.height - (borderBottomWidth + paddingBottom));
|
|
139
|
+
}
|
|
140
|
+
return BoundCurves;
|
|
141
|
+
}());
|
|
142
|
+
exports.BoundCurves = BoundCurves;
|
|
143
|
+
var CORNER;
|
|
144
|
+
(function (CORNER) {
|
|
145
|
+
CORNER[CORNER["TOP_LEFT"] = 0] = "TOP_LEFT";
|
|
146
|
+
CORNER[CORNER["TOP_RIGHT"] = 1] = "TOP_RIGHT";
|
|
147
|
+
CORNER[CORNER["BOTTOM_RIGHT"] = 2] = "BOTTOM_RIGHT";
|
|
148
|
+
CORNER[CORNER["BOTTOM_LEFT"] = 3] = "BOTTOM_LEFT";
|
|
149
|
+
})(CORNER || (CORNER = {}));
|
|
150
|
+
var getCurvePoints = function (x, y, r1, r2, position) {
|
|
151
|
+
var kappa = 4 * ((Math.sqrt(2) - 1) / 3);
|
|
152
|
+
var ox = r1 * kappa; // control point offset horizontal
|
|
153
|
+
var oy = r2 * kappa; // control point offset vertical
|
|
154
|
+
var xm = x + r1; // x-middle
|
|
155
|
+
var ym = y + r2; // y-middle
|
|
156
|
+
switch (position) {
|
|
157
|
+
case CORNER.TOP_LEFT:
|
|
158
|
+
return new bezier_curve_1.BezierCurve(new vector_1.Vector(x, ym), new vector_1.Vector(x, ym - oy), new vector_1.Vector(xm - ox, y), new vector_1.Vector(xm, y));
|
|
159
|
+
case CORNER.TOP_RIGHT:
|
|
160
|
+
return new bezier_curve_1.BezierCurve(new vector_1.Vector(x, y), new vector_1.Vector(x + ox, y), new vector_1.Vector(xm, ym - oy), new vector_1.Vector(xm, ym));
|
|
161
|
+
case CORNER.BOTTOM_RIGHT:
|
|
162
|
+
return new bezier_curve_1.BezierCurve(new vector_1.Vector(xm, y), new vector_1.Vector(xm, y + oy), new vector_1.Vector(x + ox, ym), new vector_1.Vector(x, ym));
|
|
163
|
+
case CORNER.BOTTOM_LEFT:
|
|
164
|
+
default:
|
|
165
|
+
return new bezier_curve_1.BezierCurve(new vector_1.Vector(xm, ym), new vector_1.Vector(xm - ox, ym), new vector_1.Vector(x, y + oy), new vector_1.Vector(x, y));
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
var calculateBorderBoxPath = function (curves) {
|
|
169
|
+
return [curves.topLeftBorderBox, curves.topRightBorderBox, curves.bottomRightBorderBox, curves.bottomLeftBorderBox];
|
|
170
|
+
};
|
|
171
|
+
exports.calculateBorderBoxPath = calculateBorderBoxPath;
|
|
172
|
+
var calculateContentBoxPath = function (curves) {
|
|
173
|
+
return [
|
|
174
|
+
curves.topLeftContentBox,
|
|
175
|
+
curves.topRightContentBox,
|
|
176
|
+
curves.bottomRightContentBox,
|
|
177
|
+
curves.bottomLeftContentBox
|
|
178
|
+
];
|
|
179
|
+
};
|
|
180
|
+
exports.calculateContentBoxPath = calculateContentBoxPath;
|
|
181
|
+
var calculatePaddingBoxPath = function (curves) {
|
|
182
|
+
return [
|
|
183
|
+
curves.topLeftPaddingBox,
|
|
184
|
+
curves.topRightPaddingBox,
|
|
185
|
+
curves.bottomRightPaddingBox,
|
|
186
|
+
curves.bottomLeftPaddingBox
|
|
187
|
+
];
|
|
188
|
+
};
|
|
189
|
+
exports.calculatePaddingBoxPath = calculatePaddingBoxPath;
|
|
190
|
+
//# sourceMappingURL=bound-curves.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bound-curves.js","sourceRoot":"","sources":["../../../src/render/bound-curves.ts"],"names":[],"mappings":";;;AACA,oEAA0F;AAC1F,mCAAgC;AAChC,+CAA2C;AAG3C;IA0BI,qBAAY,OAAyB;QACjC,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAE1B,IAAA,KAAa,IAAA,4CAAwB,EAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAA7F,GAAG,QAAA,EAAE,GAAG,QAAqF,CAAC;QAC/F,IAAA,KAAa,IAAA,4CAAwB,EAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAA9F,GAAG,QAAA,EAAE,GAAG,QAAsF,CAAC;QAChG,IAAA,KAAa,IAAA,4CAAwB,EAAC,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAjG,GAAG,QAAA,EAAE,GAAG,QAAyF,CAAC;QACnG,IAAA,KAAa,IAAA,4CAAwB,EAAC,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CA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AAEK,IAAM,uBAAuB,GAAG,UAAC,MAAmB;IACvD,OAAO;QACH,MAAM,CAAC,iBAAiB;QACxB,MAAM,CAAC,kBAAkB;QACzB,MAAM,CAAC,qBAAqB;QAC5B,MAAM,CAAC,oBAAoB;KAC9B,CAAC;AACN,CAAC,CAAC;AAPW,QAAA,uBAAuB,2BAOlC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.contentBox = exports.paddingBox = void 0;
|
|
4
|
+
var length_percentage_1 = require("../css/types/length-percentage");
|
|
5
|
+
var paddingBox = function (element) {
|
|
6
|
+
var bounds = element.bounds;
|
|
7
|
+
var styles = element.styles;
|
|
8
|
+
return bounds.add(styles.borderLeftWidth, styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth), -(styles.borderTopWidth + styles.borderBottomWidth));
|
|
9
|
+
};
|
|
10
|
+
exports.paddingBox = paddingBox;
|
|
11
|
+
var contentBox = function (element) {
|
|
12
|
+
var styles = element.styles;
|
|
13
|
+
var bounds = element.bounds;
|
|
14
|
+
var paddingLeft = (0, length_percentage_1.getAbsoluteValue)(styles.paddingLeft, bounds.width);
|
|
15
|
+
var paddingRight = (0, length_percentage_1.getAbsoluteValue)(styles.paddingRight, bounds.width);
|
|
16
|
+
var paddingTop = (0, length_percentage_1.getAbsoluteValue)(styles.paddingTop, bounds.width);
|
|
17
|
+
var paddingBottom = (0, length_percentage_1.getAbsoluteValue)(styles.paddingBottom, bounds.width);
|
|
18
|
+
return bounds.add(paddingLeft + styles.borderLeftWidth, paddingTop + styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth + paddingLeft + paddingRight), -(styles.borderTopWidth + styles.borderBottomWidth + paddingTop + paddingBottom));
|
|
19
|
+
};
|
|
20
|
+
exports.contentBox = contentBox;
|
|
21
|
+
//# sourceMappingURL=box-sizing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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