@arbidocs/blocks 0.5.134 → 0.5.136
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/{ConnectedNativeDocxComparison-H72RQJKH.cjs → ConnectedNativeDocxComparison-W4KIGO54.cjs} +8 -8
- package/dist/{ConnectedNativeDocxComparison-H72RQJKH.cjs.map → ConnectedNativeDocxComparison-W4KIGO54.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-T7PZIRBY.cjs → ConnectedStreamedWordArtifact-764NSXPQ.cjs} +8 -8
- package/dist/{ConnectedStreamedWordArtifact-T7PZIRBY.cjs.map → ConnectedStreamedWordArtifact-764NSXPQ.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-EM2AJUF3.cjs → DocumentReviewCard-UV3DLFCB.cjs} +3 -3
- package/dist/{DocumentReviewCard-EM2AJUF3.cjs.map → DocumentReviewCard-UV3DLFCB.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-PA2B7O7I.cjs → FilesViewerDialog-IFF2JR2A.cjs} +6 -6
- package/dist/{FilesViewerDialog-PA2B7O7I.cjs.map → FilesViewerDialog-IFF2JR2A.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-XZAEU5QU.cjs → NativeDocxEditor-KM6U4ZLA.cjs} +6 -6
- package/dist/{NativeDocxEditor-XZAEU5QU.cjs.map → NativeDocxEditor-KM6U4ZLA.cjs.map} +1 -1
- package/dist/{chunk-T2DUNNYY.cjs → chunk-C6DF6WB2.cjs} +745 -21
- package/dist/chunk-C6DF6WB2.cjs.map +1 -0
- package/dist/{chunk-64247UHS.cjs → chunk-DBGBAD4J.cjs} +4 -4
- package/dist/{chunk-64247UHS.cjs.map → chunk-DBGBAD4J.cjs.map} +1 -1
- package/dist/{chunk-UOZ237OW.cjs → chunk-FABKMTAI.cjs} +42 -5
- package/dist/chunk-FABKMTAI.cjs.map +1 -0
- package/dist/{chunk-L4Y6UMRC.cjs → chunk-FDRZJFNV.cjs} +5 -5
- package/dist/{chunk-L4Y6UMRC.cjs.map → chunk-FDRZJFNV.cjs.map} +1 -1
- package/dist/{chunk-O5WVYUFT.cjs → chunk-IEAZX7L6.cjs} +4 -4
- package/dist/{chunk-O5WVYUFT.cjs.map → chunk-IEAZX7L6.cjs.map} +1 -1
- package/dist/{chunk-2SWS7ESM.cjs → chunk-L62EU3TQ.cjs} +3 -3
- package/dist/{chunk-2SWS7ESM.cjs.map → chunk-L62EU3TQ.cjs.map} +1 -1
- package/dist/{chunk-IN3KXI3K.cjs → chunk-LG36LSVZ.cjs} +6 -6
- package/dist/{chunk-IN3KXI3K.cjs.map → chunk-LG36LSVZ.cjs.map} +1 -1
- package/dist/{chunk-RZSBHRQL.cjs → chunk-MMKMQZ2B.cjs} +5 -5
- package/dist/{chunk-RZSBHRQL.cjs.map → chunk-MMKMQZ2B.cjs.map} +1 -1
- package/dist/chunk-MMMGOZYH.cjs +18 -0
- package/dist/{chunk-KWD5Q4XH.cjs.map → chunk-MMMGOZYH.cjs.map} +1 -1
- package/dist/{chunk-V6SFJ44C.cjs → chunk-ZN2JXV65.cjs} +50 -13
- package/dist/chunk-ZN2JXV65.cjs.map +1 -0
- package/dist/connect/docx.cjs +12 -12
- package/dist/connect/index.cjs +86 -86
- package/dist/connect/viewer.cjs +4 -4
- package/dist/connection/docx/ConnectedNativeDocxEditor.js +39 -2
- package/dist/connection/docx/ConnectedNativeDocxEditor.js.map +2 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js +43 -6
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/docx/NativeDocxEditor.d.ts +12 -1
- package/dist/docx/NativeDocxEditor.js +513 -20
- package/dist/docx/NativeDocxEditor.js.map +3 -3
- package/dist/docx/index.cjs +38 -38
- package/dist/docx/recoveryStore.d.ts +8 -0
- package/dist/docx/recoveryStore.js +208 -0
- package/dist/docx/recoveryStore.js.map +7 -0
- package/dist/docx/temporaryRecovery.d.ts +8 -0
- package/dist/docx/temporaryRecovery.js +37 -0
- package/dist/docx/temporaryRecovery.js.map +7 -0
- package/dist/index.cjs +72 -72
- package/dist/styles.css +1 -1
- package/dist/vite/index.cjs +11 -1
- package/dist/vite/index.cjs.map +1 -1
- package/dist/vite/index.d.ts +13 -0
- package/dist/vite/index.js +11 -1
- package/dist/vite/index.js.map +1 -1
- package/dist/workflow-canvas/index.cjs +10 -10
- package/node_modules/@arbidocs/coedit/dist/commands.cjs +18 -1
- package/node_modules/@arbidocs/coedit/dist/commands.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/commands.d.cts +2 -2
- package/node_modules/@arbidocs/coedit/dist/commands.d.ts +2 -2
- package/node_modules/@arbidocs/coedit/dist/commands.js +18 -1
- package/node_modules/@arbidocs/coedit/dist/commands.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/{port-BbN5OZHx.d.cts → port-DXBNxZYw.d.cts} +2 -0
- package/node_modules/@arbidocs/coedit/dist/{port-BbN5OZHx.d.ts → port-DXBNxZYw.d.ts} +2 -0
- package/node_modules/@arbidocs/coedit/dist/server.cjs +16 -0
- package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.cts +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.ts +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.js +16 -0
- package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +2 -2
- package/node_modules/@docx-editor.dev/core/README.md +25 -1
- package/node_modules/@docx-editor.dev/core/THIRD_PARTY_NOTICES.md +1 -0
- package/node_modules/@docx-editor.dev/core/dist/automation.cjs +1 -1
- package/node_modules/@docx-editor.dev/core/dist/automation.d.ts +21 -63
- package/node_modules/@docx-editor.dev/core/dist/automation.js +1 -1
- package/node_modules/@docx-editor.dev/core/dist/binding.cjs +1 -1
- package/node_modules/@docx-editor.dev/core/dist/binding.d.ts +49 -40
- package/node_modules/@docx-editor.dev/core/dist/binding.js +1 -1
- package/node_modules/@docx-editor.dev/core/dist/{chrome-print-CAs51cpq.d.ts → chrome-print-CrPI9ZQc.d.ts} +714 -290
- package/node_modules/@docx-editor.dev/core/dist/chunk-23MKR33J.js +4 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-2CWQY27B.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-2DEY5NUC.cjs +32 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-2DR4TH6B.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-2F2UEAE2.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-2GPGAFOJ.cjs +5 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-ALD626VU.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-AU33YWEJ.js +236 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-AXU63LYW.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-CM5VZRBV.js +32 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-D7FAFFTN.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-DYUVJNDD.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-ESYUKD5D.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-F7TGQMVR.js +5 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-FLW7KIQX.js +30 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-JG4A6W6I.js +7 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-JNGLSBPH.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-KE6ZWRIY.cjs +236 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-L3YXJDPX.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-LI42N7OW.cjs +4 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-PLKDS4JT.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-PXMTQ73F.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-R4R3AAE4.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-RFUNFTGV.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-SVM6PGMS.js +3 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-SZURLHR3.cjs +3 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-UYCGCVZ2.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-WN7ICTA5.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-X34QRAUU.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-XNBYG4XJ.cjs +30 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-ZDFJW5XS.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-ZWO4JHNN.cjs +7 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.cjs +1 -1
- package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.d.ts +29 -5
- package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.js +1 -1
- package/node_modules/@docx-editor.dev/core/dist/collaboration.cjs +1 -1
- package/node_modules/@docx-editor.dev/core/dist/collaboration.d.ts +5 -6
- package/node_modules/@docx-editor.dev/core/dist/collaboration.js +1 -1
- package/node_modules/@docx-editor.dev/core/dist/contracts/document.d.ts +3 -3
- package/node_modules/@docx-editor.dev/core/dist/contracts/editor.d.ts +13 -10
- package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.d.ts +2 -2
- package/node_modules/@docx-editor.dev/core/dist/contracts/modules.d.ts +15 -13
- package/node_modules/@docx-editor.dev/core/dist/contracts/types.d.ts +135 -2
- package/node_modules/@docx-editor.dev/core/dist/{custom-node-writes-Bn6uciLb.d.ts → custom-node-writes-AqY5KpVx.d.ts} +7 -2
- package/node_modules/@docx-editor.dev/core/dist/diagnostic-context-CuzhOX0g.d.ts +98 -0
- package/node_modules/@docx-editor.dev/core/dist/{diagnostic-hints-BeVjfNOv.d.ts → diagnostic-hints-BtCaCqQC.d.ts} +14 -7
- package/node_modules/@docx-editor.dev/core/dist/{document-protection-CUb55pl_.d.ts → document-protection-BvbpSXbQ.d.ts} +1 -1
- package/node_modules/@docx-editor.dev/core/dist/drawing-graphic-kind-CXYGYbB3.d.ts +324 -0
- package/node_modules/@docx-editor.dev/core/dist/drawing-preview-package-B9lSLRg4.d.ts +115 -0
- package/node_modules/@docx-editor.dev/core/dist/{editor-CZQZmTIU.d.ts → editor-B7OOAAie.d.ts} +536 -283
- package/node_modules/@docx-editor.dev/core/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
- package/node_modules/@docx-editor.dev/core/dist/editor-scope-CA6egMaK.d.ts +141 -0
- package/node_modules/@docx-editor.dev/core/dist/editor.cjs +1 -1
- package/node_modules/@docx-editor.dev/core/dist/editor.css +6 -4
- package/node_modules/@docx-editor.dev/core/dist/editor.d.ts +834 -34
- package/node_modules/@docx-editor.dev/core/dist/editor.js +1 -1
- package/node_modules/@docx-editor.dev/core/dist/export.cjs +2 -2
- package/node_modules/@docx-editor.dev/core/dist/export.d.ts +52 -21
- package/node_modules/@docx-editor.dev/core/dist/export.js +2 -2
- package/node_modules/@docx-editor.dev/core/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
- package/node_modules/@docx-editor.dev/core/dist/{font-resolver-lSBLirLR.d.ts → font-resolver-Bm9XqTNO.d.ts} +15 -1
- package/node_modules/@docx-editor.dev/core/dist/font-shaping-policy-BvpkrfxM.d.ts +7 -0
- package/node_modules/@docx-editor.dev/core/dist/index.cjs +1 -1
- package/node_modules/@docx-editor.dev/core/dist/index.d.ts +44 -27
- package/node_modules/@docx-editor.dev/core/dist/index.js +1 -1
- package/node_modules/@docx-editor.dev/core/dist/{layout-shaping-BD-dF_rn.d.ts → layout-shaping-Ci_BTnSU.d.ts} +3 -2
- package/node_modules/@docx-editor.dev/core/dist/layout.cjs +1 -1
- package/node_modules/@docx-editor.dev/core/dist/layout.d.ts +276 -126
- package/node_modules/@docx-editor.dev/core/dist/layout.js +1 -1
- package/node_modules/@docx-editor.dev/core/dist/metafile-drawing-DtMFyMKq.d.ts +107 -0
- package/node_modules/@docx-editor.dev/core/dist/{note-properties-qQUjO1GQ.d.ts → note-properties-DCIJUKIy.d.ts} +1 -1
- package/node_modules/@docx-editor.dev/core/dist/output.cjs +1 -1
- package/node_modules/@docx-editor.dev/core/dist/output.d.ts +24 -10
- package/node_modules/@docx-editor.dev/core/dist/output.js +1 -1
- package/node_modules/@docx-editor.dev/core/dist/{protocol-DYzzz2ej.d.ts → protocol-Cp_QzVxS.d.ts} +167 -5
- package/node_modules/@docx-editor.dev/core/dist/{review-paragraph-order-CN_0l2Cb.d.ts → review-paragraph-order-BJQ43_r0.d.ts} +1 -1
- package/node_modules/@docx-editor.dev/core/dist/revision-projection-OVusTS77.d.ts +258 -0
- package/node_modules/@docx-editor.dev/core/dist/{semantic-cell-selection-eYag3P47.d.ts → semantic-cell-selection-CoI5hHBm.d.ts} +2 -2
- package/node_modules/@docx-editor.dev/core/dist/{semantic-interaction-kR_QB845.d.ts → semantic-interaction-BbA4dgEo.d.ts} +1 -1
- package/node_modules/@docx-editor.dev/core/dist/{semantic-paint-ZayFF3tD.d.ts → semantic-paint-B5JcIv9c.d.ts} +19 -9
- package/node_modules/@docx-editor.dev/core/dist/{semantic-record-queries-Bsgth6lv.d.ts → semantic-record-queries-DnO8J5_j.d.ts} +1 -1
- package/node_modules/@docx-editor.dev/core/dist/{semantic-records-DQmumPgL.d.ts → semantic-records-DoK0lNjS.d.ts} +697 -608
- package/node_modules/@docx-editor.dev/core/dist/store.cjs +1 -1
- package/node_modules/@docx-editor.dev/core/dist/store.d.ts +527 -123
- package/node_modules/@docx-editor.dev/core/dist/store.js +1 -1
- package/node_modules/@docx-editor.dev/core/dist/{types-barrel-DuC5QBNC.d.ts → tree-op-types-Df4oY2u4.d.ts} +1723 -765
- package/node_modules/@docx-editor.dev/core/dist/{tree-package-store-CovjNARF.d.ts → tree-package-store-DXhX1PE-.d.ts} +617 -428
- package/node_modules/@docx-editor.dev/core/dist/{tree-session-contract-CZVAGl51.d.ts → tree-session-contract-CF2625mv.d.ts} +28 -13
- package/node_modules/@docx-editor.dev/core/dist/unsupported-elements-CUojsaCr.d.ts +23 -0
- package/node_modules/@docx-editor.dev/core/docs/accept-reject-without-scrolling.md +95 -0
- package/node_modules/@docx-editor.dev/core/docs/comment-on-found-text.md +72 -0
- package/node_modules/@docx-editor.dev/core/docs/custom-review-cards.md +178 -0
- package/node_modules/@docx-editor.dev/core/docs/highlight-ranges.md +48 -0
- package/node_modules/@docx-editor.dev/core/docs/index.md +36 -0
- package/node_modules/@docx-editor.dev/core/docs/propose-rewrite.md +247 -0
- package/node_modules/@docx-editor.dev/core/docs/tracked-replacement.md +68 -0
- package/node_modules/@docx-editor.dev/core/licenses/ECMA-376.md +29 -0
- package/node_modules/@docx-editor.dev/core/package.json +3 -2
- package/node_modules/@docx-editor.dev/react/README.md +71 -0
- package/node_modules/@docx-editor.dev/react/dist/index.d.mts +936 -86
- package/node_modules/@docx-editor.dev/react/dist/index.d.ts +936 -86
- package/node_modules/@docx-editor.dev/react/dist/index.js +3 -3
- package/node_modules/@docx-editor.dev/react/dist/index.mjs +3 -3
- package/node_modules/@docx-editor.dev/react/docs/accept-reject-without-scrolling.md +72 -0
- package/node_modules/@docx-editor.dev/react/docs/comment-on-found-text.md +47 -0
- package/node_modules/@docx-editor.dev/react/docs/custom-review-cards.md +105 -0
- package/node_modules/@docx-editor.dev/react/docs/highlight-ranges.md +25 -0
- package/node_modules/@docx-editor.dev/react/docs/index.md +36 -0
- package/node_modules/@docx-editor.dev/react/docs/propose-rewrite.md +247 -0
- package/node_modules/@docx-editor.dev/react/docs/tracked-replacement.md +45 -0
- package/node_modules/@docx-editor.dev/react/package.json +4 -3
- package/package.json +8 -8
- package/src/docx/styles.css +37 -7
- package/dist/chunk-KWD5Q4XH.cjs +0 -18
- package/dist/chunk-T2DUNNYY.cjs.map +0 -1
- package/dist/chunk-UOZ237OW.cjs.map +0 -1
- package/dist/chunk-V6SFJ44C.cjs.map +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-236O4YQW.js +0 -2
- package/node_modules/@docx-editor.dev/core/dist/chunk-6JIJOZDW.js +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-6JPL6ZAS.cjs +0 -5
- package/node_modules/@docx-editor.dev/core/dist/chunk-6ZQP4HQ7.js +0 -3
- package/node_modules/@docx-editor.dev/core/dist/chunk-7WQ7AAHW.cjs +0 -2
- package/node_modules/@docx-editor.dev/core/dist/chunk-BCXH4BXB.js +0 -5
- package/node_modules/@docx-editor.dev/core/dist/chunk-BTQKU64Q.cjs +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-BY2ACZZ6.cjs +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-CAJEXXVG.cjs +0 -4
- package/node_modules/@docx-editor.dev/core/dist/chunk-CPWLFPWC.js +0 -30
- package/node_modules/@docx-editor.dev/core/dist/chunk-D7ZMDMPX.cjs +0 -3
- package/node_modules/@docx-editor.dev/core/dist/chunk-DOHF6FA7.cjs +0 -30
- package/node_modules/@docx-editor.dev/core/dist/chunk-DVX32P2P.js +0 -27
- package/node_modules/@docx-editor.dev/core/dist/chunk-E4LOMDNL.js +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-EKLM7NWB.cjs +0 -7
- package/node_modules/@docx-editor.dev/core/dist/chunk-G3K63G7P.cjs +0 -27
- package/node_modules/@docx-editor.dev/core/dist/chunk-G4HOFIKJ.js +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-JLVBDYVQ.cjs +0 -2
- package/node_modules/@docx-editor.dev/core/dist/chunk-LQX36Z5P.js +0 -7
- package/node_modules/@docx-editor.dev/core/dist/chunk-LSZ6KPKK.js +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-MM5QBMTE.cjs +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-OMCG63ZF.js +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-OSFOJTHU.cjs +0 -18
- package/node_modules/@docx-editor.dev/core/dist/chunk-RCLZXP3B.js +0 -2
- package/node_modules/@docx-editor.dev/core/dist/chunk-T6K2QYNZ.cjs +0 -2
- package/node_modules/@docx-editor.dev/core/dist/chunk-TRGAVV2Y.js +0 -4
- package/node_modules/@docx-editor.dev/core/dist/chunk-U4JZVSOE.js +0 -2
- package/node_modules/@docx-editor.dev/core/dist/chunk-UHHYFIDT.cjs +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-W35WTWAO.cjs +0 -1
- package/node_modules/@docx-editor.dev/core/dist/chunk-YQ5G6LC7.js +0 -18
- package/node_modules/@docx-editor.dev/core/dist/diagnostic-context-B8M79cfK.d.ts +0 -30
- package/node_modules/@docx-editor.dev/core/dist/editor-scope-7o9xweiJ.d.ts +0 -84
- package/node_modules/@docx-editor.dev/core/dist/headless-document-view-pp3q7wIh.d.ts +0 -143
- package/node_modules/@docx-editor.dev/core/dist/image-resources-tXLQShoC.d.ts +0 -211
- package/node_modules/@docx-editor.dev/core/dist/omml-equation-BUbU0utM.d.ts +0 -85
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { D as DiagnosticErrorName, a as DocumentPartKind } from './diagnostic-hints-BeVjfNOv.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Every engine reason a diagnostic can carry as its `cause`. Causes are the engine's own
|
|
5
|
-
* reasons and can change between engine versions; match on the public `code`, and read the
|
|
6
|
-
* `cause` when you report or fix a failure.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
declare function diagnosticCauses(): readonly string[];
|
|
11
|
-
/**
|
|
12
|
-
* The engine reason token in a refusal reason, or undefined when the reason is not one the
|
|
13
|
-
* engine knows, such as a sentence. Only the token before a colon counts; the detail after it
|
|
14
|
-
* can name parts of the file and is never returned.
|
|
15
|
-
*/
|
|
16
|
-
declare function diagnosticCause(reason: string | undefined): string | undefined;
|
|
17
|
-
/** The cause of a failure the engine did not name: an exception. */
|
|
18
|
-
declare function exceptionCause(): string;
|
|
19
|
-
/**
|
|
20
|
-
* The class of an exception, never its message. A subclass with its own name, which a host or a
|
|
21
|
-
* file could shape, reports `'other'`.
|
|
22
|
-
*/
|
|
23
|
-
declare function diagnosticErrorName(error: unknown): DiagnosticErrorName;
|
|
24
|
-
/**
|
|
25
|
-
* The role of the part a failure names, from the part name at the start of a refusal detail.
|
|
26
|
-
* The name itself never leaves this function. Undefined when there is no detail.
|
|
27
|
-
*/
|
|
28
|
-
declare function documentPartKind(detail: string | undefined): DocumentPartKind | undefined;
|
|
29
|
-
|
|
30
|
-
export { diagnosticCause as a, diagnosticErrorName as b, documentPartKind as c, diagnosticCauses as d, exceptionCause as e };
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/** The engine-owned identity of one gesture. Create it with `Editor.beginHistoryGroup()`. @public */
|
|
2
|
-
declare const historyGroupBrand: unique symbol;
|
|
3
|
-
interface HistoryGroup {
|
|
4
|
-
readonly [historyGroupBrand]: true;
|
|
5
|
-
/** Closed after `end()`, document replacement, detach, or destruction. */
|
|
6
|
-
readonly state: 'open' | 'closed';
|
|
7
|
-
/** End this gesture without reverting any edits. Safe to call more than once. */
|
|
8
|
-
end(): void;
|
|
9
|
-
}
|
|
10
|
-
/** The history authority's result for this frame. @public */
|
|
11
|
-
interface HistoryGroupOutcome {
|
|
12
|
-
readonly kind: 'started' | 'extended' | 'split' | 'none';
|
|
13
|
-
readonly reason?: 'history-boundary' | 'undo-redo' | 'no-history' | 'package-unit' | 'composition';
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* The editor is N+1 editing views: one body plus one per header/footer relationship, plus
|
|
17
|
-
* footnotes, text boxes, and other addressable regions. Commands must name their target.
|
|
18
|
-
*
|
|
19
|
-
* This set is open-ended. Treat it as non-exhaustive as more regions become addressable.
|
|
20
|
-
*/
|
|
21
|
-
type EditorScope = {
|
|
22
|
-
kind: 'body';
|
|
23
|
-
} | {
|
|
24
|
-
kind: 'headerFooter';
|
|
25
|
-
rId: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* A footnote/endnote region.
|
|
29
|
-
*
|
|
30
|
-
* `id` encodes kind and signed note id as `footnote:<id>` or `endnote:<id>`. Use
|
|
31
|
-
* `formatNoteScopeId` or `parseNoteScopeId` from the store package.
|
|
32
|
-
*/
|
|
33
|
-
| {
|
|
34
|
-
kind: 'note';
|
|
35
|
-
id: string;
|
|
36
|
-
} | {
|
|
37
|
-
/**
|
|
38
|
-
* A text box or floating frame with its own content.
|
|
39
|
-
*
|
|
40
|
-
* Addressing one takes the drawing that hosts it as well as the story root: a frame is
|
|
41
|
-
* reached THROUGH its drawing, and nothing can reveal or select it from `id` alone.
|
|
42
|
-
*/
|
|
43
|
-
kind: 'frame';
|
|
44
|
-
id: string;
|
|
45
|
-
/** The drawing that hosts this frame. */
|
|
46
|
-
drawingNodeId: string;
|
|
47
|
-
/** The paragraph that anchors that drawing. */
|
|
48
|
-
hostParagraphId: string;
|
|
49
|
-
/** Furniture or note story that owns this frame. Absence means the body story. */
|
|
50
|
-
owner?: {
|
|
51
|
-
kind: 'headerFooter';
|
|
52
|
-
rId: string;
|
|
53
|
-
} | {
|
|
54
|
-
kind: 'note';
|
|
55
|
-
id: string;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/** Read-only aggregate across every view. Valid for queries, not for writes. */
|
|
59
|
-
| {
|
|
60
|
-
kind: 'all';
|
|
61
|
-
};
|
|
62
|
-
/** A concrete editing view. */
|
|
63
|
-
type ViewScope = Exclude<EditorScope, {
|
|
64
|
-
kind: 'all';
|
|
65
|
-
}>;
|
|
66
|
-
/** Options for a command's editing view and explicit gesture. @public */
|
|
67
|
-
interface EditorExecOptions {
|
|
68
|
-
/** Omitted, the command addresses the current selection. */
|
|
69
|
-
readonly scope?: EditorScope;
|
|
70
|
-
/**
|
|
71
|
-
* An open handle from this editor. Supported for synchronous formatting commands.
|
|
72
|
-
* Intervening writes and undo/redo can split a gesture; inspect `ExecResult.history`.
|
|
73
|
-
* Read-only commands do not close a gesture. Ungrouped collaboration uses timed capture.
|
|
74
|
-
* See the core history grouping guide for gesture bindings and boundary rules.
|
|
75
|
-
*/
|
|
76
|
-
readonly historyGroup?: HistoryGroup;
|
|
77
|
-
}
|
|
78
|
-
/** Optional diagnostic notification; subscribing does not change history behavior. @public */
|
|
79
|
-
interface HistoryDiagnostic {
|
|
80
|
-
readonly kind: 'split' | 'possible-ungrouped-gesture' | 'possible-fragmented-gesture';
|
|
81
|
-
readonly reason: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export type { EditorScope as E, HistoryDiagnostic as H, ViewScope as V, EditorExecOptions as a, HistoryGroup as b, HistoryGroupOutcome as c };
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { H as HeaderFooterParts, b as HeaderFooterSectionResolution, T as TreePackageStore } from './tree-package-store-CovjNARF.js';
|
|
2
|
-
import { Q as OoxmlPackage, O as OoxmlPart, ak as OoxmlElement, aj as OoxmlPackageRejection } from './types-barrel-DuC5QBNC.js';
|
|
3
|
-
|
|
4
|
-
/** The package with a hyperlink relationship guaranteed present, and that relationship's id. */
|
|
5
|
-
interface EnsuredHyperlinkRelationship {
|
|
6
|
-
readonly pkg: OoxmlPackage;
|
|
7
|
-
readonly relationshipId: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The target this engine would write for `url`, or null when it would write none.
|
|
11
|
-
*
|
|
12
|
-
* The VALIDATION half of {@link ensureHyperlinkRelationship}, exported so a caller that must decide
|
|
13
|
-
* "would this be authored?" before it is allowed to change the package can ask without changing it.
|
|
14
|
-
* A relationship outlives a refusal — it lives beside the trees, outside the undo stack — so a
|
|
15
|
-
* caller planning a batch that may yet be refused has to ask this and mint later.
|
|
16
|
-
*
|
|
17
|
-
* Same rules, one implementation: `sanitizeHref`'s allowlist, a bound on the length, XML-writable
|
|
18
|
-
* text, and the absolute-URI gate the READ side applies. There is no legitimate reason for this
|
|
19
|
-
* engine to author a scheme it would refuse to open.
|
|
20
|
-
*/
|
|
21
|
-
declare function authorableHyperlinkTarget(url: string): string | null;
|
|
22
|
-
/**
|
|
23
|
-
* The external hyperlink relationship for `url` on `ownerPart` (default: main document),
|
|
24
|
-
* reusing an existing one with the same target, or `null` when the URL is not something to
|
|
25
|
-
* write.
|
|
26
|
-
*
|
|
27
|
-
* REUSE IS BY EXACT TARGET, matching Word: linking twice to the same address produces one
|
|
28
|
-
* relationship. It is safe because a hyperlink relationship carries nothing but its target —
|
|
29
|
-
* two links sharing one are indistinguishable from two links with identical targets, and
|
|
30
|
-
* retargeting one always mints rather than rewriting (see the edit op).
|
|
31
|
-
*
|
|
32
|
-
* Ownership follows the story that holds the `w:hyperlink`: a header/footer or notes part
|
|
33
|
-
* mints into that part's `.rels`, never into `document.xml.rels`. Passing an owner the
|
|
34
|
-
* package does not declare fails closed (`null`) so a scoped insert cannot leave a stray
|
|
35
|
-
* body relationship behind.
|
|
36
|
-
*
|
|
37
|
-
* The URL is refused unless `sanitizeHref` admits it. Storing a `javascript:` target that a
|
|
38
|
-
* FILE authored is required — round-tripping never rewrites a document — but AUTHORING one
|
|
39
|
-
* here is not: there is no legitimate reason for this engine to write a scheme it would then
|
|
40
|
-
* refuse to open, and writing it would hand the next reader a live target this reader made.
|
|
41
|
-
*/
|
|
42
|
-
declare function ensureHyperlinkRelationship(pkg: OoxmlPackage, url: string, ownerPart?: string): EnsuredHyperlinkRelationship | null;
|
|
43
|
-
/**
|
|
44
|
-
* What a part's relationships answer for one `r:id`, over both maps.
|
|
45
|
-
*
|
|
46
|
-
* `relationships` holds the internal records and `externalTargets` the external ones, so a
|
|
47
|
-
* resolver reading only the first sees every hyperlink as dangling.
|
|
48
|
-
*/
|
|
49
|
-
declare function relationshipTargetIn(pkg: OoxmlPackage, ownerPart: string, relationshipId: string): {
|
|
50
|
-
readonly target: string;
|
|
51
|
-
readonly external: boolean;
|
|
52
|
-
readonly sinkSafe?: boolean;
|
|
53
|
-
} | null;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* The document metadata Word's document-property fields render.
|
|
57
|
-
*
|
|
58
|
-
* Every member is optional: an absent part, an absent element, or an empty value all read as
|
|
59
|
-
* `undefined`, and a field over a missing property paints nothing. Keys are engine-internal
|
|
60
|
-
* names; the field → property mapping (`TITLE` → `title`, `AUTHOR` → `creator`, …) lives in
|
|
61
|
-
* `layout/field-doc-property.ts`.
|
|
62
|
-
*/
|
|
63
|
-
interface DocumentProperties {
|
|
64
|
-
/** `dc:title` — TITLE. */
|
|
65
|
-
readonly title?: string;
|
|
66
|
-
/** `dc:creator` — AUTHOR. */
|
|
67
|
-
readonly creator?: string;
|
|
68
|
-
/** `dc:subject` — SUBJECT. */
|
|
69
|
-
readonly subject?: string;
|
|
70
|
-
/** `cp:keywords` — KEYWORDS. */
|
|
71
|
-
readonly keywords?: string;
|
|
72
|
-
/** `cp:lastModifiedBy` — LASTSAVEDBY. */
|
|
73
|
-
readonly lastModifiedBy?: string;
|
|
74
|
-
/** `dc:description` — COMMENTS. */
|
|
75
|
-
readonly description?: string;
|
|
76
|
-
/** `Company` from `docProps/app.xml`. No field maps to it yet; carried for completeness. */
|
|
77
|
-
readonly company?: string;
|
|
78
|
-
/** `Manager` from `docProps/app.xml`. No field maps to it yet; carried for completeness. */
|
|
79
|
-
readonly manager?: string;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/** Theme typefaces already validated for use by layout. @public */
|
|
83
|
-
interface HeadlessThemeFonts {
|
|
84
|
-
readonly major: string | null;
|
|
85
|
-
readonly minor: string | null;
|
|
86
|
-
/** East Asian heading face; optional for backwards-compatible custom views. */
|
|
87
|
-
readonly majorEastAsia?: string | null;
|
|
88
|
-
/** East Asian body face; optional for backwards-compatible custom views. */
|
|
89
|
-
readonly minorEastAsia?: string | null;
|
|
90
|
-
/** Complex-script heading and body theme faces. */
|
|
91
|
-
readonly majorBidi?: string | null;
|
|
92
|
-
readonly minorBidi?: string | null;
|
|
93
|
-
/** Language-specific theme faces, keyed by ISO 15924 script. */
|
|
94
|
-
readonly majorSupplemental?: Readonly<Record<string, string>>;
|
|
95
|
-
readonly minorSupplemental?: Readonly<Record<string, string>>;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* The read capabilities shared by browser layout, server export, and future renderers.
|
|
99
|
-
*
|
|
100
|
-
* It deliberately exposes resolved package facts rather than a binding or editor session.
|
|
101
|
-
* An exporter can therefore consume the live document without importing ProseMirror or a DOM.
|
|
102
|
-
* @public
|
|
103
|
-
*/
|
|
104
|
-
interface HeadlessDocumentView {
|
|
105
|
-
part(): OoxmlPart;
|
|
106
|
-
currentPackage(): OoxmlPackage;
|
|
107
|
-
packageRevision(): number;
|
|
108
|
-
stylesRoot(): OoxmlElement | null;
|
|
109
|
-
numberingRoot(): OoxmlElement | null;
|
|
110
|
-
settingsRoot(): OoxmlElement | null;
|
|
111
|
-
documentThemeFonts(): HeadlessThemeFonts;
|
|
112
|
-
documentProperties(): DocumentProperties;
|
|
113
|
-
headerFooterPartsBySection(): readonly HeaderFooterParts[];
|
|
114
|
-
/**
|
|
115
|
-
* Occurrence-specific relationship metadata for header/footer stories.
|
|
116
|
-
*
|
|
117
|
-
* Optional for backwards-compatible host views; core derives it from `currentPackage()` when
|
|
118
|
-
* absent. Hosts with a working-tree overlay should expose their canonical resolution directly.
|
|
119
|
-
*/
|
|
120
|
-
headerFooterResolutionBySection?(): readonly HeaderFooterSectionResolution[];
|
|
121
|
-
relationshipTarget(relationshipId: string): ReturnType<typeof relationshipTargetIn>;
|
|
122
|
-
}
|
|
123
|
-
/** A bad package is data, not an exceptional control path. @public */
|
|
124
|
-
type HeadlessDocumentRejection = OoxmlPackageRejection | 'no-main-document-tree';
|
|
125
|
-
/** Result of opening untrusted DOCX bytes for neutral layout. @public */
|
|
126
|
-
type OpenHeadlessDocumentResult = {
|
|
127
|
-
readonly ok: true;
|
|
128
|
-
readonly view: HeadlessDocumentView;
|
|
129
|
-
} | {
|
|
130
|
-
readonly ok: false;
|
|
131
|
-
readonly reason: HeadlessDocumentRejection;
|
|
132
|
-
readonly detail?: string;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Open DOCX bytes through the bounded store reader and expose only neutral layout reads.
|
|
136
|
-
* @public
|
|
137
|
-
*/
|
|
138
|
-
declare function openHeadlessDocument(bytes: Uint8Array): OpenHeadlessDocumentResult;
|
|
139
|
-
/** Internal live read view over the canonical store, preserving node identities for field pagination. */
|
|
140
|
-
declare function headlessViewOfStore(store: TreePackageStore): HeadlessDocumentView;
|
|
141
|
-
|
|
142
|
-
export { authorableHyperlinkTarget as c, ensureHyperlinkRelationship as e, headlessViewOfStore as h, openHeadlessDocument as o, relationshipTargetIn as r };
|
|
143
|
-
export type { DocumentProperties as D, EnsuredHyperlinkRelationship as E, HeadlessDocumentView as H, OpenHeadlessDocumentResult as O, HeadlessDocumentRejection as a, HeadlessThemeFonts as b };
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { an as DrawingProjection, Q as OoxmlPackage } from './types-barrel-DuC5QBNC.js';
|
|
2
|
-
|
|
3
|
-
/** Opaque handle — bytes are reachable only through {@link mintValidatedImageBytes}. */
|
|
4
|
-
interface ValidatedImageBytesHandle {
|
|
5
|
-
readonly registryId: number;
|
|
6
|
-
readonly resourceKey: string;
|
|
7
|
-
readonly contentId: string;
|
|
8
|
-
readonly generation: number;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* The engine's trust-boundary caps: recursion depth, element counts, and the rest.
|
|
13
|
-
*
|
|
14
|
-
* A caller may LOWER any of these but never raise or disable one — an override of `Infinity`,
|
|
15
|
-
* zero, a negative or `NaN` clamps into `(0, ceiling]` rather than turning the limit off. These
|
|
16
|
-
* are security ceilings, not performance budgets.
|
|
17
|
-
*/
|
|
18
|
-
interface ResourceLimits {
|
|
19
|
-
/** Max nested-structure recursion (tables/shapes/SDT/groups). */
|
|
20
|
-
readonly maxRecursionDepth: number;
|
|
21
|
-
/** Max total parsed element count. */
|
|
22
|
-
readonly maxElementCount: number;
|
|
23
|
-
/** Max package part count. */
|
|
24
|
-
readonly maxPartCount: number;
|
|
25
|
-
/** Max total decompressed bytes (zip-bomb guard). */
|
|
26
|
-
readonly maxDecompressedBytes: number;
|
|
27
|
-
/** Max total compressed input bytes. */
|
|
28
|
-
readonly maxCompressedBytes: number;
|
|
29
|
-
/** Max decompressed:compressed ratio per entry. */
|
|
30
|
-
readonly maxCompressionRatio: number;
|
|
31
|
-
/** In-memory chunk budget for streaming/spooling. */
|
|
32
|
-
readonly maxChunkBytes: number;
|
|
33
|
-
/** Max pagination passes before non-convergence is declared. */
|
|
34
|
-
readonly maxPaginationPasses: number;
|
|
35
|
-
/** Max queued items in any bounded work queue. */
|
|
36
|
-
readonly maxQueueDepth: number;
|
|
37
|
-
}
|
|
38
|
-
/** Non-disableable hard ceilings: no resolved limit may exceed these. */
|
|
39
|
-
declare const HARD_CEILINGS: ResourceLimits;
|
|
40
|
-
/** Finite defaults, all <= their hard ceiling. */
|
|
41
|
-
declare const DEFAULT_LIMITS: ResourceLimits;
|
|
42
|
-
/**
|
|
43
|
-
* Resolve caller overrides into a frozen, always-finite limit set. Each value is
|
|
44
|
-
* `min(override>0 ? override : default, ceiling)`. Infinity/0/negative/NaN can
|
|
45
|
-
* never disable a limit — the hard ceiling always wins.
|
|
46
|
-
*/
|
|
47
|
-
declare function resolveLimits(overrides?: Partial<ResourceLimits>): ResourceLimits;
|
|
48
|
-
/** Bounded image decode limits (typed-drawings-and-images task 4). */
|
|
49
|
-
/** Trust-boundary caps specific to image decoding and embedding. */
|
|
50
|
-
interface ImageResourceLimits {
|
|
51
|
-
readonly maxEncodedBytes: number;
|
|
52
|
-
readonly maxDecodedBytes: number;
|
|
53
|
-
readonly maxPixels: number;
|
|
54
|
-
readonly maxDimension: number;
|
|
55
|
-
readonly maxPolygonPoints: number;
|
|
56
|
-
readonly maxExternalRedirects: number;
|
|
57
|
-
}
|
|
58
|
-
/** Image caps nothing can raise past. A caller's override clamps into these. */
|
|
59
|
-
declare const IMAGE_RESOURCE_HARD_CEILINGS: ImageResourceLimits;
|
|
60
|
-
/** The image caps in force when a host configures none. Conservative and finite. */
|
|
61
|
-
declare const DEFAULT_IMAGE_RESOURCE_LIMITS: ImageResourceLimits;
|
|
62
|
-
/** Resolve caller overrides into frozen image limits; hard ceilings cannot be raised. */
|
|
63
|
-
declare function resolveImageResourceLimits(overrides?: Partial<ImageResourceLimits>): ImageResourceLimits;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Raster media the decode port measures and any authoring path may write.
|
|
67
|
-
*
|
|
68
|
-
* BMP and WebP are here for the same reason the other three are: an `<img>` decodes them
|
|
69
|
-
* natively, so they need a signature and a structural header and nothing else. BMP is what
|
|
70
|
-
* older documents carry; WebP is what current Word writes.
|
|
71
|
-
*/
|
|
72
|
-
type SupportedImageMime = 'image/png' | 'image/jpeg' | 'image/gif' | 'image/bmp' | 'image/webp';
|
|
73
|
-
/**
|
|
74
|
-
* Vector media painted straight from validated bytes. An `<img>` renders SVG in the
|
|
75
|
-
* browser's secure static mode — no script, no external subresource loads — so there is
|
|
76
|
-
* no decode step and no raster buffer sized by a file-supplied number.
|
|
77
|
-
*/
|
|
78
|
-
type VectorImageMime = 'image/svg+xml';
|
|
79
|
-
/** Every mime the painter can hand to an `<img>`. */
|
|
80
|
-
type RenderableImageMime = SupportedImageMime | VectorImageMime;
|
|
81
|
-
/**
|
|
82
|
-
* Media kept in the package byte-for-byte that the painter cannot hand to an `<img>`.
|
|
83
|
-
* A decode port may rasterize it; without one it paints as a labelled placeholder.
|
|
84
|
-
*/
|
|
85
|
-
type PreservedImageMime = 'image/tiff' | 'image/x-emf' | 'image/x-wmf';
|
|
86
|
-
/**
|
|
87
|
-
* What is known about one embedded image: validated, refused, or still decoding.
|
|
88
|
-
*
|
|
89
|
-
* Content type is a CLAIM. Signature sniffing, structural header validation and the decode port
|
|
90
|
-
* are authoritative, and bytes that fail them never enter public state.
|
|
91
|
-
*/
|
|
92
|
-
type ImageResourceState = {
|
|
93
|
-
readonly kind: 'ready';
|
|
94
|
-
readonly partName: string;
|
|
95
|
-
readonly contentId: string;
|
|
96
|
-
readonly resourceKey: string;
|
|
97
|
-
readonly validatedHandle: ValidatedImageBytesHandle;
|
|
98
|
-
readonly mime: RenderableImageMime;
|
|
99
|
-
readonly pixelWidth: number;
|
|
100
|
-
readonly pixelHeight: number;
|
|
101
|
-
readonly dpiX: number;
|
|
102
|
-
readonly dpiY: number;
|
|
103
|
-
} | {
|
|
104
|
-
readonly kind: 'unrenderable';
|
|
105
|
-
readonly partName: string | null;
|
|
106
|
-
readonly mime: RenderableImageMime | PreservedImageMime | 'unknown';
|
|
107
|
-
readonly reason: 'unsupported-format' | 'non-picture-graphic' | 'signature-mismatch' | 'decode-failed' | 'resource-limit';
|
|
108
|
-
} | {
|
|
109
|
-
readonly kind: 'external';
|
|
110
|
-
readonly relationshipId: string;
|
|
111
|
-
readonly sinkSafe: boolean;
|
|
112
|
-
} | {
|
|
113
|
-
readonly kind: 'missing';
|
|
114
|
-
readonly relationshipId: string;
|
|
115
|
-
} | {
|
|
116
|
-
readonly kind: 'pending';
|
|
117
|
-
readonly resourceKey: string;
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* The injected image decoder.
|
|
121
|
-
*
|
|
122
|
-
* A port rather than a direct `Image`/`createImageBitmap` call, so a worker or server runtime
|
|
123
|
-
* supplies its own and the engine never reaches for a browser global.
|
|
124
|
-
*/
|
|
125
|
-
interface ImageDecodePort {
|
|
126
|
-
decode(bytes: Uint8Array, mime: SupportedImageMime, limits: ImageResourceLimits,
|
|
127
|
-
/** Aborted when the owning lookup/session is disposed. */
|
|
128
|
-
signal?: AbortSignal): Promise<Readonly<{
|
|
129
|
-
pixelWidth: number;
|
|
130
|
-
pixelHeight: number;
|
|
131
|
-
dpiX: number;
|
|
132
|
-
dpiY: number;
|
|
133
|
-
}>>;
|
|
134
|
-
/**
|
|
135
|
-
* Optional conversion of media an `<img>` cannot render (EMF/WMF metafiles, TIFF) into a
|
|
136
|
-
* renderable raster. The returned bytes are untrusted and re-enter the full raster
|
|
137
|
-
* validation path (sniff, header, pixel caps, decode) before they can become a ready
|
|
138
|
-
* resource. A null return declines the format and keeps the labelled placeholder; so does
|
|
139
|
-
* a throw, as `decode-failed`.
|
|
140
|
-
*/
|
|
141
|
-
convertPreserved?(bytes: Uint8Array, mime: PreservedImageMime, limits: ImageResourceLimits,
|
|
142
|
-
/** Aborted when the owning lookup/session is disposed. */
|
|
143
|
-
signal?: AbortSignal): Promise<Readonly<{
|
|
144
|
-
bytes: Uint8Array;
|
|
145
|
-
mime: SupportedImageMime;
|
|
146
|
-
}> | null>;
|
|
147
|
-
}
|
|
148
|
-
/** Resolves a relationship id to a validated image resource, or reports why it could not. */
|
|
149
|
-
interface ImageResourceLookup {
|
|
150
|
-
readonly resolveEmbedded: (ownerPartName: string, relationshipId: string) => Promise<ImageResourceState>;
|
|
151
|
-
readonly resolveLinked: (ownerPartName: string, relationshipId: string) => ImageResourceState;
|
|
152
|
-
readonly resolveForProjection: (projection: DrawingProjection) => Promise<ImageResourceState>;
|
|
153
|
-
readonly liveReferenceCount: (partName: string) => number;
|
|
154
|
-
readonly dispose: () => void;
|
|
155
|
-
}
|
|
156
|
-
/** Maximum prefix inspected for SVG root detection (exported for bounded-scan tests). */
|
|
157
|
-
declare const MAX_SVG_SNIFF_BYTES = 512;
|
|
158
|
-
/** A raster header that passed structural validation: its real MIME type and pixel extent. */
|
|
159
|
-
interface ValidatedRasterHeader {
|
|
160
|
-
readonly pixelWidth: number;
|
|
161
|
-
readonly pixelHeight: number;
|
|
162
|
-
/** Horizontal physical density when bounded header metadata supplies it. */
|
|
163
|
-
readonly dpiX?: number;
|
|
164
|
-
/** Vertical physical density when bounded header metadata supplies it. */
|
|
165
|
-
readonly dpiY?: number;
|
|
166
|
-
}
|
|
167
|
-
/** Bounded scan for an `<svg` document root (optional `<?xml` prolog only). */
|
|
168
|
-
declare function hasBoundedSvgRoot(bytes: Uint8Array): boolean;
|
|
169
|
-
/** Signature sniffing — authoritative over declared content type. */
|
|
170
|
-
declare function sniffImageMime(bytes: Uint8Array): RenderableImageMime | PreservedImageMime | 'unknown';
|
|
171
|
-
/** Structural PNG IHDR validation before decode. */
|
|
172
|
-
declare function validatePngHeader(bytes: Uint8Array): ValidatedRasterHeader | null;
|
|
173
|
-
/** Structural GIF logical screen descriptor validation before decode. */
|
|
174
|
-
declare function validateGifHeader(bytes: Uint8Array): ValidatedRasterHeader | null;
|
|
175
|
-
/** Bounded JPEG marker scan through the first supported SOF marker. */
|
|
176
|
-
declare function validateJpegHeader(bytes: Uint8Array): ValidatedRasterHeader | null;
|
|
177
|
-
/**
|
|
178
|
-
* Intrinsic size of an SVG, resolved the way a browser sizes one: absolute `width`/`height`
|
|
179
|
-
* first, then `viewBox` for the missing axis or ratio, then the CSS 300x150 default.
|
|
180
|
-
*
|
|
181
|
-
* This is metadata for insert and reset-to-natural-size only. Layout uses the authored
|
|
182
|
-
* `wp:extent` and the browser rasterizes into that box, so nothing here sizes an allocation
|
|
183
|
-
* and an out-of-range value is clamped rather than refused.
|
|
184
|
-
*/
|
|
185
|
-
declare function resolveSvgIntrinsicSize(bytes: Uint8Array, limits: ImageResourceLimits): ValidatedRasterHeader | null;
|
|
186
|
-
/**
|
|
187
|
-
* Validate a raster image's header structurally and report its real MIME type and extent.
|
|
188
|
-
*
|
|
189
|
-
* Content type is a CLAIM; this is what makes it a fact. A file declaring `image/png` over JPEG
|
|
190
|
-
* bytes is caught here rather than at decode.
|
|
191
|
-
*/
|
|
192
|
-
declare function validateRasterHeader(bytes: Uint8Array, mime: SupportedImageMime): ValidatedRasterHeader | null;
|
|
193
|
-
/** Package-wide live drawing references to a media part name. */
|
|
194
|
-
declare function liveDrawingReferenceCount(pkg: OoxmlPackage, partName: string): number;
|
|
195
|
-
/** How the image cache decodes, and what it will spend doing so. */
|
|
196
|
-
interface CreateImageResourceCacheOptions {
|
|
197
|
-
readonly limits?: Partial<ImageResourceLimits>;
|
|
198
|
-
readonly decodePort: ImageDecodePort;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Derived cache for one immutable package snapshot. Registry identity is
|
|
202
|
-
* `(package snapshot, decodePort object, normalized limits)` — the first caller
|
|
203
|
-
* never imposes its decoder or limits on later callers with different options.
|
|
204
|
-
*/
|
|
205
|
-
declare function imageResourceLookupFor(pkg: OoxmlPackage, options: CreateImageResourceCacheOptions): ImageResourceLookup;
|
|
206
|
-
/** @deprecated Prefer {@link imageResourceLookupFor} — registry binds cache to package identity. */
|
|
207
|
-
/** Build the per-document image cache. Validated bytes only; refusals are remembered too. */
|
|
208
|
-
declare function createImageResourceCache(initialPkg: OoxmlPackage, options: CreateImageResourceCacheOptions): ImageResourceLookup;
|
|
209
|
-
|
|
210
|
-
export { DEFAULT_IMAGE_RESOURCE_LIMITS as D, HARD_CEILINGS as H, MAX_SVG_SNIFF_BYTES as M, resolveSvgIntrinsicSize as d, DEFAULT_LIMITS as f, IMAGE_RESOURCE_HARD_CEILINGS as g, createImageResourceCache as j, hasBoundedSvgRoot as k, imageResourceLookupFor as l, liveDrawingReferenceCount as m, resolveLimits as n, validateGifHeader as o, validateJpegHeader as p, validatePngHeader as q, resolveImageResourceLimits as r, sniffImageMime as s, validateRasterHeader as v };
|
|
211
|
-
export type { CreateImageResourceCacheOptions as C, ImageResourceState as I, PreservedImageMime as P, RenderableImageMime as R, SupportedImageMime as S, ValidatedImageBytesHandle as V, VectorImageMime as a, ImageResourceLimits as b, ImageDecodePort as c, ResourceLimits as e, ImageResourceLookup as h, ValidatedRasterHeader as i };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { U as OoxmlNodeId, V as OoxmlGenericElementNode, N as OoxmlNode } from './types-barrel-DuC5QBNC.js';
|
|
2
|
-
|
|
3
|
-
/** Office Math Markup Language namespace. */
|
|
4
|
-
declare const OFFICE_MATH_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/math";
|
|
5
|
-
declare const DEFAULT_OMML_LIMITS: Readonly<{
|
|
6
|
-
maxDepth: 24;
|
|
7
|
-
maxNodes: 256;
|
|
8
|
-
maxTextLength: 512;
|
|
9
|
-
}>;
|
|
10
|
-
/** Shared work limits for untrusted OMML and linear-math input. */
|
|
11
|
-
interface OmmlLimits {
|
|
12
|
-
readonly maxDepth?: number;
|
|
13
|
-
readonly maxNodes?: number;
|
|
14
|
-
readonly maxTextLength?: number;
|
|
15
|
-
}
|
|
16
|
-
type EquationExpression = {
|
|
17
|
-
readonly kind: 'row';
|
|
18
|
-
readonly items: readonly EquationExpression[];
|
|
19
|
-
} | {
|
|
20
|
-
readonly kind: 'text';
|
|
21
|
-
readonly value: string;
|
|
22
|
-
} | {
|
|
23
|
-
readonly kind: 'fraction';
|
|
24
|
-
readonly numerator: EquationExpression;
|
|
25
|
-
readonly denominator: EquationExpression;
|
|
26
|
-
} | {
|
|
27
|
-
readonly kind: 'radical';
|
|
28
|
-
readonly radicand: EquationExpression;
|
|
29
|
-
readonly degree?: EquationExpression;
|
|
30
|
-
} | {
|
|
31
|
-
readonly kind: 'script';
|
|
32
|
-
readonly base: EquationExpression;
|
|
33
|
-
readonly subscript?: EquationExpression;
|
|
34
|
-
readonly superscript?: EquationExpression;
|
|
35
|
-
} | {
|
|
36
|
-
readonly kind: 'nary';
|
|
37
|
-
readonly operator: string;
|
|
38
|
-
readonly body: EquationExpression;
|
|
39
|
-
readonly lowerLimit?: EquationExpression;
|
|
40
|
-
readonly upperLimit?: EquationExpression;
|
|
41
|
-
} | {
|
|
42
|
-
readonly kind: 'fallback';
|
|
43
|
-
readonly text: string;
|
|
44
|
-
};
|
|
45
|
-
interface OmmlEquationProjection {
|
|
46
|
-
readonly sourceNodeId: OoxmlNodeId;
|
|
47
|
-
readonly expression: EquationExpression;
|
|
48
|
-
readonly fallbackText: string;
|
|
49
|
-
readonly truncated: boolean;
|
|
50
|
-
readonly visitedNodes: number;
|
|
51
|
-
}
|
|
52
|
-
type LinearMathRejection = 'empty' | 'invalid-syntax' | 'invalid-xml-text' | 'depth-limit' | 'node-limit' | 'text-limit';
|
|
53
|
-
type LinearMathParseResult = {
|
|
54
|
-
readonly ok: true;
|
|
55
|
-
readonly expression: EquationExpression;
|
|
56
|
-
} | {
|
|
57
|
-
readonly ok: false;
|
|
58
|
-
readonly reason: LinearMathRejection;
|
|
59
|
-
};
|
|
60
|
-
type LinearMathOmmlResult = {
|
|
61
|
-
readonly ok: true;
|
|
62
|
-
readonly expression: EquationExpression;
|
|
63
|
-
readonly equation: OoxmlGenericElementNode;
|
|
64
|
-
} | {
|
|
65
|
-
readonly ok: false;
|
|
66
|
-
readonly reason: LinearMathRejection;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Project one preserved `m:oMath` generic node without changing its canonical source.
|
|
70
|
-
*/
|
|
71
|
-
declare function projectOmmlEquation(node: OoxmlNode, limits?: OmmlLimits): OmmlEquationProjection | null;
|
|
72
|
-
/** Parse the supported compact linear-math subset with fixed work limits. */
|
|
73
|
-
declare function parseLinearMath(input: string, limits?: OmmlLimits): LinearMathParseResult;
|
|
74
|
-
/**
|
|
75
|
-
* Convert a projected expression into reversible compact syntax.
|
|
76
|
-
*
|
|
77
|
-
* Returns an empty string when parsing the result would change the projected meaning.
|
|
78
|
-
*/
|
|
79
|
-
declare function equationExpressionToLinearMath(expression: EquationExpression): string;
|
|
80
|
-
type NextNodeId = () => string;
|
|
81
|
-
/** Parse compact linear math and generate fresh canonical OMML in one bounded operation. */
|
|
82
|
-
declare function linearMathToOmml(input: string, nextId: NextNodeId, limits?: OmmlLimits): LinearMathOmmlResult;
|
|
83
|
-
|
|
84
|
-
export { DEFAULT_OMML_LIMITS as D, OFFICE_MATH_NAMESPACE_URI as c, equationExpressionToLinearMath as e, projectOmmlEquation as f, linearMathToOmml as l, parseLinearMath as p };
|
|
85
|
-
export type { EquationExpression as E, LinearMathOmmlResult as L, OmmlEquationProjection as O, LinearMathParseResult as a, LinearMathRejection as b, OmmlLimits as d };
|