@docx-editor.dev/core 2.27.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +76 -16
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +31 -12
- package/dist/binding.js +1 -1
- package/dist/{index-CkQVRJtJ.d.ts → chrome-print-CAs51cpq.d.ts} +248 -115
- package/dist/chunk-236O4YQW.js +2 -0
- package/dist/chunk-4HENIAFG.js +1 -0
- package/dist/chunk-6JPL6ZAS.cjs +5 -0
- package/dist/chunk-6ZQP4HQ7.js +3 -0
- package/dist/{chunk-2GK7YQB2.cjs → chunk-7WQ7AAHW.cjs} +1 -1
- package/dist/chunk-BCXH4BXB.js +5 -0
- package/dist/chunk-BY2ACZZ6.cjs +1 -0
- package/dist/chunk-CAJEXXVG.cjs +4 -0
- package/dist/chunk-CPWLFPWC.js +30 -0
- package/dist/chunk-D7ZMDMPX.cjs +3 -0
- package/dist/chunk-DOHF6FA7.cjs +30 -0
- package/dist/chunk-DVX32P2P.js +27 -0
- package/dist/chunk-E4LOMDNL.js +1 -0
- package/dist/chunk-EKLM7NWB.cjs +7 -0
- package/dist/chunk-G3K63G7P.cjs +27 -0
- package/dist/chunk-G4HOFIKJ.js +1 -0
- package/dist/chunk-JLVBDYVQ.cjs +2 -0
- package/dist/chunk-LQX36Z5P.js +7 -0
- package/dist/chunk-LSZ6KPKK.js +1 -0
- package/dist/chunk-MM5QBMTE.cjs +1 -0
- package/dist/chunk-OMCG63ZF.js +1 -0
- package/dist/chunk-OSFOJTHU.cjs +18 -0
- package/dist/chunk-RCLZXP3B.js +2 -0
- package/dist/chunk-T6K2QYNZ.cjs +2 -0
- package/dist/chunk-TRGAVV2Y.js +4 -0
- package/dist/chunk-U4JZVSOE.js +2 -0
- package/dist/chunk-UHHYFIDT.cjs +1 -0
- package/dist/chunk-V3N4SOAK.cjs +1 -0
- package/dist/chunk-W35WTWAO.cjs +1 -0
- package/dist/chunk-YQ5G6LC7.js +18 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +42 -6
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.cjs +1 -1
- package/dist/collaboration.d.ts +99 -7
- package/dist/collaboration.js +1 -1
- package/dist/contracts/document.d.ts +18 -3
- package/dist/contracts/editor.d.ts +19 -10
- package/dist/contracts/interaction.d.ts +31 -2
- package/dist/contracts/modules.cjs +1 -1
- package/dist/contracts/modules.d.ts +56 -8
- package/dist/contracts/modules.js +1 -1
- package/dist/contracts/types.d.ts +11 -2
- package/dist/{custom-node-writes-Vzpq9I8_.d.ts → custom-node-writes-Bn6uciLb.d.ts} +2 -2
- package/dist/diagnostic-context-B8M79cfK.d.ts +30 -0
- package/dist/diagnostic-hints-BeVjfNOv.d.ts +113 -0
- package/dist/{document-protection-9zpIHWTE.d.ts → document-protection-CUb55pl_.d.ts} +2 -2
- package/dist/{editor-B3OBYNrF.d.ts → editor-CZQZmTIU.d.ts} +770 -141
- package/dist/{editor-scope-OHPwVQ5l.d.ts → editor-scope-7o9xweiJ.d.ts} +1 -1
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +5 -5
- package/dist/editor.d.ts +439 -33
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +23 -14
- package/dist/export.js +2 -2
- package/dist/failure-NS2lsya4.d.ts +115 -0
- package/dist/{font-resolver-DN0xNOf_.d.ts → font-resolver-lSBLirLR.d.ts} +3 -3
- package/dist/{headless-document-view-ICYqNkQ1.d.ts → headless-document-view-pp3q7wIh.d.ts} +2 -2
- package/dist/{image-resources-BDFxcu7W.d.ts → image-resources-tXLQShoC.d.ts} +10 -10
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +92 -20
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-BvZD_VKP.d.ts → layout-shaping-BD-dF_rn.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +168 -79
- package/dist/layout.js +1 -1
- package/dist/{note-properties-CkAk7g-n.d.ts → note-properties-qQUjO1GQ.d.ts} +3 -3
- package/dist/{omml-equation-DuczgG5o.d.ts → omml-equation-BUbU0utM.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +18 -9
- package/dist/output.js +1 -1
- package/dist/{protocol-aKYr8r3u.d.ts → protocol-DYzzz2ej.d.ts} +44 -4
- package/dist/{review-paragraph-order-Ddj5d6rp.d.ts → review-paragraph-order-CN_0l2Cb.d.ts} +5 -2
- package/dist/{semantic-cell-selection-DoqYCz_F.d.ts → semantic-cell-selection-eYag3P47.d.ts} +8 -213
- package/dist/{semantic-interaction-G0bjmmmk.d.ts → semantic-interaction-kR_QB845.d.ts} +25 -34
- package/dist/{semantic-paint-CsMzF8-O.d.ts → semantic-paint-ZayFF3tD.d.ts} +17 -5
- package/dist/{semantic-record-queries-1du6lQqS.d.ts → semantic-record-queries-Bsgth6lv.d.ts} +1 -1
- package/dist/{semantic-records-B9OolWGN.d.ts → semantic-records-DQmumPgL.d.ts} +1367 -884
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +1611 -1586
- package/dist/store.js +1 -1
- package/dist/{tree-package-fragment-DYZIk1rY.d.ts → tree-package-store-CovjNARF.d.ts} +157 -137
- package/dist/{tree-session-contract-DQVJOOkv.d.ts → tree-session-contract-CZVAGl51.d.ts} +8 -6
- package/dist/{types-barrel-BFKR8Pzp.d.ts → types-barrel-DuC5QBNC.d.ts} +352 -231
- package/package.json +3 -3
- package/dist/chunk-4KZ6L5YF.cjs +0 -15
- package/dist/chunk-55AT3MOU.cjs +0 -25
- package/dist/chunk-6ZQMII6V.js +0 -1
- package/dist/chunk-7IGCWG4H.js +0 -2
- package/dist/chunk-7MYITTAH.js +0 -5
- package/dist/chunk-AVKVRU7Z.cjs +0 -5
- package/dist/chunk-CWRBFNK5.cjs +0 -5
- package/dist/chunk-DGPA3TST.cjs +0 -27
- package/dist/chunk-DNXVNQEO.js +0 -1
- package/dist/chunk-FQN4KSFL.cjs +0 -7
- package/dist/chunk-GVUOWHTO.cjs +0 -1
- package/dist/chunk-GWQJ5774.js +0 -5
- package/dist/chunk-HAQ72KD7.js +0 -1
- package/dist/chunk-HO5XFO32.cjs +0 -3
- package/dist/chunk-IGR23DV2.js +0 -1
- package/dist/chunk-JSIX2EOH.js +0 -3
- package/dist/chunk-K246T47S.cjs +0 -1
- package/dist/chunk-KAXOGCGA.js +0 -1
- package/dist/chunk-LZLTN5A3.cjs +0 -1
- package/dist/chunk-NBCVVZOM.cjs +0 -1
- package/dist/chunk-O5INAWZQ.js +0 -1
- package/dist/chunk-OHAXVTWG.cjs +0 -1
- package/dist/chunk-S74GRBNE.js +0 -7
- package/dist/chunk-UBLUVNZR.js +0 -27
- package/dist/chunk-UMRSBLO7.js +0 -15
- package/dist/chunk-VIPMGGUT.js +0 -25
- package/dist/chunk-WG4KMSX2.cjs +0 -2
- package/dist/chunk-WRLKVNNR.cjs +0 -1
- package/dist/chunk-ZU7IVN6G.js +0 -2
- package/dist/failure-BIPVQbRm.d.ts +0 -65
- package/dist/revision-projection-CSNFudZY.d.ts +0 -242
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { b as CollaborationFailureCode } from './failure-NS2lsya4.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The public diagnostic vocabulary: stable codes and the buckets sizes and counts are reported
|
|
5
|
+
* in. It lives in this neutral lane so a headless runtime can name a refusal without the editor
|
|
6
|
+
* contracts; `contracts/diagnostics.ts` re-exports it for the editor's own types.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** Why a document could not be opened. @public */
|
|
10
|
+
type DocumentOpenDiagnosticCode = 'open.unsupported-source' | 'open.zip-corrupt' | 'open.zip-invalid-entry-name' | 'open.zip-entry-limit' | 'open.zip-size-limit' | 'open.zip-ratio-limit' | 'open.xml-malformed' | 'open.xml-dtd-forbidden' | 'open.xml-part-size-limit' | 'open.xml-depth-limit' | 'open.xml-element-limit' | 'open.invalid-limits' | 'open.content-types-invalid' | 'open.missing-main-document' | 'open.relationships-invalid' | 'open.relationship-limit' | 'open.part-limit' | 'open.failed';
|
|
11
|
+
/** Why an edit, a command or a tracked change was refused. @public */
|
|
12
|
+
type EditDiagnosticCode = 'edit.read-only' | 'edit.protected-content' | 'edit.suggesting-needs-author' | 'edit.review-module-required' | 'edit.tracked-drawing-delete-unsupported' | 'edit.tracked-structure-unsupported' | 'edit.tracked-operation-unsupported' | 'edit.tracking-mode-unsupported' | 'edit.tracking-author-required' | 'edit.tracking-unsupported-host' | 'edit.revision-unsupported' | 'edit.tracking-required' | 'edit.tracked-image-replace-unsupported' | 'edit.picture-selected' | 'edit.cross-structure-join' | 'edit.indivisible-content' | 'edit.field-structure' | 'edit.section-mark' | 'edit.table-structure-unsupported' | 'edit.table-insert-refused' | 'edit.table-of-contents-refused' | 'edit.unsupported-content' | 'edit.operation-unsupported' | 'edit.unsupported-story' | 'edit.unmapped-change' | 'edit.stale-target' | 'edit.invalid-argument' | 'edit.resource-limit' | 'edit.refresh-in-progress' | 'edit.collaboration-not-ready' | 'edit.collaboration-text-limit' | 'edit.internal-invariant' | 'edit.refused';
|
|
13
|
+
/** Why accepting, rejecting or re-authoring a tracked change skipped an item. @public */
|
|
14
|
+
type ReviewDiagnosticCode = 'review.revision-unsupported' | 'review.incomplete-group' | 'review.retained-structure' | 'review.stale-revision';
|
|
15
|
+
/** Why a font did not load. The family name is never reported. @public */
|
|
16
|
+
type FontDiagnosticCode = 'font.shaper-unavailable' | 'font.load-failed' | 'font.missing' | 'font.integrity-mismatch' | 'font.malformed' | 'font.size-limit' | 'font.unsupported-face';
|
|
17
|
+
/**
|
|
18
|
+
* Why the undo history did not group edits as one step. Informational: nothing was refused.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
type HistoryDiagnosticCode = 'history.split' | 'history.possible-ungrouped-gesture' | 'history.possible-fragmented-gesture';
|
|
23
|
+
/**
|
|
24
|
+
* Why a performance summary needs attention. Informational: nothing was refused.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
type PerformanceDiagnosticCode = 'performance.slow-interaction';
|
|
29
|
+
/** Why a custom node's stored payload could not be read. The node name is never reported. @public */
|
|
30
|
+
type CustomNodeDiagnosticCode = 'custom-node.payload-invalid' | 'custom-node.payload-missing';
|
|
31
|
+
/**
|
|
32
|
+
* Why a collaboration session failed or refused work: `collab.` and the session's own public
|
|
33
|
+
* {@link CollaborationFailureCode}, such as `collab.authentication-failed`.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
type CollaborationDiagnosticCode = `collab.${CollaborationFailureCode}`;
|
|
38
|
+
/** Every public diagnostic code. Codes are stable: a new one is additive, none is renamed. @public */
|
|
39
|
+
type DiagnosticCode = DocumentOpenDiagnosticCode | EditDiagnosticCode | ReviewDiagnosticCode | FontDiagnosticCode | HistoryDiagnosticCode | CustomNodeDiagnosticCode | PerformanceDiagnosticCode | CollaborationDiagnosticCode;
|
|
40
|
+
/**
|
|
41
|
+
* A coarse size, in powers of two, so a size cannot single out one document.
|
|
42
|
+
* `'0-64KiB'` covers everything under 64 KiB; `'512MiB+'` everything above.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
type ByteSizeBucket = '0-64KiB' | '64-128KiB' | '128-256KiB' | '256-512KiB' | '512KiB-1MiB' | '1-2MiB' | '2-4MiB' | '4-8MiB' | '8-16MiB' | '16-32MiB' | '32-64MiB' | '64-128MiB' | '128-256MiB' | '256-512MiB' | '512MiB+';
|
|
47
|
+
/** A coarse count: `'0'`, `'1'`, `'2-9'`, `'10-99'`, `'100-999'`, `'1000+'`. @public */
|
|
48
|
+
type CountBucket = '0' | '1' | '2-9' | '10-99' | '100-999' | '1000+';
|
|
49
|
+
/**
|
|
50
|
+
* Which kind of package part a failure is in, by its role, never by its name: a part's real
|
|
51
|
+
* name is file data. A name outside the standard layout reports `'other'`.
|
|
52
|
+
*
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
type DocumentPartKind = 'package' | 'content-types' | 'relationships' | 'main-document' | 'glossary' | 'styles' | 'numbering' | 'settings' | 'web-settings' | 'font-table' | 'theme' | 'header' | 'footer' | 'footnotes' | 'endnotes' | 'comments' | 'people' | 'custom-xml' | 'document-properties' | 'media' | 'embedding' | 'other';
|
|
56
|
+
/**
|
|
57
|
+
* The class of an unexpected exception, for a failure the engine did not name. The message is
|
|
58
|
+
* never reported, because it can quote document content.
|
|
59
|
+
*
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
type DiagnosticErrorName = 'Error' | 'TypeError' | 'RangeError' | 'ReferenceError' | 'SyntaxError' | 'other';
|
|
63
|
+
/** What a tracked-change request was asked to do. @public */
|
|
64
|
+
type ReviewOperation = 'accept' | 'reject' | 'reassign';
|
|
65
|
+
/** The kind of a tracked change, as the review queue lists it. @public */
|
|
66
|
+
type ReviewChangeKind = 'insert' | 'delete' | 'replace' | 'moveFrom' | 'moveTo' | 'format' | 'paragraphMark' | 'structural';
|
|
67
|
+
/**
|
|
68
|
+
* Which property change a formatting change is, by its OOXML element. A name outside this list
|
|
69
|
+
* reports `'other'`.
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
type FormattingChangeKind = 'rPrChange' | 'pPrChange' | 'sectPrChange' | 'tblPrChange' | 'tblPrExChange' | 'tblGridChange' | 'trPrChange' | 'tcPrChange' | 'numberingChange' | 'other';
|
|
74
|
+
/**
|
|
75
|
+
* Where an exception the engine did not expect was caught: the mount of an open, a later layout
|
|
76
|
+
* slice of an open, a command, a single review action, or an editing API batch.
|
|
77
|
+
*
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
type FailureStage = 'open-mount' | 'open-layout' | 'command' | 'review-item' | 'automation';
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* What a diagnostic code means and what to do about it.
|
|
84
|
+
*
|
|
85
|
+
* Both strings are constants written for developers. They never contain document content, so
|
|
86
|
+
* an exporter can send them with the event.
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
interface DiagnosticExplanation {
|
|
91
|
+
/** One or two sentences: the cause, then the action. */
|
|
92
|
+
readonly hint: string;
|
|
93
|
+
/** The documentation anchor for this code, such as `…/guides/diagnostics#edit-read-only`. */
|
|
94
|
+
readonly docs: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* What a diagnostic code means and what to do about it.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* editor.on('diagnostic', (event) => {
|
|
102
|
+
* if (event.kind === 'edit.rejected') console.warn(explainDiagnostic(event.code).hint);
|
|
103
|
+
* });
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
declare function explainDiagnostic(code: DiagnosticCode): DiagnosticExplanation;
|
|
109
|
+
/** Every public code, in declaration order. For coverage tests and catalogs. @public */
|
|
110
|
+
declare function diagnosticCodes(): readonly DiagnosticCode[];
|
|
111
|
+
|
|
112
|
+
export { diagnosticCodes as k, explainDiagnostic as l };
|
|
113
|
+
export type { ByteSizeBucket as B, CollaborationDiagnosticCode as C, DiagnosticErrorName as D, EditDiagnosticCode as E, FailureStage as F, HistoryDiagnosticCode as H, PerformanceDiagnosticCode as P, ReviewChangeKind as R, DocumentPartKind as a, CountBucket as b, CustomNodeDiagnosticCode as c, DiagnosticCode as d, DiagnosticExplanation as e, DocumentOpenDiagnosticCode as f, FontDiagnosticCode as g, FormattingChangeKind as h, ReviewDiagnosticCode as i, ReviewOperation as j };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as OoxmlNode } from './types-barrel-
|
|
1
|
+
import { N as OoxmlNode } from './types-barrel-DuC5QBNC.js';
|
|
2
2
|
|
|
3
3
|
/** `ST_DocProtect`: the restriction a document asks for. `none` also stands for "no element". */
|
|
4
4
|
type DocumentProtectionEdit = 'none' | 'readOnly' | 'comments' | 'trackedChanges' | 'forms';
|
|
@@ -17,4 +17,4 @@ declare const NO_DOCUMENT_PROTECTION: DocumentProtectionState;
|
|
|
17
17
|
declare function readDocumentProtection(settingsRoot: OoxmlNode | null | undefined): DocumentProtectionState;
|
|
18
18
|
|
|
19
19
|
export { NO_DOCUMENT_PROTECTION as N, readDocumentProtection as r };
|
|
20
|
-
export type {
|
|
20
|
+
export type { DocumentProtectionEdit as D, DocumentProtectionState as a };
|