ooxml-core 1.33.0 → 1.35.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-5UDSMCBG.cjs +14 -0
- package/dist/PptxHandler-TTRTAQAR.mjs +5 -0
- package/dist/{PptxHandler-Q7CFNKOU.mjs → PptxHandler-XCYX5DVX.mjs} +2 -2
- package/dist/{PresentationBuilder-VP2637RH.cjs → PresentationBuilder-HA56ZY23.cjs} +6 -5
- package/dist/{PresentationBuilder-SADKXDWC.mjs → PresentationBuilder-IVLUEB4K.mjs} +2 -2
- package/dist/{PresentationBuilder-PJMQRZI6.mjs → PresentationBuilder-JBTNOIL7.mjs} +3 -2
- package/dist/automation/index.cjs +47556 -43468
- package/dist/automation/index.mjs +47556 -43468
- package/dist/{chunk-2LTIDUXH.cjs → chunk-A27O7M5X.cjs} +147 -133
- package/dist/{chunk-Y2RH4QWG.mjs → chunk-EGBNPVBA.mjs} +1542 -721
- package/dist/{chunk-QRXMYOVN.mjs → chunk-GNGL4BO7.mjs} +66 -44
- package/dist/chunk-LSO5SSFX.mjs +112 -0
- package/dist/chunk-MB3TYNMV.mjs +28 -0
- package/dist/{chunk-EBBWRRSB.mjs → chunk-MK2IBZU6.mjs} +1 -1
- package/dist/{chunk-BDZR4DZ6.cjs → chunk-PA5ADSTX.cjs} +1329 -1306
- package/dist/{chunk-BQGLWC6N.mjs → chunk-RI56PFGL.mjs} +67 -44
- package/dist/{chunk-3LMHYL4W.mjs → chunk-RPJHMPEL.mjs} +1 -1
- package/dist/{chunk-JQVOUS6B.mjs → chunk-TJXK4D4U.mjs} +4 -4
- package/dist/{chunk-6LJW76BZ.mjs → chunk-UQMAPY6D.mjs} +147 -128
- package/dist/chunk-XF6ZRA2D.cjs +120 -0
- package/dist/crypto/index.cjs +23 -15
- package/dist/crypto/index.mjs +23 -15
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +519 -161
- package/dist/docx/embedded.mjs +519 -161
- package/dist/docx/find-pattern.d.ts +33 -0
- package/dist/docx/find-pattern.d.ts.map +1 -0
- package/dist/docx/find-replacement.d.ts +16 -0
- package/dist/docx/find-replacement.d.ts.map +1 -0
- package/dist/docx/find-syntax.d.ts +13 -0
- package/dist/docx/find-syntax.d.ts.map +1 -0
- package/dist/docx/find-wildcards.d.ts +8 -0
- package/dist/docx/find-wildcards.d.ts.map +1 -0
- package/dist/docx/form-field-model.d.ts +39 -0
- package/dist/docx/form-field-model.d.ts.map +1 -1
- package/dist/docx/index.cjs +3157 -994
- package/dist/docx/index.d.ts +3 -1
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +3153 -995
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +30 -8
- package/dist/docx/layout/index.mjs +30 -8
- package/dist/docx/layout/input.d.ts +2 -0
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +6706 -1322
- package/dist/docx/load/index.mjs +6706 -1322
- package/dist/docx/load/legacy-doc/binary-save.d.ts +4 -0
- package/dist/docx/load/legacy-doc/binary-save.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/blocks.d.ts +19 -0
- package/dist/docx/load/legacy-doc/blocks.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/borders.d.ts +7 -0
- package/dist/docx/load/legacy-doc/borders.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/context.d.ts +65 -0
- package/dist/docx/load/legacy-doc/context.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/drawing.d.ts +15 -0
- package/dist/docx/load/legacy-doc/drawing.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/error.d.ts +5 -0
- package/dist/docx/load/legacy-doc/error.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/inline.d.ts +7 -0
- package/dist/docx/load/legacy-doc/inline.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/numbering-part.d.ts +3 -0
- package/dist/docx/load/legacy-doc/numbering-part.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/package.d.ts +8 -0
- package/dist/docx/load/legacy-doc/package.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/para-props.d.ts +6 -0
- package/dist/docx/load/legacy-doc/para-props.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/run-props.d.ts +8 -0
- package/dist/docx/load/legacy-doc/run-props.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/sections.d.ts +23 -0
- package/dist/docx/load/legacy-doc/sections.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/styles-part.d.ts +3 -0
- package/dist/docx/load/legacy-doc/styles-part.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/table.d.ts +6 -0
- package/dist/docx/load/legacy-doc/table.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/xml.d.ts +21 -0
- package/dist/docx/load/legacy-doc/xml.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc.d.ts +5 -4
- package/dist/docx/load/legacy-doc.d.ts.map +1 -1
- package/dist/docx/model-paragraph.d.ts +5 -0
- package/dist/docx/model-paragraph.d.ts.map +1 -1
- package/dist/docx/model.d.ts +3 -0
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/numbering-editing.d.ts +11 -1
- package/dist/docx/numbering-editing.d.ts.map +1 -1
- package/dist/docx/numbering-format.d.ts.map +1 -1
- package/dist/docx/numbering-model.d.ts +17 -0
- package/dist/docx/numbering-model.d.ts.map +1 -1
- package/dist/docx/numbering-package.d.ts +2 -2
- package/dist/docx/numbering-package.d.ts.map +1 -1
- package/dist/docx/numbering-parse.d.ts +2 -1
- package/dist/docx/numbering-parse.d.ts.map +1 -1
- package/dist/docx/numbering-picture-save.d.ts +13 -0
- package/dist/docx/numbering-picture-save.d.ts.map +1 -0
- package/dist/docx/numbering-picture.d.ts +18 -0
- package/dist/docx/numbering-picture.d.ts.map +1 -0
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/permission-markers.d.ts +19 -0
- package/dist/docx/permission-markers.d.ts.map +1 -0
- package/dist/docx/permissions.d.ts +11 -0
- package/dist/docx/permissions.d.ts.map +1 -0
- package/dist/docx/protection-legacy.d.ts +13 -0
- package/dist/docx/protection-legacy.d.ts.map +1 -0
- package/dist/docx/protection.d.ts +30 -0
- package/dist/docx/protection.d.ts.map +1 -0
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/settings.d.ts +6 -1
- package/dist/docx/settings.d.ts.map +1 -1
- package/dist/docx/ui/customization.d.ts.map +1 -1
- package/dist/docx/ui/edit-restriction.d.ts +53 -0
- package/dist/docx/ui/edit-restriction.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +548 -18
- 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 +528 -19
- 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/write-paragraph.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +1 -0
- package/dist/drawingml/index.mjs +1 -0
- package/dist/drawingml/write-theme.d.ts +2 -0
- package/dist/drawingml/write-theme.d.ts.map +1 -1
- package/dist/index.cjs +342 -96
- package/dist/index.mjs +343 -97
- package/dist/opc/index.cjs +5 -0
- package/dist/opc/index.d.ts +1 -0
- package/dist/opc/index.d.ts.map +1 -1
- package/dist/opc/index.mjs +5 -1
- package/dist/opc/zlib.d.ts +6 -0
- package/dist/opc/zlib.d.ts.map +1 -0
- package/dist/pptx/automation/index.cjs +1919 -758
- package/dist/pptx/automation/index.d.ts +37 -3
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +252 -10
- package/dist/pptx/automation/schemas/index.cjs +26 -0
- package/dist/pptx/automation/schemas/index.d.ts +26 -1
- package/dist/pptx/automation/schemas/index.d.ts.map +1 -0
- package/dist/pptx/automation/schemas/index.mjs +1 -1
- package/dist/pptx/chunks/index-Bp-1pGo1.d.ts.map +1 -1
- package/dist/pptx/chunks/{index-BuMPQDQb.d.ts → index-pLLN4OTz.d.ts} +37 -10
- package/dist/pptx/chunks/{index-BuMPQDQb.d.ts.map → index-pLLN4OTz.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +281 -116
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.cjs +133 -0
- package/dist/pptx/editor/render/custom-show-operations.d.ts +42 -0
- package/dist/pptx/editor/render/custom-show-operations.d.ts.map +1 -0
- package/dist/pptx/editor/render/custom-show-operations.mjs +119 -0
- package/dist/pptx/editor/render/find-replace.cjs +15 -14
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +2 -1
- package/dist/pptx/editor/render/slide-operations.cjs +9 -8
- package/dist/pptx/editor/render/slide-operations.mjs +3 -2
- package/dist/pptx/editor/render/table-data-grid-ops.cjs +1 -1
- package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
- package/dist/pptx/index.cjs +1656 -761
- package/dist/pptx/index.d.ts +2 -2
- package/dist/pptx/index.mjs +5 -5
- package/dist/teams/index.cjs +213 -26
- package/dist/teams/index.mjs +213 -26
- package/dist/text/index.cjs +241 -0
- package/dist/text/index.d.ts +2 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +240 -1
- package/dist/text/truetype/parse.d.ts +36 -0
- package/dist/text/truetype/parse.d.ts.map +1 -0
- package/dist/text/truetype/subset.d.ts +16 -0
- package/dist/text/truetype/subset.d.ts.map +1 -0
- package/dist/visio/action-formula.d.ts +21 -0
- package/dist/visio/action-formula.d.ts.map +1 -0
- package/dist/visio/action-menu.d.ts +8 -0
- package/dist/visio/action-menu.d.ts.map +1 -0
- package/dist/visio/bevel-3d.d.ts +61 -0
- package/dist/visio/bevel-3d.d.ts.map +1 -0
- package/dist/visio/cell-formula.d.ts.map +1 -1
- package/dist/visio/cff-masters.d.ts +17 -0
- package/dist/visio/cff-masters.d.ts.map +1 -0
- package/dist/visio/cff-recalc.d.ts +17 -0
- package/dist/visio/cff-recalc.d.ts.map +1 -0
- package/dist/visio/container-relationships.d.ts +40 -6
- package/dist/visio/container-relationships.d.ts.map +1 -1
- package/dist/visio/control-formula.d.ts +13 -0
- package/dist/visio/control-formula.d.ts.map +1 -0
- package/dist/visio/data-connections.d.ts +32 -0
- package/dist/visio/data-connections.d.ts.map +1 -0
- package/dist/visio/data-recordsets.d.ts +7 -0
- package/dist/visio/data-recordsets.d.ts.map +1 -1
- package/dist/visio/data-refresh.d.ts +33 -0
- package/dist/visio/data-refresh.d.ts.map +1 -0
- package/dist/visio/edit-action.d.ts +22 -0
- package/dist/visio/edit-action.d.ts.map +1 -0
- package/dist/visio/edit-commands.d.ts +9 -1
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-connector-glue.d.ts +24 -1
- package/dist/visio/edit-connector-glue.d.ts.map +1 -1
- package/dist/visio/edit-connector-layout.d.ts.map +1 -1
- package/dist/visio/edit-connector-org.d.ts +11 -0
- package/dist/visio/edit-connector-org.d.ts.map +1 -0
- package/dist/visio/edit-connector-reroute.d.ts.map +1 -1
- package/dist/visio/edit-connector-world.d.ts +25 -0
- package/dist/visio/edit-connector-world.d.ts.map +1 -0
- package/dist/visio/edit-connector.d.ts +5 -1
- package/dist/visio/edit-connector.d.ts.map +1 -1
- package/dist/visio/edit-container-fit.d.ts +15 -2
- package/dist/visio/edit-container-fit.d.ts.map +1 -1
- package/dist/visio/edit-container-members.d.ts +12 -0
- package/dist/visio/edit-container-members.d.ts.map +1 -1
- package/dist/visio/edit-container-options.d.ts +33 -0
- package/dist/visio/edit-container-options.d.ts.map +1 -0
- package/dist/visio/edit-control.d.ts +28 -0
- package/dist/visio/edit-control.d.ts.map +1 -0
- package/dist/visio/edit-data-commands.d.ts +5 -0
- package/dist/visio/edit-data-commands.d.ts.map +1 -1
- package/dist/visio/edit-data-parts.d.ts +2 -0
- package/dist/visio/edit-data-parts.d.ts.map +1 -1
- package/dist/visio/edit-data.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts +2 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts.d.ts +8 -0
- package/dist/visio/edit-diagram-parts.d.ts.map +1 -1
- package/dist/visio/edit-formatting-commands.d.ts +4 -0
- package/dist/visio/edit-formatting-commands.d.ts.map +1 -1
- package/dist/visio/edit-formatting-paint.d.ts.map +1 -1
- package/dist/visio/edit-geometry.d.ts.map +1 -1
- package/dist/visio/edit-group-resize-instances.d.ts +43 -0
- package/dist/visio/edit-group-resize-instances.d.ts.map +1 -0
- package/dist/visio/edit-group-resize.d.ts +1 -0
- package/dist/visio/edit-group-resize.d.ts.map +1 -1
- package/dist/visio/edit-group-rotation.d.ts +8 -0
- package/dist/visio/edit-group-rotation.d.ts.map +1 -1
- package/dist/visio/edit-instance-checks.d.ts.map +1 -1
- package/dist/visio/edit-instance-geometry.d.ts +13 -0
- package/dist/visio/edit-instance-geometry.d.ts.map +1 -1
- package/dist/visio/edit-instance-sheet.d.ts.map +1 -1
- package/dist/visio/edit-master-add.d.ts +3 -0
- package/dist/visio/edit-master-add.d.ts.map +1 -1
- package/dist/visio/edit-master-drop.d.ts.map +1 -1
- package/dist/visio/edit-master-media.d.ts +22 -0
- package/dist/visio/edit-master-media.d.ts.map +1 -0
- package/dist/visio/edit-master-scope.d.ts.map +1 -1
- package/dist/visio/edit-package.d.ts.map +1 -1
- package/dist/visio/edit-page-theme-commands.d.ts +26 -0
- package/dist/visio/edit-page-theme-commands.d.ts.map +1 -1
- package/dist/visio/edit-page-theme-part.d.ts +6 -0
- package/dist/visio/edit-page-theme-part.d.ts.map +1 -0
- package/dist/visio/edit-page-theme.d.ts +9 -1
- package/dist/visio/edit-page-theme.d.ts.map +1 -1
- package/dist/visio/edit-picture-adjust.d.ts +32 -0
- package/dist/visio/edit-picture-adjust.d.ts.map +1 -0
- package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
- package/dist/visio/edit-sheet-cells.d.ts +23 -0
- package/dist/visio/edit-sheet-cells.d.ts.map +1 -0
- package/dist/visio/edit-stencil-connector-write.d.ts.map +1 -1
- package/dist/visio/edit-stencil-connector.d.ts +7 -2
- package/dist/visio/edit-stencil-connector.d.ts.map +1 -1
- package/dist/visio/edit-stencil-import.d.ts +1 -1
- package/dist/visio/edit-stencil-import.d.ts.map +1 -1
- package/dist/visio/edit-style-admission.d.ts +6 -0
- package/dist/visio/edit-style-admission.d.ts.map +1 -1
- package/dist/visio/edit-swimlane-clone.d.ts +7 -0
- package/dist/visio/edit-swimlane-clone.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-commands.d.ts +91 -0
- package/dist/visio/edit-swimlane-commands.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-layout.d.ts +71 -0
- package/dist/visio/edit-swimlane-layout.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-ops.d.ts +12 -0
- package/dist/visio/edit-swimlane-ops.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-shapes.d.ts +42 -0
- package/dist/visio/edit-swimlane-shapes.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-turn.d.ts +9 -0
- package/dist/visio/edit-swimlane-turn.d.ts.map +1 -0
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/effects.d.ts +3 -2
- package/dist/visio/effects.d.ts.map +1 -1
- package/dist/visio/geometry.d.ts +2 -1
- package/dist/visio/geometry.d.ts.map +1 -1
- package/dist/visio/index.cjs +12115 -7631
- package/dist/visio/index.d.ts +13 -0
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +12101 -7632
- package/dist/visio/infinite-line.d.ts +17 -0
- package/dist/visio/infinite-line.d.ts.map +1 -0
- package/dist/visio/model.d.ts +62 -0
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/package-kind.d.ts +34 -0
- package/dist/visio/package-kind.d.ts.map +1 -0
- package/dist/visio/page-theme.d.ts +7 -0
- package/dist/visio/page-theme.d.ts.map +1 -1
- package/dist/visio/paragraphs.d.ts +1 -1
- package/dist/visio/paragraphs.d.ts.map +1 -1
- package/dist/visio/parser.d.ts +2 -2
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/shadow.d.ts +2 -1
- package/dist/visio/shadow.d.ts.map +1 -1
- package/dist/visio/shape-sections-types.d.ts +71 -0
- package/dist/visio/shape-sections-types.d.ts.map +1 -0
- package/dist/visio/shape-sections.d.ts +11 -0
- package/dist/visio/shape-sections.d.ts.map +1 -0
- package/dist/visio/shape-structure.d.ts +14 -1
- package/dist/visio/shape-structure.d.ts.map +1 -1
- package/dist/visio/shapes.d.ts +7 -1
- package/dist/visio/shapes.d.ts.map +1 -1
- package/dist/visio/stencil-file.d.ts +2 -2
- package/dist/visio/style.d.ts.map +1 -1
- package/dist/visio/swimlane-membership.d.ts +12 -0
- package/dist/visio/swimlane-membership.d.ts.map +1 -0
- package/dist/visio/swimlane-stack.d.ts +67 -0
- package/dist/visio/swimlane-stack.d.ts.map +1 -0
- package/dist/visio/tab-stops.d.ts +20 -0
- package/dist/visio/tab-stops.d.ts.map +1 -0
- package/dist/visio/theme-builtins.d.ts +3 -0
- package/dist/visio/theme-builtins.d.ts.map +1 -1
- package/dist/visio/theme-effects.d.ts +19 -0
- package/dist/visio/theme-effects.d.ts.map +1 -0
- package/dist/visio/theme-font.d.ts +13 -0
- package/dist/visio/theme-font.d.ts.map +1 -0
- package/dist/visio/theme-line.d.ts +10 -0
- package/dist/visio/theme-line.d.ts.map +1 -1
- package/dist/visio/theme-write.d.ts.map +1 -1
- package/dist/visio/theme.d.ts +7 -0
- package/dist/visio/theme.d.ts.map +1 -1
- package/dist/visio/ui/data-graphic-config.d.ts +46 -0
- package/dist/visio/ui/data-graphic-config.d.ts.map +1 -0
- package/dist/visio/ui/data-graphic-items.d.ts +23 -0
- package/dist/visio/ui/data-graphic-items.d.ts.map +1 -0
- package/dist/visio/ui/data-graphic-rules.d.ts +14 -0
- package/dist/visio/ui/data-graphic-rules.d.ts.map +1 -1
- package/dist/visio/ui/data-graphics.d.ts +10 -1
- package/dist/visio/ui/data-graphics.d.ts.map +1 -1
- package/dist/visio/ui/data-visualizer-edits.d.ts +22 -0
- package/dist/visio/ui/data-visualizer-edits.d.ts.map +1 -0
- package/dist/visio/ui/data-visualizer.d.ts +47 -0
- package/dist/visio/ui/data-visualizer.d.ts.map +1 -0
- package/dist/visio/ui/diagram-parts.d.ts +8 -1
- package/dist/visio/ui/diagram-parts.d.ts.map +1 -1
- package/dist/visio/ui/edit-commands.d.ts.map +1 -1
- package/dist/visio/ui/guides.d.ts +9 -1
- package/dist/visio/ui/guides.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +44031 -38653
- package/dist/visio/ui/index.d.ts +10 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +43976 -38654
- package/dist/visio/ui/org-chart-edit.d.ts +52 -0
- package/dist/visio/ui/org-chart-edit.d.ts.map +1 -0
- package/dist/visio/ui/org-chart-import.d.ts +35 -0
- package/dist/visio/ui/org-chart-import.d.ts.map +1 -0
- package/dist/visio/ui/org-chart-layout.d.ts +43 -0
- package/dist/visio/ui/org-chart-layout.d.ts.map +1 -0
- package/dist/visio/ui/org-chart-stencil-data.d.ts +11 -0
- package/dist/visio/ui/org-chart-stencil-data.d.ts.map +1 -0
- package/dist/visio/ui/org-chart-template.d.ts +7 -0
- package/dist/visio/ui/org-chart-template.d.ts.map +1 -0
- package/dist/visio/ui/org-chart.d.ts +63 -0
- package/dist/visio/ui/org-chart.d.ts.map +1 -0
- package/dist/visio/ui/resize-snap.d.ts +51 -0
- package/dist/visio/ui/resize-snap.d.ts.map +1 -0
- package/dist/visio/ui/sample-drawing.d.ts +26 -0
- package/dist/visio/ui/sample-drawing.d.ts.map +1 -1
- package/dist/visio/ui/scene-validation.d.ts.map +1 -1
- package/dist/visio/ui/selection-connectors.d.ts +10 -0
- package/dist/visio/ui/selection-connectors.d.ts.map +1 -0
- package/dist/visio/ui/selection-resize.d.ts +2 -2
- package/dist/visio/ui/selection-resize.d.ts.map +1 -1
- package/dist/visio/ui/shape-group.d.ts +3 -1
- package/dist/visio/ui/shape-group.d.ts.map +1 -1
- package/dist/visio/ui/shape-move.d.ts.map +1 -1
- package/dist/visio/ui/shape-resize.d.ts +29 -1
- package/dist/visio/ui/shape-resize.d.ts.map +1 -1
- package/dist/visio/ui/shape-rotation.d.ts +3 -1
- package/dist/visio/ui/shape-rotation.d.ts.map +1 -1
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
- package/dist/visio/ui/swimlane.d.ts +37 -0
- package/dist/visio/ui/swimlane.d.ts.map +1 -0
- package/dist/visio/ui/templates.d.ts +30 -0
- package/dist/visio/ui/templates.d.ts.map +1 -0
- package/dist/xlsx/audit/ast-text.d.ts +12 -0
- package/dist/xlsx/audit/ast-text.d.ts.map +1 -0
- package/dist/xlsx/audit/error-check.d.ts +23 -0
- package/dist/xlsx/audit/error-check.d.ts.map +1 -0
- package/dist/xlsx/audit/evaluate-steps.d.ts +48 -0
- package/dist/xlsx/audit/evaluate-steps.d.ts.map +1 -0
- package/dist/xlsx/audit/index.d.ts +6 -0
- package/dist/xlsx/audit/index.d.ts.map +1 -0
- package/dist/xlsx/audit/trace.d.ts +59 -0
- package/dist/xlsx/audit/trace.d.ts.map +1 -0
- package/dist/xlsx/audit/watch.d.ts +17 -0
- package/dist/xlsx/audit/watch.d.ts.map +1 -0
- package/dist/xlsx/edit/filter.d.ts +5 -2
- package/dist/xlsx/edit/filter.d.ts.map +1 -1
- package/dist/xlsx/edit/index.d.ts +4 -1
- package/dist/xlsx/edit/index.d.ts.map +1 -1
- package/dist/xlsx/edit/session.d.ts.map +1 -1
- package/dist/xlsx/edit/sort-choices.d.ts +23 -0
- package/dist/xlsx/edit/sort-choices.d.ts.map +1 -0
- package/dist/xlsx/edit/sort-keys.d.ts +49 -0
- package/dist/xlsx/edit/sort-keys.d.ts.map +1 -0
- package/dist/xlsx/edit/sort-reapply.d.ts +11 -0
- package/dist/xlsx/edit/sort-reapply.d.ts.map +1 -0
- package/dist/xlsx/edit/sort.d.ts +14 -12
- package/dist/xlsx/edit/sort.d.ts.map +1 -1
- package/dist/xlsx/edit/types.d.ts +7 -6
- package/dist/xlsx/edit/types.d.ts.map +1 -1
- package/dist/xlsx/edit/view.d.ts +9 -1
- package/dist/xlsx/edit/view.d.ts.map +1 -1
- package/dist/xlsx/filter-criteria.d.ts +2 -1
- package/dist/xlsx/filter-criteria.d.ts.map +1 -1
- package/dist/xlsx/formula/engine-types.d.ts +8 -0
- package/dist/xlsx/formula/engine-types.d.ts.map +1 -1
- package/dist/xlsx/formula/engine.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +5478 -4220
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +5450 -4221
- package/dist/xlsx/layout/index.d.ts +1 -0
- package/dist/xlsx/layout/index.d.ts.map +1 -1
- package/dist/xlsx/layout/split.d.ts +55 -0
- package/dist/xlsx/layout/split.d.ts.map +1 -0
- package/dist/xlsx/layout/viewport.d.ts +2 -0
- package/dist/xlsx/layout/viewport.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +305 -109
- package/dist/xlsx/load/index.mjs +305 -109
- package/dist/xlsx/model-sort.d.ts +27 -0
- package/dist/xlsx/model-sort.d.ts.map +1 -0
- package/dist/xlsx/model.d.ts +39 -1
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/read/ignored-errors.d.ts +4 -0
- package/dist/xlsx/read/ignored-errors.d.ts.map +1 -0
- package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/read/sort-state.d.ts +5 -0
- package/dist/xlsx/read/sort-state.d.ts.map +1 -0
- package/dist/xlsx/read/tables.d.ts +2 -2
- package/dist/xlsx/read/tables.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/sort-lists.d.ts +6 -0
- package/dist/xlsx/sort-lists.d.ts.map +1 -0
- package/dist/xlsx/ui/audit-state.d.ts +19 -0
- package/dist/xlsx/ui/audit-state.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/audit.d.ts +3 -0
- package/dist/xlsx/ui/commands/audit.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/formulas.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/audit.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/audit.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/rules.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/icons.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/sort-filter.d.ts.map +1 -1
- package/dist/xlsx/ui/context.d.ts +6 -1
- package/dist/xlsx/ui/context.d.ts.map +1 -1
- package/dist/xlsx/ui/grid/geometry.d.ts +29 -1
- package/dist/xlsx/ui/grid/geometry.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +10761 -9573
- package/dist/xlsx/ui/index.d.ts +1 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +10755 -9574
- package/dist/xlsx/ui/ribbon/icon-paths.d.ts.map +1 -1
- package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts.map +1 -1
- package/dist/xlsx/write/filter-columns.d.ts +14 -0
- package/dist/xlsx/write/filter-columns.d.ts.map +1 -1
- package/dist/xlsx/write/ignored-errors.d.ts +3 -0
- package/dist/xlsx/write/ignored-errors.d.ts.map +1 -0
- package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/write/sort-state.d.ts +55 -0
- package/dist/xlsx/write/sort-state.d.ts.map +1 -0
- package/dist/xlsx/write/table-patch.d.ts +2 -1
- package/dist/xlsx/write/table-patch.d.ts.map +1 -1
- package/dist/xlsx/write/tables.d.ts +2 -1
- package/dist/xlsx/write/tables.d.ts.map +1 -1
- package/dist/xlsx/write/worksheet.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/PptxHandler-MGKMIK22.cjs +0 -13
- package/dist/PptxHandler-TEC7SWBU.mjs +0 -4
- package/dist/chunk-MHNETXQB.mjs +0 -1
package/dist/docx/ui/index.mjs
CHANGED
|
@@ -2161,11 +2161,11 @@ function extensionPrefix(doc, ns, preferred) {
|
|
|
2161
2161
|
function declareIgnorableExtension(doc, ns, preferred) {
|
|
2162
2162
|
const prefix = extensionPrefix(doc, ns, preferred);
|
|
2163
2163
|
const mc = extensionPrefix(doc, MC, "mc");
|
|
2164
|
-
const
|
|
2164
|
+
const ignored2 = new Set(
|
|
2165
2165
|
(doc.documentElement.getAttributeNS(MC, "Ignorable") ?? "").split(/\s+/).filter(Boolean)
|
|
2166
2166
|
);
|
|
2167
|
-
|
|
2168
|
-
doc.documentElement.setAttributeNS(MC, `${mc}:Ignorable`, [...
|
|
2167
|
+
ignored2.add(prefix);
|
|
2168
|
+
doc.documentElement.setAttributeNS(MC, `${mc}:Ignorable`, [...ignored2].join(" "));
|
|
2169
2169
|
return prefix;
|
|
2170
2170
|
}
|
|
2171
2171
|
function writeLigatures(doc, props, value) {
|
|
@@ -30094,9 +30094,12 @@ function reconcileBookmarks(doc, starts, ends, names, baseNames, nextId) {
|
|
|
30094
30094
|
}
|
|
30095
30095
|
return { starts: keptStarts, ends: keptEnds };
|
|
30096
30096
|
}
|
|
30097
|
+
function changedPermissionMarkers(doc, paragraph, base, source, length) {
|
|
30098
|
+
return void 0;
|
|
30099
|
+
}
|
|
30097
30100
|
|
|
30098
30101
|
// docx/numbering-write.ts
|
|
30099
|
-
function
|
|
30102
|
+
function setAttribute7(element3, local, value) {
|
|
30100
30103
|
element3.setAttributeNS(WORD_NS, `w:${local}`, value);
|
|
30101
30104
|
}
|
|
30102
30105
|
function sameNumbering(a, b) {
|
|
@@ -30108,10 +30111,10 @@ function writeNumberingProperties(doc, props, paragraph, base) {
|
|
|
30108
30111
|
if (!paragraph.numbering) return;
|
|
30109
30112
|
const numPr = makeW(doc, "numPr");
|
|
30110
30113
|
const ilvl = makeW(doc, "ilvl");
|
|
30111
|
-
|
|
30114
|
+
setAttribute7(ilvl, "val", String(paragraph.numbering.level));
|
|
30112
30115
|
numPr.appendChild(ilvl);
|
|
30113
30116
|
const numId = makeW(doc, "numId");
|
|
30114
|
-
|
|
30117
|
+
setAttribute7(numId, "val", String(paragraph.numbering.numId));
|
|
30115
30118
|
numPr.appendChild(numId);
|
|
30116
30119
|
props.appendChild(numPr);
|
|
30117
30120
|
}
|
|
@@ -30664,7 +30667,7 @@ function runsToWriteAnew(paragraph, base, slots) {
|
|
|
30664
30667
|
}
|
|
30665
30668
|
|
|
30666
30669
|
// docx/write-paragraph.ts
|
|
30667
|
-
function
|
|
30670
|
+
function setAttribute8(element3, local, value) {
|
|
30668
30671
|
element3.setAttributeNS(WORD_NS, `w:${local}`, value);
|
|
30669
30672
|
}
|
|
30670
30673
|
function removeChildren4(element3, local) {
|
|
@@ -30702,7 +30705,7 @@ function writeParagraphImpl(doc, paragraph, node, base, allocator, spans) {
|
|
|
30702
30705
|
const jc = paragraphJustification(paragraph);
|
|
30703
30706
|
if (jc) {
|
|
30704
30707
|
const align = makeW(doc, "jc");
|
|
30705
|
-
|
|
30708
|
+
setAttribute8(align, "val", jc);
|
|
30706
30709
|
pPr.appendChild(align);
|
|
30707
30710
|
}
|
|
30708
30711
|
}
|
|
@@ -30710,7 +30713,7 @@ function writeParagraphImpl(doc, paragraph, node, base, allocator, spans) {
|
|
|
30710
30713
|
removeChildren4(pPr, "pStyle");
|
|
30711
30714
|
if (paragraph.style) {
|
|
30712
30715
|
const style = makeW(doc, "pStyle");
|
|
30713
|
-
|
|
30716
|
+
setAttribute8(style, "val", paragraph.style);
|
|
30714
30717
|
pPr.appendChild(style);
|
|
30715
30718
|
}
|
|
30716
30719
|
}
|
|
@@ -30735,7 +30738,14 @@ function writeParagraphImpl(doc, paragraph, node, base, allocator, spans) {
|
|
|
30735
30738
|
const source = new Set(sourceBookmarks);
|
|
30736
30739
|
const kept = /* @__PURE__ */ new Set([...starts, ...ends]);
|
|
30737
30740
|
const sourcePositions = runPositions([]);
|
|
30738
|
-
const
|
|
30741
|
+
const permissions = changedPermissionMarkers(
|
|
30742
|
+
doc,
|
|
30743
|
+
paragraph,
|
|
30744
|
+
base,
|
|
30745
|
+
markers.map((marker) => marker.element),
|
|
30746
|
+
runPositions(paragraph.runs).at(-1)
|
|
30747
|
+
);
|
|
30748
|
+
const read = markers.filter((marker) => !isBookmark(marker.element) || kept.has(marker.element)).filter((marker) => !permissions?.drop.has(marker.element)).map((marker) => {
|
|
30739
30749
|
const position2 = sourcePositions[marker.boundary] ?? 0;
|
|
30740
30750
|
const annotation = marker.annotation;
|
|
30741
30751
|
return {
|
|
@@ -30750,9 +30760,10 @@ function writeParagraphImpl(doc, paragraph, node, base, allocator, spans) {
|
|
|
30750
30760
|
});
|
|
30751
30761
|
const end = runPositions(paragraph.runs).at(-1);
|
|
30752
30762
|
const sources = containerSources(paragraph.runs, base?.runs, slots);
|
|
30753
|
-
const carried = orderRangeEnds(
|
|
30754
|
-
read.map((marker) => ({ ...marker, position: marker.opening ? 0 : end }))
|
|
30755
|
-
|
|
30763
|
+
const carried = orderRangeEnds([
|
|
30764
|
+
...read.map((marker) => ({ ...marker, position: marker.opening ? 0 : end })),
|
|
30765
|
+
...permissions?.added ?? []
|
|
30766
|
+
]);
|
|
30756
30767
|
for (const marker of markers) marker.element.parentNode?.removeChild(marker.element);
|
|
30757
30768
|
for (const oldNode of replaceableInlineChildren(node)) node.removeChild(oldNode);
|
|
30758
30769
|
const { nodes, placed, containers } = buildInlineContent(
|
|
@@ -31918,6 +31929,7 @@ function paragraphFromAttrs(attrs3, id, runs) {
|
|
|
31918
31929
|
...attrs3.borders ? { borders: structuredClone(attrs3.borders) } : {},
|
|
31919
31930
|
...attrs3.shadingFill ? { shadingFill: attrs3.shadingFill } : {},
|
|
31920
31931
|
...attrs3.bookmarks?.length ? { bookmarks: [...attrs3.bookmarks] } : {},
|
|
31932
|
+
...attrs3.permissions?.length ? { permissions: structuredClone(attrs3.permissions) } : {},
|
|
31921
31933
|
...attrs3.contentControl ? { contentControl: structuredClone(attrs3.contentControl) } : {}
|
|
31922
31934
|
};
|
|
31923
31935
|
}
|
|
@@ -31956,6 +31968,7 @@ function paragraphAttrs(paragraph) {
|
|
|
31956
31968
|
borders: paragraph.borders ?? null,
|
|
31957
31969
|
shadingFill: paragraph.shadingFill ?? null,
|
|
31958
31970
|
bookmarks: paragraph.bookmarks ?? [],
|
|
31971
|
+
permissions: paragraph.permissions ?? null,
|
|
31959
31972
|
contentControl: paragraph.contentControl ?? null
|
|
31960
31973
|
};
|
|
31961
31974
|
}
|
|
@@ -35688,7 +35701,15 @@ var WORD_CAPABILITY_ACTIONS = {
|
|
|
35688
35701
|
print: ["print"],
|
|
35689
35702
|
copy: ["cut", "copy"],
|
|
35690
35703
|
comment: ["add-comment", "delete-comment", "previous-comment", "next-comment", "comments"],
|
|
35691
|
-
review: [
|
|
35704
|
+
review: [
|
|
35705
|
+
"track-changes",
|
|
35706
|
+
"tracking-options",
|
|
35707
|
+
"restrict-editing",
|
|
35708
|
+
"accept",
|
|
35709
|
+
"reject",
|
|
35710
|
+
"accept-all",
|
|
35711
|
+
"reject-all"
|
|
35712
|
+
],
|
|
35692
35713
|
find: ["find-and-replace", "replace", "find-options"]
|
|
35693
35714
|
};
|
|
35694
35715
|
var WORD_CAPABILITY_FILE_COMMANDS = {
|
|
@@ -35887,6 +35908,7 @@ var RIBBON_ACTION_IDS = [
|
|
|
35887
35908
|
"run-direction",
|
|
35888
35909
|
"track-changes",
|
|
35889
35910
|
"tracking-options",
|
|
35911
|
+
"restrict-editing",
|
|
35890
35912
|
"display-for-review",
|
|
35891
35913
|
"previous-change",
|
|
35892
35914
|
"next-change",
|
|
@@ -36083,6 +36105,7 @@ var RIBBON_ACTION_LABELS = {
|
|
|
36083
36105
|
"run-direction": "Run direction",
|
|
36084
36106
|
"track-changes": "Track changes",
|
|
36085
36107
|
"tracking-options": "Tracking options",
|
|
36108
|
+
"restrict-editing": "Restrict editing",
|
|
36086
36109
|
"display-for-review": "Display for review",
|
|
36087
36110
|
"previous-change": "Previous change",
|
|
36088
36111
|
"next-change": "Next change",
|
|
@@ -36993,17 +37016,17 @@ function staysInFormFields(tr, kept) {
|
|
|
36993
37016
|
if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep || step instanceof AddMarkStep || step instanceof RemoveMarkStep))
|
|
36994
37017
|
return false;
|
|
36995
37018
|
const { from, to } = step;
|
|
36996
|
-
const
|
|
37019
|
+
const touches2 = (ranges, start2, end2) => ranges.some((range) => start2 < map.map(range.to, -1) && end2 > map.map(range.from, 1));
|
|
36997
37020
|
const marks = step instanceof AddMarkStep || step instanceof RemoveMarkStep;
|
|
36998
|
-
if (!internal && !tracked && (within2(plain, from, to) ||
|
|
37021
|
+
if (!internal && !tracked && (within2(plain, from, to) || touches2(plain, from, to))) {
|
|
36999
37022
|
if (marks) return false;
|
|
37000
37023
|
const stored = kept && from === map.map(kept.at) ? kept.marks : null;
|
|
37001
37024
|
if (step instanceof ReplaceStep && writesFormatting(step, tr.docs[index], stored))
|
|
37002
37025
|
return false;
|
|
37003
37026
|
}
|
|
37004
|
-
let changesFixed = marks &&
|
|
37027
|
+
let changesFixed = marks && touches2(fixed, from, to);
|
|
37005
37028
|
step.getMap().forEach((start2, end2) => {
|
|
37006
|
-
changesFixed ||=
|
|
37029
|
+
changesFixed ||= touches2(fixed, start2, end2);
|
|
37007
37030
|
});
|
|
37008
37031
|
if (changesFixed) return false;
|
|
37009
37032
|
if (within2(fields, from, to))
|
|
@@ -37079,4 +37102,490 @@ function formFieldGuardPlugin(protection) {
|
|
|
37079
37102
|
});
|
|
37080
37103
|
}
|
|
37081
37104
|
|
|
37082
|
-
|
|
37105
|
+
// docx/find-syntax.ts
|
|
37106
|
+
var FIND_PARAGRAPH_MARK = "\r";
|
|
37107
|
+
var FIND_LINE_BREAK = "\v";
|
|
37108
|
+
var FIND_PAGE_BREAK = "\f";
|
|
37109
|
+
var FIND_OBJECT = "\0";
|
|
37110
|
+
var FindPatternError = class extends Error {
|
|
37111
|
+
constructor(message) {
|
|
37112
|
+
super(message);
|
|
37113
|
+
this.name = "FindPatternError";
|
|
37114
|
+
}
|
|
37115
|
+
};
|
|
37116
|
+
var SYNTAX_CHARACTERS = "^$\\.*+?()[]{}|/";
|
|
37117
|
+
function escapeFindChar(char) {
|
|
37118
|
+
return SYNTAX_CHARACTERS.includes(char) ? `\\${char}` : char;
|
|
37119
|
+
}
|
|
37120
|
+
var FIND_CODE_SOURCE = {
|
|
37121
|
+
p: FIND_PARAGRAPH_MARK,
|
|
37122
|
+
t: " ",
|
|
37123
|
+
l: FIND_LINE_BREAK,
|
|
37124
|
+
m: FIND_PAGE_BREAK,
|
|
37125
|
+
s: "\xA0",
|
|
37126
|
+
"~": "\u2011",
|
|
37127
|
+
"-": "\xAD",
|
|
37128
|
+
"^": "\\^",
|
|
37129
|
+
"?": "[^\\u0000\\r]",
|
|
37130
|
+
"#": "\\p{Nd}",
|
|
37131
|
+
$: "\\p{L}",
|
|
37132
|
+
w: "[^\\S\\r]"
|
|
37133
|
+
};
|
|
37134
|
+
function findCodeSource(code) {
|
|
37135
|
+
const source = FIND_CODE_SOURCE[code.toLowerCase()];
|
|
37136
|
+
if (source === void 0) throw new FindPatternError(`Unknown search code ^${code}`);
|
|
37137
|
+
return source;
|
|
37138
|
+
}
|
|
37139
|
+
|
|
37140
|
+
// docx/find-wildcards.ts
|
|
37141
|
+
var WORD_CHARACTERS = "\\p{L}\\p{M}\\p{N}_";
|
|
37142
|
+
var WILDCARD_ANY = "[^\\u0000\\r]";
|
|
37143
|
+
var MAX_GROUPS = 9;
|
|
37144
|
+
function wildcardSource(query) {
|
|
37145
|
+
const parser = new WildcardParser(query);
|
|
37146
|
+
const source = parser.sequence(0);
|
|
37147
|
+
if (!parser.done) throw new FindPatternError("Unmatched ) in the search pattern");
|
|
37148
|
+
return { source, groupCount: parser.groupCount };
|
|
37149
|
+
}
|
|
37150
|
+
function classCharacter(char) {
|
|
37151
|
+
return /[\\\]\[^-]/u.test(char) ? `\\${char}` : char;
|
|
37152
|
+
}
|
|
37153
|
+
var WildcardParser = class {
|
|
37154
|
+
constructor(query) {
|
|
37155
|
+
this.query = query;
|
|
37156
|
+
}
|
|
37157
|
+
query;
|
|
37158
|
+
index = 0;
|
|
37159
|
+
groupCount = 0;
|
|
37160
|
+
get done() {
|
|
37161
|
+
return this.index >= this.query.length;
|
|
37162
|
+
}
|
|
37163
|
+
/** The next whole character (a surrogate pair is one character). */
|
|
37164
|
+
take() {
|
|
37165
|
+
const code = this.query.codePointAt(this.index);
|
|
37166
|
+
if (code === void 0) throw new FindPatternError("The search pattern ends unexpectedly");
|
|
37167
|
+
const char = String.fromCodePoint(code);
|
|
37168
|
+
this.index += char.length;
|
|
37169
|
+
return char;
|
|
37170
|
+
}
|
|
37171
|
+
peek() {
|
|
37172
|
+
return this.query.charAt(this.index);
|
|
37173
|
+
}
|
|
37174
|
+
/** The atoms up to a closing parenthesis, or the end of the pattern, as one expression. */
|
|
37175
|
+
sequence(depth) {
|
|
37176
|
+
const atoms2 = [];
|
|
37177
|
+
while (!this.done) {
|
|
37178
|
+
if (this.peek() === ")") {
|
|
37179
|
+
if (depth === 0) throw new FindPatternError("Unmatched ) in the search pattern");
|
|
37180
|
+
break;
|
|
37181
|
+
}
|
|
37182
|
+
const char = this.take();
|
|
37183
|
+
switch (char) {
|
|
37184
|
+
case "(": {
|
|
37185
|
+
this.groupCount++;
|
|
37186
|
+
if (this.groupCount > MAX_GROUPS)
|
|
37187
|
+
throw new FindPatternError("A search pattern may hold nine groups");
|
|
37188
|
+
const inner = this.sequence(depth + 1);
|
|
37189
|
+
if (this.peek() !== ")") throw new FindPatternError("Unmatched ( in the search pattern");
|
|
37190
|
+
this.index++;
|
|
37191
|
+
atoms2.push(`(${inner})`);
|
|
37192
|
+
break;
|
|
37193
|
+
}
|
|
37194
|
+
case "?":
|
|
37195
|
+
atoms2.push(WILDCARD_ANY);
|
|
37196
|
+
break;
|
|
37197
|
+
case "*":
|
|
37198
|
+
atoms2.push(`${WILDCARD_ANY}*?`);
|
|
37199
|
+
break;
|
|
37200
|
+
case "<":
|
|
37201
|
+
atoms2.push(`(?<![${WORD_CHARACTERS}])`);
|
|
37202
|
+
break;
|
|
37203
|
+
case ">":
|
|
37204
|
+
atoms2.push(`(?![${WORD_CHARACTERS}])`);
|
|
37205
|
+
break;
|
|
37206
|
+
case "[":
|
|
37207
|
+
atoms2.push(this.characterSet());
|
|
37208
|
+
break;
|
|
37209
|
+
case "@":
|
|
37210
|
+
this.quantify(atoms2, "+");
|
|
37211
|
+
break;
|
|
37212
|
+
case "{":
|
|
37213
|
+
this.quantify(atoms2, this.repeatCount());
|
|
37214
|
+
break;
|
|
37215
|
+
case "\\":
|
|
37216
|
+
if (this.done) throw new FindPatternError("The search pattern ends with \\");
|
|
37217
|
+
atoms2.push(escapeFindChar(this.take()));
|
|
37218
|
+
break;
|
|
37219
|
+
case "^":
|
|
37220
|
+
atoms2.push(findCodeSource(this.take()));
|
|
37221
|
+
break;
|
|
37222
|
+
default:
|
|
37223
|
+
atoms2.push(escapeFindChar(char));
|
|
37224
|
+
}
|
|
37225
|
+
}
|
|
37226
|
+
return atoms2.join("");
|
|
37227
|
+
}
|
|
37228
|
+
/** Repeats the last atom: `a@` is `a+`, and `a{2,3}` is `a` two or three times. */
|
|
37229
|
+
quantify(atoms2, quantifier) {
|
|
37230
|
+
const last = atoms2.pop();
|
|
37231
|
+
if (last === void 0) throw new FindPatternError("Nothing to repeat in the search pattern");
|
|
37232
|
+
atoms2.push(`(?:${last})${quantifier}`);
|
|
37233
|
+
}
|
|
37234
|
+
/** Reads `n}`, `n,}` or `n,m}` (the opening brace is already read) as a quantifier. */
|
|
37235
|
+
repeatCount() {
|
|
37236
|
+
const close = this.query.indexOf("}", this.index);
|
|
37237
|
+
if (close < 0) throw new FindPatternError("Unmatched { in the search pattern");
|
|
37238
|
+
const body = this.query.slice(this.index, close);
|
|
37239
|
+
this.index = close + 1;
|
|
37240
|
+
const match = /^(\d+)(?:(,)(\d*))?$/.exec(body);
|
|
37241
|
+
if (!match) throw new FindPatternError("Invalid repeat count in the search pattern");
|
|
37242
|
+
const min = Number(match[1]);
|
|
37243
|
+
if (match[2] === void 0) return `{${min}}`;
|
|
37244
|
+
if (match[3] === "") return `{${min},}`;
|
|
37245
|
+
const max = Number(match[3]);
|
|
37246
|
+
if (max < min) throw new FindPatternError("A repeat count has a maximum below its minimum");
|
|
37247
|
+
return `{${min},${max}}`;
|
|
37248
|
+
}
|
|
37249
|
+
/** Reads `[abc]`, `[a-z]` or `[!x]` (the opening bracket is already read). */
|
|
37250
|
+
characterSet() {
|
|
37251
|
+
let negated = false;
|
|
37252
|
+
if (this.peek() === "!") {
|
|
37253
|
+
negated = true;
|
|
37254
|
+
this.index++;
|
|
37255
|
+
}
|
|
37256
|
+
const items = [];
|
|
37257
|
+
for (; ; ) {
|
|
37258
|
+
if (this.done) throw new FindPatternError("Unmatched [ in the search pattern");
|
|
37259
|
+
if (this.peek() === "]") {
|
|
37260
|
+
this.index++;
|
|
37261
|
+
break;
|
|
37262
|
+
}
|
|
37263
|
+
const first3 = this.take();
|
|
37264
|
+
const isRange = this.peek() === "-" && this.index + 1 < this.query.length && this.query.charAt(this.index + 1) !== "]";
|
|
37265
|
+
if (!isRange) {
|
|
37266
|
+
items.push(classCharacter(first3));
|
|
37267
|
+
continue;
|
|
37268
|
+
}
|
|
37269
|
+
this.index++;
|
|
37270
|
+
const last = this.take();
|
|
37271
|
+
if ((first3.codePointAt(0) ?? 0) > (last.codePointAt(0) ?? 0))
|
|
37272
|
+
throw new FindPatternError("A character range runs backwards in the search pattern");
|
|
37273
|
+
items.push(`${classCharacter(first3)}-${classCharacter(last)}`);
|
|
37274
|
+
}
|
|
37275
|
+
if (!items.length) throw new FindPatternError("Empty [ ] in the search pattern");
|
|
37276
|
+
return `[${negated ? "^" : ""}${items.join("")}]`;
|
|
37277
|
+
}
|
|
37278
|
+
};
|
|
37279
|
+
|
|
37280
|
+
// docx/find-pattern.ts
|
|
37281
|
+
var WORD_CHARACTERS2 = "\\p{L}\\p{M}\\p{N}_";
|
|
37282
|
+
var WHITE_SPACE_SKIP = "[^\\S\\r\\v\\f]";
|
|
37283
|
+
var PUNCTUATION_SKIP = "\\p{P}";
|
|
37284
|
+
var SOFT_HYPHEN_SKIP = "\\u00AD";
|
|
37285
|
+
var SOFT_HYPHEN2 = "\xAD";
|
|
37286
|
+
function literalAtoms(query) {
|
|
37287
|
+
const atoms2 = [];
|
|
37288
|
+
for (let index = 0; index < query.length; ) {
|
|
37289
|
+
const char = String.fromCodePoint(query.codePointAt(index) ?? 0);
|
|
37290
|
+
index += char.length;
|
|
37291
|
+
if (char === "^") {
|
|
37292
|
+
const code = String.fromCodePoint(query.codePointAt(index) ?? 0);
|
|
37293
|
+
if (!query.charAt(index)) throw new FindPatternError("The search code ^ ends the pattern");
|
|
37294
|
+
index += code.length;
|
|
37295
|
+
atoms2.push({ source: findCodeSource(code) });
|
|
37296
|
+
} else if (char === SOFT_HYPHEN2) {
|
|
37297
|
+
continue;
|
|
37298
|
+
} else {
|
|
37299
|
+
atoms2.push({ source: escapeFindChar(char), literal: char });
|
|
37300
|
+
}
|
|
37301
|
+
}
|
|
37302
|
+
return atoms2;
|
|
37303
|
+
}
|
|
37304
|
+
function ignored(atom, options2) {
|
|
37305
|
+
const char = atom.literal;
|
|
37306
|
+
if (char === void 0) return false;
|
|
37307
|
+
if (options2.ignoreWhitespace && /^[^\S\r\v\f]$/u.test(char)) return true;
|
|
37308
|
+
return Boolean(options2.ignorePunctuation) && /^\p{P}$/u.test(char);
|
|
37309
|
+
}
|
|
37310
|
+
function compileFindPattern(query, options2 = {}) {
|
|
37311
|
+
if (!query) return null;
|
|
37312
|
+
const flags = options2.matchCase ? "gu" : "giu";
|
|
37313
|
+
if (options2.wildcards) {
|
|
37314
|
+
const { source, groupCount } = wildcardSource(query);
|
|
37315
|
+
return { expression: new RegExp(source, flags), groupCount };
|
|
37316
|
+
}
|
|
37317
|
+
const atoms2 = literalAtoms(query).filter((atom) => !ignored(atom, options2));
|
|
37318
|
+
if (!atoms2.length) return null;
|
|
37319
|
+
const skips = [SOFT_HYPHEN_SKIP];
|
|
37320
|
+
if (options2.ignoreWhitespace) skips.push(WHITE_SPACE_SKIP);
|
|
37321
|
+
if (options2.ignorePunctuation) skips.push(PUNCTUATION_SKIP);
|
|
37322
|
+
const between = `(?:${skips.join("|")})*`;
|
|
37323
|
+
const body = atoms2.map((atom) => atom.source).join(between);
|
|
37324
|
+
const before = options2.wholeWords || options2.matchPrefix ? `(?<![${WORD_CHARACTERS2}])` : "";
|
|
37325
|
+
const after = options2.wholeWords || options2.matchSuffix ? `(?![${WORD_CHARACTERS2}])` : "";
|
|
37326
|
+
return { expression: new RegExp(before + body + after, flags), groupCount: 0 };
|
|
37327
|
+
}
|
|
37328
|
+
function graphemeBoundaries(text2) {
|
|
37329
|
+
const boundaries = /* @__PURE__ */ new Set([0, text2.length]);
|
|
37330
|
+
if (typeof Intl.Segmenter === "function") {
|
|
37331
|
+
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
37332
|
+
for (const part of segmenter.segment(text2)) boundaries.add(part.index);
|
|
37333
|
+
return boundaries;
|
|
37334
|
+
}
|
|
37335
|
+
for (let index = 0; index < text2.length; ) {
|
|
37336
|
+
const point = text2.codePointAt(index) ?? 0;
|
|
37337
|
+
index += point > 65535 ? 2 : 1;
|
|
37338
|
+
while (index < text2.length && /\p{Mark}/u.test(text2.charAt(index))) index++;
|
|
37339
|
+
boundaries.add(index);
|
|
37340
|
+
}
|
|
37341
|
+
return boundaries;
|
|
37342
|
+
}
|
|
37343
|
+
function findMatches(text2, query, options2 = {}) {
|
|
37344
|
+
const pattern = compileFindPattern(query, options2);
|
|
37345
|
+
if (!pattern) return [];
|
|
37346
|
+
const boundaries = graphemeBoundaries(text2);
|
|
37347
|
+
const matches = [];
|
|
37348
|
+
for (const found of text2.matchAll(pattern.expression)) {
|
|
37349
|
+
const start = found.index;
|
|
37350
|
+
const end = start + found[0].length;
|
|
37351
|
+
if (end === start || !boundaries.has(start) || !boundaries.has(end)) continue;
|
|
37352
|
+
matches.push({
|
|
37353
|
+
start,
|
|
37354
|
+
end,
|
|
37355
|
+
text: found[0],
|
|
37356
|
+
groups: Array.from(found, (group2) => group2 ?? "")
|
|
37357
|
+
});
|
|
37358
|
+
}
|
|
37359
|
+
return matches;
|
|
37360
|
+
}
|
|
37361
|
+
|
|
37362
|
+
// docx/find-replacement.ts
|
|
37363
|
+
var BREAK_CODES = {
|
|
37364
|
+
p: "paragraph",
|
|
37365
|
+
t: "tab",
|
|
37366
|
+
l: "lineBreak",
|
|
37367
|
+
m: "pageBreak",
|
|
37368
|
+
"-": "optionalHyphen",
|
|
37369
|
+
"~": "nonBreakingHyphen",
|
|
37370
|
+
s: "nonBreakingSpace"
|
|
37371
|
+
};
|
|
37372
|
+
function replacementParts(template, match, wildcards = false) {
|
|
37373
|
+
const parts = [];
|
|
37374
|
+
const push = (part) => {
|
|
37375
|
+
const last = parts[parts.length - 1];
|
|
37376
|
+
if (part.kind === "text" && last?.kind === "text")
|
|
37377
|
+
parts[parts.length - 1] = { kind: "text", text: last.text + part.text };
|
|
37378
|
+
else parts.push(part);
|
|
37379
|
+
};
|
|
37380
|
+
const text2 = (value) => push({ kind: "text", text: value });
|
|
37381
|
+
for (let index = 0; index < template.length; index++) {
|
|
37382
|
+
const char = template.charAt(index);
|
|
37383
|
+
if (char === "^") {
|
|
37384
|
+
const code = template.charAt(index + 1);
|
|
37385
|
+
if (!code) throw new FindPatternError("The replacement ends with ^");
|
|
37386
|
+
index++;
|
|
37387
|
+
if (code === "&") text2(match.text);
|
|
37388
|
+
else if (code === "^") text2("^");
|
|
37389
|
+
else {
|
|
37390
|
+
const kind = BREAK_CODES[code.toLowerCase()];
|
|
37391
|
+
if (!kind) throw new FindPatternError(`Unknown replacement code ^${code}`);
|
|
37392
|
+
push({ kind });
|
|
37393
|
+
}
|
|
37394
|
+
} else if (char === "\\" && wildcards) {
|
|
37395
|
+
const next = template.charAt(index + 1);
|
|
37396
|
+
if (!next) throw new FindPatternError("The replacement ends with \\");
|
|
37397
|
+
index++;
|
|
37398
|
+
if (/^[1-9]$/.test(next)) {
|
|
37399
|
+
const group2 = match.groups[Number(next)];
|
|
37400
|
+
if (group2 === void 0) throw new FindPatternError(`The pattern has no group ${next}`);
|
|
37401
|
+
text2(group2);
|
|
37402
|
+
} else text2(next);
|
|
37403
|
+
} else if (char === "\r" || char === "\n") {
|
|
37404
|
+
if (char === "\r" && template.charAt(index + 1) === "\n") index++;
|
|
37405
|
+
push({ kind: "lineBreak" });
|
|
37406
|
+
} else {
|
|
37407
|
+
text2(char);
|
|
37408
|
+
}
|
|
37409
|
+
}
|
|
37410
|
+
return parts;
|
|
37411
|
+
}
|
|
37412
|
+
function editRestrictionOf(protection) {
|
|
37413
|
+
if (!protection?.enforced) return void 0;
|
|
37414
|
+
const { edit } = protection;
|
|
37415
|
+
return edit === "readOnly" || edit === "comments" || edit === "trackedChanges" ? edit : void 0;
|
|
37416
|
+
}
|
|
37417
|
+
var forcesTrackChanges = (protection) => editRestrictionOf(protection) === "trackedChanges";
|
|
37418
|
+
function locksStories(protection) {
|
|
37419
|
+
return Boolean(protection?.enforced) && (protection?.edit === "forms" || editRestrictionOf(protection) !== void 0) && protection?.edit !== "trackedChanges";
|
|
37420
|
+
}
|
|
37421
|
+
var editRestrictionKey = new PluginKey("docx-edit-restriction");
|
|
37422
|
+
var isRemote3 = (tr) => tr.getMeta("y-sync$") !== void 0;
|
|
37423
|
+
function permissionRanges(doc) {
|
|
37424
|
+
const ranges = [];
|
|
37425
|
+
doc.descendants((node, pos) => {
|
|
37426
|
+
if (node.type.name === "paragraph") {
|
|
37427
|
+
const permissions = node.attrs.permissions;
|
|
37428
|
+
const end = pos + node.nodeSize - 1;
|
|
37429
|
+
for (const item2 of permissions ?? [])
|
|
37430
|
+
ranges.push({
|
|
37431
|
+
id: item2.id,
|
|
37432
|
+
...item2.fromPrevious && { fromPrevious: true },
|
|
37433
|
+
...item2.toNext && { toNext: true },
|
|
37434
|
+
from: Math.min(pos + 1 + item2.from, end),
|
|
37435
|
+
to: Math.min(pos + 1 + item2.to, end),
|
|
37436
|
+
...item2.group !== void 0 && { group: item2.group },
|
|
37437
|
+
...item2.user !== void 0 && { user: item2.user }
|
|
37438
|
+
});
|
|
37439
|
+
return false;
|
|
37440
|
+
}
|
|
37441
|
+
return true;
|
|
37442
|
+
});
|
|
37443
|
+
return ranges;
|
|
37444
|
+
}
|
|
37445
|
+
var rangeAllows = (range, user) => range.group === "everyone" || range.user !== void 0 && range.user.toLowerCase() === user.toLowerCase();
|
|
37446
|
+
var editableRanges = (state, user) => (editRestrictionKey.getState(state) ?? []).filter((range) => rangeAllows(range, user));
|
|
37447
|
+
function transactionAllowed(tr, restriction, ranges) {
|
|
37448
|
+
return tr.steps.every((step, index) => {
|
|
37449
|
+
if (step instanceof DocAttrStep) {
|
|
37450
|
+
const { attr: attr2, value } = step;
|
|
37451
|
+
if (restriction === "trackedChanges") return !(attr2 === "trackChanges" && !value);
|
|
37452
|
+
return restriction === "comments" && attr2 === "commentThreads";
|
|
37453
|
+
}
|
|
37454
|
+
if (step instanceof AttrStep && step.attr === "id")
|
|
37455
|
+
return true;
|
|
37456
|
+
if (restriction === "trackedChanges") return true;
|
|
37457
|
+
if (restriction === "comments" && (step instanceof AddMarkStep || step instanceof RemoveMarkStep) && step.mark.type.name === "comment")
|
|
37458
|
+
return true;
|
|
37459
|
+
const map = tr.mapping.slice(0, index);
|
|
37460
|
+
const within2 = (from, to) => ranges.some((range) => from >= map.map(range.from, -1) && to <= map.map(range.to, 1));
|
|
37461
|
+
if (step instanceof AttrStep) {
|
|
37462
|
+
const { pos } = step;
|
|
37463
|
+
return within2(pos, pos + 1);
|
|
37464
|
+
}
|
|
37465
|
+
if (step instanceof ReplaceStep || step instanceof ReplaceAroundStep || step instanceof AddMarkStep || step instanceof RemoveMarkStep) {
|
|
37466
|
+
const { from, to } = step;
|
|
37467
|
+
return within2(from, to);
|
|
37468
|
+
}
|
|
37469
|
+
return false;
|
|
37470
|
+
});
|
|
37471
|
+
}
|
|
37472
|
+
function editRestrictionPlugin(protection, user) {
|
|
37473
|
+
return new Plugin({
|
|
37474
|
+
key: editRestrictionKey,
|
|
37475
|
+
state: {
|
|
37476
|
+
init: (_config, state) => permissionRanges(state.doc),
|
|
37477
|
+
apply: (tr, ranges) => tr.getMeta(editRestrictionKey) === "reset" ? permissionRanges(tr.doc) : tr.docChanged ? ranges.map((range) => ({
|
|
37478
|
+
...range,
|
|
37479
|
+
from: tr.mapping.map(range.from, -1),
|
|
37480
|
+
to: tr.mapping.map(range.to, 1)
|
|
37481
|
+
})) : ranges
|
|
37482
|
+
},
|
|
37483
|
+
// The paragraphs' `permissions` follow the text through edits, so saving and rebuilding the
|
|
37484
|
+
// editor from the model see the ranges where they are now.
|
|
37485
|
+
appendTransaction: (transactions, _old, state) => {
|
|
37486
|
+
if (!transactions.some((tr2) => tr2.docChanged && !isRemote3(tr2))) return null;
|
|
37487
|
+
const ranges = editRestrictionKey.getState(state) ?? [];
|
|
37488
|
+
if (!ranges.length) return null;
|
|
37489
|
+
const tr = state.tr;
|
|
37490
|
+
const byParagraph = /* @__PURE__ */ new Map();
|
|
37491
|
+
for (const range of ranges) {
|
|
37492
|
+
const $from = state.doc.resolve(Math.min(range.from, state.doc.content.size));
|
|
37493
|
+
if ($from.parent.type.name !== "paragraph") continue;
|
|
37494
|
+
const pos = $from.before();
|
|
37495
|
+
const base = pos + 1;
|
|
37496
|
+
const end = pos + $from.parent.nodeSize - 1;
|
|
37497
|
+
byParagraph.set(pos, [
|
|
37498
|
+
...byParagraph.get(pos) ?? [],
|
|
37499
|
+
{
|
|
37500
|
+
id: range.id ?? "0",
|
|
37501
|
+
...range.group !== void 0 && { group: range.group },
|
|
37502
|
+
...range.user !== void 0 && { user: range.user },
|
|
37503
|
+
from: range.from - base,
|
|
37504
|
+
to: Math.min(range.to, end) - base,
|
|
37505
|
+
...range.fromPrevious && { fromPrevious: true },
|
|
37506
|
+
...range.toNext && { toNext: true }
|
|
37507
|
+
}
|
|
37508
|
+
]);
|
|
37509
|
+
}
|
|
37510
|
+
for (const [pos, list2] of byParagraph) {
|
|
37511
|
+
const node = state.doc.nodeAt(pos);
|
|
37512
|
+
if (node && JSON.stringify(node.attrs.permissions) !== JSON.stringify(list2))
|
|
37513
|
+
tr.setNodeAttribute(pos, "permissions", list2);
|
|
37514
|
+
}
|
|
37515
|
+
return tr.docChanged ? tr.setMeta("addToHistory", false) : null;
|
|
37516
|
+
},
|
|
37517
|
+
filterTransaction: (tr, state) => {
|
|
37518
|
+
const restriction = editRestrictionOf(protection());
|
|
37519
|
+
if (!restriction || !tr.docChanged || isRemote3(tr)) return true;
|
|
37520
|
+
return transactionAllowed(tr, restriction, editableRanges(state, user()));
|
|
37521
|
+
}
|
|
37522
|
+
});
|
|
37523
|
+
}
|
|
37524
|
+
var touches = (range, from, to) => range.from <= to && range.to >= from;
|
|
37525
|
+
function setEditableRegion(state, on, from = state.selection.from, to = state.selection.to) {
|
|
37526
|
+
if (from === to) return { error: "empty" };
|
|
37527
|
+
const all = editRestrictionKey.getState(state) ?? permissionRanges(state.doc);
|
|
37528
|
+
let next = Math.max(0, ...all.map((range) => Number(range.id) || 0)) + 1;
|
|
37529
|
+
const tr = state.tr;
|
|
37530
|
+
let blocked = false;
|
|
37531
|
+
state.doc.nodesBetween(from, to, (node, pos) => {
|
|
37532
|
+
if (node.type.name !== "paragraph") return true;
|
|
37533
|
+
const base = pos + 1;
|
|
37534
|
+
const end = pos + node.nodeSize - 1;
|
|
37535
|
+
const own2 = all.filter((range) => range.from >= base && range.to <= end);
|
|
37536
|
+
const a = Math.max(from, base) - base;
|
|
37537
|
+
const b = Math.min(to, end) - base;
|
|
37538
|
+
if (b <= a && !(node.content.size === 0 && on)) return false;
|
|
37539
|
+
if (own2.some(
|
|
37540
|
+
(range) => (range.fromPrevious || range.toNext) && touches(range, base + a, base + b)
|
|
37541
|
+
)) {
|
|
37542
|
+
blocked = true;
|
|
37543
|
+
return false;
|
|
37544
|
+
}
|
|
37545
|
+
const everyone = own2.filter((range) => range.group === "everyone");
|
|
37546
|
+
const others = own2.filter((range) => range.group !== "everyone");
|
|
37547
|
+
const relative = (range) => ({
|
|
37548
|
+
id: range.id ?? String(next++),
|
|
37549
|
+
...range.group !== void 0 && { group: range.group },
|
|
37550
|
+
...range.user !== void 0 && { user: range.user },
|
|
37551
|
+
from: range.from - base,
|
|
37552
|
+
to: range.to - base,
|
|
37553
|
+
...range.fromPrevious && { fromPrevious: true },
|
|
37554
|
+
...range.toNext && { toNext: true }
|
|
37555
|
+
});
|
|
37556
|
+
let kept;
|
|
37557
|
+
if (on) {
|
|
37558
|
+
const merged = everyone.filter((range) => touches(range, base + a, base + b));
|
|
37559
|
+
const rest = everyone.filter((range) => !merged.includes(range));
|
|
37560
|
+
const start = Math.min(a, ...merged.map((range) => range.from - base));
|
|
37561
|
+
const finish = Math.max(b, ...merged.map((range) => range.to - base));
|
|
37562
|
+
kept = [
|
|
37563
|
+
...rest.map(relative),
|
|
37564
|
+
{ id: merged[0]?.id ?? String(next++), group: "everyone", from: start, to: finish }
|
|
37565
|
+
];
|
|
37566
|
+
} else {
|
|
37567
|
+
kept = [];
|
|
37568
|
+
for (const range of everyone) {
|
|
37569
|
+
const r = relative(range);
|
|
37570
|
+
if (!touches(range, base + a, base + b) || r.to <= a || r.from >= b) kept.push(r);
|
|
37571
|
+
else {
|
|
37572
|
+
if (r.from < a) kept.push({ ...r, to: a });
|
|
37573
|
+
if (r.to > b) kept.push({ ...r, id: r.from < a ? String(next++) : r.id, from: b });
|
|
37574
|
+
}
|
|
37575
|
+
}
|
|
37576
|
+
}
|
|
37577
|
+
kept.push(...others.map(relative));
|
|
37578
|
+
kept.sort((x, y) => x.from - y.from);
|
|
37579
|
+
tr.setNodeAttribute(pos, "permissions", kept.length ? kept : null);
|
|
37580
|
+
return false;
|
|
37581
|
+
});
|
|
37582
|
+
if (blocked) return { error: "spansParagraphs" };
|
|
37583
|
+
return { tr: tr.setMeta(editRestrictionKey, "reset") };
|
|
37584
|
+
}
|
|
37585
|
+
function nextEditableRegion(state, user) {
|
|
37586
|
+
const ranges = editableRanges(state, user).filter((range) => range.to >= range.from).sort((a, b) => a.from - b.from);
|
|
37587
|
+
const next = ranges.find((range) => range.from > state.selection.from) ?? ranges[0];
|
|
37588
|
+
return next ? TextSelection.create(state.doc, next.from, next.to) : null;
|
|
37589
|
+
}
|
|
37590
|
+
|
|
37591
|
+
export { CONTROL_EDIT_META, CollaborationAuthority, CollaborationClient, DirtyState, EDITOR_THEME_MODES, FIELD_RESULT_REPAIR_META, FIND_LINE_BREAK, FIND_OBJECT, FIND_PAGE_BREAK, FIND_PARAGRAPH_MARK, FORM_FIELD_EDIT_META, FindPatternError, 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, compileFindPattern, contentControlPlugin, continuationsOf, controlAt, controlAtSelection, controlFromData, controlFromValue, controlOfMark, controlSpans, countWords, createCollaborationIdGenerator, createToggleFormat, cssBorderSide, darkTheme, deleteAroundMarkers, deleteColumns, deleteComment, deleteFieldSelection, deleteRow, deleteToPlaceholder, dispatchIsolatedCommand, documentWordCount, editRestrictionKey, editRestrictionOf, editRestrictionPlugin, editableRanges, emptySimpleFieldResult, escapeFindChar, everyControlSpan, exceedsFormTextLength, expectDefined, explicitOffFields, extraRunFields, extraRunProperties, fieldGuardPlugin, fieldMarkerNodeSpec, fieldResultRanges, fieldsBalanced, findCodeSource, findMatches, fitZoomPercent, forcesTrackChanges, 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, locksStories, markSpecs, marksForRun, mergeCells, mergeOrigin, moveName, newControlId, nextEditableRegion, nodeChart, nodeNumbering, normalizeMerges, normalizeRibbonActions, normalizeThemeMode, notePartsJson, noteReferenceNodeSpec, operatesFormField, pageBreakNodeSpec, paragraphAttrs, paragraphBoxCss, paragraphFormattingRevision, paragraphFromAttrs, parseBatch, parseBordersJson, pasteInCell, permissionRanges, placementClass, positionalTabInputPlugin, previewDocxDiagram, rangeAllows, refreshWordYjsPresence, rejectAllChanges, rejectChangeAtCursor, rejectRevisionRange, removeCommentAnchor, removeCommentThread, removeWordLink, repairCollaborativeDocumentIds, repairCollaborativeParagraphIds, replaceAroundMarkers, replaceControlContent, replaceSelectedChart, replacementParts, replyToComment, resolveCellVisuals, resolveComment, resolveNoteRevisions, restoreNoteParts, restoreSectionParts, reviewMarks, ribbonActionIdForLabel, rowSpanOf, runPropertiesMark, runToInlineNodes, sameJson2 as sameJson, sameRuns, sectionPartsJson, selectFormDropDownAt, selectedChart, setCommentThreads, setEditableRegion, setReviewRecordingPreferences, spanOf, splitCell, staysInFormFields, svgMarkupSpec, swatchColor, symbolFontPlugin, tableCellStyle, tableControlSpans, tableGrid, tableStructureGuardPlugin, tableStyle, themeDrawing, themeToCssVars, toggleCheckboxControl, toggleFormCheckboxAt, toggleTrackChanges, toggleTrackFormatting, toggleTrackMoves, trackChangesPlugin, trackChangesPluginKey, transactionAllowed, typeOverPlaceholder, updateCommentThreads, updateControlProperties, violatesControlLock, wordHighlightColors, wordLinkRangeAt, wordYjsPluginKey, wordYjsPresencePlugin, wordYjsRedo, wordYjsUndo };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph-attributes.d.ts","sourceRoot":"","sources":["../../../docx/ui/paragraph-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnD,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,YAC/B,UAAU,EACV,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,qBAAqB,CACZ,CAAC;AAEX,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"paragraph-attributes.d.ts","sourceRoot":"","sources":["../../../docx/ui/paragraph-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnD,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,YAC/B,UAAU,EACV,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,qBAAqB,CACZ,CAAC;AAEX,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,SAAS,CAiCvF;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,KAAK,CAsC1D"}
|