@beyondwork/docx-react-component 1.0.124 → 1.0.126
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/api/public-types.cjs +147 -35
- package/dist/api/public-types.d.cts +2 -2
- package/dist/api/public-types.d.ts +2 -2
- package/dist/api/public-types.js +3 -3
- package/dist/api/v3.cjs +796 -102
- package/dist/api/v3.d.cts +3 -3
- package/dist/api/v3.d.ts +3 -3
- package/dist/api/v3.js +10 -10
- package/dist/{canonical-document-CG2TgAzj.d.cts → canonical-document-CXCFCbAz.d.cts} +2 -0
- package/dist/{canonical-document-CG2TgAzj.d.ts → canonical-document-CXCFCbAz.d.ts} +2 -0
- package/dist/{chunk-PFYUJU3Q.js → chunk-2QL5DAKF.js} +98 -43
- package/dist/{chunk-4IPEZYQX.js → chunk-4EENH4FG.js} +1 -1
- package/dist/{chunk-BOHHIVQ2.js → chunk-4G3OS2H6.js} +3 -3
- package/dist/{chunk-A74Y5NE4.js → chunk-4YJVRIUB.js} +52 -21
- package/dist/{chunk-FNWKE74J.js → chunk-5DGKFNQT.js} +5 -1
- package/dist/{chunk-RSYN6FTS.js → chunk-6F5QW44A.js} +2 -2
- package/dist/{chunk-ZMRO6P3A.js → chunk-6IGWPAR4.js} +505 -44
- package/dist/{chunk-KOHQFZMM.js → chunk-BYSRJ4FE.js} +1 -1
- package/dist/{chunk-H6IL5ABU.js → chunk-CXSYRB37.js} +64 -20
- package/dist/{chunk-32ZAOQ54.js → chunk-D5HYZQTG.js} +1 -1
- package/dist/{chunk-TY4DIJO3.js → chunk-ESJ2MES5.js} +1 -1
- package/dist/{chunk-Q76XPPTA.js → chunk-FPRWV54X.js} +101 -14
- package/dist/{chunk-MPH4ZQS4.js → chunk-GL7XRYBY.js} +624 -87
- package/dist/{chunk-IR7QV2BX.js → chunk-KV435YXO.js} +2 -2
- package/dist/{chunk-N4VIXI2Z.js → chunk-MWSBGJQO.js} +137 -18
- package/dist/{chunk-7PC6XUNO.js → chunk-TQDQU2E3.js} +2 -2
- package/dist/{chunk-4B74ETJI.js → chunk-V6XVZFFH.js} +2 -2
- package/dist/{chunk-NAMAWCXN.js → chunk-YD2JE54B.js} +1 -1
- package/dist/{chunk-ZRHLLPSJ.js → chunk-YHZHPXDB.js} +85 -18
- package/dist/{chunk-HXHQA4BU.js → chunk-YIYM4ZAP.js} +1 -1
- package/dist/{chunk-LGWNN3L2.js → chunk-ZDOAUP3V.js} +2 -2
- package/dist/compare.d.cts +1 -1
- package/dist/compare.d.ts +1 -1
- package/dist/core/commands/formatting-commands.d.cts +2 -2
- package/dist/core/commands/formatting-commands.d.ts +2 -2
- package/dist/core/commands/image-commands.cjs +65 -20
- package/dist/core/commands/image-commands.d.cts +2 -2
- package/dist/core/commands/image-commands.d.ts +2 -2
- package/dist/core/commands/image-commands.js +5 -5
- package/dist/core/commands/section-layout-commands.d.cts +2 -2
- package/dist/core/commands/section-layout-commands.d.ts +2 -2
- package/dist/core/commands/style-commands.d.cts +2 -2
- package/dist/core/commands/style-commands.d.ts +2 -2
- package/dist/core/commands/table-structure-commands.cjs +65 -20
- package/dist/core/commands/table-structure-commands.d.cts +2 -2
- package/dist/core/commands/table-structure-commands.d.ts +2 -2
- package/dist/core/commands/table-structure-commands.js +4 -4
- package/dist/core/commands/text-commands.cjs +66 -21
- package/dist/core/commands/text-commands.d.cts +2 -2
- package/dist/core/commands/text-commands.d.ts +2 -2
- package/dist/core/commands/text-commands.js +5 -5
- package/dist/core/selection/mapping.d.cts +2 -2
- package/dist/core/selection/mapping.d.ts +2 -2
- package/dist/core/state/editor-state.d.cts +2 -2
- package/dist/core/state/editor-state.d.ts +2 -2
- package/dist/index.cjs +1677 -240
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +62 -25
- package/dist/io/docx-session.cjs +51 -20
- package/dist/io/docx-session.d.cts +4 -4
- package/dist/io/docx-session.d.ts +4 -4
- package/dist/io/docx-session.js +4 -4
- package/dist/legal.cjs +36 -12
- package/dist/legal.d.cts +1 -1
- package/dist/legal.d.ts +1 -1
- package/dist/legal.js +3 -3
- package/dist/{loader-D9y4ZRjj.d.ts → loader-CS9-9KFa.d.ts} +3 -3
- package/dist/{loader-D9KCtj4m.d.cts → loader-OoWJ1_17.d.cts} +3 -3
- package/dist/{public-types-CNnMHZM9.d.ts → public-types-BP3vqJR5.d.cts} +157 -11
- package/dist/{public-types-DajNGKV4.d.cts → public-types-DdcHqcow.d.ts} +157 -11
- package/dist/public-types.cjs +147 -35
- package/dist/public-types.d.cts +2 -2
- package/dist/public-types.d.ts +2 -2
- package/dist/public-types.js +3 -3
- package/dist/runtime/collab.d.cts +3 -3
- package/dist/runtime/collab.d.ts +3 -3
- package/dist/runtime/document-runtime.cjs +945 -134
- package/dist/runtime/document-runtime.d.cts +2 -2
- package/dist/runtime/document-runtime.d.ts +2 -2
- package/dist/runtime/document-runtime.js +14 -14
- package/dist/{session-DyQGlryH.d.cts → session-Cq-fzx3B.d.cts} +3 -3
- package/dist/{session-DEmaOEjA.d.ts → session-DyFQt8Ph.d.ts} +3 -3
- package/dist/session.cjs +51 -20
- package/dist/session.d.cts +5 -5
- package/dist/session.d.ts +5 -5
- package/dist/session.js +5 -5
- package/dist/tailwind.cjs +238 -73
- package/dist/tailwind.d.cts +2 -2
- package/dist/tailwind.d.ts +2 -2
- package/dist/tailwind.js +7 -7
- package/dist/{types-CxE1aZiv.d.cts → types-Bg7D-GD3.d.cts} +2 -2
- package/dist/{types-DjJNaE9c.d.ts → types-bJAgMq1M.d.ts} +2 -2
- package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +3 -3
- package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +3 -3
- package/dist/ui-tailwind/editor-surface/search-plugin.js +4 -4
- package/dist/ui-tailwind.cjs +238 -73
- package/dist/ui-tailwind.d.cts +3 -3
- package/dist/ui-tailwind.d.ts +3 -3
- package/dist/ui-tailwind.js +7 -7
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { gz as ActiveStoryTextCommand, gA as CommandAppliedMeta, gB as CreateDocumentRuntimeOptions, gC as DocumentRuntime, gD as DocumentRuntimeEvent, gE as RemoteCommandEnvelope, gF as Unsubscribe, gG as __buildTocInlineNodes, gH as __collectFontLoaderInputUncached, gI as __fontFamiliesEqual, gJ as createDocumentRuntime, gK as getThemeColorResolver } from '../public-types-
|
|
2
|
-
import '../canonical-document-
|
|
1
|
+
export { gz as ActiveStoryTextCommand, gA as CommandAppliedMeta, gB as CreateDocumentRuntimeOptions, gC as DocumentRuntime, gD as DocumentRuntimeEvent, gE as RemoteCommandEnvelope, gF as Unsubscribe, gG as __buildTocInlineNodes, gH as __collectFontLoaderInputUncached, gI as __fontFamiliesEqual, gJ as createDocumentRuntime, gK as getThemeColorResolver } from '../public-types-BP3vqJR5.cjs';
|
|
2
|
+
import '../canonical-document-CXCFCbAz.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { gz as ActiveStoryTextCommand, gA as CommandAppliedMeta, gB as CreateDocumentRuntimeOptions, gC as DocumentRuntime, gD as DocumentRuntimeEvent, gE as RemoteCommandEnvelope, gF as Unsubscribe, gG as __buildTocInlineNodes, gH as __collectFontLoaderInputUncached, gI as __fontFamiliesEqual, gJ as createDocumentRuntime, gK as getThemeColorResolver } from '../public-types-
|
|
2
|
-
import '../canonical-document-
|
|
1
|
+
export { gz as ActiveStoryTextCommand, gA as CommandAppliedMeta, gB as CreateDocumentRuntimeOptions, gC as DocumentRuntime, gD as DocumentRuntimeEvent, gE as RemoteCommandEnvelope, gF as Unsubscribe, gG as __buildTocInlineNodes, gH as __collectFontLoaderInputUncached, gI as __fontFamiliesEqual, gJ as createDocumentRuntime, gK as getThemeColorResolver } from '../public-types-DdcHqcow.js';
|
|
2
|
+
import '../canonical-document-CXCFCbAz.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
@@ -4,27 +4,27 @@ import {
|
|
|
4
4
|
__fontFamiliesEqual,
|
|
5
5
|
createDocumentRuntime,
|
|
6
6
|
getThemeColorResolver
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-GL7XRYBY.js";
|
|
8
8
|
import "../chunk-6EXNNAO6.js";
|
|
9
9
|
import "../chunk-M6XR534O.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-YD2JE54B.js";
|
|
11
|
+
import "../chunk-4G3OS2H6.js";
|
|
12
12
|
import "../chunk-Y4XZCMCS.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-6F5QW44A.js";
|
|
14
|
+
import "../chunk-KV435YXO.js";
|
|
15
|
+
import "../chunk-ZDOAUP3V.js";
|
|
16
|
+
import "../chunk-BYSRJ4FE.js";
|
|
17
|
+
import "../chunk-MWSBGJQO.js";
|
|
18
|
+
import "../chunk-FPRWV54X.js";
|
|
19
|
+
import "../chunk-YHZHPXDB.js";
|
|
20
20
|
import "../chunk-KFCQYZXR.js";
|
|
21
21
|
import "../chunk-QIO6V46H.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-CXSYRB37.js";
|
|
23
23
|
import "../chunk-CX42VC67.js";
|
|
24
24
|
import "../chunk-OYGMRRR7.js";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-ESJ2MES5.js";
|
|
26
|
+
import "../chunk-4YJVRIUB.js";
|
|
27
|
+
import "../chunk-5DGKFNQT.js";
|
|
28
28
|
import "../chunk-EB6M3GE6.js";
|
|
29
29
|
import "../chunk-IHE7YOAY.js";
|
|
30
30
|
import "../chunk-UTL65BUI.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CanonicalDocument } from './canonical-document-
|
|
2
|
-
import { a as EditorSessionState, c as ExportResult, P as PersistedEditorSnapshot } from './public-types-
|
|
3
|
-
import { O as OpenOptions, b as OpenResult, a as ExportOptions, R as ReopenBarrier, V as ValidateOptions, d as ValidationReport } from './types-
|
|
1
|
+
import { C as CanonicalDocument } from './canonical-document-CXCFCbAz.cjs';
|
|
2
|
+
import { a as EditorSessionState, c as ExportResult, P as PersistedEditorSnapshot } from './public-types-BP3vqJR5.cjs';
|
|
3
|
+
import { O as OpenOptions, b as OpenResult, a as ExportOptions, R as ReopenBarrier, V as ValidateOptions, d as ValidationReport } from './types-Bg7D-GD3.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `DocxSession` — the Layer-01 package/session public entry class.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CanonicalDocument } from './canonical-document-
|
|
2
|
-
import { a as EditorSessionState, c as ExportResult, P as PersistedEditorSnapshot } from './public-types-
|
|
3
|
-
import { O as OpenOptions, b as OpenResult, a as ExportOptions, R as ReopenBarrier, V as ValidateOptions, d as ValidationReport } from './types-
|
|
1
|
+
import { C as CanonicalDocument } from './canonical-document-CXCFCbAz.js';
|
|
2
|
+
import { a as EditorSessionState, c as ExportResult, P as PersistedEditorSnapshot } from './public-types-DdcHqcow.js';
|
|
3
|
+
import { O as OpenOptions, b as OpenResult, a as ExportOptions, R as ReopenBarrier, V as ValidateOptions, d as ValidationReport } from './types-bJAgMq1M.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `DocxSession` — the Layer-01 package/session public entry class.
|
package/dist/session.cjs
CHANGED
|
@@ -14825,7 +14825,8 @@ function resolveContentType(path, contentTypes) {
|
|
|
14825
14825
|
// src/io/ooxml/parse-bookmark-references.ts
|
|
14826
14826
|
var HYPERLINK_ANCHOR_RE = /<(?:\w+:)?hyperlink\b[^>]*\bw:anchor\s*=\s*"([^"]*)"/gi;
|
|
14827
14827
|
var INSTR_TEXT_RE = /<(?:\w+:)?instrText\b[^>]*>([\s\S]*?)<\/(?:\w+:)?instrText>/gi;
|
|
14828
|
-
var
|
|
14828
|
+
var FLD_SIMPLE_INSTR_DOUBLE_RE = /<(?:\w+:)?fldSimple\b[^>]*?\b(?:w:)?instr\s*=\s*"([^"]*)"/gi;
|
|
14829
|
+
var FLD_SIMPLE_INSTR_SINGLE_RE = /<(?:\w+:)?fldSimple\b[^>]*?\b(?:w:)?instr\s*=\s*'([^']*)'/gi;
|
|
14829
14830
|
var TOC_FIELD_RE = /\bTOC\b/;
|
|
14830
14831
|
var REFLIKE_FIELD_RE = /\b(?:HYPERLINK|REF|PAGEREF|NOTEREF)\s+([A-Za-z0-9_:.\-]+)/g;
|
|
14831
14832
|
var DATA_BINDING_RE = /<(?:\w+:)?dataBinding\b/i;
|
|
@@ -14844,11 +14845,22 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
|
|
|
14844
14845
|
}
|
|
14845
14846
|
INSTR_TEXT_RE.lastIndex = 0;
|
|
14846
14847
|
while ((m = INSTR_TEXT_RE.exec(documentXml)) !== null) {
|
|
14847
|
-
|
|
14848
|
+
const instrText = m[1] ?? "";
|
|
14849
|
+
scanFieldInstruction(instrText, retained, () => {
|
|
14850
|
+
retainAllToc = true;
|
|
14851
|
+
});
|
|
14852
|
+
}
|
|
14853
|
+
FLD_SIMPLE_INSTR_DOUBLE_RE.lastIndex = 0;
|
|
14854
|
+
while ((m = FLD_SIMPLE_INSTR_DOUBLE_RE.exec(documentXml)) !== null) {
|
|
14855
|
+
scanFieldInstruction(decodeXmlAttribute(m[1] ?? ""), retained, () => {
|
|
14856
|
+
retainAllToc = true;
|
|
14857
|
+
});
|
|
14848
14858
|
}
|
|
14849
|
-
|
|
14850
|
-
while ((m =
|
|
14851
|
-
|
|
14859
|
+
FLD_SIMPLE_INSTR_SINGLE_RE.lastIndex = 0;
|
|
14860
|
+
while ((m = FLD_SIMPLE_INSTR_SINGLE_RE.exec(documentXml)) !== null) {
|
|
14861
|
+
scanFieldInstruction(decodeXmlAttribute(m[1] ?? ""), retained, () => {
|
|
14862
|
+
retainAllToc = true;
|
|
14863
|
+
});
|
|
14852
14864
|
}
|
|
14853
14865
|
retainRevisionBoundedBookmarks(documentXml, retained);
|
|
14854
14866
|
return {
|
|
@@ -14857,14 +14869,16 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
|
|
|
14857
14869
|
retainAll
|
|
14858
14870
|
};
|
|
14859
14871
|
}
|
|
14860
|
-
function
|
|
14861
|
-
|
|
14872
|
+
function scanFieldInstruction(instrText, retained, retainToc) {
|
|
14873
|
+
if (TOC_FIELD_RE.test(instrText)) retainToc();
|
|
14862
14874
|
REFLIKE_FIELD_RE.lastIndex = 0;
|
|
14863
14875
|
let r;
|
|
14864
14876
|
while ((r = REFLIKE_FIELD_RE.exec(instrText)) !== null) {
|
|
14865
14877
|
if (r[1]) retained.add(r[1]);
|
|
14866
14878
|
}
|
|
14867
|
-
|
|
14879
|
+
}
|
|
14880
|
+
function decodeXmlAttribute(value) {
|
|
14881
|
+
return value.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
14868
14882
|
}
|
|
14869
14883
|
function retainRevisionBoundedBookmarks(documentXml, retained) {
|
|
14870
14884
|
const starts = /* @__PURE__ */ new Map();
|
|
@@ -15217,18 +15231,23 @@ function parseNumberingXml(xml, context) {
|
|
|
15217
15231
|
const abstractDefinitions = {};
|
|
15218
15232
|
const instances = {};
|
|
15219
15233
|
const numPicBullets = {};
|
|
15234
|
+
const topLevelOrdinals = /* @__PURE__ */ new Map();
|
|
15220
15235
|
for (const child of numberingElement.children) {
|
|
15221
15236
|
if (child.type !== "element") {
|
|
15222
15237
|
continue;
|
|
15223
15238
|
}
|
|
15224
|
-
|
|
15239
|
+
const childName = localName(child.name);
|
|
15240
|
+
const childOrdinal = (topLevelOrdinals.get(childName) ?? 0) + 1;
|
|
15241
|
+
topLevelOrdinals.set(childName, childOrdinal);
|
|
15242
|
+
const childXmlPath = `/numbering[1]/${childName}[${childOrdinal}]`;
|
|
15243
|
+
if (childName === "numPicBullet") {
|
|
15225
15244
|
const rawId = readStringAttr(child, "w:numPicBulletId");
|
|
15226
15245
|
if (rawId) {
|
|
15227
|
-
numPicBullets[rawId] = readNumPicBullet(child, rawId, context);
|
|
15246
|
+
numPicBullets[rawId] = readNumPicBullet(child, rawId, context, childXmlPath);
|
|
15228
15247
|
}
|
|
15229
15248
|
continue;
|
|
15230
15249
|
}
|
|
15231
|
-
switch (
|
|
15250
|
+
switch (childName) {
|
|
15232
15251
|
case "abstractNum": {
|
|
15233
15252
|
const rawId = readStringAttr(child, "w:abstractNumId");
|
|
15234
15253
|
if (!rawId) {
|
|
@@ -15248,7 +15267,7 @@ function parseNumberingXml(xml, context) {
|
|
|
15248
15267
|
const numStyleLink = numStyleLinkEl ? readStringAttr(numStyleLinkEl, "w:val") : void 0;
|
|
15249
15268
|
abstractDefinitions[abstractNumberingId] = {
|
|
15250
15269
|
abstractNumberingId,
|
|
15251
|
-
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "abstractNum", rawId) } : {},
|
|
15270
|
+
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "abstractNum", rawId, childXmlPath) } : {},
|
|
15252
15271
|
levels: readLevels(child),
|
|
15253
15272
|
...nsid ? { nsid } : {},
|
|
15254
15273
|
...multiLevelType ? { multiLevelType } : {},
|
|
@@ -15268,7 +15287,7 @@ function parseNumberingXml(xml, context) {
|
|
|
15268
15287
|
const numberingInstanceId = toCanonicalNumberingInstanceId(rawId);
|
|
15269
15288
|
instances[numberingInstanceId] = {
|
|
15270
15289
|
numberingInstanceId,
|
|
15271
|
-
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "num", rawId) } : {},
|
|
15290
|
+
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "num", rawId, childXmlPath) } : {},
|
|
15272
15291
|
abstractNumberingId: toCanonicalAbstractNumberingId(rawAbstractId),
|
|
15273
15292
|
overrides: readOverrides(child)
|
|
15274
15293
|
};
|
|
@@ -15282,15 +15301,16 @@ function parseNumberingXml(xml, context) {
|
|
|
15282
15301
|
...Object.keys(numPicBullets).length > 0 ? { numPicBullets } : {}
|
|
15283
15302
|
};
|
|
15284
15303
|
}
|
|
15285
|
-
function createNumberingSourceRef(partPath, element, rawId) {
|
|
15304
|
+
function createNumberingSourceRef(partPath, element, rawId, xmlPath) {
|
|
15286
15305
|
return {
|
|
15287
15306
|
sourceId: `part:${partPath}#${element}:${rawId}`,
|
|
15288
15307
|
partPath,
|
|
15289
15308
|
storyKind: "numbering",
|
|
15290
|
-
element
|
|
15309
|
+
element,
|
|
15310
|
+
...xmlPath !== void 0 ? { xmlPath } : {}
|
|
15291
15311
|
};
|
|
15292
15312
|
}
|
|
15293
|
-
function readNumPicBullet(node, numPicBulletId, context) {
|
|
15313
|
+
function readNumPicBullet(node, numPicBulletId, context, xmlPath) {
|
|
15294
15314
|
let widthEmu;
|
|
15295
15315
|
let heightEmu;
|
|
15296
15316
|
let mediaId;
|
|
@@ -15353,6 +15373,7 @@ function readNumPicBullet(node, numPicBulletId, context) {
|
|
|
15353
15373
|
}
|
|
15354
15374
|
return {
|
|
15355
15375
|
numPicBulletId,
|
|
15376
|
+
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "numPicBullet", numPicBulletId, xmlPath) } : {},
|
|
15356
15377
|
rawXml: serializeXmlElementToString(node),
|
|
15357
15378
|
...widthEmu !== void 0 ? { widthEmu } : {},
|
|
15358
15379
|
...heightEmu !== void 0 ? { heightEmu } : {},
|
|
@@ -19325,7 +19346,11 @@ function parseBodyChild(node, sourceXml, relationshipMap, relationships, mediaPa
|
|
|
19325
19346
|
switch (localName(child.name)) {
|
|
19326
19347
|
case "pPr":
|
|
19327
19348
|
styleId = readParagraphStyleId(child);
|
|
19328
|
-
numbering = readParagraphNumbering(
|
|
19349
|
+
numbering = readParagraphNumbering(
|
|
19350
|
+
child,
|
|
19351
|
+
sourcePartPath,
|
|
19352
|
+
`${sourceXmlPath}/pPr[${countPriorElementSiblingsByName(node, child) + 1}]`
|
|
19353
|
+
);
|
|
19329
19354
|
alignment = readParagraphAlignment(child);
|
|
19330
19355
|
spacing = readParagraphSpacing2(child);
|
|
19331
19356
|
contextualSpacing = readOptionalOnOffParagraphProperty(child, "contextualSpacing");
|
|
@@ -20408,7 +20433,7 @@ function readParagraphStyleId(node) {
|
|
|
20408
20433
|
}
|
|
20409
20434
|
return void 0;
|
|
20410
20435
|
}
|
|
20411
|
-
function readParagraphNumbering(node, sourcePartPath) {
|
|
20436
|
+
function readParagraphNumbering(node, sourcePartPath, sourceXmlPath) {
|
|
20412
20437
|
const numberingProperties = node.children.find(
|
|
20413
20438
|
(child) => child.type === "element" && localName(child.name) === "numPr"
|
|
20414
20439
|
);
|
|
@@ -20428,16 +20453,22 @@ function readParagraphNumbering(node, sourcePartPath) {
|
|
|
20428
20453
|
}
|
|
20429
20454
|
return {
|
|
20430
20455
|
numberingInstanceId: toCanonicalNumberingInstanceId(rawInstanceId),
|
|
20431
|
-
sourceRef: createElementSourceRef(
|
|
20456
|
+
sourceRef: createElementSourceRef(
|
|
20457
|
+
sourcePartPath,
|
|
20458
|
+
"numPr",
|
|
20459
|
+
numberingProperties,
|
|
20460
|
+
sourceXmlPath !== void 0 ? `${sourceXmlPath}/numPr[${countPriorElementSiblingsByName(node, numberingProperties) + 1}]` : void 0
|
|
20461
|
+
),
|
|
20432
20462
|
level: Number.parseInt(rawLevel, 10)
|
|
20433
20463
|
};
|
|
20434
20464
|
}
|
|
20435
|
-
function createElementSourceRef(partPath, element, node) {
|
|
20465
|
+
function createElementSourceRef(partPath, element, node, xmlPath) {
|
|
20436
20466
|
return {
|
|
20437
20467
|
sourceId: `part:${partPath}#${element}:${node.start}`,
|
|
20438
20468
|
partPath,
|
|
20439
20469
|
storyKind: storyKindFromPartPath(partPath),
|
|
20440
20470
|
element,
|
|
20471
|
+
...xmlPath !== void 0 ? { xmlPath } : {},
|
|
20441
20472
|
startOffset: node.start,
|
|
20442
20473
|
endOffset: node.end
|
|
20443
20474
|
};
|
package/dist/session.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { D as DocxSession, S as SessionNotOpenError, a as SessionNotWiredError } from './session-
|
|
2
|
-
export { L as LoadedDocxEditorSession, l as loadDocxSessionAsync } from './loader-
|
|
3
|
-
export { E as EmbeddedDocumentManifest, a as ExportOptions, O as OpenOptions, b as OpenResult, P as PreservationSnapshot, R as ReopenBarrier, V as ValidateOptions, c as ValidationFinding, d as ValidationReport, i as isReopenBarrier } from './types-
|
|
4
|
-
export { E as EditorHostAdapter, a as EditorSessionState, b as ExportDocxOptions, c as ExportResult, L as LoadStage, P as PersistedEditorSnapshot } from './public-types-
|
|
5
|
-
import './canonical-document-
|
|
1
|
+
export { D as DocxSession, S as SessionNotOpenError, a as SessionNotWiredError } from './session-Cq-fzx3B.cjs';
|
|
2
|
+
export { L as LoadedDocxEditorSession, l as loadDocxSessionAsync } from './loader-OoWJ1_17.cjs';
|
|
3
|
+
export { E as EmbeddedDocumentManifest, a as ExportOptions, O as OpenOptions, b as OpenResult, P as PreservationSnapshot, R as ReopenBarrier, V as ValidateOptions, c as ValidationFinding, d as ValidationReport, i as isReopenBarrier } from './types-Bg7D-GD3.cjs';
|
|
4
|
+
export { E as EditorHostAdapter, a as EditorSessionState, b as ExportDocxOptions, c as ExportResult, L as LoadStage, P as PersistedEditorSnapshot } from './public-types-BP3vqJR5.cjs';
|
|
5
|
+
import './canonical-document-CXCFCbAz.cjs';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'yjs';
|
|
8
8
|
import 'y-protocols/awareness';
|
package/dist/session.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { D as DocxSession, S as SessionNotOpenError, a as SessionNotWiredError } from './session-
|
|
2
|
-
export { L as LoadedDocxEditorSession, l as loadDocxSessionAsync } from './loader-
|
|
3
|
-
export { E as EmbeddedDocumentManifest, a as ExportOptions, O as OpenOptions, b as OpenResult, P as PreservationSnapshot, R as ReopenBarrier, V as ValidateOptions, c as ValidationFinding, d as ValidationReport, i as isReopenBarrier } from './types-
|
|
4
|
-
export { E as EditorHostAdapter, a as EditorSessionState, b as ExportDocxOptions, c as ExportResult, L as LoadStage, P as PersistedEditorSnapshot } from './public-types-
|
|
5
|
-
import './canonical-document-
|
|
1
|
+
export { D as DocxSession, S as SessionNotOpenError, a as SessionNotWiredError } from './session-DyFQt8Ph.js';
|
|
2
|
+
export { L as LoadedDocxEditorSession, l as loadDocxSessionAsync } from './loader-CS9-9KFa.js';
|
|
3
|
+
export { E as EmbeddedDocumentManifest, a as ExportOptions, O as OpenOptions, b as OpenResult, P as PreservationSnapshot, R as ReopenBarrier, V as ValidateOptions, c as ValidationFinding, d as ValidationReport, i as isReopenBarrier } from './types-bJAgMq1M.js';
|
|
4
|
+
export { E as EditorHostAdapter, a as EditorSessionState, b as ExportDocxOptions, c as ExportResult, L as LoadStage, P as PersistedEditorSnapshot } from './public-types-DdcHqcow.js';
|
|
5
|
+
import './canonical-document-CXCFCbAz.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'yjs';
|
|
8
8
|
import 'y-protocols/awareness';
|
package/dist/session.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
SessionNotOpenError,
|
|
4
4
|
SessionNotWiredError,
|
|
5
5
|
isReopenBarrier
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TQDQU2E3.js";
|
|
7
7
|
import {
|
|
8
8
|
loadDocxSessionAsync
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-V6XVZFFH.js";
|
|
10
|
+
import "./chunk-ESJ2MES5.js";
|
|
11
|
+
import "./chunk-4YJVRIUB.js";
|
|
12
12
|
import "./chunk-4BJ6K26R.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-5DGKFNQT.js";
|
|
14
14
|
import "./chunk-OL2UEHRP.js";
|
|
15
15
|
import "./chunk-EB6M3GE6.js";
|
|
16
16
|
import "./chunk-IHE7YOAY.js";
|