@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,252 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { O as OmmlEquationProjection } from './
|
|
4
|
-
|
|
5
|
-
/** Named revision colors. Identifiers are stable and never contain CSS. @public */
|
|
6
|
-
declare const REVISION_MARKUP_COLORS: readonly ['black', 'blue', 'turquoise', 'green', 'pink', 'red', 'yellow', 'white', 'darkBlue', 'teal', 'darkGreen', 'violet', 'darkRed', 'darkYellow', 'gray50', 'gray25', 'lightBlue', 'lightYellow', 'lightOrange', 'lightPurple', 'lightGreen', 'gray'];
|
|
7
|
-
/** @public */
|
|
8
|
-
type RevisionMarkupNamedColor = (typeof REVISION_MARKUP_COLORS)[number];
|
|
9
|
-
/** @public */
|
|
10
|
-
type RevisionMarkupColor = RevisionMarkupNamedColor | 'byAuthor' | 'auto';
|
|
11
|
-
/** @public */
|
|
12
|
-
type RevisionMarkupMark = 'none' | 'colorOnly' | 'bold' | 'italic' | 'underline' | 'doubleUnderline' | 'strikethrough' | 'doubleStrikethrough';
|
|
13
|
-
/** @public */
|
|
14
|
-
type RevisionDeletionMark = RevisionMarkupMark | 'hidden' | 'caret' | 'pound';
|
|
15
|
-
/** @public */
|
|
16
|
-
type RevisionChangedLinesMark = 'none' | 'leftBorder' | 'rightBorder' | 'outsideBorder';
|
|
17
|
-
/** @public */
|
|
18
|
-
interface RevisionMarkupStyle<Mark extends string = RevisionMarkupMark> {
|
|
19
|
-
readonly mark: Mark;
|
|
20
|
-
readonly color: RevisionMarkupColor;
|
|
21
|
-
}
|
|
22
|
-
/** Viewer-only text styling. Document highlighting remains unchanged. @public */
|
|
23
|
-
interface RevisionMarkupTextStyle<Mark extends string = RevisionMarkupMark> extends RevisionMarkupStyle<Mark> {
|
|
24
|
-
/** Background color behind revision text. Defaults to `none`. */
|
|
25
|
-
readonly background: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
26
|
-
}
|
|
27
|
-
/** Fully resolved, immutable viewer preferences. @public */
|
|
28
|
-
interface ResolvedRevisionMarkup {
|
|
29
|
-
readonly insertions: RevisionMarkupTextStyle;
|
|
30
|
-
readonly deletions: RevisionMarkupTextStyle<RevisionDeletionMark>;
|
|
31
|
-
readonly movedFrom: RevisionMarkupTextStyle<RevisionDeletionMark>;
|
|
32
|
-
readonly movedTo: RevisionMarkupTextStyle;
|
|
33
|
-
readonly formatting: RevisionMarkupTextStyle;
|
|
34
|
-
readonly changedLines: RevisionMarkupStyle<RevisionChangedLinesMark>;
|
|
35
|
-
readonly cells: {
|
|
36
|
-
readonly inserted: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
37
|
-
readonly deleted: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
38
|
-
readonly merged: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
39
|
-
readonly split: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
40
|
-
};
|
|
41
|
-
readonly trackMoves: boolean;
|
|
42
|
-
readonly trackFormatting: boolean;
|
|
43
|
-
}
|
|
44
|
-
/** Partial viewer preferences. Omitted values keep the previous value. @public */
|
|
45
|
-
type RevisionMarkupOptions = {
|
|
46
|
-
readonly [K in keyof ResolvedRevisionMarkup]?: ResolvedRevisionMarkup[K] extends boolean ? boolean : Partial<ResolvedRevisionMarkup[K]>;
|
|
47
|
-
};
|
|
48
|
-
/** Initial viewer preferences. @public */
|
|
49
|
-
declare const DEFAULT_REVISION_MARKUP: ResolvedRevisionMarkup;
|
|
50
|
-
/** Validate and merge preferences without modifying the input. @public */
|
|
51
|
-
declare function resolveRevisionMarkup(input?: RevisionMarkupOptions, previous?: ResolvedRevisionMarkup): ResolvedRevisionMarkup;
|
|
52
|
-
/** A local settings draft owned by the editor. @public */
|
|
53
|
-
interface RevisionMarkupDialogSession {
|
|
54
|
-
/** Aborts on close, replacement, load, detach, destroy, or renderer disposal. */
|
|
55
|
-
readonly signal: AbortSignal;
|
|
56
|
-
/** Read the immutable draft. */
|
|
57
|
-
get(): ResolvedRevisionMarkup;
|
|
58
|
-
/** Merge validated options into the draft without committing preferences. */
|
|
59
|
-
set(options: RevisionMarkupOptions): void;
|
|
60
|
-
/** Restore default preferences in the draft only. */
|
|
61
|
-
reset(): void;
|
|
62
|
-
/** Observe draft changes, including effective external preference changes. */
|
|
63
|
-
subscribe(listener: () => void): () => void;
|
|
64
|
-
canApply(): boolean;
|
|
65
|
-
/** Commit the draft and close. Returns false after cancellation. */
|
|
66
|
-
apply(): boolean;
|
|
67
|
-
/** Close without committing the draft. */
|
|
68
|
-
cancel(): void;
|
|
69
|
-
}
|
|
70
|
-
/** Host rendering for the Track changes options dialog. @public */
|
|
71
|
-
interface RevisionMarkupChromeHandlers {
|
|
72
|
-
readonly onRequest?: (session: RevisionMarkupDialogSession) => void;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* What a revision wrapper asserts about the content inside it.
|
|
77
|
-
*
|
|
78
|
-
* `moveFrom` / `moveTo` are deliberately distinct from `delete` / `insert`: a move is one
|
|
79
|
-
* decision with two halves, and presenting it as an unrelated deletion and insertion invites
|
|
80
|
-
* resolving one without the other, which duplicates or loses the content.
|
|
81
|
-
*/
|
|
82
|
-
type RevisionKind = 'insert' | 'delete' | 'moveFrom' | 'moveTo' | 'format';
|
|
83
|
-
/**
|
|
84
|
-
* One revision wrapper's provenance, as authored.
|
|
85
|
-
*
|
|
86
|
-
* `id` is the verbatim `@w:id` string rather than a number: `ST_DecimalNumber` restricts
|
|
87
|
-
* `xsd:integer` with no bounds, so a file may carry a value outside the safe integer range, and
|
|
88
|
-
* parsing it to a number would silently merge two distinct revisions.
|
|
89
|
-
*
|
|
90
|
-
* `date` is absent when the file omits it. `@w:date` is optional on `CT_TrackChange`, and
|
|
91
|
-
* inventing one is a silent content change.
|
|
92
|
-
*/
|
|
93
|
-
interface RevisionAttribution {
|
|
94
|
-
readonly kind: RevisionKind;
|
|
95
|
-
readonly id: string;
|
|
96
|
-
readonly author: string;
|
|
97
|
-
readonly date?: string;
|
|
98
|
-
/** The wrapper's node id, so a surface can address this exact site. */
|
|
99
|
-
readonly nodeId: string;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Which revisions layout resolves before producing pages.
|
|
103
|
-
*
|
|
104
|
-
* - `all-markup` shows both halves of every change.
|
|
105
|
-
* - `proposed` shows what the document becomes if every change is accepted.
|
|
106
|
-
* - `original` shows what it was before any of them.
|
|
107
|
-
*
|
|
108
|
-
* The last two are specified as equal to accept-all and reject-all OUTPUT, which is what makes
|
|
109
|
-
* them testable, without either applying an op.
|
|
110
|
-
*/
|
|
111
|
-
type RevisionDisplayMode = 'all-markup' | 'proposed' | 'original';
|
|
112
|
-
/**
|
|
113
|
-
* The views the review chrome offers, in Word's terms: the three layout projections plus
|
|
114
|
-
* Simple Markup, which reads as the proposed result with a red change bar beside every line
|
|
115
|
-
* a change touched — the document as accepting everything would leave it, and where.
|
|
116
|
-
*/
|
|
117
|
-
type ReviewDisplayMode = RevisionDisplayMode | 'simple-markup';
|
|
118
|
-
/**
|
|
119
|
-
* How a document renders tracked changes when nothing says otherwise.
|
|
120
|
-
*
|
|
121
|
-
* `all-markup` matches Word's own default: a reader who opens a document with pending changes
|
|
122
|
-
* sees them, rather than a clean-looking document hiding edits nobody has accepted.
|
|
123
|
-
*/
|
|
124
|
-
declare const DEFAULT_REVISION_DISPLAY_MODE: RevisionDisplayMode;
|
|
125
|
-
/**
|
|
126
|
-
* A view-time tracked-change filter. Revisions rejected by `includes` use the filter's accepted
|
|
127
|
-
* or rejected projection, while included revisions keep the display mode's normal projection.
|
|
128
|
-
*
|
|
129
|
-
* `cacheKey` is a canonical, content-based identity for layout caches. The set itself is kept
|
|
130
|
-
* because author names are attacker-controlled strings and must never be parsed back from a
|
|
131
|
-
* delimiter-based key.
|
|
132
|
-
*/
|
|
133
|
-
interface RevisionFilter {
|
|
134
|
-
readonly revisionMarkup?: ResolvedRevisionMarkup;
|
|
135
|
-
readonly hiddenAuthors: ReadonlySet<string>;
|
|
136
|
-
readonly includes?: (revision: RevisionAttribution) => boolean;
|
|
137
|
-
readonly includesNode?: (nodeId: string, author: string) => boolean;
|
|
138
|
-
/** Accepted/original projection for a revision excluded by `includesNode`. */
|
|
139
|
-
readonly excludedNodeMode?: (nodeId: string, author: string) => 'proposed' | 'original';
|
|
140
|
-
/**
|
|
141
|
-
* In a resolved view, content the view keeps paints as ORDINARY text: no author ink, no
|
|
142
|
-
* decoration, no change bar of its own. This is Word's No Markup, Original and Simple
|
|
143
|
-
* Markup, which the review chrome asks for. Without it the accepted projection keeps the
|
|
144
|
-
* attribution on kept insertions, which is what the engine paints when no review module
|
|
145
|
-
* is registered — colour by author, deletions resolved — and what its roster reads.
|
|
146
|
-
*/
|
|
147
|
-
readonly resolvedMarkup?: 'plain';
|
|
148
|
-
readonly cacheKey: string;
|
|
149
|
-
}
|
|
150
|
-
/** @deprecated Use {@link RevisionFilter}. */
|
|
151
|
-
interface RevisionAuthorFilter extends RevisionFilter {
|
|
152
|
-
}
|
|
153
|
-
/** Build a canonical reviewer filter. An empty input returns `undefined` for the fast path. */
|
|
154
|
-
declare function revisionAuthorFilter(hiddenAuthors: Iterable<string>): RevisionAuthorFilter | undefined;
|
|
155
|
-
/**
|
|
156
|
-
* Whether content under this stack of revisions is laid out in the given mode.
|
|
157
|
-
*
|
|
158
|
-
* Containment governs, so a single enclosing wrapper the mode resolves away suppresses
|
|
159
|
-
* everything inside it regardless of what the inner wrappers say. An insertion inside a
|
|
160
|
-
* deletion does not survive the proposed result: the deletion it sits in was accepted.
|
|
161
|
-
*/
|
|
162
|
-
declare function revisionsVisible(revisions: readonly RevisionAttribution[], mode: RevisionDisplayMode, authorFilter?: RevisionAuthorFilter): boolean;
|
|
163
|
-
/**
|
|
164
|
-
* Every revision on a paragraph's own MARK, from `w:pPr/w:rPr/w:ins|w:del|w:moveFrom|w:moveTo`.
|
|
165
|
-
*
|
|
166
|
-
* All four members of `EG_ParaRPrTrackChanges`. A moved paragraph carries `w:moveFrom` on the
|
|
167
|
-
* mark of the copy it left and `w:moveTo` on the mark of the copy it arrived at, so a move
|
|
168
|
-
* that spans whole paragraphs is recorded here and nowhere else.
|
|
169
|
-
*
|
|
170
|
-
* `EG_ParaRPrTrackChanges` records that the pilcrow itself was inserted or deleted, which is how
|
|
171
|
-
* Word writes a paragraph split or merge. It is not content — there is no text to decorate — so
|
|
172
|
-
* a surface shows it as a mark of its own beside the paragraph, the way Word draws a struck-
|
|
173
|
-
* through ¶.
|
|
174
|
-
*
|
|
175
|
-
* A LIST, because the group is `ins? del? moveFrom? moveTo?` and the first two can both be
|
|
176
|
-
* there: that pair is what Word writes when a second author proposes removing a mark the first
|
|
177
|
-
* proposed adding, and it is what this engine's own writer emits (`tree-op-tracked.ts`).
|
|
178
|
-
* Answering with the first one hid the second author's decision from the PAGE. The review pane
|
|
179
|
-
* walks the tree itself and always listed both, which is the worse shape of the two: a card
|
|
180
|
-
* offering a decision the reader could see no sign of.
|
|
181
|
-
*
|
|
182
|
-
* Ordered as the file orders them, which is the order the group declares.
|
|
183
|
-
*
|
|
184
|
-
* Property-position `w:ins`/`w:del` stay `generic` in the tree deliberately, so this reads them
|
|
185
|
-
* by name rather than by kind.
|
|
186
|
-
*/
|
|
187
|
-
declare function paragraphMarkRevisionsOf(paragraph: OoxmlNode): readonly RevisionAttribution[];
|
|
188
|
-
/**
|
|
189
|
-
* The tracked FORMAT change on a paragraph's own mark, from `w:pPr/w:rPr/w:rPrChange`.
|
|
190
|
-
*
|
|
191
|
-
* `CT_ParaRPr` ends with it (§17.13.5.32), and Word writes it when a user changes the mark's
|
|
192
|
-
* own run properties with tracking on. It reaches the fragment rather than a span because it
|
|
193
|
-
* decorates no characters, and it is not in `props`: a fragment's `props` carry the mark's
|
|
194
|
-
* `w:rPr` by NAME only, with none of its children.
|
|
195
|
-
*
|
|
196
|
-
* Note that `w:rPrChange/w:rPr` is `CT_ParaRPrOriginal`, which may carry its own revision
|
|
197
|
-
* marks. Those describe the mark as it WAS and must not be read as live ones, which is why
|
|
198
|
-
* this reads the change element's own attributes and never descends into it.
|
|
199
|
-
*/
|
|
200
|
-
declare function paragraphMarkFormatRevisionOf(paragraph: OoxmlNode): RevisionAttribution | null;
|
|
201
|
-
/**
|
|
202
|
-
* The single decision a one-field reader sees.
|
|
203
|
-
*
|
|
204
|
-
* A DELETION wins when a mark carries both, for the reason paint draws it that way: a break
|
|
205
|
-
* proposed and then unproposed ends up removed, so that is the decision a reader who can only
|
|
206
|
-
* see one must see. One function decides it, so the deprecated field, the deprecated function
|
|
207
|
-
* and the painted glyph cannot answer differently.
|
|
208
|
-
*/
|
|
209
|
-
declare function shownMarkRevision(revisions: readonly RevisionAttribution[]): RevisionAttribution | undefined;
|
|
210
|
-
/**
|
|
211
|
-
* Does this decision, taken, remove the paragraph mark?
|
|
212
|
-
*
|
|
213
|
-
* A deletion does, and so does a `moveFrom`: the copy the paragraph moved OUT of goes away
|
|
214
|
-
* when the move is accepted. `insert` and `moveTo` are the other half of each pair, and they
|
|
215
|
-
* keep the break. Paint, the change bar and the resolved views all ask this one question, so
|
|
216
|
-
* a `moveFrom` cannot end up struck through in the margin and blue on the glyph.
|
|
217
|
-
*/
|
|
218
|
-
declare function markRevisionRemovesMark(revision: RevisionAttribution): boolean;
|
|
219
|
-
/**
|
|
220
|
-
* The one decision on a paragraph's mark that a single-field reader sees.
|
|
221
|
-
*
|
|
222
|
-
* @deprecated Reads one of the revisions a mark can carry. Use {@link paragraphMarkRevisionsOf},
|
|
223
|
-
* which answers with all of them.
|
|
224
|
-
*/
|
|
225
|
-
declare function paragraphMarkRevisionOf(paragraph: OoxmlNode): RevisionAttribution | null;
|
|
226
|
-
/**
|
|
227
|
-
* The tracked FORMAT change on a property list, from `w:rPrChange` or `w:pPrChange`.
|
|
228
|
-
*
|
|
229
|
-
* A property change alters no characters, so it has no span of its own to strike or underline.
|
|
230
|
-
* Word marks the affected text and says what changed; the minimum a reader needs is to see that
|
|
231
|
-
* this text's formatting is itself a pending decision.
|
|
232
|
-
*
|
|
233
|
-
* Read from the flattened property list because that is what layout already carries — the
|
|
234
|
-
* change wrapper is a `w:rPr`/`w:pPr` child like any other.
|
|
235
|
-
*/
|
|
236
|
-
declare function formatRevisionOf(properties: readonly {
|
|
237
|
-
readonly localName: string;
|
|
238
|
-
readonly attributes?: Readonly<Record<string, string>>;
|
|
239
|
-
}[]): RevisionAttribution | null;
|
|
240
|
-
/** True when this stack of revisions marks its content as deleted from the live document. */
|
|
241
|
-
declare function revisionsAreDeletion(revisions: readonly RevisionAttribution[]): boolean;
|
|
242
|
-
|
|
243
|
-
/** A strikeout stroke at the drawn size, in points. `offsetPt` is the stroke TOP. @public */
|
|
244
|
-
interface StrikeoutStrokePt {
|
|
245
|
-
/** Distance from the baseline UP to the top of the stroke. */
|
|
246
|
-
readonly offsetPt: number;
|
|
247
|
-
/** Stroke height. Always positive. */
|
|
248
|
-
readonly thicknessPt: number;
|
|
249
|
-
}
|
|
1
|
+
import { a4 as OoxmlNode, aC as OoxmlProperty, O as OoxmlPart, av as OoxmlElement, aX as TableBorderStyle, aY as TextboxOutlineProjection, af as ImageResourceState, aT as SourceCrop, aZ as VectorShapeComponent, a_ as DrawingAccessibility, a$ as DrawingImageEffects, aW as DrawingTransform, b0 as DrawingChartSummary, b1 as VectorShapeProjection, b2 as PictureFrameEffects, a7 as DrawingHorizontalReferenceFrame, ab as DrawingVerticalReferenceFrame, ag as ImageWrapTarget, b3 as DrawingProjection, b4 as OoxmlDrawingNode } from './tree-op-types-Df4oY2u4.js';
|
|
2
|
+
import { b as RevisionDisplayMode, p as RevisionAuthorFilter, q as RevisionAttribution } from './revision-projection-OVusTS77.js';
|
|
3
|
+
import { O as OmmlEquationProjection, a as DrawingSupport, b as DrawingSupportIssue, D as DrawingGraphicKind, H as HeadlessDocumentView } from './drawing-graphic-kind-CXYGYbB3.js';
|
|
250
4
|
|
|
251
5
|
/**
|
|
252
6
|
* Whether a paragraph must start a new page (`w:pageBreakBefore`).
|
|
@@ -348,6 +102,15 @@ interface ParagraphLineSpacing {
|
|
|
348
102
|
readonly value: number;
|
|
349
103
|
/** Legacy noExtraLineSpacing: retain the natural baseline within an exact-height box. */
|
|
350
104
|
readonly preserveExactBaseline?: true;
|
|
105
|
+
/** A wrap band tests only the line's content, not the extra an `auto` multiple adds. @internal */
|
|
106
|
+
readonly wrapsContentOnly?: true;
|
|
107
|
+
/**
|
|
108
|
+
* DrawingML shape text: an `auto` line keeps its descent at the bottom of the box, so the
|
|
109
|
+
* space a multiple adds or removes is above the glyphs, never below them.
|
|
110
|
+
*
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
readonly descentAnchored?: true;
|
|
351
114
|
/**
|
|
352
115
|
* Active section line-grid pitch in points (`w:docGrid/@w:linePitch`). Present only when
|
|
353
116
|
* the paragraph snaps to the grid; only with `auto`. See `line-grid.ts`.
|
|
@@ -609,6 +372,8 @@ interface SectionColumns {
|
|
|
609
372
|
readonly separator?: boolean;
|
|
610
373
|
/** Authored `w:col` geometry when `equalWidth` is false. */
|
|
611
374
|
readonly definitions?: readonly SectionColumnDefinition[];
|
|
375
|
+
/** A right-to-left section (`w:bidi`): the first column is the rightmost. */
|
|
376
|
+
readonly rightToLeft?: true;
|
|
612
377
|
}
|
|
613
378
|
/**
|
|
614
379
|
* How this section is placed relative to the previous one (ECMA-376 17.6.22,
|
|
@@ -762,7 +527,7 @@ declare function geometryOfSection(section: SectionProperties): PageGeometry;
|
|
|
762
527
|
|
|
763
528
|
/**
|
|
764
529
|
* `w:tblpPr/@w:horzAnchor` (17.4.58) and `@w:vertAnchor` (17.4.66): the box a floated
|
|
765
|
-
* table's offsets are measured from.
|
|
530
|
+
* table's offsets are measured from. An absent horizontal anchor means `text`; an absent vertical anchor means `margin`.
|
|
766
531
|
*/
|
|
767
532
|
type TableFloatAnchor = 'text' | 'margin' | 'page';
|
|
768
533
|
/** `w:tblpPr/@w:tblpXSpec` (17.4.63, ST_XAlign). */
|
|
@@ -1615,6 +1380,8 @@ interface ThemeFonts {
|
|
|
1615
1380
|
readonly minorSupplemental?: Readonly<Record<string, string>>;
|
|
1616
1381
|
/** Lower-cased font table names that declare a Chinese character set. */
|
|
1617
1382
|
readonly chineseFontTableFaces?: readonly string[];
|
|
1383
|
+
/** Lower-cased font table names that declare an East Asian character set. */
|
|
1384
|
+
readonly eastAsianFontTableFaces?: readonly string[];
|
|
1618
1385
|
}
|
|
1619
1386
|
/**
|
|
1620
1387
|
* Resolve one run's direct formatting.
|
|
@@ -1680,112 +1447,6 @@ interface StoryPageFieldNeeds {
|
|
|
1680
1447
|
readonly hasPageParity?: boolean;
|
|
1681
1448
|
}
|
|
1682
1449
|
|
|
1683
|
-
interface DrawingPoint {
|
|
1684
|
-
readonly x: number;
|
|
1685
|
-
readonly y: number;
|
|
1686
|
-
}
|
|
1687
|
-
interface DrawingInsets {
|
|
1688
|
-
readonly top: number;
|
|
1689
|
-
readonly right: number;
|
|
1690
|
-
readonly bottom: number;
|
|
1691
|
-
readonly left: number;
|
|
1692
|
-
}
|
|
1693
|
-
type DrawingClipFallback = 'none' | 'unsupported-preset';
|
|
1694
|
-
interface DrawingGeometry {
|
|
1695
|
-
readonly contentBounds: LayoutBox;
|
|
1696
|
-
readonly paintBounds: LayoutBox;
|
|
1697
|
-
readonly hitBounds: LayoutBox;
|
|
1698
|
-
readonly transformedCorners: readonly DrawingPoint[];
|
|
1699
|
-
/** Unclipped image corners for affine encoding; clipping must not stretch the image. */
|
|
1700
|
-
readonly imageTransformCorners?: readonly DrawingPoint[];
|
|
1701
|
-
readonly clipPolygon: readonly DrawingPoint[] | null;
|
|
1702
|
-
readonly clipFallback: DrawingClipFallback;
|
|
1703
|
-
readonly effectInsets: DrawingInsets;
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
/**
|
|
1707
|
-
* UAX #9 embedding levels, one per UTF-16 code unit, plus the paragraph ranges they were resolved
|
|
1708
|
-
* within.
|
|
1709
|
-
*
|
|
1710
|
-
* The level is EXACT, not a direction: its parity gives direction, but the numeric value is what
|
|
1711
|
-
* reordering needs, and collapsing it early loses nested isolates.
|
|
1712
|
-
*/
|
|
1713
|
-
interface BidiEmbeddingLevels {
|
|
1714
|
-
readonly levels: Uint8Array;
|
|
1715
|
-
readonly paragraphs: readonly {
|
|
1716
|
-
readonly start: number;
|
|
1717
|
-
readonly end: number;
|
|
1718
|
-
readonly level: number;
|
|
1719
|
-
}[];
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
/**
|
|
1723
|
-
* Which `w:rFonts` slot a character resolves its face through.
|
|
1724
|
-
*
|
|
1725
|
-
* OOXML gives a run up to four faces and picks between them by SCRIPT, so one run of mixed Latin
|
|
1726
|
-
* and CJK text uses two different fonts without saying so anywhere in its properties.
|
|
1727
|
-
*/
|
|
1728
|
-
type FontSlot = 'ascii' | 'hAnsi' | 'eastAsia' | 'cs';
|
|
1729
|
-
/**
|
|
1730
|
-
* A run of text sharing one script, direction and font slot — the unit handed to the shaper.
|
|
1731
|
-
*
|
|
1732
|
-
* Shaping cannot span a script change: Arabic and Latin in one call would produce wrong joining
|
|
1733
|
-
* behaviour, so a run is itemized into these first.
|
|
1734
|
-
*/
|
|
1735
|
-
interface ScriptItem {
|
|
1736
|
-
readonly from: number;
|
|
1737
|
-
readonly to: number;
|
|
1738
|
-
readonly direction: TextDirection;
|
|
1739
|
-
readonly bidiLevel: number;
|
|
1740
|
-
readonly script: 'Zyyy' | 'Latn' | 'Grek' | 'Cyrl' | 'Hani' | 'Hebr' | 'Arab' | 'Deva' | 'Beng' | 'Thai' | 'Khmr';
|
|
1741
|
-
readonly slot: FontSlot;
|
|
1742
|
-
}
|
|
1743
|
-
/**
|
|
1744
|
-
* A code point whose script this engine does not itemize.
|
|
1745
|
-
*
|
|
1746
|
-
* Carries the offending `codePoint` so the caller can report which character stopped it, rather
|
|
1747
|
-
* than failing anonymously somewhere in the middle of a paragraph.
|
|
1748
|
-
*/
|
|
1749
|
-
declare class UnsupportedScriptError extends Error {
|
|
1750
|
-
readonly name = "UnsupportedScriptError";
|
|
1751
|
-
readonly code = "unsupportedScript";
|
|
1752
|
-
readonly codePoint: number;
|
|
1753
|
-
constructor(codePoint: number);
|
|
1754
|
-
}
|
|
1755
|
-
/**
|
|
1756
|
-
* Split text into shapeable runs by script, bidi level and font slot.
|
|
1757
|
-
*
|
|
1758
|
-
* Consumes the bidi levels rather than re-deriving direction, so itemization and reordering agree
|
|
1759
|
-
* by construction instead of by two implementations happening to match.
|
|
1760
|
-
*/
|
|
1761
|
-
declare function itemizeScriptFontSlots(text: string, paragraphOffset: number, embedding: BidiEmbeddingLevels): readonly ScriptItem[];
|
|
1762
|
-
/**
|
|
1763
|
-
* The style a piece's text is MEASURED AND PAINTED in, given the font slot it carries.
|
|
1764
|
-
*
|
|
1765
|
-
* This is the measurer-boundary resolution: pieces and spans keep the run's real resolved
|
|
1766
|
-
* style — with `fontFamily` and `fontFamilyEastAsia` both intact, so formatting readback
|
|
1767
|
-
* and the format painter see the run as authored — and every consumer that turns text into
|
|
1768
|
-
* geometry or ink resolves the face through here. The derived object is memoized per
|
|
1769
|
-
* (style, family) by {@link withFontFamily}, so measurers amortizing over style identity
|
|
1770
|
-
* keep their caches.
|
|
1771
|
-
*/
|
|
1772
|
-
declare function styleForFontSlot(style: ResolvedRunStyle, slot: FontSlot | undefined): ResolvedRunStyle;
|
|
1773
|
-
|
|
1774
|
-
/**
|
|
1775
|
-
* One parsed `HYPERLINK` instruction: the raw, unsanitized pieces.
|
|
1776
|
-
*
|
|
1777
|
-
* `target` and `anchor` are verbatim from the instruction — the projector at the trust
|
|
1778
|
-
* boundary decides what, if anything, they become in a DOM sink.
|
|
1779
|
-
*/
|
|
1780
|
-
interface HyperlinkFieldSpec {
|
|
1781
|
-
/** The target as authored (first quoted or bare non-switch token), or null. */
|
|
1782
|
-
readonly target: string | null;
|
|
1783
|
-
/** `\l` — a bookmark name in this document, or null. */
|
|
1784
|
-
readonly anchor: string | null;
|
|
1785
|
-
/** `\o` — the hover tooltip, or null. */
|
|
1786
|
-
readonly tooltip: string | null;
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
1450
|
/** One recognized REF instruction: the target name and the supported switches, nothing else. */
|
|
1790
1451
|
interface RefFieldSpec {
|
|
1791
1452
|
readonly bookmark: string;
|
|
@@ -1895,36 +1556,298 @@ interface RefNoteParts {
|
|
|
1895
1556
|
*/
|
|
1896
1557
|
declare function resolveStoryRefFields(blocks: readonly OoxmlElement[], listItems: ReadonlyMap<string, ResolvedListItem> | undefined, notes?: RefNoteParts): RefFieldContext | null;
|
|
1897
1558
|
|
|
1559
|
+
interface EquationGeometryBase {
|
|
1560
|
+
readonly box: LayoutBox;
|
|
1561
|
+
/** Baseline measured from this node's top edge. */
|
|
1562
|
+
readonly baseline: number;
|
|
1563
|
+
}
|
|
1564
|
+
interface EquationTextGeometry extends EquationGeometryBase {
|
|
1565
|
+
readonly kind: 'text' | 'fallback';
|
|
1566
|
+
readonly text: string;
|
|
1567
|
+
readonly fontSizePt: number;
|
|
1568
|
+
/** The same resolved face used by measurement and the trusted paint sink. */
|
|
1569
|
+
readonly runStyle?: ResolvedRunStyle;
|
|
1570
|
+
}
|
|
1571
|
+
interface EquationRowGeometry extends EquationGeometryBase {
|
|
1572
|
+
readonly kind: 'row';
|
|
1573
|
+
readonly items: readonly EquationGeometry[];
|
|
1574
|
+
}
|
|
1575
|
+
interface EquationFractionGeometry extends EquationGeometryBase {
|
|
1576
|
+
readonly kind: 'fraction';
|
|
1577
|
+
readonly numerator: EquationGeometry;
|
|
1578
|
+
readonly denominator: EquationGeometry;
|
|
1579
|
+
readonly bar: LayoutBox;
|
|
1580
|
+
}
|
|
1581
|
+
interface EquationRadicalGeometry extends EquationGeometryBase {
|
|
1582
|
+
readonly kind: 'radical';
|
|
1583
|
+
readonly sign: EquationTextGeometry;
|
|
1584
|
+
readonly radicand: EquationGeometry;
|
|
1585
|
+
readonly degree?: EquationGeometry;
|
|
1586
|
+
readonly bar: LayoutBox;
|
|
1587
|
+
}
|
|
1588
|
+
interface EquationBarGeometry extends EquationGeometryBase {
|
|
1589
|
+
readonly kind: 'bar';
|
|
1590
|
+
readonly body: EquationGeometry;
|
|
1591
|
+
readonly bar: LayoutBox;
|
|
1592
|
+
}
|
|
1593
|
+
interface EquationScriptGeometry extends EquationGeometryBase {
|
|
1594
|
+
readonly kind: 'script';
|
|
1595
|
+
readonly base: EquationGeometry;
|
|
1596
|
+
readonly subscript?: EquationGeometry;
|
|
1597
|
+
readonly superscript?: EquationGeometry;
|
|
1598
|
+
}
|
|
1599
|
+
interface EquationNaryGeometry extends EquationGeometryBase {
|
|
1600
|
+
readonly kind: 'nary';
|
|
1601
|
+
readonly operator: EquationTextGeometry;
|
|
1602
|
+
readonly body: EquationGeometry;
|
|
1603
|
+
readonly lowerLimit?: EquationGeometry;
|
|
1604
|
+
readonly upperLimit?: EquationGeometry;
|
|
1605
|
+
}
|
|
1606
|
+
type EquationGeometry = EquationTextGeometry | EquationRowGeometry | EquationFractionGeometry | EquationRadicalGeometry | EquationBarGeometry | EquationScriptGeometry | EquationNaryGeometry;
|
|
1607
|
+
/** Equation metadata carried by one atomic semantic span. */
|
|
1608
|
+
interface EquationSpanRecord {
|
|
1609
|
+
readonly sourceNodeId: string;
|
|
1610
|
+
readonly geometry: EquationGeometry;
|
|
1611
|
+
readonly fallbackText: string;
|
|
1612
|
+
readonly truncated: boolean;
|
|
1613
|
+
}
|
|
1614
|
+
/** Compose one bounded OMML projection into paint-ready point geometry. */
|
|
1615
|
+
declare function layoutEquation(projection: OmmlEquationProjection, measurer: TextMeasurer, style: ResolvedRunStyle): EquationSpanRecord;
|
|
1616
|
+
|
|
1898
1617
|
/**
|
|
1899
|
-
*
|
|
1618
|
+
* One occurrence that a custom component can replace: a placeholder for content the editor
|
|
1619
|
+
* cannot render, or, with `includePartial`, a drawing that the editor renders without some
|
|
1620
|
+
* features. The drawing fields are present only for drawings.
|
|
1900
1621
|
*
|
|
1901
|
-
*
|
|
1902
|
-
* a field at all — by paint the result is just text. Whether the shading is actually drawn is a
|
|
1903
|
-
* view decision made downstream, so this states the fact and nothing about the appearance.
|
|
1622
|
+
* @public
|
|
1904
1623
|
*/
|
|
1905
|
-
interface
|
|
1624
|
+
interface UnsupportedElement {
|
|
1906
1625
|
/**
|
|
1907
|
-
*
|
|
1908
|
-
*
|
|
1909
|
-
*
|
|
1910
|
-
* turns it off — because they mark the blanks somebody is meant to fill in.
|
|
1626
|
+
* How completely the editor shows this drawing: `unrendered` for a placeholder, or
|
|
1627
|
+
* `partial` for a drawing that renders without some features, offered only with
|
|
1628
|
+
* `includePartial`. Absent for content that is not a drawing.
|
|
1911
1629
|
*/
|
|
1912
|
-
readonly
|
|
1630
|
+
readonly support?: Exclude<DrawingSupport, 'native'>;
|
|
1913
1631
|
/**
|
|
1914
|
-
*
|
|
1915
|
-
*
|
|
1916
|
-
*
|
|
1917
|
-
*
|
|
1632
|
+
* The features of this drawing that the editor does not show as authored, read from its
|
|
1633
|
+
* own XML. Chart and diagram parts, inherited theme effects, and image bytes are not read,
|
|
1634
|
+
* so an empty list does not prove fidelity.
|
|
1635
|
+
* Never holds `unplaced-drawing` or `projection-diagnostic`, which only a report lists. For
|
|
1636
|
+
* a placeholder, `graphicKind` names the graphic that the editor cannot draw.
|
|
1918
1637
|
*/
|
|
1919
|
-
readonly
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1638
|
+
readonly drawingIssues?: readonly DrawingSupportIssue[];
|
|
1639
|
+
/**
|
|
1640
|
+
* The graphic a drawing holds, such as `picture`, `chart`, or `diagram`, from its source.
|
|
1641
|
+
* Note: `textbox` names every DrawingML shape, with or without text, and `shape` names only
|
|
1642
|
+
* legacy VML drawings.
|
|
1643
|
+
*/
|
|
1644
|
+
readonly graphicKind?: DrawingGraphicKind;
|
|
1645
|
+
/** The node the occurrence comes from, in the editor's current document. */
|
|
1646
|
+
readonly nodeId: string;
|
|
1647
|
+
/** The part that holds it, such as `/word/document.xml` or `/word/header1.xml`. */
|
|
1648
|
+
readonly ownerPartName: string;
|
|
1649
|
+
/** The namespace of the source element, such as the WordprocessingML namespace. */
|
|
1650
|
+
readonly namespaceUri: string | null;
|
|
1651
|
+
/** The local name of the source element, such as `drawing` or `AlternateContent`. */
|
|
1652
|
+
readonly localName: string;
|
|
1653
|
+
/**
|
|
1654
|
+
* Lossless canonical source. Treat this value as read-only and untrusted.
|
|
1655
|
+
* The object identity stays unchanged until the drawing content changes.
|
|
1656
|
+
* Use `source` to identify cached previews across component remounts.
|
|
1657
|
+
* Editor occurrences always provide a source. Standalone painters without a source lookup
|
|
1658
|
+
* return `null`.
|
|
1659
|
+
*/
|
|
1660
|
+
readonly source: OoxmlElement | null;
|
|
1661
|
+
/** `inline` inside a line of text, or `block` between paragraphs. */
|
|
1662
|
+
readonly placement: 'inline' | 'block';
|
|
1663
|
+
/** The text of the built-in placeholder. */
|
|
1664
|
+
readonly label: string;
|
|
1665
|
+
/**
|
|
1666
|
+
* Reserved geometry in document points, when the element has been laid out. Always present
|
|
1667
|
+
* for a drawing, and it includes the effect extent, as the page of
|
|
1668
|
+
* `createDrawingPreviewPackage` does.
|
|
1669
|
+
*/
|
|
1670
|
+
readonly bounds?: LayoutBox;
|
|
1671
|
+
/**
|
|
1672
|
+
* The layout record of a drawing. Use `graphicKind` to identify the graphic: the record's
|
|
1673
|
+
* `placeholderGraphicKind` names the graphic only for placeholders. A chart whose chart part
|
|
1674
|
+
* can be read also carries `chart`, whose `shownAs` describes the native presentation.
|
|
1675
|
+
* Absent for other content.
|
|
1676
|
+
*/
|
|
1677
|
+
readonly drawing?: InlineDrawingRecord | AnchoredDrawingRecord;
|
|
1678
|
+
/** The layout record of an equation shown as the built-in placeholder. */
|
|
1679
|
+
readonly equation?: EquationSpanRecord;
|
|
1680
|
+
}
|
|
1681
|
+
/** Dimensions reserved before pagination, in document points. @public */
|
|
1682
|
+
interface UnsupportedElementLayout {
|
|
1683
|
+
/** Width in points: finite, positive, and at most 100,000. */
|
|
1684
|
+
readonly width: number;
|
|
1685
|
+
/** Height in points: finite, positive, and at most 100,000. */
|
|
1686
|
+
readonly height: number;
|
|
1687
|
+
}
|
|
1688
|
+
/** The first matching registration renders each unsupported element. @public */
|
|
1689
|
+
interface UnsupportedElementRule {
|
|
1690
|
+
/**
|
|
1691
|
+
* Include partially rendered drawings (`support: 'partial'`). Defaults to `false`.
|
|
1692
|
+
* Excludes fully supported drawings, hidden drawings, and drawings without a layout position.
|
|
1693
|
+
* Excludes shapes with editable text. Partially rendered shapes without text remain eligible.
|
|
1694
|
+
*/
|
|
1695
|
+
readonly includePartial?: boolean;
|
|
1696
|
+
/**
|
|
1697
|
+
* Return true to replace this occurrence. Omit to match every offered occurrence. Offered
|
|
1698
|
+
* occurrences also include equations and other content that is not a drawing; test
|
|
1699
|
+
* `element.drawing` to match drawings only.
|
|
1700
|
+
*/
|
|
1701
|
+
readonly match?: (element: UnsupportedElement) => boolean;
|
|
1702
|
+
/** The box to reserve for content that has no layout box of its own, in points. */
|
|
1703
|
+
readonly layout?: UnsupportedElementLayout;
|
|
1704
|
+
}
|
|
1705
|
+
/**
|
|
1706
|
+
* Whether a rule claims an occurrence. Adapters use it to pick the first matching
|
|
1707
|
+
* declaration; hosts with their own registration can use it the same way.
|
|
1708
|
+
*
|
|
1709
|
+
* @public
|
|
1710
|
+
*/
|
|
1711
|
+
declare function unsupportedElementRuleMatches(rule: UnsupportedElementRule, element: UnsupportedElement): boolean;
|
|
1712
|
+
|
|
1713
|
+
/** Reserved geometry for one opaque content component. @internal */
|
|
1714
|
+
interface UnsupportedContentRecord {
|
|
1715
|
+
readonly element: UnsupportedElement;
|
|
1716
|
+
readonly display: 'inline' | 'block';
|
|
1717
|
+
readonly width: number;
|
|
1718
|
+
readonly height: number;
|
|
1719
|
+
}
|
|
1720
|
+
/** Host dimensions in points; absent keeps the engine's hidden fallback. @internal */
|
|
1721
|
+
type UnsupportedContentResolver = (element: UnsupportedElement) => UnsupportedElementLayout | null | undefined;
|
|
1722
|
+
/**
|
|
1723
|
+
* Create one projection per renderer registration set. Reused source parts retain identity.
|
|
1724
|
+
* The result is layout input only. Never serialize it or use it as an editing store.
|
|
1725
|
+
* @internal
|
|
1726
|
+
*/
|
|
1727
|
+
declare function createUnsupportedContentProjector(resolve: UnsupportedContentResolver): {
|
|
1728
|
+
part(part: OoxmlPart): OoxmlPart;
|
|
1729
|
+
view(view: HeadlessDocumentView): HeadlessDocumentView;
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* UAX #9 embedding levels, one per UTF-16 code unit, plus the paragraph ranges they were resolved
|
|
1734
|
+
* within.
|
|
1735
|
+
*
|
|
1736
|
+
* The level is EXACT, not a direction: its parity gives direction, but the numeric value is what
|
|
1737
|
+
* reordering needs, and collapsing it early loses nested isolates.
|
|
1738
|
+
*/
|
|
1739
|
+
interface BidiEmbeddingLevels {
|
|
1740
|
+
readonly levels: Uint8Array;
|
|
1741
|
+
readonly paragraphs: readonly {
|
|
1742
|
+
readonly start: number;
|
|
1743
|
+
readonly end: number;
|
|
1744
|
+
readonly level: number;
|
|
1745
|
+
}[];
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
* Which `w:rFonts` slot a character resolves its face through.
|
|
1750
|
+
*
|
|
1751
|
+
* OOXML gives a run up to four faces and picks between them by SCRIPT, so one run of mixed Latin
|
|
1752
|
+
* and CJK text uses two different fonts without saying so anywhere in its properties.
|
|
1753
|
+
*/
|
|
1754
|
+
type FontSlot = 'ascii' | 'hAnsi' | 'eastAsia' | 'cs';
|
|
1755
|
+
/**
|
|
1756
|
+
* A run of text sharing one script, direction and font slot — the unit handed to the shaper.
|
|
1757
|
+
*
|
|
1758
|
+
* Shaping cannot span a script change: Arabic and Latin in one call would produce wrong joining
|
|
1759
|
+
* behaviour, so a run is itemized into these first.
|
|
1760
|
+
*/
|
|
1761
|
+
interface ScriptItem {
|
|
1762
|
+
readonly from: number;
|
|
1763
|
+
readonly to: number;
|
|
1764
|
+
readonly direction: TextDirection;
|
|
1765
|
+
readonly bidiLevel: number;
|
|
1766
|
+
readonly script: 'Zyyy' | 'Latn' | 'Grek' | 'Cyrl' | 'Hani' | 'Hebr' | 'Arab' | 'Deva' | 'Beng' | 'Thai' | 'Khmr';
|
|
1767
|
+
readonly slot: FontSlot;
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* A code point whose script this engine does not itemize.
|
|
1771
|
+
*
|
|
1772
|
+
* Carries the offending `codePoint` so the caller can report which character stopped it, rather
|
|
1773
|
+
* than failing anonymously somewhere in the middle of a paragraph.
|
|
1774
|
+
*/
|
|
1775
|
+
declare class UnsupportedScriptError extends Error {
|
|
1776
|
+
readonly name = "UnsupportedScriptError";
|
|
1777
|
+
readonly code = "unsupportedScript";
|
|
1778
|
+
readonly codePoint: number;
|
|
1779
|
+
constructor(codePoint: number);
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Split text into shapeable runs by script, bidi level and font slot.
|
|
1783
|
+
*
|
|
1784
|
+
* Consumes the bidi levels rather than re-deriving direction, so itemization and reordering agree
|
|
1785
|
+
* by construction instead of by two implementations happening to match.
|
|
1786
|
+
*/
|
|
1787
|
+
declare function itemizeScriptFontSlots(text: string, paragraphOffset: number, embedding: BidiEmbeddingLevels): readonly ScriptItem[];
|
|
1788
|
+
/**
|
|
1789
|
+
* The style a piece's text is MEASURED AND PAINTED in, given the font slot it carries.
|
|
1790
|
+
*
|
|
1791
|
+
* This is the measurer-boundary resolution: pieces and spans keep the run's real resolved
|
|
1792
|
+
* style — with `fontFamily` and `fontFamilyEastAsia` both intact, so formatting readback
|
|
1793
|
+
* and the format painter see the run as authored — and every consumer that turns text into
|
|
1794
|
+
* geometry or ink resolves the face through here. The derived object is memoized per
|
|
1795
|
+
* (style, family) by {@link withFontFamily}, so measurers amortizing over style identity
|
|
1796
|
+
* keep their caches.
|
|
1797
|
+
*/
|
|
1798
|
+
declare function styleForFontSlot(style: ResolvedRunStyle, slot: FontSlot | undefined): ResolvedRunStyle;
|
|
1799
|
+
|
|
1800
|
+
/**
|
|
1801
|
+
* One parsed `HYPERLINK` instruction: the raw, unsanitized pieces.
|
|
1802
|
+
*
|
|
1803
|
+
* `target` and `anchor` are verbatim from the instruction — the projector at the trust
|
|
1804
|
+
* boundary decides what, if anything, they become in a DOM sink.
|
|
1805
|
+
*/
|
|
1806
|
+
interface HyperlinkFieldSpec {
|
|
1807
|
+
/** The target as authored (first quoted or bare non-switch token), or null. */
|
|
1808
|
+
readonly target: string | null;
|
|
1809
|
+
/** `\l` — a bookmark name in this document, or null. */
|
|
1810
|
+
readonly anchor: string | null;
|
|
1811
|
+
/** `\o` — the hover tooltip, or null. */
|
|
1812
|
+
readonly tooltip: string | null;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* What a piece says about the FIELD result it came from, for Word's shading.
|
|
1817
|
+
*
|
|
1818
|
+
* Carried from layout rather than decided at paint time because only the walk knows an atom was
|
|
1819
|
+
* a field at all — by paint the result is just text. Whether the shading is actually drawn is a
|
|
1820
|
+
* view decision made downstream, so this states the fact and nothing about the appearance.
|
|
1821
|
+
*/
|
|
1822
|
+
interface FieldAtomMarker {
|
|
1823
|
+
/**
|
|
1824
|
+
* A plain REF cross-reference with no nested field (not PAGEREF or NOTEREF): its result,
|
|
1825
|
+
* the target's text or number, never changes with pagination, so a justified line may treat
|
|
1826
|
+
* it as an ordinary word.
|
|
1827
|
+
*/
|
|
1828
|
+
readonly fixedResult?: true;
|
|
1829
|
+
/**
|
|
1830
|
+
* A legacy form field: `w:fldChar/w:ffData` (FORMTEXT, FORMCHECKBOX, FORMDROPDOWN).
|
|
1831
|
+
*
|
|
1832
|
+
* Word shades these on a different rule from ordinary fields — always, unless the document
|
|
1833
|
+
* turns it off — because they mark the blanks somebody is meant to fill in.
|
|
1834
|
+
*/
|
|
1835
|
+
readonly formField: boolean;
|
|
1836
|
+
/**
|
|
1837
|
+
* A legacy form CONTROL the reader can operate, with the state it paints.
|
|
1838
|
+
*
|
|
1839
|
+
* Checkboxes carry their checked state; dropdowns carry their declared entries and index.
|
|
1840
|
+
* Paint supplies a matching hit target without parsing the displayed text back.
|
|
1841
|
+
*/
|
|
1842
|
+
readonly formControl?: {
|
|
1843
|
+
readonly kind: 'checkbox';
|
|
1844
|
+
readonly checked: boolean;
|
|
1845
|
+
/** Plain accessible name; omitted for fields containing macro references. */
|
|
1846
|
+
readonly accessibleName?: string;
|
|
1847
|
+
} | {
|
|
1848
|
+
readonly kind: 'dropdown';
|
|
1849
|
+
readonly entries: readonly string[];
|
|
1850
|
+
readonly selectedIndex: number;
|
|
1928
1851
|
readonly accessibleName?: string;
|
|
1929
1852
|
};
|
|
1930
1853
|
/**
|
|
@@ -1986,6 +1909,22 @@ type HyperlinkProjector = (link: OoxmlNode) => SpanLinkRecord | null;
|
|
|
1986
1909
|
*/
|
|
1987
1910
|
type FieldLinkProjector = (spec: HyperlinkFieldSpec) => SpanLinkRecord | null;
|
|
1988
1911
|
|
|
1912
|
+
/** Document-wide East Asian line-break and whitespace policy. @public */
|
|
1913
|
+
interface CjkTypographySettings {
|
|
1914
|
+
/** Apply the strict Japanese small-kana and prolonged-sound-mark restrictions. */
|
|
1915
|
+
readonly strict: boolean;
|
|
1916
|
+
/** Disable adjacent full-width punctuation compression when false. */
|
|
1917
|
+
readonly punctuationKerning?: boolean;
|
|
1918
|
+
/** The document defaults explicitly select an East Asian face as the East Asian font. */
|
|
1919
|
+
readonly sourceEastAsianFont?: boolean;
|
|
1920
|
+
/** Whitespace compression selected by `w:characterSpacingControl`. */
|
|
1921
|
+
readonly compression: 'doNotCompress' | 'compressPunctuation' | 'compressPunctuationAndJapaneseKana';
|
|
1922
|
+
/** Custom no-line-start characters, keyed by normalized language tag. */
|
|
1923
|
+
readonly before: Readonly<Record<string, string>>;
|
|
1924
|
+
/** Custom no-line-end characters, keyed by normalized language tag. */
|
|
1925
|
+
readonly after: Readonly<Record<string, string>>;
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1989
1928
|
/** Soft ceiling matching Word's practical custom-tab UI limit. */
|
|
1990
1929
|
declare const MAX_TAB_STOPS = 64;
|
|
1991
1930
|
/**
|
|
@@ -2107,16 +2046,18 @@ declare function tabAdvanceWidth(alignment: TabAlignment, currentX: number, dest
|
|
|
2107
2046
|
*/
|
|
2108
2047
|
declare function tabStopsFingerprint(tabs: ResolvedTabStops): string;
|
|
2109
2048
|
|
|
2110
|
-
/**
|
|
2111
|
-
interface
|
|
2112
|
-
|
|
2113
|
-
readonly
|
|
2114
|
-
|
|
2115
|
-
readonly
|
|
2116
|
-
|
|
2117
|
-
readonly
|
|
2118
|
-
|
|
2119
|
-
readonly
|
|
2049
|
+
/** One layout-owned diagonal stroke, clipped to its cell-local rectangle. */
|
|
2050
|
+
interface TableCellDiagonalRecord {
|
|
2051
|
+
readonly direction: 'tl2br' | 'tr2bl';
|
|
2052
|
+
readonly x1: number;
|
|
2053
|
+
readonly y1: number;
|
|
2054
|
+
readonly x2: number;
|
|
2055
|
+
readonly y2: number;
|
|
2056
|
+
readonly widthPt: number;
|
|
2057
|
+
readonly color: string | null;
|
|
2058
|
+
readonly cssStyle: 'solid' | 'dashed' | 'dotted';
|
|
2059
|
+
readonly clipWidth: number;
|
|
2060
|
+
readonly clipHeight: number;
|
|
2120
2061
|
}
|
|
2121
2062
|
|
|
2122
2063
|
/** Test-only mutable counters; omitted by production call sites. Not package-public. */
|
|
@@ -2161,6 +2102,8 @@ interface TableBorderBox {
|
|
|
2161
2102
|
}
|
|
2162
2103
|
/** The four resolved edges of one cell, after conflict resolution against its neighbours. */
|
|
2163
2104
|
interface CellBorderBox {
|
|
2105
|
+
readonly tl2br?: TableBorderSide;
|
|
2106
|
+
readonly tr2bl?: TableBorderSide;
|
|
2164
2107
|
readonly top: TableBorderSide;
|
|
2165
2108
|
readonly left: TableBorderSide;
|
|
2166
2109
|
readonly bottom: TableBorderSide;
|
|
@@ -2211,6 +2154,7 @@ interface TableBorderStrokeRecord {
|
|
|
2211
2154
|
* only on `edgeSegments`. Compound geometry is always on `strokes`.
|
|
2212
2155
|
*/
|
|
2213
2156
|
interface ResolvedCellBorders {
|
|
2157
|
+
readonly diagonals?: readonly TableCellDiagonalRecord[];
|
|
2214
2158
|
readonly top?: ResolvedTableBorderEdge;
|
|
2215
2159
|
readonly left?: ResolvedTableBorderEdge;
|
|
2216
2160
|
readonly bottom?: ResolvedTableBorderEdge;
|
|
@@ -2333,6 +2277,8 @@ interface TextboxStoryLayout {
|
|
|
2333
2277
|
* insets. Placement resolves the shape at this width. Absent when the extent width holds.
|
|
2334
2278
|
*/
|
|
2335
2279
|
readonly extentWidth?: number;
|
|
2280
|
+
/** Box height a story that fits its shape sizes it to; absent when the extent height holds. */
|
|
2281
|
+
readonly extentHeight?: number;
|
|
2336
2282
|
/** Content box height (extent minus vertical insets). */
|
|
2337
2283
|
readonly contentHeight: number;
|
|
2338
2284
|
/** Solid fill of the hosting shape, painted behind the story; null for no fill. */
|
|
@@ -2341,8 +2287,45 @@ interface TextboxStoryLayout {
|
|
|
2341
2287
|
readonly strokeHex: string | null;
|
|
2342
2288
|
/** Outline width in points; 0 when absent. */
|
|
2343
2289
|
readonly strokeWidthPt: number;
|
|
2290
|
+
/**
|
|
2291
|
+
* Clockwise turn of the content box about `pivot`, in drawing-extent points. Absent when
|
|
2292
|
+
* the story is upright: vertical text and text that turns with its shape set it.
|
|
2293
|
+
*/
|
|
2294
|
+
readonly contentRotation?: Readonly<{
|
|
2295
|
+
degrees: number;
|
|
2296
|
+
pivot: Readonly<{
|
|
2297
|
+
x: number;
|
|
2298
|
+
y: number;
|
|
2299
|
+
}>;
|
|
2300
|
+
}>;
|
|
2301
|
+
/** Shape outline painted instead of a rectangle; absent for a rectangle. */
|
|
2302
|
+
readonly outline?: TextboxOutlineProjection;
|
|
2303
|
+
/** Clockwise turn of the fill and outline about the extent centre; absent when upright. */
|
|
2304
|
+
readonly chromeRotationDegrees?: number;
|
|
2305
|
+
/** The outline is centred on the extent edge rather than inside it. */
|
|
2306
|
+
readonly strokeCentered?: true;
|
|
2307
|
+
/** Outline dash pattern in points; absent for solid. */
|
|
2308
|
+
readonly strokeDashPt?: readonly number[];
|
|
2309
|
+
/** How outline dashes end; absent for flat ends. */
|
|
2310
|
+
readonly strokeCap?: 'round' | 'square';
|
|
2311
|
+
/** Shadow colour, opacity and page offset in points. */
|
|
2312
|
+
readonly shadow?: Readonly<{
|
|
2313
|
+
hex: string;
|
|
2314
|
+
alpha: number;
|
|
2315
|
+
dx: number;
|
|
2316
|
+
dy: number;
|
|
2317
|
+
/** The solid silhouette, seen only outside the shape; no text shadow. */
|
|
2318
|
+
obscured: boolean;
|
|
2319
|
+
}>;
|
|
2344
2320
|
/** True when layout hit a named bound and returned a truncated / empty story. */
|
|
2345
2321
|
readonly fallbackReason?: TextboxStoryFallbackReason;
|
|
2322
|
+
/** DrawingML shape text: lines past the box paint outside it, not clipped at the drawing. */
|
|
2323
|
+
readonly overflowVisible?: true;
|
|
2324
|
+
/**
|
|
2325
|
+
* The drawing's `vectorShape` paints the box; the fill, outline and shadow fields here only
|
|
2326
|
+
* describe it, and painters draw just the text.
|
|
2327
|
+
*/
|
|
2328
|
+
readonly chromeByVector?: true;
|
|
2346
2329
|
/**
|
|
2347
2330
|
* Resource identities of the drawings the clip DROPPED, in flow order.
|
|
2348
2331
|
*
|
|
@@ -2372,16 +2355,122 @@ interface GroupTextboxStoryRecord {
|
|
|
2372
2355
|
readonly rotationDegrees: number;
|
|
2373
2356
|
}
|
|
2374
2357
|
|
|
2375
|
-
/**
|
|
2376
|
-
|
|
2358
|
+
/** One picture member of a drawing group after the first, as a drawing record holds it. */
|
|
2359
|
+
interface DrawingGroupPictureLayerRecord {
|
|
2360
|
+
/** The picture's own image resource, resolved like the record's `resource`. */
|
|
2361
|
+
readonly resource: ImageResourceState;
|
|
2362
|
+
/** The picture's own `a:srcRect` crop, as fractions of the image. */
|
|
2363
|
+
readonly crop: SourceCrop;
|
|
2364
|
+
/**
|
|
2365
|
+
* The picture's frame as fractions of the drawing extent, which is
|
|
2366
|
+
* `geometry.contentBounds` of the record.
|
|
2367
|
+
*/
|
|
2368
|
+
readonly frameUnit: Readonly<{
|
|
2369
|
+
x: number;
|
|
2370
|
+
y: number;
|
|
2371
|
+
width: number;
|
|
2372
|
+
height: number;
|
|
2373
|
+
}>;
|
|
2374
|
+
}
|
|
2375
|
+
/**
|
|
2376
|
+
* The record that paints one layer picture alone: the layer's resource and crop, with its
|
|
2377
|
+
* frame as the image corners, no vector members, no link, and no other layers. Every output
|
|
2378
|
+
* paints a layer through its ordinary group picture path with this record.
|
|
2379
|
+
*
|
|
2380
|
+
* @internal
|
|
2381
|
+
*/
|
|
2382
|
+
declare function groupPictureLayerDrawing<D extends InlineDrawingRecord | AnchoredDrawingRecord>(drawing: D, layer: DrawingGroupPictureLayerRecord): D;
|
|
2383
|
+
|
|
2384
|
+
/** `x' = scaleX * x + offsetX`, `y' = scaleY * y + offsetY`, from text space into the box. */
|
|
2385
|
+
interface TextArtFit {
|
|
2386
|
+
readonly scaleX: number;
|
|
2387
|
+
readonly scaleY: number;
|
|
2388
|
+
readonly offsetX: number;
|
|
2389
|
+
readonly offsetY: number;
|
|
2390
|
+
}
|
|
2391
|
+
interface DrawingTextArtRecord {
|
|
2392
|
+
readonly text: string;
|
|
2393
|
+
readonly fontFamily: string;
|
|
2394
|
+
readonly bold: boolean;
|
|
2395
|
+
readonly italic: boolean;
|
|
2396
|
+
/** Size of the unfitted text that `fit` maps into the box. */
|
|
2397
|
+
readonly fontSizePt: number;
|
|
2398
|
+
/** `RRGGBB`, or null when the text is not filled. */
|
|
2399
|
+
readonly fillHex: string | null;
|
|
2400
|
+
readonly fillAlpha: number;
|
|
2401
|
+
/** `RRGGBB`, or null when the text is not outlined. */
|
|
2402
|
+
readonly strokeHex: string | null;
|
|
2403
|
+
readonly strokeAlpha: number;
|
|
2404
|
+
readonly strokeWidthPt: number;
|
|
2405
|
+
/** Clockwise rotation about the box centre. */
|
|
2406
|
+
readonly rotationDegrees: number;
|
|
2407
|
+
/**
|
|
2408
|
+
* The fitted glyph outlines in points from the box's top-left corner, as absolute M/L/Q/C/Z
|
|
2409
|
+
* path data. Null when the measurer knew only the ink box: paint then draws the text at
|
|
2410
|
+
* `fontSizePt` through `fit`.
|
|
2411
|
+
*/
|
|
2412
|
+
readonly path: string | null;
|
|
2413
|
+
/** Null when the measurer could not bound the string's ink: nothing paints. */
|
|
2414
|
+
readonly fit: TextArtFit | null;
|
|
2415
|
+
/**
|
|
2416
|
+
* The geometry an installed text art layout drew, in EMU from the box's top-left corner,
|
|
2417
|
+
* unrotated. When present, paint draws these in place of `path`.
|
|
2418
|
+
*/
|
|
2419
|
+
readonly components?: readonly VectorShapeComponent[];
|
|
2420
|
+
/** Box-local bounds of the components' ink in points, when it reaches past the box. */
|
|
2421
|
+
readonly inkBounds?: Readonly<{
|
|
2422
|
+
left: number;
|
|
2423
|
+
top: number;
|
|
2424
|
+
right: number;
|
|
2425
|
+
bottom: number;
|
|
2426
|
+
}>;
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
interface DrawingPoint {
|
|
2430
|
+
readonly x: number;
|
|
2431
|
+
readonly y: number;
|
|
2432
|
+
}
|
|
2433
|
+
interface DrawingInsets {
|
|
2434
|
+
readonly top: number;
|
|
2435
|
+
readonly right: number;
|
|
2436
|
+
readonly bottom: number;
|
|
2437
|
+
readonly left: number;
|
|
2438
|
+
}
|
|
2439
|
+
type DrawingClipFallback = 'none' | 'unsupported-preset';
|
|
2440
|
+
interface DrawingGeometry {
|
|
2441
|
+
readonly contentBounds: LayoutBox;
|
|
2442
|
+
readonly paintBounds: LayoutBox;
|
|
2443
|
+
readonly hitBounds: LayoutBox;
|
|
2444
|
+
readonly transformedCorners: readonly DrawingPoint[];
|
|
2445
|
+
/** Unclipped image corners for affine encoding; clipping must not stretch the image. */
|
|
2446
|
+
readonly imageTransformCorners?: readonly DrawingPoint[];
|
|
2447
|
+
readonly clipPolygon: readonly DrawingPoint[] | null;
|
|
2448
|
+
readonly clipFallback: DrawingClipFallback;
|
|
2449
|
+
readonly effectInsets: DrawingInsets;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
/**
|
|
2453
|
+
* How a drawing record holds the picture member of a shape group.
|
|
2454
|
+
*
|
|
2455
|
+
* @public
|
|
2456
|
+
*/
|
|
2377
2457
|
interface DrawingGroupPictureRecord {
|
|
2378
2458
|
/**
|
|
2379
|
-
* Whether the group is the chosen branch of a run-level `mc:AlternateContent`.
|
|
2380
|
-
*
|
|
2381
|
-
* it cannot draw. A group without it shows the output's unsupported-drawing result.
|
|
2459
|
+
* Whether the group is the chosen branch of a run-level `mc:AlternateContent`.
|
|
2460
|
+
* Failed picture resources show one placeholder for the whole group.
|
|
2382
2461
|
*/
|
|
2383
2462
|
readonly alternateContent: boolean;
|
|
2384
2463
|
}
|
|
2464
|
+
/**
|
|
2465
|
+
* The kind of graphic a non-picture drawing holds: `chart` (a chart), `diagram` (SmartArt),
|
|
2466
|
+
* `textbox` (a DrawingML shape, with or without text), `group` (a shape group), `canvas` (a
|
|
2467
|
+
* drawing canvas), `shape` (a legacy VML drawing, such as WordArt), or `graphic` (any other
|
|
2468
|
+
* graphic). A picture, including an EMF, WMF or TIFF picture that does not convert, has none.
|
|
2469
|
+
*
|
|
2470
|
+
* @public
|
|
2471
|
+
*/
|
|
2472
|
+
type DrawingPlaceholderKind = 'chart' | 'diagram' | 'shape' | 'group' | 'textbox' | 'canvas' | 'graphic';
|
|
2473
|
+
|
|
2385
2474
|
interface InlineDrawingRecord {
|
|
2386
2475
|
readonly kind: 'inlineDrawing';
|
|
2387
2476
|
readonly drawingNodeId: string;
|
|
@@ -2412,10 +2501,26 @@ interface InlineDrawingRecord {
|
|
|
2412
2501
|
readonly effects: DrawingImageEffects;
|
|
2413
2502
|
readonly crop: SourceCrop;
|
|
2414
2503
|
readonly transform: DrawingTransform;
|
|
2415
|
-
/**
|
|
2416
|
-
readonly placeholderGraphicKind:
|
|
2504
|
+
/** Graphic kind of a non-picture drawing, naming its placeholder; null for pictures. */
|
|
2505
|
+
readonly placeholderGraphicKind: DrawingPlaceholderKind | null;
|
|
2506
|
+
/**
|
|
2507
|
+
* The title and plot types of a drawing that holds a chart whose chart part can be read, and
|
|
2508
|
+
* how the page shows it (`shownAs`): drawn, by its saved fallback, or as a placeholder.
|
|
2509
|
+
*/
|
|
2510
|
+
readonly chart?: DrawingChartSummary;
|
|
2511
|
+
/**
|
|
2512
|
+
* The resource of the picture saved in a chart's `mc:Fallback`, whichever branch the page
|
|
2513
|
+
* shows, for an output that exports a chart as its saved picture. Absent without one.
|
|
2514
|
+
*
|
|
2515
|
+
* @internal
|
|
2516
|
+
*/
|
|
2517
|
+
readonly chartFallbackResource?: ImageResourceState;
|
|
2417
2518
|
/** Typed solid-geometry payload for a renderable `wps:wsp` shape; null otherwise. */
|
|
2418
2519
|
readonly vectorShape: VectorShapeProjection | null;
|
|
2520
|
+
/** Legacy text art on the line, fitted to its box. */
|
|
2521
|
+
readonly textArt?: DrawingTextArtRecord;
|
|
2522
|
+
/** A picture's reflection and soft edges, in the extent's EMU; absent when it has none. */
|
|
2523
|
+
readonly frameEffects?: PictureFrameEffects;
|
|
2419
2524
|
/**
|
|
2420
2525
|
* Present when the image is the picture member of a drawing group. The image then fills
|
|
2421
2526
|
* the bounds of `geometry.imageTransformCorners`, not `geometry.contentBounds`, and paints
|
|
@@ -2425,6 +2530,11 @@ interface InlineDrawingRecord {
|
|
|
2425
2530
|
* shows no part of the group.
|
|
2426
2531
|
*/
|
|
2427
2532
|
readonly groupPicture?: DrawingGroupPictureRecord;
|
|
2533
|
+
/**
|
|
2534
|
+
* The group's other picture members, in document order. Each paints above the record's
|
|
2535
|
+
* own image and the layers before it, and below `vectorShape`. Absent for one picture.
|
|
2536
|
+
*/
|
|
2537
|
+
readonly groupPictureLayers?: readonly DrawingGroupPictureLayerRecord[];
|
|
2428
2538
|
/**
|
|
2429
2539
|
* The revision wrappers enclosing the owning run, outermost first — the same stack spans
|
|
2430
2540
|
* carry, so paint and review chrome give a tracked picture the same cues as tracked text.
|
|
@@ -2489,6 +2599,8 @@ interface AnchoredDrawingRecord extends Omit<InlineDrawingRecord, 'kind' | 'base
|
|
|
2489
2599
|
readonly layoutFallback?: AnchoredDrawingLayoutFallback;
|
|
2490
2600
|
/** Canonical document traversal index within the owner story part. */
|
|
2491
2601
|
readonly sourceOrder?: number;
|
|
2602
|
+
/** Floating VML text art fitted to the box; paint draws it instead of a resource. */
|
|
2603
|
+
readonly textArt?: DrawingTextArtRecord;
|
|
2492
2604
|
}
|
|
2493
2605
|
|
|
2494
2606
|
/**
|
|
@@ -2551,25 +2663,6 @@ declare function readNumPr(paragraphPropertyNodes: readonly OoxmlNode[]): {
|
|
|
2551
2663
|
* and so it is when nothing delegates, which keeps layout cache identity.
|
|
2552
2664
|
*/
|
|
2553
2665
|
declare function withNumberingStyleLinks(index: NumberingIndex, styleCascade: StyleCascadeTable | undefined): NumberingIndex;
|
|
2554
|
-
/**
|
|
2555
|
-
* The effective indent of a list paragraph: `inherited`, then the numbering LEVEL, then
|
|
2556
|
-
* `direct`, per attribute.
|
|
2557
|
-
*
|
|
2558
|
-
* A level's `w:pPr/w:ind` applies per attribute between the two tiers, and the ordering
|
|
2559
|
-
* matters on real documents. A converted agreement numbers its `(a)` items with a level
|
|
2560
|
-
* stating `left=1512 hanging=738` under a `ListParagraph` style stating
|
|
2561
|
-
* `left=775 hanging=624`, and states only `hanging="737"` on the paragraph itself. Reading
|
|
2562
|
-
* the flattened cascade as "the paragraph's indent" gave the STYLE's 775 to a level that had
|
|
2563
|
-
* overridden it, so every lettered sub-item hung a full indent step to the left of where
|
|
2564
|
-
* Word puts it.
|
|
2565
|
-
*
|
|
2566
|
-
* `inherited` is what the level outranks and `direct` is what outranks it. When the
|
|
2567
|
-
* paragraph's own `w:pPr` states a `w:numPr`, these are the style chain (after the document
|
|
2568
|
-
* defaults) and that `w:pPr`. Otherwise the level sits directly below the nearest style that
|
|
2569
|
-
* states a `w:numPr`: that style, the styles based on it and the paragraph's own `w:pPr` go
|
|
2570
|
-
* in `direct`, and the defaults and that style's bases go in `inherited`.
|
|
2571
|
-
*/
|
|
2572
|
-
declare function mergeListIndent(levelIndent: NumberingLevelIndent, inherited: readonly OoxmlProperty[], direct?: readonly OoxmlProperty[]): NumberingLevelIndent;
|
|
2573
2666
|
|
|
2574
2667
|
/**
|
|
2575
2668
|
* Resolve every list paragraph in a story to a {@link ResolvedListItem}, keyed by node id.
|
|
@@ -2622,6 +2715,8 @@ declare const MAX_STYLE_DEFINITIONS = 4096;
|
|
|
2622
2715
|
* styles part are never reused under another.
|
|
2623
2716
|
*/
|
|
2624
2717
|
interface StyleCascadeTable {
|
|
2718
|
+
/** Fill section columns without balancing: `w:noColumnBalance` is on in a legacy mode. */
|
|
2719
|
+
readonly noColumnBalance?: true;
|
|
2625
2720
|
/** Keep floating tables that fit a full page together under the compatibility flag. */
|
|
2626
2721
|
readonly doNotBreakWrappedTables?: true;
|
|
2627
2722
|
/** Legacy or explicitly disabled optional OpenType substitutions. */
|
|
@@ -2637,16 +2732,15 @@ interface StyleCascadeTable {
|
|
|
2637
2732
|
* spacing is a fixed 5pt before and 10pt after.
|
|
2638
2733
|
*/
|
|
2639
2734
|
readonly fixedParagraphSpacing?: true;
|
|
2640
|
-
/**
|
|
2641
|
-
* `w:doNotExpandShiftReturn`: a justified line ending in a manual line break keeps its
|
|
2642
|
-
* natural spacing, as a last line does.
|
|
2643
|
-
*/
|
|
2735
|
+
/** `w:doNotExpandShiftReturn`: a justified line before a manual break keeps natural spacing. */
|
|
2644
2736
|
readonly unstretchedManualBreakLines?: true;
|
|
2645
2737
|
/**
|
|
2646
2738
|
* Legacy modes: a justified line ending in a page or column break stretches to the measure
|
|
2647
2739
|
* unless it is the last line of its paragraph.
|
|
2648
2740
|
*/
|
|
2649
2741
|
readonly pageBreakLinesStretch?: true;
|
|
2742
|
+
/** `w:splitPgBreakAndParaMark` in a legacy mode: the mark after a page break takes a line. @internal */
|
|
2743
|
+
readonly pageBreakMarkOnNextPage?: true;
|
|
2650
2744
|
/** Explicit compatibility opt-in to the unmodified ISO table style hierarchy. */
|
|
2651
2745
|
readonly strictTableStyleHierarchy?: boolean;
|
|
2652
2746
|
readonly typography?: CjkTypographySettings;
|
|
@@ -2792,100 +2886,49 @@ interface ParagraphLayoutInputs {
|
|
|
2792
2886
|
readonly outlineLevel: number | null;
|
|
2793
2887
|
readonly bottomBorder: ParagraphBorderEdge | undefined;
|
|
2794
2888
|
/**
|
|
2795
|
-
* Every `CT_PBdr` edge after cascade, not just the bottom one.
|
|
2796
|
-
*
|
|
2797
|
-
* `bottomBorder` stays alongside it because the fragment signature and the table flow
|
|
2798
|
-
* read that field by name; this is the whole box, so a cell paragraph gets the same
|
|
2799
|
-
* frame a body paragraph does.
|
|
2800
|
-
*/
|
|
2801
|
-
readonly borders: ParagraphBorders;
|
|
2802
|
-
/** Validated 6-hex paragraph shading fill from cascaded `w:pPr/w:shd`, absent for none. */
|
|
2803
|
-
readonly shading: string | undefined;
|
|
2804
|
-
readonly inheritedRunProperties: readonly OoxmlProperty[];
|
|
2805
|
-
/**
|
|
2806
|
-
* Paragraph-mark cascade (`inheritedRunProperties` + `w:pPr/w:rPr` and its `w:rStyle`).
|
|
2807
|
-
* Empty-line sizing and last-line mark height (without the `w:rStyle`) — never content face.
|
|
2808
|
-
*/
|
|
2809
|
-
readonly markRunProperties: readonly OoxmlProperty[];
|
|
2810
|
-
/** Cascaded custom tab stops + default interval for paragraph-flow breaking. */
|
|
2811
|
-
readonly tabStops: ResolvedTabStops;
|
|
2812
|
-
/**
|
|
2813
|
-
* Fingerprint folded into the paragraph layout cache key — nested `w:tabs` are absent
|
|
2814
|
-
* from flat property bags, so style-inherited stops must be named explicitly.
|
|
2815
|
-
*/
|
|
2816
|
-
readonly tabStopsCacheToken: string;
|
|
2817
|
-
/** Resolved list marker inputs when the paragraph participates in numbering. */
|
|
2818
|
-
readonly listItem?: ResolvedListItem;
|
|
2819
|
-
}
|
|
2820
|
-
/**
|
|
2821
|
-
* Resolve every paragraph input semantic layout / table cells share: cascaded props when a
|
|
2822
|
-
* style table is present, otherwise direct formatting only.
|
|
2823
|
-
*
|
|
2824
|
-
* When `listItem` is provided, its merged level indent becomes the paragraph indent (list
|
|
2825
|
-
* hanging / left from `numbering.xml`), which is what Word uses for fixture list paragraphs
|
|
2826
|
-
* that author no direct `w:ind`.
|
|
2827
|
-
*
|
|
2828
|
-
* `tableCellStyle` carries what the enclosing table's style says about this cell's
|
|
2829
|
-
* paragraphs; body paragraphs pass nothing.
|
|
2830
|
-
*
|
|
2831
|
-
* `inTableCell` is asked for separately because a cell paragraph may have no table style to
|
|
2832
|
-
* inherit at all, and `w:beforeAutospacing` still needs to know it is in a cell.
|
|
2833
|
-
*
|
|
2834
|
-
* `lineUnitPt` is the section's ACTIVE line-grid pitch. It sizes line-unit paragraph margins
|
|
2835
|
-
* and snaps the paragraph's lines to the grid; absent means no grid and the fixed 12pt unit.
|
|
2836
|
-
*/
|
|
2837
|
-
declare function resolveParagraphLayoutInputs(paragraph: OoxmlElement, contentWidth: number, styleCascade: StyleCascadeTable | undefined, listItem?: ResolvedListItem, tableCellStyle?: TableCellStyleFormatting, inTableCell?: boolean, lineUnitPt?: number): ParagraphLayoutInputs;
|
|
2838
|
-
|
|
2839
|
-
interface EquationGeometryBase {
|
|
2840
|
-
readonly box: LayoutBox;
|
|
2841
|
-
/** Baseline measured from this node's top edge. */
|
|
2842
|
-
readonly baseline: number;
|
|
2843
|
-
}
|
|
2844
|
-
interface EquationTextGeometry extends EquationGeometryBase {
|
|
2845
|
-
readonly kind: 'text' | 'fallback';
|
|
2846
|
-
readonly text: string;
|
|
2847
|
-
readonly fontSizePt: number;
|
|
2848
|
-
}
|
|
2849
|
-
interface EquationRowGeometry extends EquationGeometryBase {
|
|
2850
|
-
readonly kind: 'row';
|
|
2851
|
-
readonly items: readonly EquationGeometry[];
|
|
2852
|
-
}
|
|
2853
|
-
interface EquationFractionGeometry extends EquationGeometryBase {
|
|
2854
|
-
readonly kind: 'fraction';
|
|
2855
|
-
readonly numerator: EquationGeometry;
|
|
2856
|
-
readonly denominator: EquationGeometry;
|
|
2857
|
-
readonly bar: LayoutBox;
|
|
2858
|
-
}
|
|
2859
|
-
interface EquationRadicalGeometry extends EquationGeometryBase {
|
|
2860
|
-
readonly kind: 'radical';
|
|
2861
|
-
readonly sign: EquationTextGeometry;
|
|
2862
|
-
readonly radicand: EquationGeometry;
|
|
2863
|
-
readonly degree?: EquationGeometry;
|
|
2864
|
-
readonly bar: LayoutBox;
|
|
2865
|
-
}
|
|
2866
|
-
interface EquationScriptGeometry extends EquationGeometryBase {
|
|
2867
|
-
readonly kind: 'script';
|
|
2868
|
-
readonly base: EquationGeometry;
|
|
2869
|
-
readonly subscript?: EquationGeometry;
|
|
2870
|
-
readonly superscript?: EquationGeometry;
|
|
2871
|
-
}
|
|
2872
|
-
interface EquationNaryGeometry extends EquationGeometryBase {
|
|
2873
|
-
readonly kind: 'nary';
|
|
2874
|
-
readonly operator: EquationTextGeometry;
|
|
2875
|
-
readonly body: EquationGeometry;
|
|
2876
|
-
readonly lowerLimit?: EquationGeometry;
|
|
2877
|
-
readonly upperLimit?: EquationGeometry;
|
|
2878
|
-
}
|
|
2879
|
-
type EquationGeometry = EquationTextGeometry | EquationRowGeometry | EquationFractionGeometry | EquationRadicalGeometry | EquationScriptGeometry | EquationNaryGeometry;
|
|
2880
|
-
/** Equation metadata carried by one atomic semantic span. */
|
|
2881
|
-
interface EquationSpanRecord {
|
|
2882
|
-
readonly sourceNodeId: string;
|
|
2883
|
-
readonly geometry: EquationGeometry;
|
|
2884
|
-
readonly fallbackText: string;
|
|
2885
|
-
readonly truncated: boolean;
|
|
2889
|
+
* Every `CT_PBdr` edge after cascade, not just the bottom one.
|
|
2890
|
+
*
|
|
2891
|
+
* `bottomBorder` stays alongside it because the fragment signature and the table flow
|
|
2892
|
+
* read that field by name; this is the whole box, so a cell paragraph gets the same
|
|
2893
|
+
* frame a body paragraph does.
|
|
2894
|
+
*/
|
|
2895
|
+
readonly borders: ParagraphBorders;
|
|
2896
|
+
/** Validated 6-hex paragraph shading fill from cascaded `w:pPr/w:shd`, absent for none. */
|
|
2897
|
+
readonly shading: string | undefined;
|
|
2898
|
+
readonly inheritedRunProperties: readonly OoxmlProperty[];
|
|
2899
|
+
/**
|
|
2900
|
+
* Paragraph-mark cascade (`inheritedRunProperties` + `w:pPr/w:rPr` and its `w:rStyle`).
|
|
2901
|
+
* Empty-line sizing and last-line mark height (without the `w:rStyle`) — never content face.
|
|
2902
|
+
*/
|
|
2903
|
+
readonly markRunProperties: readonly OoxmlProperty[];
|
|
2904
|
+
/** Cascaded custom tab stops + default interval for paragraph-flow breaking. */
|
|
2905
|
+
readonly tabStops: ResolvedTabStops;
|
|
2906
|
+
/**
|
|
2907
|
+
* Fingerprint folded into the paragraph layout cache key — nested `w:tabs` are absent
|
|
2908
|
+
* from flat property bags, so style-inherited stops must be named explicitly.
|
|
2909
|
+
*/
|
|
2910
|
+
readonly tabStopsCacheToken: string;
|
|
2911
|
+
/** Resolved list marker inputs when the paragraph participates in numbering. */
|
|
2912
|
+
readonly listItem?: ResolvedListItem;
|
|
2886
2913
|
}
|
|
2887
|
-
/**
|
|
2888
|
-
|
|
2914
|
+
/**
|
|
2915
|
+
* Resolve every paragraph input semantic layout / table cells share: cascaded props when a
|
|
2916
|
+
* style table is present, otherwise direct formatting only.
|
|
2917
|
+
*
|
|
2918
|
+
* When `listItem` is provided, its merged level indent becomes the paragraph indent (list
|
|
2919
|
+
* hanging / left from `numbering.xml`), which is what Word uses for fixture list paragraphs
|
|
2920
|
+
* that author no direct `w:ind`.
|
|
2921
|
+
*
|
|
2922
|
+
* `tableCellStyle` carries what the enclosing table's style says about this cell's
|
|
2923
|
+
* paragraphs; body paragraphs pass nothing.
|
|
2924
|
+
*
|
|
2925
|
+
* `inTableCell` is asked for separately because a cell paragraph may have no table style to
|
|
2926
|
+
* inherit at all, and `w:beforeAutospacing` still needs to know it is in a cell.
|
|
2927
|
+
*
|
|
2928
|
+
* `lineUnitPt` is the section's ACTIVE line-grid pitch. It sizes line-unit paragraph margins
|
|
2929
|
+
* and snaps the paragraph's lines to the grid; absent means no grid and the fixed 12pt unit.
|
|
2930
|
+
*/
|
|
2931
|
+
declare function resolveParagraphLayoutInputs(paragraph: OoxmlElement, contentWidth: number, styleCascade: StyleCascadeTable | undefined, listItem?: ResolvedListItem, tableCellStyle?: TableCellStyleFormatting, inTableCell?: boolean, lineUnitPt?: number): ParagraphLayoutInputs;
|
|
2889
2932
|
|
|
2890
2933
|
/** Published root story containing an artifact occurrence. @public */
|
|
2891
2934
|
type SemanticArtifactRootStoryKind = 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'note-separator';
|
|
@@ -2974,6 +3017,73 @@ interface SemanticCommentArtifactRecord {
|
|
|
2974
3017
|
/** Exporter-neutral review artifact normalized by core. @public */
|
|
2975
3018
|
type SemanticReviewArtifactRecord = SemanticTrackedChangeArtifactRecord | SemanticCommentArtifactRecord;
|
|
2976
3019
|
|
|
3020
|
+
/**
|
|
3021
|
+
* Raw `w:lock/@w:val` on one control, or `unlocked` when absent / unrecognised.
|
|
3022
|
+
*
|
|
3023
|
+
* Effective permissions across a nesting chain are the union of every ancestor's lock on two
|
|
3024
|
+
* axes (content edit / removal); see {@link ContentControlBoundaryRecord.effectiveLock}.
|
|
3025
|
+
*/
|
|
3026
|
+
type ContentControlLock = 'unlocked' | 'sdtLocked' | 'contentLocked' | 'sdtContentLocked';
|
|
3027
|
+
/**
|
|
3028
|
+
* Mapped control type for layout / chrome — same members as the shipped public
|
|
3029
|
+
* `ContentControlType`. Untyped and preserved-only kinds report as `richText`.
|
|
3030
|
+
*/
|
|
3031
|
+
type ContentControlMappedType = 'richText' | 'plainText' | 'checkbox' | 'dropdown' | 'comboBox' | 'date' | 'picture' | 'buildingBlockGallery' | 'repeatingSection';
|
|
3032
|
+
/** Where the control sits in the tree relative to its content. */
|
|
3033
|
+
type ContentControlLevel = 'block' | 'inline' | 'row' | 'cell';
|
|
3034
|
+
/**
|
|
3035
|
+
* One piece of a control's content geometry.
|
|
3036
|
+
*
|
|
3037
|
+
* A block control that crosses a page break publishes one fragment per page rather than a
|
|
3038
|
+
* single rectangle covering the inter-page gap. An inline control publishes one fragment per
|
|
3039
|
+
* LINE it touches, covering the text's vertical extent (line-spacing leading excluded), so a
|
|
3040
|
+
* wrapped control never claims the words beside it. Coordinates match fragment boxes
|
|
3041
|
+
* (page-content space).
|
|
3042
|
+
*/
|
|
3043
|
+
interface ContentControlGeometryFragment {
|
|
3044
|
+
readonly pageIndex: number;
|
|
3045
|
+
readonly box: LayoutBox;
|
|
3046
|
+
}
|
|
3047
|
+
/**
|
|
3048
|
+
* Layout-published boundary for one content control (`w:sdt` / typed `contentControl`).
|
|
3049
|
+
*
|
|
3050
|
+
* Chrome, lock feedback, and hit resolution read this record — never painted DOM. The wrapper
|
|
3051
|
+
* itself is not a layout box; `fragments` cover the content that already flowed in place.
|
|
3052
|
+
*/
|
|
3053
|
+
interface ContentControlBoundaryRecord {
|
|
3054
|
+
/** Canonical node id of the control wrapper — not `w:id`. */
|
|
3055
|
+
readonly id: string;
|
|
3056
|
+
readonly alias?: string;
|
|
3057
|
+
readonly tag?: string;
|
|
3058
|
+
readonly controlType: ContentControlMappedType;
|
|
3059
|
+
/** This control's own `w:lock`, before ancestor union. */
|
|
3060
|
+
readonly lock: ContentControlLock;
|
|
3061
|
+
/**
|
|
3062
|
+
* Nested lock union with every ancestor control, collapsed back to a single `ST_Lock`
|
|
3063
|
+
* vocabulary value (both axes locked → `sdtContentLocked`).
|
|
3064
|
+
*/
|
|
3065
|
+
readonly effectiveLock: ContentControlLock;
|
|
3066
|
+
/** `w:showingPlcHdr` is present on the control's properties. */
|
|
3067
|
+
readonly placeholder: boolean;
|
|
3068
|
+
/** `w:dataBinding` is present — content edits are refused as bound. */
|
|
3069
|
+
readonly bound: boolean;
|
|
3070
|
+
/** 0 for a top-level control; increments through nested wrappers under the shared nesting bound. */
|
|
3071
|
+
readonly nestingDepth: number;
|
|
3072
|
+
readonly level: ContentControlLevel;
|
|
3073
|
+
readonly fragments: readonly ContentControlGeometryFragment[];
|
|
3074
|
+
/** An inline control's model offsets in its paragraph; positions map through this, not geometry. */
|
|
3075
|
+
readonly range?: ContentControlModelRange;
|
|
3076
|
+
}
|
|
3077
|
+
/** `[start, end)` UTF-16 offsets of an inline control's content in one paragraph. */
|
|
3078
|
+
interface ContentControlModelRange {
|
|
3079
|
+
/** The paragraph that holds the control. */
|
|
3080
|
+
readonly paragraphId: string;
|
|
3081
|
+
/** Offset of the control's first character. */
|
|
3082
|
+
readonly start: number;
|
|
3083
|
+
/** Offset just past the control's last character. */
|
|
3084
|
+
readonly end: number;
|
|
3085
|
+
}
|
|
3086
|
+
|
|
2977
3087
|
/** Page geometry, in points. */
|
|
2978
3088
|
interface PageGeometry {
|
|
2979
3089
|
readonly width: number;
|
|
@@ -2992,6 +3102,75 @@ interface PageGeometry {
|
|
|
2992
3102
|
/** US Letter with one-inch margins, in points. */
|
|
2993
3103
|
declare const DEFAULT_PAGE_GEOMETRY: PageGeometry;
|
|
2994
3104
|
|
|
3105
|
+
/** A strikeout stroke at the drawn size, in points. `offsetPt` is the stroke TOP. @public */
|
|
3106
|
+
interface StrikeoutStrokePt {
|
|
3107
|
+
/** Distance from the baseline UP to the top of the stroke. */
|
|
3108
|
+
readonly offsetPt: number;
|
|
3109
|
+
/** Stroke height. Always positive. */
|
|
3110
|
+
readonly thicknessPt: number;
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
/**
|
|
3114
|
+
* A string's glyphs in points, x right and y down from the pen origin on the baseline, at the
|
|
3115
|
+
* style's size.
|
|
3116
|
+
*
|
|
3117
|
+
* `path` is SVG path data made only of absolute `M`, `L`, `Q`, `C` and `Z` commands, or null
|
|
3118
|
+
* when the measurer knows the ink box but not the outlines (a canvas measurer). `ink` bounds
|
|
3119
|
+
* every glyph's ink in the same space.
|
|
3120
|
+
*/
|
|
3121
|
+
interface TextOutline {
|
|
3122
|
+
readonly path: string | null;
|
|
3123
|
+
readonly ink: {
|
|
3124
|
+
readonly left: number;
|
|
3125
|
+
readonly top: number;
|
|
3126
|
+
readonly right: number;
|
|
3127
|
+
readonly bottom: number;
|
|
3128
|
+
};
|
|
3129
|
+
}
|
|
3130
|
+
/**
|
|
3131
|
+
* Text measurement, injected.
|
|
3132
|
+
*
|
|
3133
|
+
* A real implementation shapes with the resolved font; the tests supply a deterministic one.
|
|
3134
|
+
* Layout never reads the DOM, so this is the only way width and height enter it.
|
|
3135
|
+
*/
|
|
3136
|
+
interface TextMeasurer {
|
|
3137
|
+
/** Advance width of `text` in the resolved style. */
|
|
3138
|
+
measure(text: string, style: ResolvedRunStyle): number;
|
|
3139
|
+
/**
|
|
3140
|
+
* Optional whole-span logical caret advances, indexed by UTF-16 offset. Values
|
|
3141
|
+
* are nondecreasing, start at zero, and end at the measured advance. Ligature
|
|
3142
|
+
* interiors may share an edge. Undefined selects a bounded approximate fallback.
|
|
3143
|
+
*/
|
|
3144
|
+
caretAdvances?(text: string, style: ResolvedRunStyle): readonly number[] | undefined;
|
|
3145
|
+
/**
|
|
3146
|
+
* Optional conservative ink bounds for one grapheme, in points from its origin.
|
|
3147
|
+
* Includes size and horizontal scale, but not trailing character spacing.
|
|
3148
|
+
* Undefined keeps layout on the advance-only path.
|
|
3149
|
+
*/
|
|
3150
|
+
inkBounds?(text: string, style: ResolvedRunStyle): {
|
|
3151
|
+
left: number;
|
|
3152
|
+
right: number;
|
|
3153
|
+
} | undefined;
|
|
3154
|
+
/**
|
|
3155
|
+
* Optional glyph outlines of a whole string, for text drawn as a shape (VML text art).
|
|
3156
|
+
* Undefined when the face cannot answer; the shape then paints nothing rather than guess.
|
|
3157
|
+
*/
|
|
3158
|
+
textOutline?(text: string, style: ResolvedRunStyle): TextOutline | undefined;
|
|
3159
|
+
/** Whether line metrics use an admitted face instead of approximate fallback metrics. */
|
|
3160
|
+
hasResolvedFont?(style: ResolvedRunStyle): boolean;
|
|
3161
|
+
/**
|
|
3162
|
+
* Optional `OS/2` strikeout stroke for the resolved face, at the drawn size. Word paints
|
|
3163
|
+
* `w:separator` as a strikeout, so the note rule reads its thickness and offset here rather
|
|
3164
|
+
* than assuming one face's numbers. Undefined keeps the caller's own default.
|
|
3165
|
+
*/
|
|
3166
|
+
strikeoutMetrics?(style: ResolvedRunStyle): StrikeoutStrokePt | undefined;
|
|
3167
|
+
/** Line metrics for the actual text faces; omitted text measures the primary face. */
|
|
3168
|
+
lineMetrics(style: ResolvedRunStyle, text?: string): {
|
|
3169
|
+
height: number;
|
|
3170
|
+
baseline: number;
|
|
3171
|
+
};
|
|
3172
|
+
}
|
|
3173
|
+
|
|
2995
3174
|
/** A half-open UTF-16 range inside one paragraph, addressed by its canonical node id. */
|
|
2996
3175
|
interface SourceRange {
|
|
2997
3176
|
readonly paragraphId: string;
|
|
@@ -3207,6 +3386,8 @@ interface StyleSpanRecord {
|
|
|
3207
3386
|
* and selection mapping refuses them the way it refuses markers.
|
|
3208
3387
|
*/
|
|
3209
3388
|
readonly projected?: boolean;
|
|
3389
|
+
/** Zero-model-width component geometry for opaque content. */
|
|
3390
|
+
readonly unsupported?: UnsupportedContentRecord;
|
|
3210
3391
|
/** Authored inline separator rule; its advance belongs to one note atom. */
|
|
3211
3392
|
readonly noteSeparator?: 'separator' | 'continuationSeparator';
|
|
3212
3393
|
/** Paint-ready geometry for one atomic Office Math equation. */
|
|
@@ -3368,6 +3549,8 @@ interface ParagraphFragmentRecord {
|
|
|
3368
3549
|
readonly hSpace: number;
|
|
3369
3550
|
readonly vSpace: number;
|
|
3370
3551
|
readonly box: LayoutBox;
|
|
3552
|
+
/** The frame's vertical position comes from the page or margin, not from the text flow. */
|
|
3553
|
+
readonly pageFramed?: true;
|
|
3371
3554
|
};
|
|
3372
3555
|
readonly range: SourceRange;
|
|
3373
3556
|
readonly props: readonly OoxmlProperty[];
|
|
@@ -3783,61 +3966,6 @@ interface NoteAreaRecord {
|
|
|
3783
3966
|
* - `endnote-overflow`: sheets inserted to finish sectEnd/docEnd collections.
|
|
3784
3967
|
*/
|
|
3785
3968
|
type PageNoteStream = 'footnote-drain' | 'endnote-overflow';
|
|
3786
|
-
/**
|
|
3787
|
-
* Raw `w:lock/@w:val` on one control, or `unlocked` when absent / unrecognised.
|
|
3788
|
-
*
|
|
3789
|
-
* Effective permissions across a nesting chain are the union of every ancestor's lock on two
|
|
3790
|
-
* axes (content edit / removal); see {@link ContentControlBoundaryRecord.effectiveLock}.
|
|
3791
|
-
*/
|
|
3792
|
-
type ContentControlLock = 'unlocked' | 'sdtLocked' | 'contentLocked' | 'sdtContentLocked';
|
|
3793
|
-
/**
|
|
3794
|
-
* Mapped control type for layout / chrome — same members as the shipped public
|
|
3795
|
-
* `ContentControlType`. Untyped and preserved-only kinds report as `richText`.
|
|
3796
|
-
*/
|
|
3797
|
-
type ContentControlMappedType = 'richText' | 'plainText' | 'checkbox' | 'dropdown' | 'comboBox' | 'date' | 'picture' | 'buildingBlockGallery' | 'repeatingSection';
|
|
3798
|
-
/** Where the control sits in the tree relative to its content. */
|
|
3799
|
-
type ContentControlLevel = 'block' | 'inline' | 'row' | 'cell';
|
|
3800
|
-
/**
|
|
3801
|
-
* One piece of a control's content geometry.
|
|
3802
|
-
*
|
|
3803
|
-
* A block control that crosses a page break publishes one fragment per page rather than a
|
|
3804
|
-
* single rectangle covering the inter-page gap. An inline control publishes one fragment per
|
|
3805
|
-
* LINE it touches, covering the text's vertical extent (line-spacing leading excluded), so a
|
|
3806
|
-
* wrapped control never claims the words beside it. Coordinates match fragment boxes
|
|
3807
|
-
* (page-content space).
|
|
3808
|
-
*/
|
|
3809
|
-
interface ContentControlGeometryFragment {
|
|
3810
|
-
readonly pageIndex: number;
|
|
3811
|
-
readonly box: LayoutBox;
|
|
3812
|
-
}
|
|
3813
|
-
/**
|
|
3814
|
-
* Layout-published boundary for one content control (`w:sdt` / typed `contentControl`).
|
|
3815
|
-
*
|
|
3816
|
-
* Chrome, lock feedback, and hit resolution read this record — never painted DOM. The wrapper
|
|
3817
|
-
* itself is not a layout box; `fragments` cover the content that already flowed in place.
|
|
3818
|
-
*/
|
|
3819
|
-
interface ContentControlBoundaryRecord {
|
|
3820
|
-
/** Canonical node id of the control wrapper — not `w:id`. */
|
|
3821
|
-
readonly id: string;
|
|
3822
|
-
readonly alias?: string;
|
|
3823
|
-
readonly tag?: string;
|
|
3824
|
-
readonly controlType: ContentControlMappedType;
|
|
3825
|
-
/** This control's own `w:lock`, before ancestor union. */
|
|
3826
|
-
readonly lock: ContentControlLock;
|
|
3827
|
-
/**
|
|
3828
|
-
* Nested lock union with every ancestor control, collapsed back to a single `ST_Lock`
|
|
3829
|
-
* vocabulary value (both axes locked → `sdtContentLocked`).
|
|
3830
|
-
*/
|
|
3831
|
-
readonly effectiveLock: ContentControlLock;
|
|
3832
|
-
/** `w:showingPlcHdr` is present on the control's properties. */
|
|
3833
|
-
readonly placeholder: boolean;
|
|
3834
|
-
/** `w:dataBinding` is present — content edits are refused as bound. */
|
|
3835
|
-
readonly bound: boolean;
|
|
3836
|
-
/** 0 for a top-level control; increments through nested wrappers under the shared nesting bound. */
|
|
3837
|
-
readonly nestingDepth: number;
|
|
3838
|
-
readonly level: ContentControlLevel;
|
|
3839
|
-
readonly fragments: readonly ContentControlGeometryFragment[];
|
|
3840
|
-
}
|
|
3841
3969
|
/**
|
|
3842
3970
|
* One laid-out page: the sheet, the content area, and everything that landed on it.
|
|
3843
3971
|
*
|
|
@@ -3940,44 +4068,5 @@ interface SectionBreakMarkRecord {
|
|
|
3940
4068
|
readonly kind: SectionBreakType;
|
|
3941
4069
|
}
|
|
3942
4070
|
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
*
|
|
3946
|
-
* A real implementation shapes with the resolved font; the tests supply a deterministic one.
|
|
3947
|
-
* Layout never reads the DOM, so this is the only way width and height enter it.
|
|
3948
|
-
*/
|
|
3949
|
-
interface TextMeasurer {
|
|
3950
|
-
/** Advance width of `text` in the resolved style. */
|
|
3951
|
-
measure(text: string, style: ResolvedRunStyle): number;
|
|
3952
|
-
/**
|
|
3953
|
-
* Optional whole-span logical caret advances, indexed by UTF-16 offset. Values
|
|
3954
|
-
* are nondecreasing, start at zero, and end at the measured advance. Ligature
|
|
3955
|
-
* interiors may share an edge. Undefined selects a bounded approximate fallback.
|
|
3956
|
-
*/
|
|
3957
|
-
caretAdvances?(text: string, style: ResolvedRunStyle): readonly number[] | undefined;
|
|
3958
|
-
/**
|
|
3959
|
-
* Optional conservative ink bounds for one grapheme, in points from its origin.
|
|
3960
|
-
* Includes size and horizontal scale, but not trailing character spacing.
|
|
3961
|
-
* Undefined keeps layout on the advance-only path.
|
|
3962
|
-
*/
|
|
3963
|
-
inkBounds?(text: string, style: ResolvedRunStyle): {
|
|
3964
|
-
left: number;
|
|
3965
|
-
right: number;
|
|
3966
|
-
} | undefined;
|
|
3967
|
-
/** Whether line metrics use an admitted face instead of approximate fallback metrics. */
|
|
3968
|
-
hasResolvedFont?(style: ResolvedRunStyle): boolean;
|
|
3969
|
-
/**
|
|
3970
|
-
* Optional `OS/2` strikeout stroke for the resolved face, at the drawn size. Word paints
|
|
3971
|
-
* `w:separator` as a strikeout, so the note rule reads its thickness and offset here rather
|
|
3972
|
-
* than assuming one face's numbers. Undefined keeps the caller's own default.
|
|
3973
|
-
*/
|
|
3974
|
-
strikeoutMetrics?(style: ResolvedRunStyle): StrikeoutStrokePt | undefined;
|
|
3975
|
-
/** Line metrics for the actual text faces; omitted text measures the primary face. */
|
|
3976
|
-
lineMetrics(style: ResolvedRunStyle, text?: string): {
|
|
3977
|
-
height: number;
|
|
3978
|
-
baseline: number;
|
|
3979
|
-
};
|
|
3980
|
-
}
|
|
3981
|
-
|
|
3982
|
-
export { DEFAULT_REVISION_MARKUP as D, resolveRevisionMarkup as Q, DEFAULT_REVISION_DISPLAY_MODE as aA, DEFAULT_RUN_STYLE as aB, DEFAULT_SECTION_PROPERTIES as aC, DEFAULT_TAB_INTERVAL_PT as aD, DEFAULT_TAB_INTERVAL_TWIPS as aE, EMPTY_NUMBERING_INDEX as aL, EMPTY_TAB_STOPS as aM, FontResolutionError as aX, AUTO_PARAGRAPH_SPACING_PT as ap, DEFAULT_PAGE_GEOMETRY as az, HARD_MAX_AGGREGATE_FONT_BYTES as b4, HARD_MAX_FONT_BYTES as b5, HARD_MAX_FONT_SOURCES as b6, SINGLE_LINE_SPACING as bS, MAX_BORDER_SPACE_PT as bc, MAX_BORDER_WIDTH_PT as bd, MAX_DOCUMENT_SECTIONS as be, MAX_LVL_OVERRIDES as bf, MAX_NUMBERING_DEFINITIONS as bg, MAX_PARAGRAPH_SPACING_PT as bh, MAX_SHAPING_CONTEXT as bi, MAX_STYLE_DEFINITIONS as bj, MAX_TABLE_BORDER_STROKES as bk, MAX_TAB_POSITION_TWIPS as bl, MAX_TAB_STOPS as bm, PAGE_BORDER_SIDES as bq, PARAGRAPH_BORDER_SIDES as br, paragraphBorderExtentPt as c$, buildStyleCascadeTable as cA, cascadeParagraphFormatting as cB, cascadeRunProperties as cC, cascadedBottomBorder as cD, cascadedParagraphBorders as cE, cascadedTabStops as cF, collapsedSpaceBefore as cG, createFontResourceSnapshot as cH, createShapedRun as cI, createShapingEnvironment as cJ, defaultTabIntervalFromSettings as cK, displayText as cL, enumerateDocumentSections as cM, enumerateDocumentSectionsBounded as cN, fixedPoint as cO, fontRequestKey as cP, formatRevisionOf as cQ, geometryOfSection as cR, glyphSizeFactorOf as cS, isValidStyleId as cT, itemizeScriptFontSlots as cU, layoutEquation as cV, markRevisionRemovesMark as cW, measureDisplayText as cX, mergeListIndent as cY, nextTabDestination as cZ, pageBordersFingerprint as c_, TAB_LEADER_GLYPH as cf, UnsupportedScriptError as cq, appliedSpaceBefore as cs, applyLineSpacing as ct, baselineShiftPtOf as cu, borderExtentPt as cv, borderWeight as cw, bottomBorderExtentPt as cx, boundedStructuralFontValidator as cy, buildNumberingIndex as cz, paragraphBorderStrokeWidthPt as d0, paragraphBorders as d1, paragraphBordersFingerprint as d2, paragraphBreaksBefore as d3, paragraphContextualSpacing as d4, paragraphLineSpacing as d5, paragraphMarkFormatRevisionOf as d6, paragraphMarkRevisionOf as d7, paragraphMarkRevisionsOf as d8, paragraphSectionNode as d9, shapingEnvironmentFingerprintInputs as dA, shownMarkRevision as dB, styleForFontSlot as dC, tabAdvanceWidth as dD, tabStopsFingerprint as dE, withDefaultTabInterval as dF, withNumberingStyleLinks as dG, withResolvedListItems as dH, paragraphSpacing as da, paragraphTabStops as db, parsePageBorders as dc, parsePageNumbering as dd, parseRefInstruction as de, parseSectionProperties as df, projectedSectionSourceIndexes as dg, readBorderSide as dh, readCellBorders as di, readNumPr as dj, readSectionProperties as dk, readTableBorders as dl, resolveBorderConflict as dm, resolveNumberingLevel as dn, resolveParagraphLayoutInputs as dp, resolveRunStyle as dq, resolveStoryListItems as dr, resolveStoryRefFields as ds, resolveTableCellBorderGrid as dt, revisionAuthorFilter as du, revisionsAreDeletion as dv, revisionsVisible as dw, runStylesEqual as dx, shapedRunComparatorInputs as dy, shapingEnvironmentFingerprint as dz, REVISION_MARKUP_COLORS as w };
|
|
3983
|
-
export type { TableBorderSide as $, AnchoredDrawingRecord as A, BlockFragmentRecord as B, ContentControlBoundaryRecord as C, RevisionMarkupColor as E, FontResourceSnapshot as F, RevisionMarkupMark as G, HeaderFooterStoryRecord as H, InlineDrawingRecord as I, RevisionMarkupNamedColor as J, RevisionMarkupStyle as K, LineRecord as L, RevisionMarkupTextStyle as M, NoteAreaRecord as N, SectionProperties as O, ParagraphFragmentRecord as P, RevisionMarkupDialogSession as R, SemanticLayout as S, TextMeasurer as T, NumberingLevel as U, VersionedShapingLibrary as V, NumberingIndex as W, DrawingPoint as X, DrawingInsets as Y, ModelRange as Z, RevisionAttribution as _, ReviewDisplayMode as a, FontResourceSnapshotOptions as a$, TableFloatXSpec as a0, TableFloatYSpec as a1, ResolvedListItem as a2, RefFieldContext as a3, InlineDrawingLayoutContext as a4, CellBorderBox as a5, TableBorderBox as a6, TableCellStyleFormatting as a7, TableFloatPosition as a8, StyleCascadeTable as a9, DeclaredFontSubstitution as aF, DocumentSection as aG, DocumentSectionsEnumeration as aH, DrawingClipFallback as aI, DrawingGeometry as aJ, DrawingGroupPictureRecord as aK, EquationFractionGeometry as aN, EquationGeometry as aO, EquationNaryGeometry as aP, EquationRadicalGeometry as aQ, EquationRowGeometry as aR, EquationScriptGeometry as aS, EquationSpanRecord as aT, EquationTextGeometry as aU, FieldAtomMarker as aV, FontFingerprintInputs as aW, FontResolutionErrorCode as aY, FontResourceDefinition as aZ, FontResourceInstrumentation as a_, RevisionAuthorFilter as aa, FixedPoint as ab, FontByteValidator as ac, SourceRange as ad, HyperlinkProjector as ae, FieldLinkProjector as af, StoryPageFieldNeeds as ag, HyperlinkFieldSpec as ah, SpanLinkRecord as ai, PageGeometry as aj, SectionColumns as ak, SectionPageBorders as al, PageBorderFrameRecord as am, ParagraphBorderStrokeRecord as an, StrikeoutStrokePt as ao, AbstractNumDefinition as aq, AnchoredDrawingLayoutFallback as ar, BidiEmbeddingLevels as as, BorderGridGeometry as at, CascadedParagraphFormatting as au, CjkTypographySettings as av, ContentControlGeometryFragment as aw, ContentControlLevel as ax, ContentControlMappedType as ay, RevisionDisplayMode as b, SemanticCommentArtifactRecord as b$, FontSlot as b0, FontValidationResult as b1, GlyphOutline as b2, GroupTextboxStoryRecord as b3, LevelOverride as b7, LineSpacingRule as b8, ListMarkerAlign as b9, ParagraphBorderEdge as bA, ParagraphBorderSide as bB, ParagraphBorders as bC, ParagraphBottomBorderRecord as bD, ParagraphIndent as bE, ParagraphLayoutInputs as bF, ParagraphLineSpacing as bG, ParagraphSpacing as bH, RefFieldSpec as bI, RefNoteParts as bJ, ResolvedCellBorders as bK, ResolvedPictureBullet as bL, ResolvedTabStops as bM, ResolvedTableBorderEdge as bN, ResolvedTableBorderEdgeSegment as bO, ResolvedUnderline as bP, RevisionFilter as bQ, RevisionKind as bR, ScriptItem as bT, SectionBreakMarkRecord as bU, SectionBreakType as bV, SectionColumnDefinition as bW, SectionMargins as bX, SectionPageNumbering as bY, SemanticArtifactRootStoryKind as bZ, SemanticArtifactStoryKind as b_, ListMarkerRecord as ba, ListSuffix as bb, NumDefinition as bn, NumberingLevelIndent as bo, NumberingPictureBullet as bp, PageBorderDisplay as bs, PageBorderOffsetFrom as bt, PageBorderSide as bu, PageBorderStrokeRecord as bv, PageBorderZOrder as bw, PageRefCalibrationCell as bx, PageRefFieldProjection as by, ParagraphAutoSpacingContext as bz, PageRecord as c, SemanticReviewArtifactOccurrence as c0, SemanticReviewArtifactOccurrenceGeometry as c1, SemanticReviewArtifactPosition as c2, SemanticReviewArtifactSource as c3, SemanticTrackedChangeArtifactRecord as c4, ShapeInput as c5, ShapedCluster as c6, ShapedFontSpan as c7, ShapedGlyph as c8, ShapedRunComparatorInputs as c9, ShapedVerticalMetrics as ca, ShapingContext as cb, ShapingEnvironment as cc, ShapingEnvironmentFingerprintInputs as cd, StyleDefinition as ce, TabAlignment as cg, TabDestination as ch, TabLeader as ci, TabStop as cj, TableBorderSideName as ck, TableBorderStrokeRecord as cl, TableFragmentRecord as cm, TextDirection as cn, TextboxStoryFallbackReason as co, TextboxStoryLayout as cp, VerticalAlign as cr, LayoutBox as d, NoteStoryRecord as e, ContentControlLock as f, StyleSpanRecord as g, TableRowFragmentRecord as h, TableCellFragmentRecord as i, ShapingEnvironmentInput as j, TextShaper as k, ResolvedRunStyle as l, ResolvedFont as m, NormalizationPolicy as n, FixedPointRoundingMode as o, FontRequest as p, ResolvedRevisionMarkup as q, SemanticReviewArtifactRecord as r, ListMarkerPictureRecord as s, RevisionMarkupOptions as t, FontSubstitution as u, ShapedRun as v, RevisionChangedLinesMark as x, RevisionDeletionMark as y, RevisionMarkupChromeHandlers as z };
|
|
4071
|
+
export { EMPTY_NUMBERING_INDEX as aC, EMPTY_TAB_STOPS as aD, FontResolutionError as aP, HARD_MAX_AGGREGATE_FONT_BYTES as aY, HARD_MAX_FONT_BYTES as aZ, HARD_MAX_FONT_SOURCES as a_, AUTO_PARAGRAPH_SPACING_PT as ad, DEFAULT_PAGE_GEOMETRY as ao, DEFAULT_RUN_STYLE as ap, DEFAULT_SECTION_PROPERTIES as aq, DEFAULT_TAB_INTERVAL_PT as ar, DEFAULT_TAB_INTERVAL_TWIPS as as, MAX_BORDER_SPACE_PT as b4, MAX_BORDER_WIDTH_PT as b5, MAX_DOCUMENT_SECTIONS as b6, MAX_LVL_OVERRIDES as b7, MAX_NUMBERING_DEFINITIONS as b8, MAX_PARAGRAPH_SPACING_PT as b9, SINGLE_LINE_SPACING as bH, MAX_SHAPING_CONTEXT as ba, MAX_STYLE_DEFINITIONS as bb, MAX_TABLE_BORDER_STROKES as bc, MAX_TAB_POSITION_TWIPS as bd, MAX_TAB_STOPS as be, PAGE_BORDER_SIDES as bh, PARAGRAPH_BORDER_SIDES as bi, parsePageBorders as c$, TAB_LEADER_GLYPH as c4, createShapingEnvironment as cA, createUnsupportedContentProjector as cB, defaultTabIntervalFromSettings as cC, displayText as cD, enumerateDocumentSections as cE, enumerateDocumentSectionsBounded as cF, fixedPoint as cG, fontRequestKey as cH, geometryOfSection as cI, glyphSizeFactorOf as cJ, groupPictureLayerDrawing as cK, isValidStyleId as cL, itemizeScriptFontSlots as cM, layoutEquation as cN, measureDisplayText as cO, nextTabDestination as cP, pageBordersFingerprint as cQ, paragraphBorderExtentPt as cR, paragraphBorderStrokeWidthPt as cS, paragraphBorders as cT, paragraphBordersFingerprint as cU, paragraphBreaksBefore as cV, paragraphContextualSpacing as cW, paragraphLineSpacing as cX, paragraphSectionNode as cY, paragraphSpacing as cZ, paragraphTabStops as c_, UnsupportedScriptError as ch, appliedSpaceBefore as cj, applyLineSpacing as ck, baselineShiftPtOf as cl, borderExtentPt as cm, borderWeight as cn, bottomBorderExtentPt as co, boundedStructuralFontValidator as cp, buildNumberingIndex as cq, buildStyleCascadeTable as cr, cascadeParagraphFormatting as cs, cascadeRunProperties as ct, cascadedBottomBorder as cu, cascadedParagraphBorders as cv, cascadedTabStops as cw, collapsedSpaceBefore as cx, createFontResourceSnapshot as cy, createShapedRun as cz, parsePageNumbering as d0, parseRefInstruction as d1, parseSectionProperties as d2, projectedSectionSourceIndexes as d3, readBorderSide as d4, readCellBorders as d5, readNumPr as d6, readSectionProperties as d7, readTableBorders as d8, resolveBorderConflict as d9, resolveNumberingLevel as da, resolveParagraphLayoutInputs as db, resolveRunStyle as dc, resolveStoryListItems as dd, resolveStoryRefFields as de, resolveTableCellBorderGrid as df, runStylesEqual as dg, shapedRunComparatorInputs as dh, shapingEnvironmentFingerprint as di, shapingEnvironmentFingerprintInputs as dj, styleForFontSlot as dk, tabAdvanceWidth as dl, tabStopsFingerprint as dm, withDefaultTabInterval as dn, withNumberingStyleLinks as dp, withResolvedListItems as dq, unsupportedElementRuleMatches as u };
|
|
4072
|
+
export type { FontByteValidator as $, AnchoredDrawingRecord as A, BlockFragmentRecord as B, ContentControlBoundaryRecord as C, DrawingPoint as D, TableFloatYSpec as E, FontResourceSnapshot as F, NumberingLevelIndent as G, HeaderFooterStoryRecord as H, InlineDrawingRecord as I, ResolvedListItem as J, RefFieldContext as K, LineRecord as L, ModelRange as M, NoteAreaRecord as N, InlineDrawingLayoutContext as O, ParagraphFragmentRecord as P, CellBorderBox as Q, ResolvedRunStyle as R, SemanticLayout as S, TextMeasurer as T, UnsupportedElement as U, VersionedShapingLibrary as V, TableBorderBox as W, TableCellStyleFormatting as X, TableFloatPosition as Y, StyleCascadeTable as Z, FixedPoint as _, PageRecord as a, LevelOverride as a$, SourceRange as a0, HyperlinkProjector as a1, FieldLinkProjector as a2, StoryPageFieldNeeds as a3, HyperlinkFieldSpec as a4, SpanLinkRecord as a5, PageGeometry as a6, SectionColumns as a7, SectionPageBorders as a8, PageBorderFrameRecord as a9, DrawingPlaceholderKind as aA, DrawingTextArtRecord as aB, EquationBarGeometry as aE, EquationFractionGeometry as aF, EquationGeometry as aG, EquationNaryGeometry as aH, EquationRadicalGeometry as aI, EquationRowGeometry as aJ, EquationScriptGeometry as aK, EquationSpanRecord as aL, EquationTextGeometry as aM, FieldAtomMarker as aN, FontFingerprintInputs as aO, FontResolutionErrorCode as aQ, FontResourceDefinition as aR, FontResourceInstrumentation as aS, FontResourceSnapshotOptions as aT, FontSlot as aU, FontValidationResult as aV, GlyphOutline as aW, GroupTextboxStoryRecord as aX, ParagraphBorderStrokeRecord as aa, StrikeoutStrokePt as ab, TextOutline as ac, AbstractNumDefinition as ae, AnchoredDrawingLayoutFallback as af, BidiEmbeddingLevels as ag, BorderGridGeometry as ah, CascadedParagraphFormatting as ai, CjkTypographySettings as aj, ContentControlGeometryFragment as ak, ContentControlLevel as al, ContentControlMappedType as am, ContentControlModelRange as an, DeclaredFontSubstitution as at, DocumentSection as au, DocumentSectionsEnumeration as av, DrawingClipFallback as aw, DrawingGeometry as ax, DrawingGroupPictureLayerRecord as ay, DrawingGroupPictureRecord as az, LayoutBox as b, ShapedVerticalMetrics as b$, LineSpacingRule as b0, ListMarkerAlign as b1, ListMarkerRecord as b2, ListSuffix as b3, RefNoteParts as bA, ResolvedCellBorders as bB, ResolvedPictureBullet as bC, ResolvedTabStops as bD, ResolvedTableBorderEdge as bE, ResolvedTableBorderEdgeSegment as bF, ResolvedUnderline as bG, ScriptItem as bI, SectionBreakMarkRecord as bJ, SectionBreakType as bK, SectionColumnDefinition as bL, SectionMargins as bM, SectionPageNumbering as bN, SemanticArtifactRootStoryKind as bO, SemanticArtifactStoryKind as bP, SemanticCommentArtifactRecord as bQ, SemanticReviewArtifactOccurrence as bR, SemanticReviewArtifactOccurrenceGeometry as bS, SemanticReviewArtifactPosition as bT, SemanticReviewArtifactSource as bU, SemanticTrackedChangeArtifactRecord as bV, ShapeInput as bW, ShapedCluster as bX, ShapedFontSpan as bY, ShapedGlyph as bZ, ShapedRunComparatorInputs as b_, NumDefinition as bf, NumberingPictureBullet as bg, PageBorderDisplay as bj, PageBorderOffsetFrom as bk, PageBorderSide as bl, PageBorderStrokeRecord as bm, PageBorderZOrder as bn, PageRefCalibrationCell as bo, PageRefFieldProjection as bp, ParagraphAutoSpacingContext as bq, ParagraphBorderEdge as br, ParagraphBorderSide as bs, ParagraphBorders as bt, ParagraphBottomBorderRecord as bu, ParagraphIndent as bv, ParagraphLayoutInputs as bw, ParagraphLineSpacing as bx, ParagraphSpacing as by, RefFieldSpec as bz, NoteStoryRecord as c, ShapingContext as c0, ShapingEnvironment as c1, ShapingEnvironmentFingerprintInputs as c2, StyleDefinition as c3, TabAlignment as c5, TabDestination as c6, TabLeader as c7, TabStop as c8, TableBorderSideName as c9, TableBorderStrokeRecord as ca, TableCellDiagonalRecord as cb, TableFragmentRecord as cc, TextArtFit as cd, TextDirection as ce, TextboxStoryFallbackReason as cf, TextboxStoryLayout as cg, VerticalAlign as ci, ContentControlLock as d, UnsupportedElementLayout as e, UnsupportedElementRule as f, StyleSpanRecord as g, TableRowFragmentRecord as h, TableCellFragmentRecord as i, ShapingEnvironmentInput as j, TextShaper as k, ResolvedFont as l, NormalizationPolicy as m, FixedPointRoundingMode as n, FontRequest as o, SemanticReviewArtifactRecord as p, ListMarkerPictureRecord as q, FontSubstitution as r, ShapedRun as s, SectionProperties as t, NumberingLevel as v, NumberingIndex as w, TableBorderSide as x, DrawingInsets as y, TableFloatXSpec as z };
|