ooxml-core 1.30.1 → 1.32.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/{PptxHandler-KKLAYUGQ.mjs → PptxHandler-QY5VL3CY.mjs} +2 -2
- package/dist/PptxHandler-SJ5ZUIUX.mjs +4 -0
- package/dist/{PptxHandler-DHQPVTUI.cjs → PptxHandler-TESZUH66.cjs} +3 -3
- package/dist/{PresentationBuilder-YYZYCKTZ.mjs → PresentationBuilder-3CH5TR4W.mjs} +2 -2
- package/dist/{PresentationBuilder-JORMF5CP.cjs → PresentationBuilder-5NFBUP7Y.cjs} +5 -5
- package/dist/{PresentationBuilder-Q2Z33LLM.mjs → PresentationBuilder-S6HXHKEJ.mjs} +2 -2
- package/dist/automation/index.cjs +6446 -3410
- package/dist/automation/index.mjs +6446 -3410
- package/dist/automation/node.cjs +2 -1
- package/dist/automation/node.d.ts.map +1 -1
- package/dist/automation/node.mjs +2 -1
- package/dist/automation/tools/define.d.ts +2 -0
- package/dist/automation/tools/define.d.ts.map +1 -1
- package/dist/automation/tools/types.d.ts +6 -0
- package/dist/automation/tools/types.d.ts.map +1 -1
- package/dist/{chunk-GJDFCP2T.mjs → chunk-3H5UAJB3.mjs} +258 -155
- package/dist/{chunk-MKDONWNO.mjs → chunk-4R65YYAD.mjs} +32 -14
- package/dist/{chunk-KWJYMAEF.mjs → chunk-IOTGRLJH.mjs} +255 -152
- package/dist/{chunk-6FXOAMNL.mjs → chunk-N6424WKA.mjs} +1 -1
- package/dist/{chunk-WZJ25K7P.mjs → chunk-NAWLWKOJ.mjs} +1 -1
- package/dist/{chunk-DJ3CDTMX.mjs → chunk-O7SVHLD7.mjs} +23 -5
- package/dist/{chunk-CZXM4ZJH.cjs → chunk-Q6NM64J2.cjs} +23 -4
- package/dist/{chunk-FFJBOR2Y.mjs → chunk-UYMSFJQZ.mjs} +76 -4
- package/dist/{chunk-B4LXDHBX.cjs → chunk-X6VNUBES.cjs} +1419 -1316
- package/dist/collab/index.cjs +35 -4
- package/dist/collab/index.mjs +35 -4
- package/dist/collab/websocket-transport.d.ts +9 -1
- package/dist/collab/websocket-transport.d.ts.map +1 -1
- package/dist/diagram/index.cjs +8 -4
- package/dist/diagram/index.mjs +8 -4
- package/dist/docx/data-binding.d.ts +9 -0
- package/dist/docx/data-binding.d.ts.map +1 -0
- package/dist/docx/document-parts.d.ts +1 -0
- package/dist/docx/document-parts.d.ts.map +1 -1
- package/dist/docx/drawing.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +1391 -613
- package/dist/docx/embedded.mjs +1391 -613
- package/dist/docx/index.cjs +1402 -622
- package/dist/docx/index.mjs +1402 -622
- package/dist/docx/inline-model.d.ts +2 -0
- package/dist/docx/inline-model.d.ts.map +1 -1
- package/dist/docx/layout/adapt-floats.d.ts.map +1 -1
- 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/equation-object.d.ts +1 -1
- package/dist/docx/layout/equation-object.d.ts.map +1 -1
- package/dist/docx/layout/floats.d.ts +1 -1
- package/dist/docx/layout/floats.d.ts.map +1 -1
- package/dist/docx/layout/flow-paragraph.d.ts +4 -0
- package/dist/docx/layout/flow-paragraph.d.ts.map +1 -1
- package/dist/docx/layout/flow-table.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +460 -207
- package/dist/docx/layout/index.mjs +460 -207
- package/dist/docx/layout/input.d.ts +12 -0
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/nested-frame-profile.d.ts +3 -1
- package/dist/docx/layout/nested-frame-profile.d.ts.map +1 -1
- package/dist/docx/layout/page-cursor.d.ts +11 -2
- package/dist/docx/layout/page-cursor.d.ts.map +1 -1
- package/dist/docx/layout/paragraph-fragments.d.ts.map +1 -1
- package/dist/docx/layout/paragraph-layout.d.ts +5 -0
- package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +4 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/layout/section-flow.d.ts +2 -0
- package/dist/docx/layout/section-flow.d.ts.map +1 -1
- package/dist/docx/layout/table-layout.d.ts +4 -14
- package/dist/docx/layout/table-layout.d.ts.map +1 -1
- package/dist/docx/layout/table-merged-rows.d.ts +21 -0
- package/dist/docx/layout/table-merged-rows.d.ts.map +1 -0
- package/dist/docx/layout/table-row-split.d.ts +16 -0
- package/dist/docx/layout/table-row-split.d.ts.map +1 -0
- package/dist/docx/layout/wrap.d.ts +2 -0
- package/dist/docx/layout/wrap.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +1405 -627
- package/dist/docx/load/index.mjs +1405 -627
- package/dist/docx/model-paragraph.d.ts +4 -1
- package/dist/docx/model-paragraph.d.ts.map +1 -1
- package/dist/docx/model.d.ts +24 -1
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/paragraph-properties.d.ts.map +1 -1
- package/dist/docx/paragraph-styles.d.ts.map +1 -1
- package/dist/docx/parse-table.d.ts.map +1 -1
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/run-segmentation.d.ts.map +1 -1
- package/dist/docx/save-modified.d.ts +4 -0
- package/dist/docx/save-modified.d.ts.map +1 -0
- package/dist/docx/save.d.ts +2 -2
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/style-formatting-package.d.ts +9 -0
- package/dist/docx/style-formatting-package.d.ts.map +1 -0
- package/dist/docx/style-numbering-package.d.ts +4 -1
- package/dist/docx/style-numbering-package.d.ts.map +1 -1
- package/dist/docx/table-grid.d.ts +35 -0
- package/dist/docx/table-grid.d.ts.map +1 -0
- package/dist/docx/table-structure-cells.d.ts +19 -0
- package/dist/docx/table-structure-cells.d.ts.map +1 -0
- package/dist/docx/table-structure-check.d.ts +12 -0
- package/dist/docx/table-structure-check.d.ts.map +1 -0
- package/dist/docx/table-structure-merge.d.ts +28 -0
- package/dist/docx/table-structure-merge.d.ts.map +1 -0
- package/dist/docx/table-structure.d.ts +30 -0
- package/dist/docx/table-structure.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +725 -260
- package/dist/docx/ui/index.d.ts +4 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +711 -261
- 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/table-structure-guard.d.ts +2 -0
- package/dist/docx/ui/table-structure-guard.d.ts.map +1 -1
- package/dist/docx/word-content-control-docs.d.ts +5 -0
- package/dist/docx/word-content-control-docs.d.ts.map +1 -0
- package/dist/docx/word-corpus-gaps.d.ts +10 -0
- package/dist/docx/word-corpus-gaps.d.ts.map +1 -0
- package/dist/docx/word-measurer.d.ts +6 -0
- package/dist/docx/word-measurer.d.ts.map +1 -0
- package/dist/docx/word-spacing-docs.d.ts +12 -0
- package/dist/docx/word-spacing-docs.d.ts.map +1 -0
- package/dist/docx/word-table-docs.d.ts +9 -0
- package/dist/docx/word-table-docs.d.ts.map +1 -0
- package/dist/docx/write-drawing.d.ts.map +1 -1
- package/dist/docx/write-fallback.d.ts +5 -0
- package/dist/docx/write-fallback.d.ts.map +1 -0
- package/dist/docx/write-table-properties.d.ts +1 -0
- package/dist/docx/write-table-properties.d.ts.map +1 -1
- package/dist/docx/write-table-structure.d.ts +14 -0
- package/dist/docx/write-table-structure.d.ts.map +1 -0
- package/dist/docx/write-table.d.ts +3 -4
- package/dist/docx/write-table.d.ts.map +1 -1
- package/dist/geometry/index.cjs +16 -12
- package/dist/geometry/index.mjs +16 -12
- package/dist/geometry/preset-shape-definitions-table.d.ts.map +1 -1
- package/dist/index.cjs +38 -34
- package/dist/index.mjs +38 -34
- package/dist/math/index.cjs +22 -22
- package/dist/math/index.mjs +22 -22
- package/dist/math/omml-box-grouped.d.ts.map +1 -1
- package/dist/math/omml-box-layout.d.ts +3 -1
- package/dist/math/omml-box-layout.d.ts.map +1 -1
- package/dist/math/omml-box-structures.d.ts.map +1 -1
- package/dist/math/omml-box.d.ts +2 -0
- package/dist/math/omml-box.d.ts.map +1 -1
- package/dist/math/omml-svg.d.ts +6 -2
- package/dist/math/omml-svg.d.ts.map +1 -1
- package/dist/pptx/automation/index.cjs +295 -157
- package/dist/pptx/automation/index.d.ts +9 -3
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +6 -5
- package/dist/pptx/chunks/{index-PdM5zpmu.d.ts → index-D-FdgqrP.d.ts} +102 -3
- package/dist/pptx/chunks/index-D-FdgqrP.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-BQDcu_0a.d.ts → index-DKybuHPT.d.ts} +51 -3
- package/dist/pptx/chunks/{index-BQDcu_0a.d.ts.map → index-DKybuHPT.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-CBV1oHN7.d.ts → index-DnWlmYCy.d.ts} +2 -2
- package/dist/pptx/chunks/{index-CBV1oHN7.d.ts.map → index-DnWlmYCy.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +294 -157
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +8 -4
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +380 -171
- package/dist/pptx/index.d.ts +4 -4
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/teams/chat-rooms.d.ts.map +1 -1
- package/dist/teams/chat-view.d.ts +10 -1
- package/dist/teams/chat-view.d.ts.map +1 -1
- package/dist/teams/chat.d.ts +7 -0
- package/dist/teams/chat.d.ts.map +1 -1
- package/dist/teams/files.d.ts +1 -1
- package/dist/teams/files.d.ts.map +1 -1
- package/dist/teams/index.cjs +3471 -1223
- package/dist/teams/index.d.ts +4 -0
- package/dist/teams/index.d.ts.map +1 -1
- package/dist/teams/index.mjs +3435 -1223
- package/dist/teams/message-transfer.d.ts +1 -1
- package/dist/teams/message-transfer.d.ts.map +1 -1
- package/dist/teams/presence-controller.d.ts +18 -3
- package/dist/teams/presence-controller.d.ts.map +1 -1
- package/dist/teams/presence-meetings.d.ts +21 -0
- package/dist/teams/presence-meetings.d.ts.map +1 -0
- package/dist/teams/presence.d.ts +40 -2
- package/dist/teams/presence.d.ts.map +1 -1
- package/dist/teams/protocol.d.ts +30 -0
- package/dist/teams/protocol.d.ts.map +1 -0
- package/dist/teams/schema.d.ts +59 -0
- package/dist/teams/schema.d.ts.map +1 -0
- package/dist/teams/server-config.d.ts +19 -2
- package/dist/teams/server-config.d.ts.map +1 -1
- package/dist/teams/server-file-storage.d.ts +11 -1
- package/dist/teams/server-file-storage.d.ts.map +1 -1
- package/dist/teams/server-session.d.ts +2 -0
- package/dist/teams/server-session.d.ts.map +1 -1
- package/dist/teams/signaling.d.ts +2 -0
- package/dist/teams/signaling.d.ts.map +1 -1
- package/dist/teams/store.d.ts +14 -0
- package/dist/teams/store.d.ts.map +1 -1
- package/dist/teams/stored-file.d.ts +1 -1
- package/dist/teams/stored-file.d.ts.map +1 -1
- package/dist/teams/sync-transport.d.ts.map +1 -1
- package/dist/teams/validate-members.d.ts +28 -0
- package/dist/teams/validate-members.d.ts.map +1 -0
- package/dist/teams/validate-owned.d.ts +20 -0
- package/dist/teams/validate-owned.d.ts.map +1 -0
- package/dist/teams/validate-update.d.ts +70 -0
- package/dist/teams/validate-update.d.ts.map +1 -0
- package/dist/teams/view.d.ts +5 -0
- package/dist/teams/view.d.ts.map +1 -1
- package/dist/teams/workspace.d.ts +17 -2
- package/dist/teams/workspace.d.ts.map +1 -1
- package/dist/visio/connector-route-walk.d.ts +2 -0
- package/dist/visio/connector-route-walk.d.ts.map +1 -1
- package/dist/visio/edit-connector-reroute.d.ts.map +1 -1
- package/dist/visio/edit-connector.d.ts +2 -0
- package/dist/visio/edit-connector.d.ts.map +1 -1
- package/dist/visio/edit-delete.d.ts.map +1 -1
- package/dist/visio/edit-duplicate-line.d.ts +40 -0
- package/dist/visio/edit-duplicate-line.d.ts.map +1 -0
- package/dist/visio/edit-duplicate.d.ts.map +1 -1
- package/dist/visio/edit-formatting-scope.d.ts +5 -1
- package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
- package/dist/visio/edit-geometry.d.ts.map +1 -1
- package/dist/visio/edit-instance-duplicate.d.ts +2 -1
- package/dist/visio/edit-instance-duplicate.d.ts.map +1 -1
- package/dist/visio/edit-master-move.d.ts.map +1 -1
- package/dist/visio/edit-recalculate-index.d.ts +23 -0
- package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
- package/dist/visio/edit-recalculate-text.d.ts +12 -0
- package/dist/visio/edit-recalculate-text.d.ts.map +1 -0
- package/dist/visio/edit-recalculate-values.d.ts.map +1 -1
- package/dist/visio/edit-recalculate.d.ts +15 -3
- package/dist/visio/edit-recalculate.d.ts.map +1 -1
- package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
- package/dist/visio/edit-stencil-connector-layout.d.ts +1 -1
- package/dist/visio/edit-stencil-connector-layout.d.ts.map +1 -1
- package/dist/visio/edit-text-scope.d.ts +4 -1
- package/dist/visio/edit-text-scope.d.ts.map +1 -1
- package/dist/visio/formula-analyze.d.ts +18 -0
- package/dist/visio/formula-analyze.d.ts.map +1 -0
- package/dist/visio/formula-bound.d.ts +4 -0
- package/dist/visio/formula-bound.d.ts.map +1 -0
- package/dist/visio/formula-evaluate.d.ts +2 -9
- package/dist/visio/formula-evaluate.d.ts.map +1 -1
- package/dist/visio/formula-extra-functions.d.ts +23 -0
- package/dist/visio/formula-extra-functions.d.ts.map +1 -0
- package/dist/visio/formula-indirect.d.ts +6 -0
- package/dist/visio/formula-indirect.d.ts.map +1 -0
- package/dist/visio/formula-master.d.ts +1 -0
- package/dist/visio/formula-master.d.ts.map +1 -1
- package/dist/visio/formula-operators.d.ts +6 -0
- package/dist/visio/formula-operators.d.ts.map +1 -0
- package/dist/visio/formula-text-functions.d.ts +5 -1
- package/dist/visio/formula-text-functions.d.ts.map +1 -1
- package/dist/visio/formula.d.ts +12 -0
- package/dist/visio/formula.d.ts.map +1 -1
- package/dist/visio/index.cjs +1359 -396
- package/dist/visio/index.mjs +1359 -396
- package/dist/visio/ui/index.cjs +1346 -383
- package/dist/visio/ui/index.mjs +1346 -383
- package/dist/xlsx/collab/apply.d.ts.map +1 -1
- package/dist/xlsx/collab/codec.d.ts +2 -0
- package/dist/xlsx/collab/codec.d.ts.map +1 -1
- package/dist/xlsx/collab/dirty.d.ts +4 -1
- package/dist/xlsx/collab/dirty.d.ts.map +1 -1
- package/dist/xlsx/collab/index.cjs +551 -106
- package/dist/xlsx/collab/index.mjs +551 -106
- package/dist/xlsx/collab/keyed.d.ts +36 -0
- package/dist/xlsx/collab/keyed.d.ts.map +1 -0
- package/dist/xlsx/collab/names.d.ts +2 -0
- package/dist/xlsx/collab/names.d.ts.map +1 -1
- package/dist/xlsx/collab/part-specs.d.ts +13 -0
- package/dist/xlsx/collab/part-specs.d.ts.map +1 -0
- package/dist/xlsx/collab/schema.d.ts +8 -0
- package/dist/xlsx/collab/schema.d.ts.map +1 -1
- package/dist/xlsx/collab/sheet-parts.d.ts +19 -0
- package/dist/xlsx/collab/sheet-parts.d.ts.map +1 -0
- package/dist/xlsx/collab/sheets.d.ts +6 -0
- package/dist/xlsx/collab/sheets.d.ts.map +1 -1
- package/dist/xlsx/collab/write.d.ts +3 -0
- package/dist/xlsx/collab/write.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard-areas.d.ts +17 -0
- package/dist/xlsx/edit/clipboard-areas.d.ts.map +1 -0
- package/dist/xlsx/edit/custom-views.d.ts +21 -0
- package/dist/xlsx/edit/custom-views.d.ts.map +1 -0
- package/dist/xlsx/edit/data-table.d.ts.map +1 -1
- package/dist/xlsx/edit/history.d.ts +1 -1
- package/dist/xlsx/edit/history.d.ts.map +1 -1
- package/dist/xlsx/edit/index.d.ts +2 -0
- package/dist/xlsx/edit/index.d.ts.map +1 -1
- package/dist/xlsx/edit/paste-selection.d.ts.map +1 -1
- package/dist/xlsx/edit/scenario-merge.d.ts +7 -0
- package/dist/xlsx/edit/scenario-merge.d.ts.map +1 -0
- package/dist/xlsx/edit/session.d.ts.map +1 -1
- package/dist/xlsx/edit/shift-data-tables.d.ts +7 -0
- package/dist/xlsx/edit/shift-data-tables.d.ts.map +1 -0
- package/dist/xlsx/edit/shift-scenarios.d.ts +7 -0
- package/dist/xlsx/edit/shift-scenarios.d.ts.map +1 -0
- package/dist/xlsx/edit/shift-sheet.d.ts.map +1 -1
- package/dist/xlsx/edit/sparkline-grouping.d.ts +10 -0
- package/dist/xlsx/edit/sparkline-grouping.d.ts.map +1 -0
- package/dist/xlsx/edit/types.d.ts +21 -0
- package/dist/xlsx/edit/types.d.ts.map +1 -1
- package/dist/xlsx/formula/ets-drift-compare.d.ts +19 -0
- package/dist/xlsx/formula/ets-drift-compare.d.ts.map +1 -0
- package/dist/xlsx/formula/ets-excel-compare.d.ts +36 -0
- package/dist/xlsx/formula/ets-excel-compare.d.ts.map +1 -0
- package/dist/xlsx/formula/ets-init-compare.d.ts +24 -0
- package/dist/xlsx/formula/ets-init-compare.d.ts.map +1 -0
- package/dist/xlsx/formula/ets-init-maps.d.ts +21 -0
- package/dist/xlsx/formula/ets-init-maps.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-core.d.ts +36 -0
- package/dist/xlsx/formula/functions/ets-core.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-grid.d.ts +15 -0
- package/dist/xlsx/formula/functions/ets-grid.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-init-chain.d.ts +11 -0
- package/dist/xlsx/formula/functions/ets-init-chain.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-init-four.d.ts +3 -0
- package/dist/xlsx/formula/functions/ets-init-four.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-init-short.d.ts +17 -0
- package/dist/xlsx/formula/functions/ets-init-short.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-init-states.d.ts +5 -0
- package/dist/xlsx/formula/functions/ets-init-states.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-init-three.d.ts +23 -0
- package/dist/xlsx/formula/functions/ets-init-three.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-init-threeplus.d.ts +13 -0
- package/dist/xlsx/formula/functions/ets-init-threeplus.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-init.d.ts +33 -0
- package/dist/xlsx/formula/functions/ets-init.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-input.d.ts +13 -0
- package/dist/xlsx/formula/functions/ets-input.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-search-map.d.ts +24 -0
- package/dist/xlsx/formula/functions/ets-search-map.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-search.d.ts +17 -0
- package/dist/xlsx/formula/functions/ets-search.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-season.d.ts +6 -0
- package/dist/xlsx/formula/functions/ets-season.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/ets-validate.d.ts +16 -0
- package/dist/xlsx/formula/functions/ets-validate.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/forecast-ets.d.ts +3 -0
- package/dist/xlsx/formula/functions/forecast-ets.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/statistical.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +5118 -2648
- package/dist/xlsx/index.mjs +5097 -2649
- package/dist/xlsx/layout/form-control-link.d.ts +20 -0
- package/dist/xlsx/layout/form-control-link.d.ts.map +1 -0
- package/dist/xlsx/layout/form-control-state.d.ts +49 -0
- package/dist/xlsx/layout/form-control-state.d.ts.map +1 -0
- package/dist/xlsx/layout/form-control-view.d.ts +11 -0
- package/dist/xlsx/layout/form-control-view.d.ts.map +1 -0
- package/dist/xlsx/layout/header-footer-edit.d.ts +4 -2
- package/dist/xlsx/layout/header-footer-edit.d.ts.map +1 -1
- package/dist/xlsx/layout/header-footer.d.ts +16 -0
- package/dist/xlsx/layout/header-footer.d.ts.map +1 -1
- package/dist/xlsx/layout/index.d.ts +5 -0
- package/dist/xlsx/layout/index.d.ts.map +1 -1
- package/dist/xlsx/layout/ref-evaluator.d.ts +6 -0
- package/dist/xlsx/layout/ref-evaluator.d.ts.map +1 -1
- package/dist/xlsx/layout/shape-paint.d.ts +25 -0
- package/dist/xlsx/layout/shape-paint.d.ts.map +1 -0
- package/dist/xlsx/layout/shape-view.d.ts +15 -0
- package/dist/xlsx/layout/shape-view.d.ts.map +1 -0
- package/dist/xlsx/load/index.cjs +2667 -1163
- package/dist/xlsx/load/index.mjs +2667 -1163
- package/dist/xlsx/model-custom-views.d.ts +33 -0
- package/dist/xlsx/model-custom-views.d.ts.map +1 -0
- package/dist/xlsx/model-shapes.d.ts +78 -0
- package/dist/xlsx/model-shapes.d.ts.map +1 -0
- package/dist/xlsx/model.d.ts +38 -1
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/read/custom-views.d.ts +5 -0
- package/dist/xlsx/read/custom-views.d.ts.map +1 -0
- package/dist/xlsx/read/drawing.d.ts.map +1 -1
- package/dist/xlsx/read/form-control.d.ts +14 -0
- package/dist/xlsx/read/form-control.d.ts.map +1 -0
- package/dist/xlsx/read/header-footer-images.d.ts +5 -0
- package/dist/xlsx/read/header-footer-images.d.ts.map +1 -0
- package/dist/xlsx/read/load.d.ts.map +1 -1
- package/dist/xlsx/read/shape.d.ts +5 -0
- package/dist/xlsx/read/shape.d.ts.map +1 -0
- package/dist/xlsx/read/sheet-data.d.ts.map +1 -1
- package/dist/xlsx/read/workbook-part.d.ts +5 -1
- package/dist/xlsx/read/workbook-part.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet-children.d.ts +3 -0
- package/dist/xlsx/read/worksheet-children.d.ts.map +1 -0
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/sparklines.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/what-if.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/what-if.d.ts +0 -1
- package/dist/xlsx/ui/commands/what-if.d.ts.map +1 -1
- package/dist/xlsx/ui/dialogs/forecast-sheet.d.ts +51 -0
- package/dist/xlsx/ui/dialogs/forecast-sheet.d.ts.map +1 -0
- package/dist/xlsx/ui/dialogs/scenario-summary.d.ts +15 -0
- package/dist/xlsx/ui/dialogs/scenario-summary.d.ts.map +1 -0
- package/dist/xlsx/ui/index.cjs +5088 -2399
- package/dist/xlsx/ui/index.d.ts +2 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +5081 -2398
- package/dist/xlsx/ui/locales/de/grid.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/en/grid.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/es/grid.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/fr/grid.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/zh-CN/grid.d.ts.map +1 -1
- package/dist/xlsx/write/custom-views.d.ts +4 -0
- package/dist/xlsx/write/custom-views.d.ts.map +1 -0
- package/dist/xlsx/write/drawing.d.ts.map +1 -1
- package/dist/xlsx/write/form-control.d.ts +4 -0
- package/dist/xlsx/write/form-control.d.ts.map +1 -0
- package/dist/xlsx/write/sheet-data.d.ts.map +1 -1
- package/dist/xlsx/write/workbook-part.d.ts.map +1 -1
- package/dist/xlsx/write/worksheet.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/PptxHandler-E4DDV3FQ.mjs +0 -4
- package/dist/pptx/chunks/index-PdM5zpmu.d.ts.map +0 -1
package/dist/docx/ui/index.mjs
CHANGED
|
@@ -11454,7 +11454,8 @@ var pie = {
|
|
|
11454
11454
|
gd16("stAng", "pin 0 adj1 21599999"),
|
|
11455
11455
|
gd16("endAng", "pin 0 adj2 21599999"),
|
|
11456
11456
|
gd16("swAng", "+- endAng 0 stAng"),
|
|
11457
|
-
gd16("
|
|
11457
|
+
gd16("swAngWrap", "+- swAng 21600000 0"),
|
|
11458
|
+
gd16("swAng2", "?: swAng swAng swAngWrap"),
|
|
11458
11459
|
gd16("stx", "cos wd2 stAng"),
|
|
11459
11460
|
gd16("sty", "sin hd2 stAng"),
|
|
11460
11461
|
gd16("x1", "+- hc stx 0"),
|
|
@@ -11499,7 +11500,8 @@ var chord = {
|
|
|
11499
11500
|
gd16("stAng", "pin 0 adj1 21599999"),
|
|
11500
11501
|
gd16("endAng", "pin 0 adj2 21599999"),
|
|
11501
11502
|
gd16("swAng", "+- endAng 0 stAng"),
|
|
11502
|
-
gd16("
|
|
11503
|
+
gd16("swAngWrap", "+- swAng 21600000 0"),
|
|
11504
|
+
gd16("swAng2", "?: swAng swAng swAngWrap"),
|
|
11503
11505
|
gd16("stx", "cos wd2 stAng"),
|
|
11504
11506
|
gd16("sty", "sin hd2 stAng"),
|
|
11505
11507
|
gd16("x1", "+- hc stx 0"),
|
|
@@ -11523,7 +11525,8 @@ var arc = {
|
|
|
11523
11525
|
gd16("stAng", "pin 0 adj1 21599999"),
|
|
11524
11526
|
gd16("endAng", "pin 0 adj2 21599999"),
|
|
11525
11527
|
gd16("swAng", "+- endAng 0 stAng"),
|
|
11526
|
-
gd16("
|
|
11528
|
+
gd16("swAngWrap", "+- swAng 21600000 0"),
|
|
11529
|
+
gd16("swAng2", "?: swAng swAng swAngWrap"),
|
|
11527
11530
|
gd16("stx", "cos wd2 stAng"),
|
|
11528
11531
|
gd16("sty", "sin hd2 stAng"),
|
|
11529
11532
|
gd16("x1", "+- hc stx 0"),
|
|
@@ -11618,7 +11621,8 @@ var blockArc = {
|
|
|
11618
11621
|
gd16("iwd2", "+- wd2 0 thw"),
|
|
11619
11622
|
gd16("ihd2", "+- hd2 0 thh2"),
|
|
11620
11623
|
gd16("swAng", "+- endAng 0 stAng"),
|
|
11621
|
-
gd16("
|
|
11624
|
+
gd16("swAngWrap", "+- swAng 21600000 0"),
|
|
11625
|
+
gd16("swAng2", "?: swAng swAng swAngWrap"),
|
|
11622
11626
|
gd16("mswAng", "+- 0 0 swAng2"),
|
|
11623
11627
|
gd16("stx", "cos wd2 stAng"),
|
|
11624
11628
|
gd16("sty", "sin hd2 stAng"),
|
|
@@ -25579,6 +25583,34 @@ function chartRun(doc, node, image, base, oldDrawing, oldContainer, allocator) {
|
|
|
25579
25583
|
return void 0;
|
|
25580
25584
|
}
|
|
25581
25585
|
|
|
25586
|
+
// docx/write-fallback.ts
|
|
25587
|
+
var PT_PER_PX2 = 0.75;
|
|
25588
|
+
function setStyleSize(style, name, pt) {
|
|
25589
|
+
const value = `${Math.round(pt * 100) / 100}pt`;
|
|
25590
|
+
const pattern = new RegExp(`(^|;)\\s*${name}\\s*:\\s*[^;]*`, "i");
|
|
25591
|
+
return pattern.test(style) ? style.replace(pattern, (_all, lead) => `${lead}${name}:${value}`) : style;
|
|
25592
|
+
}
|
|
25593
|
+
function patchFallbackSize(content, image, base) {
|
|
25594
|
+
if (!base || image.widthPx === base.widthPx && image.heightPx === base.heightPx) return;
|
|
25595
|
+
const fallback = Array.from(content.childNodes).filter(isElement).find((node) => node.localName === "Fallback");
|
|
25596
|
+
if (!fallback) return;
|
|
25597
|
+
const stack = [fallback];
|
|
25598
|
+
while (stack.length) {
|
|
25599
|
+
const node = stack.pop();
|
|
25600
|
+
const style = node.getAttribute("style");
|
|
25601
|
+
if (style && /(^|;)\s*width\s*:/i.test(style)) {
|
|
25602
|
+
let next = style;
|
|
25603
|
+
if (image.widthPx !== base.widthPx)
|
|
25604
|
+
next = setStyleSize(next, "width", image.widthPx * PT_PER_PX2);
|
|
25605
|
+
if (image.heightPx !== base.heightPx)
|
|
25606
|
+
next = setStyleSize(next, "height", image.heightPx * PT_PER_PX2);
|
|
25607
|
+
node.setAttribute("style", next);
|
|
25608
|
+
continue;
|
|
25609
|
+
}
|
|
25610
|
+
for (const child3 of Array.from(node.childNodes)) if (isElement(child3)) stack.push(child3);
|
|
25611
|
+
}
|
|
25612
|
+
}
|
|
25613
|
+
|
|
25582
25614
|
// docx/chart-ex-edit.ts
|
|
25583
25615
|
function isDocxChartExEditable(chart) {
|
|
25584
25616
|
return !!chart?.chartExSpace && chart.issues.every((issue) => issue.code === "CHARTEX_FAMILY_NOT_DRAWN");
|
|
@@ -25663,6 +25695,13 @@ function createImageRun(doc, image, base, old, allocator) {
|
|
|
25663
25695
|
}
|
|
25664
25696
|
if (base && oldDrawing && image.shape?.editable && base.shape?.editable) {
|
|
25665
25697
|
const next = rebuildShapeDrawing(doc, image, oldDrawing);
|
|
25698
|
+
const choice = oldDrawing.parentNode;
|
|
25699
|
+
if (oldContainer?.localName === "AlternateContent" && choice) {
|
|
25700
|
+
choice.replaceChild(next, oldDrawing);
|
|
25701
|
+
patchFallbackSize(oldContainer, image, base);
|
|
25702
|
+
clearNonProperties(node, oldContainer);
|
|
25703
|
+
return node;
|
|
25704
|
+
}
|
|
25666
25705
|
clearNonProperties(node);
|
|
25667
25706
|
node.appendChild(next);
|
|
25668
25707
|
return node;
|
|
@@ -26495,6 +26534,10 @@ function parseFormatting(pPr) {
|
|
|
26495
26534
|
const line3 = signedTwipValue(getW(spacing2, "line"));
|
|
26496
26535
|
if (before !== void 0) result.spacingBeforeTwips = before;
|
|
26497
26536
|
if (after !== void 0) result.spacingAfterTwips = after;
|
|
26537
|
+
const beforeAuto = parseOnOff(getW(spacing2, "beforeAutospacing"));
|
|
26538
|
+
const afterAuto = parseOnOff(getW(spacing2, "afterAutospacing"));
|
|
26539
|
+
if (beforeAuto !== void 0) result.spacingBeforeAuto = beforeAuto;
|
|
26540
|
+
if (afterAuto !== void 0) result.spacingAfterAuto = afterAuto;
|
|
26498
26541
|
if (line3 !== void 0) result.lineSpacingTwips = line3;
|
|
26499
26542
|
const rule = getW(spacing2, "lineRule");
|
|
26500
26543
|
if (rule === "auto" || rule === "exact" || rule === "atLeast") result.lineSpacingRule = rule;
|
|
@@ -26736,6 +26779,253 @@ function resolveTableStyleFormatting(tableStyleId, catalog, look, rowIndex, rowC
|
|
|
26736
26779
|
return result;
|
|
26737
26780
|
}
|
|
26738
26781
|
|
|
26782
|
+
// docx/tab-stops.ts
|
|
26783
|
+
function parseTabStops(tabs) {
|
|
26784
|
+
const stops = [];
|
|
26785
|
+
for (const tab of tabs ? children2(tabs, "tab") : []) {
|
|
26786
|
+
const align = enumValue(isStTabJc, getW(tab, "val"));
|
|
26787
|
+
const pos = parseSignedTwips(getW(tab, "pos"));
|
|
26788
|
+
if (!align || pos === void 0) continue;
|
|
26789
|
+
const leader = enumValue(isStTabTlc, getW(tab, "leader"));
|
|
26790
|
+
stops.push({ posTwips: pos, align, ...leader ? { leader } : {} });
|
|
26791
|
+
}
|
|
26792
|
+
return stops;
|
|
26793
|
+
}
|
|
26794
|
+
function writeTabStops(doc, props, paragraph, base) {
|
|
26795
|
+
if (base && JSON.stringify(paragraph.tabStops ?? []) === JSON.stringify(base.tabStops ?? []))
|
|
26796
|
+
return;
|
|
26797
|
+
for (const tabs2 of children2(props, "tabs")) props.removeChild(tabs2);
|
|
26798
|
+
if (!paragraph.tabStops?.length) return;
|
|
26799
|
+
const tabs = makeW(doc, "tabs");
|
|
26800
|
+
for (const stop of paragraph.tabStops) {
|
|
26801
|
+
const tab = makeW(doc, "tab");
|
|
26802
|
+
tab.setAttributeNS(WORD_NS, "w:val", stop.align);
|
|
26803
|
+
if (stop.leader) tab.setAttributeNS(WORD_NS, "w:leader", stop.leader);
|
|
26804
|
+
tab.setAttributeNS(WORD_NS, "w:pos", String(stop.posTwips));
|
|
26805
|
+
tabs.appendChild(tab);
|
|
26806
|
+
}
|
|
26807
|
+
props.appendChild(tabs);
|
|
26808
|
+
}
|
|
26809
|
+
var PPR_ORDER = [
|
|
26810
|
+
"pStyle",
|
|
26811
|
+
"keepNext",
|
|
26812
|
+
"keepLines",
|
|
26813
|
+
"pageBreakBefore",
|
|
26814
|
+
"framePr",
|
|
26815
|
+
"widowControl",
|
|
26816
|
+
"numPr",
|
|
26817
|
+
"suppressLineNumbers",
|
|
26818
|
+
"pBdr",
|
|
26819
|
+
"shd",
|
|
26820
|
+
"tabs",
|
|
26821
|
+
"suppressAutoHyphens",
|
|
26822
|
+
"kinsoku",
|
|
26823
|
+
"wordWrap",
|
|
26824
|
+
"overflowPunct",
|
|
26825
|
+
"topLinePunct",
|
|
26826
|
+
"autoSpaceDE",
|
|
26827
|
+
"autoSpaceDN",
|
|
26828
|
+
"bidi",
|
|
26829
|
+
"adjustRightInd",
|
|
26830
|
+
"snapToGrid",
|
|
26831
|
+
"spacing",
|
|
26832
|
+
"ind",
|
|
26833
|
+
"contextualSpacing",
|
|
26834
|
+
"mirrorIndents",
|
|
26835
|
+
"suppressOverlap",
|
|
26836
|
+
"jc",
|
|
26837
|
+
"textDirection",
|
|
26838
|
+
"textAlignment",
|
|
26839
|
+
"textboxTightWrap",
|
|
26840
|
+
"outlineLvl",
|
|
26841
|
+
"divId",
|
|
26842
|
+
"cnfStyle",
|
|
26843
|
+
"rPr",
|
|
26844
|
+
"sectPr",
|
|
26845
|
+
"pPrChange"
|
|
26846
|
+
];
|
|
26847
|
+
function orderParagraphProperties(props) {
|
|
26848
|
+
orderChildren(props, PPR_ORDER);
|
|
26849
|
+
}
|
|
26850
|
+
|
|
26851
|
+
// docx/write-paragraph-decoration.ts
|
|
26852
|
+
var SIDES4 = ["top", "left", "bottom", "right", "between"];
|
|
26853
|
+
function wordColor(color) {
|
|
26854
|
+
const hex = /^#?([0-9a-f]{6})$/i.exec(color ?? "")?.[1];
|
|
26855
|
+
return hex ? hex.toUpperCase() : "auto";
|
|
26856
|
+
}
|
|
26857
|
+
function borderElement(doc, name, side) {
|
|
26858
|
+
const element3 = makeW(doc, name);
|
|
26859
|
+
const set = (local, value) => element3.setAttributeNS(WORD_NS, `w:${local}`, value);
|
|
26860
|
+
set("val", side.style ?? "single");
|
|
26861
|
+
if (side.style !== "none" && side.style !== "nil") {
|
|
26862
|
+
set("sz", String(side.sizeEighthPoints ?? 4));
|
|
26863
|
+
set("space", String(side.spacePoints ?? 1));
|
|
26864
|
+
set("color", wordColor(side.color));
|
|
26865
|
+
if (side.themeColor) set("themeColor", side.themeColor);
|
|
26866
|
+
}
|
|
26867
|
+
return element3;
|
|
26868
|
+
}
|
|
26869
|
+
var sameJson = (a, b) => JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
|
|
26870
|
+
function updateShading(doc, props, paragraph, base) {
|
|
26871
|
+
if (base && paragraph.shadingFill === base.shadingFill) return;
|
|
26872
|
+
for (const element3 of children2(props, "shd")) props.removeChild(element3);
|
|
26873
|
+
if (!paragraph.shadingFill) return;
|
|
26874
|
+
const shd = makeW(doc, "shd");
|
|
26875
|
+
shd.setAttributeNS(WORD_NS, "w:val", "clear");
|
|
26876
|
+
shd.setAttributeNS(WORD_NS, "w:color", "auto");
|
|
26877
|
+
shd.setAttributeNS(WORD_NS, "w:fill", wordColor(paragraph.shadingFill));
|
|
26878
|
+
props.appendChild(shd);
|
|
26879
|
+
}
|
|
26880
|
+
function updateBorders(doc, props, paragraph, base) {
|
|
26881
|
+
if (base && sameJson(paragraph.borders, base.borders)) return;
|
|
26882
|
+
for (const element3 of children2(props, "pBdr")) props.removeChild(element3);
|
|
26883
|
+
const borders = paragraph.borders;
|
|
26884
|
+
if (!borders) return;
|
|
26885
|
+
const pBdr = makeW(doc, "pBdr");
|
|
26886
|
+
for (const side of SIDES4) {
|
|
26887
|
+
const value = borders[side];
|
|
26888
|
+
if (value) pBdr.appendChild(borderElement(doc, side, value));
|
|
26889
|
+
}
|
|
26890
|
+
if (pBdr.childNodes.length) props.appendChild(pBdr);
|
|
26891
|
+
}
|
|
26892
|
+
function writeParagraphDecoration(doc, props, paragraph, base) {
|
|
26893
|
+
updateShading(doc, props, paragraph, base);
|
|
26894
|
+
updateBorders(doc, props, paragraph, base);
|
|
26895
|
+
}
|
|
26896
|
+
|
|
26897
|
+
// docx/write-paragraph-properties.ts
|
|
26898
|
+
function setAttribute4(element3, local, value) {
|
|
26899
|
+
element3.setAttributeNS(WORD_NS, `w:${local}`, value);
|
|
26900
|
+
}
|
|
26901
|
+
function setWordValue(element3, local, value) {
|
|
26902
|
+
if (value === void 0) element3.removeAttributeNS(WORD_NS, local);
|
|
26903
|
+
else setAttribute4(element3, local, String(value));
|
|
26904
|
+
}
|
|
26905
|
+
function updateDirection(doc, props, paragraph, base) {
|
|
26906
|
+
if (base && paragraph.direction === base.direction) return;
|
|
26907
|
+
let bidi = first2(props, "bidi");
|
|
26908
|
+
if (paragraph.direction === void 0) {
|
|
26909
|
+
for (const element3 of children2(props, "bidi")) props.removeChild(element3);
|
|
26910
|
+
} else {
|
|
26911
|
+
if (!bidi) {
|
|
26912
|
+
bidi = makeW(doc, "bidi");
|
|
26913
|
+
props.appendChild(bidi);
|
|
26914
|
+
}
|
|
26915
|
+
setAttribute4(bidi, "val", paragraph.direction === "rtl" ? "1" : "0");
|
|
26916
|
+
}
|
|
26917
|
+
}
|
|
26918
|
+
function updateSpacing(doc, props, paragraph, base) {
|
|
26919
|
+
let spacing2 = first2(props, "spacing");
|
|
26920
|
+
if (!spacing2) {
|
|
26921
|
+
spacing2 = makeW(doc, "spacing");
|
|
26922
|
+
props.appendChild(spacing2);
|
|
26923
|
+
}
|
|
26924
|
+
if (!base || paragraph.spacingBeforeTwips !== base.spacingBeforeTwips)
|
|
26925
|
+
setWordValue(spacing2, "before", paragraph.spacingBeforeTwips);
|
|
26926
|
+
if (!base || paragraph.spacingAfterTwips !== base.spacingAfterTwips)
|
|
26927
|
+
setWordValue(spacing2, "after", paragraph.spacingAfterTwips);
|
|
26928
|
+
if (!base || paragraph.lineSpacingTwips !== base.lineSpacingTwips || paragraph.lineSpacingRule !== base.lineSpacingRule) {
|
|
26929
|
+
setWordValue(spacing2, "line", paragraph.lineSpacingTwips);
|
|
26930
|
+
setWordValue(
|
|
26931
|
+
spacing2,
|
|
26932
|
+
"lineRule",
|
|
26933
|
+
paragraph.lineSpacingRule ?? (paragraph.lineSpacingTwips === void 0 ? void 0 : "auto")
|
|
26934
|
+
);
|
|
26935
|
+
}
|
|
26936
|
+
if (!spacing2.attributes.length && !spacing2.childNodes.length) props.removeChild(spacing2);
|
|
26937
|
+
}
|
|
26938
|
+
function updateIndent(doc, props, paragraph, base) {
|
|
26939
|
+
let indent = first2(props, "ind");
|
|
26940
|
+
if (!indent) {
|
|
26941
|
+
indent = makeW(doc, "ind");
|
|
26942
|
+
props.appendChild(indent);
|
|
26943
|
+
}
|
|
26944
|
+
if (!base || paragraph.indentLeftTwips !== base.indentLeftTwips)
|
|
26945
|
+
setWordValue(indent, "left", paragraph.indentLeftTwips);
|
|
26946
|
+
if (!base || paragraph.indentRightTwips !== base.indentRightTwips)
|
|
26947
|
+
setWordValue(indent, "right", paragraph.indentRightTwips);
|
|
26948
|
+
if (!base || paragraph.indentStartTwips !== base.indentStartTwips)
|
|
26949
|
+
setWordValue(indent, "start", paragraph.indentStartTwips);
|
|
26950
|
+
if (!base || paragraph.indentEndTwips !== base.indentEndTwips)
|
|
26951
|
+
setWordValue(indent, "end", paragraph.indentEndTwips);
|
|
26952
|
+
if (!base || paragraph.firstLineTwips !== base.firstLineTwips)
|
|
26953
|
+
setWordValue(indent, "firstLine", paragraph.firstLineTwips);
|
|
26954
|
+
if (!base || paragraph.hangingTwips !== base.hangingTwips)
|
|
26955
|
+
setWordValue(indent, "hanging", paragraph.hangingTwips);
|
|
26956
|
+
if (!indent.attributes.length) props.removeChild(indent);
|
|
26957
|
+
}
|
|
26958
|
+
function updatePageBreakBefore(doc, props, paragraph, base) {
|
|
26959
|
+
if (base && paragraph.pageBreakBefore === base.pageBreakBefore) return;
|
|
26960
|
+
for (const element3 of children2(props, "pageBreakBefore")) props.removeChild(element3);
|
|
26961
|
+
if (paragraph.pageBreakBefore !== void 0) {
|
|
26962
|
+
const element3 = makeW(doc, "pageBreakBefore");
|
|
26963
|
+
if (!paragraph.pageBreakBefore) element3.setAttributeNS(WORD_NS, "w:val", "0");
|
|
26964
|
+
props.appendChild(element3);
|
|
26965
|
+
}
|
|
26966
|
+
}
|
|
26967
|
+
function updateKeepOptions(doc, props, paragraph, base) {
|
|
26968
|
+
for (const key of [
|
|
26969
|
+
"keepNext",
|
|
26970
|
+
"keepLines",
|
|
26971
|
+
"widowControl",
|
|
26972
|
+
"contextualSpacing",
|
|
26973
|
+
"suppressLineNumbers"
|
|
26974
|
+
]) {
|
|
26975
|
+
if (base && paragraph[key] === base[key]) continue;
|
|
26976
|
+
for (const element4 of children2(props, key)) props.removeChild(element4);
|
|
26977
|
+
const value = paragraph[key];
|
|
26978
|
+
if (value === void 0) continue;
|
|
26979
|
+
const element3 = makeW(doc, key);
|
|
26980
|
+
if (!value) setAttribute4(element3, "val", "0");
|
|
26981
|
+
props.appendChild(element3);
|
|
26982
|
+
}
|
|
26983
|
+
}
|
|
26984
|
+
function updateDropCap(doc, props, paragraph, base) {
|
|
26985
|
+
if (base && JSON.stringify(paragraph.dropCap) === JSON.stringify(base.dropCap)) return;
|
|
26986
|
+
let frame2 = first2(props, "framePr");
|
|
26987
|
+
const cap = paragraph.dropCap;
|
|
26988
|
+
if (!cap) {
|
|
26989
|
+
if (frame2) props.removeChild(frame2);
|
|
26990
|
+
return;
|
|
26991
|
+
}
|
|
26992
|
+
if (!frame2) {
|
|
26993
|
+
frame2 = makeW(doc, "framePr");
|
|
26994
|
+
props.appendChild(frame2);
|
|
26995
|
+
setAttribute4(frame2, "wrap", "around");
|
|
26996
|
+
setAttribute4(frame2, "vAnchor", "text");
|
|
26997
|
+
setAttribute4(frame2, "hAnchor", "text");
|
|
26998
|
+
}
|
|
26999
|
+
setAttribute4(frame2, "dropCap", cap.style);
|
|
27000
|
+
setAttribute4(frame2, "lines", String(cap.lines));
|
|
27001
|
+
setWordValue(frame2, "hSpace", cap.distanceTwips);
|
|
27002
|
+
}
|
|
27003
|
+
function writeParagraphProperties(doc, props, paragraph, base) {
|
|
27004
|
+
updatePageBreakBefore(doc, props, paragraph, base);
|
|
27005
|
+
updateKeepOptions(doc, props, paragraph, base);
|
|
27006
|
+
updateDropCap(doc, props, paragraph, base);
|
|
27007
|
+
updateDirection(doc, props, paragraph, base);
|
|
27008
|
+
writeParagraphDecoration(doc, props, paragraph, base);
|
|
27009
|
+
const spacingKeys = [
|
|
27010
|
+
"spacingBeforeTwips",
|
|
27011
|
+
"spacingAfterTwips",
|
|
27012
|
+
"lineSpacingTwips",
|
|
27013
|
+
"lineSpacingRule"
|
|
27014
|
+
];
|
|
27015
|
+
if (!base || spacingKeys.some((key) => paragraph[key] !== base[key]))
|
|
27016
|
+
updateSpacing(doc, props, paragraph, base);
|
|
27017
|
+
const indentKeys = [
|
|
27018
|
+
"indentLeftTwips",
|
|
27019
|
+
"indentRightTwips",
|
|
27020
|
+
"indentStartTwips",
|
|
27021
|
+
"indentEndTwips",
|
|
27022
|
+
"firstLineTwips",
|
|
27023
|
+
"hangingTwips"
|
|
27024
|
+
];
|
|
27025
|
+
if (!base || indentKeys.some((key) => paragraph[key] !== base[key]))
|
|
27026
|
+
updateIndent(doc, props, paragraph, base);
|
|
27027
|
+
}
|
|
27028
|
+
|
|
26739
27029
|
// docx/content-control.ts
|
|
26740
27030
|
var WORD_2012_NS = "http://schemas.microsoft.com/office/word/2012/wordml";
|
|
26741
27031
|
var sdtContent = (sdt) => first2(sdt, "sdtContent");
|
|
@@ -27187,20 +27477,20 @@ function rangeKeys(run) {
|
|
|
27187
27477
|
}
|
|
27188
27478
|
|
|
27189
27479
|
// docx/write-comments.ts
|
|
27190
|
-
function
|
|
27480
|
+
function setAttribute5(element3, local, value) {
|
|
27191
27481
|
element3.setAttributeNS(WORD_NS, `w:${local}`, value);
|
|
27192
27482
|
}
|
|
27193
27483
|
function commentRangeStartNode(doc, id) {
|
|
27194
27484
|
const element3 = makeW(doc, "commentRangeStart");
|
|
27195
|
-
|
|
27485
|
+
setAttribute5(element3, "id", id);
|
|
27196
27486
|
return element3;
|
|
27197
27487
|
}
|
|
27198
27488
|
function commentRangeEndNodes(doc, id) {
|
|
27199
27489
|
const end = makeW(doc, "commentRangeEnd");
|
|
27200
|
-
|
|
27490
|
+
setAttribute5(end, "id", id);
|
|
27201
27491
|
const run = makeW(doc, "r");
|
|
27202
27492
|
const reference = makeW(doc, "commentReference");
|
|
27203
|
-
|
|
27493
|
+
setAttribute5(reference, "id", id);
|
|
27204
27494
|
run.appendChild(reference);
|
|
27205
27495
|
return [end, run];
|
|
27206
27496
|
}
|
|
@@ -27256,79 +27546,68 @@ function rangeEdges(runs, ranges) {
|
|
|
27256
27546
|
}
|
|
27257
27547
|
{
|
|
27258
27548
|
const index = last.get(key);
|
|
27259
|
-
(closes.get(index) ?? closes.set(index, []).get(index)).push(edgeFor(key, index));
|
|
27260
|
-
}
|
|
27261
|
-
}
|
|
27262
|
-
return { opens, closes };
|
|
27263
|
-
}
|
|
27264
|
-
|
|
27265
|
-
// docx/
|
|
27266
|
-
|
|
27267
|
-
|
|
27268
|
-
|
|
27269
|
-
|
|
27270
|
-
|
|
27271
|
-
|
|
27272
|
-
|
|
27273
|
-
|
|
27274
|
-
|
|
27275
|
-
|
|
27276
|
-
|
|
27277
|
-
|
|
27278
|
-
|
|
27279
|
-
|
|
27280
|
-
|
|
27281
|
-
|
|
27282
|
-
|
|
27283
|
-
|
|
27284
|
-
|
|
27285
|
-
|
|
27286
|
-
|
|
27287
|
-
|
|
27288
|
-
|
|
27289
|
-
|
|
27290
|
-
|
|
27291
|
-
|
|
27292
|
-
|
|
27293
|
-
|
|
27294
|
-
|
|
27295
|
-
|
|
27296
|
-
|
|
27297
|
-
|
|
27298
|
-
|
|
27299
|
-
|
|
27300
|
-
|
|
27301
|
-
"
|
|
27302
|
-
|
|
27303
|
-
|
|
27304
|
-
|
|
27305
|
-
|
|
27306
|
-
|
|
27307
|
-
|
|
27308
|
-
|
|
27309
|
-
"
|
|
27310
|
-
|
|
27311
|
-
"
|
|
27312
|
-
|
|
27313
|
-
|
|
27314
|
-
|
|
27315
|
-
|
|
27316
|
-
|
|
27317
|
-
|
|
27318
|
-
|
|
27319
|
-
|
|
27320
|
-
|
|
27321
|
-
"textAlignment",
|
|
27322
|
-
"textboxTightWrap",
|
|
27323
|
-
"outlineLvl",
|
|
27324
|
-
"divId",
|
|
27325
|
-
"cnfStyle",
|
|
27326
|
-
"rPr",
|
|
27327
|
-
"sectPr",
|
|
27328
|
-
"pPrChange"
|
|
27329
|
-
];
|
|
27330
|
-
function orderParagraphProperties(props) {
|
|
27331
|
-
orderChildren(props, PPR_ORDER);
|
|
27549
|
+
(closes.get(index) ?? closes.set(index, []).get(index)).push(edgeFor(key, index));
|
|
27550
|
+
}
|
|
27551
|
+
}
|
|
27552
|
+
return { opens, closes };
|
|
27553
|
+
}
|
|
27554
|
+
|
|
27555
|
+
// docx/table-grid.ts
|
|
27556
|
+
var spanOf = (cell) => Math.max(1, cell.gridSpan ?? 1);
|
|
27557
|
+
function tableGrid(table) {
|
|
27558
|
+
const columns = table.grid?.length ?? sumSpans(table.rows[0]);
|
|
27559
|
+
if (!columns || !table.rows.length) return void 0;
|
|
27560
|
+
const rows2 = [];
|
|
27561
|
+
const cover = [];
|
|
27562
|
+
for (let row = 0; row < table.rows.length; row++) {
|
|
27563
|
+
const cells = table.rows[row] ?? [];
|
|
27564
|
+
if (!cells.length || sumSpans(cells) !== columns) return void 0;
|
|
27565
|
+
const placed = [];
|
|
27566
|
+
const line3 = new Array(columns);
|
|
27567
|
+
let col = 0;
|
|
27568
|
+
cells.forEach((cell, index) => {
|
|
27569
|
+
const entry = { cell, row, index, col, span: spanOf(cell) };
|
|
27570
|
+
for (let k = 0; k < entry.span; k++) line3[col + k] = entry;
|
|
27571
|
+
col += entry.span;
|
|
27572
|
+
placed.push(entry);
|
|
27573
|
+
});
|
|
27574
|
+
rows2.push(placed);
|
|
27575
|
+
cover.push(line3);
|
|
27576
|
+
}
|
|
27577
|
+
const grid = { columns, rows: rows2, cover };
|
|
27578
|
+
for (const entry of rows2.flat())
|
|
27579
|
+
if (entry.cell.verticalMerge === "continue") {
|
|
27580
|
+
const above = entry.row > 0 ? cover[entry.row - 1]?.[entry.col] : void 0;
|
|
27581
|
+
if (!above || above.col !== entry.col || above.span !== entry.span) return void 0;
|
|
27582
|
+
if (!above.cell.verticalMerge) return void 0;
|
|
27583
|
+
}
|
|
27584
|
+
return grid;
|
|
27585
|
+
}
|
|
27586
|
+
function sumSpans(cells) {
|
|
27587
|
+
return (cells ?? []).reduce((sum, cell) => sum + spanOf(cell), 0);
|
|
27588
|
+
}
|
|
27589
|
+
function mergeOrigin(grid, entry) {
|
|
27590
|
+
let current = entry;
|
|
27591
|
+
while (current.cell.verticalMerge === "continue" && current.row > 0) {
|
|
27592
|
+
const above = grid.cover[current.row - 1]?.[current.col];
|
|
27593
|
+
if (!above) break;
|
|
27594
|
+
current = above;
|
|
27595
|
+
}
|
|
27596
|
+
return current;
|
|
27597
|
+
}
|
|
27598
|
+
function rowSpanOf(grid, entry) {
|
|
27599
|
+
if (entry.cell.verticalMerge !== "restart") return 1;
|
|
27600
|
+
let height = 1;
|
|
27601
|
+
while (grid.cover[entry.row + height]?.[entry.col]?.cell.verticalMerge === "continue") height++;
|
|
27602
|
+
return height;
|
|
27603
|
+
}
|
|
27604
|
+
function continuationsOf(grid, entry) {
|
|
27605
|
+
const found = [];
|
|
27606
|
+
for (let r = entry.row + 1; ; r++) {
|
|
27607
|
+
const below = grid.cover[r]?.[entry.col];
|
|
27608
|
+
if (below?.cell.verticalMerge !== "continue") return found;
|
|
27609
|
+
found.push(below);
|
|
27610
|
+
}
|
|
27332
27611
|
}
|
|
27333
27612
|
|
|
27334
27613
|
// text/text-diff.ts
|
|
@@ -27804,184 +28083,6 @@ function restoreAnnotations(markers, before, after) {
|
|
|
27804
28083
|
}
|
|
27805
28084
|
}
|
|
27806
28085
|
|
|
27807
|
-
// docx/write-paragraph-decoration.ts
|
|
27808
|
-
var SIDES4 = ["top", "left", "bottom", "right", "between"];
|
|
27809
|
-
function wordColor(color) {
|
|
27810
|
-
const hex = /^#?([0-9a-f]{6})$/i.exec(color ?? "")?.[1];
|
|
27811
|
-
return hex ? hex.toUpperCase() : "auto";
|
|
27812
|
-
}
|
|
27813
|
-
function borderElement(doc, name, side) {
|
|
27814
|
-
const element3 = makeW(doc, name);
|
|
27815
|
-
const set = (local, value) => element3.setAttributeNS(WORD_NS, `w:${local}`, value);
|
|
27816
|
-
set("val", side.style ?? "single");
|
|
27817
|
-
if (side.style !== "none" && side.style !== "nil") {
|
|
27818
|
-
set("sz", String(side.sizeEighthPoints ?? 4));
|
|
27819
|
-
set("space", String(side.spacePoints ?? 1));
|
|
27820
|
-
set("color", wordColor(side.color));
|
|
27821
|
-
if (side.themeColor) set("themeColor", side.themeColor);
|
|
27822
|
-
}
|
|
27823
|
-
return element3;
|
|
27824
|
-
}
|
|
27825
|
-
var sameJson = (a, b) => JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
|
|
27826
|
-
function updateShading(doc, props, paragraph, base) {
|
|
27827
|
-
if (base && paragraph.shadingFill === base.shadingFill) return;
|
|
27828
|
-
for (const element3 of children2(props, "shd")) props.removeChild(element3);
|
|
27829
|
-
if (!paragraph.shadingFill) return;
|
|
27830
|
-
const shd = makeW(doc, "shd");
|
|
27831
|
-
shd.setAttributeNS(WORD_NS, "w:val", "clear");
|
|
27832
|
-
shd.setAttributeNS(WORD_NS, "w:color", "auto");
|
|
27833
|
-
shd.setAttributeNS(WORD_NS, "w:fill", wordColor(paragraph.shadingFill));
|
|
27834
|
-
props.appendChild(shd);
|
|
27835
|
-
}
|
|
27836
|
-
function updateBorders(doc, props, paragraph, base) {
|
|
27837
|
-
if (base && sameJson(paragraph.borders, base.borders)) return;
|
|
27838
|
-
for (const element3 of children2(props, "pBdr")) props.removeChild(element3);
|
|
27839
|
-
const borders = paragraph.borders;
|
|
27840
|
-
if (!borders) return;
|
|
27841
|
-
const pBdr = makeW(doc, "pBdr");
|
|
27842
|
-
for (const side of SIDES4) {
|
|
27843
|
-
const value = borders[side];
|
|
27844
|
-
if (value) pBdr.appendChild(borderElement(doc, side, value));
|
|
27845
|
-
}
|
|
27846
|
-
if (pBdr.childNodes.length) props.appendChild(pBdr);
|
|
27847
|
-
}
|
|
27848
|
-
function writeParagraphDecoration(doc, props, paragraph, base) {
|
|
27849
|
-
updateShading(doc, props, paragraph, base);
|
|
27850
|
-
updateBorders(doc, props, paragraph, base);
|
|
27851
|
-
}
|
|
27852
|
-
|
|
27853
|
-
// docx/write-paragraph-properties.ts
|
|
27854
|
-
function setAttribute5(element3, local, value) {
|
|
27855
|
-
element3.setAttributeNS(WORD_NS, `w:${local}`, value);
|
|
27856
|
-
}
|
|
27857
|
-
function setWordValue(element3, local, value) {
|
|
27858
|
-
if (value === void 0) element3.removeAttributeNS(WORD_NS, local);
|
|
27859
|
-
else setAttribute5(element3, local, String(value));
|
|
27860
|
-
}
|
|
27861
|
-
function updateDirection(doc, props, paragraph, base) {
|
|
27862
|
-
if (base && paragraph.direction === base.direction) return;
|
|
27863
|
-
let bidi = first2(props, "bidi");
|
|
27864
|
-
if (paragraph.direction === void 0) {
|
|
27865
|
-
for (const element3 of children2(props, "bidi")) props.removeChild(element3);
|
|
27866
|
-
} else {
|
|
27867
|
-
if (!bidi) {
|
|
27868
|
-
bidi = makeW(doc, "bidi");
|
|
27869
|
-
props.appendChild(bidi);
|
|
27870
|
-
}
|
|
27871
|
-
setAttribute5(bidi, "val", paragraph.direction === "rtl" ? "1" : "0");
|
|
27872
|
-
}
|
|
27873
|
-
}
|
|
27874
|
-
function updateSpacing(doc, props, paragraph, base) {
|
|
27875
|
-
let spacing2 = first2(props, "spacing");
|
|
27876
|
-
if (!spacing2) {
|
|
27877
|
-
spacing2 = makeW(doc, "spacing");
|
|
27878
|
-
props.appendChild(spacing2);
|
|
27879
|
-
}
|
|
27880
|
-
if (!base || paragraph.spacingBeforeTwips !== base.spacingBeforeTwips)
|
|
27881
|
-
setWordValue(spacing2, "before", paragraph.spacingBeforeTwips);
|
|
27882
|
-
if (!base || paragraph.spacingAfterTwips !== base.spacingAfterTwips)
|
|
27883
|
-
setWordValue(spacing2, "after", paragraph.spacingAfterTwips);
|
|
27884
|
-
if (!base || paragraph.lineSpacingTwips !== base.lineSpacingTwips || paragraph.lineSpacingRule !== base.lineSpacingRule) {
|
|
27885
|
-
setWordValue(spacing2, "line", paragraph.lineSpacingTwips);
|
|
27886
|
-
setWordValue(
|
|
27887
|
-
spacing2,
|
|
27888
|
-
"lineRule",
|
|
27889
|
-
paragraph.lineSpacingRule ?? (paragraph.lineSpacingTwips === void 0 ? void 0 : "auto")
|
|
27890
|
-
);
|
|
27891
|
-
}
|
|
27892
|
-
if (!spacing2.attributes.length && !spacing2.childNodes.length) props.removeChild(spacing2);
|
|
27893
|
-
}
|
|
27894
|
-
function updateIndent(doc, props, paragraph, base) {
|
|
27895
|
-
let indent = first2(props, "ind");
|
|
27896
|
-
if (!indent) {
|
|
27897
|
-
indent = makeW(doc, "ind");
|
|
27898
|
-
props.appendChild(indent);
|
|
27899
|
-
}
|
|
27900
|
-
if (!base || paragraph.indentLeftTwips !== base.indentLeftTwips)
|
|
27901
|
-
setWordValue(indent, "left", paragraph.indentLeftTwips);
|
|
27902
|
-
if (!base || paragraph.indentRightTwips !== base.indentRightTwips)
|
|
27903
|
-
setWordValue(indent, "right", paragraph.indentRightTwips);
|
|
27904
|
-
if (!base || paragraph.indentStartTwips !== base.indentStartTwips)
|
|
27905
|
-
setWordValue(indent, "start", paragraph.indentStartTwips);
|
|
27906
|
-
if (!base || paragraph.indentEndTwips !== base.indentEndTwips)
|
|
27907
|
-
setWordValue(indent, "end", paragraph.indentEndTwips);
|
|
27908
|
-
if (!base || paragraph.firstLineTwips !== base.firstLineTwips)
|
|
27909
|
-
setWordValue(indent, "firstLine", paragraph.firstLineTwips);
|
|
27910
|
-
if (!base || paragraph.hangingTwips !== base.hangingTwips)
|
|
27911
|
-
setWordValue(indent, "hanging", paragraph.hangingTwips);
|
|
27912
|
-
if (!indent.attributes.length) props.removeChild(indent);
|
|
27913
|
-
}
|
|
27914
|
-
function updatePageBreakBefore(doc, props, paragraph, base) {
|
|
27915
|
-
if (base && paragraph.pageBreakBefore === base.pageBreakBefore) return;
|
|
27916
|
-
for (const element3 of children2(props, "pageBreakBefore")) props.removeChild(element3);
|
|
27917
|
-
if (paragraph.pageBreakBefore !== void 0) {
|
|
27918
|
-
const element3 = makeW(doc, "pageBreakBefore");
|
|
27919
|
-
if (!paragraph.pageBreakBefore) element3.setAttributeNS(WORD_NS, "w:val", "0");
|
|
27920
|
-
props.appendChild(element3);
|
|
27921
|
-
}
|
|
27922
|
-
}
|
|
27923
|
-
function updateKeepOptions(doc, props, paragraph, base) {
|
|
27924
|
-
for (const key of [
|
|
27925
|
-
"keepNext",
|
|
27926
|
-
"keepLines",
|
|
27927
|
-
"widowControl",
|
|
27928
|
-
"contextualSpacing",
|
|
27929
|
-
"suppressLineNumbers"
|
|
27930
|
-
]) {
|
|
27931
|
-
if (base && paragraph[key] === base[key]) continue;
|
|
27932
|
-
for (const element4 of children2(props, key)) props.removeChild(element4);
|
|
27933
|
-
const value = paragraph[key];
|
|
27934
|
-
if (value === void 0) continue;
|
|
27935
|
-
const element3 = makeW(doc, key);
|
|
27936
|
-
if (!value) setAttribute5(element3, "val", "0");
|
|
27937
|
-
props.appendChild(element3);
|
|
27938
|
-
}
|
|
27939
|
-
}
|
|
27940
|
-
function updateDropCap(doc, props, paragraph, base) {
|
|
27941
|
-
if (base && JSON.stringify(paragraph.dropCap) === JSON.stringify(base.dropCap)) return;
|
|
27942
|
-
let frame2 = first2(props, "framePr");
|
|
27943
|
-
const cap = paragraph.dropCap;
|
|
27944
|
-
if (!cap) {
|
|
27945
|
-
if (frame2) props.removeChild(frame2);
|
|
27946
|
-
return;
|
|
27947
|
-
}
|
|
27948
|
-
if (!frame2) {
|
|
27949
|
-
frame2 = makeW(doc, "framePr");
|
|
27950
|
-
props.appendChild(frame2);
|
|
27951
|
-
setAttribute5(frame2, "wrap", "around");
|
|
27952
|
-
setAttribute5(frame2, "vAnchor", "text");
|
|
27953
|
-
setAttribute5(frame2, "hAnchor", "text");
|
|
27954
|
-
}
|
|
27955
|
-
setAttribute5(frame2, "dropCap", cap.style);
|
|
27956
|
-
setAttribute5(frame2, "lines", String(cap.lines));
|
|
27957
|
-
setWordValue(frame2, "hSpace", cap.distanceTwips);
|
|
27958
|
-
}
|
|
27959
|
-
function writeParagraphProperties(doc, props, paragraph, base) {
|
|
27960
|
-
updatePageBreakBefore(doc, props, paragraph, base);
|
|
27961
|
-
updateKeepOptions(doc, props, paragraph, base);
|
|
27962
|
-
updateDropCap(doc, props, paragraph, base);
|
|
27963
|
-
updateDirection(doc, props, paragraph, base);
|
|
27964
|
-
writeParagraphDecoration(doc, props, paragraph, base);
|
|
27965
|
-
const spacingKeys = [
|
|
27966
|
-
"spacingBeforeTwips",
|
|
27967
|
-
"spacingAfterTwips",
|
|
27968
|
-
"lineSpacingTwips",
|
|
27969
|
-
"lineSpacingRule"
|
|
27970
|
-
];
|
|
27971
|
-
if (!base || spacingKeys.some((key) => paragraph[key] !== base[key]))
|
|
27972
|
-
updateSpacing(doc, props, paragraph, base);
|
|
27973
|
-
const indentKeys = [
|
|
27974
|
-
"indentLeftTwips",
|
|
27975
|
-
"indentRightTwips",
|
|
27976
|
-
"indentStartTwips",
|
|
27977
|
-
"indentEndTwips",
|
|
27978
|
-
"firstLineTwips",
|
|
27979
|
-
"hangingTwips"
|
|
27980
|
-
];
|
|
27981
|
-
if (!base || indentKeys.some((key) => paragraph[key] !== base[key]))
|
|
27982
|
-
updateIndent(doc, props, paragraph, base);
|
|
27983
|
-
}
|
|
27984
|
-
|
|
27985
28086
|
// docx/bookmarks.ts
|
|
27986
28087
|
function reconcileBookmarks(doc, starts, ends, names, baseNames, nextId) {
|
|
27987
28088
|
const removedIds = /* @__PURE__ */ new Set();
|
|
@@ -28537,6 +28638,10 @@ function parseDirectParagraphProperties(props) {
|
|
|
28537
28638
|
const line3 = signedTwipValue2(getW(spacing2, "line"));
|
|
28538
28639
|
if (before !== void 0) paragraph.spacingBeforeTwips = before;
|
|
28539
28640
|
if (after !== void 0) paragraph.spacingAfterTwips = after;
|
|
28641
|
+
const beforeAuto = parseOnOff(getW(spacing2, "beforeAutospacing"));
|
|
28642
|
+
const afterAuto = parseOnOff(getW(spacing2, "afterAutospacing"));
|
|
28643
|
+
if (beforeAuto !== void 0) paragraph.spacingBeforeAuto = beforeAuto;
|
|
28644
|
+
if (afterAuto !== void 0) paragraph.spacingAfterAuto = afterAuto;
|
|
28540
28645
|
if (line3 !== void 0) {
|
|
28541
28646
|
paragraph.lineSpacingTwips = line3;
|
|
28542
28647
|
}
|
|
@@ -32176,6 +32281,7 @@ var DirtyState = class {
|
|
|
32176
32281
|
this.changed(dirty);
|
|
32177
32282
|
}
|
|
32178
32283
|
};
|
|
32284
|
+
var RESTRUCTURE_TABLE_META = "docx-restructure-table";
|
|
32179
32285
|
function tableStructureGuardPlugin() {
|
|
32180
32286
|
const cache = /* @__PURE__ */ new WeakMap();
|
|
32181
32287
|
const tables = (node) => {
|
|
@@ -32215,7 +32321,8 @@ function tableStructureGuardPlugin() {
|
|
|
32215
32321
|
};
|
|
32216
32322
|
return new Plugin({
|
|
32217
32323
|
filterTransaction(transaction, state) {
|
|
32218
|
-
if (!transaction.docChanged) return true;
|
|
32324
|
+
if (!transaction.docChanged || transaction.getMeta(RESTRUCTURE_TABLE_META)) return true;
|
|
32325
|
+
if (transaction.getMeta("history$")) return true;
|
|
32219
32326
|
const after = tables(transaction.doc);
|
|
32220
32327
|
for (const [id, before] of tables(state.doc)) {
|
|
32221
32328
|
if (before.attrs.structureEditable !== false) continue;
|
|
@@ -32227,6 +32334,345 @@ function tableStructureGuardPlugin() {
|
|
|
32227
32334
|
}
|
|
32228
32335
|
});
|
|
32229
32336
|
}
|
|
32337
|
+
|
|
32338
|
+
// docx/table-structure-cells.ts
|
|
32339
|
+
var PARAGRAPH_FORMAT_KEYS2 = [
|
|
32340
|
+
"style",
|
|
32341
|
+
"align",
|
|
32342
|
+
"justification",
|
|
32343
|
+
"direction",
|
|
32344
|
+
"spacingBeforeTwips",
|
|
32345
|
+
"spacingAfterTwips",
|
|
32346
|
+
"lineSpacingTwips",
|
|
32347
|
+
"lineSpacingRule",
|
|
32348
|
+
"indentLeftTwips",
|
|
32349
|
+
"indentRightTwips",
|
|
32350
|
+
"indentStartTwips",
|
|
32351
|
+
"indentEndTwips",
|
|
32352
|
+
"firstLineTwips",
|
|
32353
|
+
"hangingTwips"
|
|
32354
|
+
];
|
|
32355
|
+
function emptyParagraph(newId, like) {
|
|
32356
|
+
const paragraph = { type: "paragraph", id: newId(), runs: [{ text: "" }] };
|
|
32357
|
+
if (like) {
|
|
32358
|
+
const source = like;
|
|
32359
|
+
const target = paragraph;
|
|
32360
|
+
for (const key of PARAGRAPH_FORMAT_KEYS2)
|
|
32361
|
+
if (source[key] !== void 0) target[key] = source[key];
|
|
32362
|
+
}
|
|
32363
|
+
return paragraph;
|
|
32364
|
+
}
|
|
32365
|
+
function emptyCell(newId, like, span, width) {
|
|
32366
|
+
const cell = { paragraphs: [emptyParagraph(newId, like?.paragraphs[0])] };
|
|
32367
|
+
if (span > 1) cell.gridSpan = span;
|
|
32368
|
+
if (width !== void 0) cell.widthTwips = width;
|
|
32369
|
+
if (like) {
|
|
32370
|
+
if (like.verticalAlign) cell.verticalAlign = like.verticalAlign;
|
|
32371
|
+
if (like.shadingFill) cell.shadingFill = like.shadingFill;
|
|
32372
|
+
if (like.shadingThemeFill) cell.shadingThemeFill = structuredClone(like.shadingThemeFill);
|
|
32373
|
+
if (like.borders) cell.borders = structuredClone(like.borders);
|
|
32374
|
+
if (like.margins) cell.margins = structuredClone(like.margins);
|
|
32375
|
+
}
|
|
32376
|
+
return cell;
|
|
32377
|
+
}
|
|
32378
|
+
function copyTable(table) {
|
|
32379
|
+
return structuredClone(table);
|
|
32380
|
+
}
|
|
32381
|
+
function copiedRowProperties(table, from) {
|
|
32382
|
+
const { contentControl: _control, ...properties3 } = table.rowProperties?.[from] ?? {};
|
|
32383
|
+
return structuredClone(properties3);
|
|
32384
|
+
}
|
|
32385
|
+
function paddedRowProperties(table) {
|
|
32386
|
+
return Array.from(
|
|
32387
|
+
{ length: table.rows.length },
|
|
32388
|
+
(_, index) => table.rowProperties?.[index] ?? {}
|
|
32389
|
+
);
|
|
32390
|
+
}
|
|
32391
|
+
function storeRowProperties(table, properties3) {
|
|
32392
|
+
if (properties3.some((entry) => Object.keys(entry).length)) table.rowProperties = properties3;
|
|
32393
|
+
else delete table.rowProperties;
|
|
32394
|
+
}
|
|
32395
|
+
|
|
32396
|
+
// docx/table-structure.ts
|
|
32397
|
+
function normalizeMerges(table) {
|
|
32398
|
+
table.rows.forEach(
|
|
32399
|
+
(row, r) => row.forEach((cell, index) => {
|
|
32400
|
+
if (cell.verticalMerge !== "restart") return;
|
|
32401
|
+
const grid = tableGrid(table);
|
|
32402
|
+
const entry = grid?.rows[r]?.[index];
|
|
32403
|
+
if (grid && entry && !continuationsOf(grid, entry).length) delete cell.verticalMerge;
|
|
32404
|
+
})
|
|
32405
|
+
);
|
|
32406
|
+
}
|
|
32407
|
+
function insertRow(table, row, where, newId) {
|
|
32408
|
+
const grid = tableGrid(table);
|
|
32409
|
+
const reference = grid?.rows[row];
|
|
32410
|
+
if (!grid || !reference) return void 0;
|
|
32411
|
+
const at = where === "above" ? row : row + 1;
|
|
32412
|
+
const next = copyTable(table);
|
|
32413
|
+
const added = reference.map((entry) => {
|
|
32414
|
+
const cell = emptyCell(newId, entry.cell, entry.span, entry.cell.widthTwips);
|
|
32415
|
+
const following = grid.cover[at]?.[entry.col];
|
|
32416
|
+
if (following?.cell.verticalMerge === "continue" && following.span === entry.span)
|
|
32417
|
+
cell.verticalMerge = "continue";
|
|
32418
|
+
return cell;
|
|
32419
|
+
});
|
|
32420
|
+
const properties3 = paddedRowProperties(table);
|
|
32421
|
+
next.rows.splice(at, 0, added);
|
|
32422
|
+
properties3.splice(at, 0, copiedRowProperties(table, row));
|
|
32423
|
+
storeRowProperties(next, properties3);
|
|
32424
|
+
return next;
|
|
32425
|
+
}
|
|
32426
|
+
function deleteRow(table, row) {
|
|
32427
|
+
const grid = tableGrid(table);
|
|
32428
|
+
const cells = grid?.rows[row];
|
|
32429
|
+
if (!grid || !cells || table.rows.length < 2) return void 0;
|
|
32430
|
+
const next = copyTable(table);
|
|
32431
|
+
for (const entry of cells) {
|
|
32432
|
+
if (entry.cell.verticalMerge !== "restart") continue;
|
|
32433
|
+
const [first3] = continuationsOf(grid, entry);
|
|
32434
|
+
const promoted = first3 && next.rows[first3.row]?.[first3.index];
|
|
32435
|
+
if (promoted) promoted.verticalMerge = "restart";
|
|
32436
|
+
}
|
|
32437
|
+
const properties3 = paddedRowProperties(table);
|
|
32438
|
+
next.rows.splice(row, 1);
|
|
32439
|
+
properties3.splice(row, 1);
|
|
32440
|
+
storeRowProperties(next, properties3);
|
|
32441
|
+
normalizeMerges(next);
|
|
32442
|
+
return next;
|
|
32443
|
+
}
|
|
32444
|
+
var widthOf = (table, col) => table.grid?.[col];
|
|
32445
|
+
function insertColumn(table, col, where, newId) {
|
|
32446
|
+
const grid = tableGrid(table);
|
|
32447
|
+
if (!grid || col < 0 || col >= grid.columns) return void 0;
|
|
32448
|
+
const next = copyTable(table);
|
|
32449
|
+
const width = widthOf(table, col);
|
|
32450
|
+
for (let r = 0; r < grid.rows.length; r++) {
|
|
32451
|
+
const anchor = grid.cover[r]?.[col];
|
|
32452
|
+
const target = next.rows[r];
|
|
32453
|
+
if (!anchor || !target) return void 0;
|
|
32454
|
+
if (where === "left" && (anchor.col !== col || anchor.span > 1)) return void 0;
|
|
32455
|
+
const created = emptyCell(
|
|
32456
|
+
newId,
|
|
32457
|
+
anchor.cell,
|
|
32458
|
+
1,
|
|
32459
|
+
anchor.cell.widthTwips !== void 0 ? width : void 0
|
|
32460
|
+
);
|
|
32461
|
+
delete created.verticalMerge;
|
|
32462
|
+
target.splice(anchor.index + (where === "right" ? 1 : 0), 0, created);
|
|
32463
|
+
}
|
|
32464
|
+
if (next.grid && width !== void 0)
|
|
32465
|
+
next.grid.splice(col + (where === "right" ? 1 : 0), 0, width);
|
|
32466
|
+
return tableGrid(next) ? next : void 0;
|
|
32467
|
+
}
|
|
32468
|
+
function deleteColumns(table, first3, last) {
|
|
32469
|
+
const grid = tableGrid(table);
|
|
32470
|
+
if (!grid || first3 < 0 || last >= grid.columns || first3 > last) return void 0;
|
|
32471
|
+
if (last - first3 + 1 >= grid.columns) return void 0;
|
|
32472
|
+
const next = copyTable(table);
|
|
32473
|
+
for (let r = 0; r < grid.rows.length; r++) {
|
|
32474
|
+
const cells = grid.rows[r] ?? [];
|
|
32475
|
+
const inside = cells.filter(
|
|
32476
|
+
(entry) => entry.col <= last && entry.col + entry.span - 1 >= first3
|
|
32477
|
+
);
|
|
32478
|
+
if (inside.some((entry) => entry.col < first3 || entry.col + entry.span - 1 > last))
|
|
32479
|
+
return void 0;
|
|
32480
|
+
const kept = new Set(inside.map((entry) => entry.index));
|
|
32481
|
+
const target = next.rows[r];
|
|
32482
|
+
if (!target) return void 0;
|
|
32483
|
+
next.rows[r] = target.filter((_, index) => !kept.has(index));
|
|
32484
|
+
}
|
|
32485
|
+
if (next.grid) next.grid.splice(first3, last - first3 + 1);
|
|
32486
|
+
normalizeMerges(next);
|
|
32487
|
+
return tableGrid(next) ? next : void 0;
|
|
32488
|
+
}
|
|
32489
|
+
|
|
32490
|
+
// docx/table-structure-merge.ts
|
|
32491
|
+
var isEmpty = (paragraph) => paragraph.runs.every((run) => !run.text && !run.contentControl);
|
|
32492
|
+
var hasContent2 = (cell) => !(cell.paragraphs.length === 1 && cell.paragraphs.every(isEmpty)) || Boolean(cell.sourceBlocks?.some((block) => block.type === "table")) || Boolean(cell.nestedTables?.length);
|
|
32493
|
+
var sumWidths = (table, from, to) => table.grid ? table.grid.slice(from, to + 1).reduce((sum, w) => sum + w, 0) : void 0;
|
|
32494
|
+
function cellsWithin(grid, rect3) {
|
|
32495
|
+
const found = /* @__PURE__ */ new Set();
|
|
32496
|
+
for (let r = rect3.firstRow; r <= rect3.lastRow; r++)
|
|
32497
|
+
for (let c = rect3.firstCol; c <= rect3.lastCol; c++) {
|
|
32498
|
+
const entry = grid.cover[r]?.[c];
|
|
32499
|
+
if (!entry) return void 0;
|
|
32500
|
+
found.add(entry);
|
|
32501
|
+
}
|
|
32502
|
+
for (const entry of found) {
|
|
32503
|
+
if (entry.col < rect3.firstCol || entry.col + entry.span - 1 > rect3.lastCol) return void 0;
|
|
32504
|
+
const origin = entry.cell.verticalMerge === "continue" ? void 0 : entry;
|
|
32505
|
+
if (origin) {
|
|
32506
|
+
if (origin.row + rowSpanOf(grid, origin) - 1 > rect3.lastRow) return void 0;
|
|
32507
|
+
} else if (!found.has(grid.cover[entry.row - 1]?.[entry.col])) return void 0;
|
|
32508
|
+
}
|
|
32509
|
+
return [...found];
|
|
32510
|
+
}
|
|
32511
|
+
function closeRect(table, rect3) {
|
|
32512
|
+
const grid = tableGrid(table);
|
|
32513
|
+
if (!grid) return void 0;
|
|
32514
|
+
let current = { ...rect3 };
|
|
32515
|
+
for (let pass = 0; pass <= grid.columns + grid.rows.length; pass++) {
|
|
32516
|
+
let next = current;
|
|
32517
|
+
for (let r = current.firstRow; r <= current.lastRow; r++)
|
|
32518
|
+
for (let c = current.firstCol; c <= current.lastCol; c++) {
|
|
32519
|
+
const entry = grid.cover[r]?.[c];
|
|
32520
|
+
if (!entry) return void 0;
|
|
32521
|
+
const origin = mergeOrigin(grid, entry);
|
|
32522
|
+
next = {
|
|
32523
|
+
firstRow: Math.min(next.firstRow, origin.row),
|
|
32524
|
+
lastRow: Math.max(next.lastRow, origin.row + rowSpanOf(grid, origin) - 1),
|
|
32525
|
+
firstCol: Math.min(next.firstCol, origin.col),
|
|
32526
|
+
lastCol: Math.max(next.lastCol, origin.col + origin.span - 1)
|
|
32527
|
+
};
|
|
32528
|
+
}
|
|
32529
|
+
if (JSON.stringify(next) === JSON.stringify(current)) return current;
|
|
32530
|
+
current = next;
|
|
32531
|
+
}
|
|
32532
|
+
return current;
|
|
32533
|
+
}
|
|
32534
|
+
function mergeCells(table, rect3, newId) {
|
|
32535
|
+
const grid = tableGrid(table);
|
|
32536
|
+
if (!grid) return void 0;
|
|
32537
|
+
const within2 = cellsWithin(grid, rect3);
|
|
32538
|
+
if (!within2) return void 0;
|
|
32539
|
+
const origins = within2.filter((entry) => entry.cell.verticalMerge !== "continue").sort((a, b) => a.row - b.row || a.col - b.col);
|
|
32540
|
+
const [head, ...absorbed] = origins;
|
|
32541
|
+
if (!head || !absorbed.length) return void 0;
|
|
32542
|
+
if (absorbed.some((entry) => entry.cell.sourceBlocks?.length || entry.cell.nestedTables?.length))
|
|
32543
|
+
return void 0;
|
|
32544
|
+
const next = copyTable(table);
|
|
32545
|
+
const keep = next.rows[head.row]?.[head.index];
|
|
32546
|
+
if (!keep) return void 0;
|
|
32547
|
+
const paragraphs = [...keep.paragraphs];
|
|
32548
|
+
const extra = absorbed.flatMap(
|
|
32549
|
+
(entry) => hasContent2(entry.cell) ? entry.cell.paragraphs.filter((p) => !isEmpty(p)) : []
|
|
32550
|
+
);
|
|
32551
|
+
if (extra.length) {
|
|
32552
|
+
const lead = paragraphs.length === 1 && paragraphs.every(isEmpty) && !hasContent2(keep);
|
|
32553
|
+
keep.paragraphs = lead ? structuredClone(extra) : [...paragraphs, ...structuredClone(extra)];
|
|
32554
|
+
if (lead) keep.paragraphs = [...structuredClone(extra)];
|
|
32555
|
+
}
|
|
32556
|
+
const width = rect3.lastCol - rect3.firstCol + 1;
|
|
32557
|
+
if (width > 1) keep.gridSpan = width;
|
|
32558
|
+
else delete keep.gridSpan;
|
|
32559
|
+
const total = sumWidths(table, rect3.firstCol, rect3.lastCol);
|
|
32560
|
+
if (keep.widthTwips !== void 0 && total !== void 0) keep.widthTwips = total;
|
|
32561
|
+
if (rect3.lastRow > rect3.firstRow) keep.verticalMerge = "restart";
|
|
32562
|
+
else delete keep.verticalMerge;
|
|
32563
|
+
for (let r = rect3.firstRow; r <= rect3.lastRow; r++) {
|
|
32564
|
+
const row = next.rows[r];
|
|
32565
|
+
if (!row) continue;
|
|
32566
|
+
const source = grid.rows[r] ?? [];
|
|
32567
|
+
const inside = source.filter(
|
|
32568
|
+
(entry) => entry.col >= rect3.firstCol && entry.col + entry.span - 1 <= rect3.lastCol
|
|
32569
|
+
);
|
|
32570
|
+
const index = inside[0]?.index ?? 0;
|
|
32571
|
+
const replacement = r === rect3.firstRow ? keep : Object.assign(emptyCell(newId, keep, width, keep.widthTwips), {
|
|
32572
|
+
verticalMerge: "continue"
|
|
32573
|
+
});
|
|
32574
|
+
row.splice(index, inside.length, replacement);
|
|
32575
|
+
}
|
|
32576
|
+
normalizeMerges(next);
|
|
32577
|
+
return next;
|
|
32578
|
+
}
|
|
32579
|
+
function distribute(span, parts) {
|
|
32580
|
+
const base = Math.floor(span / parts);
|
|
32581
|
+
const rest = span % parts;
|
|
32582
|
+
return Array.from({ length: parts }, (_, i) => base + (i < rest ? 1 : 0));
|
|
32583
|
+
}
|
|
32584
|
+
function splitCell(table, row, index, rows2, columns, newId) {
|
|
32585
|
+
const grid = tableGrid(table);
|
|
32586
|
+
const origin = grid?.rows[row]?.[index];
|
|
32587
|
+
if (!grid || !origin || origin.cell.verticalMerge === "continue") return void 0;
|
|
32588
|
+
if (rows2 < 1 || columns < 1 || rows2 === 1 && columns === 1) return void 0;
|
|
32589
|
+
const height = rowSpanOf(grid, origin);
|
|
32590
|
+
if (height > 1 && rows2 !== height && !(rows2 === 1 && columns === 1)) return void 0;
|
|
32591
|
+
if (origin.span > 1 && columns !== origin.span && columns !== 1) return void 0;
|
|
32592
|
+
if (height > 1 && rows2 === 1 && columns > 1) return void 0;
|
|
32593
|
+
const next = copyTable(table);
|
|
32594
|
+
const members = [origin, ...continuationsOf(grid, origin)];
|
|
32595
|
+
const widths = table.grid ? table.grid.slice(origin.col, origin.col + origin.span) : [];
|
|
32596
|
+
const total = widths.reduce((sum, w) => sum + w, 0);
|
|
32597
|
+
const grow = columns > origin.span;
|
|
32598
|
+
const spans = grow ? Array.from({ length: columns }, () => 1) : distribute(origin.span, columns);
|
|
32599
|
+
const partWidth = (i) => {
|
|
32600
|
+
if (origin.cell.widthTwips === void 0 && !total) return void 0;
|
|
32601
|
+
if (grow) return Math.floor(total / columns);
|
|
32602
|
+
let from = origin.col + spans.slice(0, i).reduce((s, v) => s + v, 0);
|
|
32603
|
+
return sumWidths(table, from, from + (spans[i] ?? 1) - 1);
|
|
32604
|
+
};
|
|
32605
|
+
if (grow && next.grid) {
|
|
32606
|
+
const each = Array.from(
|
|
32607
|
+
{ length: columns },
|
|
32608
|
+
(_, i) => i === columns - 1 ? total - Math.floor(total / columns) * (columns - 1) : Math.floor(total / columns)
|
|
32609
|
+
);
|
|
32610
|
+
next.grid.splice(origin.col, 1, ...each);
|
|
32611
|
+
}
|
|
32612
|
+
if (grow)
|
|
32613
|
+
grid.rows.forEach((cells, r) => {
|
|
32614
|
+
if (members.some((m) => m.row === r)) return;
|
|
32615
|
+
const over = cells.find((e) => e.col <= origin.col && origin.col < e.col + e.span);
|
|
32616
|
+
const cell = over && next.rows[r]?.[over.index];
|
|
32617
|
+
if (cell) cell.gridSpan = (cell.gridSpan ?? 1) + columns - 1;
|
|
32618
|
+
});
|
|
32619
|
+
[...members].reverse().forEach((member) => {
|
|
32620
|
+
const target = next.rows[member.row];
|
|
32621
|
+
const cell = target?.[member.index];
|
|
32622
|
+
if (!target || !cell) return;
|
|
32623
|
+
const parts = spans.map((span, i) => {
|
|
32624
|
+
if (i === 0) return cell;
|
|
32625
|
+
const part = emptyCell(newId, cell, span, partWidth(i));
|
|
32626
|
+
if (cell.verticalMerge) part.verticalMerge = cell.verticalMerge;
|
|
32627
|
+
return part;
|
|
32628
|
+
});
|
|
32629
|
+
const own2 = member === origin ? [...cell.paragraphs] : [];
|
|
32630
|
+
if (rows2 === 1 && own2.length > 1)
|
|
32631
|
+
parts.forEach((part, i) => {
|
|
32632
|
+
const mine = i === parts.length - 1 ? own2.slice(i) : own2.slice(i, i + 1);
|
|
32633
|
+
if (mine.length) part.paragraphs = mine;
|
|
32634
|
+
});
|
|
32635
|
+
const first3 = parts[0];
|
|
32636
|
+
if (first3) {
|
|
32637
|
+
if ((spans[0] ?? 1) > 1) first3.gridSpan = spans[0] ?? 1;
|
|
32638
|
+
else delete first3.gridSpan;
|
|
32639
|
+
const w = partWidth(0);
|
|
32640
|
+
if (w !== void 0 && first3.widthTwips !== void 0) first3.widthTwips = w;
|
|
32641
|
+
}
|
|
32642
|
+
target.splice(member.index, 1, ...parts);
|
|
32643
|
+
});
|
|
32644
|
+
if (rows2 > 1) {
|
|
32645
|
+
if (height === 1) stackRows(next, grid, origin, rows2, columns, newId);
|
|
32646
|
+
else for (const member of members) uncouple(next, member, columns);
|
|
32647
|
+
}
|
|
32648
|
+
normalizeMerges(next);
|
|
32649
|
+
return next;
|
|
32650
|
+
}
|
|
32651
|
+
function uncouple(next, member, columns) {
|
|
32652
|
+
const row = next.rows[member.row];
|
|
32653
|
+
if (!row) return;
|
|
32654
|
+
for (let k = 0; k < columns; k++) delete row[member.index + k]?.verticalMerge;
|
|
32655
|
+
}
|
|
32656
|
+
function stackRows(next, grid, origin, rows2, columns, newId) {
|
|
32657
|
+
const source = next.rows[origin.row] ?? [];
|
|
32658
|
+
const splitStart = origin.index;
|
|
32659
|
+
const properties3 = paddedRowProperties(next);
|
|
32660
|
+
for (let step = 1; step < rows2; step++) {
|
|
32661
|
+
const added = source.map((cell, i) => {
|
|
32662
|
+
const own2 = i >= splitStart && i < splitStart + columns;
|
|
32663
|
+
const copy = emptyCell(newId, cell, cell.gridSpan ?? 1, cell.widthTwips);
|
|
32664
|
+
if (!own2) copy.verticalMerge = "continue";
|
|
32665
|
+
return copy;
|
|
32666
|
+
});
|
|
32667
|
+
next.rows.splice(origin.row + step, 0, added);
|
|
32668
|
+
properties3.splice(origin.row + step, 0, copiedRowProperties(next, origin.row));
|
|
32669
|
+
}
|
|
32670
|
+
source.forEach((cell, i) => {
|
|
32671
|
+
if (i >= splitStart && i < splitStart + columns) return;
|
|
32672
|
+
if (!cell.verticalMerge) cell.verticalMerge = "restart";
|
|
32673
|
+
});
|
|
32674
|
+
storeRowProperties(next, properties3);
|
|
32675
|
+
}
|
|
32230
32676
|
var SectionPartsStep = class _SectionPartsStep extends DocAttrStep {
|
|
32231
32677
|
constructor(value) {
|
|
32232
32678
|
super("sectionParts", value);
|
|
@@ -33472,6 +33918,8 @@ var RIBBON_ACTION_IDS = [
|
|
|
33472
33918
|
"insert-column-left",
|
|
33473
33919
|
"insert-column-right",
|
|
33474
33920
|
"delete-column",
|
|
33921
|
+
"merge-cells",
|
|
33922
|
+
"split-cells",
|
|
33475
33923
|
"delete-table",
|
|
33476
33924
|
"table-properties"
|
|
33477
33925
|
];
|
|
@@ -33667,6 +34115,8 @@ var RIBBON_ACTION_LABELS = {
|
|
|
33667
34115
|
"insert-column-left": "Insert column left",
|
|
33668
34116
|
"insert-column-right": "Insert column right",
|
|
33669
34117
|
"delete-column": "Delete column",
|
|
34118
|
+
"merge-cells": "Merge cells",
|
|
34119
|
+
"split-cells": "Split cells",
|
|
33670
34120
|
"delete-table": "Delete table",
|
|
33671
34121
|
"table-properties": "Table properties"
|
|
33672
34122
|
};
|
|
@@ -34639,4 +35089,4 @@ function formFieldGuardPlugin(protection) {
|
|
|
34639
35089
|
});
|
|
34640
35090
|
}
|
|
34641
35091
|
|
|
34642
|
-
export { CONTROL_EDIT_META, CollaborationAuthority, CollaborationClient, DirtyState, EDITOR_THEME_MODES, FIELD_RESULT_REPAIR_META, FORM_FIELD_EDIT_META, HEADER_FOOTER_INPUT, NotePartsStep, PAGE_GAP, PARAGRAPH_KEEP_KEYS, REMOTE_TRANSACTION_META, RIBBON_ACTION_IDS, RIBBON_ACTION_LABELS, SectionPartsStep, THEME_KEYS, WORD_CAPABILITY_ACTIONS, WORD_CAPABILITY_BACKSTAGE_PAGES, WORD_CAPABILITY_FILE_COMMANDS, WORD_CAPABILITY_IDS, WORD_CAPABILITY_MENU_ITEMS, WORD_CAPABILITY_SHORTCUTS, WordYjsCollaboration, WordYjsComments, WordYjsMedia, acceptAllChanges, acceptChangeAtCursor, acceptRevisionRange, addComment, appendInlineNode, applyMarkFormatting, applyRunFormattingPatch, applyThemeColors, applyWordLink, approximateDiagramDrawing, authorColor, backstageFocus, chartNodeSpec, chooseDate, chooseListItem, clearDirectRunFormatting, collectRevisionRanges, commentAnchors, commentHistoryAttributes, commentIdsAtSelection, commentIdsFromMarks, commentIdsFromNode, commentThreadsFromDoc, contentControlPlugin, controlAt, controlAtSelection, controlFromData, controlFromValue, controlOfMark, controlSpans, countWords, createCollaborationIdGenerator, createToggleFormat, cssBorderSide, darkTheme, deleteAroundMarkers, deleteComment, deleteFieldSelection, deleteToPlaceholder, dispatchIsolatedCommand, documentWordCount, emptySimpleFieldResult, everyControlSpan, exceedsFormTextLength, expectDefined, explicitOffFields, extraRunFields, extraRunProperties, fieldGuardPlugin, fieldMarkerNodeSpec, fieldResultRanges, fieldsBalanced, fitZoomPercent, formFieldBeside, formFieldGuardPlugin, formFieldLocked, formFieldNodeDisplay, formFieldOfNode, formTextResults, formattingRevision, freezeBatch, goToComment, goToNextChange, goToPreviousChange, hardBreakNodeSpec, hasAnyChange, hasChangeAtCursor, hasNoteRevisions, imageNodeSpec, inlineNodeRun, insertChartImage, insertContentControl, insertWordHardBreak, insertedTextMarks, isFormsProtected, isNavigableHref, isRibbonActionId, isWordYjsRemoteTransaction, ligatureCss, ligatureStyle, lightTheme, linkFromMarks, linkMarkSpec, markSpecs, marksForRun, moveName, newControlId, nodeChart, nodeNumbering, normalizeRibbonActions, normalizeThemeMode, notePartsJson, noteReferenceNodeSpec, operatesFormField, pageBreakNodeSpec, paragraphAttrs, paragraphBoxCss, paragraphFormattingRevision, paragraphFromAttrs, parseBatch, parseBordersJson, pasteInCell, placementClass, positionalTabInputPlugin, previewDocxDiagram, refreshWordYjsPresence, rejectAllChanges, rejectChangeAtCursor, rejectRevisionRange, removeCommentAnchor, removeCommentThread, removeWordLink, repairCollaborativeDocumentIds, repairCollaborativeParagraphIds, replaceAroundMarkers, replaceControlContent, replaceSelectedChart, replyToComment, resolveCellVisuals, resolveComment, resolveNoteRevisions, restoreNoteParts, restoreSectionParts, reviewMarks, ribbonActionIdForLabel, runPropertiesMark, runToInlineNodes, sameJson2 as sameJson, sameRuns, sectionPartsJson, selectFormDropDownAt, selectedChart, setCommentThreads, setReviewRecordingPreferences, staysInFormFields, svgMarkupSpec, swatchColor, symbolFontPlugin, tableCellStyle, tableControlSpans, tableStructureGuardPlugin, tableStyle, themeDrawing, themeToCssVars, toggleCheckboxControl, toggleFormCheckboxAt, toggleTrackChanges, toggleTrackFormatting, toggleTrackMoves, trackChangesPlugin, trackChangesPluginKey, typeOverPlaceholder, updateCommentThreads, updateControlProperties, violatesControlLock, wordHighlightColors, wordLinkRangeAt, wordYjsPluginKey, wordYjsPresencePlugin, wordYjsRedo, wordYjsUndo };
|
|
35092
|
+
export { CONTROL_EDIT_META, CollaborationAuthority, CollaborationClient, DirtyState, EDITOR_THEME_MODES, FIELD_RESULT_REPAIR_META, FORM_FIELD_EDIT_META, HEADER_FOOTER_INPUT, NotePartsStep, PAGE_GAP, PARAGRAPH_KEEP_KEYS, REMOTE_TRANSACTION_META, RESTRUCTURE_TABLE_META, RIBBON_ACTION_IDS, RIBBON_ACTION_LABELS, SectionPartsStep, THEME_KEYS, WORD_CAPABILITY_ACTIONS, WORD_CAPABILITY_BACKSTAGE_PAGES, WORD_CAPABILITY_FILE_COMMANDS, WORD_CAPABILITY_IDS, WORD_CAPABILITY_MENU_ITEMS, WORD_CAPABILITY_SHORTCUTS, WordYjsCollaboration, WordYjsComments, WordYjsMedia, acceptAllChanges, acceptChangeAtCursor, acceptRevisionRange, addComment, appendInlineNode, applyMarkFormatting, applyRunFormattingPatch, applyThemeColors, applyWordLink, approximateDiagramDrawing, authorColor, backstageFocus, chartNodeSpec, chooseDate, chooseListItem, clearDirectRunFormatting, closeRect, collectRevisionRanges, commentAnchors, commentHistoryAttributes, commentIdsAtSelection, commentIdsFromMarks, commentIdsFromNode, commentThreadsFromDoc, contentControlPlugin, continuationsOf, controlAt, controlAtSelection, controlFromData, controlFromValue, controlOfMark, controlSpans, countWords, createCollaborationIdGenerator, createToggleFormat, cssBorderSide, darkTheme, deleteAroundMarkers, deleteColumns, deleteComment, deleteFieldSelection, deleteRow, deleteToPlaceholder, dispatchIsolatedCommand, documentWordCount, emptySimpleFieldResult, everyControlSpan, exceedsFormTextLength, expectDefined, explicitOffFields, extraRunFields, extraRunProperties, fieldGuardPlugin, fieldMarkerNodeSpec, fieldResultRanges, fieldsBalanced, fitZoomPercent, formFieldBeside, formFieldGuardPlugin, formFieldLocked, formFieldNodeDisplay, formFieldOfNode, formTextResults, formattingRevision, freezeBatch, goToComment, goToNextChange, goToPreviousChange, hardBreakNodeSpec, hasAnyChange, hasChangeAtCursor, hasContent2 as hasContent, hasNoteRevisions, imageNodeSpec, inlineNodeRun, insertChartImage, insertColumn, insertContentControl, insertRow, insertWordHardBreak, insertedTextMarks, isFormsProtected, isNavigableHref, isRibbonActionId, isWordYjsRemoteTransaction, ligatureCss, ligatureStyle, lightTheme, linkFromMarks, linkMarkSpec, markSpecs, marksForRun, mergeCells, mergeOrigin, moveName, newControlId, nodeChart, nodeNumbering, normalizeMerges, normalizeRibbonActions, normalizeThemeMode, notePartsJson, noteReferenceNodeSpec, operatesFormField, pageBreakNodeSpec, paragraphAttrs, paragraphBoxCss, paragraphFormattingRevision, paragraphFromAttrs, parseBatch, parseBordersJson, pasteInCell, placementClass, positionalTabInputPlugin, previewDocxDiagram, refreshWordYjsPresence, rejectAllChanges, rejectChangeAtCursor, rejectRevisionRange, removeCommentAnchor, removeCommentThread, removeWordLink, repairCollaborativeDocumentIds, repairCollaborativeParagraphIds, replaceAroundMarkers, replaceControlContent, replaceSelectedChart, replyToComment, resolveCellVisuals, resolveComment, resolveNoteRevisions, restoreNoteParts, restoreSectionParts, reviewMarks, ribbonActionIdForLabel, rowSpanOf, runPropertiesMark, runToInlineNodes, sameJson2 as sameJson, sameRuns, sectionPartsJson, selectFormDropDownAt, selectedChart, setCommentThreads, setReviewRecordingPreferences, spanOf, splitCell, staysInFormFields, svgMarkupSpec, swatchColor, symbolFontPlugin, tableCellStyle, tableControlSpans, tableGrid, tableStructureGuardPlugin, tableStyle, themeDrawing, themeToCssVars, toggleCheckboxControl, toggleFormCheckboxAt, toggleTrackChanges, toggleTrackFormatting, toggleTrackMoves, trackChangesPlugin, trackChangesPluginKey, typeOverPlaceholder, updateCommentThreads, updateControlProperties, violatesControlLock, wordHighlightColors, wordLinkRangeAt, wordYjsPluginKey, wordYjsPresencePlugin, wordYjsRedo, wordYjsUndo };
|