@docx-editor.dev/core 2.11.0 → 2.13.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 +18 -14
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +5 -5
- package/dist/automation.d.ts +5 -5
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +8 -8
- package/dist/binding.d.ts +8 -8
- package/dist/binding.js +1 -1
- package/dist/chunk-3AT4RUQ3.cjs +19 -0
- package/dist/chunk-4NAQLFXA.cjs +2 -0
- package/dist/{chunk-WPQMPHNR.cjs → chunk-67S7OHE6.cjs} +1 -1
- package/dist/chunk-BHAUFJO6.js +20 -0
- package/dist/chunk-F7U4OLMS.cjs +2 -0
- package/dist/chunk-FNMXRLGW.cjs +5 -0
- package/dist/{chunk-BP7ANXGA.js → chunk-HWWHGREA.js} +1 -1
- package/dist/chunk-I36WS6XX.cjs +20 -0
- package/dist/chunk-IOTL2GGW.js +1 -0
- package/dist/chunk-OF2QZCTN.js +19 -0
- package/dist/chunk-PFSJVAWJ.cjs +1 -0
- package/dist/chunk-PRIBU3UH.js +2 -0
- package/dist/{chunk-WU7PUTVA.js → chunk-RIYSCEFQ.js} +1 -1
- package/dist/chunk-RO3HFCML.js +5 -0
- package/dist/chunk-SFOUCTKA.js +2 -0
- package/dist/chunk-VBEKERLJ.js +2 -0
- package/dist/chunk-WANKXD34.cjs +2 -0
- package/dist/chunk-XETEMUIP.cjs +11 -0
- package/dist/chunk-YMW34EBA.js +11 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.cts +3 -3
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.cts +3 -3
- package/dist/collaboration.d.ts +3 -3
- package/dist/contracts/editor.d.cts +7 -7
- package/dist/contracts/editor.d.ts +7 -7
- package/dist/contracts/interaction.d.cts +7 -7
- package/dist/contracts/interaction.d.ts +7 -7
- package/dist/contracts/modules.d.cts +7 -7
- package/dist/contracts/modules.d.ts +7 -7
- package/dist/{custom-node-writes-CwkYRw3V.d.cts → custom-node-writes-C46r3_5O.d.cts} +2 -2
- package/dist/{custom-node-writes-JfTn-Sy6.d.ts → custom-node-writes-DntmaAVW.d.ts} +2 -2
- package/dist/{dist-YFULGVS3.js → dist-OSUJGKTK.js} +1 -1
- package/dist/{editor-C8edZgy5.d.cts → editor-DLrTueVe.d.cts} +21 -9
- package/dist/{editor-BogcVHXk.d.ts → editor-KiB6JNvk.d.ts} +21 -9
- package/dist/editor.cjs +1 -1
- package/dist/editor.d.cts +56 -23
- package/dist/editor.d.ts +56 -23
- package/dist/editor.js +1 -1
- package/dist/{index-BNv-ZLQP.d.ts → index-D4Pxdo_p.d.ts} +168 -13
- package/dist/{index-Dn0lOp9Z.d.cts → index-D_PA2Xv6.d.cts} +168 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +179 -508
- package/dist/layout.d.ts +179 -508
- package/dist/layout.js +1 -1
- package/dist/{note-properties-BmoSdyKS.d.ts → note-properties-CDFiNXcD.d.ts} +1 -1
- package/dist/{note-properties-BvGfHk5e.d.cts → note-properties-Y6qYh2Hv.d.cts} +1 -1
- package/dist/{omml-equation-Ciq5rgb7.d.ts → omml-equation-BY49UOIF.d.ts} +1 -1
- package/dist/{omml-equation-CqQOt_dD.d.cts → omml-equation-DB8d-jCq.d.cts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +6 -6
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{protocol-BB-WP3zk.d.cts → protocol-C8L58j66.d.cts} +2 -2
- package/dist/{protocol-Ckl7hWsv.d.ts → protocol-DjgYKCAy.d.ts} +2 -2
- package/dist/{review-items-CkYyXhXM.d.ts → review-items-CCS1h93f.d.ts} +1 -1
- package/dist/{review-items-BdeLNRi2.d.cts → review-items-CaAkgi5s.d.cts} +1 -1
- package/dist/{review-reads-BOLSBm5w.d.cts → review-reads-BrTDmoYH.d.cts} +2 -2
- package/dist/{review-reads-Crf0Xn42.d.ts → review-reads-DcGYCH0w.d.ts} +2 -2
- package/dist/{revision-projection-Ae2CWa8E.d.ts → revision-projection-BmLtLPxH.d.ts} +1 -1
- package/dist/{revision-projection-C2S8PSQm.d.cts → revision-projection-Dknlar93.d.cts} +1 -1
- package/dist/{semantic-cell-selection-DdmoxC-y.d.ts → semantic-cell-selection-BZ50i-Fu.d.ts} +4 -4
- package/dist/{semantic-cell-selection-C0OFD4D9.d.cts → semantic-cell-selection-COnfaOZO.d.cts} +4 -4
- package/dist/{semantic-interaction-COyhZ9WH.d.ts → semantic-interaction-BDJ4TBjm.d.ts} +4 -2
- package/dist/{semantic-interaction-Cs2jErnt.d.cts → semantic-interaction-Bq3ixB0I.d.cts} +4 -2
- package/dist/{semantic-paint-UHaj3sBY.d.cts → semantic-paint-C5SMTO8Y.d.cts} +2 -2
- package/dist/{semantic-paint-vA-oLSdV.d.ts → semantic-paint-DuhhY5-R.d.ts} +2 -2
- package/dist/{semantic-records-5AOQJmLX.d.cts → semantic-records-BI1jpft7.d.ts} +603 -8
- package/dist/{semantic-records-9xhwbJ23.d.ts → semantic-records-Btw3Ao4v.d.cts} +603 -8
- package/dist/{shaped-measurer-vzsY88oK.d.ts → shaped-measurer-CqdYa0fa.d.cts} +9 -1
- package/dist/{shaped-measurer-NeF2mPSu.d.cts → shaped-measurer-qnBJziPx.d.ts} +9 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +22 -13
- package/dist/store.d.ts +22 -13
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-BPyXNxyL.d.cts → tree-op-types-BUulYD5y.d.cts} +55 -9
- package/dist/{tree-op-types-DnzAOnc9.d.ts → tree-op-types-D6HzlPR4.d.ts} +55 -9
- package/dist/{tree-package-fragment-CDER0G3B.d.ts → tree-package-fragment-B1supBtE.d.ts} +2 -2
- package/dist/{tree-package-fragment-BjZ3RWAS.d.cts → tree-package-fragment-ByN5yzll.d.cts} +2 -2
- package/dist/{tree-session-contract-DhdsFT_z.d.ts → tree-session-contract-BasiwZgZ.d.ts} +28 -5
- package/dist/{tree-session-contract-BF2FVBOM.d.cts → tree-session-contract-DbeBenMR.d.cts} +28 -5
- package/dist/{tree-store-CNZ3O83s.d.ts → tree-store-APgWx6qn.d.ts} +1 -1
- package/dist/{tree-store-DfZi7FqY.d.cts → tree-store-DEEQ9wz_.d.cts} +1 -1
- package/package.json +5 -2
- package/dist/chunk-34BNQUD4.js +0 -10
- package/dist/chunk-5AVHO75P.cjs +0 -19
- package/dist/chunk-6HMSC7UV.js +0 -2
- package/dist/chunk-76Y3Y45J.cjs +0 -2
- package/dist/chunk-CRZR6K5Z.js +0 -19
- package/dist/chunk-EJATEGJZ.cjs +0 -1
- package/dist/chunk-GRDFEH5Q.cjs +0 -2
- package/dist/chunk-GWV65NQW.cjs +0 -10
- package/dist/chunk-GXLZCXEH.js +0 -2
- package/dist/chunk-JUQOPVSK.cjs +0 -2
- package/dist/chunk-LAETEBHD.js +0 -1
- package/dist/chunk-M6Z3KFXM.cjs +0 -5
- package/dist/chunk-UQFOYZJO.cjs +0 -18
- package/dist/chunk-WXQ245MQ.js +0 -18
- package/dist/chunk-WZHIFNSU.js +0 -5
- package/dist/chunk-X7A5XART.js +0 -2
|
@@ -1281,11 +1281,15 @@ interface DrawingDiagnostic {
|
|
|
1281
1281
|
readonly detail: string | null;
|
|
1282
1282
|
}
|
|
1283
1283
|
|
|
1284
|
+
type ShapeSchemeColorResolver = (scheme: string) => string | null;
|
|
1285
|
+
type ShapeStyleMatrixResolver = (kind: 'fill' | 'line', index: number) => OoxmlElement | null;
|
|
1284
1286
|
/**
|
|
1285
|
-
* The renderable subset of a `wps:wsp` non-picture graphic
|
|
1286
|
-
* (`a:custGeom` with move/line/close
|
|
1287
|
-
* solid
|
|
1288
|
-
*
|
|
1287
|
+
* The renderable subset of a `wps:wsp` non-picture graphic, or of one bounded `wpg:wgp`
|
|
1288
|
+
* group of them: closed polygon subpaths (`a:custGeom` with move/line/close/cubicBezTo
|
|
1289
|
+
* verbs, or a supported `a:prstGeom`) with a solid fill and/or stroke. The colour may come
|
|
1290
|
+
* from `a:srgbClr` or from the theme, through `a:schemeClr` or a `wps:style` matrix
|
|
1291
|
+
* reference. Anything richer (gradient and picture fills, text bodies, rotation, a nested
|
|
1292
|
+
* group) projects as `null` and paints the labelled placeholder instead.
|
|
1289
1293
|
*/
|
|
1290
1294
|
interface VectorShapeProjection {
|
|
1291
1295
|
/** The drawing extent that frames the subpath coordinate space. */
|
|
@@ -1293,16 +1297,39 @@ interface VectorShapeProjection {
|
|
|
1293
1297
|
cx: number;
|
|
1294
1298
|
cy: number;
|
|
1295
1299
|
}>;
|
|
1296
|
-
/**
|
|
1300
|
+
/**
|
|
1301
|
+
* Every component's subpath polygons, flattened, in extent-EMU space; fill rule is
|
|
1302
|
+
* even-odd. Painting reads `components`, which keeps each polygon with its own colours;
|
|
1303
|
+
* this stays the geometry summary (bounds, hit tests, wrap holes).
|
|
1304
|
+
*/
|
|
1297
1305
|
readonly subpathsEmu: readonly (readonly Readonly<{
|
|
1298
1306
|
x: number;
|
|
1299
1307
|
y: number;
|
|
1300
1308
|
}>[])[];
|
|
1301
|
-
/**
|
|
1309
|
+
/**
|
|
1310
|
+
* Validated 6-digit sRGB hex (no `#`) of the one component, or null. A group of two or
|
|
1311
|
+
* more components has no single fill, so this is null there as well: null means "no one
|
|
1312
|
+
* fill to name", not "nothing is filled". Read `components` to paint.
|
|
1313
|
+
*/
|
|
1302
1314
|
readonly fillHex: string | null;
|
|
1303
|
-
|
|
1315
|
+
readonly fillAlpha?: number;
|
|
1316
|
+
/** As `fillHex`, for the stroke: the one component's stroke, else null. */
|
|
1304
1317
|
readonly strokeHex: string | null;
|
|
1305
|
-
|
|
1318
|
+
readonly strokeAlpha?: number;
|
|
1319
|
+
/** The one component's stroke width in EMU; 0 when absent or when grouped. */
|
|
1320
|
+
readonly strokeWidthEmu: number;
|
|
1321
|
+
/** Independently styled paths, always non-empty. A direct shape has one component. */
|
|
1322
|
+
readonly components: readonly VectorShapeComponent[];
|
|
1323
|
+
}
|
|
1324
|
+
interface VectorShapeComponent {
|
|
1325
|
+
readonly subpathsEmu: readonly (readonly Readonly<{
|
|
1326
|
+
x: number;
|
|
1327
|
+
y: number;
|
|
1328
|
+
}>[])[];
|
|
1329
|
+
readonly fillHex: string | null;
|
|
1330
|
+
readonly fillAlpha: number;
|
|
1331
|
+
readonly strokeHex: string | null;
|
|
1332
|
+
readonly strokeAlpha: number;
|
|
1306
1333
|
readonly strokeWidthEmu: number;
|
|
1307
1334
|
}
|
|
1308
1335
|
/**
|
|
@@ -1512,6 +1539,8 @@ declare function projectDrawing(drawing: OoxmlDrawingNode, context: Readonly<{
|
|
|
1512
1539
|
limits: DrawingProjectionLimits;
|
|
1513
1540
|
namespaceScope?: ReadonlyMap<string, string>;
|
|
1514
1541
|
resolveRelationship?: RelationshipTargetResolver;
|
|
1542
|
+
resolveSchemeColor?: ShapeSchemeColorResolver;
|
|
1543
|
+
resolveStyleMatrixReference?: ShapeStyleMatrixResolver;
|
|
1515
1544
|
}>): DrawingProjection | null;
|
|
1516
1545
|
|
|
1517
1546
|
/** Opaque handle — bytes are reachable only through {@link mintValidatedImageBytes}. */
|
|
@@ -1615,6 +1644,10 @@ declare const MAX_SVG_SNIFF_BYTES = 512;
|
|
|
1615
1644
|
interface ValidatedRasterHeader {
|
|
1616
1645
|
readonly pixelWidth: number;
|
|
1617
1646
|
readonly pixelHeight: number;
|
|
1647
|
+
/** Horizontal physical density when bounded header metadata supplies it. */
|
|
1648
|
+
readonly dpiX?: number;
|
|
1649
|
+
/** Vertical physical density when bounded header metadata supplies it. */
|
|
1650
|
+
readonly dpiY?: number;
|
|
1618
1651
|
}
|
|
1619
1652
|
/** Bounded scan for an `<svg` document root (optional `<?xml` prolog only). */
|
|
1620
1653
|
declare function hasBoundedSvgRoot(bytes: Uint8Array): boolean;
|
|
@@ -2898,6 +2931,19 @@ type TreeDocOp = {
|
|
|
2898
2931
|
readonly paragraphId: string;
|
|
2899
2932
|
readonly pageNumberText: string;
|
|
2900
2933
|
}[];
|
|
2934
|
+
} | {
|
|
2935
|
+
/**
|
|
2936
|
+
* Rewrite recognized fields' cached RESULT runs in place — between the `separate` and
|
|
2937
|
+
* `end` fldChars, or a `w:fldSimple`'s content. The instruction is never modified; a
|
|
2938
|
+
* result holding anything but plain runs is skipped (see `tree-op-field-results.ts`).
|
|
2939
|
+
*/
|
|
2940
|
+
readonly op: 'refreshFieldResults';
|
|
2941
|
+
readonly updates: readonly {
|
|
2942
|
+
readonly paragraphId: string;
|
|
2943
|
+
/** Node id of the field's begin `w:fldChar`, or of the `w:fldSimple` element. */
|
|
2944
|
+
readonly fieldNodeId: string;
|
|
2945
|
+
readonly text: string;
|
|
2946
|
+
}[];
|
|
2901
2947
|
};
|
|
2902
2948
|
/** Drawing mutation ops from typed-drawings-and-images task 11. */
|
|
2903
2949
|
type DrawingTreeDocOp = Extract<TreeDocOp, {
|
|
@@ -2906,7 +2952,7 @@ type DrawingTreeDocOp = Extract<TreeDocOp, {
|
|
|
2906
2952
|
/** Just the `op` discriminants, for dispatch tables and validation. */
|
|
2907
2953
|
type TreeDocOpKind = TreeDocOp['op'];
|
|
2908
2954
|
/** Every {@link TreeDocOpKind}, for validation and exhaustiveness checks. */
|
|
2909
|
-
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"];
|
|
2955
|
+
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"];
|
|
2910
2956
|
/**
|
|
2911
2957
|
* How far a committed op can reach, so layout can scope its work (task 5.2).
|
|
2912
2958
|
*
|
|
@@ -1281,11 +1281,15 @@ interface DrawingDiagnostic {
|
|
|
1281
1281
|
readonly detail: string | null;
|
|
1282
1282
|
}
|
|
1283
1283
|
|
|
1284
|
+
type ShapeSchemeColorResolver = (scheme: string) => string | null;
|
|
1285
|
+
type ShapeStyleMatrixResolver = (kind: 'fill' | 'line', index: number) => OoxmlElement | null;
|
|
1284
1286
|
/**
|
|
1285
|
-
* The renderable subset of a `wps:wsp` non-picture graphic
|
|
1286
|
-
* (`a:custGeom` with move/line/close
|
|
1287
|
-
* solid
|
|
1288
|
-
*
|
|
1287
|
+
* The renderable subset of a `wps:wsp` non-picture graphic, or of one bounded `wpg:wgp`
|
|
1288
|
+
* group of them: closed polygon subpaths (`a:custGeom` with move/line/close/cubicBezTo
|
|
1289
|
+
* verbs, or a supported `a:prstGeom`) with a solid fill and/or stroke. The colour may come
|
|
1290
|
+
* from `a:srgbClr` or from the theme, through `a:schemeClr` or a `wps:style` matrix
|
|
1291
|
+
* reference. Anything richer (gradient and picture fills, text bodies, rotation, a nested
|
|
1292
|
+
* group) projects as `null` and paints the labelled placeholder instead.
|
|
1289
1293
|
*/
|
|
1290
1294
|
interface VectorShapeProjection {
|
|
1291
1295
|
/** The drawing extent that frames the subpath coordinate space. */
|
|
@@ -1293,16 +1297,39 @@ interface VectorShapeProjection {
|
|
|
1293
1297
|
cx: number;
|
|
1294
1298
|
cy: number;
|
|
1295
1299
|
}>;
|
|
1296
|
-
/**
|
|
1300
|
+
/**
|
|
1301
|
+
* Every component's subpath polygons, flattened, in extent-EMU space; fill rule is
|
|
1302
|
+
* even-odd. Painting reads `components`, which keeps each polygon with its own colours;
|
|
1303
|
+
* this stays the geometry summary (bounds, hit tests, wrap holes).
|
|
1304
|
+
*/
|
|
1297
1305
|
readonly subpathsEmu: readonly (readonly Readonly<{
|
|
1298
1306
|
x: number;
|
|
1299
1307
|
y: number;
|
|
1300
1308
|
}>[])[];
|
|
1301
|
-
/**
|
|
1309
|
+
/**
|
|
1310
|
+
* Validated 6-digit sRGB hex (no `#`) of the one component, or null. A group of two or
|
|
1311
|
+
* more components has no single fill, so this is null there as well: null means "no one
|
|
1312
|
+
* fill to name", not "nothing is filled". Read `components` to paint.
|
|
1313
|
+
*/
|
|
1302
1314
|
readonly fillHex: string | null;
|
|
1303
|
-
|
|
1315
|
+
readonly fillAlpha?: number;
|
|
1316
|
+
/** As `fillHex`, for the stroke: the one component's stroke, else null. */
|
|
1304
1317
|
readonly strokeHex: string | null;
|
|
1305
|
-
|
|
1318
|
+
readonly strokeAlpha?: number;
|
|
1319
|
+
/** The one component's stroke width in EMU; 0 when absent or when grouped. */
|
|
1320
|
+
readonly strokeWidthEmu: number;
|
|
1321
|
+
/** Independently styled paths, always non-empty. A direct shape has one component. */
|
|
1322
|
+
readonly components: readonly VectorShapeComponent[];
|
|
1323
|
+
}
|
|
1324
|
+
interface VectorShapeComponent {
|
|
1325
|
+
readonly subpathsEmu: readonly (readonly Readonly<{
|
|
1326
|
+
x: number;
|
|
1327
|
+
y: number;
|
|
1328
|
+
}>[])[];
|
|
1329
|
+
readonly fillHex: string | null;
|
|
1330
|
+
readonly fillAlpha: number;
|
|
1331
|
+
readonly strokeHex: string | null;
|
|
1332
|
+
readonly strokeAlpha: number;
|
|
1306
1333
|
readonly strokeWidthEmu: number;
|
|
1307
1334
|
}
|
|
1308
1335
|
/**
|
|
@@ -1512,6 +1539,8 @@ declare function projectDrawing(drawing: OoxmlDrawingNode, context: Readonly<{
|
|
|
1512
1539
|
limits: DrawingProjectionLimits;
|
|
1513
1540
|
namespaceScope?: ReadonlyMap<string, string>;
|
|
1514
1541
|
resolveRelationship?: RelationshipTargetResolver;
|
|
1542
|
+
resolveSchemeColor?: ShapeSchemeColorResolver;
|
|
1543
|
+
resolveStyleMatrixReference?: ShapeStyleMatrixResolver;
|
|
1515
1544
|
}>): DrawingProjection | null;
|
|
1516
1545
|
|
|
1517
1546
|
/** Opaque handle — bytes are reachable only through {@link mintValidatedImageBytes}. */
|
|
@@ -1615,6 +1644,10 @@ declare const MAX_SVG_SNIFF_BYTES = 512;
|
|
|
1615
1644
|
interface ValidatedRasterHeader {
|
|
1616
1645
|
readonly pixelWidth: number;
|
|
1617
1646
|
readonly pixelHeight: number;
|
|
1647
|
+
/** Horizontal physical density when bounded header metadata supplies it. */
|
|
1648
|
+
readonly dpiX?: number;
|
|
1649
|
+
/** Vertical physical density when bounded header metadata supplies it. */
|
|
1650
|
+
readonly dpiY?: number;
|
|
1618
1651
|
}
|
|
1619
1652
|
/** Bounded scan for an `<svg` document root (optional `<?xml` prolog only). */
|
|
1620
1653
|
declare function hasBoundedSvgRoot(bytes: Uint8Array): boolean;
|
|
@@ -2898,6 +2931,19 @@ type TreeDocOp = {
|
|
|
2898
2931
|
readonly paragraphId: string;
|
|
2899
2932
|
readonly pageNumberText: string;
|
|
2900
2933
|
}[];
|
|
2934
|
+
} | {
|
|
2935
|
+
/**
|
|
2936
|
+
* Rewrite recognized fields' cached RESULT runs in place — between the `separate` and
|
|
2937
|
+
* `end` fldChars, or a `w:fldSimple`'s content. The instruction is never modified; a
|
|
2938
|
+
* result holding anything but plain runs is skipped (see `tree-op-field-results.ts`).
|
|
2939
|
+
*/
|
|
2940
|
+
readonly op: 'refreshFieldResults';
|
|
2941
|
+
readonly updates: readonly {
|
|
2942
|
+
readonly paragraphId: string;
|
|
2943
|
+
/** Node id of the field's begin `w:fldChar`, or of the `w:fldSimple` element. */
|
|
2944
|
+
readonly fieldNodeId: string;
|
|
2945
|
+
readonly text: string;
|
|
2946
|
+
}[];
|
|
2901
2947
|
};
|
|
2902
2948
|
/** Drawing mutation ops from typed-drawings-and-images task 11. */
|
|
2903
2949
|
type DrawingTreeDocOp = Extract<TreeDocOp, {
|
|
@@ -2906,7 +2952,7 @@ type DrawingTreeDocOp = Extract<TreeDocOp, {
|
|
|
2906
2952
|
/** Just the `op` discriminants, for dispatch tables and validation. */
|
|
2907
2953
|
type TreeDocOpKind = TreeDocOp['op'];
|
|
2908
2954
|
/** Every {@link TreeDocOpKind}, for validation and exhaustiveness checks. */
|
|
2909
|
-
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"];
|
|
2955
|
+
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"];
|
|
2910
2956
|
/**
|
|
2911
2957
|
* How far a committed op can reach, so layout can scope its work (task 5.2).
|
|
2912
2958
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as OoxmlPackage, y as SupportedImageMime, O as OoxmlPart, a as OoxmlNode, g as OoxmlElement, E as RevisionAttributionInput, C as ImageDecodePort, F as DrawingTreeDocOp, r as TreeOpRejection, T as TreeDocOp } from './tree-op-types-
|
|
2
|
-
import { N as NoteKind, T as TreeModelChange, a as TreeDocumentStore, c as TreeStoryRef, d as TransactionContext, b as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-
|
|
1
|
+
import { b as OoxmlPackage, y as SupportedImageMime, O as OoxmlPart, a as OoxmlNode, g as OoxmlElement, E as RevisionAttributionInput, C as ImageDecodePort, F as DrawingTreeDocOp, r as TreeOpRejection, T as TreeDocOp } from './tree-op-types-D6HzlPR4.js';
|
|
2
|
+
import { N as NoteKind, T as TreeModelChange, a as TreeDocumentStore, c as TreeStoryRef, d as TransactionContext, b as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-APgWx6qn.js';
|
|
3
3
|
|
|
4
4
|
/** A freshly allocated drawing property id, or the reason one could not be minted. */
|
|
5
5
|
type DrawingPropertyIdResult = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as OoxmlPackage, y as SupportedImageMime, O as OoxmlPart, a as OoxmlNode, g as OoxmlElement, E as RevisionAttributionInput, C as ImageDecodePort, F as DrawingTreeDocOp, r as TreeOpRejection, T as TreeDocOp } from './tree-op-types-
|
|
2
|
-
import { N as NoteKind, T as TreeModelChange, a as TreeDocumentStore, c as TreeStoryRef, d as TransactionContext, b as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-
|
|
1
|
+
import { b as OoxmlPackage, y as SupportedImageMime, O as OoxmlPart, a as OoxmlNode, g as OoxmlElement, E as RevisionAttributionInput, C as ImageDecodePort, F as DrawingTreeDocOp, r as TreeOpRejection, T as TreeDocOp } from './tree-op-types-BUulYD5y.cjs';
|
|
2
|
+
import { N as NoteKind, T as TreeModelChange, a as TreeDocumentStore, c as TreeStoryRef, d as TransactionContext, b as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-DEEQ9wz_.cjs';
|
|
3
3
|
|
|
4
4
|
/** A freshly allocated drawing property id, or the reason one could not be minted. */
|
|
5
5
|
type DrawingPropertyIdResult = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S as StoryScope, a as StoryTargetRejection, b as HeaderFooterParts, c as HeaderFooterSectionResolution, I as InsertImageInput, d as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, e as FragmentPasteResult } from './tree-package-fragment-
|
|
2
|
-
import { T as TreeDocOp, O as OoxmlPart, a as OoxmlNode, b as OoxmlPackage, g as OoxmlElement, y as SupportedImageMime, C as ImageDecodePort, E as RevisionAttributionInput } from './tree-op-types-
|
|
3
|
-
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-
|
|
1
|
+
import { S as StoryScope, a as StoryTargetRejection, b as HeaderFooterParts, c as HeaderFooterSectionResolution, I as InsertImageInput, d as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, e as FragmentPasteResult } from './tree-package-fragment-B1supBtE.js';
|
|
2
|
+
import { T as TreeDocOp, O as OoxmlPart, a as OoxmlNode, b as OoxmlPackage, g as OoxmlElement, y as SupportedImageMime, C as ImageDecodePort, E as RevisionAttributionInput } from './tree-op-types-D6HzlPR4.js';
|
|
3
|
+
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-DntmaAVW.js';
|
|
4
4
|
import { D as DocumentProperties } from './document-properties-D6Ahr8D6.js';
|
|
5
|
-
import { S as SelectionMark, b as TransactOptions, T as TreeModelChange } from './tree-store-
|
|
6
|
-
import { a as ReviewItem } from './review-items-
|
|
5
|
+
import { S as SelectionMark, b as TransactOptions, T as TreeModelChange } from './tree-store-APgWx6qn.js';
|
|
6
|
+
import { a as ReviewItem } from './review-items-CCS1h93f.js';
|
|
7
7
|
import { Node } from 'prosemirror-model';
|
|
8
8
|
import { CollaborationDocumentPort } from './collaboration/replication.js';
|
|
9
9
|
|
|
@@ -264,6 +264,18 @@ interface TreeDocxSessionView {
|
|
|
264
264
|
* and one undo unit without swapping the body store.
|
|
265
265
|
*/
|
|
266
266
|
applyTreeOps(ops: readonly TreeDocOp[], selectionBefore?: SelectionMark | null, selectionAfter?: SelectionMark | null, scope?: StoryScope, options?: TreeApplyOptions): TreeApplyResult;
|
|
267
|
+
/**
|
|
268
|
+
* Commit several stories' ops as ONE transaction and ONE undo unit.
|
|
269
|
+
*
|
|
270
|
+
* `applyTreeOps` addresses one story; a write that must land in the body AND note parts
|
|
271
|
+
* together — the save-time field-result refresh — needs all-or-nothing semantics, or a
|
|
272
|
+
* mid-sequence refusal exports a file mixing refreshed and stale values and a single undo
|
|
273
|
+
* restores only the last part. Any refusal rolls every group back. Lifecycle ops refuse.
|
|
274
|
+
*/
|
|
275
|
+
applyTreeOpsAtomic(groups: readonly {
|
|
276
|
+
readonly scope: StoryScope;
|
|
277
|
+
readonly ops: readonly TreeDocOp[];
|
|
278
|
+
}[], options?: TreeApplyOptions): TreeApplyResult;
|
|
267
279
|
/**
|
|
268
280
|
* Every part that holds a story, body first, then headers, footers and note parts.
|
|
269
281
|
*
|
|
@@ -328,6 +340,17 @@ interface TreeDocxSessionView {
|
|
|
328
340
|
* Memoized per package revision.
|
|
329
341
|
*/
|
|
330
342
|
documentFonts(): readonly string[];
|
|
343
|
+
/**
|
|
344
|
+
* Font families the document's RENDERED text resolves to, over the story roots only:
|
|
345
|
+
* direct run `w:rFonts` of text-bearing runs plus the style chains those runs,
|
|
346
|
+
* paragraphs and tables actually reference — never a declaration in an unused style.
|
|
347
|
+
* Memoized per package revision.
|
|
348
|
+
*
|
|
349
|
+
* The font-substitution notice reads this one: `documentFonts` reports what the
|
|
350
|
+
* document DECLARES, and Word writes latent styles (Balloon Text naming Segoe UI)
|
|
351
|
+
* into documents that never render a character in them.
|
|
352
|
+
*/
|
|
353
|
+
renderedFontFamilies(): readonly string[];
|
|
331
354
|
/**
|
|
332
355
|
* Whether the document puts any literal character on a page, over the same roots
|
|
333
356
|
* {@link TreeDocxSessionView.documentFonts} reads. Memoized per package revision.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S as StoryScope, a as StoryTargetRejection, b as HeaderFooterParts, c as HeaderFooterSectionResolution, I as InsertImageInput, d as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, e as FragmentPasteResult } from './tree-package-fragment-
|
|
2
|
-
import { T as TreeDocOp, O as OoxmlPart, a as OoxmlNode, b as OoxmlPackage, g as OoxmlElement, y as SupportedImageMime, C as ImageDecodePort, E as RevisionAttributionInput } from './tree-op-types-
|
|
3
|
-
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-
|
|
1
|
+
import { S as StoryScope, a as StoryTargetRejection, b as HeaderFooterParts, c as HeaderFooterSectionResolution, I as InsertImageInput, d as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, e as FragmentPasteResult } from './tree-package-fragment-ByN5yzll.cjs';
|
|
2
|
+
import { T as TreeDocOp, O as OoxmlPart, a as OoxmlNode, b as OoxmlPackage, g as OoxmlElement, y as SupportedImageMime, C as ImageDecodePort, E as RevisionAttributionInput } from './tree-op-types-BUulYD5y.cjs';
|
|
3
|
+
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-C46r3_5O.cjs';
|
|
4
4
|
import { D as DocumentProperties } from './document-properties-D6Ahr8D6.cjs';
|
|
5
|
-
import { S as SelectionMark, b as TransactOptions, T as TreeModelChange } from './tree-store-
|
|
6
|
-
import { a as ReviewItem } from './review-items-
|
|
5
|
+
import { S as SelectionMark, b as TransactOptions, T as TreeModelChange } from './tree-store-DEEQ9wz_.cjs';
|
|
6
|
+
import { a as ReviewItem } from './review-items-CaAkgi5s.cjs';
|
|
7
7
|
import { Node } from 'prosemirror-model';
|
|
8
8
|
import { CollaborationDocumentPort } from './collaboration/replication.cjs';
|
|
9
9
|
|
|
@@ -264,6 +264,18 @@ interface TreeDocxSessionView {
|
|
|
264
264
|
* and one undo unit without swapping the body store.
|
|
265
265
|
*/
|
|
266
266
|
applyTreeOps(ops: readonly TreeDocOp[], selectionBefore?: SelectionMark | null, selectionAfter?: SelectionMark | null, scope?: StoryScope, options?: TreeApplyOptions): TreeApplyResult;
|
|
267
|
+
/**
|
|
268
|
+
* Commit several stories' ops as ONE transaction and ONE undo unit.
|
|
269
|
+
*
|
|
270
|
+
* `applyTreeOps` addresses one story; a write that must land in the body AND note parts
|
|
271
|
+
* together — the save-time field-result refresh — needs all-or-nothing semantics, or a
|
|
272
|
+
* mid-sequence refusal exports a file mixing refreshed and stale values and a single undo
|
|
273
|
+
* restores only the last part. Any refusal rolls every group back. Lifecycle ops refuse.
|
|
274
|
+
*/
|
|
275
|
+
applyTreeOpsAtomic(groups: readonly {
|
|
276
|
+
readonly scope: StoryScope;
|
|
277
|
+
readonly ops: readonly TreeDocOp[];
|
|
278
|
+
}[], options?: TreeApplyOptions): TreeApplyResult;
|
|
267
279
|
/**
|
|
268
280
|
* Every part that holds a story, body first, then headers, footers and note parts.
|
|
269
281
|
*
|
|
@@ -328,6 +340,17 @@ interface TreeDocxSessionView {
|
|
|
328
340
|
* Memoized per package revision.
|
|
329
341
|
*/
|
|
330
342
|
documentFonts(): readonly string[];
|
|
343
|
+
/**
|
|
344
|
+
* Font families the document's RENDERED text resolves to, over the story roots only:
|
|
345
|
+
* direct run `w:rFonts` of text-bearing runs plus the style chains those runs,
|
|
346
|
+
* paragraphs and tables actually reference — never a declaration in an unused style.
|
|
347
|
+
* Memoized per package revision.
|
|
348
|
+
*
|
|
349
|
+
* The font-substitution notice reads this one: `documentFonts` reports what the
|
|
350
|
+
* document DECLARES, and Word writes latent styles (Balloon Text naming Segoe UI)
|
|
351
|
+
* into documents that never render a character in them.
|
|
352
|
+
*/
|
|
353
|
+
renderedFontFamilies(): readonly string[];
|
|
331
354
|
/**
|
|
332
355
|
* Whether the document puts any literal character on a page, over the same roots
|
|
333
356
|
* {@link TreeDocxSessionView.documentFonts} reads. Memoized per package revision.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as OoxmlNode, j as OoxmlParagraphNode, k as OoxmlNoteNode, l as OoxmlContinuationSeparatorNode, m as OoxmlEndnotesNode, n as OoxmlFootnotesNode, o as OoxmlNoteRefNode, p as OoxmlNoteReferenceNode, q as OoxmlSeparatorNode, I as ImpactClass, O as OoxmlPart, b as OoxmlPackage, T as TreeDocOp, r as TreeOpRejection } from './tree-op-types-
|
|
1
|
+
import { a as OoxmlNode, j as OoxmlParagraphNode, k as OoxmlNoteNode, l as OoxmlContinuationSeparatorNode, m as OoxmlEndnotesNode, n as OoxmlFootnotesNode, o as OoxmlNoteRefNode, p as OoxmlNoteReferenceNode, q as OoxmlSeparatorNode, I as ImpactClass, O as OoxmlPart, b as OoxmlPackage, T as TreeDocOp, r as TreeOpRejection } from './tree-op-types-D6HzlPR4.js';
|
|
2
2
|
|
|
3
3
|
/** UTF-16 placeholder for one atomic note unit in `paragraphTextOf` / segments. */
|
|
4
4
|
declare const NOTE_ATOM_CHAR = "\uFFFC";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as OoxmlNode, j as OoxmlParagraphNode, k as OoxmlNoteNode, l as OoxmlContinuationSeparatorNode, m as OoxmlEndnotesNode, n as OoxmlFootnotesNode, o as OoxmlNoteRefNode, p as OoxmlNoteReferenceNode, q as OoxmlSeparatorNode, I as ImpactClass, O as OoxmlPart, b as OoxmlPackage, T as TreeDocOp, r as TreeOpRejection } from './tree-op-types-
|
|
1
|
+
import { a as OoxmlNode, j as OoxmlParagraphNode, k as OoxmlNoteNode, l as OoxmlContinuationSeparatorNode, m as OoxmlEndnotesNode, n as OoxmlFootnotesNode, o as OoxmlNoteRefNode, p as OoxmlNoteReferenceNode, q as OoxmlSeparatorNode, I as ImpactClass, O as OoxmlPart, b as OoxmlPackage, T as TreeDocOp, r as TreeOpRejection } from './tree-op-types-BUulYD5y.cjs';
|
|
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,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docx-editor.dev/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.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
|
+
"engines": {
|
|
7
|
+
"node": "^20.16.0 || >=22.3.0"
|
|
8
|
+
},
|
|
6
9
|
"exports": {
|
|
7
10
|
".": {
|
|
8
11
|
"types": "./dist/index.d.ts",
|
|
@@ -97,7 +100,7 @@
|
|
|
97
100
|
"directory": "packages/core"
|
|
98
101
|
},
|
|
99
102
|
"dependencies": {
|
|
100
|
-
"@docx-editor.dev/i18n": "^2.
|
|
103
|
+
"@docx-editor.dev/i18n": "^2.13.0",
|
|
101
104
|
"bidi-js": "1.0.3",
|
|
102
105
|
"emf-converter": "2.0.2",
|
|
103
106
|
"fast-xml-parser": "^5.10.1",
|