@beyondwork/docx-react-component 1.0.122 → 1.0.124
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 +318 -32
- 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 +351 -56
- 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-ByIqTd4s.d.cts → canonical-document-CG2TgAzj.d.cts} +1 -1
- package/dist/{canonical-document-ByIqTd4s.d.ts → canonical-document-CG2TgAzj.d.ts} +1 -1
- package/dist/{chunk-B4YHWFE3.js → chunk-32ZAOQ54.js} +1 -1
- package/dist/{chunk-EMDH4IQN.js → chunk-4B74ETJI.js} +4 -3
- package/dist/{chunk-QNGJRZ2D.js → chunk-4IPEZYQX.js} +1 -1
- package/dist/{chunk-S4ANOS2M.js → chunk-7PC6XUNO.js} +2 -2
- package/dist/{chunk-TMU7JMXX.js → chunk-A74Y5NE4.js} +11 -15
- package/dist/{chunk-3OFSP2IX.js → chunk-BOHHIVQ2.js} +3 -3
- package/dist/{chunk-TFSXOIAI.js → chunk-FNWKE74J.js} +43 -3
- package/dist/{chunk-3TUQCHYT.js → chunk-H6IL5ABU.js} +47 -7
- package/dist/{chunk-GON2DNTE.js → chunk-HXHQA4BU.js} +1 -1
- package/dist/{chunk-3OHVK2D6.js → chunk-IR7QV2BX.js} +17 -1
- package/dist/{chunk-ZKSDVHGH.js → chunk-KOHQFZMM.js} +1 -1
- package/dist/{chunk-XVFENXLK.js → chunk-LGWNN3L2.js} +2 -2
- package/dist/{chunk-UHQOUTAX.js → chunk-MPH4ZQS4.js} +377 -50
- package/dist/{chunk-GZW2ERUO.js → chunk-N4VIXI2Z.js} +3 -3
- package/dist/{chunk-OBCP6VTG.js → chunk-NAMAWCXN.js} +1 -1
- package/dist/{chunk-QFU7ZOAD.js → chunk-PFYUJU3Q.js} +176 -36
- package/dist/{chunk-PCXTMEGY.js → chunk-Q76XPPTA.js} +24 -14
- package/dist/{chunk-37SEJQ3G.js → chunk-RSYN6FTS.js} +2 -2
- package/dist/{chunk-UWDWGQH5.js → chunk-TY4DIJO3.js} +1 -1
- package/dist/{chunk-IT2DK3A7.js → chunk-ZMRO6P3A.js} +9 -7
- package/dist/{chunk-G3B2OBCZ.js → chunk-ZRHLLPSJ.js} +271 -26
- 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 +50 -9
- 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 +50 -9
- 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 -9
- package/dist/core/commands/text-commands.d.cts +3 -2
- package/dist/core/commands/text-commands.d.ts +3 -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 +1198 -191
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +278 -85
- package/dist/io/docx-session.cjs +12 -15
- 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 +10 -14
- package/dist/legal.d.cts +1 -1
- package/dist/legal.d.ts +1 -1
- package/dist/legal.js +3 -3
- package/dist/{loader-BF8ju_LK.d.ts → loader-D9KCtj4m.d.cts} +4 -22
- package/dist/{loader-g54WRvj1.d.cts → loader-D9y4ZRjj.d.ts} +4 -22
- package/dist/{public-types-Dl1jiWjk.d.ts → public-types-CNnMHZM9.d.ts} +263 -213
- package/dist/{public-types-D_y4Ptcj.d.cts → public-types-DajNGKV4.d.cts} +263 -213
- package/dist/public-types.cjs +318 -32
- 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 +752 -77
- 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-C1EPAkcI.d.ts → session-DEmaOEjA.d.ts} +3 -3
- package/dist/{session-D15QOO0Q.d.cts → session-DyQGlryH.d.cts} +3 -3
- package/dist/session.cjs +14 -612
- package/dist/session.d.cts +5 -5
- package/dist/session.d.ts +5 -5
- package/dist/session.js +7 -9
- package/dist/tailwind.cjs +489 -63
- package/dist/tailwind.d.cts +2 -2
- package/dist/tailwind.d.ts +2 -2
- package/dist/tailwind.js +7 -7
- package/dist/{types-BoSRp2Vg.d.cts → types-CxE1aZiv.d.cts} +2 -2
- package/dist/{types-DEvRwq9C.d.ts → types-DjJNaE9c.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/theme/tokens.css +387 -0
- package/dist/ui-tailwind.cjs +489 -63
- 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 +7 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { R as RevisionStoryTargetRecord, O as OpaqueFragmentRecord } from '../canonical-document-
|
|
3
|
-
import { a$ as EditorAnchorProjection } from '../public-types-
|
|
4
|
-
import '../types-
|
|
1
|
+
export { a as LoadDocxEditorSessionAsyncOptions, b as LoadDocxEditorSessionOptions, L as LoadedDocxEditorSession, l as loadDocxEditorSessionAsync } from '../loader-D9KCtj4m.cjs';
|
|
2
|
+
import { R as RevisionStoryTargetRecord, O as OpaqueFragmentRecord } from '../canonical-document-CG2TgAzj.cjs';
|
|
3
|
+
import { a$ as EditorAnchorProjection } from '../public-types-DajNGKV4.cjs';
|
|
4
|
+
import '../types-CxE1aZiv.cjs';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'yjs';
|
|
7
7
|
import 'y-protocols/awareness';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { R as RevisionStoryTargetRecord, O as OpaqueFragmentRecord } from '../canonical-document-
|
|
3
|
-
import { a$ as EditorAnchorProjection } from '../public-types-
|
|
4
|
-
import '../types-
|
|
1
|
+
export { a as LoadDocxEditorSessionAsyncOptions, b as LoadDocxEditorSessionOptions, L as LoadedDocxEditorSession, l as loadDocxEditorSessionAsync } from '../loader-D9y4ZRjj.js';
|
|
2
|
+
import { R as RevisionStoryTargetRecord, O as OpaqueFragmentRecord } from '../canonical-document-CG2TgAzj.js';
|
|
3
|
+
import { a$ as EditorAnchorProjection } from '../public-types-CNnMHZM9.js';
|
|
4
|
+
import '../types-DjJNaE9c.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'yjs';
|
|
7
7
|
import 'y-protocols/awareness';
|
package/dist/io/docx-session.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
loadDocxSessionAsync,
|
|
3
3
|
normalizeImportedCommentThreads,
|
|
4
4
|
stripCommentMarkup
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-4B74ETJI.js";
|
|
6
|
+
import "../chunk-TY4DIJO3.js";
|
|
7
|
+
import "../chunk-A74Y5NE4.js";
|
|
8
8
|
import "../chunk-4BJ6K26R.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-FNWKE74J.js";
|
|
10
10
|
import "../chunk-OL2UEHRP.js";
|
|
11
11
|
import "../chunk-EB6M3GE6.js";
|
|
12
12
|
import "../chunk-IHE7YOAY.js";
|
package/dist/legal.cjs
CHANGED
|
@@ -1017,7 +1017,7 @@ var SCOPE_MARKER_BOOKMARK_PREFIX = "bw:scope:";
|
|
|
1017
1017
|
// src/io/ooxml/parse-bookmark-references.ts
|
|
1018
1018
|
var HYPERLINK_ANCHOR_RE = /<(?:\w+:)?hyperlink\b[^>]*\bw:anchor\s*=\s*"([^"]*)"/gi;
|
|
1019
1019
|
var INSTR_TEXT_RE = /<(?:\w+:)?instrText\b[^>]*>([\s\S]*?)<\/(?:\w+:)?instrText>/gi;
|
|
1020
|
-
var
|
|
1020
|
+
var FLD_SIMPLE_INSTR_RE = /<(?:\w+:)?fldSimple\b[^>]*(?:\bw:instr|\binstr)\s*=\s*(["'])([\s\S]*?)\1/gi;
|
|
1021
1021
|
var TOC_FIELD_RE = /\bTOC\b/;
|
|
1022
1022
|
var REFLIKE_FIELD_RE = /\b(?:HYPERLINK|REF|PAGEREF|NOTEREF)\s+([A-Za-z0-9_:.\-]+)/g;
|
|
1023
1023
|
var DATA_BINDING_RE = /<(?:\w+:)?dataBinding\b/i;
|
|
@@ -1036,15 +1036,11 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
INSTR_TEXT_RE.lastIndex = 0;
|
|
1038
1038
|
while ((m = INSTR_TEXT_RE.exec(documentXml)) !== null) {
|
|
1039
|
-
if (
|
|
1040
|
-
retainAllToc = true;
|
|
1041
|
-
}
|
|
1039
|
+
if (scanInstructionText(m[1] ?? "", retained)) retainAllToc = true;
|
|
1042
1040
|
}
|
|
1043
|
-
|
|
1044
|
-
while ((m =
|
|
1045
|
-
if (
|
|
1046
|
-
retainAllToc = true;
|
|
1047
|
-
}
|
|
1041
|
+
FLD_SIMPLE_INSTR_RE.lastIndex = 0;
|
|
1042
|
+
while ((m = FLD_SIMPLE_INSTR_RE.exec(documentXml)) !== null) {
|
|
1043
|
+
if (scanInstructionText(m[2] ?? "", retained)) retainAllToc = true;
|
|
1048
1044
|
}
|
|
1049
1045
|
retainRevisionBoundedBookmarks(documentXml, retained);
|
|
1050
1046
|
return {
|
|
@@ -1053,11 +1049,11 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
|
|
|
1053
1049
|
retainAll
|
|
1054
1050
|
};
|
|
1055
1051
|
}
|
|
1056
|
-
function
|
|
1057
|
-
const hasTocField = TOC_FIELD_RE.test(
|
|
1052
|
+
function scanInstructionText(instrText, retained) {
|
|
1053
|
+
const hasTocField = TOC_FIELD_RE.test(instrText);
|
|
1058
1054
|
REFLIKE_FIELD_RE.lastIndex = 0;
|
|
1059
1055
|
let r;
|
|
1060
|
-
while ((r = REFLIKE_FIELD_RE.exec(
|
|
1056
|
+
while ((r = REFLIKE_FIELD_RE.exec(instrText)) !== null) {
|
|
1061
1057
|
if (r[1]) retained.add(r[1]);
|
|
1062
1058
|
}
|
|
1063
1059
|
return hasTocField;
|
|
@@ -3863,7 +3859,7 @@ var SAFE_TABLE_FIELD_FAMILIES = /* @__PURE__ */ new Set([
|
|
|
3863
3859
|
"FORMULA"
|
|
3864
3860
|
]);
|
|
3865
3861
|
var RISKY_TABLE_MARKUP_RE = /<w:(ins|del|moveFrom|moveTo|rPrChange|pPrChange|tblPrChange|trPrChange|tcPrChange|sectPrChange|cellIns|cellDel|cellMerge|smartTag)\b/;
|
|
3866
|
-
var
|
|
3862
|
+
var SIMPLE_FIELD_INSTR_RE = /\bw:instr="([^"]*)"/g;
|
|
3867
3863
|
var COMPLEX_FIELD_TOKEN_RE = /<(?:\w+:)?fldChar\b[^>]*?(?:\w+:)?fldCharType="(begin|separate|end)"[^>]*?(?:\/>|>[\s\S]*?<\/(?:\w+:)?fldChar>)|<(?:\w+:)?instrText\b[^>]*>([\s\S]*?)<\/(?:\w+:)?instrText>/gu;
|
|
3868
3864
|
function decodeXmlEntities2(text) {
|
|
3869
3865
|
return text.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&");
|
|
@@ -3904,7 +3900,7 @@ function isSafeTableFieldInstruction(instruction) {
|
|
|
3904
3900
|
}
|
|
3905
3901
|
function tableRequiresOpaquePreservation(rawXml) {
|
|
3906
3902
|
if (RISKY_TABLE_MARKUP_RE.test(rawXml)) return true;
|
|
3907
|
-
const simpleInstructions = [...rawXml.matchAll(
|
|
3903
|
+
const simpleInstructions = [...rawXml.matchAll(SIMPLE_FIELD_INSTR_RE)].map(
|
|
3908
3904
|
(match) => match[1] ?? ""
|
|
3909
3905
|
);
|
|
3910
3906
|
const complexInstructions = extractComplexFieldInstructionsFromRaw(rawXml);
|
package/dist/legal.d.cts
CHANGED
package/dist/legal.d.ts
CHANGED
package/dist/legal.js
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
isHiddenBookmarkName,
|
|
5
5
|
parseBookmarksFromDocumentXml,
|
|
6
6
|
resolveWalkableRoot
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NAMAWCXN.js";
|
|
8
8
|
import {
|
|
9
9
|
extractComplexFieldsFromBodyXml,
|
|
10
10
|
parseFieldsFromParagraphXml,
|
|
11
11
|
parseMainDocumentXml
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-A74Y5NE4.js";
|
|
13
|
+
import "./chunk-FNWKE74J.js";
|
|
14
14
|
import "./chunk-IHE7YOAY.js";
|
|
15
15
|
import "./chunk-UTL65BUI.js";
|
|
16
16
|
import "./chunk-DNXYUIIS.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CanonicalDocument } from './canonical-document-
|
|
2
|
-
import { ar as EditorStateNamespace, as as EditorStateLocation, a as EditorSessionState, P as PersistedEditorSnapshot, r as EditorError, t as ProtectionSnapshot, b as ExportDocxOptions, c as ExportResult, L as LoadStage, E as EditorHostAdapter, at as LoadScheduler, o as EditorSurfaceSnapshot } from './public-types-
|
|
3
|
-
import { E as EmbeddedDocumentManifest, e as ProgressiveSurfaceProjector } from './types-
|
|
1
|
+
import { C as CanonicalDocument } from './canonical-document-CG2TgAzj.cjs';
|
|
2
|
+
import { ar as EditorStateNamespace, as as EditorStateLocation, a as EditorSessionState, P as PersistedEditorSnapshot, r as EditorError, t as ProtectionSnapshot, b as ExportDocxOptions, c as ExportResult, L as LoadStage, E as EditorHostAdapter, at as LoadScheduler, o as EditorSurfaceSnapshot } from './public-types-DajNGKV4.cjs';
|
|
3
|
+
import { E as EmbeddedDocumentManifest, e as ProgressiveSurfaceProjector } from './types-CxE1aZiv.cjs';
|
|
4
4
|
|
|
5
5
|
interface EditorStatePayloadNamespaceEntry {
|
|
6
6
|
namespace: EditorStateNamespace;
|
|
@@ -271,23 +271,5 @@ interface LoadedDocxEditorSession {
|
|
|
271
271
|
* `src/session/export/stateful-export.ts` and is imported directly.
|
|
272
272
|
*/
|
|
273
273
|
declare function loadDocxSessionAsync(options: LoadDocxEditorSessionAsyncOptions): Promise<LoadedDocxEditorSession>;
|
|
274
|
-
/**
|
|
275
|
-
* Session-layer owner of the sync load path.
|
|
276
|
-
*
|
|
277
|
-
* Slice 5e-7.e.2 relocates the body of `loadDocxEditorSession` from
|
|
278
|
-
* `src/io/docx-session.ts` into this module. Body mirrors
|
|
279
|
-
* `loadDocxSessionAsync` minus the async-only orchestration shell:
|
|
280
|
-
* - No `scheduler.yield()` calls (sync execution).
|
|
281
|
-
* - No laycache short-circuit branch (`laycacheEnvelope` is not on
|
|
282
|
-
* `LoadDocxEditorSessionOptions`).
|
|
283
|
-
* - No progressive-snapshot branch (`onProgressiveSnapshot` /
|
|
284
|
-
* `surfaceProjector` not on `LoadDocxEditorSessionOptions`).
|
|
285
|
-
* - Uses `normalizeParsedTextDocument` (sync).
|
|
286
|
-
*
|
|
287
|
-
* Byte-equivalence with the async path is asserted by
|
|
288
|
-
* `test/io/fastload-parity.test.ts` on every F*.docx fixture. Drift
|
|
289
|
-
* between the two sync/async bodies will fail that test.
|
|
290
|
-
*/
|
|
291
|
-
declare function loadDocxSessionSync(options: LoadDocxEditorSessionOptions): LoadedDocxEditorSession;
|
|
292
274
|
|
|
293
|
-
export { type LoadedDocxEditorSession as L,
|
|
275
|
+
export { type LoadedDocxEditorSession as L, type LoadDocxEditorSessionAsyncOptions as a, type LoadDocxEditorSessionOptions as b, loadDocxSessionAsync as l };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CanonicalDocument } from './canonical-document-
|
|
2
|
-
import { ar as EditorStateNamespace, as as EditorStateLocation, a as EditorSessionState, P as PersistedEditorSnapshot, r as EditorError, t as ProtectionSnapshot, b as ExportDocxOptions, c as ExportResult, L as LoadStage, E as EditorHostAdapter, at as LoadScheduler, o as EditorSurfaceSnapshot } from './public-types-
|
|
3
|
-
import { E as EmbeddedDocumentManifest, e as ProgressiveSurfaceProjector } from './types-
|
|
1
|
+
import { C as CanonicalDocument } from './canonical-document-CG2TgAzj.js';
|
|
2
|
+
import { ar as EditorStateNamespace, as as EditorStateLocation, a as EditorSessionState, P as PersistedEditorSnapshot, r as EditorError, t as ProtectionSnapshot, b as ExportDocxOptions, c as ExportResult, L as LoadStage, E as EditorHostAdapter, at as LoadScheduler, o as EditorSurfaceSnapshot } from './public-types-CNnMHZM9.js';
|
|
3
|
+
import { E as EmbeddedDocumentManifest, e as ProgressiveSurfaceProjector } from './types-DjJNaE9c.js';
|
|
4
4
|
|
|
5
5
|
interface EditorStatePayloadNamespaceEntry {
|
|
6
6
|
namespace: EditorStateNamespace;
|
|
@@ -271,23 +271,5 @@ interface LoadedDocxEditorSession {
|
|
|
271
271
|
* `src/session/export/stateful-export.ts` and is imported directly.
|
|
272
272
|
*/
|
|
273
273
|
declare function loadDocxSessionAsync(options: LoadDocxEditorSessionAsyncOptions): Promise<LoadedDocxEditorSession>;
|
|
274
|
-
/**
|
|
275
|
-
* Session-layer owner of the sync load path.
|
|
276
|
-
*
|
|
277
|
-
* Slice 5e-7.e.2 relocates the body of `loadDocxEditorSession` from
|
|
278
|
-
* `src/io/docx-session.ts` into this module. Body mirrors
|
|
279
|
-
* `loadDocxSessionAsync` minus the async-only orchestration shell:
|
|
280
|
-
* - No `scheduler.yield()` calls (sync execution).
|
|
281
|
-
* - No laycache short-circuit branch (`laycacheEnvelope` is not on
|
|
282
|
-
* `LoadDocxEditorSessionOptions`).
|
|
283
|
-
* - No progressive-snapshot branch (`onProgressiveSnapshot` /
|
|
284
|
-
* `surfaceProjector` not on `LoadDocxEditorSessionOptions`).
|
|
285
|
-
* - Uses `normalizeParsedTextDocument` (sync).
|
|
286
|
-
*
|
|
287
|
-
* Byte-equivalence with the async path is asserted by
|
|
288
|
-
* `test/io/fastload-parity.test.ts` on every F*.docx fixture. Drift
|
|
289
|
-
* between the two sync/async bodies will fail that test.
|
|
290
|
-
*/
|
|
291
|
-
declare function loadDocxSessionSync(options: LoadDocxEditorSessionOptions): LoadedDocxEditorSession;
|
|
292
274
|
|
|
293
|
-
export { type LoadedDocxEditorSession as L,
|
|
275
|
+
export { type LoadedDocxEditorSession as L, type LoadDocxEditorSessionAsyncOptions as a, type LoadDocxEditorSessionOptions as b, loadDocxSessionAsync as l };
|