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.cjs
CHANGED
|
@@ -2183,11 +2183,11 @@ function extensionPrefix(doc, ns, preferred) {
|
|
|
2183
2183
|
function declareIgnorableExtension(doc, ns, preferred) {
|
|
2184
2184
|
const prefix = extensionPrefix(doc, ns, preferred);
|
|
2185
2185
|
const mc = extensionPrefix(doc, MC, "mc");
|
|
2186
|
-
const
|
|
2186
|
+
const ignored2 = new Set(
|
|
2187
2187
|
(doc.documentElement.getAttributeNS(MC, "Ignorable") ?? "").split(/\s+/).filter(Boolean)
|
|
2188
2188
|
);
|
|
2189
|
-
|
|
2190
|
-
doc.documentElement.setAttributeNS(MC, `${mc}:Ignorable`, [...
|
|
2189
|
+
ignored2.add(prefix);
|
|
2190
|
+
doc.documentElement.setAttributeNS(MC, `${mc}:Ignorable`, [...ignored2].join(" "));
|
|
2191
2191
|
return prefix;
|
|
2192
2192
|
}
|
|
2193
2193
|
function writeLigatures(doc, props, value) {
|
|
@@ -30116,9 +30116,12 @@ function reconcileBookmarks(doc, starts, ends, names, baseNames, nextId) {
|
|
|
30116
30116
|
}
|
|
30117
30117
|
return { starts: keptStarts, ends: keptEnds };
|
|
30118
30118
|
}
|
|
30119
|
+
function changedPermissionMarkers(doc, paragraph, base, source, length) {
|
|
30120
|
+
return void 0;
|
|
30121
|
+
}
|
|
30119
30122
|
|
|
30120
30123
|
// docx/numbering-write.ts
|
|
30121
|
-
function
|
|
30124
|
+
function setAttribute7(element3, local, value) {
|
|
30122
30125
|
element3.setAttributeNS(WORD_NS, `w:${local}`, value);
|
|
30123
30126
|
}
|
|
30124
30127
|
function sameNumbering(a, b) {
|
|
@@ -30130,10 +30133,10 @@ function writeNumberingProperties(doc, props, paragraph, base) {
|
|
|
30130
30133
|
if (!paragraph.numbering) return;
|
|
30131
30134
|
const numPr = makeW(doc, "numPr");
|
|
30132
30135
|
const ilvl = makeW(doc, "ilvl");
|
|
30133
|
-
|
|
30136
|
+
setAttribute7(ilvl, "val", String(paragraph.numbering.level));
|
|
30134
30137
|
numPr.appendChild(ilvl);
|
|
30135
30138
|
const numId = makeW(doc, "numId");
|
|
30136
|
-
|
|
30139
|
+
setAttribute7(numId, "val", String(paragraph.numbering.numId));
|
|
30137
30140
|
numPr.appendChild(numId);
|
|
30138
30141
|
props.appendChild(numPr);
|
|
30139
30142
|
}
|
|
@@ -30686,7 +30689,7 @@ function runsToWriteAnew(paragraph, base, slots) {
|
|
|
30686
30689
|
}
|
|
30687
30690
|
|
|
30688
30691
|
// docx/write-paragraph.ts
|
|
30689
|
-
function
|
|
30692
|
+
function setAttribute8(element3, local, value) {
|
|
30690
30693
|
element3.setAttributeNS(WORD_NS, `w:${local}`, value);
|
|
30691
30694
|
}
|
|
30692
30695
|
function removeChildren4(element3, local) {
|
|
@@ -30724,7 +30727,7 @@ function writeParagraphImpl(doc, paragraph, node, base, allocator, spans) {
|
|
|
30724
30727
|
const jc = paragraphJustification(paragraph);
|
|
30725
30728
|
if (jc) {
|
|
30726
30729
|
const align = makeW(doc, "jc");
|
|
30727
|
-
|
|
30730
|
+
setAttribute8(align, "val", jc);
|
|
30728
30731
|
pPr.appendChild(align);
|
|
30729
30732
|
}
|
|
30730
30733
|
}
|
|
@@ -30732,7 +30735,7 @@ function writeParagraphImpl(doc, paragraph, node, base, allocator, spans) {
|
|
|
30732
30735
|
removeChildren4(pPr, "pStyle");
|
|
30733
30736
|
if (paragraph.style) {
|
|
30734
30737
|
const style = makeW(doc, "pStyle");
|
|
30735
|
-
|
|
30738
|
+
setAttribute8(style, "val", paragraph.style);
|
|
30736
30739
|
pPr.appendChild(style);
|
|
30737
30740
|
}
|
|
30738
30741
|
}
|
|
@@ -30757,7 +30760,14 @@ function writeParagraphImpl(doc, paragraph, node, base, allocator, spans) {
|
|
|
30757
30760
|
const source = new Set(sourceBookmarks);
|
|
30758
30761
|
const kept = /* @__PURE__ */ new Set([...starts, ...ends]);
|
|
30759
30762
|
const sourcePositions = runPositions([]);
|
|
30760
|
-
const
|
|
30763
|
+
const permissions = changedPermissionMarkers(
|
|
30764
|
+
doc,
|
|
30765
|
+
paragraph,
|
|
30766
|
+
base,
|
|
30767
|
+
markers.map((marker) => marker.element),
|
|
30768
|
+
runPositions(paragraph.runs).at(-1)
|
|
30769
|
+
);
|
|
30770
|
+
const read = markers.filter((marker) => !isBookmark(marker.element) || kept.has(marker.element)).filter((marker) => !permissions?.drop.has(marker.element)).map((marker) => {
|
|
30761
30771
|
const position2 = sourcePositions[marker.boundary] ?? 0;
|
|
30762
30772
|
const annotation = marker.annotation;
|
|
30763
30773
|
return {
|
|
@@ -30772,9 +30782,10 @@ function writeParagraphImpl(doc, paragraph, node, base, allocator, spans) {
|
|
|
30772
30782
|
});
|
|
30773
30783
|
const end = runPositions(paragraph.runs).at(-1);
|
|
30774
30784
|
const sources = containerSources(paragraph.runs, base?.runs, slots);
|
|
30775
|
-
const carried = orderRangeEnds(
|
|
30776
|
-
read.map((marker) => ({ ...marker, position: marker.opening ? 0 : end }))
|
|
30777
|
-
|
|
30785
|
+
const carried = orderRangeEnds([
|
|
30786
|
+
...read.map((marker) => ({ ...marker, position: marker.opening ? 0 : end })),
|
|
30787
|
+
...permissions?.added ?? []
|
|
30788
|
+
]);
|
|
30778
30789
|
for (const marker of markers) marker.element.parentNode?.removeChild(marker.element);
|
|
30779
30790
|
for (const oldNode of replaceableInlineChildren(node)) node.removeChild(oldNode);
|
|
30780
30791
|
const { nodes, placed, containers } = buildInlineContent(
|
|
@@ -31940,6 +31951,7 @@ function paragraphFromAttrs(attrs3, id, runs) {
|
|
|
31940
31951
|
...attrs3.borders ? { borders: structuredClone(attrs3.borders) } : {},
|
|
31941
31952
|
...attrs3.shadingFill ? { shadingFill: attrs3.shadingFill } : {},
|
|
31942
31953
|
...attrs3.bookmarks?.length ? { bookmarks: [...attrs3.bookmarks] } : {},
|
|
31954
|
+
...attrs3.permissions?.length ? { permissions: structuredClone(attrs3.permissions) } : {},
|
|
31943
31955
|
...attrs3.contentControl ? { contentControl: structuredClone(attrs3.contentControl) } : {}
|
|
31944
31956
|
};
|
|
31945
31957
|
}
|
|
@@ -31978,6 +31990,7 @@ function paragraphAttrs(paragraph) {
|
|
|
31978
31990
|
borders: paragraph.borders ?? null,
|
|
31979
31991
|
shadingFill: paragraph.shadingFill ?? null,
|
|
31980
31992
|
bookmarks: paragraph.bookmarks ?? [],
|
|
31993
|
+
permissions: paragraph.permissions ?? null,
|
|
31981
31994
|
contentControl: paragraph.contentControl ?? null
|
|
31982
31995
|
};
|
|
31983
31996
|
}
|
|
@@ -35710,7 +35723,15 @@ var WORD_CAPABILITY_ACTIONS = {
|
|
|
35710
35723
|
print: ["print"],
|
|
35711
35724
|
copy: ["cut", "copy"],
|
|
35712
35725
|
comment: ["add-comment", "delete-comment", "previous-comment", "next-comment", "comments"],
|
|
35713
|
-
review: [
|
|
35726
|
+
review: [
|
|
35727
|
+
"track-changes",
|
|
35728
|
+
"tracking-options",
|
|
35729
|
+
"restrict-editing",
|
|
35730
|
+
"accept",
|
|
35731
|
+
"reject",
|
|
35732
|
+
"accept-all",
|
|
35733
|
+
"reject-all"
|
|
35734
|
+
],
|
|
35714
35735
|
find: ["find-and-replace", "replace", "find-options"]
|
|
35715
35736
|
};
|
|
35716
35737
|
var WORD_CAPABILITY_FILE_COMMANDS = {
|
|
@@ -35909,6 +35930,7 @@ var RIBBON_ACTION_IDS = [
|
|
|
35909
35930
|
"run-direction",
|
|
35910
35931
|
"track-changes",
|
|
35911
35932
|
"tracking-options",
|
|
35933
|
+
"restrict-editing",
|
|
35912
35934
|
"display-for-review",
|
|
35913
35935
|
"previous-change",
|
|
35914
35936
|
"next-change",
|
|
@@ -36105,6 +36127,7 @@ var RIBBON_ACTION_LABELS = {
|
|
|
36105
36127
|
"run-direction": "Run direction",
|
|
36106
36128
|
"track-changes": "Track changes",
|
|
36107
36129
|
"tracking-options": "Tracking options",
|
|
36130
|
+
"restrict-editing": "Restrict editing",
|
|
36108
36131
|
"display-for-review": "Display for review",
|
|
36109
36132
|
"previous-change": "Previous change",
|
|
36110
36133
|
"next-change": "Next change",
|
|
@@ -37015,17 +37038,17 @@ function staysInFormFields(tr, kept) {
|
|
|
37015
37038
|
if (!(step instanceof prosemirrorTransform.ReplaceStep || step instanceof prosemirrorTransform.ReplaceAroundStep || step instanceof prosemirrorTransform.AddMarkStep || step instanceof prosemirrorTransform.RemoveMarkStep))
|
|
37016
37039
|
return false;
|
|
37017
37040
|
const { from, to } = step;
|
|
37018
|
-
const
|
|
37041
|
+
const touches2 = (ranges, start2, end2) => ranges.some((range) => start2 < map.map(range.to, -1) && end2 > map.map(range.from, 1));
|
|
37019
37042
|
const marks = step instanceof prosemirrorTransform.AddMarkStep || step instanceof prosemirrorTransform.RemoveMarkStep;
|
|
37020
|
-
if (!internal && !tracked && (within2(plain, from, to) ||
|
|
37043
|
+
if (!internal && !tracked && (within2(plain, from, to) || touches2(plain, from, to))) {
|
|
37021
37044
|
if (marks) return false;
|
|
37022
37045
|
const stored = kept && from === map.map(kept.at) ? kept.marks : null;
|
|
37023
37046
|
if (step instanceof prosemirrorTransform.ReplaceStep && writesFormatting(step, tr.docs[index], stored))
|
|
37024
37047
|
return false;
|
|
37025
37048
|
}
|
|
37026
|
-
let changesFixed = marks &&
|
|
37049
|
+
let changesFixed = marks && touches2(fixed, from, to);
|
|
37027
37050
|
step.getMap().forEach((start2, end2) => {
|
|
37028
|
-
changesFixed ||=
|
|
37051
|
+
changesFixed ||= touches2(fixed, start2, end2);
|
|
37029
37052
|
});
|
|
37030
37053
|
if (changesFixed) return false;
|
|
37031
37054
|
if (within2(fields, from, to))
|
|
@@ -37101,13 +37124,504 @@ function formFieldGuardPlugin(protection) {
|
|
|
37101
37124
|
});
|
|
37102
37125
|
}
|
|
37103
37126
|
|
|
37127
|
+
// docx/find-syntax.ts
|
|
37128
|
+
var FIND_PARAGRAPH_MARK = "\r";
|
|
37129
|
+
var FIND_LINE_BREAK = "\v";
|
|
37130
|
+
var FIND_PAGE_BREAK = "\f";
|
|
37131
|
+
var FIND_OBJECT = "\0";
|
|
37132
|
+
var FindPatternError = class extends Error {
|
|
37133
|
+
constructor(message) {
|
|
37134
|
+
super(message);
|
|
37135
|
+
this.name = "FindPatternError";
|
|
37136
|
+
}
|
|
37137
|
+
};
|
|
37138
|
+
var SYNTAX_CHARACTERS = "^$\\.*+?()[]{}|/";
|
|
37139
|
+
function escapeFindChar(char) {
|
|
37140
|
+
return SYNTAX_CHARACTERS.includes(char) ? `\\${char}` : char;
|
|
37141
|
+
}
|
|
37142
|
+
var FIND_CODE_SOURCE = {
|
|
37143
|
+
p: FIND_PARAGRAPH_MARK,
|
|
37144
|
+
t: " ",
|
|
37145
|
+
l: FIND_LINE_BREAK,
|
|
37146
|
+
m: FIND_PAGE_BREAK,
|
|
37147
|
+
s: "\xA0",
|
|
37148
|
+
"~": "\u2011",
|
|
37149
|
+
"-": "\xAD",
|
|
37150
|
+
"^": "\\^",
|
|
37151
|
+
"?": "[^\\u0000\\r]",
|
|
37152
|
+
"#": "\\p{Nd}",
|
|
37153
|
+
$: "\\p{L}",
|
|
37154
|
+
w: "[^\\S\\r]"
|
|
37155
|
+
};
|
|
37156
|
+
function findCodeSource(code) {
|
|
37157
|
+
const source = FIND_CODE_SOURCE[code.toLowerCase()];
|
|
37158
|
+
if (source === void 0) throw new FindPatternError(`Unknown search code ^${code}`);
|
|
37159
|
+
return source;
|
|
37160
|
+
}
|
|
37161
|
+
|
|
37162
|
+
// docx/find-wildcards.ts
|
|
37163
|
+
var WORD_CHARACTERS = "\\p{L}\\p{M}\\p{N}_";
|
|
37164
|
+
var WILDCARD_ANY = "[^\\u0000\\r]";
|
|
37165
|
+
var MAX_GROUPS = 9;
|
|
37166
|
+
function wildcardSource(query) {
|
|
37167
|
+
const parser = new WildcardParser(query);
|
|
37168
|
+
const source = parser.sequence(0);
|
|
37169
|
+
if (!parser.done) throw new FindPatternError("Unmatched ) in the search pattern");
|
|
37170
|
+
return { source, groupCount: parser.groupCount };
|
|
37171
|
+
}
|
|
37172
|
+
function classCharacter(char) {
|
|
37173
|
+
return /[\\\]\[^-]/u.test(char) ? `\\${char}` : char;
|
|
37174
|
+
}
|
|
37175
|
+
var WildcardParser = class {
|
|
37176
|
+
constructor(query) {
|
|
37177
|
+
this.query = query;
|
|
37178
|
+
}
|
|
37179
|
+
query;
|
|
37180
|
+
index = 0;
|
|
37181
|
+
groupCount = 0;
|
|
37182
|
+
get done() {
|
|
37183
|
+
return this.index >= this.query.length;
|
|
37184
|
+
}
|
|
37185
|
+
/** The next whole character (a surrogate pair is one character). */
|
|
37186
|
+
take() {
|
|
37187
|
+
const code = this.query.codePointAt(this.index);
|
|
37188
|
+
if (code === void 0) throw new FindPatternError("The search pattern ends unexpectedly");
|
|
37189
|
+
const char = String.fromCodePoint(code);
|
|
37190
|
+
this.index += char.length;
|
|
37191
|
+
return char;
|
|
37192
|
+
}
|
|
37193
|
+
peek() {
|
|
37194
|
+
return this.query.charAt(this.index);
|
|
37195
|
+
}
|
|
37196
|
+
/** The atoms up to a closing parenthesis, or the end of the pattern, as one expression. */
|
|
37197
|
+
sequence(depth) {
|
|
37198
|
+
const atoms2 = [];
|
|
37199
|
+
while (!this.done) {
|
|
37200
|
+
if (this.peek() === ")") {
|
|
37201
|
+
if (depth === 0) throw new FindPatternError("Unmatched ) in the search pattern");
|
|
37202
|
+
break;
|
|
37203
|
+
}
|
|
37204
|
+
const char = this.take();
|
|
37205
|
+
switch (char) {
|
|
37206
|
+
case "(": {
|
|
37207
|
+
this.groupCount++;
|
|
37208
|
+
if (this.groupCount > MAX_GROUPS)
|
|
37209
|
+
throw new FindPatternError("A search pattern may hold nine groups");
|
|
37210
|
+
const inner = this.sequence(depth + 1);
|
|
37211
|
+
if (this.peek() !== ")") throw new FindPatternError("Unmatched ( in the search pattern");
|
|
37212
|
+
this.index++;
|
|
37213
|
+
atoms2.push(`(${inner})`);
|
|
37214
|
+
break;
|
|
37215
|
+
}
|
|
37216
|
+
case "?":
|
|
37217
|
+
atoms2.push(WILDCARD_ANY);
|
|
37218
|
+
break;
|
|
37219
|
+
case "*":
|
|
37220
|
+
atoms2.push(`${WILDCARD_ANY}*?`);
|
|
37221
|
+
break;
|
|
37222
|
+
case "<":
|
|
37223
|
+
atoms2.push(`(?<![${WORD_CHARACTERS}])`);
|
|
37224
|
+
break;
|
|
37225
|
+
case ">":
|
|
37226
|
+
atoms2.push(`(?![${WORD_CHARACTERS}])`);
|
|
37227
|
+
break;
|
|
37228
|
+
case "[":
|
|
37229
|
+
atoms2.push(this.characterSet());
|
|
37230
|
+
break;
|
|
37231
|
+
case "@":
|
|
37232
|
+
this.quantify(atoms2, "+");
|
|
37233
|
+
break;
|
|
37234
|
+
case "{":
|
|
37235
|
+
this.quantify(atoms2, this.repeatCount());
|
|
37236
|
+
break;
|
|
37237
|
+
case "\\":
|
|
37238
|
+
if (this.done) throw new FindPatternError("The search pattern ends with \\");
|
|
37239
|
+
atoms2.push(escapeFindChar(this.take()));
|
|
37240
|
+
break;
|
|
37241
|
+
case "^":
|
|
37242
|
+
atoms2.push(findCodeSource(this.take()));
|
|
37243
|
+
break;
|
|
37244
|
+
default:
|
|
37245
|
+
atoms2.push(escapeFindChar(char));
|
|
37246
|
+
}
|
|
37247
|
+
}
|
|
37248
|
+
return atoms2.join("");
|
|
37249
|
+
}
|
|
37250
|
+
/** Repeats the last atom: `a@` is `a+`, and `a{2,3}` is `a` two or three times. */
|
|
37251
|
+
quantify(atoms2, quantifier) {
|
|
37252
|
+
const last = atoms2.pop();
|
|
37253
|
+
if (last === void 0) throw new FindPatternError("Nothing to repeat in the search pattern");
|
|
37254
|
+
atoms2.push(`(?:${last})${quantifier}`);
|
|
37255
|
+
}
|
|
37256
|
+
/** Reads `n}`, `n,}` or `n,m}` (the opening brace is already read) as a quantifier. */
|
|
37257
|
+
repeatCount() {
|
|
37258
|
+
const close = this.query.indexOf("}", this.index);
|
|
37259
|
+
if (close < 0) throw new FindPatternError("Unmatched { in the search pattern");
|
|
37260
|
+
const body = this.query.slice(this.index, close);
|
|
37261
|
+
this.index = close + 1;
|
|
37262
|
+
const match = /^(\d+)(?:(,)(\d*))?$/.exec(body);
|
|
37263
|
+
if (!match) throw new FindPatternError("Invalid repeat count in the search pattern");
|
|
37264
|
+
const min = Number(match[1]);
|
|
37265
|
+
if (match[2] === void 0) return `{${min}}`;
|
|
37266
|
+
if (match[3] === "") return `{${min},}`;
|
|
37267
|
+
const max = Number(match[3]);
|
|
37268
|
+
if (max < min) throw new FindPatternError("A repeat count has a maximum below its minimum");
|
|
37269
|
+
return `{${min},${max}}`;
|
|
37270
|
+
}
|
|
37271
|
+
/** Reads `[abc]`, `[a-z]` or `[!x]` (the opening bracket is already read). */
|
|
37272
|
+
characterSet() {
|
|
37273
|
+
let negated = false;
|
|
37274
|
+
if (this.peek() === "!") {
|
|
37275
|
+
negated = true;
|
|
37276
|
+
this.index++;
|
|
37277
|
+
}
|
|
37278
|
+
const items = [];
|
|
37279
|
+
for (; ; ) {
|
|
37280
|
+
if (this.done) throw new FindPatternError("Unmatched [ in the search pattern");
|
|
37281
|
+
if (this.peek() === "]") {
|
|
37282
|
+
this.index++;
|
|
37283
|
+
break;
|
|
37284
|
+
}
|
|
37285
|
+
const first3 = this.take();
|
|
37286
|
+
const isRange = this.peek() === "-" && this.index + 1 < this.query.length && this.query.charAt(this.index + 1) !== "]";
|
|
37287
|
+
if (!isRange) {
|
|
37288
|
+
items.push(classCharacter(first3));
|
|
37289
|
+
continue;
|
|
37290
|
+
}
|
|
37291
|
+
this.index++;
|
|
37292
|
+
const last = this.take();
|
|
37293
|
+
if ((first3.codePointAt(0) ?? 0) > (last.codePointAt(0) ?? 0))
|
|
37294
|
+
throw new FindPatternError("A character range runs backwards in the search pattern");
|
|
37295
|
+
items.push(`${classCharacter(first3)}-${classCharacter(last)}`);
|
|
37296
|
+
}
|
|
37297
|
+
if (!items.length) throw new FindPatternError("Empty [ ] in the search pattern");
|
|
37298
|
+
return `[${negated ? "^" : ""}${items.join("")}]`;
|
|
37299
|
+
}
|
|
37300
|
+
};
|
|
37301
|
+
|
|
37302
|
+
// docx/find-pattern.ts
|
|
37303
|
+
var WORD_CHARACTERS2 = "\\p{L}\\p{M}\\p{N}_";
|
|
37304
|
+
var WHITE_SPACE_SKIP = "[^\\S\\r\\v\\f]";
|
|
37305
|
+
var PUNCTUATION_SKIP = "\\p{P}";
|
|
37306
|
+
var SOFT_HYPHEN_SKIP = "\\u00AD";
|
|
37307
|
+
var SOFT_HYPHEN2 = "\xAD";
|
|
37308
|
+
function literalAtoms(query) {
|
|
37309
|
+
const atoms2 = [];
|
|
37310
|
+
for (let index = 0; index < query.length; ) {
|
|
37311
|
+
const char = String.fromCodePoint(query.codePointAt(index) ?? 0);
|
|
37312
|
+
index += char.length;
|
|
37313
|
+
if (char === "^") {
|
|
37314
|
+
const code = String.fromCodePoint(query.codePointAt(index) ?? 0);
|
|
37315
|
+
if (!query.charAt(index)) throw new FindPatternError("The search code ^ ends the pattern");
|
|
37316
|
+
index += code.length;
|
|
37317
|
+
atoms2.push({ source: findCodeSource(code) });
|
|
37318
|
+
} else if (char === SOFT_HYPHEN2) {
|
|
37319
|
+
continue;
|
|
37320
|
+
} else {
|
|
37321
|
+
atoms2.push({ source: escapeFindChar(char), literal: char });
|
|
37322
|
+
}
|
|
37323
|
+
}
|
|
37324
|
+
return atoms2;
|
|
37325
|
+
}
|
|
37326
|
+
function ignored(atom, options2) {
|
|
37327
|
+
const char = atom.literal;
|
|
37328
|
+
if (char === void 0) return false;
|
|
37329
|
+
if (options2.ignoreWhitespace && /^[^\S\r\v\f]$/u.test(char)) return true;
|
|
37330
|
+
return Boolean(options2.ignorePunctuation) && /^\p{P}$/u.test(char);
|
|
37331
|
+
}
|
|
37332
|
+
function compileFindPattern(query, options2 = {}) {
|
|
37333
|
+
if (!query) return null;
|
|
37334
|
+
const flags = options2.matchCase ? "gu" : "giu";
|
|
37335
|
+
if (options2.wildcards) {
|
|
37336
|
+
const { source, groupCount } = wildcardSource(query);
|
|
37337
|
+
return { expression: new RegExp(source, flags), groupCount };
|
|
37338
|
+
}
|
|
37339
|
+
const atoms2 = literalAtoms(query).filter((atom) => !ignored(atom, options2));
|
|
37340
|
+
if (!atoms2.length) return null;
|
|
37341
|
+
const skips = [SOFT_HYPHEN_SKIP];
|
|
37342
|
+
if (options2.ignoreWhitespace) skips.push(WHITE_SPACE_SKIP);
|
|
37343
|
+
if (options2.ignorePunctuation) skips.push(PUNCTUATION_SKIP);
|
|
37344
|
+
const between = `(?:${skips.join("|")})*`;
|
|
37345
|
+
const body = atoms2.map((atom) => atom.source).join(between);
|
|
37346
|
+
const before = options2.wholeWords || options2.matchPrefix ? `(?<![${WORD_CHARACTERS2}])` : "";
|
|
37347
|
+
const after = options2.wholeWords || options2.matchSuffix ? `(?![${WORD_CHARACTERS2}])` : "";
|
|
37348
|
+
return { expression: new RegExp(before + body + after, flags), groupCount: 0 };
|
|
37349
|
+
}
|
|
37350
|
+
function graphemeBoundaries(text2) {
|
|
37351
|
+
const boundaries = /* @__PURE__ */ new Set([0, text2.length]);
|
|
37352
|
+
if (typeof Intl.Segmenter === "function") {
|
|
37353
|
+
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
37354
|
+
for (const part of segmenter.segment(text2)) boundaries.add(part.index);
|
|
37355
|
+
return boundaries;
|
|
37356
|
+
}
|
|
37357
|
+
for (let index = 0; index < text2.length; ) {
|
|
37358
|
+
const point = text2.codePointAt(index) ?? 0;
|
|
37359
|
+
index += point > 65535 ? 2 : 1;
|
|
37360
|
+
while (index < text2.length && /\p{Mark}/u.test(text2.charAt(index))) index++;
|
|
37361
|
+
boundaries.add(index);
|
|
37362
|
+
}
|
|
37363
|
+
return boundaries;
|
|
37364
|
+
}
|
|
37365
|
+
function findMatches(text2, query, options2 = {}) {
|
|
37366
|
+
const pattern = compileFindPattern(query, options2);
|
|
37367
|
+
if (!pattern) return [];
|
|
37368
|
+
const boundaries = graphemeBoundaries(text2);
|
|
37369
|
+
const matches = [];
|
|
37370
|
+
for (const found of text2.matchAll(pattern.expression)) {
|
|
37371
|
+
const start = found.index;
|
|
37372
|
+
const end = start + found[0].length;
|
|
37373
|
+
if (end === start || !boundaries.has(start) || !boundaries.has(end)) continue;
|
|
37374
|
+
matches.push({
|
|
37375
|
+
start,
|
|
37376
|
+
end,
|
|
37377
|
+
text: found[0],
|
|
37378
|
+
groups: Array.from(found, (group2) => group2 ?? "")
|
|
37379
|
+
});
|
|
37380
|
+
}
|
|
37381
|
+
return matches;
|
|
37382
|
+
}
|
|
37383
|
+
|
|
37384
|
+
// docx/find-replacement.ts
|
|
37385
|
+
var BREAK_CODES = {
|
|
37386
|
+
p: "paragraph",
|
|
37387
|
+
t: "tab",
|
|
37388
|
+
l: "lineBreak",
|
|
37389
|
+
m: "pageBreak",
|
|
37390
|
+
"-": "optionalHyphen",
|
|
37391
|
+
"~": "nonBreakingHyphen",
|
|
37392
|
+
s: "nonBreakingSpace"
|
|
37393
|
+
};
|
|
37394
|
+
function replacementParts(template, match, wildcards = false) {
|
|
37395
|
+
const parts = [];
|
|
37396
|
+
const push = (part) => {
|
|
37397
|
+
const last = parts[parts.length - 1];
|
|
37398
|
+
if (part.kind === "text" && last?.kind === "text")
|
|
37399
|
+
parts[parts.length - 1] = { kind: "text", text: last.text + part.text };
|
|
37400
|
+
else parts.push(part);
|
|
37401
|
+
};
|
|
37402
|
+
const text2 = (value) => push({ kind: "text", text: value });
|
|
37403
|
+
for (let index = 0; index < template.length; index++) {
|
|
37404
|
+
const char = template.charAt(index);
|
|
37405
|
+
if (char === "^") {
|
|
37406
|
+
const code = template.charAt(index + 1);
|
|
37407
|
+
if (!code) throw new FindPatternError("The replacement ends with ^");
|
|
37408
|
+
index++;
|
|
37409
|
+
if (code === "&") text2(match.text);
|
|
37410
|
+
else if (code === "^") text2("^");
|
|
37411
|
+
else {
|
|
37412
|
+
const kind = BREAK_CODES[code.toLowerCase()];
|
|
37413
|
+
if (!kind) throw new FindPatternError(`Unknown replacement code ^${code}`);
|
|
37414
|
+
push({ kind });
|
|
37415
|
+
}
|
|
37416
|
+
} else if (char === "\\" && wildcards) {
|
|
37417
|
+
const next = template.charAt(index + 1);
|
|
37418
|
+
if (!next) throw new FindPatternError("The replacement ends with \\");
|
|
37419
|
+
index++;
|
|
37420
|
+
if (/^[1-9]$/.test(next)) {
|
|
37421
|
+
const group2 = match.groups[Number(next)];
|
|
37422
|
+
if (group2 === void 0) throw new FindPatternError(`The pattern has no group ${next}`);
|
|
37423
|
+
text2(group2);
|
|
37424
|
+
} else text2(next);
|
|
37425
|
+
} else if (char === "\r" || char === "\n") {
|
|
37426
|
+
if (char === "\r" && template.charAt(index + 1) === "\n") index++;
|
|
37427
|
+
push({ kind: "lineBreak" });
|
|
37428
|
+
} else {
|
|
37429
|
+
text2(char);
|
|
37430
|
+
}
|
|
37431
|
+
}
|
|
37432
|
+
return parts;
|
|
37433
|
+
}
|
|
37434
|
+
function editRestrictionOf(protection) {
|
|
37435
|
+
if (!protection?.enforced) return void 0;
|
|
37436
|
+
const { edit } = protection;
|
|
37437
|
+
return edit === "readOnly" || edit === "comments" || edit === "trackedChanges" ? edit : void 0;
|
|
37438
|
+
}
|
|
37439
|
+
var forcesTrackChanges = (protection) => editRestrictionOf(protection) === "trackedChanges";
|
|
37440
|
+
function locksStories(protection) {
|
|
37441
|
+
return Boolean(protection?.enforced) && (protection?.edit === "forms" || editRestrictionOf(protection) !== void 0) && protection?.edit !== "trackedChanges";
|
|
37442
|
+
}
|
|
37443
|
+
var editRestrictionKey = new prosemirrorState.PluginKey("docx-edit-restriction");
|
|
37444
|
+
var isRemote3 = (tr) => tr.getMeta("y-sync$") !== void 0;
|
|
37445
|
+
function permissionRanges(doc) {
|
|
37446
|
+
const ranges = [];
|
|
37447
|
+
doc.descendants((node, pos) => {
|
|
37448
|
+
if (node.type.name === "paragraph") {
|
|
37449
|
+
const permissions = node.attrs.permissions;
|
|
37450
|
+
const end = pos + node.nodeSize - 1;
|
|
37451
|
+
for (const item2 of permissions ?? [])
|
|
37452
|
+
ranges.push({
|
|
37453
|
+
id: item2.id,
|
|
37454
|
+
...item2.fromPrevious && { fromPrevious: true },
|
|
37455
|
+
...item2.toNext && { toNext: true },
|
|
37456
|
+
from: Math.min(pos + 1 + item2.from, end),
|
|
37457
|
+
to: Math.min(pos + 1 + item2.to, end),
|
|
37458
|
+
...item2.group !== void 0 && { group: item2.group },
|
|
37459
|
+
...item2.user !== void 0 && { user: item2.user }
|
|
37460
|
+
});
|
|
37461
|
+
return false;
|
|
37462
|
+
}
|
|
37463
|
+
return true;
|
|
37464
|
+
});
|
|
37465
|
+
return ranges;
|
|
37466
|
+
}
|
|
37467
|
+
var rangeAllows = (range, user) => range.group === "everyone" || range.user !== void 0 && range.user.toLowerCase() === user.toLowerCase();
|
|
37468
|
+
var editableRanges = (state, user) => (editRestrictionKey.getState(state) ?? []).filter((range) => rangeAllows(range, user));
|
|
37469
|
+
function transactionAllowed(tr, restriction, ranges) {
|
|
37470
|
+
return tr.steps.every((step, index) => {
|
|
37471
|
+
if (step instanceof prosemirrorTransform.DocAttrStep) {
|
|
37472
|
+
const { attr: attr2, value } = step;
|
|
37473
|
+
if (restriction === "trackedChanges") return !(attr2 === "trackChanges" && !value);
|
|
37474
|
+
return restriction === "comments" && attr2 === "commentThreads";
|
|
37475
|
+
}
|
|
37476
|
+
if (step instanceof prosemirrorTransform.AttrStep && step.attr === "id")
|
|
37477
|
+
return true;
|
|
37478
|
+
if (restriction === "trackedChanges") return true;
|
|
37479
|
+
if (restriction === "comments" && (step instanceof prosemirrorTransform.AddMarkStep || step instanceof prosemirrorTransform.RemoveMarkStep) && step.mark.type.name === "comment")
|
|
37480
|
+
return true;
|
|
37481
|
+
const map = tr.mapping.slice(0, index);
|
|
37482
|
+
const within2 = (from, to) => ranges.some((range) => from >= map.map(range.from, -1) && to <= map.map(range.to, 1));
|
|
37483
|
+
if (step instanceof prosemirrorTransform.AttrStep) {
|
|
37484
|
+
const { pos } = step;
|
|
37485
|
+
return within2(pos, pos + 1);
|
|
37486
|
+
}
|
|
37487
|
+
if (step instanceof prosemirrorTransform.ReplaceStep || step instanceof prosemirrorTransform.ReplaceAroundStep || step instanceof prosemirrorTransform.AddMarkStep || step instanceof prosemirrorTransform.RemoveMarkStep) {
|
|
37488
|
+
const { from, to } = step;
|
|
37489
|
+
return within2(from, to);
|
|
37490
|
+
}
|
|
37491
|
+
return false;
|
|
37492
|
+
});
|
|
37493
|
+
}
|
|
37494
|
+
function editRestrictionPlugin(protection, user) {
|
|
37495
|
+
return new prosemirrorState.Plugin({
|
|
37496
|
+
key: editRestrictionKey,
|
|
37497
|
+
state: {
|
|
37498
|
+
init: (_config, state) => permissionRanges(state.doc),
|
|
37499
|
+
apply: (tr, ranges) => tr.getMeta(editRestrictionKey) === "reset" ? permissionRanges(tr.doc) : tr.docChanged ? ranges.map((range) => ({
|
|
37500
|
+
...range,
|
|
37501
|
+
from: tr.mapping.map(range.from, -1),
|
|
37502
|
+
to: tr.mapping.map(range.to, 1)
|
|
37503
|
+
})) : ranges
|
|
37504
|
+
},
|
|
37505
|
+
// The paragraphs' `permissions` follow the text through edits, so saving and rebuilding the
|
|
37506
|
+
// editor from the model see the ranges where they are now.
|
|
37507
|
+
appendTransaction: (transactions, _old, state) => {
|
|
37508
|
+
if (!transactions.some((tr2) => tr2.docChanged && !isRemote3(tr2))) return null;
|
|
37509
|
+
const ranges = editRestrictionKey.getState(state) ?? [];
|
|
37510
|
+
if (!ranges.length) return null;
|
|
37511
|
+
const tr = state.tr;
|
|
37512
|
+
const byParagraph = /* @__PURE__ */ new Map();
|
|
37513
|
+
for (const range of ranges) {
|
|
37514
|
+
const $from = state.doc.resolve(Math.min(range.from, state.doc.content.size));
|
|
37515
|
+
if ($from.parent.type.name !== "paragraph") continue;
|
|
37516
|
+
const pos = $from.before();
|
|
37517
|
+
const base = pos + 1;
|
|
37518
|
+
const end = pos + $from.parent.nodeSize - 1;
|
|
37519
|
+
byParagraph.set(pos, [
|
|
37520
|
+
...byParagraph.get(pos) ?? [],
|
|
37521
|
+
{
|
|
37522
|
+
id: range.id ?? "0",
|
|
37523
|
+
...range.group !== void 0 && { group: range.group },
|
|
37524
|
+
...range.user !== void 0 && { user: range.user },
|
|
37525
|
+
from: range.from - base,
|
|
37526
|
+
to: Math.min(range.to, end) - base,
|
|
37527
|
+
...range.fromPrevious && { fromPrevious: true },
|
|
37528
|
+
...range.toNext && { toNext: true }
|
|
37529
|
+
}
|
|
37530
|
+
]);
|
|
37531
|
+
}
|
|
37532
|
+
for (const [pos, list2] of byParagraph) {
|
|
37533
|
+
const node = state.doc.nodeAt(pos);
|
|
37534
|
+
if (node && JSON.stringify(node.attrs.permissions) !== JSON.stringify(list2))
|
|
37535
|
+
tr.setNodeAttribute(pos, "permissions", list2);
|
|
37536
|
+
}
|
|
37537
|
+
return tr.docChanged ? tr.setMeta("addToHistory", false) : null;
|
|
37538
|
+
},
|
|
37539
|
+
filterTransaction: (tr, state) => {
|
|
37540
|
+
const restriction = editRestrictionOf(protection());
|
|
37541
|
+
if (!restriction || !tr.docChanged || isRemote3(tr)) return true;
|
|
37542
|
+
return transactionAllowed(tr, restriction, editableRanges(state, user()));
|
|
37543
|
+
}
|
|
37544
|
+
});
|
|
37545
|
+
}
|
|
37546
|
+
var touches = (range, from, to) => range.from <= to && range.to >= from;
|
|
37547
|
+
function setEditableRegion(state, on, from = state.selection.from, to = state.selection.to) {
|
|
37548
|
+
if (from === to) return { error: "empty" };
|
|
37549
|
+
const all = editRestrictionKey.getState(state) ?? permissionRanges(state.doc);
|
|
37550
|
+
let next = Math.max(0, ...all.map((range) => Number(range.id) || 0)) + 1;
|
|
37551
|
+
const tr = state.tr;
|
|
37552
|
+
let blocked = false;
|
|
37553
|
+
state.doc.nodesBetween(from, to, (node, pos) => {
|
|
37554
|
+
if (node.type.name !== "paragraph") return true;
|
|
37555
|
+
const base = pos + 1;
|
|
37556
|
+
const end = pos + node.nodeSize - 1;
|
|
37557
|
+
const own2 = all.filter((range) => range.from >= base && range.to <= end);
|
|
37558
|
+
const a = Math.max(from, base) - base;
|
|
37559
|
+
const b = Math.min(to, end) - base;
|
|
37560
|
+
if (b <= a && !(node.content.size === 0 && on)) return false;
|
|
37561
|
+
if (own2.some(
|
|
37562
|
+
(range) => (range.fromPrevious || range.toNext) && touches(range, base + a, base + b)
|
|
37563
|
+
)) {
|
|
37564
|
+
blocked = true;
|
|
37565
|
+
return false;
|
|
37566
|
+
}
|
|
37567
|
+
const everyone = own2.filter((range) => range.group === "everyone");
|
|
37568
|
+
const others = own2.filter((range) => range.group !== "everyone");
|
|
37569
|
+
const relative = (range) => ({
|
|
37570
|
+
id: range.id ?? String(next++),
|
|
37571
|
+
...range.group !== void 0 && { group: range.group },
|
|
37572
|
+
...range.user !== void 0 && { user: range.user },
|
|
37573
|
+
from: range.from - base,
|
|
37574
|
+
to: range.to - base,
|
|
37575
|
+
...range.fromPrevious && { fromPrevious: true },
|
|
37576
|
+
...range.toNext && { toNext: true }
|
|
37577
|
+
});
|
|
37578
|
+
let kept;
|
|
37579
|
+
if (on) {
|
|
37580
|
+
const merged = everyone.filter((range) => touches(range, base + a, base + b));
|
|
37581
|
+
const rest = everyone.filter((range) => !merged.includes(range));
|
|
37582
|
+
const start = Math.min(a, ...merged.map((range) => range.from - base));
|
|
37583
|
+
const finish = Math.max(b, ...merged.map((range) => range.to - base));
|
|
37584
|
+
kept = [
|
|
37585
|
+
...rest.map(relative),
|
|
37586
|
+
{ id: merged[0]?.id ?? String(next++), group: "everyone", from: start, to: finish }
|
|
37587
|
+
];
|
|
37588
|
+
} else {
|
|
37589
|
+
kept = [];
|
|
37590
|
+
for (const range of everyone) {
|
|
37591
|
+
const r = relative(range);
|
|
37592
|
+
if (!touches(range, base + a, base + b) || r.to <= a || r.from >= b) kept.push(r);
|
|
37593
|
+
else {
|
|
37594
|
+
if (r.from < a) kept.push({ ...r, to: a });
|
|
37595
|
+
if (r.to > b) kept.push({ ...r, id: r.from < a ? String(next++) : r.id, from: b });
|
|
37596
|
+
}
|
|
37597
|
+
}
|
|
37598
|
+
}
|
|
37599
|
+
kept.push(...others.map(relative));
|
|
37600
|
+
kept.sort((x, y) => x.from - y.from);
|
|
37601
|
+
tr.setNodeAttribute(pos, "permissions", kept.length ? kept : null);
|
|
37602
|
+
return false;
|
|
37603
|
+
});
|
|
37604
|
+
if (blocked) return { error: "spansParagraphs" };
|
|
37605
|
+
return { tr: tr.setMeta(editRestrictionKey, "reset") };
|
|
37606
|
+
}
|
|
37607
|
+
function nextEditableRegion(state, user) {
|
|
37608
|
+
const ranges = editableRanges(state, user).filter((range) => range.to >= range.from).sort((a, b) => a.from - b.from);
|
|
37609
|
+
const next = ranges.find((range) => range.from > state.selection.from) ?? ranges[0];
|
|
37610
|
+
return next ? prosemirrorState.TextSelection.create(state.doc, next.from, next.to) : null;
|
|
37611
|
+
}
|
|
37612
|
+
|
|
37104
37613
|
exports.CONTROL_EDIT_META = CONTROL_EDIT_META;
|
|
37105
37614
|
exports.CollaborationAuthority = CollaborationAuthority;
|
|
37106
37615
|
exports.CollaborationClient = CollaborationClient;
|
|
37107
37616
|
exports.DirtyState = DirtyState;
|
|
37108
37617
|
exports.EDITOR_THEME_MODES = EDITOR_THEME_MODES;
|
|
37109
37618
|
exports.FIELD_RESULT_REPAIR_META = FIELD_RESULT_REPAIR_META;
|
|
37619
|
+
exports.FIND_LINE_BREAK = FIND_LINE_BREAK;
|
|
37620
|
+
exports.FIND_OBJECT = FIND_OBJECT;
|
|
37621
|
+
exports.FIND_PAGE_BREAK = FIND_PAGE_BREAK;
|
|
37622
|
+
exports.FIND_PARAGRAPH_MARK = FIND_PARAGRAPH_MARK;
|
|
37110
37623
|
exports.FORM_FIELD_EDIT_META = FORM_FIELD_EDIT_META;
|
|
37624
|
+
exports.FindPatternError = FindPatternError;
|
|
37111
37625
|
exports.HEADER_FOOTER_INPUT = HEADER_FOOTER_INPUT;
|
|
37112
37626
|
exports.NotePartsStep = NotePartsStep;
|
|
37113
37627
|
exports.PAGE_GAP = PAGE_GAP;
|
|
@@ -37151,6 +37665,7 @@ exports.commentIdsAtSelection = commentIdsAtSelection;
|
|
|
37151
37665
|
exports.commentIdsFromMarks = commentIdsFromMarks;
|
|
37152
37666
|
exports.commentIdsFromNode = commentIdsFromNode;
|
|
37153
37667
|
exports.commentThreadsFromDoc = commentThreadsFromDoc;
|
|
37668
|
+
exports.compileFindPattern = compileFindPattern;
|
|
37154
37669
|
exports.contentControlPlugin = contentControlPlugin;
|
|
37155
37670
|
exports.continuationsOf = continuationsOf;
|
|
37156
37671
|
exports.controlAt = controlAt;
|
|
@@ -37172,7 +37687,12 @@ exports.deleteRow = deleteRow;
|
|
|
37172
37687
|
exports.deleteToPlaceholder = deleteToPlaceholder;
|
|
37173
37688
|
exports.dispatchIsolatedCommand = dispatchIsolatedCommand;
|
|
37174
37689
|
exports.documentWordCount = documentWordCount;
|
|
37690
|
+
exports.editRestrictionKey = editRestrictionKey;
|
|
37691
|
+
exports.editRestrictionOf = editRestrictionOf;
|
|
37692
|
+
exports.editRestrictionPlugin = editRestrictionPlugin;
|
|
37693
|
+
exports.editableRanges = editableRanges;
|
|
37175
37694
|
exports.emptySimpleFieldResult = emptySimpleFieldResult;
|
|
37695
|
+
exports.escapeFindChar = escapeFindChar;
|
|
37176
37696
|
exports.everyControlSpan = everyControlSpan;
|
|
37177
37697
|
exports.exceedsFormTextLength = exceedsFormTextLength;
|
|
37178
37698
|
exports.expectDefined = expectDefined;
|
|
@@ -37183,7 +37703,10 @@ exports.fieldGuardPlugin = fieldGuardPlugin;
|
|
|
37183
37703
|
exports.fieldMarkerNodeSpec = fieldMarkerNodeSpec;
|
|
37184
37704
|
exports.fieldResultRanges = fieldResultRanges;
|
|
37185
37705
|
exports.fieldsBalanced = fieldsBalanced;
|
|
37706
|
+
exports.findCodeSource = findCodeSource;
|
|
37707
|
+
exports.findMatches = findMatches;
|
|
37186
37708
|
exports.fitZoomPercent = fitZoomPercent;
|
|
37709
|
+
exports.forcesTrackChanges = forcesTrackChanges;
|
|
37187
37710
|
exports.formFieldBeside = formFieldBeside;
|
|
37188
37711
|
exports.formFieldGuardPlugin = formFieldGuardPlugin;
|
|
37189
37712
|
exports.formFieldLocked = formFieldLocked;
|
|
@@ -37217,12 +37740,14 @@ exports.ligatureStyle = ligatureStyle;
|
|
|
37217
37740
|
exports.lightTheme = lightTheme;
|
|
37218
37741
|
exports.linkFromMarks = linkFromMarks;
|
|
37219
37742
|
exports.linkMarkSpec = linkMarkSpec;
|
|
37743
|
+
exports.locksStories = locksStories;
|
|
37220
37744
|
exports.markSpecs = markSpecs;
|
|
37221
37745
|
exports.marksForRun = marksForRun;
|
|
37222
37746
|
exports.mergeCells = mergeCells;
|
|
37223
37747
|
exports.mergeOrigin = mergeOrigin;
|
|
37224
37748
|
exports.moveName = moveName;
|
|
37225
37749
|
exports.newControlId = newControlId;
|
|
37750
|
+
exports.nextEditableRegion = nextEditableRegion;
|
|
37226
37751
|
exports.nodeChart = nodeChart;
|
|
37227
37752
|
exports.nodeNumbering = nodeNumbering;
|
|
37228
37753
|
exports.normalizeMerges = normalizeMerges;
|
|
@@ -37239,9 +37764,11 @@ exports.paragraphFromAttrs = paragraphFromAttrs;
|
|
|
37239
37764
|
exports.parseBatch = parseBatch;
|
|
37240
37765
|
exports.parseBordersJson = parseBordersJson;
|
|
37241
37766
|
exports.pasteInCell = pasteInCell;
|
|
37767
|
+
exports.permissionRanges = permissionRanges;
|
|
37242
37768
|
exports.placementClass = placementClass;
|
|
37243
37769
|
exports.positionalTabInputPlugin = positionalTabInputPlugin;
|
|
37244
37770
|
exports.previewDocxDiagram = previewDocxDiagram;
|
|
37771
|
+
exports.rangeAllows = rangeAllows;
|
|
37245
37772
|
exports.refreshWordYjsPresence = refreshWordYjsPresence;
|
|
37246
37773
|
exports.rejectAllChanges = rejectAllChanges;
|
|
37247
37774
|
exports.rejectChangeAtCursor = rejectChangeAtCursor;
|
|
@@ -37254,6 +37781,7 @@ exports.repairCollaborativeParagraphIds = repairCollaborativeParagraphIds;
|
|
|
37254
37781
|
exports.replaceAroundMarkers = replaceAroundMarkers;
|
|
37255
37782
|
exports.replaceControlContent = replaceControlContent;
|
|
37256
37783
|
exports.replaceSelectedChart = replaceSelectedChart;
|
|
37784
|
+
exports.replacementParts = replacementParts;
|
|
37257
37785
|
exports.replyToComment = replyToComment;
|
|
37258
37786
|
exports.resolveCellVisuals = resolveCellVisuals;
|
|
37259
37787
|
exports.resolveComment = resolveComment;
|
|
@@ -37271,6 +37799,7 @@ exports.sectionPartsJson = sectionPartsJson;
|
|
|
37271
37799
|
exports.selectFormDropDownAt = selectFormDropDownAt;
|
|
37272
37800
|
exports.selectedChart = selectedChart;
|
|
37273
37801
|
exports.setCommentThreads = setCommentThreads;
|
|
37802
|
+
exports.setEditableRegion = setEditableRegion;
|
|
37274
37803
|
exports.setReviewRecordingPreferences = setReviewRecordingPreferences;
|
|
37275
37804
|
exports.spanOf = spanOf;
|
|
37276
37805
|
exports.splitCell = splitCell;
|
|
@@ -37292,6 +37821,7 @@ exports.toggleTrackFormatting = toggleTrackFormatting;
|
|
|
37292
37821
|
exports.toggleTrackMoves = toggleTrackMoves;
|
|
37293
37822
|
exports.trackChangesPlugin = trackChangesPlugin;
|
|
37294
37823
|
exports.trackChangesPluginKey = trackChangesPluginKey;
|
|
37824
|
+
exports.transactionAllowed = transactionAllowed;
|
|
37295
37825
|
exports.typeOverPlaceholder = typeOverPlaceholder;
|
|
37296
37826
|
exports.updateCommentThreads = updateCommentThreads;
|
|
37297
37827
|
exports.updateControlProperties = updateControlProperties;
|