@cj-tech-master/excelts 9.4.2 → 9.5.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/dist/browser/index.browser.d.ts +8 -5
- package/dist/browser/index.browser.js +19 -1
- package/dist/browser/index.d.ts +4 -2
- package/dist/browser/index.js +9 -1
- package/dist/browser/modules/excel/chart/cache-populator.d.ts +49 -0
- package/dist/browser/modules/excel/chart/cache-populator.js +1171 -0
- package/dist/browser/modules/excel/chart/chart-api.d.ts +92 -0
- package/dist/browser/modules/excel/chart/chart-api.js +364 -0
- package/dist/browser/modules/excel/chart/chart-builder.d.ts +48 -0
- package/dist/browser/modules/excel/chart/chart-builder.js +2432 -0
- package/dist/browser/modules/excel/chart/chart-ex-builder.d.ts +36 -0
- package/dist/browser/modules/excel/chart/chart-ex-builder.js +903 -0
- package/dist/browser/modules/excel/chart/chart-ex-parser.d.ts +8 -0
- package/dist/browser/modules/excel/chart/chart-ex-parser.js +1205 -0
- package/dist/browser/modules/excel/chart/chart-ex-renderer.d.ts +187 -0
- package/dist/browser/modules/excel/chart/chart-ex-renderer.js +5352 -0
- package/dist/browser/modules/excel/chart/chart-ex-types.d.ts +531 -0
- package/dist/browser/modules/excel/chart/chart-ex-types.js +11 -0
- package/dist/browser/modules/excel/chart/chart-images.d.ts +78 -0
- package/dist/browser/modules/excel/chart/chart-images.js +363 -0
- package/dist/browser/modules/excel/chart/chart-presets.d.ts +392 -0
- package/dist/browser/modules/excel/chart/chart-presets.js +179 -0
- package/dist/browser/modules/excel/chart/chart-renderer.d.ts +550 -0
- package/dist/browser/modules/excel/chart/chart-renderer.js +6440 -0
- package/dist/browser/modules/excel/chart/chart-sidecar.d.ts +21 -0
- package/dist/browser/modules/excel/chart/chart-sidecar.js +427 -0
- package/dist/browser/modules/excel/chart/chart-utils.d.ts +306 -0
- package/dist/browser/modules/excel/chart/chart-utils.js +821 -0
- package/dist/browser/modules/excel/chart/chart.d.ts +504 -0
- package/dist/browser/modules/excel/chart/chart.js +1320 -0
- package/dist/browser/modules/excel/chart/glyph-rasterizer.d.ts +62 -0
- package/dist/browser/modules/excel/chart/glyph-rasterizer.js +658 -0
- package/dist/browser/modules/excel/chart/index.d.ts +54 -0
- package/dist/browser/modules/excel/chart/index.js +46 -0
- package/dist/browser/modules/excel/chart/install.d.ts +44 -0
- package/dist/browser/modules/excel/chart/install.js +91 -0
- package/dist/browser/modules/excel/chart/shape-properties.d.ts +156 -0
- package/dist/browser/modules/excel/chart/shape-properties.js +1557 -0
- package/dist/browser/modules/excel/chart/stroke-font.d.ts +36 -0
- package/dist/browser/modules/excel/chart/stroke-font.js +1556 -0
- package/dist/browser/modules/excel/chart/topojson.d.ts +98 -0
- package/dist/browser/modules/excel/chart/topojson.js +236 -0
- package/dist/browser/modules/excel/chart/types.d.ts +2559 -0
- package/dist/browser/modules/excel/chart/types.js +8 -0
- package/dist/browser/modules/excel/chart-host-registry.d.ts +157 -0
- package/dist/browser/modules/excel/chart-host-registry.js +90 -0
- package/dist/browser/modules/excel/chartsheet.d.ts +102 -0
- package/dist/browser/modules/excel/chartsheet.js +196 -0
- package/dist/browser/modules/excel/defined-names.d.ts +35 -0
- package/dist/browser/modules/excel/defined-names.js +44 -4
- package/dist/browser/modules/excel/errors.d.ts +6 -0
- package/dist/browser/modules/excel/errors.js +9 -0
- package/dist/browser/modules/excel/form-control.d.ts +6 -0
- package/dist/browser/modules/excel/form-control.js +17 -0
- package/dist/browser/modules/excel/image.js +12 -2
- package/dist/browser/modules/excel/pivot-chart.d.ts +7 -0
- package/dist/browser/modules/excel/pivot-chart.js +53 -0
- package/dist/browser/modules/excel/pivot-table.d.ts +55 -0
- package/dist/browser/modules/excel/pivot-table.js +35 -0
- package/dist/browser/modules/excel/range.js +5 -1
- package/dist/browser/modules/excel/sparkline/index.d.ts +7 -0
- package/dist/browser/modules/excel/sparkline/index.js +7 -0
- package/dist/browser/modules/excel/sparkline/sparkline.d.ts +206 -0
- package/dist/browser/modules/excel/sparkline/sparkline.js +750 -0
- package/dist/browser/modules/excel/stream/worksheet-writer.js +3 -2
- package/dist/browser/modules/excel/table.js +42 -6
- package/dist/browser/modules/excel/types.d.ts +72 -0
- package/dist/browser/modules/excel/utils/address.d.ts +18 -0
- package/dist/browser/modules/excel/utils/address.js +28 -0
- package/dist/browser/modules/excel/utils/drawing-utils.js +11 -6
- package/dist/browser/modules/excel/utils/guid.d.ts +15 -0
- package/dist/browser/modules/excel/utils/guid.js +35 -0
- package/dist/browser/modules/excel/utils/ooxml-paths.d.ts +74 -0
- package/dist/browser/modules/excel/utils/ooxml-paths.js +206 -9
- package/dist/browser/modules/excel/utils/ooxml-validator/check-chart-sidecar.d.ts +35 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-chart-sidecar.js +101 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-chart.d.ts +32 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-chart.js +2125 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-chartsheet.d.ts +9 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-chartsheet.js +26 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-content-types.d.ts +16 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-content-types.js +181 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-drawing.d.ts +34 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-drawing.js +267 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-pivot.d.ts +14 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-pivot.js +104 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-relationships.d.ts +18 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-relationships.js +184 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-structure.d.ts +21 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-structure.js +56 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-styles.d.ts +15 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-styles.js +89 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-table.d.ts +31 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-table.js +177 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-workbook.d.ts +19 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-workbook.js +163 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-worksheet.d.ts +25 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/check-worksheet.js +569 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/context.d.ts +85 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/context.js +191 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/index.d.ts +31 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/index.js +102 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/path-utils.d.ts +67 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/path-utils.js +156 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/reporter.d.ts +41 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/reporter.js +61 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/types.d.ts +109 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/types.js +12 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/xml-utils.d.ts +38 -0
- package/dist/browser/modules/excel/utils/ooxml-validator/xml-utils.js +100 -0
- package/dist/browser/modules/excel/workbook.browser.d.ts +248 -30
- package/dist/browser/modules/excel/workbook.browser.js +966 -31
- package/dist/browser/modules/excel/workbook.d.ts +43 -0
- package/dist/browser/modules/excel/workbook.js +48 -0
- package/dist/browser/modules/excel/worksheet.d.ts +157 -3
- package/dist/browser/modules/excel/worksheet.js +394 -35
- package/dist/browser/modules/excel/xlsx/rel-type.d.ts +40 -0
- package/dist/browser/modules/excel/xlsx/rel-type.js +41 -1
- package/dist/browser/modules/excel/xlsx/xform/book/defined-name-xform.d.ts +1 -0
- package/dist/browser/modules/excel/xlsx/xform/book/defined-name-xform.js +11 -2
- package/dist/browser/modules/excel/xlsx/xform/book/external-link-xform.js +12 -10
- package/dist/browser/modules/excel/xlsx/xform/book/workbook-xform.js +96 -22
- package/dist/browser/modules/excel/xlsx/xform/chart/chart-space-xform.d.ts +353 -0
- package/dist/browser/modules/excel/xlsx/xform/chart/chart-space-xform.js +6000 -0
- package/dist/browser/modules/excel/xlsx/xform/comment/threaded-comments-xform.d.ts +60 -0
- package/dist/browser/modules/excel/xlsx/xform/comment/threaded-comments-xform.js +213 -0
- package/dist/browser/modules/excel/xlsx/xform/core/content-types-xform.js +150 -11
- package/dist/browser/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.js +20 -1
- package/dist/browser/modules/excel/xlsx/xform/drawing/base-cell-anchor-xform.js +1 -1
- package/dist/browser/modules/excel/xlsx/xform/drawing/drawing-xform.d.ts +30 -0
- package/dist/browser/modules/excel/xlsx/xform/drawing/drawing-xform.js +109 -5
- package/dist/browser/modules/excel/xlsx/xform/drawing/graphic-frame-xform.d.ts +54 -0
- package/dist/browser/modules/excel/xlsx/xform/drawing/graphic-frame-xform.js +225 -0
- package/dist/browser/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.d.ts +3 -1
- package/dist/browser/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.js +18 -3
- package/dist/browser/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.d.ts +46 -0
- package/dist/browser/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.js +294 -12
- package/dist/browser/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.d.ts +13 -2
- package/dist/browser/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.js +32 -6
- package/dist/browser/modules/excel/xlsx/xform/sheet/chartsheet-xform.d.ts +185 -0
- package/dist/browser/modules/excel/xlsx/xform/sheet/chartsheet-xform.js +441 -0
- package/dist/browser/modules/excel/xlsx/xform/sheet/ext-lst-xform.d.ts +1 -0
- package/dist/browser/modules/excel/xlsx/xform/sheet/ext-lst-xform.js +51 -2
- package/dist/browser/modules/excel/xlsx/xform/sheet/worksheet-xform.js +196 -20
- package/dist/browser/modules/excel/xlsx/xform/table/auto-filter-xform.js +16 -1
- package/dist/browser/modules/excel/xlsx/xform/table/table-column-xform.js +17 -2
- package/dist/browser/modules/excel/xlsx/xform/xsd-values.d.ts +63 -0
- package/dist/browser/modules/excel/xlsx/xform/xsd-values.js +101 -0
- package/dist/browser/modules/excel/xlsx/xlsx.browser.d.ts +115 -21
- package/dist/browser/modules/excel/xlsx/xlsx.browser.js +4422 -78
- package/dist/browser/modules/pdf/builder/document-builder.d.ts +74 -0
- package/dist/browser/modules/pdf/builder/document-builder.js +507 -2
- package/dist/browser/modules/pdf/builder/pdf-editor.js +48 -3
- package/dist/browser/modules/pdf/excel-bridge.d.ts +69 -0
- package/dist/browser/modules/pdf/excel-bridge.js +683 -12
- package/dist/browser/modules/pdf/font/font-manager.d.ts +25 -0
- package/dist/browser/modules/pdf/font/font-manager.js +39 -0
- package/dist/browser/modules/pdf/index.d.ts +5 -2
- package/dist/browser/modules/pdf/index.js +3 -1
- package/dist/browser/modules/pdf/render/chart-surface.d.ts +33 -0
- package/dist/browser/modules/pdf/render/chart-surface.js +200 -0
- package/dist/browser/modules/pdf/render/layout-engine.d.ts +22 -1
- package/dist/browser/modules/pdf/render/layout-engine.js +436 -56
- package/dist/browser/modules/pdf/render/page-renderer.js +169 -28
- package/dist/browser/modules/pdf/render/pdf-exporter.js +117 -7
- package/dist/browser/modules/pdf/types.d.ts +227 -23
- package/dist/browser/modules/pdf/types.js +4 -0
- package/dist/browser/modules/pdf/word-bridge.d.ts +47 -0
- package/dist/browser/modules/pdf/word-bridge.js +304 -0
- package/dist/browser/modules/word/constants.d.ts +179 -0
- package/dist/browser/modules/word/constants.js +231 -0
- package/dist/browser/modules/word/content-types.d.ts +27 -0
- package/dist/browser/modules/word/content-types.js +53 -0
- package/dist/browser/modules/word/digital-signatures.d.ts +87 -0
- package/dist/browser/modules/word/digital-signatures.js +134 -0
- package/dist/browser/modules/word/document.d.ts +728 -0
- package/dist/browser/modules/word/document.js +1795 -0
- package/dist/browser/modules/word/docx-packager.d.ts +14 -0
- package/dist/browser/modules/word/docx-packager.js +822 -0
- package/dist/browser/modules/word/docx-reader.d.ts +11 -0
- package/dist/browser/modules/word/docx-reader.js +4929 -0
- package/dist/browser/modules/word/encryption.d.ts +102 -0
- package/dist/browser/modules/word/encryption.js +274 -0
- package/dist/browser/modules/word/errors.d.ts +49 -0
- package/dist/browser/modules/word/errors.js +68 -0
- package/dist/browser/modules/word/font-obfuscation.d.ts +31 -0
- package/dist/browser/modules/word/font-obfuscation.js +83 -0
- package/dist/browser/modules/word/html-renderer.d.ts +38 -0
- package/dist/browser/modules/word/html-renderer.js +782 -0
- package/dist/browser/modules/word/index.base.d.ts +19 -0
- package/dist/browser/modules/word/index.base.js +51 -0
- package/dist/browser/modules/word/index.browser.d.ts +4 -0
- package/dist/browser/modules/word/index.browser.js +4 -0
- package/dist/browser/modules/word/index.d.ts +4 -0
- package/dist/browser/modules/word/index.js +4 -0
- package/dist/browser/modules/word/internal-utils.d.ts +23 -0
- package/dist/browser/modules/word/internal-utils.js +54 -0
- package/dist/browser/modules/word/relationships.d.ts +31 -0
- package/dist/browser/modules/word/relationships.js +56 -0
- package/dist/browser/modules/word/types.d.ts +2325 -0
- package/dist/browser/modules/word/types.js +10 -0
- package/dist/browser/modules/word/units.d.ts +49 -0
- package/dist/browser/modules/word/units.js +111 -0
- package/dist/browser/modules/word/writers/chart-writer.d.ts +10 -0
- package/dist/browser/modules/word/writers/chart-writer.js +385 -0
- package/dist/browser/modules/word/writers/checkbox-writer.d.ts +9 -0
- package/dist/browser/modules/word/writers/checkbox-writer.js +42 -0
- package/dist/browser/modules/word/writers/comment-writer.d.ts +15 -0
- package/dist/browser/modules/word/writers/comment-writer.js +70 -0
- package/dist/browser/modules/word/writers/document-writer.d.ts +16 -0
- package/dist/browser/modules/word/writers/document-writer.js +461 -0
- package/dist/browser/modules/word/writers/footnote-writer.d.ts +11 -0
- package/dist/browser/modules/word/writers/footnote-writer.js +72 -0
- package/dist/browser/modules/word/writers/header-footer-writer.d.ts +13 -0
- package/dist/browser/modules/word/writers/header-footer-writer.js +129 -0
- package/dist/browser/modules/word/writers/image-writer.d.ts +10 -0
- package/dist/browser/modules/word/writers/image-writer.js +185 -0
- package/dist/browser/modules/word/writers/math-writer.d.ts +9 -0
- package/dist/browser/modules/word/writers/math-writer.js +428 -0
- package/dist/browser/modules/word/writers/numbering-writer.d.ts +10 -0
- package/dist/browser/modules/word/writers/numbering-writer.js +125 -0
- package/dist/browser/modules/word/writers/paragraph-writer.d.ts +13 -0
- package/dist/browser/modules/word/writers/paragraph-writer.js +516 -0
- package/dist/browser/modules/word/writers/parts-writer.d.ts +26 -0
- package/dist/browser/modules/word/writers/parts-writer.js +660 -0
- package/dist/browser/modules/word/writers/run-writer.d.ts +15 -0
- package/dist/browser/modules/word/writers/run-writer.js +649 -0
- package/dist/browser/modules/word/writers/section-writer.d.ts +10 -0
- package/dist/browser/modules/word/writers/section-writer.js +238 -0
- package/dist/browser/modules/word/writers/styles-writer.d.ts +10 -0
- package/dist/browser/modules/word/writers/styles-writer.js +242 -0
- package/dist/browser/modules/word/writers/table-writer.d.ts +10 -0
- package/dist/browser/modules/word/writers/table-writer.js +503 -0
- package/dist/browser/modules/word/writers/textbox-writer.d.ts +9 -0
- package/dist/browser/modules/word/writers/textbox-writer.js +53 -0
- package/dist/browser/modules/word/writers/toc-writer.d.ts +9 -0
- package/dist/browser/modules/word/writers/toc-writer.js +79 -0
- package/dist/browser/modules/xml/encode.d.ts +56 -7
- package/dist/browser/modules/xml/encode.js +157 -11
- package/dist/cjs/index.js +13 -2
- package/dist/cjs/modules/excel/chart/cache-populator.js +1178 -0
- package/dist/cjs/modules/excel/chart/chart-api.js +371 -0
- package/dist/cjs/modules/excel/chart/chart-builder.js +2440 -0
- package/dist/cjs/modules/excel/chart/chart-ex-builder.js +907 -0
- package/dist/cjs/modules/excel/chart/chart-ex-parser.js +1208 -0
- package/dist/cjs/modules/excel/chart/chart-ex-renderer.js +5364 -0
- package/dist/cjs/modules/excel/chart/chart-ex-types.js +12 -0
- package/dist/cjs/modules/excel/chart/chart-images.js +366 -0
- package/dist/cjs/modules/excel/chart/chart-presets.js +184 -0
- package/dist/cjs/modules/excel/chart/chart-renderer.js +6450 -0
- package/dist/cjs/modules/excel/chart/chart-sidecar.js +433 -0
- package/dist/cjs/modules/excel/chart/chart-utils.js +845 -0
- package/dist/cjs/modules/excel/chart/chart.js +1324 -0
- package/dist/cjs/modules/excel/chart/glyph-rasterizer.js +664 -0
- package/dist/cjs/modules/excel/chart/index.js +101 -0
- package/dist/cjs/modules/excel/chart/install.js +95 -0
- package/dist/cjs/modules/excel/chart/shape-properties.js +1577 -0
- package/dist/cjs/modules/excel/chart/stroke-font.js +1559 -0
- package/dist/cjs/modules/excel/chart/topojson.js +239 -0
- package/dist/cjs/modules/excel/chart/types.js +9 -0
- package/dist/cjs/modules/excel/chart-host-registry.js +96 -0
- package/dist/cjs/modules/excel/chartsheet.js +199 -0
- package/dist/cjs/modules/excel/defined-names.js +44 -4
- package/dist/cjs/modules/excel/errors.js +11 -1
- package/dist/cjs/modules/excel/form-control.js +17 -0
- package/dist/cjs/modules/excel/image.js +12 -2
- package/dist/cjs/modules/excel/pivot-chart.js +56 -0
- package/dist/cjs/modules/excel/pivot-table.js +35 -0
- package/dist/cjs/modules/excel/range.js +5 -1
- package/dist/cjs/modules/excel/sparkline/index.js +23 -0
- package/dist/cjs/modules/excel/sparkline/sparkline.js +756 -0
- package/dist/cjs/modules/excel/stream/worksheet-writer.js +3 -2
- package/dist/cjs/modules/excel/table.js +42 -6
- package/dist/cjs/modules/excel/utils/address.js +29 -0
- package/dist/cjs/modules/excel/utils/drawing-utils.js +11 -6
- package/dist/cjs/modules/excel/utils/guid.js +38 -0
- package/dist/cjs/modules/excel/utils/ooxml-paths.js +246 -9
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-chart-sidecar.js +103 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-chart.js +2128 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-chartsheet.js +29 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-content-types.js +184 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-drawing.js +270 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-pivot.js +107 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-relationships.js +188 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-structure.js +60 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-styles.js +92 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-table.js +180 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-workbook.js +166 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/check-worksheet.js +572 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/context.js +196 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/index.js +105 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/path-utils.js +168 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/reporter.js +66 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/types.js +13 -0
- package/dist/cjs/modules/excel/utils/ooxml-validator/xml-utils.js +110 -0
- package/dist/cjs/modules/excel/workbook.browser.js +973 -38
- package/dist/cjs/modules/excel/workbook.js +48 -0
- package/dist/cjs/modules/excel/worksheet.js +393 -34
- package/dist/cjs/modules/excel/xlsx/rel-type.js +41 -1
- package/dist/cjs/modules/excel/xlsx/xform/book/defined-name-xform.js +11 -2
- package/dist/cjs/modules/excel/xlsx/xform/book/external-link-xform.js +12 -10
- package/dist/cjs/modules/excel/xlsx/xform/book/workbook-xform.js +96 -22
- package/dist/cjs/modules/excel/xlsx/xform/chart/chart-space-xform.js +6003 -0
- package/dist/cjs/modules/excel/xlsx/xform/comment/threaded-comments-xform.js +219 -0
- package/dist/cjs/modules/excel/xlsx/xform/core/content-types-xform.js +149 -10
- package/dist/cjs/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.js +20 -1
- package/dist/cjs/modules/excel/xlsx/xform/drawing/base-cell-anchor-xform.js +1 -1
- package/dist/cjs/modules/excel/xlsx/xform/drawing/drawing-xform.js +109 -5
- package/dist/cjs/modules/excel/xlsx/xform/drawing/graphic-frame-xform.js +228 -0
- package/dist/cjs/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.js +18 -3
- package/dist/cjs/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.js +294 -12
- package/dist/cjs/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.js +32 -6
- package/dist/cjs/modules/excel/xlsx/xform/sheet/chartsheet-xform.js +444 -0
- package/dist/cjs/modules/excel/xlsx/xform/sheet/ext-lst-xform.js +51 -2
- package/dist/cjs/modules/excel/xlsx/xform/sheet/worksheet-xform.js +195 -19
- package/dist/cjs/modules/excel/xlsx/xform/table/auto-filter-xform.js +16 -1
- package/dist/cjs/modules/excel/xlsx/xform/table/table-column-xform.js +17 -2
- package/dist/cjs/modules/excel/xlsx/xform/xsd-values.js +106 -0
- package/dist/cjs/modules/excel/xlsx/xlsx.browser.js +4420 -76
- package/dist/cjs/modules/pdf/builder/document-builder.js +506 -1
- package/dist/cjs/modules/pdf/builder/pdf-editor.js +48 -3
- package/dist/cjs/modules/pdf/excel-bridge.js +684 -12
- package/dist/cjs/modules/pdf/font/font-manager.js +39 -0
- package/dist/cjs/modules/pdf/index.js +5 -1
- package/dist/cjs/modules/pdf/render/chart-surface.js +203 -0
- package/dist/cjs/modules/pdf/render/layout-engine.js +437 -56
- package/dist/cjs/modules/pdf/render/page-renderer.js +169 -28
- package/dist/cjs/modules/pdf/render/pdf-exporter.js +115 -5
- package/dist/cjs/modules/pdf/types.js +5 -0
- package/dist/cjs/modules/pdf/word-bridge.js +307 -0
- package/dist/cjs/modules/word/constants.js +234 -0
- package/dist/cjs/modules/word/content-types.js +57 -0
- package/dist/cjs/modules/word/digital-signatures.js +140 -0
- package/dist/cjs/modules/word/document.js +1909 -0
- package/dist/cjs/modules/word/docx-packager.js +825 -0
- package/dist/cjs/modules/word/docx-reader.js +4932 -0
- package/dist/cjs/modules/word/encryption.js +282 -0
- package/dist/cjs/modules/word/errors.js +88 -0
- package/dist/cjs/modules/word/font-obfuscation.js +88 -0
- package/dist/cjs/modules/word/html-renderer.js +785 -0
- package/dist/cjs/modules/word/index.base.js +199 -0
- package/dist/cjs/modules/word/index.browser.js +20 -0
- package/dist/cjs/modules/word/index.js +20 -0
- package/dist/cjs/modules/word/internal-utils.js +59 -0
- package/dist/cjs/modules/word/relationships.js +60 -0
- package/dist/cjs/modules/word/types.js +11 -0
- package/dist/cjs/modules/word/units.js +135 -0
- package/dist/cjs/modules/word/writers/chart-writer.js +388 -0
- package/dist/cjs/modules/word/writers/checkbox-writer.js +45 -0
- package/dist/cjs/modules/word/writers/comment-writer.js +74 -0
- package/dist/cjs/modules/word/writers/document-writer.js +465 -0
- package/dist/cjs/modules/word/writers/footnote-writer.js +76 -0
- package/dist/cjs/modules/word/writers/header-footer-writer.js +134 -0
- package/dist/cjs/modules/word/writers/image-writer.js +188 -0
- package/dist/cjs/modules/word/writers/math-writer.js +431 -0
- package/dist/cjs/modules/word/writers/numbering-writer.js +128 -0
- package/dist/cjs/modules/word/writers/paragraph-writer.js +521 -0
- package/dist/cjs/modules/word/writers/parts-writer.js +671 -0
- package/dist/cjs/modules/word/writers/run-writer.js +655 -0
- package/dist/cjs/modules/word/writers/section-writer.js +241 -0
- package/dist/cjs/modules/word/writers/styles-writer.js +245 -0
- package/dist/cjs/modules/word/writers/table-writer.js +506 -0
- package/dist/cjs/modules/word/writers/textbox-writer.js +56 -0
- package/dist/cjs/modules/word/writers/toc-writer.js +82 -0
- package/dist/cjs/modules/xml/encode.js +158 -11
- package/dist/esm/index.browser.js +20 -2
- package/dist/esm/index.js +9 -1
- package/dist/esm/modules/excel/chart/cache-populator.js +1171 -0
- package/dist/esm/modules/excel/chart/chart-api.js +364 -0
- package/dist/esm/modules/excel/chart/chart-builder.js +2432 -0
- package/dist/esm/modules/excel/chart/chart-ex-builder.js +903 -0
- package/dist/esm/modules/excel/chart/chart-ex-parser.js +1205 -0
- package/dist/esm/modules/excel/chart/chart-ex-renderer.js +5352 -0
- package/dist/esm/modules/excel/chart/chart-ex-types.js +11 -0
- package/dist/esm/modules/excel/chart/chart-images.js +363 -0
- package/dist/esm/modules/excel/chart/chart-presets.js +179 -0
- package/dist/esm/modules/excel/chart/chart-renderer.js +6440 -0
- package/dist/esm/modules/excel/chart/chart-sidecar.js +427 -0
- package/dist/esm/modules/excel/chart/chart-utils.js +821 -0
- package/dist/esm/modules/excel/chart/chart.js +1320 -0
- package/dist/esm/modules/excel/chart/glyph-rasterizer.js +658 -0
- package/dist/esm/modules/excel/chart/index.js +46 -0
- package/dist/esm/modules/excel/chart/install.js +91 -0
- package/dist/esm/modules/excel/chart/shape-properties.js +1557 -0
- package/dist/esm/modules/excel/chart/stroke-font.js +1556 -0
- package/dist/esm/modules/excel/chart/topojson.js +236 -0
- package/dist/esm/modules/excel/chart/types.js +8 -0
- package/dist/esm/modules/excel/chart-host-registry.js +90 -0
- package/dist/esm/modules/excel/chartsheet.js +196 -0
- package/dist/esm/modules/excel/defined-names.js +44 -4
- package/dist/esm/modules/excel/errors.js +9 -0
- package/dist/esm/modules/excel/form-control.js +17 -0
- package/dist/esm/modules/excel/image.js +12 -2
- package/dist/esm/modules/excel/pivot-chart.js +53 -0
- package/dist/esm/modules/excel/pivot-table.js +35 -0
- package/dist/esm/modules/excel/range.js +5 -1
- package/dist/esm/modules/excel/sparkline/index.js +7 -0
- package/dist/esm/modules/excel/sparkline/sparkline.js +750 -0
- package/dist/esm/modules/excel/stream/worksheet-writer.js +3 -2
- package/dist/esm/modules/excel/table.js +42 -6
- package/dist/esm/modules/excel/utils/address.js +28 -0
- package/dist/esm/modules/excel/utils/drawing-utils.js +11 -6
- package/dist/esm/modules/excel/utils/guid.js +35 -0
- package/dist/esm/modules/excel/utils/ooxml-paths.js +206 -9
- package/dist/esm/modules/excel/utils/ooxml-validator/check-chart-sidecar.js +101 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-chart.js +2125 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-chartsheet.js +26 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-content-types.js +181 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-drawing.js +267 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-pivot.js +104 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-relationships.js +184 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-structure.js +56 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-styles.js +89 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-table.js +177 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-workbook.js +163 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/check-worksheet.js +569 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/context.js +191 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/index.js +102 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/path-utils.js +156 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/reporter.js +61 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/types.js +12 -0
- package/dist/esm/modules/excel/utils/ooxml-validator/xml-utils.js +100 -0
- package/dist/esm/modules/excel/workbook.browser.js +969 -34
- package/dist/esm/modules/excel/workbook.js +48 -0
- package/dist/esm/modules/excel/worksheet.js +394 -35
- package/dist/esm/modules/excel/xlsx/rel-type.js +41 -1
- package/dist/esm/modules/excel/xlsx/xform/book/defined-name-xform.js +11 -2
- package/dist/esm/modules/excel/xlsx/xform/book/external-link-xform.js +12 -10
- package/dist/esm/modules/excel/xlsx/xform/book/workbook-xform.js +96 -22
- package/dist/esm/modules/excel/xlsx/xform/chart/chart-space-xform.js +6000 -0
- package/dist/esm/modules/excel/xlsx/xform/comment/threaded-comments-xform.js +213 -0
- package/dist/esm/modules/excel/xlsx/xform/core/content-types-xform.js +150 -11
- package/dist/esm/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.js +20 -1
- package/dist/esm/modules/excel/xlsx/xform/drawing/base-cell-anchor-xform.js +1 -1
- package/dist/esm/modules/excel/xlsx/xform/drawing/drawing-xform.js +109 -5
- package/dist/esm/modules/excel/xlsx/xform/drawing/graphic-frame-xform.js +225 -0
- package/dist/esm/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.js +18 -3
- package/dist/esm/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.js +294 -12
- package/dist/esm/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.js +32 -6
- package/dist/esm/modules/excel/xlsx/xform/sheet/chartsheet-xform.js +441 -0
- package/dist/esm/modules/excel/xlsx/xform/sheet/ext-lst-xform.js +51 -2
- package/dist/esm/modules/excel/xlsx/xform/sheet/worksheet-xform.js +196 -20
- package/dist/esm/modules/excel/xlsx/xform/table/auto-filter-xform.js +16 -1
- package/dist/esm/modules/excel/xlsx/xform/table/table-column-xform.js +17 -2
- package/dist/esm/modules/excel/xlsx/xform/xsd-values.js +101 -0
- package/dist/esm/modules/excel/xlsx/xlsx.browser.js +4422 -78
- package/dist/esm/modules/pdf/builder/document-builder.js +507 -2
- package/dist/esm/modules/pdf/builder/pdf-editor.js +48 -3
- package/dist/esm/modules/pdf/excel-bridge.js +683 -12
- package/dist/esm/modules/pdf/font/font-manager.js +39 -0
- package/dist/esm/modules/pdf/index.js +3 -1
- package/dist/esm/modules/pdf/render/chart-surface.js +200 -0
- package/dist/esm/modules/pdf/render/layout-engine.js +436 -56
- package/dist/esm/modules/pdf/render/page-renderer.js +169 -28
- package/dist/esm/modules/pdf/render/pdf-exporter.js +117 -7
- package/dist/esm/modules/pdf/types.js +4 -0
- package/dist/esm/modules/pdf/word-bridge.js +304 -0
- package/dist/esm/modules/word/constants.js +231 -0
- package/dist/esm/modules/word/content-types.js +53 -0
- package/dist/esm/modules/word/digital-signatures.js +134 -0
- package/dist/esm/modules/word/document.js +1795 -0
- package/dist/esm/modules/word/docx-packager.js +822 -0
- package/dist/esm/modules/word/docx-reader.js +4929 -0
- package/dist/esm/modules/word/encryption.js +274 -0
- package/dist/esm/modules/word/errors.js +68 -0
- package/dist/esm/modules/word/font-obfuscation.js +83 -0
- package/dist/esm/modules/word/html-renderer.js +782 -0
- package/dist/esm/modules/word/index.base.js +51 -0
- package/dist/esm/modules/word/index.browser.js +4 -0
- package/dist/esm/modules/word/index.js +4 -0
- package/dist/esm/modules/word/internal-utils.js +54 -0
- package/dist/esm/modules/word/relationships.js +56 -0
- package/dist/esm/modules/word/types.js +10 -0
- package/dist/esm/modules/word/units.js +111 -0
- package/dist/esm/modules/word/writers/chart-writer.js +385 -0
- package/dist/esm/modules/word/writers/checkbox-writer.js +42 -0
- package/dist/esm/modules/word/writers/comment-writer.js +70 -0
- package/dist/esm/modules/word/writers/document-writer.js +461 -0
- package/dist/esm/modules/word/writers/footnote-writer.js +72 -0
- package/dist/esm/modules/word/writers/header-footer-writer.js +129 -0
- package/dist/esm/modules/word/writers/image-writer.js +185 -0
- package/dist/esm/modules/word/writers/math-writer.js +428 -0
- package/dist/esm/modules/word/writers/numbering-writer.js +125 -0
- package/dist/esm/modules/word/writers/paragraph-writer.js +516 -0
- package/dist/esm/modules/word/writers/parts-writer.js +660 -0
- package/dist/esm/modules/word/writers/run-writer.js +649 -0
- package/dist/esm/modules/word/writers/section-writer.js +238 -0
- package/dist/esm/modules/word/writers/styles-writer.js +242 -0
- package/dist/esm/modules/word/writers/table-writer.js +503 -0
- package/dist/esm/modules/word/writers/textbox-writer.js +53 -0
- package/dist/esm/modules/word/writers/toc-writer.js +79 -0
- package/dist/esm/modules/xml/encode.js +157 -11
- package/dist/iife/excelts.iife.js +11789 -687
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +52 -44
- package/dist/types/index.browser.d.ts +8 -5
- package/dist/types/index.d.ts +4 -2
- package/dist/types/modules/excel/chart/cache-populator.d.ts +49 -0
- package/dist/types/modules/excel/chart/chart-api.d.ts +92 -0
- package/dist/types/modules/excel/chart/chart-builder.d.ts +48 -0
- package/dist/types/modules/excel/chart/chart-ex-builder.d.ts +36 -0
- package/dist/types/modules/excel/chart/chart-ex-parser.d.ts +8 -0
- package/dist/types/modules/excel/chart/chart-ex-renderer.d.ts +187 -0
- package/dist/types/modules/excel/chart/chart-ex-types.d.ts +531 -0
- package/dist/types/modules/excel/chart/chart-images.d.ts +78 -0
- package/dist/types/modules/excel/chart/chart-presets.d.ts +392 -0
- package/dist/types/modules/excel/chart/chart-renderer.d.ts +550 -0
- package/dist/types/modules/excel/chart/chart-sidecar.d.ts +21 -0
- package/dist/types/modules/excel/chart/chart-utils.d.ts +306 -0
- package/dist/types/modules/excel/chart/chart.d.ts +504 -0
- package/dist/types/modules/excel/chart/glyph-rasterizer.d.ts +62 -0
- package/dist/types/modules/excel/chart/index.d.ts +54 -0
- package/dist/types/modules/excel/chart/install.d.ts +44 -0
- package/dist/types/modules/excel/chart/shape-properties.d.ts +156 -0
- package/dist/types/modules/excel/chart/stroke-font.d.ts +36 -0
- package/dist/types/modules/excel/chart/topojson.d.ts +98 -0
- package/dist/types/modules/excel/chart/types.d.ts +2559 -0
- package/dist/types/modules/excel/chart-host-registry.d.ts +157 -0
- package/dist/types/modules/excel/chartsheet.d.ts +102 -0
- package/dist/types/modules/excel/defined-names.d.ts +35 -0
- package/dist/types/modules/excel/errors.d.ts +6 -0
- package/dist/types/modules/excel/form-control.d.ts +6 -0
- package/dist/types/modules/excel/pivot-chart.d.ts +7 -0
- package/dist/types/modules/excel/pivot-table.d.ts +55 -0
- package/dist/types/modules/excel/sparkline/index.d.ts +7 -0
- package/dist/types/modules/excel/sparkline/sparkline.d.ts +206 -0
- package/dist/types/modules/excel/types.d.ts +72 -0
- package/dist/types/modules/excel/utils/address.d.ts +18 -0
- package/dist/types/modules/excel/utils/guid.d.ts +15 -0
- package/dist/types/modules/excel/utils/ooxml-paths.d.ts +74 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-chart-sidecar.d.ts +35 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-chart.d.ts +32 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-chartsheet.d.ts +9 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-content-types.d.ts +16 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-drawing.d.ts +34 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-pivot.d.ts +14 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-relationships.d.ts +18 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-structure.d.ts +21 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-styles.d.ts +15 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-table.d.ts +31 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-workbook.d.ts +19 -0
- package/dist/types/modules/excel/utils/ooxml-validator/check-worksheet.d.ts +25 -0
- package/dist/types/modules/excel/utils/ooxml-validator/context.d.ts +85 -0
- package/dist/types/modules/excel/utils/ooxml-validator/index.d.ts +31 -0
- package/dist/types/modules/excel/utils/ooxml-validator/path-utils.d.ts +67 -0
- package/dist/types/modules/excel/utils/ooxml-validator/reporter.d.ts +41 -0
- package/dist/types/modules/excel/utils/ooxml-validator/types.d.ts +109 -0
- package/dist/types/modules/excel/utils/ooxml-validator/xml-utils.d.ts +38 -0
- package/dist/types/modules/excel/workbook.browser.d.ts +248 -30
- package/dist/types/modules/excel/workbook.d.ts +43 -0
- package/dist/types/modules/excel/worksheet.d.ts +157 -3
- package/dist/types/modules/excel/xlsx/rel-type.d.ts +40 -0
- package/dist/types/modules/excel/xlsx/xform/book/defined-name-xform.d.ts +1 -0
- package/dist/types/modules/excel/xlsx/xform/chart/chart-space-xform.d.ts +353 -0
- package/dist/types/modules/excel/xlsx/xform/comment/threaded-comments-xform.d.ts +60 -0
- package/dist/types/modules/excel/xlsx/xform/drawing/drawing-xform.d.ts +30 -0
- package/dist/types/modules/excel/xlsx/xform/drawing/graphic-frame-xform.d.ts +54 -0
- package/dist/types/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.d.ts +3 -1
- package/dist/types/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.d.ts +46 -0
- package/dist/types/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.d.ts +13 -2
- package/dist/types/modules/excel/xlsx/xform/sheet/chartsheet-xform.d.ts +185 -0
- package/dist/types/modules/excel/xlsx/xform/sheet/ext-lst-xform.d.ts +1 -0
- package/dist/types/modules/excel/xlsx/xform/xsd-values.d.ts +63 -0
- package/dist/types/modules/excel/xlsx/xlsx.browser.d.ts +115 -21
- package/dist/types/modules/pdf/builder/document-builder.d.ts +74 -0
- package/dist/types/modules/pdf/excel-bridge.d.ts +69 -0
- package/dist/types/modules/pdf/font/font-manager.d.ts +25 -0
- package/dist/types/modules/pdf/index.d.ts +5 -2
- package/dist/types/modules/pdf/render/chart-surface.d.ts +33 -0
- package/dist/types/modules/pdf/render/layout-engine.d.ts +22 -1
- package/dist/types/modules/pdf/types.d.ts +227 -23
- package/dist/types/modules/pdf/word-bridge.d.ts +47 -0
- package/dist/types/modules/word/constants.d.ts +179 -0
- package/dist/types/modules/word/content-types.d.ts +27 -0
- package/dist/types/modules/word/digital-signatures.d.ts +87 -0
- package/dist/types/modules/word/document.d.ts +728 -0
- package/dist/types/modules/word/docx-packager.d.ts +14 -0
- package/dist/types/modules/word/docx-reader.d.ts +11 -0
- package/dist/types/modules/word/encryption.d.ts +102 -0
- package/dist/types/modules/word/errors.d.ts +49 -0
- package/dist/types/modules/word/font-obfuscation.d.ts +31 -0
- package/dist/types/modules/word/html-renderer.d.ts +38 -0
- package/dist/types/modules/word/index.base.d.ts +19 -0
- package/dist/types/modules/word/index.browser.d.ts +4 -0
- package/dist/types/modules/word/index.d.ts +4 -0
- package/dist/types/modules/word/internal-utils.d.ts +23 -0
- package/dist/types/modules/word/relationships.d.ts +31 -0
- package/dist/types/modules/word/types.d.ts +2325 -0
- package/dist/types/modules/word/units.d.ts +49 -0
- package/dist/types/modules/word/writers/chart-writer.d.ts +10 -0
- package/dist/types/modules/word/writers/checkbox-writer.d.ts +9 -0
- package/dist/types/modules/word/writers/comment-writer.d.ts +15 -0
- package/dist/types/modules/word/writers/document-writer.d.ts +16 -0
- package/dist/types/modules/word/writers/footnote-writer.d.ts +11 -0
- package/dist/types/modules/word/writers/header-footer-writer.d.ts +13 -0
- package/dist/types/modules/word/writers/image-writer.d.ts +10 -0
- package/dist/types/modules/word/writers/math-writer.d.ts +9 -0
- package/dist/types/modules/word/writers/numbering-writer.d.ts +10 -0
- package/dist/types/modules/word/writers/paragraph-writer.d.ts +13 -0
- package/dist/types/modules/word/writers/parts-writer.d.ts +26 -0
- package/dist/types/modules/word/writers/run-writer.d.ts +15 -0
- package/dist/types/modules/word/writers/section-writer.d.ts +10 -0
- package/dist/types/modules/word/writers/styles-writer.d.ts +10 -0
- package/dist/types/modules/word/writers/table-writer.d.ts +10 -0
- package/dist/types/modules/word/writers/textbox-writer.d.ts +9 -0
- package/dist/types/modules/word/writers/toc-writer.d.ts +9 -0
- package/dist/types/modules/xml/encode.d.ts +56 -7
- package/package.json +29 -11
- package/dist/browser/modules/excel/utils/ooxml-validator.d.ts +0 -48
- package/dist/browser/modules/excel/utils/ooxml-validator.js +0 -493
- package/dist/browser/modules/excel/utils/passthrough-manager.d.ts +0 -77
- package/dist/browser/modules/excel/utils/passthrough-manager.js +0 -129
- package/dist/cjs/modules/excel/utils/ooxml-validator.js +0 -499
- package/dist/cjs/modules/excel/utils/passthrough-manager.js +0 -133
- package/dist/esm/modules/excel/utils/ooxml-validator.js +0 -493
- package/dist/esm/modules/excel/utils/passthrough-manager.js +0 -129
- package/dist/types/modules/excel/utils/ooxml-validator.d.ts +0 -48
- package/dist/types/modules/excel/utils/passthrough-manager.d.ts +0 -77
|
@@ -0,0 +1,845 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared helpers for the chart preview renderers.
|
|
4
|
+
*
|
|
5
|
+
* Both `chart-renderer.ts` (classic `c:chart`) and
|
|
6
|
+
* `chart-ex-renderer.ts` (ChartEx `cx:chart`) used to carry their own
|
|
7
|
+
* copies of the same handful of math / colour / formatting helpers. The
|
|
8
|
+
* duplicates had drifted over time — subtle differences in NaN guards,
|
|
9
|
+
* hex normalisation, theme palettes, etc. — so a fix in one file
|
|
10
|
+
* silently left the other buggy. This module is the single authoritative
|
|
11
|
+
* home for the helpers shared between the two renderers (plus a few
|
|
12
|
+
* internals — `escapeXml`, `escapeXmlAttr` — that had identical copies
|
|
13
|
+
* scattered across the chart pipeline).
|
|
14
|
+
*
|
|
15
|
+
* Design constraints:
|
|
16
|
+
*
|
|
17
|
+
* - **Zero dependencies on chart-renderer / chart-ex-renderer** so
|
|
18
|
+
* this module sits below them in the import graph and does not
|
|
19
|
+
* create cycles. Types-only imports from `./types` are fine.
|
|
20
|
+
* - **Behaviour-preserving** compared with the consolidated
|
|
21
|
+
* implementations. The old files had two classes of helper:
|
|
22
|
+
* (1) strictly identical duplicates and (2) near-duplicates where
|
|
23
|
+
* one version was more defensive than the other. For the latter we
|
|
24
|
+
* kept the defensive variant — graceful degradation on malformed
|
|
25
|
+
* input is always the safer choice for a preview path.
|
|
26
|
+
* - **Structural rect typing**. The renderers use two different
|
|
27
|
+
* concrete rect types (`ChartSceneRect` in chart-renderer,
|
|
28
|
+
* `SvgRect` in chart-ex-renderer) that share the same shape.
|
|
29
|
+
* Helpers here take structural `{ x: number; y: number; width:
|
|
30
|
+
* number; height: number }` so both renderers can call them
|
|
31
|
+
* directly without adapters.
|
|
32
|
+
*/
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.PRESET_COLOR_HEX_TABLE = exports.escapeXmlAttr = exports.GRID_COLOR = exports.AXIS_COLOR = exports.COLORS = exports.DEFAULT_HEIGHT = exports.DEFAULT_WIDTH = void 0;
|
|
35
|
+
exports.themeIndexToName = themeIndexToName;
|
|
36
|
+
exports.clamp01 = clamp01;
|
|
37
|
+
exports.valueToY = valueToY;
|
|
38
|
+
exports.valueToX = valueToX;
|
|
39
|
+
exports.polar = polar;
|
|
40
|
+
exports.insetRect = insetRect;
|
|
41
|
+
exports.fmt = fmt;
|
|
42
|
+
exports.fmtNumAttr = fmtNumAttr;
|
|
43
|
+
exports.fmtNumText = fmtNumText;
|
|
44
|
+
exports.formatNumber = formatNumber;
|
|
45
|
+
exports.escapeXml = escapeXml;
|
|
46
|
+
exports.normalizeHex6 = normalizeHex6;
|
|
47
|
+
exports.withAlpha = withAlpha;
|
|
48
|
+
exports.interpolateColor = interpolateColor;
|
|
49
|
+
exports.hexToPdfColor = hexToPdfColor;
|
|
50
|
+
exports.hexToPdfColorWithAlpha = hexToPdfColorWithAlpha;
|
|
51
|
+
exports.resolveChartColor = resolveChartColor;
|
|
52
|
+
exports.previewShapeFillColor = previewShapeFillColor;
|
|
53
|
+
exports.previewShapeLineColor = previewShapeLineColor;
|
|
54
|
+
exports.previewShapeLineWidthPx = previewShapeLineWidthPx;
|
|
55
|
+
const encode_1 = require("../../xml/encode.js");
|
|
56
|
+
// ============================================================================
|
|
57
|
+
// Shared render constants
|
|
58
|
+
// ============================================================================
|
|
59
|
+
/** Default SVG / PNG / PDF canvas width when the caller omits `options.width`. */
|
|
60
|
+
exports.DEFAULT_WIDTH = 640;
|
|
61
|
+
/** Default SVG / PNG / PDF canvas height when the caller omits `options.height`. */
|
|
62
|
+
exports.DEFAULT_HEIGHT = 360;
|
|
63
|
+
/**
|
|
64
|
+
* Default series colour rotation. Matches the Excel 2019+ Office theme
|
|
65
|
+
* accent1..accent6 palette so a brand-new workbook with no theme XML
|
|
66
|
+
* still renders with the colours Excel would have used.
|
|
67
|
+
*/
|
|
68
|
+
exports.COLORS = ["#4472C4", "#ED7D31", "#A5A5A5", "#FFC000", "#5B9BD5", "#70AD47"];
|
|
69
|
+
/** Dark grey for axis lines / frame strokes. */
|
|
70
|
+
exports.AXIS_COLOR = "#444444";
|
|
71
|
+
/** Light grey for gridlines. */
|
|
72
|
+
exports.GRID_COLOR = "#D9D9D9";
|
|
73
|
+
/**
|
|
74
|
+
* Preview-grade DrawingML theme palette (`CT_ColorMapping` order:
|
|
75
|
+
* `dk1` / `lt1` / `dk2` / `lt2` / `accent1..6` / `hlink` / `folHlink`).
|
|
76
|
+
* Values match the Office defaults Excel 2019+ ships with (the "Office"
|
|
77
|
+
* theme). The renderer only consults this when a chart references a
|
|
78
|
+
* theme colour but no `<a:clrScheme>` has been resolved — the full
|
|
79
|
+
* theme lookup chain requires the workbook's `theme.xml`, which the
|
|
80
|
+
* preview path deliberately does not load. Authors who need exact
|
|
81
|
+
* theme-accurate colours should rasterise with a tool that resolves
|
|
82
|
+
* the theme.
|
|
83
|
+
*/
|
|
84
|
+
const THEME_PREVIEW_PALETTE = Object.freeze([
|
|
85
|
+
"#000000", // dk1 / tx1
|
|
86
|
+
"#FFFFFF", // lt1 / bg1
|
|
87
|
+
"#44546A", // dk2 / tx2
|
|
88
|
+
"#E7E6E6", // lt2 / bg2
|
|
89
|
+
"#4472C4", // accent1
|
|
90
|
+
"#ED7D31", // accent2
|
|
91
|
+
"#A5A5A5", // accent3
|
|
92
|
+
"#FFC000", // accent4
|
|
93
|
+
"#5B9BD5", // accent5
|
|
94
|
+
"#70AD47", // accent6
|
|
95
|
+
"#0563C1", // hlink
|
|
96
|
+
"#954F72" // folHlink
|
|
97
|
+
]);
|
|
98
|
+
/**
|
|
99
|
+
* DrawingML theme slot names in the canonical order used by
|
|
100
|
+
* `CT_ColorMapping` (ECMA-376 §20.1.2.3.29). Both parser and writer
|
|
101
|
+
* use this single list so every round-trip picks the same variant of
|
|
102
|
+
* the dk/tx and lt/bg alias pairs (we canonicalise to `dk…` / `lt…`).
|
|
103
|
+
*
|
|
104
|
+
* The parser folds `tx1/bg1/tx2/bg2` into the same indices as
|
|
105
|
+
* `dk1/lt1/dk2/lt2` (they are aliases in the OOXML colour-mapping
|
|
106
|
+
* schema) — see `shape-properties.ts:parseColorFromXml`. The output
|
|
107
|
+
* form therefore uses `dk1/lt1/dk2/lt2`, which is semantically
|
|
108
|
+
* identical to the input.
|
|
109
|
+
*/
|
|
110
|
+
const THEME_NAMES = Object.freeze([
|
|
111
|
+
"dk1",
|
|
112
|
+
"lt1",
|
|
113
|
+
"dk2",
|
|
114
|
+
"lt2",
|
|
115
|
+
"accent1",
|
|
116
|
+
"accent2",
|
|
117
|
+
"accent3",
|
|
118
|
+
"accent4",
|
|
119
|
+
"accent5",
|
|
120
|
+
"accent6",
|
|
121
|
+
"hlink",
|
|
122
|
+
"folHlink"
|
|
123
|
+
]);
|
|
124
|
+
/**
|
|
125
|
+
* Convert a theme-palette index (`ChartColor.theme`) back to its
|
|
126
|
+
* DrawingML `schemeClr` token. Out-of-range indices fall back to
|
|
127
|
+
* `"dk1"` so a malformed model still produces parseable XML Excel
|
|
128
|
+
* renders as the first theme slot rather than XML that contains an
|
|
129
|
+
* `undefined` literal.
|
|
130
|
+
*/
|
|
131
|
+
function themeIndexToName(index) {
|
|
132
|
+
return THEME_NAMES[index] ?? "dk1";
|
|
133
|
+
}
|
|
134
|
+
// ============================================================================
|
|
135
|
+
// Math helpers
|
|
136
|
+
// ============================================================================
|
|
137
|
+
/**
|
|
138
|
+
* Clamp to the closed interval `[0, 1]`. Non-finite input collapses to
|
|
139
|
+
* `0` rather than propagating `NaN` — downstream callers use the
|
|
140
|
+
* result as an interpolation parameter where `NaN` would paint black.
|
|
141
|
+
*/
|
|
142
|
+
function clamp01(value) {
|
|
143
|
+
if (!Number.isFinite(value)) {
|
|
144
|
+
return 0;
|
|
145
|
+
}
|
|
146
|
+
if (value < 0) {
|
|
147
|
+
return 0;
|
|
148
|
+
}
|
|
149
|
+
if (value > 1) {
|
|
150
|
+
return 1;
|
|
151
|
+
}
|
|
152
|
+
return value;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Map a data-space value onto the plot area's y coordinate space (SVG
|
|
156
|
+
* y grows downward, so large `value` ends up near the top of the
|
|
157
|
+
* plot). Guards against `max === min` — a single-point dataset or a
|
|
158
|
+
* range that collapsed for any reason would otherwise produce `NaN`.
|
|
159
|
+
*/
|
|
160
|
+
function valueToY(value, min, max, plot) {
|
|
161
|
+
const span = max - min;
|
|
162
|
+
if (!Number.isFinite(span) || span === 0) {
|
|
163
|
+
return plot.y + plot.height / 2;
|
|
164
|
+
}
|
|
165
|
+
return plot.y + plot.height - ((value - min) / span) * plot.height;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Map a data-space value onto the plot area's x coordinate space. Same
|
|
169
|
+
* `max === min` guard as {@link valueToY}.
|
|
170
|
+
*/
|
|
171
|
+
function valueToX(value, min, max, plot) {
|
|
172
|
+
const span = max - min;
|
|
173
|
+
if (!Number.isFinite(span) || span === 0) {
|
|
174
|
+
return plot.x + plot.width / 2;
|
|
175
|
+
}
|
|
176
|
+
return plot.x + ((value - min) / span) * plot.width;
|
|
177
|
+
}
|
|
178
|
+
/** Convert polar `(radius, angle)` to Cartesian around `(cx, cy)`. */
|
|
179
|
+
function polar(cx, cy, radius, angle) {
|
|
180
|
+
return { x: cx + Math.cos(angle) * radius, y: cy + Math.sin(angle) * radius };
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Shrink a rect by `amount` on each side (uniform inset). Non-finite
|
|
184
|
+
* inputs collapse to zero on all four components rather than
|
|
185
|
+
* propagating `NaN` — `Math.max(0, NaN)` returns `NaN` per ECMAScript,
|
|
186
|
+
* and a `NaN` width feeding downstream math (e.g. `valueToX`) cascades
|
|
187
|
+
* into every rendered coordinate.
|
|
188
|
+
*/
|
|
189
|
+
function insetRect(rect, amount) {
|
|
190
|
+
const safeAmount = Number.isFinite(amount) ? amount : 0;
|
|
191
|
+
const x = Number.isFinite(rect.x) ? rect.x + safeAmount : 0;
|
|
192
|
+
const y = Number.isFinite(rect.y) ? rect.y + safeAmount : 0;
|
|
193
|
+
const w = Number.isFinite(rect.width) ? rect.width - safeAmount * 2 : 0;
|
|
194
|
+
const h = Number.isFinite(rect.height) ? rect.height - safeAmount * 2 : 0;
|
|
195
|
+
return {
|
|
196
|
+
x,
|
|
197
|
+
y,
|
|
198
|
+
width: w > 0 ? w : 0,
|
|
199
|
+
height: h > 0 ? h : 0
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
// ============================================================================
|
|
203
|
+
// Number formatting
|
|
204
|
+
// ============================================================================
|
|
205
|
+
/**
|
|
206
|
+
* Format a number for SVG attribute values and inline XML. Two-decimal
|
|
207
|
+
* precision with trailing `.00` stripped (`1.00 → "1"`, `1.50 →
|
|
208
|
+
* "1.50"` — we intentionally keep the second zero to avoid widening the
|
|
209
|
+
* diff against Excel's own byte output on round-trips). Non-finite
|
|
210
|
+
* input returns `"0"` — `Number.toFixed(NaN)` produces the literal
|
|
211
|
+
* string `"NaN"`, which is invalid inside SVG attribute values and
|
|
212
|
+
* breaks downstream parsers.
|
|
213
|
+
*/
|
|
214
|
+
function fmt(value) {
|
|
215
|
+
if (!Number.isFinite(value)) {
|
|
216
|
+
return "0";
|
|
217
|
+
}
|
|
218
|
+
return value.toFixed(2).replace(/\.00$/, "");
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Format a numeric attribute value for XML emission. Returns an empty
|
|
222
|
+
* string for `undefined` / `NaN` / `±Infinity` — non-finite values would
|
|
223
|
+
* otherwise serialise as literal `"NaN"` / `"Infinity"` text, which no
|
|
224
|
+
* XSD validator accepts as `xsd:double` and downstream parsers reject.
|
|
225
|
+
* Emit an empty string so the caller's attribute-inclusion guard
|
|
226
|
+
* (`if (attrs.length > 0)` or explicit `!== undefined` check) drops
|
|
227
|
+
* the attribute entirely rather than stamping garbage into the wire
|
|
228
|
+
* format.
|
|
229
|
+
*
|
|
230
|
+
* Uses JavaScript's default `toString()` which is round-trip-safe per
|
|
231
|
+
* IEEE 754 (no precision drift) for both integer and fractional input.
|
|
232
|
+
*/
|
|
233
|
+
function fmtNumAttr(value) {
|
|
234
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
235
|
+
return "";
|
|
236
|
+
}
|
|
237
|
+
return String(value);
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Format a numeric text-node value. Same semantics as {@link fmtNumAttr},
|
|
241
|
+
* but for use inside element content (e.g. `<cx:pt>42.5</cx:pt>`).
|
|
242
|
+
* Non-finite values become `"0"` — a text node must be non-empty to
|
|
243
|
+
* keep the element well-formed, and `0` is the least-surprising
|
|
244
|
+
* fallback for a blank / error cell (matches how most OOXML readers
|
|
245
|
+
* treat empty numeric `<c:v>`).
|
|
246
|
+
*/
|
|
247
|
+
function fmtNumText(value) {
|
|
248
|
+
if (!Number.isFinite(value)) {
|
|
249
|
+
return "0";
|
|
250
|
+
}
|
|
251
|
+
return String(value);
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Format a number for user-visible axis tick labels.
|
|
255
|
+
*
|
|
256
|
+
* - Integer values → plain digits (`42` → `"42"`).
|
|
257
|
+
* - `|value| < 0.01` but non-zero → scientific notation with three
|
|
258
|
+
* significant figures (`1.00e-3`). Two-decimal mantissa keeps the
|
|
259
|
+
* label compact while preserving enough precision that tick values
|
|
260
|
+
* remain distinguishable; a single-digit mantissa would collapse
|
|
261
|
+
* consecutive ticks like `1.1e-3` and `1.4e-3` to the same label.
|
|
262
|
+
* - Otherwise → single decimal (`toFixed(1)`).
|
|
263
|
+
* - Non-finite input → `""` (tick position still drawn without
|
|
264
|
+
* label, keeping the chart legible while flagging the upstream
|
|
265
|
+
* computation bug on inspection).
|
|
266
|
+
*
|
|
267
|
+
* This is the "axis-label" formatter — it's intentionally compact and
|
|
268
|
+
* does not apply OOXML number formats. Callers that need the authored
|
|
269
|
+
* format code should resolve it upstream.
|
|
270
|
+
*/
|
|
271
|
+
function formatNumber(value) {
|
|
272
|
+
if (!Number.isFinite(value)) {
|
|
273
|
+
return "";
|
|
274
|
+
}
|
|
275
|
+
if (Number.isInteger(value)) {
|
|
276
|
+
return String(value);
|
|
277
|
+
}
|
|
278
|
+
const abs = Math.abs(value);
|
|
279
|
+
if (abs !== 0 && abs < 0.01) {
|
|
280
|
+
return value.toExponential(2);
|
|
281
|
+
}
|
|
282
|
+
return value.toFixed(1);
|
|
283
|
+
}
|
|
284
|
+
// ============================================================================
|
|
285
|
+
// XML escaping
|
|
286
|
+
// ============================================================================
|
|
287
|
+
//
|
|
288
|
+
// Split into two distinct helpers with different semantics:
|
|
289
|
+
//
|
|
290
|
+
// - `escapeXml` (text content) — escapes `&<>` only. Excel itself
|
|
291
|
+
// writes apostrophes and double-quotes unescaped inside text
|
|
292
|
+
// content (see Excel-authored pivot source names like
|
|
293
|
+
// `<c:name>'Sheet'!Pivot1</c:name>`), so escaping them would make
|
|
294
|
+
// our output diverge visibly at the byte level and break string
|
|
295
|
+
// consumers that do literal matches on quoted sheet names.
|
|
296
|
+
//
|
|
297
|
+
// - `escapeXmlAttr` (attribute values) — full `xmlEncodeAttr` from
|
|
298
|
+
// `@xml/encode`: escapes `&<>"'`, strips C0/C1 control chars and
|
|
299
|
+
// lone surrogates, and encodes `\t\n\r` as numeric character
|
|
300
|
+
// references so attribute round-trip preserves whitespace (XML 1.0
|
|
301
|
+
// §3.3.3 attribute-value normalisation would otherwise flatten
|
|
302
|
+
// them to a single space).
|
|
303
|
+
//
|
|
304
|
+
// chart-renderer, chart-ex-renderer, chart-ex-parser, chart-sidecar
|
|
305
|
+
// and the chart-space xform previously carried five subtly-different
|
|
306
|
+
// local copies; this module is now the single authoritative home for
|
|
307
|
+
// both helpers.
|
|
308
|
+
/**
|
|
309
|
+
* Escape XML text content — `&`, `<`, `>` become `&`, `<`,
|
|
310
|
+
* `>` respectively. XML-illegal characters are stripped up front
|
|
311
|
+
* via the shared {@link stripXmlIllegalChars} helper — that covers
|
|
312
|
+
* the forbidden C0 controls (`0x00-0x08 | 0x0B | 0x0C | 0x0E-0x1F`),
|
|
313
|
+
* DEL (`0x7F`, project-policy strip despite being technically legal
|
|
314
|
+
* XML), lone UTF-16 surrogate halves, and the `0xFFFE` / `0xFFFF`
|
|
315
|
+
* noncharacters.
|
|
316
|
+
*
|
|
317
|
+
* Apostrophe and double-quote pass through unescaped — both are legal
|
|
318
|
+
* inside text content and leaving them alone preserves Excel's byte
|
|
319
|
+
* output (`<c:name>'Sheet'!Pivot1</c:name>` with literal quotes).
|
|
320
|
+
*
|
|
321
|
+
* We keep this separate from {@link xmlEncode} in `@xml/encode`
|
|
322
|
+
* because that helper escapes all five reserved entities; the chart
|
|
323
|
+
* module prefers byte-level parity with Excel's own output, which
|
|
324
|
+
* leaves `'` / `"` alone in text context.
|
|
325
|
+
*/
|
|
326
|
+
function escapeXml(value) {
|
|
327
|
+
// Fast path: most chart text is plain ASCII / BMP with no control
|
|
328
|
+
// chars. A quick scan tells us whether to enter the slow path or
|
|
329
|
+
// just run the cheap three-replace chain. Valid surrogate pairs
|
|
330
|
+
// (any emoji / non-BMP CJK character) must be skipped intact — a
|
|
331
|
+
// naive "any high surrogate triggers strip" would force the slow
|
|
332
|
+
// path on every string containing one, defeating the fast-path.
|
|
333
|
+
let needsStrip = false;
|
|
334
|
+
const len = value.length;
|
|
335
|
+
for (let i = 0; i < len; i++) {
|
|
336
|
+
const code = value.charCodeAt(i);
|
|
337
|
+
if (code < 32) {
|
|
338
|
+
if (code !== 9 && code !== 10 && code !== 13) {
|
|
339
|
+
needsStrip = true;
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
else if (code >= 0xd800 && code <= 0xdbff) {
|
|
344
|
+
const next = i + 1 < len ? value.charCodeAt(i + 1) : 0;
|
|
345
|
+
if (next >= 0xdc00 && next <= 0xdfff) {
|
|
346
|
+
// Valid surrogate pair — consume both halves.
|
|
347
|
+
i++;
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
needsStrip = true;
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
else if (code >= 0xdc00 && code <= 0xdfff) {
|
|
355
|
+
// Lone low surrogate.
|
|
356
|
+
needsStrip = true;
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
else if (code === 0x7f || code === 0xfffe || code === 0xffff) {
|
|
360
|
+
needsStrip = true;
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
const sanitised = needsStrip ? stripXmlIllegalChars(value) : value;
|
|
365
|
+
return sanitised.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Strip characters that can't appear in XML 1.0 content or attribute
|
|
369
|
+
* values. Re-exported from `@xml/encode` so the chart module and the
|
|
370
|
+
* XML module share a single source of truth; previously each carried a
|
|
371
|
+
* local copy with comment-level disagreements (one called DEL a C1
|
|
372
|
+
* control, the other called it "XML-forbidden" — both inaccurate).
|
|
373
|
+
* See {@link stripXmlIllegalChars} in `@xml/encode` for the canonical
|
|
374
|
+
* rules.
|
|
375
|
+
*/
|
|
376
|
+
function stripXmlIllegalChars(value) {
|
|
377
|
+
return (0, encode_1.stripXmlIllegalChars)(value);
|
|
378
|
+
}
|
|
379
|
+
var encode_2 = require("../../xml/encode.js");
|
|
380
|
+
Object.defineProperty(exports, "escapeXmlAttr", { enumerable: true, get: function () { return encode_2.xmlEncodeAttr; } });
|
|
381
|
+
// ============================================================================
|
|
382
|
+
// Hex colour helpers
|
|
383
|
+
// ============================================================================
|
|
384
|
+
/**
|
|
385
|
+
* Normalise any supported hex input to a 6-digit uppercase value
|
|
386
|
+
* (without the leading `#`). Accepts:
|
|
387
|
+
*
|
|
388
|
+
* - 3-digit shorthand `#FFF` → `FFFFFF` (each nibble duplicated).
|
|
389
|
+
* - 4-digit shorthand `#FFFA` with alpha → `FFFFFF` (alpha dropped;
|
|
390
|
+
* renderer encodes alpha separately).
|
|
391
|
+
* - 6-digit `#112233`.
|
|
392
|
+
* - 8-digit `#11223344` with alpha → `112233` (alpha dropped).
|
|
393
|
+
*
|
|
394
|
+
* Returns `undefined` when the input cannot be coerced — lets callers
|
|
395
|
+
* fall back to a default colour rather than emit `#NaNNaNNaN`.
|
|
396
|
+
*/
|
|
397
|
+
function normalizeHex6(hex) {
|
|
398
|
+
if (!hex) {
|
|
399
|
+
return undefined;
|
|
400
|
+
}
|
|
401
|
+
const clean = hex.replace(/^#/, "").toUpperCase();
|
|
402
|
+
if (/^[0-9A-F]{6}([0-9A-F]{2})?$/.test(clean)) {
|
|
403
|
+
return clean.slice(0, 6);
|
|
404
|
+
}
|
|
405
|
+
if (/^[0-9A-F]{3}([0-9A-F])?$/.test(clean)) {
|
|
406
|
+
return clean
|
|
407
|
+
.slice(0, 3)
|
|
408
|
+
.split("")
|
|
409
|
+
.map(ch => ch + ch)
|
|
410
|
+
.join("");
|
|
411
|
+
}
|
|
412
|
+
return undefined;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Extract the alpha channel from a hex colour string (if present) as
|
|
416
|
+
* a fraction in `[0, 1]`. Accepts `#RGBA` and `#RRGGBBAA`; the 3-
|
|
417
|
+
* and 6-digit forms have no alpha and return `undefined`.
|
|
418
|
+
*/
|
|
419
|
+
function hexAlpha(hex) {
|
|
420
|
+
if (!hex) {
|
|
421
|
+
return undefined;
|
|
422
|
+
}
|
|
423
|
+
const clean = hex.replace(/^#/, "").toUpperCase();
|
|
424
|
+
if (/^[0-9A-F]{8}$/.test(clean)) {
|
|
425
|
+
return parseInt(clean.slice(6, 8), 16) / 255;
|
|
426
|
+
}
|
|
427
|
+
if (/^[0-9A-F]{4}$/.test(clean)) {
|
|
428
|
+
const aNibble = clean[3];
|
|
429
|
+
return parseInt(aNibble + aNibble, 16) / 255;
|
|
430
|
+
}
|
|
431
|
+
return undefined;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* White-blend `hex` by `alpha` — a cheap opacity approximation for
|
|
435
|
+
* SVG surfaces that don't support per-element `fill-opacity`. Accepts
|
|
436
|
+
* 3/4/6/8-digit hex; returns the input untouched for anything else
|
|
437
|
+
* rather than emit `"#NaNNaNNaN"`.
|
|
438
|
+
*/
|
|
439
|
+
function withAlpha(hex, alpha) {
|
|
440
|
+
const body = normalizeHex6(hex);
|
|
441
|
+
if (!body) {
|
|
442
|
+
return hex;
|
|
443
|
+
}
|
|
444
|
+
const safeAlpha = Number.isFinite(alpha) ? Math.max(0, Math.min(1, alpha)) : 1;
|
|
445
|
+
const mix = (component) => {
|
|
446
|
+
const value = parseInt(component, 16);
|
|
447
|
+
return Math.round(value * safeAlpha + 255 * (1 - safeAlpha))
|
|
448
|
+
.toString(16)
|
|
449
|
+
.padStart(2, "0")
|
|
450
|
+
.toUpperCase();
|
|
451
|
+
};
|
|
452
|
+
return `#${mix(body.slice(0, 2))}${mix(body.slice(2, 4))}${mix(body.slice(4, 6))}`;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Linearly interpolate between two hex colours. `t` is clamped to
|
|
456
|
+
* `[0, 1]`; non-finite `t` falls back to `0`. Malformed hex inputs
|
|
457
|
+
* degrade gracefully (prefer the end colour when `t >= 0.5`; prefer
|
|
458
|
+
* the start colour otherwise) so one bad input channel never produces
|
|
459
|
+
* `"#NaNNaNNaN"`.
|
|
460
|
+
*/
|
|
461
|
+
function interpolateColor(a, b, t) {
|
|
462
|
+
const ca = normalizeHex6(a);
|
|
463
|
+
const cb = normalizeHex6(b);
|
|
464
|
+
const clamped = clamp01(t);
|
|
465
|
+
if (!ca || !cb) {
|
|
466
|
+
return `#${clamped >= 0.5 ? (cb ?? ca ?? "000000") : (ca ?? cb ?? "000000")}`;
|
|
467
|
+
}
|
|
468
|
+
const mix = (i) => {
|
|
469
|
+
// `ca` / `cb` have been normalised to exactly 6 hex digits by
|
|
470
|
+
// `normalizeHex6`, so `parseInt(..., 16)` on a 2-char slice cannot
|
|
471
|
+
// produce `NaN`. We rely on that invariant — don't add a
|
|
472
|
+
// defensive-looking guard that masks a real upstream regression.
|
|
473
|
+
const av = parseInt(ca.slice(i, i + 2), 16);
|
|
474
|
+
const bv = parseInt(cb.slice(i, i + 2), 16);
|
|
475
|
+
return Math.round(av + (bv - av) * clamped)
|
|
476
|
+
.toString(16)
|
|
477
|
+
.padStart(2, "0")
|
|
478
|
+
.toUpperCase();
|
|
479
|
+
};
|
|
480
|
+
return `#${mix(0)}${mix(2)}${mix(4)}`;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Convert a hex colour string to a {@link PdfColor}. Preserves an
|
|
484
|
+
* explicit alpha byte when the caller supplied 4- or 8-digit hex —
|
|
485
|
+
* PDF surfaces that honour `PdfColor.a` (notably `PdfPageBuilder` via
|
|
486
|
+
* `/ExtGState`) then produce real translucency. Malformed input
|
|
487
|
+
* degrades to opaque black rather than producing `NaN` channels, which
|
|
488
|
+
* would emit broken PDF content.
|
|
489
|
+
*/
|
|
490
|
+
function hexToPdfColor(hex) {
|
|
491
|
+
const clean = normalizeHex6(hex);
|
|
492
|
+
if (!clean) {
|
|
493
|
+
return { r: 0, g: 0, b: 0 };
|
|
494
|
+
}
|
|
495
|
+
const alpha = hexAlpha(hex);
|
|
496
|
+
const base = {
|
|
497
|
+
r: parseInt(clean.slice(0, 2), 16) / 255,
|
|
498
|
+
g: parseInt(clean.slice(2, 4), 16) / 255,
|
|
499
|
+
b: parseInt(clean.slice(4, 6), 16) / 255
|
|
500
|
+
};
|
|
501
|
+
return alpha !== undefined ? { ...base, a: alpha } : base;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Like {@link hexToPdfColor} but attaches an explicit alpha value.
|
|
505
|
+
* Callers use this to mirror the SVG path's `withAlpha(color, 0.35)`
|
|
506
|
+
* pattern on the PDF bridge: the hex itself stays opaque, `a` carries
|
|
507
|
+
* the transparency the SVG would paint by white-blending.
|
|
508
|
+
*/
|
|
509
|
+
function hexToPdfColorWithAlpha(hex, alpha) {
|
|
510
|
+
return { ...hexToPdfColor(hex), a: clamp01(alpha) };
|
|
511
|
+
}
|
|
512
|
+
// ============================================================================
|
|
513
|
+
// Shape-properties preview helpers
|
|
514
|
+
// ============================================================================
|
|
515
|
+
/**
|
|
516
|
+
* Resolve a {@link ChartColor} into a preview-grade hex colour. Accepts
|
|
517
|
+
* every DrawingML colour variant Excel emits — `srgb`, `theme` (looked
|
|
518
|
+
* up in {@link THEME_PREVIEW_PALETTE}), `sysClr` (the two Excel keeps
|
|
519
|
+
* meaningful in the preview — `windowText` / `window`), and `prstClr`
|
|
520
|
+
* (the ~140-entry {@link PRESET_COLOR_HEX_TABLE}). Returns `undefined`
|
|
521
|
+
* when the colour is absent or references something this preview cannot
|
|
522
|
+
* resolve (an unknown preset / sysClr, or a theme index outside the
|
|
523
|
+
* 12-entry palette). Callers that need a default coalesce with `??`.
|
|
524
|
+
*
|
|
525
|
+
* Shared by fill, line, and text-property resolvers so a file that
|
|
526
|
+
* sets, say, a gridline colour via `<a:schemeClr val="accent3"/>`
|
|
527
|
+
* paints the correct accent-3 hex — previously the line/text paths
|
|
528
|
+
* only honoured `srgbClr` and silently fell back to the renderer's
|
|
529
|
+
* default grey.
|
|
530
|
+
*
|
|
531
|
+
* Colour modifiers (`tint`, `shade`, `lumMod`, `lumOff`, `alpha`,
|
|
532
|
+
* `satMod`) are intentionally NOT applied — the preview path doesn't
|
|
533
|
+
* model the DrawingML blend pipeline, and approximating one component
|
|
534
|
+
* in isolation produces visibly-wrong results. Authors who need
|
|
535
|
+
* exact theme-derived colours should rasterise with a full DrawingML
|
|
536
|
+
* renderer.
|
|
537
|
+
*/
|
|
538
|
+
function resolveChartColor(color) {
|
|
539
|
+
if (!color) {
|
|
540
|
+
return undefined;
|
|
541
|
+
}
|
|
542
|
+
if (typeof color.srgb === "string") {
|
|
543
|
+
// Validate: OOXML `ST_HexBinary3` is a 6-digit hex (RGB) but we
|
|
544
|
+
// tolerate a leading `#` for backward compatibility. Also honour
|
|
545
|
+
// the 8-digit `RRGGBBAA` form Excel uses when encoding alpha
|
|
546
|
+
// inside the hex — drop the alpha for the preview (alpha is
|
|
547
|
+
// surfaced separately as `color.alpha` on the structured model).
|
|
548
|
+
//
|
|
549
|
+
// If `srgb` is set but malformed, return `undefined` rather than
|
|
550
|
+
// falling through to `theme` / `sysClr` / `prstClr`. Legitimate
|
|
551
|
+
// DrawingML colours set exactly one of those fields, so a
|
|
552
|
+
// fall-through only ever helps malformed data — and when it does,
|
|
553
|
+
// it silently substitutes a different colour source than the
|
|
554
|
+
// author wrote, which is worse than coalescing to a default.
|
|
555
|
+
const clean = color.srgb.replace(/^#/, "");
|
|
556
|
+
if (/^[0-9a-fA-F]{6}$/.test(clean)) {
|
|
557
|
+
return `#${clean.toUpperCase()}`;
|
|
558
|
+
}
|
|
559
|
+
if (/^[0-9a-fA-F]{8}$/.test(clean)) {
|
|
560
|
+
return `#${clean.slice(0, 6).toUpperCase()}`;
|
|
561
|
+
}
|
|
562
|
+
return undefined;
|
|
563
|
+
}
|
|
564
|
+
if (typeof color.theme === "number") {
|
|
565
|
+
// `Number.isInteger` guards against `NaN`, `Infinity`, fractional
|
|
566
|
+
// values, and negative indices — any of which would slip past
|
|
567
|
+
// `typeof === "number"` but produce `undefined` on index access,
|
|
568
|
+
// silently skipping the sysClr / prstClr fallbacks below. On a
|
|
569
|
+
// malformed or out-of-range theme index, fall through so the
|
|
570
|
+
// caller's default resolution still runs.
|
|
571
|
+
if (Number.isInteger(color.theme) &&
|
|
572
|
+
color.theme >= 0 &&
|
|
573
|
+
color.theme < THEME_PREVIEW_PALETTE.length) {
|
|
574
|
+
return THEME_PREVIEW_PALETTE[color.theme];
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (typeof color.schemeName === "string") {
|
|
578
|
+
// `schemeName` carries a DrawingML scheme token that couldn't be
|
|
579
|
+
// mapped onto a theme slot. The preview has no concept of
|
|
580
|
+
// placeholder colours (e.g. `phClr`), so fall back to `undefined`
|
|
581
|
+
// — caller coalesces to a default. Returning `undefined` here is
|
|
582
|
+
// preferable to guessing a theme colour that may not match the
|
|
583
|
+
// author's intent on a real `<a:clrScheme>` resolver.
|
|
584
|
+
return undefined;
|
|
585
|
+
}
|
|
586
|
+
if (typeof color.sysClr === "string") {
|
|
587
|
+
if (color.sysClr === "windowText") {
|
|
588
|
+
return "#000000";
|
|
589
|
+
}
|
|
590
|
+
if (color.sysClr === "window") {
|
|
591
|
+
return "#FFFFFF";
|
|
592
|
+
}
|
|
593
|
+
return undefined;
|
|
594
|
+
}
|
|
595
|
+
if (typeof color.prstClr === "string") {
|
|
596
|
+
const hex = exports.PRESET_COLOR_HEX_TABLE[color.prstClr];
|
|
597
|
+
return hex ? `#${hex}` : undefined;
|
|
598
|
+
}
|
|
599
|
+
return undefined;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Resolve a {@link ChartFill} into a preview-grade hex colour. Recognises
|
|
603
|
+
* the four `<a:solidFill>` children Excel writes (`srgbClr`, `schemeClr`,
|
|
604
|
+
* `sysClr`, `prstClr`) via the shared {@link resolveChartColor} resolver
|
|
605
|
+
* and the {@link THEME_PREVIEW_PALETTE} / {@link PRESET_COLOR_HEX_TABLE}
|
|
606
|
+
* lookup tables for the theme / preset variants.
|
|
607
|
+
*
|
|
608
|
+
* When the fill cannot be resolved (no fill set, empty `solidFill`,
|
|
609
|
+
* unknown preset / system colour), returns `fallback`. Callers that
|
|
610
|
+
* want `undefined` for misses should pass `undefined` as the fallback;
|
|
611
|
+
* callers that want a palette rotation entry should resolve the
|
|
612
|
+
* fallback themselves and pass it in. This unifies what used to be
|
|
613
|
+
* two almost-identical helpers (`colorFromShapeFill` in
|
|
614
|
+
* chart-renderer.ts and `shapeFillColor` in chart-ex-renderer.ts).
|
|
615
|
+
*/
|
|
616
|
+
function previewShapeFillColor(fill, fallback) {
|
|
617
|
+
return resolveChartColor(fill?.solid) ?? fallback;
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Resolve a {@link ShapeProperties.ln} stroke colour to a preview-grade
|
|
621
|
+
* hex string. Honours every DrawingML colour variant on the line's own
|
|
622
|
+
* `<a:solidFill>` via {@link resolveChartColor} — previously only
|
|
623
|
+
* `srgbClr` was read, which silently reverted every theme / preset /
|
|
624
|
+
* sysClr line colour (gridlines, axes, trendlines, error bars) to the
|
|
625
|
+
* renderer's default grey on load.
|
|
626
|
+
*/
|
|
627
|
+
function previewShapeLineColor(line) {
|
|
628
|
+
return resolveChartColor(line?.color);
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Resolve a {@link ShapeProperties.ln} stroke width (OOXML EMU) to a
|
|
632
|
+
* preview pixel width. OOXML stores line widths in EMU (1 pt = 12 700
|
|
633
|
+
* EMU); the preview clamps to a minimum of 0.5 px so a tiny authored
|
|
634
|
+
* width still renders as a visible stroke.
|
|
635
|
+
*/
|
|
636
|
+
function previewShapeLineWidthPx(line) {
|
|
637
|
+
return typeof line?.width === "number" ? Math.max(0.5, line.width / 12700) : undefined;
|
|
638
|
+
}
|
|
639
|
+
// ============================================================================
|
|
640
|
+
// Preset colours (DrawingML `ST_PresetColorVal`)
|
|
641
|
+
// ============================================================================
|
|
642
|
+
/**
|
|
643
|
+
* DrawingML preset colour table (`ST_PresetColorVal` from the OOXML
|
|
644
|
+
* schema). ~140 named colours — superset of HTML's X11 palette. The
|
|
645
|
+
* renderers resolve `<a:prstClr val="…"/>` through this table so
|
|
646
|
+
* template-built workbooks with preset colour references (`darkRed`,
|
|
647
|
+
* `navy`, `forestGreen`, …) render with the correct hex instead of
|
|
648
|
+
* rotating through the default series palette.
|
|
649
|
+
*
|
|
650
|
+
* Previously this lived on `chart-renderer.ts` and was imported by
|
|
651
|
+
* `chart-ex-renderer.ts`. Moved here so it sits below both renderers
|
|
652
|
+
* in the import graph.
|
|
653
|
+
*/
|
|
654
|
+
exports.PRESET_COLOR_HEX_TABLE = Object.freeze({
|
|
655
|
+
aliceBlue: "F0F8FF",
|
|
656
|
+
antiqueWhite: "FAEBD7",
|
|
657
|
+
aqua: "00FFFF",
|
|
658
|
+
aquamarine: "7FFFD4",
|
|
659
|
+
azure: "F0FFFF",
|
|
660
|
+
beige: "F5F5DC",
|
|
661
|
+
bisque: "FFE4C4",
|
|
662
|
+
black: "000000",
|
|
663
|
+
blanchedAlmond: "FFEBCD",
|
|
664
|
+
blue: "0000FF",
|
|
665
|
+
blueViolet: "8A2BE2",
|
|
666
|
+
brown: "A52A2A",
|
|
667
|
+
burlyWood: "DEB887",
|
|
668
|
+
cadetBlue: "5F9EA0",
|
|
669
|
+
chartreuse: "7FFF00",
|
|
670
|
+
chocolate: "D2691E",
|
|
671
|
+
coral: "FF7F50",
|
|
672
|
+
cornflowerBlue: "6495ED",
|
|
673
|
+
cornsilk: "FFF8DC",
|
|
674
|
+
crimson: "DC143C",
|
|
675
|
+
cyan: "00FFFF",
|
|
676
|
+
darkBlue: "00008B",
|
|
677
|
+
darkCyan: "008B8B",
|
|
678
|
+
darkGoldenrod: "B8860B",
|
|
679
|
+
darkGray: "A9A9A9",
|
|
680
|
+
darkGreen: "006400",
|
|
681
|
+
darkGrey: "A9A9A9",
|
|
682
|
+
darkKhaki: "BDB76B",
|
|
683
|
+
darkMagenta: "8B008B",
|
|
684
|
+
darkOliveGreen: "556B2F",
|
|
685
|
+
darkOrange: "FF8C00",
|
|
686
|
+
darkOrchid: "9932CC",
|
|
687
|
+
darkRed: "8B0000",
|
|
688
|
+
darkSalmon: "E9967A",
|
|
689
|
+
darkSeaGreen: "8FBC8F",
|
|
690
|
+
darkSlateBlue: "483D8B",
|
|
691
|
+
darkSlateGray: "2F4F4F",
|
|
692
|
+
darkSlateGrey: "2F4F4F",
|
|
693
|
+
darkTurquoise: "00CED1",
|
|
694
|
+
darkViolet: "9400D3",
|
|
695
|
+
deepPink: "FF1493",
|
|
696
|
+
deepSkyBlue: "00BFFF",
|
|
697
|
+
dimGray: "696969",
|
|
698
|
+
dimGrey: "696969",
|
|
699
|
+
dkBlue: "00008B",
|
|
700
|
+
dkCyan: "008B8B",
|
|
701
|
+
dkGoldenrod: "B8860B",
|
|
702
|
+
dkGray: "A9A9A9",
|
|
703
|
+
dkGreen: "006400",
|
|
704
|
+
dkGrey: "A9A9A9",
|
|
705
|
+
dkKhaki: "BDB76B",
|
|
706
|
+
dkMagenta: "8B008B",
|
|
707
|
+
dkOliveGreen: "556B2F",
|
|
708
|
+
dkOrange: "FF8C00",
|
|
709
|
+
dkOrchid: "9932CC",
|
|
710
|
+
dkRed: "8B0000",
|
|
711
|
+
dkSalmon: "E9967A",
|
|
712
|
+
dkSeaGreen: "8FBC8F",
|
|
713
|
+
dkSlateBlue: "483D8B",
|
|
714
|
+
dkSlateGray: "2F4F4F",
|
|
715
|
+
dkSlateGrey: "2F4F4F",
|
|
716
|
+
dkTurquoise: "00CED1",
|
|
717
|
+
dkViolet: "9400D3",
|
|
718
|
+
dodgerBlue: "1E90FF",
|
|
719
|
+
firebrick: "B22222",
|
|
720
|
+
floralWhite: "FFFAF0",
|
|
721
|
+
forestGreen: "228B22",
|
|
722
|
+
fuchsia: "FF00FF",
|
|
723
|
+
gainsboro: "DCDCDC",
|
|
724
|
+
ghostWhite: "F8F8FF",
|
|
725
|
+
gold: "FFD700",
|
|
726
|
+
goldenrod: "DAA520",
|
|
727
|
+
gray: "808080",
|
|
728
|
+
green: "008000",
|
|
729
|
+
greenYellow: "ADFF2F",
|
|
730
|
+
grey: "808080",
|
|
731
|
+
honeydew: "F0FFF0",
|
|
732
|
+
hotPink: "FF69B4",
|
|
733
|
+
indianRed: "CD5C5C",
|
|
734
|
+
indigo: "4B0082",
|
|
735
|
+
ivory: "FFFFF0",
|
|
736
|
+
khaki: "F0E68C",
|
|
737
|
+
lavender: "E6E6FA",
|
|
738
|
+
lavenderBlush: "FFF0F5",
|
|
739
|
+
lawnGreen: "7CFC00",
|
|
740
|
+
lemonChiffon: "FFFACD",
|
|
741
|
+
lightBlue: "ADD8E6",
|
|
742
|
+
lightCoral: "F08080",
|
|
743
|
+
lightCyan: "E0FFFF",
|
|
744
|
+
lightGoldenrodYellow: "FAFAD2",
|
|
745
|
+
lightGray: "D3D3D3",
|
|
746
|
+
lightGreen: "90EE90",
|
|
747
|
+
lightGrey: "D3D3D3",
|
|
748
|
+
lightPink: "FFB6C1",
|
|
749
|
+
lightSalmon: "FFA07A",
|
|
750
|
+
lightSeaGreen: "20B2AA",
|
|
751
|
+
lightSkyBlue: "87CEFA",
|
|
752
|
+
lightSlateGray: "778899",
|
|
753
|
+
lightSlateGrey: "778899",
|
|
754
|
+
lightSteelBlue: "B0C4DE",
|
|
755
|
+
lightYellow: "FFFFE0",
|
|
756
|
+
ltBlue: "ADD8E6",
|
|
757
|
+
ltCoral: "F08080",
|
|
758
|
+
ltCyan: "E0FFFF",
|
|
759
|
+
ltGoldenrodYellow: "FAFAD2",
|
|
760
|
+
ltGray: "D3D3D3",
|
|
761
|
+
ltGreen: "90EE90",
|
|
762
|
+
ltGrey: "D3D3D3",
|
|
763
|
+
ltPink: "FFB6C1",
|
|
764
|
+
ltSalmon: "FFA07A",
|
|
765
|
+
ltSeaGreen: "20B2AA",
|
|
766
|
+
ltSkyBlue: "87CEFA",
|
|
767
|
+
ltSlateGray: "778899",
|
|
768
|
+
ltSlateGrey: "778899",
|
|
769
|
+
ltSteelBlue: "B0C4DE",
|
|
770
|
+
ltYellow: "FFFFE0",
|
|
771
|
+
lime: "00FF00",
|
|
772
|
+
limeGreen: "32CD32",
|
|
773
|
+
linen: "FAF0E6",
|
|
774
|
+
magenta: "FF00FF",
|
|
775
|
+
maroon: "800000",
|
|
776
|
+
medAquamarine: "66CDAA",
|
|
777
|
+
medBlue: "0000CD",
|
|
778
|
+
medOrchid: "BA55D3",
|
|
779
|
+
medPurple: "9370DB",
|
|
780
|
+
medSeaGreen: "3CB371",
|
|
781
|
+
medSlateBlue: "7B68EE",
|
|
782
|
+
medSpringGreen: "00FA9A",
|
|
783
|
+
medTurquoise: "48D1CC",
|
|
784
|
+
medVioletRed: "C71585",
|
|
785
|
+
mediumAquamarine: "66CDAA",
|
|
786
|
+
mediumBlue: "0000CD",
|
|
787
|
+
mediumOrchid: "BA55D3",
|
|
788
|
+
mediumPurple: "9370DB",
|
|
789
|
+
mediumSeaGreen: "3CB371",
|
|
790
|
+
mediumSlateBlue: "7B68EE",
|
|
791
|
+
mediumSpringGreen: "00FA9A",
|
|
792
|
+
mediumTurquoise: "48D1CC",
|
|
793
|
+
mediumVioletRed: "C71585",
|
|
794
|
+
midnightBlue: "191970",
|
|
795
|
+
mintCream: "F5FFFA",
|
|
796
|
+
mistyRose: "FFE4E1",
|
|
797
|
+
moccasin: "FFE4B5",
|
|
798
|
+
navajoWhite: "FFDEAD",
|
|
799
|
+
navy: "000080",
|
|
800
|
+
oldLace: "FDF5E6",
|
|
801
|
+
olive: "808000",
|
|
802
|
+
oliveDrab: "6B8E23",
|
|
803
|
+
orange: "FFA500",
|
|
804
|
+
orangeRed: "FF4500",
|
|
805
|
+
orchid: "DA70D6",
|
|
806
|
+
paleGoldenrod: "EEE8AA",
|
|
807
|
+
paleGreen: "98FB98",
|
|
808
|
+
paleTurquoise: "AFEEEE",
|
|
809
|
+
paleVioletRed: "DB7093",
|
|
810
|
+
papayaWhip: "FFEFD5",
|
|
811
|
+
peachPuff: "FFDAB9",
|
|
812
|
+
peru: "CD853F",
|
|
813
|
+
pink: "FFC0CB",
|
|
814
|
+
plum: "DDA0DD",
|
|
815
|
+
powderBlue: "B0E0E6",
|
|
816
|
+
purple: "800080",
|
|
817
|
+
red: "FF0000",
|
|
818
|
+
rosyBrown: "BC8F8F",
|
|
819
|
+
royalBlue: "4169E1",
|
|
820
|
+
saddleBrown: "8B4513",
|
|
821
|
+
salmon: "FA8072",
|
|
822
|
+
sandyBrown: "F4A460",
|
|
823
|
+
seaGreen: "2E8B57",
|
|
824
|
+
seaShell: "FFF5EE",
|
|
825
|
+
sienna: "A0522D",
|
|
826
|
+
silver: "C0C0C0",
|
|
827
|
+
skyBlue: "87CEEB",
|
|
828
|
+
slateBlue: "6A5ACD",
|
|
829
|
+
slateGray: "708090",
|
|
830
|
+
slateGrey: "708090",
|
|
831
|
+
snow: "FFFAFA",
|
|
832
|
+
springGreen: "00FF7F",
|
|
833
|
+
steelBlue: "4682B4",
|
|
834
|
+
tan: "D2B48C",
|
|
835
|
+
teal: "008080",
|
|
836
|
+
thistle: "D8BFD8",
|
|
837
|
+
tomato: "FF6347",
|
|
838
|
+
turquoise: "40E0D0",
|
|
839
|
+
violet: "EE82EE",
|
|
840
|
+
wheat: "F5DEB3",
|
|
841
|
+
white: "FFFFFF",
|
|
842
|
+
whiteSmoke: "F5F5F5",
|
|
843
|
+
yellow: "FFFF00",
|
|
844
|
+
yellowGreen: "9ACD32"
|
|
845
|
+
});
|