ooxml-core 1.50.2 → 1.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/{PptxHandler-PVQW47CY.mjs → PptxHandler-6GRVJRHP.mjs} +2 -2
- package/dist/PptxHandler-E6QYPF7X.mjs +8 -0
- package/dist/PptxHandler-UNQVCIGM.cjs +17 -0
- package/dist/PresentationBuilder-DVDJSV5R.mjs +8 -0
- package/dist/PresentationBuilder-F5UWRF6H.cjs +25 -0
- package/dist/{PresentationBuilder-ZOOVSBPR.mjs → PresentationBuilder-T6YKWPF7.mjs} +2 -2
- package/dist/automation/index.cjs +5806 -4494
- package/dist/automation/index.mjs +5806 -4494
- package/dist/chunk-25IJEN7R.cjs +36 -0
- package/dist/chunk-25JN3ZQM.mjs +58 -0
- package/dist/{chunk-7XYVFUB3.cjs → chunk-2IO523MM.cjs} +1 -0
- package/dist/{chunk-53KMIHYN.mjs → chunk-4LUZHBTT.mjs} +83 -31
- package/dist/chunk-554UZLPS.mjs +237 -0
- package/dist/{chunk-VLKUMQGT.mjs → chunk-63RAF3TS.mjs} +1 -1
- package/dist/{chunk-7UM5IFPR.mjs → chunk-6IUYKP77.mjs} +1 -1
- package/dist/{chunk-VK2G4BGX.mjs → chunk-BIMV5FVL.mjs} +481 -193
- package/dist/{chunk-CODMW5KF.cjs → chunk-CVUMILG3.cjs} +1 -0
- package/dist/{chunk-NBMXEVHL.mjs → chunk-FX6WL42B.mjs} +1 -0
- package/dist/chunk-GI4Y6BBX.mjs +21 -0
- package/dist/{chunk-MX2GFMZS.mjs → chunk-GZL4ERW3.mjs} +1 -1
- package/dist/chunk-HWL2AGLD.cjs +98 -0
- package/dist/chunk-HZAB3YDO.cjs +234 -0
- package/dist/chunk-IDATIFCG.mjs +226 -0
- package/dist/chunk-LO55N7VL.cjs +247 -0
- package/dist/{chunk-FFLU4LUQ.cjs → chunk-LUBPW5NP.cjs} +1629 -1609
- package/dist/chunk-MUNEIE2J.cjs +62 -0
- package/dist/{chunk-ZCKEKP7N.mjs → chunk-RYUADJV6.mjs} +4 -4
- package/dist/chunk-TOBK5FC4.mjs +88 -0
- package/dist/chunk-UV4LMGVZ.mjs +31 -0
- package/dist/{chunk-O3YGBYGZ.mjs → chunk-VRVHM6TJ.mjs} +1 -0
- package/dist/chunk-W7LVJC32.cjs +25 -0
- package/dist/chunk-WAZ7T2BL.cjs +169 -0
- package/dist/{chunk-3OKY56UM.mjs → chunk-YX33WEKS.mjs} +411 -391
- package/dist/docx/auto-number-fields.d.ts +22 -0
- package/dist/docx/auto-number-fields.d.ts.map +1 -0
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/character-styles.d.ts.map +1 -1
- package/dist/docx/clipboard/css.d.ts +21 -0
- package/dist/docx/clipboard/css.d.ts.map +1 -0
- package/dist/docx/clipboard/html-tokens.d.ts +38 -0
- package/dist/docx/clipboard/html-tokens.d.ts.map +1 -0
- package/dist/docx/clipboard/index.d.ts +6 -0
- package/dist/docx/clipboard/index.d.ts.map +1 -0
- package/dist/docx/clipboard/word-fields.d.ts +13 -0
- package/dist/docx/clipboard/word-fields.d.ts.map +1 -0
- package/dist/docx/clipboard/word-fragment.d.ts +14 -0
- package/dist/docx/clipboard/word-fragment.d.ts.map +1 -0
- package/dist/docx/clipboard/word-html.d.ts +22 -0
- package/dist/docx/clipboard/word-html.d.ts.map +1 -0
- package/dist/docx/clipboard/word-list-scan.d.ts +25 -0
- package/dist/docx/clipboard/word-list-scan.d.ts.map +1 -0
- package/dist/docx/clipboard/word-lists.d.ts +13 -0
- package/dist/docx/clipboard/word-lists.d.ts.map +1 -0
- package/dist/docx/clipboard/word-runs.d.ts +18 -0
- package/dist/docx/clipboard/word-runs.d.ts.map +1 -0
- package/dist/docx/clipboard/word-styles.d.ts +35 -0
- package/dist/docx/clipboard/word-styles.d.ts.map +1 -0
- package/dist/docx/compare/build.d.ts +48 -0
- package/dist/docx/compare/build.d.ts.map +1 -0
- package/dist/docx/compare/compare.d.ts +18 -0
- package/dist/docx/compare/compare.d.ts.map +1 -0
- package/dist/docx/compare/context.d.ts +42 -0
- package/dist/docx/compare/context.d.ts.map +1 -0
- package/dist/docx/compare/diff.d.ts +20 -0
- package/dist/docx/compare/diff.d.ts.map +1 -0
- package/dist/docx/compare/index.d.ts +4 -0
- package/dist/docx/compare/index.d.ts.map +1 -0
- package/dist/docx/compare/slide.d.ts +9 -0
- package/dist/docx/compare/slide.d.ts.map +1 -0
- package/dist/docx/compare/spans.d.ts +13 -0
- package/dist/docx/compare/spans.d.ts.map +1 -0
- package/dist/docx/compare/story.d.ts +7 -0
- package/dist/docx/compare/story.d.ts.map +1 -0
- package/dist/docx/compare/table.d.ts +23 -0
- package/dist/docx/compare/table.d.ts.map +1 -0
- package/dist/docx/compare/tokens.d.ts +50 -0
- package/dist/docx/compare/tokens.d.ts.map +1 -0
- package/dist/docx/compare/types.d.ts +51 -0
- package/dist/docx/compare/types.d.ts.map +1 -0
- package/dist/docx/compatibility.d.ts +46 -0
- package/dist/docx/compatibility.d.ts.map +1 -0
- package/dist/docx/computed-fields.d.ts +39 -0
- package/dist/docx/computed-fields.d.ts.map +1 -0
- package/dist/docx/doc-property-field.d.ts +17 -0
- package/dist/docx/doc-property-field.d.ts.map +1 -0
- package/dist/docx/document-parts.d.ts +2 -0
- package/dist/docx/document-parts.d.ts.map +1 -1
- package/dist/docx/drawing-wrap.d.ts +21 -0
- package/dist/docx/drawing-wrap.d.ts.map +1 -0
- package/dist/docx/drawing.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +3965 -2313
- package/dist/docx/embedded.mjs +3965 -2313
- package/dist/docx/field-format.d.ts +45 -0
- package/dist/docx/field-format.d.ts.map +1 -0
- package/dist/docx/field-result-spans.d.ts +62 -0
- package/dist/docx/field-result-spans.d.ts.map +1 -0
- package/dist/docx/field-runs.d.ts.map +1 -1
- package/dist/docx/field-stories.d.ts +9 -0
- package/dist/docx/field-stories.d.ts.map +1 -0
- package/dist/docx/find-stories.d.ts +27 -0
- package/dist/docx/find-stories.d.ts.map +1 -0
- package/dist/docx/highlight.d.ts +19 -0
- package/dist/docx/highlight.d.ts.map +1 -1
- package/dist/docx/hyperlink.d.ts +7 -0
- package/dist/docx/hyperlink.d.ts.map +1 -1
- package/dist/docx/index.cjs +7359 -3476
- package/dist/docx/index.d.ts +13 -1
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +7327 -3476
- package/dist/docx/inline-model.d.ts +21 -0
- package/dist/docx/inline-model.d.ts.map +1 -1
- package/dist/docx/inline-slots.d.ts.map +1 -1
- package/dist/docx/inspect-document.d.ts +21 -0
- package/dist/docx/inspect-document.d.ts.map +1 -0
- package/dist/docx/kinsoku-settings.d.ts +9 -0
- package/dist/docx/kinsoku-settings.d.ts.map +1 -0
- package/dist/docx/layout/adapt-table-floating.d.ts +11 -0
- package/dist/docx/layout/adapt-table-floating.d.ts.map +1 -0
- package/dist/docx/layout/adapt-table.d.ts.map +1 -1
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/computed-field-runs.d.ts +8 -0
- package/dist/docx/layout/computed-field-runs.d.ts.map +1 -0
- package/dist/docx/layout/floats.d.ts +3 -1
- package/dist/docx/layout/floats.d.ts.map +1 -1
- package/dist/docx/layout/flow-floating-table.d.ts +13 -0
- package/dist/docx/layout/flow-floating-table.d.ts.map +1 -0
- package/dist/docx/layout/flow-table.d.ts +1 -1
- package/dist/docx/layout/flow-table.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +2280 -941
- package/dist/docx/layout/index.mjs +2276 -942
- package/dist/docx/layout/input.d.ts +50 -0
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/layout.d.ts.map +1 -1
- package/dist/docx/layout/page-cursor.d.ts.map +1 -1
- package/dist/docx/layout/page-flow.d.ts.map +1 -1
- package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
- package/dist/docx/layout/paragraph-tokens.d.ts +6 -0
- package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +12 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/layout/section-flow.d.ts.map +1 -1
- package/dist/docx/layout/table-autofit-distribute.d.ts +18 -0
- package/dist/docx/layout/table-autofit-distribute.d.ts.map +1 -0
- package/dist/docx/layout/table-autofit-measure.d.ts +15 -0
- package/dist/docx/layout/table-autofit-measure.d.ts.map +1 -0
- package/dist/docx/layout/table-autofit.d.ts +10 -0
- package/dist/docx/layout/table-autofit.d.ts.map +1 -0
- package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
- package/dist/docx/layout/text-breaks.d.ts +38 -13
- package/dist/docx/layout/text-breaks.d.ts.map +1 -1
- package/dist/docx/layout/wrap.d.ts +1 -1
- package/dist/docx/layout/wrap.d.ts.map +1 -1
- package/dist/docx/list-number-fields.d.ts +25 -0
- package/dist/docx/list-number-fields.d.ts.map +1 -0
- package/dist/docx/load/index.cjs +4355 -2703
- package/dist/docx/load/index.mjs +4355 -2703
- package/dist/docx/model-paragraph.d.ts +12 -1
- package/dist/docx/model-paragraph.d.ts.map +1 -1
- package/dist/docx/model.d.ts +26 -1
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/note-convert.d.ts +45 -0
- package/dist/docx/note-convert.d.ts.map +1 -0
- package/dist/docx/numbering-counters.d.ts +17 -0
- package/dist/docx/numbering-counters.d.ts.map +1 -0
- package/dist/docx/numbering-format.d.ts +11 -2
- package/dist/docx/numbering-format.d.ts.map +1 -1
- package/dist/docx/outline-numbering.d.ts +6 -0
- package/dist/docx/outline-numbering.d.ts.map +1 -0
- package/dist/docx/package-information-save.d.ts +9 -0
- package/dist/docx/package-information-save.d.ts.map +1 -0
- package/dist/docx/package-information.d.ts +43 -0
- package/dist/docx/package-information.d.ts.map +1 -0
- package/dist/docx/package-properties.d.ts +5 -0
- package/dist/docx/package-properties.d.ts.map +1 -0
- package/dist/docx/paragraph-styles.d.ts +2 -0
- package/dist/docx/paragraph-styles.d.ts.map +1 -1
- package/dist/docx/parse-revisions.d.ts +2 -0
- package/dist/docx/parse-revisions.d.ts.map +1 -1
- package/dist/docx/parse-table-floating.d.ts +5 -0
- package/dist/docx/parse-table-floating.d.ts.map +1 -0
- package/dist/docx/parse-table.d.ts.map +1 -1
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/part-relationships.d.ts.map +1 -1
- package/dist/docx/personal-information.d.ts +18 -0
- package/dist/docx/personal-information.d.ts.map +1 -0
- package/dist/docx/picture-crop-edit.d.ts +18 -0
- package/dist/docx/picture-crop-edit.d.ts.map +1 -0
- package/dist/docx/picture-watermark.d.ts +29 -0
- package/dist/docx/picture-watermark.d.ts.map +1 -0
- package/dist/docx/relationship-allocator.d.ts.map +1 -1
- package/dist/docx/remove-document-information.d.ts +8 -0
- package/dist/docx/remove-document-information.d.ts.map +1 -0
- package/dist/docx/revision-commands.d.ts +6 -1
- package/dist/docx/revision-commands.d.ts.map +1 -1
- package/dist/docx/revision-ids.d.ts.map +1 -1
- package/dist/docx/run-language.d.ts +9 -0
- package/dist/docx/run-language.d.ts.map +1 -0
- package/dist/docx/run-properties-snapshot.d.ts +9 -0
- package/dist/docx/run-properties-snapshot.d.ts.map +1 -0
- package/dist/docx/run-style-model.d.ts +4 -0
- package/dist/docx/run-style-model.d.ts.map +1 -1
- package/dist/docx/save-modified.d.ts +2 -1
- package/dist/docx/save-modified.d.ts.map +1 -1
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/style-ref-fields.d.ts +1 -8
- package/dist/docx/style-ref-fields.d.ts.map +1 -1
- package/dist/docx/symbol-field.d.ts +21 -0
- package/dist/docx/symbol-field.d.ts.map +1 -0
- package/dist/docx/table-cell-write.d.ts.map +1 -1
- package/dist/docx/table-defaults.d.ts +2 -0
- package/dist/docx/table-defaults.d.ts.map +1 -1
- package/dist/docx/table-margins.d.ts +18 -0
- package/dist/docx/table-margins.d.ts.map +1 -0
- package/dist/docx/table-model.d.ts +23 -0
- package/dist/docx/table-model.d.ts.map +1 -1
- package/dist/docx/table-structure-check.d.ts.map +1 -1
- package/dist/docx/table-styles.d.ts.map +1 -1
- package/dist/docx/ui/index.cjs +787 -435
- package/dist/docx/ui/index.d.ts +1 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +784 -436
- package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
- package/dist/docx/ui/paragraph-attributes.d.ts +6 -0
- package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
- package/dist/docx/ui/ribbon-legacy-labels.d.ts +1 -1
- package/dist/docx/ui/ribbon-legacy-labels.d.ts.map +1 -1
- package/dist/docx/ui/run-adapter.d.ts.map +1 -1
- package/dist/docx/ui/schema-marks.d.ts +2 -19
- package/dist/docx/ui/schema-marks.d.ts.map +1 -1
- package/dist/docx/ui/track-run-formatting.d.ts.map +1 -1
- package/dist/docx/ui/yjs-document-attributes.d.ts +5 -0
- package/dist/docx/ui/yjs-document-attributes.d.ts.map +1 -1
- package/dist/docx/write-drawing-wrap.d.ts +22 -0
- package/dist/docx/write-drawing-wrap.d.ts.map +1 -0
- package/dist/docx/write-drawing.d.ts.map +1 -1
- package/dist/docx/write-revisions.d.ts +3 -1
- package/dist/docx/write-revisions.d.ts.map +1 -1
- package/dist/docx/write-shape.d.ts.map +1 -1
- package/dist/docx/write-table-properties.d.ts.map +1 -1
- package/dist/docx/write.d.ts.map +1 -1
- package/dist/drawingml/html-text-paste.d.ts +28 -0
- package/dist/drawingml/html-text-paste.d.ts.map +1 -0
- package/dist/drawingml/html-text-style.d.ts +18 -0
- package/dist/drawingml/html-text-style.d.ts.map +1 -0
- package/dist/drawingml/index.cjs +762 -0
- package/dist/drawingml/index.d.ts +1 -0
- package/dist/drawingml/index.d.ts.map +1 -1
- package/dist/drawingml/index.mjs +760 -1
- package/dist/index.cjs +1237 -285
- package/dist/index.mjs +1237 -285
- package/dist/pptx/automation/index.cjs +561 -180
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +6 -5
- package/dist/pptx/chunks/{index-BCy58n13.d.ts → index-8ZfPndYR.d.ts} +2 -2
- package/dist/pptx/chunks/{index-BCy58n13.d.ts.map → index-8ZfPndYR.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-OwiX5IVw.d.ts → index-DVhD9Kd5.d.ts} +4 -4
- package/dist/pptx/chunks/{index-OwiX5IVw.d.ts.map → index-DVhD9Kd5.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-oQHWAO7M.d.ts → index-DsUnUj-V.d.ts} +5 -5
- package/dist/pptx/chunks/{index-oQHWAO7M.d.ts.map → index-DsUnUj-V.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-AZN38e6S.d.ts → index-xB7MDLI7.d.ts} +4 -4
- package/dist/pptx/chunks/{index-AZN38e6S.d.ts.map → index-xB7MDLI7.d.ts.map} +1 -1
- package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts → presentation-BvnVkFPJ.d.ts} +26 -2
- package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts.map → presentation-BvnVkFPJ.d.ts.map} +1 -1
- package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts → text-operations-D7TCPhlv.d.ts} +2 -2
- package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts.map → text-operations-D7TCPhlv.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +504 -124
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +16 -15
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +3 -2
- package/dist/pptx/editor/render/font-family-update.d.ts +2 -2
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +2 -2
- package/dist/pptx/editor/render/segments-text-edit.cjs +159 -0
- package/dist/pptx/editor/render/segments-text-edit.d.ts +26 -0
- package/dist/pptx/editor/render/segments-text-edit.d.ts.map +1 -0
- package/dist/pptx/editor/render/segments-text-edit.mjs +156 -0
- package/dist/pptx/editor/render/slide-operations.cjs +12 -9
- package/dist/pptx/editor/render/slide-operations.mjs +6 -3
- package/dist/pptx/editor/render/table-cell-edit.cjs +5 -5
- package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
- package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
- package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
- package/dist/pptx/editor/render/table-cell-rich-text.cjs +41 -0
- package/dist/pptx/editor/render/table-cell-rich-text.d.ts +50 -0
- package/dist/pptx/editor/render/table-cell-rich-text.d.ts.map +1 -0
- package/dist/pptx/editor/render/table-cell-rich-text.mjs +8 -0
- package/dist/pptx/editor/render/table-cell-source.cjs +23 -0
- package/dist/pptx/editor/render/table-cell-source.d.ts +31 -0
- package/dist/pptx/editor/render/table-cell-source.d.ts.map +1 -0
- package/dist/pptx/editor/render/table-cell-source.mjs +6 -0
- package/dist/pptx/editor/render/table-cells-text-style.cjs +116 -0
- package/dist/pptx/editor/render/table-cells-text-style.d.ts +37 -0
- package/dist/pptx/editor/render/table-cells-text-style.d.ts.map +1 -0
- package/dist/pptx/editor/render/table-cells-text-style.mjs +113 -0
- package/dist/pptx/editor/render/table-data-grid-ops.cjs +40 -94
- package/dist/pptx/editor/render/table-data-grid-ops.mjs +3 -88
- package/dist/pptx/editor/render/table-grid-fill.cjs +30 -0
- package/dist/pptx/editor/render/table-grid-fill.d.ts +34 -0
- package/dist/pptx/editor/render/table-grid-fill.d.ts.map +1 -0
- package/dist/pptx/editor/render/table-grid-fill.mjs +28 -0
- package/dist/pptx/editor/render/table-layout.cjs +6 -6
- package/dist/pptx/editor/render/table-layout.d.ts +2 -2
- package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-layout.mjs +1 -1
- package/dist/pptx/editor/render/table-merge.cjs +5 -5
- package/dist/pptx/editor/render/table-merge.mjs +1 -1
- package/dist/pptx/editor/render/text-content-style.d.ts +2 -2
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
- package/dist/pptx/editor/render/text-style-scope.d.ts +2 -2
- package/dist/pptx/editor/render/update-text-segment-style.d.ts +2 -2
- package/dist/pptx/index.cjs +519 -201
- package/dist/pptx/index.d.ts +7 -7
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/pptx/smartart-layouts/index.d.ts +2 -2
- package/dist/teams/index.cjs +35 -25
- package/dist/teams/index.mjs +35 -25
- package/dist/text/complex-breaks.d.ts +24 -0
- package/dist/text/complex-breaks.d.ts.map +1 -0
- package/dist/text/east-asian.d.ts +32 -0
- package/dist/text/east-asian.d.ts.map +1 -0
- package/dist/text/html-tokens.d.ts +45 -0
- package/dist/text/html-tokens.d.ts.map +1 -0
- package/dist/text/index.cjs +567 -96
- package/dist/text/index.d.ts +6 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +544 -97
- package/dist/text/kinsoku.d.ts +55 -0
- package/dist/text/kinsoku.d.ts.map +1 -0
- package/dist/text/truetype/embedding.d.ts +42 -0
- package/dist/text/truetype/embedding.d.ts.map +1 -0
- package/dist/text/truetype/glyphless.d.ts +5 -0
- package/dist/text/truetype/glyphless.d.ts.map +1 -0
- package/dist/text/truetype/sfnt-write.d.ts +10 -0
- package/dist/text/truetype/sfnt-write.d.ts.map +1 -0
- package/dist/text/truetype/subset.d.ts.map +1 -1
- package/dist/text/windows-1252.d.ts +10 -0
- package/dist/text/windows-1252.d.ts.map +1 -0
- package/dist/xlsx/collab/index.cjs +10 -6
- package/dist/xlsx/collab/index.mjs +10 -6
- package/dist/xlsx/edit/clipboard-html-parse.d.ts +1 -0
- package/dist/xlsx/edit/clipboard-html-parse.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/text-convert.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +96 -51
- package/dist/xlsx/index.mjs +96 -51
- package/dist/xlsx/load/index.cjs +10 -6
- package/dist/xlsx/load/index.mjs +10 -6
- package/dist/xlsx/ui/index.cjs +97 -52
- package/dist/xlsx/ui/index.mjs +97 -52
- package/package.json +1 -1
- package/dist/PptxHandler-72NTA5ZY.cjs +0 -14
- package/dist/PptxHandler-O4IJ3TKZ.mjs +0 -5
- package/dist/PresentationBuilder-ORM22QGC.mjs +0 -5
- package/dist/PresentationBuilder-T2ETYT3L.cjs +0 -22
- package/dist/chunk-X4RL5AZ7.cjs +0 -120
- package/dist/{chunk-PRGXRAAU.mjs → chunk-4Y76EAKK.mjs} +131 -131
- package/dist/{chunk-EN3KSEW5.cjs → chunk-MMULWQOM.cjs} +131 -131
package/dist/text/index.mjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
// text/unicode-script-detection.ts
|
|
2
|
-
function detectFontScript(
|
|
3
|
-
if (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
function detectFontScript(codePoint2) {
|
|
3
|
+
if (codePoint2 >= 11904 && codePoint2 <= 40959 || // CJK radicals, unified ideographs
|
|
4
|
+
codePoint2 >= 44032 && codePoint2 <= 55215 || // Hangul syllables
|
|
5
|
+
codePoint2 >= 63744 && codePoint2 <= 64255 || // CJK compatibility ideographs
|
|
6
|
+
codePoint2 >= 65072 && codePoint2 <= 65103 || // CJK compatibility forms
|
|
7
|
+
codePoint2 >= 131072 && codePoint2 <= 195103 || // CJK extension B-F
|
|
8
|
+
codePoint2 >= 12288 && codePoint2 <= 12351 || // CJK symbols & punctuation
|
|
9
|
+
codePoint2 >= 12352 && codePoint2 <= 12447 || // Hiragana
|
|
10
|
+
codePoint2 >= 12448 && codePoint2 <= 12543 || // Katakana
|
|
11
|
+
codePoint2 >= 12784 && codePoint2 <= 12799 || // Katakana extensions
|
|
12
|
+
codePoint2 >= 65280 && codePoint2 <= 65519) {
|
|
13
13
|
return "eastAsia";
|
|
14
14
|
}
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
15
|
+
if (codePoint2 >= 1424 && codePoint2 <= 1535 || // Hebrew
|
|
16
|
+
codePoint2 >= 1536 && codePoint2 <= 1791 || // Arabic
|
|
17
|
+
codePoint2 >= 1792 && codePoint2 <= 1871 || // Syriac
|
|
18
|
+
codePoint2 >= 1872 && codePoint2 <= 1919 || // Arabic Supplement
|
|
19
|
+
codePoint2 >= 1920 && codePoint2 <= 1983 || // Thaana
|
|
20
|
+
codePoint2 >= 1984 && codePoint2 <= 2047 || // NKo
|
|
21
|
+
codePoint2 >= 2048 && codePoint2 <= 2111 || // Samaritan
|
|
22
|
+
codePoint2 >= 2304 && codePoint2 <= 2431 || // Devanagari
|
|
23
|
+
codePoint2 >= 2432 && codePoint2 <= 2559 || // Bengali
|
|
24
|
+
codePoint2 >= 2560 && codePoint2 <= 2687 || // Gurmukhi
|
|
25
|
+
codePoint2 >= 2688 && codePoint2 <= 2815 || // Gujarati
|
|
26
|
+
codePoint2 >= 2816 && codePoint2 <= 2943 || // Oriya
|
|
27
|
+
codePoint2 >= 2944 && codePoint2 <= 3071 || // Tamil
|
|
28
|
+
codePoint2 >= 3072 && codePoint2 <= 3199 || // Telugu
|
|
29
|
+
codePoint2 >= 3200 && codePoint2 <= 3327 || // Kannada
|
|
30
|
+
codePoint2 >= 3328 && codePoint2 <= 3455 || // Malayalam
|
|
31
|
+
codePoint2 >= 3456 && codePoint2 <= 3583 || // Sinhala
|
|
32
|
+
codePoint2 >= 3584 && codePoint2 <= 3711 || // Thai
|
|
33
|
+
codePoint2 >= 3712 && codePoint2 <= 3839 || // Lao
|
|
34
|
+
codePoint2 >= 3840 && codePoint2 <= 4095 || // Tibetan
|
|
35
|
+
codePoint2 >= 4096 && codePoint2 <= 4255 || // Myanmar
|
|
36
|
+
codePoint2 >= 4256 && codePoint2 <= 4351 || // Georgian
|
|
37
|
+
codePoint2 >= 6016 && codePoint2 <= 6143 || // Khmer
|
|
38
|
+
codePoint2 >= 64336 && codePoint2 <= 65023 || // Arabic Presentation Forms-A
|
|
39
|
+
codePoint2 >= 65136 && codePoint2 <= 65279) {
|
|
40
40
|
return "complexScript";
|
|
41
41
|
}
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
if (codePoint2 >= 8592 && codePoint2 <= 8703 || // Arrows
|
|
43
|
+
codePoint2 >= 8704 && codePoint2 <= 8959 || // Mathematical operators
|
|
44
|
+
codePoint2 >= 8960 && codePoint2 <= 9215 || // Misc technical
|
|
45
|
+
codePoint2 >= 9472 && codePoint2 <= 9599 || // Box drawing
|
|
46
|
+
codePoint2 >= 9600 && codePoint2 <= 9631 || // Block elements
|
|
47
|
+
codePoint2 >= 9632 && codePoint2 <= 9727 || // Geometric shapes
|
|
48
|
+
codePoint2 >= 9728 && codePoint2 <= 9983 || // Misc symbols
|
|
49
|
+
codePoint2 >= 9984 && codePoint2 <= 10175 || // Dingbats
|
|
50
|
+
codePoint2 >= 57344 && codePoint2 <= 63743 || // Private Use Area
|
|
51
|
+
codePoint2 >= 126976 && codePoint2 <= 129535) {
|
|
52
52
|
return "symbol";
|
|
53
53
|
}
|
|
54
54
|
return "latin";
|
|
@@ -62,14 +62,14 @@ function segmentByScript(text) {
|
|
|
62
62
|
let currentStart = 0;
|
|
63
63
|
let currentText = "";
|
|
64
64
|
for (let i = 0; i < text.length; i++) {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
65
|
+
const codePoint2 = text.codePointAt(i);
|
|
66
|
+
if (codePoint2 === void 0) {
|
|
67
67
|
continue;
|
|
68
68
|
}
|
|
69
|
-
const charLength =
|
|
69
|
+
const charLength = codePoint2 > 65535 ? 2 : 1;
|
|
70
70
|
const char = text.substring(i, i + charLength);
|
|
71
|
-
const isNeutral =
|
|
72
|
-
const script = isNeutral ? currentScript ?? "latin" : detectFontScript(
|
|
71
|
+
const isNeutral = codePoint2 <= 127 && !/[a-zA-Z0-9]/u.test(char);
|
|
72
|
+
const script = isNeutral ? currentScript ?? "latin" : detectFontScript(codePoint2);
|
|
73
73
|
if (script !== currentScript && currentScript !== null) {
|
|
74
74
|
runs.push({
|
|
75
75
|
text: currentText,
|
|
@@ -277,16 +277,16 @@ function decimalSeparatorForLanguage(language) {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
function decimalAnchorIndex(text, separator) {
|
|
280
|
-
const
|
|
281
|
-
if (
|
|
280
|
+
const first2 = text.search(/[0-9]/u);
|
|
281
|
+
if (first2 < 0) {
|
|
282
282
|
return text.length;
|
|
283
283
|
}
|
|
284
|
-
let end =
|
|
284
|
+
let end = first2;
|
|
285
285
|
while (end < text.length && /[0-9.,]/u.test(text.charAt(end))) {
|
|
286
286
|
end++;
|
|
287
287
|
}
|
|
288
|
-
const sep = text.slice(
|
|
289
|
-
return sep >= 0 ?
|
|
288
|
+
const sep = text.slice(first2, end).indexOf(separator);
|
|
289
|
+
return sep >= 0 ? first2 + sep : end;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
// text/wrap-styled-runs.ts
|
|
@@ -1090,13 +1090,113 @@ function distributeRunsText(oldTexts, newText) {
|
|
|
1090
1090
|
return result;
|
|
1091
1091
|
}
|
|
1092
1092
|
function realignOrCollapseRuns(runs, text) {
|
|
1093
|
-
const
|
|
1094
|
-
if (!
|
|
1093
|
+
const first2 = runs[0];
|
|
1094
|
+
if (!first2) return [];
|
|
1095
1095
|
const distributed = distributeRunsText(
|
|
1096
1096
|
runs.map((run) => run.text),
|
|
1097
1097
|
text
|
|
1098
1098
|
);
|
|
1099
|
-
return distributed ? runs.map((run, index) => ({ ...run, text: distributed[index] ?? "" })) : [{ ...
|
|
1099
|
+
return distributed ? runs.map((run, index) => ({ ...run, text: distributed[index] ?? "" })) : [{ ...first2, text }];
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
// text/east-asian.ts
|
|
1103
|
+
function isEastAsianChar(ch) {
|
|
1104
|
+
const cp = ch.codePointAt(0) ?? 0;
|
|
1105
|
+
return cp >= 4352 && cp <= 4607 || cp >= 11904 && cp <= 40959 || cp >= 43360 && cp <= 43391 || cp >= 44032 && cp <= 55295 || cp >= 63744 && cp <= 64255 || cp >= 65072 && cp <= 65103 || cp >= 65280 && cp <= 65519 || cp >= 131072 && cp <= 262143;
|
|
1106
|
+
}
|
|
1107
|
+
var EAST_ASIAN_LETTER = /^[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u;
|
|
1108
|
+
var LETTER = /^\p{L}/u;
|
|
1109
|
+
var DIGIT = /^\p{Nd}/u;
|
|
1110
|
+
function isEastAsianLetter(grapheme) {
|
|
1111
|
+
return EAST_ASIAN_LETTER.test(grapheme);
|
|
1112
|
+
}
|
|
1113
|
+
function westernKind(grapheme) {
|
|
1114
|
+
if (!grapheme || isEastAsianChar(grapheme)) return void 0;
|
|
1115
|
+
if (DIGIT.test(grapheme)) return "digit";
|
|
1116
|
+
return LETTER.test(grapheme) ? "alpha" : void 0;
|
|
1117
|
+
}
|
|
1118
|
+
function eastAsianAutoSpace(before, after) {
|
|
1119
|
+
if (isEastAsianLetter(before)) return westernKind(after);
|
|
1120
|
+
if (isEastAsianLetter(after)) return westernKind(before);
|
|
1121
|
+
return void 0;
|
|
1122
|
+
}
|
|
1123
|
+
var AUTO_SPACE_EM = 0.25;
|
|
1124
|
+
|
|
1125
|
+
// text/kinsoku.ts
|
|
1126
|
+
var JAPANESE = {
|
|
1127
|
+
noStart: "!%),.:;?]}\xA2\xB0\u2019\u201D\u2030\u2032\u2033\u2103\u3001\u3002\u3005\u3009\u300B\u300D\u300F\u3011\u3015\u309B\u309C\u309D\u309E\u30FB\u30FD\u30FE\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFF61\uFF63\uFF64\uFF65\uFF9E\uFF9F\uFFE0",
|
|
1128
|
+
noEnd: "$([\\{\xA3\xA5\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF04\uFF08\uFF3B\uFF5B\uFF62\uFFE1\uFFE5"
|
|
1129
|
+
};
|
|
1130
|
+
var JAPANESE_STRICT_EXTRA = "\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u30FC\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70";
|
|
1131
|
+
var DEFAULTS = {
|
|
1132
|
+
ja: JAPANESE,
|
|
1133
|
+
"zh-Hans": {
|
|
1134
|
+
noStart: "!%),.:;>?]}\xA2\xA8\xB0\xB7\u2015\u2016\u2019\u201D\u2026\u2030\u2032\u2033\u203A\u2103\u3001\u3002\u3003\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u301E\uFE36\uFE3A\uFE3E\uFE40\uFE44\uFE5A\uFE5C\uFE5E\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF40\uFF5C\uFF5D\uFF5E\uFFE0",
|
|
1135
|
+
noEnd: "$([{\xA3\xA5\xB7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFE5D\uFF04\uFF08\uFF0E\uFF3B\uFF5B\uFFE1\uFFE5"
|
|
1136
|
+
},
|
|
1137
|
+
"zh-Hant": {
|
|
1138
|
+
noStart: "!),.:;?]}\xA2\xB7\u2019\u201D\u2022\u2025\u2026\u2027\u2032\u3001\u3002\u3009\u300B\u300D\u300F\u3011\u3015\u301E\uFE30\uFE31\uFE33\uFE34\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE4F\uFE50\uFE51\uFE52\uFE54\uFE55\uFE56\uFE57\uFE5A\uFE5C\uFE5E\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5C\uFF5D\uFF64",
|
|
1139
|
+
noEnd: "([{\xA3\xA5\u2018\u201C\u2035\u3008\u300A\u300C\u300E\u3010\u3014\u301D\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE59\uFE5B\uFE5D\uFF08\uFF5B"
|
|
1140
|
+
},
|
|
1141
|
+
ko: { noStart: "", noEnd: "" }
|
|
1142
|
+
};
|
|
1143
|
+
function kinsokuLanguage(tag2) {
|
|
1144
|
+
if (!tag2) return void 0;
|
|
1145
|
+
const lower = tag2.toLowerCase();
|
|
1146
|
+
const [primary] = lower.split(/[-_]/);
|
|
1147
|
+
if (primary === "ja") return "ja";
|
|
1148
|
+
if (primary === "ko") return "ko";
|
|
1149
|
+
if (primary !== "zh") return void 0;
|
|
1150
|
+
return /-(hant|tw|hk|mo)(-|$)/.test(lower) ? "zh-Hant" : "zh-Hans";
|
|
1151
|
+
}
|
|
1152
|
+
function kinsokuSets(language, settings = {}) {
|
|
1153
|
+
const base = DEFAULTS[language];
|
|
1154
|
+
const custom = (override) => override && kinsokuLanguage(override.language) === language ? override.chars : void 0;
|
|
1155
|
+
const strictExtra = settings.strict && language === "ja" ? JAPANESE_STRICT_EXTRA : "";
|
|
1156
|
+
return {
|
|
1157
|
+
noStart: custom(settings.noLineBreaksBefore) ?? base.noStart + strictExtra,
|
|
1158
|
+
noEnd: custom(settings.noLineBreaksAfter) ?? base.noEnd
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
var first = (text) => String.fromCodePoint(text.codePointAt(0) ?? 0);
|
|
1162
|
+
function prohibitedAtLineStart(grapheme, sets) {
|
|
1163
|
+
return grapheme.length > 0 && sets.noStart.includes(first(grapheme));
|
|
1164
|
+
}
|
|
1165
|
+
function prohibitedAtLineEnd(grapheme, sets) {
|
|
1166
|
+
return grapheme.length > 0 && sets.noEnd.includes(first(grapheme));
|
|
1167
|
+
}
|
|
1168
|
+
var HANGING = {
|
|
1169
|
+
ja: ",.\u2019\u201D\u3001\u3002\u300D\u300F\u3011\uFF09\uFF0C\uFF0E\uFF3D\uFF5D\uFF61\uFF64",
|
|
1170
|
+
"zh-Hans": "!%),.:;>?]}\xA2\xB0\u2019\u201D\u2030\u2032\u2033\u2103\u3001\u3002\u3003\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u301E\uFE5A\uFE5C\uFE5E\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFFE0",
|
|
1171
|
+
"zh-Hant": "!),.:;?]}\u2019\u201D\u2032\u3001\u3002\u3009\u300B\u300D\u300F\u3011\u3015\u301E\uFE5A\uFE5C\uFE5E\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",
|
|
1172
|
+
ko: ""
|
|
1173
|
+
};
|
|
1174
|
+
function hangsAtLineEnd(grapheme, language) {
|
|
1175
|
+
return grapheme.length > 0 && HANGING[language].includes(first(grapheme));
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
// text/complex-breaks.ts
|
|
1179
|
+
function isComplexBreakChar(ch) {
|
|
1180
|
+
const cp = ch.codePointAt(0) ?? 0;
|
|
1181
|
+
return cp >= 3584 && cp <= 3839 || // Thai, Lao
|
|
1182
|
+
cp >= 4096 && cp <= 4255 || // Myanmar
|
|
1183
|
+
cp >= 6016 && cp <= 6143 || // Khmer
|
|
1184
|
+
cp >= 6624 && cp <= 6655 || // Khmer Symbols
|
|
1185
|
+
cp >= 43488 && cp <= 43519 || // Myanmar Extended-B
|
|
1186
|
+
cp >= 43616 && cp <= 43647;
|
|
1187
|
+
}
|
|
1188
|
+
function isLeadingVowel(cp) {
|
|
1189
|
+
return cp >= 3648 && cp <= 3652 || cp >= 3776 && cp <= 3780;
|
|
1190
|
+
}
|
|
1191
|
+
function isStacker(cp) {
|
|
1192
|
+
return cp === 6098 || cp === 4153;
|
|
1193
|
+
}
|
|
1194
|
+
function complexBreakAllowed(before, after) {
|
|
1195
|
+
if (!before || !after) return false;
|
|
1196
|
+
if (!isComplexBreakChar(before) || !isComplexBreakChar(after)) return false;
|
|
1197
|
+
const last = before.codePointAt(before.length - 1) ?? 0;
|
|
1198
|
+
const lead = before.codePointAt(0) ?? 0;
|
|
1199
|
+
return !(before.length === 1 && isLeadingVowel(lead)) && !isStacker(last);
|
|
1100
1200
|
}
|
|
1101
1201
|
|
|
1102
1202
|
// text/font-substitution-map.ts
|
|
@@ -1547,6 +1647,150 @@ function segmentByFont(text, fonts) {
|
|
|
1547
1647
|
return result;
|
|
1548
1648
|
}
|
|
1549
1649
|
|
|
1650
|
+
// text/truetype/embedding.ts
|
|
1651
|
+
var RESTRICTED = 2;
|
|
1652
|
+
var PREVIEW_PRINT = 4;
|
|
1653
|
+
var EDITABLE = 8;
|
|
1654
|
+
var NO_SUBSETTING = 256;
|
|
1655
|
+
var BITMAP_ONLY = 512;
|
|
1656
|
+
function embeddingPermission(fsType) {
|
|
1657
|
+
const licence = fsType & EDITABLE ? "editable" : fsType & PREVIEW_PRINT ? "preview-print" : fsType & RESTRICTED ? "restricted" : "installable";
|
|
1658
|
+
return {
|
|
1659
|
+
licence,
|
|
1660
|
+
noSubsetting: (fsType & NO_SUBSETTING) !== 0,
|
|
1661
|
+
bitmapOnly: (fsType & BITMAP_ONLY) !== 0
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
function mayDisplayEmbeddedFont(permission) {
|
|
1665
|
+
return permission.licence !== "restricted";
|
|
1666
|
+
}
|
|
1667
|
+
function mayEmbedFontInEditableDocument(permission) {
|
|
1668
|
+
return (permission.licence === "installable" || permission.licence === "editable") && !permission.bitmapOnly;
|
|
1669
|
+
}
|
|
1670
|
+
function mayEmbedFontSubset(permission) {
|
|
1671
|
+
return mayDisplayEmbeddedFont(permission) && !permission.noSubsetting && !permission.bitmapOnly;
|
|
1672
|
+
}
|
|
1673
|
+
var SFNT_VERSIONS = /* @__PURE__ */ new Set([65536, 1330926671, 1953658213]);
|
|
1674
|
+
var TTC_TAG = 1953784678;
|
|
1675
|
+
var OS2_TAG = 1330851634;
|
|
1676
|
+
function readSfntFsType(data, header) {
|
|
1677
|
+
const byte = (offset) => header && offset < header.length ? header[offset] : data[offset];
|
|
1678
|
+
const u162 = (offset) => {
|
|
1679
|
+
const hi = byte(offset);
|
|
1680
|
+
const lo = byte(offset + 1);
|
|
1681
|
+
return hi === void 0 || lo === void 0 ? void 0 : hi << 8 | lo;
|
|
1682
|
+
};
|
|
1683
|
+
const u322 = (offset) => {
|
|
1684
|
+
const hi = u162(offset);
|
|
1685
|
+
const lo = u162(offset + 2);
|
|
1686
|
+
return hi === void 0 || lo === void 0 ? void 0 : hi * 65536 + lo;
|
|
1687
|
+
};
|
|
1688
|
+
let base = 0;
|
|
1689
|
+
if (u322(0) === TTC_TAG) {
|
|
1690
|
+
const first2 = u322(12);
|
|
1691
|
+
if (first2 === void 0) return void 0;
|
|
1692
|
+
base = first2;
|
|
1693
|
+
}
|
|
1694
|
+
const version = u322(base);
|
|
1695
|
+
if (version === void 0 || !SFNT_VERSIONS.has(version)) return void 0;
|
|
1696
|
+
const numTables = u162(base + 4) ?? 0;
|
|
1697
|
+
for (let i = 0; i < numTables; i++) {
|
|
1698
|
+
const record = base + 12 + i * 16;
|
|
1699
|
+
const tag2 = u322(record);
|
|
1700
|
+
if (tag2 === void 0) return void 0;
|
|
1701
|
+
if (tag2 === OS2_TAG) {
|
|
1702
|
+
const offset = u322(record + 8);
|
|
1703
|
+
return offset === void 0 ? void 0 : u162(offset + 8);
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
return void 0;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
// text/truetype/sfnt-write.ts
|
|
1710
|
+
var pad4 = (n) => n + 3 & -4;
|
|
1711
|
+
function checksum(bytes) {
|
|
1712
|
+
let sum = 0;
|
|
1713
|
+
for (let i = 0; i < bytes.length; i += 4)
|
|
1714
|
+
sum = sum + ((bytes[i] ?? 0) << 24 | (bytes[i + 1] ?? 0) << 16 | (bytes[i + 2] ?? 0) << 8 | (bytes[i + 3] ?? 0)) >>> 0;
|
|
1715
|
+
return sum;
|
|
1716
|
+
}
|
|
1717
|
+
function writeSfnt(tables) {
|
|
1718
|
+
const directory = 12 + tables.length * 16;
|
|
1719
|
+
let total = directory;
|
|
1720
|
+
for (const [, bytes] of tables) total += pad4(bytes.length);
|
|
1721
|
+
const out = new Uint8Array(total);
|
|
1722
|
+
const view = new DataView(out.buffer);
|
|
1723
|
+
view.setUint32(0, 65536);
|
|
1724
|
+
view.setUint16(4, tables.length);
|
|
1725
|
+
const power = 2 ** Math.floor(Math.log2(tables.length));
|
|
1726
|
+
view.setUint16(6, power * 16);
|
|
1727
|
+
view.setUint16(8, Math.log2(power));
|
|
1728
|
+
view.setUint16(10, tables.length * 16 - power * 16);
|
|
1729
|
+
let position = directory;
|
|
1730
|
+
let headAt = -1;
|
|
1731
|
+
tables.forEach(([name2, bytes], index) => {
|
|
1732
|
+
const entry = 12 + index * 16;
|
|
1733
|
+
for (let i = 0; i < 4; i++) out[entry + i] = name2.charCodeAt(i);
|
|
1734
|
+
view.setUint32(entry + 4, checksum(bytes));
|
|
1735
|
+
view.setUint32(entry + 8, position);
|
|
1736
|
+
view.setUint32(entry + 12, bytes.length);
|
|
1737
|
+
out.set(bytes, position);
|
|
1738
|
+
if (name2 === "head") headAt = position;
|
|
1739
|
+
position += pad4(bytes.length);
|
|
1740
|
+
});
|
|
1741
|
+
if (headAt >= 0) view.setUint32(headAt + 8, 2981146554 - checksum(out) >>> 0);
|
|
1742
|
+
return out;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
// text/truetype/glyphless.ts
|
|
1746
|
+
var MAX_GLYPHLESS_GLYPHS = 65535;
|
|
1747
|
+
function glyphlessTrueType(advances2) {
|
|
1748
|
+
const count = Math.min(MAX_GLYPHLESS_GLYPHS, Math.max(1, advances2.length));
|
|
1749
|
+
const advance = (glyph) => Math.max(0, Math.min(65535, Math.round(advances2[glyph] ?? 0)));
|
|
1750
|
+
let widest = 0;
|
|
1751
|
+
const hmtx = new Uint8Array(count * 4);
|
|
1752
|
+
const hmtxView = new DataView(hmtx.buffer);
|
|
1753
|
+
for (let glyph = 0; glyph < count; glyph++) {
|
|
1754
|
+
hmtxView.setUint16(glyph * 4, advance(glyph));
|
|
1755
|
+
widest = Math.max(widest, advance(glyph));
|
|
1756
|
+
}
|
|
1757
|
+
const head = new Uint8Array(54);
|
|
1758
|
+
const headView = new DataView(head.buffer);
|
|
1759
|
+
headView.setUint32(0, 65536);
|
|
1760
|
+
headView.setUint32(4, 65536);
|
|
1761
|
+
headView.setUint32(12, 1594834165);
|
|
1762
|
+
headView.setUint16(16, 11);
|
|
1763
|
+
headView.setUint16(18, 1e3);
|
|
1764
|
+
headView.setInt16(38, -200);
|
|
1765
|
+
headView.setInt16(40, 1e3);
|
|
1766
|
+
headView.setInt16(42, 800);
|
|
1767
|
+
headView.setUint16(46, 8);
|
|
1768
|
+
headView.setInt16(48, 2);
|
|
1769
|
+
const hhea = new Uint8Array(36);
|
|
1770
|
+
const hheaView = new DataView(hhea.buffer);
|
|
1771
|
+
hheaView.setUint32(0, 65536);
|
|
1772
|
+
hheaView.setInt16(4, 800);
|
|
1773
|
+
hheaView.setInt16(6, -200);
|
|
1774
|
+
hheaView.setUint16(10, widest);
|
|
1775
|
+
hheaView.setInt16(18, 1);
|
|
1776
|
+
hheaView.setUint16(34, count);
|
|
1777
|
+
const maxp = new Uint8Array(32);
|
|
1778
|
+
const maxpView = new DataView(maxp.buffer);
|
|
1779
|
+
maxpView.setUint32(0, 65536);
|
|
1780
|
+
maxpView.setUint16(4, count);
|
|
1781
|
+
maxpView.setUint16(14, 1);
|
|
1782
|
+
const loca = new Uint8Array((count + 1) * 2);
|
|
1783
|
+
const glyf = new Uint8Array(4);
|
|
1784
|
+
return writeSfnt([
|
|
1785
|
+
["glyf", glyf],
|
|
1786
|
+
["head", head],
|
|
1787
|
+
["hhea", hhea],
|
|
1788
|
+
["hmtx", hmtx],
|
|
1789
|
+
["loca", loca],
|
|
1790
|
+
["maxp", maxp]
|
|
1791
|
+
]);
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1550
1794
|
// text/truetype/parse.ts
|
|
1551
1795
|
var u16 = (v, o) => o + 2 <= v.byteLength ? v.getUint16(o) : 0;
|
|
1552
1796
|
var i16 = (v, o) => o + 2 <= v.byteLength ? v.getInt16(o) : 0;
|
|
@@ -1676,13 +1920,6 @@ function parseTrueType(data) {
|
|
|
1676
1920
|
}
|
|
1677
1921
|
|
|
1678
1922
|
// text/truetype/subset.ts
|
|
1679
|
-
var pad4 = (n) => n + 3 & -4;
|
|
1680
|
-
function checksum(bytes) {
|
|
1681
|
-
let sum = 0;
|
|
1682
|
-
for (let i = 0; i < bytes.length; i += 4)
|
|
1683
|
-
sum = sum + ((bytes[i] ?? 0) << 24 | (bytes[i + 1] ?? 0) << 16 | (bytes[i + 2] ?? 0) << 8 | (bytes[i + 3] ?? 0)) >>> 0;
|
|
1684
|
-
return sum;
|
|
1685
|
-
}
|
|
1686
1923
|
function components(outline) {
|
|
1687
1924
|
if (outline.length < 10) return [];
|
|
1688
1925
|
const view = new DataView(outline.buffer, outline.byteOffset, outline.byteLength);
|
|
@@ -1715,8 +1952,8 @@ function subsetTrueType(font, used) {
|
|
|
1715
1952
|
const source = font.outline(glyph);
|
|
1716
1953
|
if (!source.length) return source;
|
|
1717
1954
|
const copy = Uint8Array.from(source);
|
|
1718
|
-
const
|
|
1719
|
-
for (const part of components(copy))
|
|
1955
|
+
const view = new DataView(copy.buffer);
|
|
1956
|
+
for (const part of components(copy)) view.setUint16(part.offset, mapped.get(part.glyph) ?? 0);
|
|
1720
1957
|
return copy;
|
|
1721
1958
|
});
|
|
1722
1959
|
const count = glyphs.length;
|
|
@@ -1759,31 +1996,7 @@ function subsetTrueType(font, used) {
|
|
|
1759
1996
|
["maxp", maxp]
|
|
1760
1997
|
])
|
|
1761
1998
|
if (bytes) tables.push([name2, bytes]);
|
|
1762
|
-
|
|
1763
|
-
let total = directory;
|
|
1764
|
-
for (const [, bytes] of tables) total += pad4(bytes.length);
|
|
1765
|
-
const out = new Uint8Array(total);
|
|
1766
|
-
const view = new DataView(out.buffer);
|
|
1767
|
-
view.setUint32(0, 65536);
|
|
1768
|
-
view.setUint16(4, tables.length);
|
|
1769
|
-
const power = 2 ** Math.floor(Math.log2(tables.length));
|
|
1770
|
-
view.setUint16(6, power * 16);
|
|
1771
|
-
view.setUint16(8, Math.log2(power));
|
|
1772
|
-
view.setUint16(10, tables.length * 16 - power * 16);
|
|
1773
|
-
let position = directory;
|
|
1774
|
-
let headAt = 0;
|
|
1775
|
-
tables.forEach(([name2, bytes], index) => {
|
|
1776
|
-
const entry = 12 + index * 16;
|
|
1777
|
-
for (let i = 0; i < 4; i++) out[entry + i] = name2.charCodeAt(i);
|
|
1778
|
-
view.setUint32(entry + 4, checksum(bytes));
|
|
1779
|
-
view.setUint32(entry + 8, position);
|
|
1780
|
-
view.setUint32(entry + 12, bytes.length);
|
|
1781
|
-
out.set(bytes, position);
|
|
1782
|
-
if (name2 === "head") headAt = position;
|
|
1783
|
-
position += pad4(bytes.length);
|
|
1784
|
-
});
|
|
1785
|
-
view.setUint32(headAt + 8, 2981146554 - checksum(out) >>> 0);
|
|
1786
|
-
return { data: out, glyphs };
|
|
1999
|
+
return { data: writeSfnt(tables), glyphs };
|
|
1787
2000
|
}
|
|
1788
2001
|
|
|
1789
2002
|
// text/webfonts/google-fonts-catalogue.ts
|
|
@@ -3927,9 +4140,9 @@ function impliedStyle(typeface) {
|
|
|
3927
4140
|
return cached;
|
|
3928
4141
|
}
|
|
3929
4142
|
function primaryFamily(familyOrList) {
|
|
3930
|
-
const
|
|
3931
|
-
const quoted = /^(["'])(.*)\1$/u.exec(
|
|
3932
|
-
return quoted ? (quoted[2] ?? "").replace(/\\(.)/gu, "$1") :
|
|
4143
|
+
const first2 = familyOrList.split(",")[0]?.trim() ?? "";
|
|
4144
|
+
const quoted = /^(["'])(.*)\1$/u.exec(first2);
|
|
4145
|
+
return quoted ? (quoted[2] ?? "").replace(/\\(.)/gu, "$1") : first2;
|
|
3933
4146
|
}
|
|
3934
4147
|
function resolveFontWeight(fontFamily, bold) {
|
|
3935
4148
|
const implied = fontFamily ? impliedStyle(primaryFamily(fontFamily))?.weight : void 0;
|
|
@@ -4086,4 +4299,238 @@ function collectWebfontFaces(runs, candidates, options) {
|
|
|
4086
4299
|
return { faces, unavailable };
|
|
4087
4300
|
}
|
|
4088
4301
|
|
|
4089
|
-
|
|
4302
|
+
// text/html-tokens.ts
|
|
4303
|
+
var ENTITIES = {
|
|
4304
|
+
amp: "&",
|
|
4305
|
+
lt: "<",
|
|
4306
|
+
gt: ">",
|
|
4307
|
+
quot: '"',
|
|
4308
|
+
apos: "'",
|
|
4309
|
+
nbsp: "\xA0",
|
|
4310
|
+
ensp: "\u2002",
|
|
4311
|
+
emsp: "\u2003",
|
|
4312
|
+
thinsp: "\u2009",
|
|
4313
|
+
ndash: "\u2013",
|
|
4314
|
+
mdash: "\u2014",
|
|
4315
|
+
lsquo: "\u2018",
|
|
4316
|
+
rsquo: "\u2019",
|
|
4317
|
+
ldquo: "\u201C",
|
|
4318
|
+
rdquo: "\u201D",
|
|
4319
|
+
bull: "\u2022",
|
|
4320
|
+
hellip: "\u2026",
|
|
4321
|
+
copy: "\xA9",
|
|
4322
|
+
reg: "\xAE",
|
|
4323
|
+
trade: "\u2122",
|
|
4324
|
+
euro: "\u20AC"
|
|
4325
|
+
};
|
|
4326
|
+
function codePoint(value) {
|
|
4327
|
+
if (!Number.isFinite(value) || value <= 0 || value > 1114111) return "\uFFFD";
|
|
4328
|
+
if (value >= 55296 && value <= 57343) return "\uFFFD";
|
|
4329
|
+
return String.fromCodePoint(value);
|
|
4330
|
+
}
|
|
4331
|
+
function decodeHtmlEntities(text) {
|
|
4332
|
+
return text.replace(/&(#x[0-9a-f]{1,8}|#\d{1,10}|[a-z]{1,10});/gi, (whole, name2) => {
|
|
4333
|
+
if (name2[1] === "x" || name2[1] === "X") return codePoint(parseInt(name2.slice(2), 16));
|
|
4334
|
+
if (name2.startsWith("#")) return codePoint(Number(name2.slice(1)));
|
|
4335
|
+
return ENTITIES[name2.toLowerCase()] ?? whole;
|
|
4336
|
+
});
|
|
4337
|
+
}
|
|
4338
|
+
function parseHtmlAttributes(text) {
|
|
4339
|
+
const attrs = /* @__PURE__ */ new Map();
|
|
4340
|
+
for (const m of text.matchAll(
|
|
4341
|
+
/([\w:-]{1,64})\s{0,16}=\s{0,16}(?:"([^"]*)"|'([^']*)'|([^\s>]+))/g
|
|
4342
|
+
))
|
|
4343
|
+
attrs.set((m[1] ?? "").toLowerCase(), decodeHtmlEntities(m[2] ?? m[3] ?? m[4] ?? ""));
|
|
4344
|
+
return attrs;
|
|
4345
|
+
}
|
|
4346
|
+
function parseCssDeclarations(text) {
|
|
4347
|
+
const out = /* @__PURE__ */ new Map();
|
|
4348
|
+
for (const decl of text.split(";")) {
|
|
4349
|
+
const colon = decl.indexOf(":");
|
|
4350
|
+
if (colon < 0) continue;
|
|
4351
|
+
out.set(
|
|
4352
|
+
decl.slice(0, colon).trim().toLowerCase(),
|
|
4353
|
+
decl.slice(colon + 1).replace(/!important/gi, "").trim()
|
|
4354
|
+
);
|
|
4355
|
+
}
|
|
4356
|
+
return out;
|
|
4357
|
+
}
|
|
4358
|
+
var NAMED_COLORS = {
|
|
4359
|
+
black: "000000",
|
|
4360
|
+
white: "FFFFFF",
|
|
4361
|
+
red: "FF0000",
|
|
4362
|
+
green: "008000",
|
|
4363
|
+
lime: "00FF00",
|
|
4364
|
+
blue: "0000FF",
|
|
4365
|
+
yellow: "FFFF00",
|
|
4366
|
+
orange: "FFA500",
|
|
4367
|
+
purple: "800080",
|
|
4368
|
+
gray: "808080",
|
|
4369
|
+
grey: "808080",
|
|
4370
|
+
silver: "C0C0C0",
|
|
4371
|
+
navy: "000080",
|
|
4372
|
+
maroon: "800000",
|
|
4373
|
+
teal: "008080",
|
|
4374
|
+
olive: "808000",
|
|
4375
|
+
aqua: "00FFFF",
|
|
4376
|
+
cyan: "00FFFF",
|
|
4377
|
+
fuchsia: "FF00FF",
|
|
4378
|
+
magenta: "FF00FF",
|
|
4379
|
+
darkblue: "00008B",
|
|
4380
|
+
darkred: "8B0000",
|
|
4381
|
+
darkgreen: "006400",
|
|
4382
|
+
darkcyan: "008B8B",
|
|
4383
|
+
darkmagenta: "8B008B",
|
|
4384
|
+
darkgray: "A9A9A9",
|
|
4385
|
+
darkgrey: "A9A9A9",
|
|
4386
|
+
lightgray: "D3D3D3",
|
|
4387
|
+
lightgrey: "D3D3D3",
|
|
4388
|
+
darkyellow: "808000"
|
|
4389
|
+
};
|
|
4390
|
+
function parseCssColorHex(text) {
|
|
4391
|
+
const value = text.trim().toLowerCase();
|
|
4392
|
+
const hex = /^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(value)?.[1];
|
|
4393
|
+
if (hex) return (hex.length === 3 ? [...hex].map((ch) => ch + ch).join("") : hex).toUpperCase();
|
|
4394
|
+
const rgb = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*([\d.]+))?/.exec(value);
|
|
4395
|
+
if (rgb) {
|
|
4396
|
+
if (rgb[4] !== void 0 && Number(rgb[4]) === 0) return void 0;
|
|
4397
|
+
return rgb.slice(1, 4).map((n) => Math.min(255, Number(n)).toString(16).padStart(2, "0")).join("").toUpperCase();
|
|
4398
|
+
}
|
|
4399
|
+
return NAMED_COLORS[value];
|
|
4400
|
+
}
|
|
4401
|
+
var MAX_TAG_LENGTH = 8192;
|
|
4402
|
+
var RAW_TEXT = /* @__PURE__ */ new Set([
|
|
4403
|
+
"script",
|
|
4404
|
+
"style",
|
|
4405
|
+
"textarea",
|
|
4406
|
+
"title",
|
|
4407
|
+
"xmp",
|
|
4408
|
+
"noscript",
|
|
4409
|
+
"template",
|
|
4410
|
+
"head",
|
|
4411
|
+
"xml",
|
|
4412
|
+
"svg",
|
|
4413
|
+
"math",
|
|
4414
|
+
"iframe",
|
|
4415
|
+
"object",
|
|
4416
|
+
"canvas",
|
|
4417
|
+
"select"
|
|
4418
|
+
]);
|
|
4419
|
+
function htmlClipboardFragment(html) {
|
|
4420
|
+
const start = html.indexOf("<!--StartFragment-->");
|
|
4421
|
+
const end = html.indexOf("<!--EndFragment-->", start < 0 ? 0 : start);
|
|
4422
|
+
if (start >= 0 && end > start) return html.slice(start + "<!--StartFragment-->".length, end);
|
|
4423
|
+
const first2 = html.indexOf("<");
|
|
4424
|
+
return first2 > 0 && /^Version:\d/.test(html) ? html.slice(first2) : html;
|
|
4425
|
+
}
|
|
4426
|
+
function tagEnd(html, from) {
|
|
4427
|
+
let quote = "";
|
|
4428
|
+
const limit = Math.min(html.length, from + MAX_TAG_LENGTH);
|
|
4429
|
+
for (let i = from; i < limit; i++) {
|
|
4430
|
+
const ch = html[i];
|
|
4431
|
+
if (quote) {
|
|
4432
|
+
if (ch === quote) quote = "";
|
|
4433
|
+
} else if (ch === '"' || ch === "'") quote = ch;
|
|
4434
|
+
else if (ch === ">") return i;
|
|
4435
|
+
else if (ch === "<") return -1;
|
|
4436
|
+
}
|
|
4437
|
+
return -1;
|
|
4438
|
+
}
|
|
4439
|
+
function tokenizeHtml(html, maxTokens = Number.POSITIVE_INFINITY) {
|
|
4440
|
+
const tokens = [];
|
|
4441
|
+
let text = "";
|
|
4442
|
+
const flush = () => {
|
|
4443
|
+
if (text) tokens.push({ kind: "text", text: decodeHtmlEntities(text) });
|
|
4444
|
+
text = "";
|
|
4445
|
+
};
|
|
4446
|
+
let i = 0;
|
|
4447
|
+
while (i < html.length) {
|
|
4448
|
+
if (tokens.length >= maxTokens) {
|
|
4449
|
+
text += textWithoutTags(html.slice(i));
|
|
4450
|
+
break;
|
|
4451
|
+
}
|
|
4452
|
+
const lt = html.indexOf("<", i);
|
|
4453
|
+
if (lt < 0) {
|
|
4454
|
+
text += html.slice(i);
|
|
4455
|
+
break;
|
|
4456
|
+
}
|
|
4457
|
+
text += html.slice(i, lt);
|
|
4458
|
+
i = lt;
|
|
4459
|
+
if (html.startsWith("<!--", i)) {
|
|
4460
|
+
const close = html.indexOf("-->", i + 4);
|
|
4461
|
+
i = close < 0 ? html.length : close + 3;
|
|
4462
|
+
continue;
|
|
4463
|
+
}
|
|
4464
|
+
if (html.startsWith("<![", i)) {
|
|
4465
|
+
const close = html.indexOf("]>", i + 3);
|
|
4466
|
+
const body = html.slice(i + 3, close < 0 ? html.length : close).toLowerCase();
|
|
4467
|
+
flush();
|
|
4468
|
+
if (/^\s*if\b/.test(body))
|
|
4469
|
+
tokens.push({
|
|
4470
|
+
kind: "conditional",
|
|
4471
|
+
open: true,
|
|
4472
|
+
supportLists: body.includes("supportlists")
|
|
4473
|
+
});
|
|
4474
|
+
else if (/^\s*endif\b/.test(body))
|
|
4475
|
+
tokens.push({ kind: "conditional", open: false, supportLists: false });
|
|
4476
|
+
i = close < 0 ? html.length : close + 2;
|
|
4477
|
+
continue;
|
|
4478
|
+
}
|
|
4479
|
+
const next = html[i + 1] ?? "";
|
|
4480
|
+
if (next === "!" || next === "?") {
|
|
4481
|
+
const close = html.indexOf(">", i + 2);
|
|
4482
|
+
i = close < 0 ? html.length : close + 1;
|
|
4483
|
+
continue;
|
|
4484
|
+
}
|
|
4485
|
+
const closing = next === "/";
|
|
4486
|
+
const nameMatch = /^[a-zA-Z][\w:-]{0,63}/.exec(html.slice(i + (closing ? 2 : 1), i + 70));
|
|
4487
|
+
const end = nameMatch ? tagEnd(html, i + 1) : -1;
|
|
4488
|
+
if (!nameMatch || end < 0) {
|
|
4489
|
+
text += "<";
|
|
4490
|
+
i += 1;
|
|
4491
|
+
continue;
|
|
4492
|
+
}
|
|
4493
|
+
const name2 = nameMatch[0].toLowerCase();
|
|
4494
|
+
flush();
|
|
4495
|
+
if (closing) {
|
|
4496
|
+
tokens.push({ kind: "close", name: name2 });
|
|
4497
|
+
i = end + 1;
|
|
4498
|
+
continue;
|
|
4499
|
+
}
|
|
4500
|
+
const inner = html.slice(i + 1 + nameMatch[0].length, end);
|
|
4501
|
+
const selfClosing = inner.trimEnd().endsWith("/");
|
|
4502
|
+
i = end + 1;
|
|
4503
|
+
if (RAW_TEXT.has(name2)) {
|
|
4504
|
+
tokens.push({ kind: "text", text: "" });
|
|
4505
|
+
if (selfClosing) continue;
|
|
4506
|
+
const closer = new RegExp(`</${name2}`, "gi");
|
|
4507
|
+
closer.lastIndex = i;
|
|
4508
|
+
const found = closer.exec(html);
|
|
4509
|
+
const after = found ? html.indexOf(">", found.index) : -1;
|
|
4510
|
+
i = after < 0 ? html.length : after + 1;
|
|
4511
|
+
continue;
|
|
4512
|
+
}
|
|
4513
|
+
tokens.push({ kind: "open", name: name2, attrs: parseHtmlAttributes(inner), selfClosing });
|
|
4514
|
+
}
|
|
4515
|
+
flush();
|
|
4516
|
+
return tokens;
|
|
4517
|
+
}
|
|
4518
|
+
function textWithoutTags(html) {
|
|
4519
|
+
let out = "";
|
|
4520
|
+
let at = 0;
|
|
4521
|
+
for (let lt = html.indexOf("<"); lt >= 0; lt = html.indexOf("<", at)) {
|
|
4522
|
+
const gt = html.indexOf(">", lt + 1);
|
|
4523
|
+
if (gt < 0) break;
|
|
4524
|
+
const inner = html.indexOf("<", lt + 1);
|
|
4525
|
+
if (inner >= 0 && inner < gt) {
|
|
4526
|
+
out += html.slice(at, inner);
|
|
4527
|
+
at = inner;
|
|
4528
|
+
continue;
|
|
4529
|
+
}
|
|
4530
|
+
out += html.slice(at, lt);
|
|
4531
|
+
at = gt + 1;
|
|
4532
|
+
}
|
|
4533
|
+
return out + html.slice(at);
|
|
4534
|
+
}
|
|
4535
|
+
|
|
4536
|
+
export { AUTO_SPACE_EM, FONT_SUBSTITUTION_MAP, GOOGLE_FONTS_CATALOGUE_DATE, GOOGLE_FONTS_CSS2_BASE, GOOGLE_FONTS_FAMILIES, GOOGLE_WEBFONT_AXIS, MAX_GLYPHLESS_GLYPHS, METRIC_FONT_SUBSTITUTES, OOXML_DATETIME_PATTERNS, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, TEXT_CASE_MODES, buildFontFamilyString, buildGoogleFontsFragment, buildGoogleFontsHref, buildLeaderString, changeTextCase, changeTextCaseRanges, classifyPanose, collectRunFamilies, collectWebfontFaces, complexBreakAllowed, decimalAnchorIndex, decimalSeparatorForLanguage, decodeHtmlEntities, designTextWidthEm, detectFontScript, distributeRunsText, eastAsianAutoSpace, embeddingPermission, findGoogleFontsFamily, findLookAlikeGoogleFontsFamily, findMetricCompatibleGoogleFontsFamily, fontStyleShorthand, fontWeightAttribute, fontWeightShorthand, formatDatePicture, formatLocaleNumber, getGoogleFontsVariants, getLeaderCharacter, getLeaderStyles, getPanoseWeight, getSubstituteFontFamily, getSubstituteFonts, glyphlessTrueType, hangsAtLineEnd, hasDesignAdvances, hasDirectSubstitution, hasDistinctScriptFonts, htmlClipboardFragment, isComplexBreakChar, isEastAsianChar, isEastAsianLetter, kinsokuLanguage, kinsokuSets, matchGoogleWebfontFragments, mayDisplayEmbeddedFont, mayEmbedFontInEditableDocument, mayEmbedFontSubset, mergeTextThreeWay, metricFontFamily, namedFontVerticalMetrics, normalizeGoogleFontsBaseUrl, officeFontVerticalMetrics, ooxmlDateTimeFieldPicture, parseCssColorHex, parseCssDeclarations, parseFontWeightName, parseHtmlAttributes, parseLocaleNumber, parsePanoseBytes, parsePanoseString, parseTrueType, parseTsv, prohibitedAtLineEnd, prohibitedAtLineStart, readSfntFsType, realignOrCollapseRuns, resolveFontForScript, resolveFontItalic, resolveFontWeight, resolveGoogleFontsCss2Base, resolveGoogleFontsFace, resolveScriptFontSet, segmentByFont, segmentByScript, selectGoogleWebfontFamilies, servedGoogleFontsFamily, stripFontStyleSuffix, subsetTrueType, toTsv, tokenizeHtml, wrapStyledRuns };
|