@docx-editor.dev/core 2.15.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -15
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +11 -9
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +12 -16
- package/dist/binding.js +1 -1
- package/dist/{chunk-Q4AB7E4O.cjs → chunk-4MIFIUEV.cjs} +1 -1
- package/dist/chunk-66DTF4TD.cjs +2 -0
- package/dist/chunk-67U2OZS7.cjs +2 -0
- package/dist/chunk-6EGMDUL7.js +21 -0
- package/dist/chunk-ABXCIZVW.js +2 -0
- package/dist/chunk-AEIAYDCG.js +1 -0
- package/dist/{chunk-YL4Q5LZP.cjs → chunk-BPSGGVP5.cjs} +1 -1
- package/dist/chunk-CMV2MTDE.js +5 -0
- package/dist/chunk-DYPT6YDY.js +1 -0
- package/dist/chunk-EWV5JMJY.cjs +21 -0
- package/dist/chunk-FAD7DH6Q.cjs +1 -0
- package/dist/chunk-GHNTGVKG.cjs +11 -0
- package/dist/chunk-GQVKCK33.js +2 -0
- package/dist/chunk-I4ENGOOZ.js +1 -0
- package/dist/chunk-IZHDCQUC.js +20 -0
- package/dist/chunk-KEXMDQ2Z.js +1 -0
- package/dist/chunk-KQEUFAAG.cjs +20 -0
- package/dist/chunk-QVJO5FUR.js +11 -0
- package/dist/chunk-SIUUTE5M.js +2 -0
- package/dist/chunk-TDHR2QLH.cjs +1 -0
- package/dist/{chunk-PXKZUTHX.cjs → chunk-WGHVIB6B.cjs} +2 -2
- package/dist/chunk-XKQTITOJ.cjs +5 -0
- package/dist/{chunk-KXPVOPR5.js → chunk-YKDRBDI2.js} +1 -1
- package/dist/chunk-YRTRPSSA.cjs +1 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +4 -4
- package/dist/contracts/editor.d.ts +9 -7
- package/dist/contracts/interaction.d.ts +73 -10
- package/dist/contracts/modules.d.ts +8 -8
- package/dist/{custom-node-writes-C9ArIlJh.d.ts → custom-node-writes-4WOL8JB_.d.ts} +2 -2
- package/dist/{editor-sRxrFJd8.d.ts → editor-PDx0fqSo.d.ts} +26 -125
- package/dist/editor-scope-DZJT4ukT.d.ts +53 -0
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.d.ts +32 -26
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +24 -12
- package/dist/export.js +2 -2
- package/dist/{font-resolver-BYEHQGTw.d.ts → font-resolver-CdqOugwZ.d.ts} +2 -2
- package/dist/{headless-document-view-DELC4E5v.d.ts → headless-document-view-C9ONlGtf.d.ts} +2 -2
- package/dist/{hf-references-DTrHkktY.d.ts → hf-references-BZVHctVD.d.ts} +1 -1
- package/dist/{index-C3Gvq4jN.d.ts → index-BVb4a6O3.d.ts} +74 -28
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +20 -18
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-DoGR5cf8.d.ts → layout-shaping-D_U5z-Qh.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +270 -459
- package/dist/layout.js +1 -1
- package/dist/{note-properties-DSe8igrz.d.ts → note-properties-BosjbkGC.d.ts} +1 -1
- package/dist/{omml-equation-BpRmfDAf.d.ts → omml-equation-oLlbPpVy.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{protocol-DZzKxH5r.d.ts → protocol-CUsqt13U.d.ts} +28 -6
- package/dist/{review-items-DYRx187i.d.ts → review-items-kC-YI70C.d.ts} +1 -1
- package/dist/{review-reads-LbGUdNzn.d.ts → review-reads-DdvADsmp.d.ts} +8 -7
- package/dist/{revision-projection-DHRJH48u.d.ts → revision-projection-CN_DiOl_.d.ts} +1 -1
- package/dist/{semantic-cell-selection-BXVWCBYm.d.ts → semantic-cell-selection-BMrXDniV.d.ts} +4 -4
- package/dist/{semantic-interaction-DZsDmPg5.d.ts → semantic-interaction-NGeYzYCN.d.ts} +1 -1
- package/dist/{semantic-paint-f7SqN4oW.d.ts → semantic-paint-CM8F-8pH.d.ts} +2 -2
- package/dist/{semantic-records-EIdwId-a.d.ts → semantic-records-BreR44Ki.d.ts} +1231 -947
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +80 -20
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-egdarvH_.d.ts → tree-op-types-C5rZzoAz.d.ts} +131 -53
- package/dist/{tree-package-fragment-DjkH4ESI.d.ts → tree-package-fragment-DDQHk8sv.d.ts} +3 -3
- package/dist/{tree-session-contract-CGOOgPjW.d.ts → tree-session-contract-dKgbKH9A.d.ts} +18 -8
- package/dist/{tree-store-DKJB0IcA.d.ts → tree-store-DU192chS.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-24APKZAN.cjs +0 -11
- package/dist/chunk-2YH4MSHX.cjs +0 -2
- package/dist/chunk-5Y7AADI6.js +0 -1
- package/dist/chunk-AREFLNUP.js +0 -11
- package/dist/chunk-AS7YZNQE.cjs +0 -2
- package/dist/chunk-AVGCKH6A.cjs +0 -20
- package/dist/chunk-CDYVDQRI.cjs +0 -5
- package/dist/chunk-HOEWFH5U.cjs +0 -1
- package/dist/chunk-KFELX7CN.js +0 -2
- package/dist/chunk-LGFKIF4M.cjs +0 -1
- package/dist/chunk-M52QXFKI.js +0 -1
- package/dist/chunk-MNUKSXRO.js +0 -1
- package/dist/chunk-PBOIGBDO.js +0 -2
- package/dist/chunk-PMHGONET.cjs +0 -1
- package/dist/chunk-QJYH6AYD.js +0 -1
- package/dist/chunk-QRC37MWG.cjs +0 -20
- package/dist/chunk-RJSB6RJ7.js +0 -20
- package/dist/chunk-SB54HLFJ.js +0 -20
- package/dist/chunk-XCESLTJL.js +0 -2
- package/dist/chunk-Z4527AXR.js +0 -5
|
@@ -311,6 +311,7 @@ type XmlResult = {
|
|
|
311
311
|
/** Per-part caps on size, element count and depth. Clamped into the hard ceilings. */
|
|
312
312
|
interface XmlLimits {
|
|
313
313
|
readonly maxBytes: number;
|
|
314
|
+
/** Element budget; may raise or lower the engine default, up to its hard ceiling. */
|
|
314
315
|
readonly maxElements?: number;
|
|
315
316
|
}
|
|
316
317
|
/** Read XML into an ordered tree, refusing DTDs/entities and bounding size. */
|
|
@@ -1172,6 +1173,7 @@ type ZipReadResult = {
|
|
|
1172
1173
|
readonly ok: false;
|
|
1173
1174
|
readonly reason: ZipRejection;
|
|
1174
1175
|
readonly detail?: string;
|
|
1176
|
+
readonly limit?: 'zip.maxTotalBytes' | 'zip.maxRatio';
|
|
1175
1177
|
};
|
|
1176
1178
|
/**
|
|
1177
1179
|
* Inflate a ZIP archive with bounds + OPC name normalization. Entry name, count,
|
|
@@ -1187,6 +1189,29 @@ declare function readZip(bytes: Uint8Array, limits?: ZipLimits): ZipReadResult;
|
|
|
1187
1189
|
* never be smuggled into a ZIP entry (write-side path-traversal guard). */
|
|
1188
1190
|
declare function writeZip(entries: ReadonlyMap<string, Uint8Array>): Uint8Array;
|
|
1189
1191
|
|
|
1192
|
+
/** Only generated, escaped SVG and relationship slots; never authored markup. */
|
|
1193
|
+
type LegacyGraphicFragment = string | Readonly<{
|
|
1194
|
+
relationshipId: string;
|
|
1195
|
+
before: string;
|
|
1196
|
+
after: string;
|
|
1197
|
+
nativeCrop?: SourceCrop;
|
|
1198
|
+
}>;
|
|
1199
|
+
interface LegacyGraphicProjection {
|
|
1200
|
+
readonly width: number;
|
|
1201
|
+
readonly height: number;
|
|
1202
|
+
readonly fragments: readonly LegacyGraphicFragment[];
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
/** Picture color adjustments shared by projection, layout, and paint.
|
|
1206
|
+
* @public
|
|
1207
|
+
*/
|
|
1208
|
+
interface DrawingImageEffects {
|
|
1209
|
+
readonly grayscale: boolean;
|
|
1210
|
+
readonly brightness: number;
|
|
1211
|
+
readonly contrast: number;
|
|
1212
|
+
readonly bilevel?: number;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1190
1215
|
/** The relationship namespace `r:id` lives in. */
|
|
1191
1216
|
declare const OFFICE_RELATIONSHIP_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
1192
1217
|
/** The `Type` a hyperlink relationship declares. */
|
|
@@ -1326,6 +1351,13 @@ interface VectorShapeComponent {
|
|
|
1326
1351
|
x: number;
|
|
1327
1352
|
y: number;
|
|
1328
1353
|
}>[])[];
|
|
1354
|
+
/** Authored close commands; omitted by older consumers means closed polygons. */
|
|
1355
|
+
readonly subpathsClosed?: readonly boolean[];
|
|
1356
|
+
/** Filled line-end polygons in the same projected coordinate space. */
|
|
1357
|
+
readonly arrowheadsEmu?: readonly (readonly Readonly<{
|
|
1358
|
+
x: number;
|
|
1359
|
+
y: number;
|
|
1360
|
+
}>[])[];
|
|
1329
1361
|
readonly fillHex: string | null;
|
|
1330
1362
|
readonly fillAlpha: number;
|
|
1331
1363
|
readonly strokeHex: string | null;
|
|
@@ -1474,12 +1506,10 @@ interface DrawingProjection {
|
|
|
1474
1506
|
readonly picture: PictureProjection | null;
|
|
1475
1507
|
readonly vectorShape: VectorShapeProjection | null;
|
|
1476
1508
|
readonly textboxStory: TextboxStoryProjection | null;
|
|
1509
|
+
/** Read-only preview of the supported native VML subset; the canonical XML is untouched. */
|
|
1510
|
+
readonly legacyGraphic?: LegacyGraphicProjection;
|
|
1477
1511
|
readonly locks: DrawingLocks;
|
|
1478
|
-
readonly effects:
|
|
1479
|
-
grayscale: boolean;
|
|
1480
|
-
brightness: number;
|
|
1481
|
-
contrast: number;
|
|
1482
|
-
}>;
|
|
1512
|
+
readonly effects: DrawingImageEffects;
|
|
1483
1513
|
readonly compatibilityBranchNodeId: string | null;
|
|
1484
1514
|
readonly diagnostics: readonly DrawingDiagnostic[];
|
|
1485
1515
|
}
|
|
@@ -1747,6 +1777,7 @@ type OoxmlPackageResult = {
|
|
|
1747
1777
|
readonly ok: false;
|
|
1748
1778
|
readonly reason: OoxmlPackageRejection;
|
|
1749
1779
|
readonly detail?: string;
|
|
1780
|
+
readonly limit?: 'zip.maxTotalBytes' | 'zip.maxRatio';
|
|
1750
1781
|
};
|
|
1751
1782
|
declare function readOoxmlPackage(bytes: Uint8Array, limits?: OoxmlPackageLimits): OoxmlPackageResult;
|
|
1752
1783
|
/**
|
|
@@ -1769,6 +1800,97 @@ declare function writeOoxmlPackage(pkg: OoxmlPackage): Uint8Array;
|
|
|
1769
1800
|
/** Replace one part's tree, returning a new package. Pure, like the tree edits themselves. */
|
|
1770
1801
|
declare function withPart(pkg: OoxmlPackage, part: OoxmlPart): OoxmlPackage;
|
|
1771
1802
|
|
|
1803
|
+
type InsertTextOp = {
|
|
1804
|
+
readonly op: 'insertText';
|
|
1805
|
+
readonly paragraphId: string;
|
|
1806
|
+
/** Legacy text form identity for protected filling; never an inline wrapper owner. */
|
|
1807
|
+
readonly textFormFieldId?: string;
|
|
1808
|
+
readonly offset: number;
|
|
1809
|
+
readonly text: string;
|
|
1810
|
+
/**
|
|
1811
|
+
* Write this as a TRACKED insertion, attributed here.
|
|
1812
|
+
*
|
|
1813
|
+
* On the op rather than on the store, so suggesting stays a decision the surface makes
|
|
1814
|
+
* per edit and the write vocabulary stays explicit — a global "everything is tracked
|
|
1815
|
+
* now" flag is exactly what `DocEdits` refuses, because it makes the meaning of an op
|
|
1816
|
+
* depend on state the op does not carry.
|
|
1817
|
+
*/
|
|
1818
|
+
readonly revision?: RevisionAttributionInput;
|
|
1819
|
+
/**
|
|
1820
|
+
* When set, the text belongs INSIDE this content control, whatever sits at the offset.
|
|
1821
|
+
*
|
|
1822
|
+
* A boundary offset is owned by the run that starts there, which at a control's trailing
|
|
1823
|
+
* edge is the run after the control — so an offset alone cannot say "append to this field",
|
|
1824
|
+
* the way it cannot say which run of a field result to format (see `targetRunIds`). A
|
|
1825
|
+
* caller that names the control gets the text in the control; one that does not gets the
|
|
1826
|
+
* plain offset rule, which is what a keystroke beside a field means.
|
|
1827
|
+
*/
|
|
1828
|
+
readonly inside?: string;
|
|
1829
|
+
/**
|
|
1830
|
+
* Which side of a run BOUNDARY the text joins. Default `'left'` — Word's typing rule:
|
|
1831
|
+
* the next character takes the formatting of the character before the caret.
|
|
1832
|
+
*
|
|
1833
|
+
* `'right'` is for a caller that is not typing but placing text inside the run that
|
|
1834
|
+
* STARTS at the offset — the hyperlink editor rewriting a link's display text, where
|
|
1835
|
+
* landing left of the boundary would put the new text outside the link. Ignored when
|
|
1836
|
+
* the offset falls strictly inside a run, which has no boundary to choose.
|
|
1837
|
+
*/
|
|
1838
|
+
readonly bias?: 'left' | 'right';
|
|
1839
|
+
};
|
|
1840
|
+
type DeleteTextOp = {
|
|
1841
|
+
readonly op: 'deleteText';
|
|
1842
|
+
readonly paragraphId: string;
|
|
1843
|
+
/** Legacy text form identity for protected filling; never an inline wrapper owner. */
|
|
1844
|
+
readonly textFormFieldId?: string;
|
|
1845
|
+
readonly start: number;
|
|
1846
|
+
readonly end: number;
|
|
1847
|
+
/** Write this as a TRACKED deletion — the characters stay, wrapped in `w:del`. */
|
|
1848
|
+
readonly revision?: RevisionAttributionInput;
|
|
1849
|
+
};
|
|
1850
|
+
|
|
1851
|
+
/** Editable legacy text input types. Other authored types remain inert. */
|
|
1852
|
+
type TextFormFieldType = 'regular' | 'number' | 'date';
|
|
1853
|
+
/** Options stored in the legacy field definition. Zero means unlimited length. */
|
|
1854
|
+
interface TextFormFieldOptions {
|
|
1855
|
+
readonly type: TextFormFieldType;
|
|
1856
|
+
readonly maxLength: number;
|
|
1857
|
+
readonly format: string;
|
|
1858
|
+
readonly enabled: boolean;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
/** A legacy text input in the shared paragraph offset space. */
|
|
1862
|
+
interface TextFormFieldRange {
|
|
1863
|
+
readonly fieldNodeId: string;
|
|
1864
|
+
readonly start: number;
|
|
1865
|
+
readonly end: number;
|
|
1866
|
+
readonly enabled: boolean;
|
|
1867
|
+
readonly defaultText: string;
|
|
1868
|
+
readonly type: string;
|
|
1869
|
+
readonly maxLength: number;
|
|
1870
|
+
readonly format: string;
|
|
1871
|
+
readonly chromeIds: readonly string[];
|
|
1872
|
+
}
|
|
1873
|
+
/** Uses the field parser and offset index; never introduces another inline walk. */
|
|
1874
|
+
declare function textFormFieldsOf(paragraph: OoxmlParagraphNode): readonly TextFormFieldRange[];
|
|
1875
|
+
/** Options edit for an existing legacy text form. */
|
|
1876
|
+
interface SetTextFormFieldDefaultOp {
|
|
1877
|
+
readonly op: 'setTextFormFieldDefault';
|
|
1878
|
+
/** Regional conventions for new date input; defaults to en-US. */
|
|
1879
|
+
readonly locale?: string;
|
|
1880
|
+
readonly paragraphId: string;
|
|
1881
|
+
readonly fieldNodeId: string;
|
|
1882
|
+
readonly text: string;
|
|
1883
|
+
readonly options?: TextFormFieldOptions;
|
|
1884
|
+
}
|
|
1885
|
+
/** Validate and format the existing result when a user finishes filling a field. */
|
|
1886
|
+
interface CommitTextFormFieldOp {
|
|
1887
|
+
readonly op: 'commitTextFormField';
|
|
1888
|
+
/** Regional conventions for new date input; defaults to en-US. */
|
|
1889
|
+
readonly locale?: string;
|
|
1890
|
+
readonly paragraphId: string;
|
|
1891
|
+
readonly fieldNodeId: string;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1772
1894
|
/** How deep controls may nest before a walk stops descending. Shared by every lane. */
|
|
1773
1895
|
declare const MAX_CONTENT_CONTROL_NESTING = 32;
|
|
1774
1896
|
/** Cap on controls one walk reports, so a hostile file cannot make a read unbounded. */
|
|
@@ -2054,7 +2176,6 @@ interface RevisionAttributionInput {
|
|
|
2054
2176
|
readonly date?: string;
|
|
2055
2177
|
}
|
|
2056
2178
|
|
|
2057
|
-
/** JSON-safe color input carried on table cell property ops. Theme/auto require a validated literal. */
|
|
2058
2179
|
/**
|
|
2059
2180
|
* A colour as an op carries it: a literal, a theme reference, or automatic.
|
|
2060
2181
|
*
|
|
@@ -2074,10 +2195,8 @@ type TreeDocColorValue = {
|
|
|
2074
2195
|
readonly kind: 'auto';
|
|
2075
2196
|
readonly resolvedHex: string;
|
|
2076
2197
|
};
|
|
2077
|
-
/** Which cell edges a selected-cell border op targets. */
|
|
2078
2198
|
/** Which edges a border op addresses — the four sides, the interiors, all, or clear. */
|
|
2079
2199
|
type TableBorderTarget = 'all' | 'outside' | 'inside' | 'none' | 'top' | 'bottom' | 'left' | 'right';
|
|
2080
|
-
/** Concrete edge scopes that apply or clear a complete border spec. */
|
|
2081
2200
|
/** A {@link TableBorderTarget} that draws something — everything except clear. */
|
|
2082
2201
|
type TableBorderEdgeTarget = Exclude<TableBorderTarget, 'none'>;
|
|
2083
2202
|
/** Complete border spec for non-`none` selected-cell border scopes. Size is in eighths of a point. */
|
|
@@ -2159,48 +2278,7 @@ type TreeDocOp = {
|
|
|
2159
2278
|
readonly paragraphId: string;
|
|
2160
2279
|
readonly name: string;
|
|
2161
2280
|
}[];
|
|
2162
|
-
} | {
|
|
2163
|
-
readonly op: 'insertText';
|
|
2164
|
-
readonly paragraphId: string;
|
|
2165
|
-
readonly offset: number;
|
|
2166
|
-
readonly text: string;
|
|
2167
|
-
/**
|
|
2168
|
-
* Write this as a TRACKED insertion, attributed here.
|
|
2169
|
-
*
|
|
2170
|
-
* On the op rather than on the store, so suggesting stays a decision the surface makes
|
|
2171
|
-
* per edit and the write vocabulary stays explicit — a global "everything is tracked
|
|
2172
|
-
* now" flag is exactly what `DocEdits` refuses, because it makes the meaning of an op
|
|
2173
|
-
* depend on state the op does not carry.
|
|
2174
|
-
*/
|
|
2175
|
-
readonly revision?: RevisionAttributionInput;
|
|
2176
|
-
/**
|
|
2177
|
-
* When set, the text belongs INSIDE this content control, whatever sits at the offset.
|
|
2178
|
-
*
|
|
2179
|
-
* A boundary offset is owned by the run that starts there, which at a control's trailing
|
|
2180
|
-
* edge is the run after the control — so an offset alone cannot say "append to this field",
|
|
2181
|
-
* the way it cannot say which run of a field result to format (see `targetRunIds`). A
|
|
2182
|
-
* caller that names the control gets the text in the control; one that does not gets the
|
|
2183
|
-
* plain offset rule, which is what a keystroke beside a field means.
|
|
2184
|
-
*/
|
|
2185
|
-
readonly inside?: string;
|
|
2186
|
-
/**
|
|
2187
|
-
* Which side of a run BOUNDARY the text joins. Default `'left'` — Word's typing rule:
|
|
2188
|
-
* the next character takes the formatting of the character before the caret.
|
|
2189
|
-
*
|
|
2190
|
-
* `'right'` is for a caller that is not typing but placing text inside the run that
|
|
2191
|
-
* STARTS at the offset — the hyperlink editor rewriting a link's display text, where
|
|
2192
|
-
* landing left of the boundary would put the new text outside the link. Ignored when
|
|
2193
|
-
* the offset falls strictly inside a run, which has no boundary to choose.
|
|
2194
|
-
*/
|
|
2195
|
-
readonly bias?: 'left' | 'right';
|
|
2196
|
-
} | {
|
|
2197
|
-
readonly op: 'deleteText';
|
|
2198
|
-
readonly paragraphId: string;
|
|
2199
|
-
readonly start: number;
|
|
2200
|
-
readonly end: number;
|
|
2201
|
-
/** Write this as a TRACKED deletion — the characters stay, wrapped in `w:del`. */
|
|
2202
|
-
readonly revision?: RevisionAttributionInput;
|
|
2203
|
-
} | {
|
|
2281
|
+
} | InsertTextOp | DeleteTextOp | {
|
|
2204
2282
|
/**
|
|
2205
2283
|
* Mark a paragraph's own MARK as inserted or deleted (`w:pPr/w:rPr/w:ins|w:del`,
|
|
2206
2284
|
* §17.13.5). The change is to the paragraph break itself, so no character carries it.
|
|
@@ -2935,7 +3013,7 @@ type TreeDocOp = {
|
|
|
2935
3013
|
readonly paragraphId: string;
|
|
2936
3014
|
readonly pageNumberText: string;
|
|
2937
3015
|
}[];
|
|
2938
|
-
} | {
|
|
3016
|
+
} | SetTextFormFieldDefaultOp | CommitTextFormFieldOp | {
|
|
2939
3017
|
/**
|
|
2940
3018
|
* Rewrite recognized fields' cached RESULT runs in place — between the `separate` and
|
|
2941
3019
|
* `end` fldChars, or a `w:fldSimple`'s content. The instruction is never modified; a
|
|
@@ -2956,7 +3034,7 @@ type DrawingTreeDocOp = Extract<TreeDocOp, {
|
|
|
2956
3034
|
/** Just the `op` discriminants, for dispatch tables and validation. */
|
|
2957
3035
|
type TreeDocOpKind = TreeDocOp['op'];
|
|
2958
3036
|
/** Every {@link TreeDocOpKind}, for validation and exhaustiveness checks. */
|
|
2959
|
-
declare const TREE_DOC_OP_KINDS: readonly ["replaceStoryBlocks", "insertText", "deleteText", "setParagraphMarkRevision", "proposeParagraphMerge", "insertCommentMarker", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "insertTab", "insertHardBreak", "insertPageBreak", "insertPageField", "setListLevel", "setListNumbering", "setParagraphTabStops", "setParagraphMarkProperties", "splitParagraph", "splitParagraphMany", "joinParagraphs", "setRunProperties", "setParagraphProperties", "setSectionProperties", "setSectionMark", "insertHyperlink", "setHyperlinkTarget", "removeHyperlink", "setMathEquation", "removeMathEquation", "setContentControlValue", "removeContentControl", "insertInlineContentControl", "addRepeatingSectionItem", "removeRepeatingSectionItem", "deleteBlock", "insertTable", "insertTableRow", "deleteTableRow", "insertTableColumn", "deleteTableColumn", "setTableColumnWidths", "setTableRightEdgeWidth", "setTableRowHeight", "setTableCellBorders", "setTableCellFill", "setTableCellVerticalAlignment", "createHeaderFooter", "deleteHeaderFooter", "linkToPrevious", "unlinkFromPrevious", "setSectionFurnitureOptions", "insertNote", "deleteNote", "convertNote", "convertAllNotes", "setNoteProperties", "setContentControlProperties", "insertContentControl", "insertFragment", "insertDrawing", "replaceDrawingResource", "deleteDrawing", "resizeDrawing", "cropDrawing", "positionDrawing", "setDrawingWrap", "setDrawingMetadata", "setDrawingLocks", "transformDrawing", "insertToc", "replaceTocResult", "rewriteTocPageNumbers", "refreshFieldResults"];
|
|
3037
|
+
declare const TREE_DOC_OP_KINDS: readonly ["replaceStoryBlocks", "insertText", "deleteText", "setParagraphMarkRevision", "proposeParagraphMerge", "insertCommentMarker", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "insertTab", "insertHardBreak", "insertPageBreak", "insertPageField", "setListLevel", "setListNumbering", "setParagraphTabStops", "setParagraphMarkProperties", "splitParagraph", "splitParagraphMany", "joinParagraphs", "setRunProperties", "setParagraphProperties", "setSectionProperties", "setSectionMark", "insertHyperlink", "setHyperlinkTarget", "removeHyperlink", "setMathEquation", "removeMathEquation", "setContentControlValue", "removeContentControl", "insertInlineContentControl", "addRepeatingSectionItem", "removeRepeatingSectionItem", "deleteBlock", "insertTable", "insertTableRow", "deleteTableRow", "insertTableColumn", "deleteTableColumn", "setTableColumnWidths", "setTableRightEdgeWidth", "setTableRowHeight", "setTableCellBorders", "setTableCellFill", "setTableCellVerticalAlignment", "createHeaderFooter", "deleteHeaderFooter", "linkToPrevious", "unlinkFromPrevious", "setSectionFurnitureOptions", "insertNote", "deleteNote", "convertNote", "convertAllNotes", "setNoteProperties", "setContentControlProperties", "insertContentControl", "insertFragment", "insertDrawing", "replaceDrawingResource", "deleteDrawing", "resizeDrawing", "cropDrawing", "positionDrawing", "setDrawingWrap", "setDrawingMetadata", "setDrawingLocks", "transformDrawing", "insertToc", "replaceTocResult", "rewriteTocPageNumbers", "refreshFieldResults", "setTextFormFieldDefault", "commitTextFormField"];
|
|
2960
3038
|
/**
|
|
2961
3039
|
* How far a committed op can reach, so layout can scope its work (task 5.2).
|
|
2962
3040
|
*
|
|
@@ -3100,4 +3178,4 @@ type TreeOpResult = {
|
|
|
3100
3178
|
readonly detail?: string;
|
|
3101
3179
|
};
|
|
3102
3180
|
|
|
3103
|
-
export { type
|
|
3181
|
+
export { type OoxmlDrawingNode as $, type DrawingVerticalReferenceFrame as A, type VectorImageMime as B, type RevisionAttributionInput as C, type DrawingKind as D, type ImageDecodePort as E, type DrawingTreeDocOp as F, type ImageResourceLimits as G, type TreeDocColorValue as H, type ImpactClass as I, DEFAULT_IMAGE_RESOURCE_LIMITS as J, IMAGE_WRAP_TARGETS as K, resolveImageResourceLimits as L, resolveSvgIntrinsicSize as M, sniffImageMime as N, type OoxmlPart as O, type PreservedImageMime as P, validateRasterHeader as Q, type RevisionAddress as R, type SourceCrop as S, type TreeDocOp as T, type TableBorderStyle as U, type ValidatedImageBytesHandle as V, type DrawingAccessibility as W, type DrawingImageEffects as X, type DrawingTransform as Y, type VectorShapeProjection as Z, type DrawingProjection as _, type OoxmlNode as a, type OoxmlContentControlEndPropertiesNode as a$, type ResourceLimits as a0, type OoxmlInvariantResult as a1, type RelationshipRecord as a2, type OoxmlInvariantIssue as a3, type OoxmlHardBreakNode as a4, type OoxmlFldCharNode as a5, type OoxmlFldSimpleNode as a6, type OoxmlInstrTextNode as a7, type OoxmlAttribute as a8, type TreeOpResult as a9, type HyperlinkKind as aA, type HyperlinkTarget as aB, IMAGE_RELATIONSHIP_TYPE as aC, IMAGE_RESOURCE_HARD_CEILINGS as aD, type ImageRelationshipResolution as aE, type ImageResourceLookup as aF, type IndexResult as aG, type InsertTextOp as aH, MAX_CONTENT_CONTROLS_PER_PART as aI, MAX_CONTENT_CONTROL_NESTING as aJ, MAX_SVG_SNIFF_BYTES as aK, type NameRejection as aL, type NameResult as aM, OFFICE_RELATIONSHIP_NAMESPACE_URI as aN, OOXML_NODE_IDENTITY_RULES as aO, type OoxmlBodyNode as aP, type OoxmlBookmarkEndNode as aQ, type OoxmlBookmarkStartNode as aR, type OoxmlContentControlCalendarNode as aS, type OoxmlContentControlCheckboxNode as aT, type OoxmlContentControlCheckedNode as aU, type OoxmlContentControlCheckedStateNode as aV, type OoxmlContentControlComboBoxNode as aW, type OoxmlContentControlDataBindingNode as aX, type OoxmlContentControlDateFormatNode as aY, type OoxmlContentControlDateNode as aZ, type OoxmlContentControlDropDownListNode as a_, ACCEPTED_PARAGRAPH_PROPERTIES as aa, ACCEPTED_RUN_PROPERTIES as ab, CONTENT_CONTROL_ID_MAX as ac, CONTENT_CONTROL_PROPERTY_ORDER as ad, type CommitTextFormFieldOp as ae, type ContentControlCheckbox as af, type ContentControlCheckboxState as ag, type ContentControlDataBinding as ah, type ContentControlDateFormat as ai, type ContentControlEntry as aj, type ContentControlKind as ak, type ContentControlLevel as al, type ContentControlListItem as am, type ContentControlLock as an, type ContentControlProperties as ao, type ContentTypeError as ap, type ContentTypeIndex as aq, type ContentTypeRecords as ar, type CreateImageResourceCacheOptions as as, DEFAULT_LIMITS as at, DEFAULT_OOXML_PACKAGE_LIMITS as au, DEFAULT_ZIP_LIMITS as av, type DefaultRecord as aw, type DeleteTextOp as ax, HARD_CEILINGS as ay, HYPERLINK_RELATIONSHIP_TYPE as az, type OoxmlPackage as b, contentControlPropertiesOf as b$, type OoxmlContentControlLidNode as b0, type OoxmlContentControlListItemNode as b1, type OoxmlContentControlPropertiesNode as b2, type OoxmlContentControlStoreMappedDataAsNode as b3, type OoxmlContentControlTextNode as b4, type OoxmlContentControlUncheckedStateNode as b5, type OoxmlDocumentNode as b6, type OoxmlExternalTarget as b7, type OoxmlGenericExtensionAttribute as b8, type OoxmlHyperlinkNode as b9, type TargetMode as bA, type TextFormFieldOptions as bB, type TextFormFieldRange as bC, type TextFormFieldType as bD, type TreeDocOpKind as bE, type TreeOpEffect as bF, type ValidatedRasterHeader as bG, WML_NAMESPACE_URI as bH, XMLNS_NAMESPACE_URI as bI, XML_NAMESPACE_URI as bJ, type XmlLimits as bK, type XmlNode as bL, type XmlRejection as bM, type XmlResult as bN, type ZipLimits as bO, type ZipReadResult as bP, type ZipRejection as bQ, allocateContentControlId as bR, asciiFold as bS, buildContentTypeIndex as bT, buildRelationshipSet as bU, childElements as bV, contentControlContentChildren as bW, contentControlContentNodeOf as bX, contentControlEndPropertiesNodeOf as bY, contentControlLevelOf as bZ, contentControlPropertiesNodeOf as b_, type OoxmlInvariantIssueCode as ba, type OoxmlKnownNodeAttribute as bb, type OoxmlNamespaceBinding as bc, type OoxmlNodeIdentityRules as bd, type OoxmlPackageResult as be, type OoxmlParagraphPropertiesNode as bf, type OoxmlPartMetadata as bg, type OoxmlReadRejection as bh, type OoxmlReadResult as bi, type OoxmlRunNode as bj, type OoxmlRunPropertiesNode as bk, type OoxmlTabNode as bl, type OoxmlTextElementNode as bm, type OoxmlTextNode as bn, type OoxmlWmlValAttribute as bo, type OoxmlXmlSpaceAttribute as bp, type OverrideRecord as bq, type RelationshipError as br, type RelationshipSetResult as bs, type RelationshipTargetResolver as bt, type ResolveResult as bu, type ResolvedRelationship as bv, type SetTextFormFieldDefaultOp as bw, TABLE_BORDER_STYLES as bx, TREE_DOC_OP_KINDS as by, type TabStopWrite as bz, type OoxmlElement as c, contentControlTextOf as c0, contentControlsIn as c1, createImageResourceCache as c2, detectDuplicateNames as c3, extensionKey as c4, findContentControl as c5, findElement as c6, flattenContentControls as c7, hasBoundedSvgRoot as c8, hyperlinkAnchorOf as c9, resolveInternalTarget as cA, resolveLimits as cB, resolveRelationship as cC, textContent as cD, textFormFieldsOf as cE, validateExternalTarget as cF, validateGifHeader as cG, validateJpegHeader as cH, validatePngHeader as cI, withPart as cJ, writeOoxmlPackage as cK, writeZip as cL, type VectorShapeComponent as cM, hyperlinkRelationshipIdOf as ca, hyperlinkTargetOf as cb, imageResourceLookupFor as cc, isContentControlContentNode as cd, isContentControlNode as ce, isContentControlWrapper as cf, isContentRevisionKind as cg, isHyperlinkNode as ch, isRangeMarkerKind as ci, isValidMime as cj, liveDrawingReferenceCount as ck, lockForbidsEdit as cl, lockForbidsRemoval as cm, normalizePartName as cn, orderedContentControlProperties as co, parseContentControlId as cp, partNameKey as cq, projectDrawing as cr, readOnOffChild as cs, readOoxmlPackage as ct, readOoxmlPart as cu, readXml as cv, readZip as cw, resolveContentControlLock as cx, resolveContentType as cy, resolveImageRelationship as cz, type OoxmlNodeId as d, type OoxmlGenericElementNode as e, type OoxmlPackageLimits as f, type OoxmlPackageRejection as g, type OoxmlParagraphNode as h, type OoxmlNoteNode as i, type OoxmlContinuationSeparatorNode as j, type OoxmlEndnotesNode as k, type OoxmlFootnotesNode as l, type OoxmlNoteRefNode as m, type OoxmlNoteReferenceNode as n, type OoxmlSeparatorNode as o, type TreeOpRejection as p, type OoxmlProperty as q, type OoxmlContentControlNode as r, type OoxmlContentControlContentNode as s, type RenderableImageMime as t, type ImageWrapTarget as u, type DrawingPositionInput as v, type DrawingLocks as w, type ImageResourceState as x, type SupportedImageMime as y, type DrawingHorizontalReferenceFrame as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as OoxmlPackage, y as SupportedImageMime, O as OoxmlPart, C as RevisionAttributionInput, E as ImageDecodePort, F as DrawingTreeDocOp, p as TreeOpRejection, T as TreeDocOp } from './tree-op-types-
|
|
2
|
-
import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-
|
|
3
|
-
import { N as NoteKind, T as TreeModelChange, a as TreeDocumentStore, b as TreeStoryRef, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-
|
|
1
|
+
import { b as OoxmlPackage, y as SupportedImageMime, O as OoxmlPart, C as RevisionAttributionInput, E as ImageDecodePort, F as DrawingTreeDocOp, p as TreeOpRejection, T as TreeDocOp } from './tree-op-types-C5rZzoAz.js';
|
|
2
|
+
import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-BZVHctVD.js';
|
|
3
|
+
import { N as NoteKind, T as TreeModelChange, a as TreeDocumentStore, b as TreeStoryRef, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-DU192chS.js';
|
|
4
4
|
|
|
5
5
|
/** A freshly allocated drawing property id, or the reason one could not be minted. */
|
|
6
6
|
type DrawingPropertyIdResult = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { S as StoryScope, a as StoryTargetRejection, I as InsertImageInput, b as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, c as FragmentPasteResult } from './tree-package-fragment-
|
|
2
|
-
import { T as TreeDocOp, O as OoxmlPart, a as OoxmlNode, b as OoxmlPackage, c as OoxmlElement, y as SupportedImageMime, E as ImageDecodePort, C as RevisionAttributionInput } from './tree-op-types-
|
|
3
|
-
import { a as HeaderFooterParts, b as HeaderFooterSectionResolution } from './hf-references-
|
|
4
|
-
import { D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, a as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind } from './custom-node-writes-
|
|
5
|
-
import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-
|
|
6
|
-
import { S as SelectionMark, d as TransactOptions, T as TreeModelChange } from './tree-store-
|
|
7
|
-
import { a as ReviewItem } from './review-items-
|
|
1
|
+
import { S as StoryScope, a as StoryTargetRejection, I as InsertImageInput, b as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, c as FragmentPasteResult } from './tree-package-fragment-DDQHk8sv.js';
|
|
2
|
+
import { T as TreeDocOp, O as OoxmlPart, a as OoxmlNode, b as OoxmlPackage, c as OoxmlElement, y as SupportedImageMime, E as ImageDecodePort, C as RevisionAttributionInput } from './tree-op-types-C5rZzoAz.js';
|
|
3
|
+
import { a as HeaderFooterParts, b as HeaderFooterSectionResolution } from './hf-references-BZVHctVD.js';
|
|
4
|
+
import { D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, a as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind } from './custom-node-writes-4WOL8JB_.js';
|
|
5
|
+
import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-C9ONlGtf.js';
|
|
6
|
+
import { S as SelectionMark, d as TransactOptions, T as TreeModelChange } from './tree-store-DU192chS.js';
|
|
7
|
+
import { a as ReviewItem } from './review-items-kC-YI70C.js';
|
|
8
8
|
import { Node } from 'prosemirror-model';
|
|
9
9
|
import { CollaborationDocumentPort } from './collaboration/replication.js';
|
|
10
|
-
import { V as ViewScope } from './editor-
|
|
10
|
+
import { V as ViewScope } from './editor-scope-DZJT4ukT.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Why an edited projection could not be mapped back into tree ops.
|
|
@@ -362,6 +362,16 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
362
362
|
* into documents that never render a character in them.
|
|
363
363
|
*/
|
|
364
364
|
renderedFontFamilies(): readonly string[];
|
|
365
|
+
/**
|
|
366
|
+
* Font families named by a `w:sym/@w:font`, over the same roots
|
|
367
|
+
* {@link TreeDocxSessionView.documentFonts} reads. Memoized per package revision.
|
|
368
|
+
*
|
|
369
|
+
* Separate from both other answers on purpose. It is not a DECLARATION, so it does not
|
|
370
|
+
* join `documentFonts`, and it is not a face TEXT renders in, so the substitution notice
|
|
371
|
+
* must not report it — but a font resolver has to hear about it, or an app cannot supply
|
|
372
|
+
* the face a private-use glyph needs.
|
|
373
|
+
*/
|
|
374
|
+
symbolFontFamilies(): readonly string[];
|
|
365
375
|
/**
|
|
366
376
|
* Whether the document puts any literal character on a page, over the same roots
|
|
367
377
|
* {@link TreeDocxSessionView.documentFonts} reads. Memoized per package revision.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as OoxmlNode, h as OoxmlParagraphNode, i as OoxmlNoteNode, j as OoxmlContinuationSeparatorNode, k as OoxmlEndnotesNode, l as OoxmlFootnotesNode, m as OoxmlNoteRefNode, n as OoxmlNoteReferenceNode, o as OoxmlSeparatorNode, I as ImpactClass, O as OoxmlPart, b as OoxmlPackage, T as TreeDocOp, p as TreeOpRejection } from './tree-op-types-
|
|
1
|
+
import { a as OoxmlNode, h as OoxmlParagraphNode, i as OoxmlNoteNode, j as OoxmlContinuationSeparatorNode, k as OoxmlEndnotesNode, l as OoxmlFootnotesNode, m as OoxmlNoteRefNode, n as OoxmlNoteReferenceNode, o as OoxmlSeparatorNode, I as ImpactClass, O as OoxmlPart, b as OoxmlPackage, T as TreeDocOp, p as TreeOpRejection } from './tree-op-types-C5rZzoAz.js';
|
|
2
2
|
|
|
3
3
|
/** UTF-16 placeholder for one atomic note unit in `paragraphTextOf` / segments. */
|
|
4
4
|
declare const NOTE_ATOM_CHAR = "\uFFFC";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docx-editor.dev/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0",
|
|
4
4
|
"description": "Framework-agnostic core for docx-editor.dev: OOXML parse/serialize, the canonical document tree, layout and paint, and the Editor contract the adapters render.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"directory": "packages/core"
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@docx-editor.dev/i18n": "^2.
|
|
108
|
+
"@docx-editor.dev/i18n": "^2.16.0",
|
|
109
109
|
"bidi-js": "1.0.3",
|
|
110
110
|
"emf-converter": "2.0.2",
|
|
111
111
|
"fast-xml-parser": "^5.10.1",
|