ooxml-core 1.37.0 → 1.38.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/README.md +7 -0
- package/dist/automation/index.cjs +207 -207
- package/dist/automation/index.mjs +207 -207
- package/dist/{chunk-M2DFN3SP.mjs → chunk-XBIZIBTJ.mjs} +507 -10
- package/dist/collab/merge-values.d.ts +14 -0
- package/dist/collab/merge-values.d.ts.map +1 -0
- package/dist/docx/embedded.cjs +476 -474
- package/dist/docx/embedded.mjs +476 -474
- package/dist/docx/index.cjs +1075 -719
- package/dist/docx/index.d.ts +1 -0
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +1075 -720
- package/dist/docx/layout/index.cjs +4 -0
- package/dist/docx/layout/index.mjs +4 -0
- package/dist/docx/load/index.cjs +164 -164
- package/dist/docx/load/index.mjs +164 -164
- package/dist/docx/merge-snapshots.d.ts +9 -0
- package/dist/docx/merge-snapshots.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +155 -155
- package/dist/docx/ui/index.mjs +155 -155
- package/dist/embedding/index.cjs +207 -0
- package/dist/embedding/index.d.ts +3 -0
- package/dist/embedding/index.d.ts.map +1 -1
- package/dist/embedding/index.mjs +205 -1
- package/dist/embedding/onedrive/client.d.ts +4 -0
- package/dist/embedding/onedrive/client.d.ts.map +1 -0
- package/dist/embedding/onedrive/index.cjs +617 -0
- package/dist/embedding/onedrive/index.d.ts +6 -0
- package/dist/embedding/onedrive/index.d.ts.map +1 -0
- package/dist/embedding/onedrive/index.mjs +611 -0
- package/dist/embedding/onedrive/metadata.d.ts +6 -0
- package/dist/embedding/onedrive/metadata.d.ts.map +1 -0
- package/dist/embedding/onedrive/requests.d.ts +8 -0
- package/dist/embedding/onedrive/requests.d.ts.map +1 -0
- package/dist/embedding/onedrive/session.d.ts +4 -0
- package/dist/embedding/onedrive/session.d.ts.map +1 -0
- package/dist/embedding/onedrive/transport.d.ts +9 -0
- package/dist/embedding/onedrive/transport.d.ts.map +1 -0
- package/dist/embedding/onedrive/types.d.ts +86 -0
- package/dist/embedding/onedrive/types.d.ts.map +1 -0
- package/dist/embedding/onedrive/upload.d.ts +3 -0
- package/dist/embedding/onedrive/upload.d.ts.map +1 -0
- package/dist/embedding/storage-merge.d.ts +8 -0
- package/dist/embedding/storage-merge.d.ts.map +1 -0
- package/dist/embedding/storage-session.d.ts +7 -0
- package/dist/embedding/storage-session.d.ts.map +1 -0
- package/dist/embedding/versioned-storage.d.ts +67 -0
- package/dist/embedding/versioned-storage.d.ts.map +1 -0
- package/dist/index.cjs +1013 -340
- package/dist/index.mjs +1013 -340
- package/dist/opc/index.cjs +680 -216
- package/dist/opc/index.d.ts +1 -0
- package/dist/opc/index.d.ts.map +1 -1
- package/dist/opc/index.mjs +680 -217
- package/dist/opc/merge-snapshots.d.ts +26 -0
- package/dist/opc/merge-snapshots.d.ts.map +1 -0
- package/dist/pptx/automation/index.cjs +20 -6
- package/dist/pptx/automation/index.d.ts +8 -17
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +1 -1
- package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/chart-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/chart-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/element-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/element-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/export-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/export-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/geometry-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/geometry-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/index.d.ts +1 -3
- package/dist/pptx/automation/schemas/index.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/json-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/json-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/layout-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/layout-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/lock-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/lock-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/metadata-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/metadata-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/ole-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/ole-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/presentation-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/presentation-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/section-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/section-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/slide-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/slide-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/smartart-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/smartart-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/table-style-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/table-style-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/template-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/template-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/theme-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/theme-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/validation-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/validation-schemas.d.ts.map +1 -1
- package/dist/pptx/chunks/{collaboration-text-codec-Du_XeE_i.d.ts → collaboration-text-codec-1VmwD3yq.d.ts} +1 -3
- package/dist/pptx/chunks/collaboration-text-codec-1VmwD3yq.d.ts.map +1 -0
- package/dist/pptx/chunks/{collaboration-text-merge-DWWWdT_t.d.ts → collaboration-text-merge-B-tth-0W.d.ts} +2 -4
- package/dist/pptx/chunks/collaboration-text-merge-B-tth-0W.d.ts.map +1 -0
- package/dist/pptx/chunks/{collaboration-text-positions-MMT3GkZi.d.ts → collaboration-text-positions-D-1Jo1Fz.d.ts} +1 -3
- package/dist/pptx/chunks/collaboration-text-positions-D-1Jo1Fz.d.ts.map +1 -0
- package/dist/pptx/chunks/{collaboration-text-session-D0NOLQk7.d.ts → collaboration-text-session-CWHTaWF4.d.ts} +4 -6
- package/dist/pptx/chunks/collaboration-text-session-CWHTaWF4.d.ts.map +1 -0
- package/dist/pptx/chunks/{collaboration-text-session-delta-CzJGrTKJ.d.ts → collaboration-text-session-delta-Dxzybssp.d.ts} +2 -4
- package/dist/pptx/chunks/collaboration-text-session-delta-Dxzybssp.d.ts.map +1 -0
- package/dist/pptx/chunks/{color-ref-DT599vEx.d.ts → color-ref-CwUQoKPJ.d.ts} +1 -3
- package/dist/pptx/chunks/color-ref-CwUQoKPJ.d.ts.map +1 -0
- package/dist/pptx/chunks/{elements-f3UbFph-.d.ts → elements-DheCTwi0.d.ts} +4 -54
- package/dist/pptx/chunks/elements-DheCTwi0.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-Bp-1pGo1.d.ts → index-B4ofjG6_.d.ts} +6 -384
- package/dist/pptx/chunks/index-B4ofjG6_.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-BnH2QjYm.d.ts → index-Jcce8TlI.d.ts} +5 -37
- package/dist/pptx/chunks/index-Jcce8TlI.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-pLLN4OTz.d.ts → index-bgj0Ztnq.d.ts} +23 -543
- package/dist/pptx/chunks/index-bgj0Ztnq.d.ts.map +1 -0
- package/dist/pptx/chunks/{inspection-status-DjiWd_Aa.d.ts → inspection-status-TKac7eqb.d.ts} +1 -13
- package/dist/pptx/chunks/inspection-status-TKac7eqb.d.ts.map +1 -0
- package/dist/pptx/chunks/{schemas-fuDGetRe.d.ts → schemas-LHsDbVOw.d.ts} +1 -29
- package/dist/pptx/chunks/schemas-LHsDbVOw.d.ts.map +1 -0
- package/dist/pptx/chunks/{smart-art-CmOrPLLQ.d.ts → smart-art-DB37AsFP.d.ts} +2 -46
- package/dist/pptx/chunks/smart-art-DB37AsFP.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-D5sgspO6.d.ts → text-operations-CdgEnFuK.d.ts} +4 -32
- package/dist/pptx/chunks/text-operations-CdgEnFuK.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-P9xVnXXf.d.ts → text-t_wJ2OwM.d.ts} +2 -12
- package/dist/pptx/chunks/text-t_wJ2OwM.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +20 -6
- package/dist/pptx/cli/index.d.ts +1 -3
- package/dist/pptx/cli/index.d.ts.map +1 -1
- package/dist/pptx/converter/index.cjs +7 -0
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/editor/ai/table-merge.d.ts +0 -2
- package/dist/pptx/editor/ai/table-merge.d.ts.map +1 -1
- package/dist/pptx/editor/loader/element-patch-walker.d.ts +0 -2
- package/dist/pptx/editor/loader/element-patch-walker.d.ts.map +1 -1
- package/dist/pptx/editor/loader/is-external-url.d.ts +0 -2
- package/dist/pptx/editor/loader/is-external-url.d.ts.map +1 -1
- package/dist/pptx/editor/loader/lazy-image-resolution.d.ts +0 -2
- package/dist/pptx/editor/loader/lazy-image-resolution.d.ts.map +1 -1
- package/dist/pptx/editor/loader/load-content-helpers.d.ts +0 -2
- package/dist/pptx/editor/loader/load-content-helpers.d.ts.map +1 -1
- package/dist/pptx/editor/loader/table-style-image-paths.d.ts +0 -2
- package/dist/pptx/editor/loader/table-style-image-paths.d.ts.map +1 -1
- package/dist/pptx/editor/loader/text-fill-image-paths.d.ts +0 -2
- package/dist/pptx/editor/loader/text-fill-image-paths.d.ts.map +1 -1
- package/dist/pptx/editor/render/bullet-list.d.ts +0 -2
- package/dist/pptx/editor/render/bullet-list.d.ts.map +1 -1
- package/dist/pptx/editor/render/bullet-toggle.d.ts +0 -2
- package/dist/pptx/editor/render/bullet-toggle.d.ts.map +1 -1
- package/dist/pptx/editor/render/chart-user-shape-edit.d.ts +0 -2
- package/dist/pptx/editor/render/chart-user-shape-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/clone.d.ts +0 -2
- package/dist/pptx/editor/render/clone.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-active-session.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-active-session.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-departure.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-departure.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-load-origin.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-load-origin.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-reconcile.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-reconcile.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.d.ts +4 -8
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-codec.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-lease.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-text-lease.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-merge.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-native-edit.d.ts +2 -4
- package/dist/pptx/editor/render/collaboration-text-native-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-positions.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-projection.d.ts +1 -3
- package/dist/pptx/editor/render/collaboration-text-projection.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-session-apply.d.ts +3 -5
- package/dist/pptx/editor/render/collaboration-text-session-apply.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-session-delta.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-session-paragraph.d.ts +1 -3
- package/dist/pptx/editor/render/collaboration-text-session-paragraph.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-session.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-snapshot-positions.d.ts +2 -4
- package/dist/pptx/editor/render/collaboration-text-snapshot-positions.d.ts.map +1 -1
- package/dist/pptx/editor/render/custom-show-operations.d.ts +0 -2
- package/dist/pptx/editor/render/custom-show-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/deck-save-encryption.d.ts +0 -2
- package/dist/pptx/editor/render/deck-save-encryption.d.ts.map +1 -1
- package/dist/pptx/editor/render/editor-history.d.ts +0 -2
- package/dist/pptx/editor/render/editor-history.d.ts.map +1 -1
- package/dist/pptx/editor/render/editor-mutations.d.ts +0 -2
- package/dist/pptx/editor/render/editor-mutations.d.ts.map +1 -1
- package/dist/pptx/editor/render/element-locks.d.ts +0 -2
- package/dist/pptx/editor/render/element-locks.d.ts.map +1 -1
- package/dist/pptx/editor/render/element-operations.d.ts +0 -2
- package/dist/pptx/editor/render/element-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/element.d.ts +0 -2
- package/dist/pptx/editor/render/element.d.ts.map +1 -1
- package/dist/pptx/editor/render/find-replace.d.ts +2 -4
- package/dist/pptx/editor/render/find-replace.d.ts.map +1 -1
- package/dist/pptx/editor/render/font-family-update.d.ts +1 -3
- package/dist/pptx/editor/render/font-family-update.d.ts.map +1 -1
- package/dist/pptx/editor/render/group-drill.d.ts +0 -2
- package/dist/pptx/editor/render/group-drill.d.ts.map +1 -1
- package/dist/pptx/editor/render/inline-list-body.d.ts +0 -2
- package/dist/pptx/editor/render/inline-list-body.d.ts.map +1 -1
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +1 -3
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-empty-paragraph.d.ts +0 -2
- package/dist/pptx/editor/render/remap-empty-paragraph.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-paragraph-sources.d.ts +0 -2
- package/dist/pptx/editor/render/remap-paragraph-sources.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-text-bullets.d.ts +0 -2
- package/dist/pptx/editor/render/remap-text-bullets.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-text.d.ts +0 -2
- package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
- package/dist/pptx/editor/render/schema-label-keys.d.ts +0 -2
- package/dist/pptx/editor/render/schema-label-keys.d.ts.map +1 -1
- package/dist/pptx/editor/render/section-operations.d.ts +0 -2
- package/dist/pptx/editor/render/section-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-background-patch.d.ts +0 -2
- package/dist/pptx/editor/render/slide-background-patch.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-operations.d.ts +0 -2
- package/dist/pptx/editor/render/slide-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-search.d.ts +0 -2
- package/dist/pptx/editor/render/slide-search.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-size-rescale.d.ts +0 -2
- package/dist/pptx/editor/render/slide-size-rescale.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-transition-edits.d.ts +0 -2
- package/dist/pptx/editor/render/slide-transition-edits.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-cell-edit.d.ts +0 -2
- package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-cell-merge.d.ts +0 -2
- package/dist/pptx/editor/render/table-cell-merge.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-data-grid-ops.d.ts +0 -2
- package/dist/pptx/editor/render/table-data-grid-ops.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-layout.d.ts +0 -2
- package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-merge.d.ts +0 -2
- package/dist/pptx/editor/render/table-merge.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts +0 -2
- package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-editor-edit.d.ts +0 -2
- package/dist/pptx/editor/render/table-style-editor-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-editor-parts.d.ts +0 -2
- package/dist/pptx/editor/render/table-style-editor-parts.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-map-edits.d.ts +0 -2
- package/dist/pptx/editor/render/table-style-map-edits.d.ts.map +1 -1
- package/dist/pptx/editor/render/template-editing.d.ts +0 -2
- package/dist/pptx/editor/render/template-editing.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-content-style.d.ts +1 -3
- package/dist/pptx/editor/render/text-content-style.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -4
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts +0 -2
- package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +2 -4
- package/dist/pptx/editor/render/text-style-scope.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-theme.d.ts +0 -2
- package/dist/pptx/editor/render/text-theme.d.ts.map +1 -1
- package/dist/pptx/editor/render/theme-editor-model.d.ts +0 -2
- package/dist/pptx/editor/render/theme-editor-model.d.ts.map +1 -1
- package/dist/pptx/editor/render/theme-editor-presets.d.ts +0 -2
- package/dist/pptx/editor/render/theme-editor-presets.d.ts.map +1 -1
- package/dist/pptx/editor/render/update-text-segment-style.d.ts +1 -3
- package/dist/pptx/editor/render/update-text-segment-style.d.ts.map +1 -1
- package/dist/pptx/index.cjs +1687 -1159
- package/dist/pptx/index.d.ts +10 -10
- package/dist/pptx/index.mjs +1 -1
- package/dist/pptx/node/index.d.ts +1 -3
- package/dist/pptx/node/index.d.ts.map +1 -1
- package/dist/pptx/signature-node/index.d.ts +1 -21
- package/dist/pptx/signature-node/index.d.ts.map +1 -1
- package/dist/pptx/smartart-layouts/index.d.ts +1 -7
- package/dist/pptx/smartart-layouts/index.d.ts.map +1 -1
- package/dist/pptx/ui/index.d.ts +1 -9
- package/dist/pptx/ui/index.d.ts.map +1 -1
- package/dist/teams/index.cjs +215 -201
- package/dist/teams/index.mjs +215 -201
- package/dist/text/index.cjs +193 -0
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +193 -1
- package/dist/text/merge-three-way.d.ts +9 -0
- package/dist/text/merge-three-way.d.ts.map +1 -0
- package/dist/visio/collab/index.cjs +226 -7
- package/dist/visio/collab/index.d.ts +1 -0
- package/dist/visio/collab/index.d.ts.map +1 -1
- package/dist/visio/collab/index.mjs +225 -7
- package/dist/visio/collab/merge-snapshots.d.ts +14 -0
- package/dist/visio/collab/merge-snapshots.d.ts.map +1 -0
- package/dist/visio/index.cjs +9 -9
- package/dist/visio/index.mjs +9 -9
- package/dist/visio/ui/index.cjs +9 -9
- package/dist/visio/ui/index.mjs +9 -9
- package/dist/xlsx/collab/index.cjs +49966 -507
- package/dist/xlsx/collab/index.d.ts +1 -0
- package/dist/xlsx/collab/index.d.ts.map +1 -1
- package/dist/xlsx/collab/index.mjs +49961 -507
- package/dist/xlsx/collab/merge-residual.d.ts +16 -0
- package/dist/xlsx/collab/merge-residual.d.ts.map +1 -0
- package/dist/xlsx/collab/merge-snapshots.d.ts +8 -0
- package/dist/xlsx/collab/merge-snapshots.d.ts.map +1 -0
- package/dist/xlsx/index.cjs +202 -202
- package/dist/xlsx/index.mjs +202 -202
- package/dist/xlsx/load/index.cjs +155 -155
- package/dist/xlsx/load/index.mjs +155 -155
- package/dist/xlsx/ui/index.cjs +202 -202
- package/dist/xlsx/ui/index.mjs +202 -202
- package/dist/xml/index.cjs +390 -22
- package/dist/xml/index.d.ts +1 -0
- package/dist/xml/index.d.ts.map +1 -1
- package/dist/xml/index.mjs +390 -23
- package/dist/xml/merge-three-way.d.ts +16 -0
- package/dist/xml/merge-three-way.d.ts.map +1 -0
- package/package.json +13 -8
- package/dist/pptx/chunks/collaboration-text-codec-Du_XeE_i.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-merge-DWWWdT_t.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-positions-MMT3GkZi.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-session-D0NOLQk7.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-session-delta-CzJGrTKJ.d.ts.map +0 -1
- package/dist/pptx/chunks/color-ref-DT599vEx.d.ts.map +0 -1
- package/dist/pptx/chunks/elements-f3UbFph-.d.ts.map +0 -1
- package/dist/pptx/chunks/index-BnH2QjYm.d.ts.map +0 -1
- package/dist/pptx/chunks/index-Bp-1pGo1.d.ts.map +0 -1
- package/dist/pptx/chunks/index-pLLN4OTz.d.ts.map +0 -1
- package/dist/pptx/chunks/inspection-status-DjiWd_Aa.d.ts.map +0 -1
- package/dist/pptx/chunks/schemas-fuDGetRe.d.ts.map +0 -1
- package/dist/pptx/chunks/smart-art-CmOrPLLQ.d.ts.map +0 -1
- package/dist/pptx/chunks/text-P9xVnXXf.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-D5sgspO6.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var Y2 = require('yjs');
|
|
4
4
|
var xmldom = require('@xmldom/xmldom');
|
|
5
5
|
var JSZip = require('jszip');
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ function _interopNamespace(e) {
|
|
|
24
24
|
return Object.freeze(n);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var Y2__namespace = /*#__PURE__*/_interopNamespace(Y2);
|
|
28
28
|
var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
|
|
29
29
|
|
|
30
30
|
// visio/collab/bind.ts
|
|
@@ -1641,18 +1641,18 @@ function resolveShapes(input) {
|
|
|
1641
1641
|
renumbered.get(key),
|
|
1642
1642
|
claims.has(key)
|
|
1643
1643
|
);
|
|
1644
|
-
const
|
|
1644
|
+
const record2 = { ...idRecord ?? input.renum.get(key) };
|
|
1645
1645
|
let dirty = idRecord !== void 0;
|
|
1646
1646
|
const master = attrOf(open, "Master");
|
|
1647
|
-
const persisted =
|
|
1647
|
+
const persisted = record2.m && record2.m[0] === master ? record2.m[1] : void 0;
|
|
1648
1648
|
const batched = master !== void 0 ? input.masterRemap.get(entry.b ?? "")?.get(master) : void 0;
|
|
1649
1649
|
const next = persisted ?? batched;
|
|
1650
1650
|
if (next !== void 0) open = setAttr(open, "Master", next);
|
|
1651
1651
|
if (persisted === void 0 && batched !== void 0) {
|
|
1652
|
-
|
|
1652
|
+
record2.m = [master, batched];
|
|
1653
1653
|
dirty = true;
|
|
1654
1654
|
}
|
|
1655
|
-
if (dirty) fixups.push({ map: "renum", key: `${input.scope}/${key}`, value:
|
|
1655
|
+
if (dirty) fixups.push({ map: "renum", key: `${input.scope}/${key}`, value: record2 });
|
|
1656
1656
|
const entries = /* @__PURE__ */ new Map();
|
|
1657
1657
|
for (const [path, piece] of input.cells.get(key) ?? []) {
|
|
1658
1658
|
const leaf = piece.xml !== void 0 && piece.r !== void 0;
|
|
@@ -2227,7 +2227,7 @@ function bindDrawingSession(host, editor, options = {}) {
|
|
|
2227
2227
|
const shared = sharedDrawing(doc);
|
|
2228
2228
|
const types = sharedTypes(shared);
|
|
2229
2229
|
const keys = new DrawingKeys(options.keyTag ?? doc.clientID.toString(36));
|
|
2230
|
-
const undoManager = new
|
|
2230
|
+
const undoManager = new Y2__namespace.UndoManager(types, {
|
|
2231
2231
|
trackedOrigins: /* @__PURE__ */ new Set([VISIO_EDIT_ORIGIN]),
|
|
2232
2232
|
captureTimeout: 0
|
|
2233
2233
|
});
|
|
@@ -2409,6 +2409,224 @@ function bindDrawingSession(host, editor, options = {}) {
|
|
|
2409
2409
|
}
|
|
2410
2410
|
};
|
|
2411
2411
|
}
|
|
2412
|
+
var record = (value) => typeof value === "object" && value !== null && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
|
|
2413
|
+
function snapshotEqual(a, b) {
|
|
2414
|
+
if (Object.is(a, b)) return true;
|
|
2415
|
+
if (a instanceof Uint8Array && b instanceof Uint8Array)
|
|
2416
|
+
return a.length === b.length && a.every((value, index) => value === b[index]);
|
|
2417
|
+
if (a instanceof Date && b instanceof Date) return a.getTime() === b.getTime();
|
|
2418
|
+
if (a instanceof Map && b instanceof Map)
|
|
2419
|
+
return a.size === b.size && [...a].every(([key, value]) => b.has(key) && snapshotEqual(value, b.get(key)));
|
|
2420
|
+
if (Array.isArray(a) && Array.isArray(b))
|
|
2421
|
+
return a.length === b.length && a.every((value, index) => snapshotEqual(value, b[index]));
|
|
2422
|
+
if (!record(a) || !record(b)) return false;
|
|
2423
|
+
const ak = Object.keys(a).filter((key) => a[key] !== void 0);
|
|
2424
|
+
const bk = Object.keys(b).filter((key) => b[key] !== void 0);
|
|
2425
|
+
return ak.length === bk.length && ak.every((key) => snapshotEqual(a[key], b[key]));
|
|
2426
|
+
}
|
|
2427
|
+
function mergeSnapshotValue(base, local, remote, path, issues) {
|
|
2428
|
+
if (snapshotEqual(local, remote)) return structuredClone(local);
|
|
2429
|
+
if (snapshotEqual(local, base)) return structuredClone(remote);
|
|
2430
|
+
if (snapshotEqual(remote, base)) return structuredClone(local);
|
|
2431
|
+
if (base instanceof Map && local instanceof Map && remote instanceof Map) {
|
|
2432
|
+
const out = /* @__PURE__ */ new Map();
|
|
2433
|
+
for (const key of /* @__PURE__ */ new Set([...base.keys(), ...local.keys(), ...remote.keys()])) {
|
|
2434
|
+
if (typeof key !== "string" && typeof key !== "number") {
|
|
2435
|
+
issues.push(`Unsupported map identity at ${path}.`);
|
|
2436
|
+
continue;
|
|
2437
|
+
}
|
|
2438
|
+
const value = mergeSnapshotValue(
|
|
2439
|
+
base.get(key),
|
|
2440
|
+
local.get(key),
|
|
2441
|
+
remote.get(key),
|
|
2442
|
+
`${path}/${key}`,
|
|
2443
|
+
issues
|
|
2444
|
+
);
|
|
2445
|
+
if (value !== void 0) out.set(key, value);
|
|
2446
|
+
}
|
|
2447
|
+
return out;
|
|
2448
|
+
}
|
|
2449
|
+
if ((base === void 0 || record(base)) && record(local) && record(remote)) {
|
|
2450
|
+
const out = /* @__PURE__ */ Object.create(null);
|
|
2451
|
+
for (const key of /* @__PURE__ */ new Set([
|
|
2452
|
+
...Object.keys(base ?? {}),
|
|
2453
|
+
...Object.keys(local),
|
|
2454
|
+
...Object.keys(remote)
|
|
2455
|
+
])) {
|
|
2456
|
+
const value = mergeSnapshotValue(
|
|
2457
|
+
base?.[key],
|
|
2458
|
+
local[key],
|
|
2459
|
+
remote[key],
|
|
2460
|
+
`${path}/${key}`,
|
|
2461
|
+
issues
|
|
2462
|
+
);
|
|
2463
|
+
if (value !== void 0) out[key] = value;
|
|
2464
|
+
}
|
|
2465
|
+
return out;
|
|
2466
|
+
}
|
|
2467
|
+
issues.push(`Concurrent changes overlap at ${path}.`);
|
|
2468
|
+
return void 0;
|
|
2469
|
+
}
|
|
2470
|
+
function assignMap(target, values, templates) {
|
|
2471
|
+
for (const key of [...target.keys()]) if (!(key in values)) target.delete(key);
|
|
2472
|
+
for (const [key, value] of Object.entries(values)) {
|
|
2473
|
+
const children = templates.map((map) => map.get(key)).filter((item) => item instanceof Y2__namespace.Map);
|
|
2474
|
+
if (children.length && record(value)) {
|
|
2475
|
+
let child = target.get(key);
|
|
2476
|
+
if (!(child instanceof Y2__namespace.Map)) {
|
|
2477
|
+
child = new Y2__namespace.Map();
|
|
2478
|
+
target.set(key, child);
|
|
2479
|
+
}
|
|
2480
|
+
assignMap(child, value, children);
|
|
2481
|
+
} else target.set(key, structuredClone(value));
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
function mergeSnapshotMaps(base, local, remote, names) {
|
|
2485
|
+
const issues = [];
|
|
2486
|
+
const values = names.map(
|
|
2487
|
+
(name) => mergeSnapshotValue(
|
|
2488
|
+
base.getMap(name).toJSON(),
|
|
2489
|
+
local.getMap(name).toJSON(),
|
|
2490
|
+
remote.getMap(name).toJSON(),
|
|
2491
|
+
name,
|
|
2492
|
+
issues
|
|
2493
|
+
)
|
|
2494
|
+
);
|
|
2495
|
+
const doc = new Y2__namespace.Doc();
|
|
2496
|
+
Y2__namespace.applyUpdate(doc, Y2__namespace.encodeStateAsUpdate(base));
|
|
2497
|
+
if (!issues.length) {
|
|
2498
|
+
const vector = Y2__namespace.encodeStateVector(base);
|
|
2499
|
+
Y2__namespace.applyUpdate(doc, Y2__namespace.encodeStateAsUpdate(local, vector));
|
|
2500
|
+
Y2__namespace.applyUpdate(doc, Y2__namespace.encodeStateAsUpdate(remote, vector));
|
|
2501
|
+
doc.transact(
|
|
2502
|
+
() => names.forEach(
|
|
2503
|
+
(name, index) => assignMap(doc.getMap(name), values[index], [
|
|
2504
|
+
base.getMap(name),
|
|
2505
|
+
local.getMap(name),
|
|
2506
|
+
remote.getMap(name)
|
|
2507
|
+
])
|
|
2508
|
+
)
|
|
2509
|
+
);
|
|
2510
|
+
}
|
|
2511
|
+
return { doc, issues };
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
// visio/collab/merge-snapshots.ts
|
|
2515
|
+
function deletionIssues(baseDoc, localDoc, remoteDoc) {
|
|
2516
|
+
const issues = [];
|
|
2517
|
+
const baseline = sharedDrawing(baseDoc);
|
|
2518
|
+
const content = (doc, prefix, shape = false) => {
|
|
2519
|
+
const shared = sharedDrawing(doc);
|
|
2520
|
+
const selected = /* @__PURE__ */ new Set([prefix]);
|
|
2521
|
+
if (shape)
|
|
2522
|
+
for (let count = -1; count !== selected.size; ) {
|
|
2523
|
+
count = selected.size;
|
|
2524
|
+
const page = prefix.slice(0, prefix.indexOf("/"));
|
|
2525
|
+
for (const [key, raw] of shared.shapes) {
|
|
2526
|
+
const parent = raw.parent;
|
|
2527
|
+
if (parent && selected.has(`${page}/${parent}`)) selected.add(key);
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
const result = {};
|
|
2531
|
+
for (const [name, map] of Object.entries(shared))
|
|
2532
|
+
for (const [key, value] of map)
|
|
2533
|
+
if ([...selected].some((item) => key === item || key.startsWith(`${item}/`)) || shape && key.startsWith(`${prefix.slice(0, prefix.indexOf("/"))}/`) && [...selected].some((item) => {
|
|
2534
|
+
const id = item.slice(item.indexOf("/") + 1);
|
|
2535
|
+
const entry = value;
|
|
2536
|
+
return name === "connects" && (entry.fk === id || entry.tk === id) || name === "cells" && entry.r?.includes(id);
|
|
2537
|
+
}))
|
|
2538
|
+
result[`${name}/${key}`] = value;
|
|
2539
|
+
return result;
|
|
2540
|
+
};
|
|
2541
|
+
for (const [leftDoc, rightDoc] of [
|
|
2542
|
+
[localDoc, remoteDoc],
|
|
2543
|
+
[remoteDoc, localDoc]
|
|
2544
|
+
]) {
|
|
2545
|
+
const left = sharedDrawing(leftDoc), right = sharedDrawing(rightDoc);
|
|
2546
|
+
for (const [name, baseMap, leftMap, rightMap] of [
|
|
2547
|
+
["page", baseline.pages, left.pages, right.pages],
|
|
2548
|
+
["master", baseline.masters, left.masters, right.masters],
|
|
2549
|
+
["shape", baseline.shapes, left.shapes, right.shapes]
|
|
2550
|
+
])
|
|
2551
|
+
for (const key of baseMap.keys())
|
|
2552
|
+
if (!leftMap.has(key) && rightMap.has(key) && !snapshotEqual(
|
|
2553
|
+
content(baseDoc, name === "master" ? `m~${key}` : key, name === "shape"),
|
|
2554
|
+
content(rightDoc, name === "master" ? `m~${key}` : key, name === "shape")
|
|
2555
|
+
))
|
|
2556
|
+
issues.push(`A deleted Visio ${name} has concurrent changes: ${key}.`);
|
|
2557
|
+
}
|
|
2558
|
+
return issues;
|
|
2559
|
+
}
|
|
2560
|
+
async function mergeDrawingSnapshots(base, local, remote) {
|
|
2561
|
+
const docs = [];
|
|
2562
|
+
try {
|
|
2563
|
+
const seed = new Y2__namespace.Doc();
|
|
2564
|
+
docs.push(seed);
|
|
2565
|
+
const seedKeys = new DrawingKeys("snapshot-base");
|
|
2566
|
+
seedKeys.seeding = true;
|
|
2567
|
+
const baseline = await snapshotDrawing(base, seedKeys);
|
|
2568
|
+
seed.transact(() => writeSharedDrawing(sharedDrawing(seed), baseline, seedKeys));
|
|
2569
|
+
const resolved = readSharedDrawing(sharedDrawing(seed));
|
|
2570
|
+
if (!resolved)
|
|
2571
|
+
return { status: "unresolved", issues: ["The Visio baseline could not be mapped."] };
|
|
2572
|
+
const branches = [];
|
|
2573
|
+
for (const [index, bytes2] of [local, remote].entries()) {
|
|
2574
|
+
const doc = new Y2__namespace.Doc();
|
|
2575
|
+
docs.push(doc);
|
|
2576
|
+
Y2__namespace.applyUpdate(doc, Y2__namespace.encodeStateAsUpdate(seed));
|
|
2577
|
+
const keys = new DrawingKeys(`snapshot-${index}`);
|
|
2578
|
+
(await composeDrawing(resolved, base, keys)).commit();
|
|
2579
|
+
const snapshot = await snapshotDrawing(bytes2, keys);
|
|
2580
|
+
doc.transact(() => writeSharedDrawing(sharedDrawing(doc), snapshot, keys));
|
|
2581
|
+
branches.push({ doc, snapshot });
|
|
2582
|
+
}
|
|
2583
|
+
const left = branches[0], right = branches[1];
|
|
2584
|
+
const issues = deletionIssues(seed, left.doc, right.doc);
|
|
2585
|
+
for (const snapshot of [baseline, left.snapshot, right.snapshot])
|
|
2586
|
+
if ([...snapshot.parts.keys()].some((path) => path.startsWith("_xmlsignatures/")))
|
|
2587
|
+
issues.push("Signed drawings require explicit signature handling before merging.");
|
|
2588
|
+
mergeSnapshotValue(
|
|
2589
|
+
...[baseline, left.snapshot, right.snapshot].map(
|
|
2590
|
+
(snapshot) => Object.fromEntries(snapshot.media.map((media) => [media.path, media.hash]))
|
|
2591
|
+
),
|
|
2592
|
+
"Visio media parts",
|
|
2593
|
+
issues
|
|
2594
|
+
);
|
|
2595
|
+
const merged = mergeSnapshotMaps(seed, left.doc, right.doc, [...seed.share.keys()]);
|
|
2596
|
+
docs.push(merged.doc);
|
|
2597
|
+
issues.push(...merged.issues);
|
|
2598
|
+
const drawing = readSharedDrawing(sharedDrawing(merged.doc));
|
|
2599
|
+
if (!drawing) issues.push("The merged Visio drawing could not be mapped.");
|
|
2600
|
+
const zips = await Promise.all([base, local, remote].map((bytes2) => readZip(bytes2)));
|
|
2601
|
+
const carrier = zips[2];
|
|
2602
|
+
for (const path of new Set(
|
|
2603
|
+
zips.flatMap((zip) => Object.keys(zip.files)).filter(isLocalOnlyPart)
|
|
2604
|
+
)) {
|
|
2605
|
+
const values = await Promise.all(
|
|
2606
|
+
zips.map(async (zip) => {
|
|
2607
|
+
const entry = zip.file(path);
|
|
2608
|
+
return entry ? toBase64(await entry.async("uint8array")) : void 0;
|
|
2609
|
+
})
|
|
2610
|
+
);
|
|
2611
|
+
const value = mergeSnapshotValue(values[0], values[1], values[2], path, issues);
|
|
2612
|
+
if (value === void 0) carrier.remove(path);
|
|
2613
|
+
else carrier.file(path, fromBase64(value));
|
|
2614
|
+
}
|
|
2615
|
+
if (issues.length || !drawing) return { status: "unresolved", issues };
|
|
2616
|
+
const bytes = await carrier.generateAsync({ type: "uint8array" });
|
|
2617
|
+
return {
|
|
2618
|
+
status: "merged",
|
|
2619
|
+
bytes: (await composeDrawing(drawing, bytes, new DrawingKeys("snapshot-result"))).bytes
|
|
2620
|
+
};
|
|
2621
|
+
} catch {
|
|
2622
|
+
return {
|
|
2623
|
+
status: "unresolved",
|
|
2624
|
+
issues: ["The VSDX snapshots could not be safely parsed or combined."]
|
|
2625
|
+
};
|
|
2626
|
+
} finally {
|
|
2627
|
+
for (const doc of docs) doc.destroy();
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2412
2630
|
|
|
2413
2631
|
exports.BLOBS = BLOBS;
|
|
2414
2632
|
exports.BODIES = BODIES;
|
|
@@ -2432,6 +2650,7 @@ exports.applyFixups = applyFixups;
|
|
|
2432
2650
|
exports.bindDrawingSession = bindDrawingSession;
|
|
2433
2651
|
exports.composeDrawing = composeDrawing;
|
|
2434
2652
|
exports.isSharedDrawingEmpty = isSharedDrawingEmpty;
|
|
2653
|
+
exports.mergeDrawingSnapshots = mergeDrawingSnapshots;
|
|
2435
2654
|
exports.readSharedDrawing = readSharedDrawing;
|
|
2436
2655
|
exports.sharedDrawing = sharedDrawing;
|
|
2437
2656
|
exports.snapshotDrawing = snapshotDrawing;
|
|
@@ -6,4 +6,5 @@ export { readSharedDrawing, type ResolvedDrawing, type ResolvedPage, type Resolv
|
|
|
6
6
|
export { BLOBS, BODIES, CELLS, CONNECTS, DEAD, MASTERS, MEDIA, META, PAGES, PARTS, RENUM, SCHEMA_VERSION, SHAPES, SchemaVersionError, isSharedDrawingEmpty, sharedDrawing, type SharedDrawing, } from './schema.js';
|
|
7
7
|
export { snapshotDrawing, type DrawingSnapshot } from './snapshot.js';
|
|
8
8
|
export { writeSharedDrawing } from './write.js';
|
|
9
|
+
export { mergeDrawingSnapshots } from './merge-snapshots.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../visio/collab/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,GAClB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EACN,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,GAClB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACN,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,cAAc,EACd,MAAM,EACN,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,KAAK,aAAa,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../visio/collab/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,GAClB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EACN,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,GAClB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACN,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,cAAc,EACd,MAAM,EACN,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,KAAK,aAAa,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as Y2 from 'yjs';
|
|
2
2
|
import { XMLSerializer, DOMParser } from '@xmldom/xmldom';
|
|
3
3
|
import JSZip from 'jszip';
|
|
4
4
|
|
|
@@ -1616,18 +1616,18 @@ function resolveShapes(input) {
|
|
|
1616
1616
|
renumbered.get(key),
|
|
1617
1617
|
claims.has(key)
|
|
1618
1618
|
);
|
|
1619
|
-
const
|
|
1619
|
+
const record2 = { ...idRecord ?? input.renum.get(key) };
|
|
1620
1620
|
let dirty = idRecord !== void 0;
|
|
1621
1621
|
const master = attrOf(open, "Master");
|
|
1622
|
-
const persisted =
|
|
1622
|
+
const persisted = record2.m && record2.m[0] === master ? record2.m[1] : void 0;
|
|
1623
1623
|
const batched = master !== void 0 ? input.masterRemap.get(entry.b ?? "")?.get(master) : void 0;
|
|
1624
1624
|
const next = persisted ?? batched;
|
|
1625
1625
|
if (next !== void 0) open = setAttr(open, "Master", next);
|
|
1626
1626
|
if (persisted === void 0 && batched !== void 0) {
|
|
1627
|
-
|
|
1627
|
+
record2.m = [master, batched];
|
|
1628
1628
|
dirty = true;
|
|
1629
1629
|
}
|
|
1630
|
-
if (dirty) fixups.push({ map: "renum", key: `${input.scope}/${key}`, value:
|
|
1630
|
+
if (dirty) fixups.push({ map: "renum", key: `${input.scope}/${key}`, value: record2 });
|
|
1631
1631
|
const entries = /* @__PURE__ */ new Map();
|
|
1632
1632
|
for (const [path, piece] of input.cells.get(key) ?? []) {
|
|
1633
1633
|
const leaf = piece.xml !== void 0 && piece.r !== void 0;
|
|
@@ -2202,7 +2202,7 @@ function bindDrawingSession(host, editor, options = {}) {
|
|
|
2202
2202
|
const shared = sharedDrawing(doc);
|
|
2203
2203
|
const types = sharedTypes(shared);
|
|
2204
2204
|
const keys = new DrawingKeys(options.keyTag ?? doc.clientID.toString(36));
|
|
2205
|
-
const undoManager = new
|
|
2205
|
+
const undoManager = new Y2.UndoManager(types, {
|
|
2206
2206
|
trackedOrigins: /* @__PURE__ */ new Set([VISIO_EDIT_ORIGIN]),
|
|
2207
2207
|
captureTimeout: 0
|
|
2208
2208
|
});
|
|
@@ -2384,5 +2384,223 @@ function bindDrawingSession(host, editor, options = {}) {
|
|
|
2384
2384
|
}
|
|
2385
2385
|
};
|
|
2386
2386
|
}
|
|
2387
|
+
var record = (value) => typeof value === "object" && value !== null && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
|
|
2388
|
+
function snapshotEqual(a, b) {
|
|
2389
|
+
if (Object.is(a, b)) return true;
|
|
2390
|
+
if (a instanceof Uint8Array && b instanceof Uint8Array)
|
|
2391
|
+
return a.length === b.length && a.every((value, index) => value === b[index]);
|
|
2392
|
+
if (a instanceof Date && b instanceof Date) return a.getTime() === b.getTime();
|
|
2393
|
+
if (a instanceof Map && b instanceof Map)
|
|
2394
|
+
return a.size === b.size && [...a].every(([key, value]) => b.has(key) && snapshotEqual(value, b.get(key)));
|
|
2395
|
+
if (Array.isArray(a) && Array.isArray(b))
|
|
2396
|
+
return a.length === b.length && a.every((value, index) => snapshotEqual(value, b[index]));
|
|
2397
|
+
if (!record(a) || !record(b)) return false;
|
|
2398
|
+
const ak = Object.keys(a).filter((key) => a[key] !== void 0);
|
|
2399
|
+
const bk = Object.keys(b).filter((key) => b[key] !== void 0);
|
|
2400
|
+
return ak.length === bk.length && ak.every((key) => snapshotEqual(a[key], b[key]));
|
|
2401
|
+
}
|
|
2402
|
+
function mergeSnapshotValue(base, local, remote, path, issues) {
|
|
2403
|
+
if (snapshotEqual(local, remote)) return structuredClone(local);
|
|
2404
|
+
if (snapshotEqual(local, base)) return structuredClone(remote);
|
|
2405
|
+
if (snapshotEqual(remote, base)) return structuredClone(local);
|
|
2406
|
+
if (base instanceof Map && local instanceof Map && remote instanceof Map) {
|
|
2407
|
+
const out = /* @__PURE__ */ new Map();
|
|
2408
|
+
for (const key of /* @__PURE__ */ new Set([...base.keys(), ...local.keys(), ...remote.keys()])) {
|
|
2409
|
+
if (typeof key !== "string" && typeof key !== "number") {
|
|
2410
|
+
issues.push(`Unsupported map identity at ${path}.`);
|
|
2411
|
+
continue;
|
|
2412
|
+
}
|
|
2413
|
+
const value = mergeSnapshotValue(
|
|
2414
|
+
base.get(key),
|
|
2415
|
+
local.get(key),
|
|
2416
|
+
remote.get(key),
|
|
2417
|
+
`${path}/${key}`,
|
|
2418
|
+
issues
|
|
2419
|
+
);
|
|
2420
|
+
if (value !== void 0) out.set(key, value);
|
|
2421
|
+
}
|
|
2422
|
+
return out;
|
|
2423
|
+
}
|
|
2424
|
+
if ((base === void 0 || record(base)) && record(local) && record(remote)) {
|
|
2425
|
+
const out = /* @__PURE__ */ Object.create(null);
|
|
2426
|
+
for (const key of /* @__PURE__ */ new Set([
|
|
2427
|
+
...Object.keys(base ?? {}),
|
|
2428
|
+
...Object.keys(local),
|
|
2429
|
+
...Object.keys(remote)
|
|
2430
|
+
])) {
|
|
2431
|
+
const value = mergeSnapshotValue(
|
|
2432
|
+
base?.[key],
|
|
2433
|
+
local[key],
|
|
2434
|
+
remote[key],
|
|
2435
|
+
`${path}/${key}`,
|
|
2436
|
+
issues
|
|
2437
|
+
);
|
|
2438
|
+
if (value !== void 0) out[key] = value;
|
|
2439
|
+
}
|
|
2440
|
+
return out;
|
|
2441
|
+
}
|
|
2442
|
+
issues.push(`Concurrent changes overlap at ${path}.`);
|
|
2443
|
+
return void 0;
|
|
2444
|
+
}
|
|
2445
|
+
function assignMap(target, values, templates) {
|
|
2446
|
+
for (const key of [...target.keys()]) if (!(key in values)) target.delete(key);
|
|
2447
|
+
for (const [key, value] of Object.entries(values)) {
|
|
2448
|
+
const children = templates.map((map) => map.get(key)).filter((item) => item instanceof Y2.Map);
|
|
2449
|
+
if (children.length && record(value)) {
|
|
2450
|
+
let child = target.get(key);
|
|
2451
|
+
if (!(child instanceof Y2.Map)) {
|
|
2452
|
+
child = new Y2.Map();
|
|
2453
|
+
target.set(key, child);
|
|
2454
|
+
}
|
|
2455
|
+
assignMap(child, value, children);
|
|
2456
|
+
} else target.set(key, structuredClone(value));
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
function mergeSnapshotMaps(base, local, remote, names) {
|
|
2460
|
+
const issues = [];
|
|
2461
|
+
const values = names.map(
|
|
2462
|
+
(name) => mergeSnapshotValue(
|
|
2463
|
+
base.getMap(name).toJSON(),
|
|
2464
|
+
local.getMap(name).toJSON(),
|
|
2465
|
+
remote.getMap(name).toJSON(),
|
|
2466
|
+
name,
|
|
2467
|
+
issues
|
|
2468
|
+
)
|
|
2469
|
+
);
|
|
2470
|
+
const doc = new Y2.Doc();
|
|
2471
|
+
Y2.applyUpdate(doc, Y2.encodeStateAsUpdate(base));
|
|
2472
|
+
if (!issues.length) {
|
|
2473
|
+
const vector = Y2.encodeStateVector(base);
|
|
2474
|
+
Y2.applyUpdate(doc, Y2.encodeStateAsUpdate(local, vector));
|
|
2475
|
+
Y2.applyUpdate(doc, Y2.encodeStateAsUpdate(remote, vector));
|
|
2476
|
+
doc.transact(
|
|
2477
|
+
() => names.forEach(
|
|
2478
|
+
(name, index) => assignMap(doc.getMap(name), values[index], [
|
|
2479
|
+
base.getMap(name),
|
|
2480
|
+
local.getMap(name),
|
|
2481
|
+
remote.getMap(name)
|
|
2482
|
+
])
|
|
2483
|
+
)
|
|
2484
|
+
);
|
|
2485
|
+
}
|
|
2486
|
+
return { doc, issues };
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
// visio/collab/merge-snapshots.ts
|
|
2490
|
+
function deletionIssues(baseDoc, localDoc, remoteDoc) {
|
|
2491
|
+
const issues = [];
|
|
2492
|
+
const baseline = sharedDrawing(baseDoc);
|
|
2493
|
+
const content = (doc, prefix, shape = false) => {
|
|
2494
|
+
const shared = sharedDrawing(doc);
|
|
2495
|
+
const selected = /* @__PURE__ */ new Set([prefix]);
|
|
2496
|
+
if (shape)
|
|
2497
|
+
for (let count = -1; count !== selected.size; ) {
|
|
2498
|
+
count = selected.size;
|
|
2499
|
+
const page = prefix.slice(0, prefix.indexOf("/"));
|
|
2500
|
+
for (const [key, raw] of shared.shapes) {
|
|
2501
|
+
const parent = raw.parent;
|
|
2502
|
+
if (parent && selected.has(`${page}/${parent}`)) selected.add(key);
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
const result = {};
|
|
2506
|
+
for (const [name, map] of Object.entries(shared))
|
|
2507
|
+
for (const [key, value] of map)
|
|
2508
|
+
if ([...selected].some((item) => key === item || key.startsWith(`${item}/`)) || shape && key.startsWith(`${prefix.slice(0, prefix.indexOf("/"))}/`) && [...selected].some((item) => {
|
|
2509
|
+
const id = item.slice(item.indexOf("/") + 1);
|
|
2510
|
+
const entry = value;
|
|
2511
|
+
return name === "connects" && (entry.fk === id || entry.tk === id) || name === "cells" && entry.r?.includes(id);
|
|
2512
|
+
}))
|
|
2513
|
+
result[`${name}/${key}`] = value;
|
|
2514
|
+
return result;
|
|
2515
|
+
};
|
|
2516
|
+
for (const [leftDoc, rightDoc] of [
|
|
2517
|
+
[localDoc, remoteDoc],
|
|
2518
|
+
[remoteDoc, localDoc]
|
|
2519
|
+
]) {
|
|
2520
|
+
const left = sharedDrawing(leftDoc), right = sharedDrawing(rightDoc);
|
|
2521
|
+
for (const [name, baseMap, leftMap, rightMap] of [
|
|
2522
|
+
["page", baseline.pages, left.pages, right.pages],
|
|
2523
|
+
["master", baseline.masters, left.masters, right.masters],
|
|
2524
|
+
["shape", baseline.shapes, left.shapes, right.shapes]
|
|
2525
|
+
])
|
|
2526
|
+
for (const key of baseMap.keys())
|
|
2527
|
+
if (!leftMap.has(key) && rightMap.has(key) && !snapshotEqual(
|
|
2528
|
+
content(baseDoc, name === "master" ? `m~${key}` : key, name === "shape"),
|
|
2529
|
+
content(rightDoc, name === "master" ? `m~${key}` : key, name === "shape")
|
|
2530
|
+
))
|
|
2531
|
+
issues.push(`A deleted Visio ${name} has concurrent changes: ${key}.`);
|
|
2532
|
+
}
|
|
2533
|
+
return issues;
|
|
2534
|
+
}
|
|
2535
|
+
async function mergeDrawingSnapshots(base, local, remote) {
|
|
2536
|
+
const docs = [];
|
|
2537
|
+
try {
|
|
2538
|
+
const seed = new Y2.Doc();
|
|
2539
|
+
docs.push(seed);
|
|
2540
|
+
const seedKeys = new DrawingKeys("snapshot-base");
|
|
2541
|
+
seedKeys.seeding = true;
|
|
2542
|
+
const baseline = await snapshotDrawing(base, seedKeys);
|
|
2543
|
+
seed.transact(() => writeSharedDrawing(sharedDrawing(seed), baseline, seedKeys));
|
|
2544
|
+
const resolved = readSharedDrawing(sharedDrawing(seed));
|
|
2545
|
+
if (!resolved)
|
|
2546
|
+
return { status: "unresolved", issues: ["The Visio baseline could not be mapped."] };
|
|
2547
|
+
const branches = [];
|
|
2548
|
+
for (const [index, bytes2] of [local, remote].entries()) {
|
|
2549
|
+
const doc = new Y2.Doc();
|
|
2550
|
+
docs.push(doc);
|
|
2551
|
+
Y2.applyUpdate(doc, Y2.encodeStateAsUpdate(seed));
|
|
2552
|
+
const keys = new DrawingKeys(`snapshot-${index}`);
|
|
2553
|
+
(await composeDrawing(resolved, base, keys)).commit();
|
|
2554
|
+
const snapshot = await snapshotDrawing(bytes2, keys);
|
|
2555
|
+
doc.transact(() => writeSharedDrawing(sharedDrawing(doc), snapshot, keys));
|
|
2556
|
+
branches.push({ doc, snapshot });
|
|
2557
|
+
}
|
|
2558
|
+
const left = branches[0], right = branches[1];
|
|
2559
|
+
const issues = deletionIssues(seed, left.doc, right.doc);
|
|
2560
|
+
for (const snapshot of [baseline, left.snapshot, right.snapshot])
|
|
2561
|
+
if ([...snapshot.parts.keys()].some((path) => path.startsWith("_xmlsignatures/")))
|
|
2562
|
+
issues.push("Signed drawings require explicit signature handling before merging.");
|
|
2563
|
+
mergeSnapshotValue(
|
|
2564
|
+
...[baseline, left.snapshot, right.snapshot].map(
|
|
2565
|
+
(snapshot) => Object.fromEntries(snapshot.media.map((media) => [media.path, media.hash]))
|
|
2566
|
+
),
|
|
2567
|
+
"Visio media parts",
|
|
2568
|
+
issues
|
|
2569
|
+
);
|
|
2570
|
+
const merged = mergeSnapshotMaps(seed, left.doc, right.doc, [...seed.share.keys()]);
|
|
2571
|
+
docs.push(merged.doc);
|
|
2572
|
+
issues.push(...merged.issues);
|
|
2573
|
+
const drawing = readSharedDrawing(sharedDrawing(merged.doc));
|
|
2574
|
+
if (!drawing) issues.push("The merged Visio drawing could not be mapped.");
|
|
2575
|
+
const zips = await Promise.all([base, local, remote].map((bytes2) => readZip(bytes2)));
|
|
2576
|
+
const carrier = zips[2];
|
|
2577
|
+
for (const path of new Set(
|
|
2578
|
+
zips.flatMap((zip) => Object.keys(zip.files)).filter(isLocalOnlyPart)
|
|
2579
|
+
)) {
|
|
2580
|
+
const values = await Promise.all(
|
|
2581
|
+
zips.map(async (zip) => {
|
|
2582
|
+
const entry = zip.file(path);
|
|
2583
|
+
return entry ? toBase64(await entry.async("uint8array")) : void 0;
|
|
2584
|
+
})
|
|
2585
|
+
);
|
|
2586
|
+
const value = mergeSnapshotValue(values[0], values[1], values[2], path, issues);
|
|
2587
|
+
if (value === void 0) carrier.remove(path);
|
|
2588
|
+
else carrier.file(path, fromBase64(value));
|
|
2589
|
+
}
|
|
2590
|
+
if (issues.length || !drawing) return { status: "unresolved", issues };
|
|
2591
|
+
const bytes = await carrier.generateAsync({ type: "uint8array" });
|
|
2592
|
+
return {
|
|
2593
|
+
status: "merged",
|
|
2594
|
+
bytes: (await composeDrawing(drawing, bytes, new DrawingKeys("snapshot-result"))).bytes
|
|
2595
|
+
};
|
|
2596
|
+
} catch {
|
|
2597
|
+
return {
|
|
2598
|
+
status: "unresolved",
|
|
2599
|
+
issues: ["The VSDX snapshots could not be safely parsed or combined."]
|
|
2600
|
+
};
|
|
2601
|
+
} finally {
|
|
2602
|
+
for (const doc of docs) doc.destroy();
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2387
2605
|
|
|
2388
|
-
export { BLOBS, BODIES, CELLS, CONNECTS, DEAD, DrawingKeys, MASTERS, MEDIA, META, PAGES, PARTS, RENUM, SCHEMA_VERSION, SHAPES, SchemaVersionError, VISIO_EDIT_ORIGIN, VISIO_FIXUP_ORIGIN, VISIO_SYNC_ORIGIN, applyFixups, bindDrawingSession, composeDrawing, isSharedDrawingEmpty, readSharedDrawing, sharedDrawing, snapshotDrawing, writeSharedDrawing };
|
|
2606
|
+
export { BLOBS, BODIES, CELLS, CONNECTS, DEAD, DrawingKeys, MASTERS, MEDIA, META, PAGES, PARTS, RENUM, SCHEMA_VERSION, SHAPES, SchemaVersionError, VISIO_EDIT_ORIGIN, VISIO_FIXUP_ORIGIN, VISIO_SYNC_ORIGIN, applyFixups, bindDrawingSession, composeDrawing, isSharedDrawingEmpty, mergeDrawingSnapshots, readSharedDrawing, sharedDrawing, snapshotDrawing, writeSharedDrawing };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type MergeResult = {
|
|
2
|
+
status: 'merged';
|
|
3
|
+
bytes: Uint8Array;
|
|
4
|
+
} | {
|
|
5
|
+
status: 'unresolved';
|
|
6
|
+
issues: readonly string[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Combines independent saved VSDX edits through the existing page/shape/cell Yjs mapping.
|
|
10
|
+
* Saved snapshots contain no operation history: overlapping XML leaves remain unresolved.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mergeDrawingSnapshots(base: Uint8Array, local: Uint8Array, remote: Uint8Array): Promise<MergeResult>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=merge-snapshots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-snapshots.d.ts","sourceRoot":"","sources":["../../../visio/collab/merge-snapshots.ts"],"names":[],"mappings":"AAUA,KAAK,WAAW,GACb;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,GACvC;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AA8DvD;;;GAGG;AACH,wBAAsB,qBAAqB,CAC1C,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,UAAU,GAChB,OAAO,CAAC,WAAW,CAAC,CAwEtB"}
|
package/dist/visio/index.cjs
CHANGED
|
@@ -13412,15 +13412,6 @@ var RELATIONSHIP_TYPES = {
|
|
|
13412
13412
|
printerSettings: `${BASE2}/printerSettings`,
|
|
13413
13413
|
sheetMetadata: `${BASE2}/sheetMetadata`
|
|
13414
13414
|
};
|
|
13415
|
-
|
|
13416
|
-
// opc/safe-href.ts
|
|
13417
|
-
var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
|
|
13418
|
-
function isSafeHyperlinkHref(href) {
|
|
13419
|
-
const scheme = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
|
|
13420
|
-
return scheme !== void 0 && SAFE_SCHEMES.has(scheme.toLowerCase());
|
|
13421
|
-
}
|
|
13422
|
-
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
13423
|
-
/* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
13424
13415
|
var DEFAULT_ZIP_LIMITS = {
|
|
13425
13416
|
maxEntries: 1e4,
|
|
13426
13417
|
maxEntryBytes: 100 * 1024 * 1024,
|
|
@@ -13629,6 +13620,15 @@ function guardZip(zip, limits = {}) {
|
|
|
13629
13620
|
return zip;
|
|
13630
13621
|
}
|
|
13631
13622
|
|
|
13623
|
+
// opc/safe-href.ts
|
|
13624
|
+
var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
|
|
13625
|
+
function isSafeHyperlinkHref(href) {
|
|
13626
|
+
const scheme = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
|
|
13627
|
+
return scheme !== void 0 && SAFE_SCHEMES.has(scheme.toLowerCase());
|
|
13628
|
+
}
|
|
13629
|
+
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
13630
|
+
/* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
13631
|
+
|
|
13632
13632
|
// opc/properties/patch.ts
|
|
13633
13633
|
var XMLNS = "http://www.w3.org/2000/xmlns/";
|
|
13634
13634
|
function tagEnd(xml, from) {
|
package/dist/visio/index.mjs
CHANGED
|
@@ -13406,15 +13406,6 @@ var RELATIONSHIP_TYPES = {
|
|
|
13406
13406
|
printerSettings: `${BASE2}/printerSettings`,
|
|
13407
13407
|
sheetMetadata: `${BASE2}/sheetMetadata`
|
|
13408
13408
|
};
|
|
13409
|
-
|
|
13410
|
-
// opc/safe-href.ts
|
|
13411
|
-
var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
|
|
13412
|
-
function isSafeHyperlinkHref(href) {
|
|
13413
|
-
const scheme = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
|
|
13414
|
-
return scheme !== void 0 && SAFE_SCHEMES.has(scheme.toLowerCase());
|
|
13415
|
-
}
|
|
13416
|
-
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
13417
|
-
/* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
13418
13409
|
var DEFAULT_ZIP_LIMITS = {
|
|
13419
13410
|
maxEntries: 1e4,
|
|
13420
13411
|
maxEntryBytes: 100 * 1024 * 1024,
|
|
@@ -13623,6 +13614,15 @@ function guardZip(zip, limits = {}) {
|
|
|
13623
13614
|
return zip;
|
|
13624
13615
|
}
|
|
13625
13616
|
|
|
13617
|
+
// opc/safe-href.ts
|
|
13618
|
+
var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
|
|
13619
|
+
function isSafeHyperlinkHref(href) {
|
|
13620
|
+
const scheme = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
|
|
13621
|
+
return scheme !== void 0 && SAFE_SCHEMES.has(scheme.toLowerCase());
|
|
13622
|
+
}
|
|
13623
|
+
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
13624
|
+
/* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
13625
|
+
|
|
13626
13626
|
// opc/properties/patch.ts
|
|
13627
13627
|
var XMLNS = "http://www.w3.org/2000/xmlns/";
|
|
13628
13628
|
function tagEnd(xml, from) {
|
package/dist/visio/ui/index.cjs
CHANGED
|
@@ -19835,15 +19835,6 @@ var RELATIONSHIP_TYPES = {
|
|
|
19835
19835
|
printerSettings: `${BASE2}/printerSettings`,
|
|
19836
19836
|
sheetMetadata: `${BASE2}/sheetMetadata`
|
|
19837
19837
|
};
|
|
19838
|
-
|
|
19839
|
-
// opc/safe-href.ts
|
|
19840
|
-
var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
|
|
19841
|
-
function isSafeHyperlinkHref(href) {
|
|
19842
|
-
const scheme = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
|
|
19843
|
-
return scheme !== void 0 && SAFE_SCHEMES.has(scheme.toLowerCase());
|
|
19844
|
-
}
|
|
19845
|
-
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
19846
|
-
/* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
19847
19838
|
var DEFAULT_ZIP_LIMITS = {
|
|
19848
19839
|
maxEntries: 1e4,
|
|
19849
19840
|
maxEntryBytes: 100 * 1024 * 1024,
|
|
@@ -20052,6 +20043,15 @@ function guardZip(zip, limits = {}) {
|
|
|
20052
20043
|
return zip;
|
|
20053
20044
|
}
|
|
20054
20045
|
|
|
20046
|
+
// opc/safe-href.ts
|
|
20047
|
+
var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
|
|
20048
|
+
function isSafeHyperlinkHref(href) {
|
|
20049
|
+
const scheme = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
|
|
20050
|
+
return scheme !== void 0 && SAFE_SCHEMES.has(scheme.toLowerCase());
|
|
20051
|
+
}
|
|
20052
|
+
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
20053
|
+
/* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
20054
|
+
|
|
20055
20055
|
// opc/properties/patch.ts
|
|
20056
20056
|
var XMLNS = "http://www.w3.org/2000/xmlns/";
|
|
20057
20057
|
function tagEnd(xml, from) {
|