@beyondwork/docx-react-component 1.0.133 → 1.0.135
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 +23 -3
- package/dist/api/public-types.d.cts +1 -1
- package/dist/api/public-types.d.ts +1 -1
- package/dist/api/public-types.js +2 -2
- package/dist/api/v3.cjs +708 -47
- package/dist/api/v3.d.cts +2 -2
- package/dist/api/v3.d.ts +2 -2
- package/dist/api/v3.js +4 -4
- package/dist/{chunk-REFHJ2FN.js → chunk-2BNXARVO.js} +3 -3
- package/dist/{chunk-INLRCC4N.js → chunk-4CIHTMCH.js} +2 -2
- package/dist/{chunk-224TSMEB.js → chunk-5CCYF333.js} +138 -42
- package/dist/{chunk-MQ5GAJ54.js → chunk-BJXSMPHD.js} +1 -1
- package/dist/{chunk-OTRVGNZQ.js → chunk-EPFVMUKF.js} +548 -3
- package/dist/{chunk-XBQFDBXE.js → chunk-EZFF6GKF.js} +9 -2
- package/dist/{chunk-S3PEKX6H.js → chunk-FGJTOFZY.js} +72 -554
- package/dist/{chunk-3JEE5RJU.js → chunk-GIFXKIM5.js} +612 -34
- package/dist/{chunk-57HTKX3P.js → chunk-H4HI6RUE.js} +1 -1
- package/dist/{chunk-KL4TZSZV.js → chunk-HWMPNLEF.js} +1 -1
- package/dist/{chunk-ZFCZ7XXH.js → chunk-NEMOQ4QR.js} +1 -1
- package/dist/{chunk-CVSD3UNK.js → chunk-P7XDEVS6.js} +15 -2
- package/dist/{chunk-QTRJLKR2.js → chunk-TSNK4ECL.js} +1 -1
- package/dist/{chunk-WDDFU2N2.js → chunk-UR2LW63N.js} +1 -1
- package/dist/core/commands/formatting-commands.d.cts +1 -1
- package/dist/core/commands/formatting-commands.d.ts +1 -1
- package/dist/core/commands/image-commands.cjs +9 -2
- package/dist/core/commands/image-commands.d.cts +1 -1
- package/dist/core/commands/image-commands.d.ts +1 -1
- package/dist/core/commands/image-commands.js +4 -4
- package/dist/core/commands/section-layout-commands.d.cts +1 -1
- package/dist/core/commands/section-layout-commands.d.ts +1 -1
- package/dist/core/commands/style-commands.d.cts +1 -1
- package/dist/core/commands/style-commands.d.ts +1 -1
- package/dist/core/commands/table-structure-commands.cjs +9 -2
- package/dist/core/commands/table-structure-commands.d.cts +1 -1
- package/dist/core/commands/table-structure-commands.d.ts +1 -1
- package/dist/core/commands/table-structure-commands.js +3 -3
- package/dist/core/commands/text-commands.cjs +9 -2
- package/dist/core/commands/text-commands.d.cts +1 -1
- package/dist/core/commands/text-commands.d.ts +1 -1
- package/dist/core/commands/text-commands.js +4 -4
- package/dist/core/selection/mapping.d.cts +1 -1
- package/dist/core/selection/mapping.d.ts +1 -1
- package/dist/core/state/editor-state.d.cts +1 -1
- package/dist/core/state/editor-state.d.ts +1 -1
- package/dist/index.cjs +1478 -636
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +113 -26
- package/dist/io/docx-session.d.cts +3 -3
- package/dist/io/docx-session.d.ts +3 -3
- package/dist/{loader-B2H99237.d.cts → loader-BQ7AB-0v.d.cts} +2 -2
- package/dist/{loader-DfTjqVwn.d.ts → loader-Cy6OYBfn.d.ts} +2 -2
- package/dist/{public-types-S8gTYwKo.d.cts → public-types-D31xKNGc.d.cts} +146 -3
- package/dist/{public-types-B5lOUIrP.d.ts → public-types-DqYt8GdP.d.ts} +146 -3
- package/dist/public-types.cjs +23 -3
- package/dist/public-types.d.cts +1 -1
- package/dist/public-types.d.ts +1 -1
- package/dist/public-types.js +2 -2
- package/dist/runtime/collab.d.cts +2 -2
- package/dist/runtime/collab.d.ts +2 -2
- package/dist/runtime/document-runtime.cjs +760 -68
- package/dist/runtime/document-runtime.d.cts +1 -1
- package/dist/runtime/document-runtime.d.ts +1 -1
- package/dist/runtime/document-runtime.js +10 -10
- package/dist/{session-CR2A1hGZ.d.cts → session-DA-F2fCw.d.cts} +2 -2
- package/dist/{session-CBDIOYXA.d.ts → session-DqL8H0oZ.d.ts} +2 -2
- package/dist/session.d.cts +4 -4
- package/dist/session.d.ts +4 -4
- package/dist/tailwind.cjs +81 -554
- package/dist/tailwind.d.cts +1 -1
- package/dist/tailwind.d.ts +1 -1
- package/dist/tailwind.js +5 -5
- package/dist/{types-yty2K-hk.d.cts → types-B2y94n5t.d.cts} +1 -1
- package/dist/{types-B-90ywjU.d.ts → types-SllbCtGs.d.ts} +1 -1
- package/dist/ui-tailwind/editor-surface/search-plugin.cjs +11 -0
- package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +2 -2
- package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +2 -2
- package/dist/ui-tailwind/editor-surface/search-plugin.js +3 -3
- package/dist/ui-tailwind.cjs +81 -554
- package/dist/ui-tailwind.d.cts +2 -2
- package/dist/ui-tailwind.d.ts +2 -2
- package/dist/ui-tailwind.js +5 -5
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
parseTextStory
|
|
13
13
|
} from "./chunk-QIO6V46H.js";
|
|
14
14
|
import {
|
|
15
|
+
NO_EDITABLE_TARGETS_INDEX,
|
|
15
16
|
createEditorSurfaceSnapshot,
|
|
16
17
|
formatPageNumber,
|
|
17
18
|
formatPageNumberWithChapter,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
resolveSectionVariants,
|
|
20
21
|
sectionSupportsStoryTarget,
|
|
21
22
|
storyTargetKey
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EZFF6GKF.js";
|
|
23
24
|
import {
|
|
24
25
|
createSelectionSnapshot
|
|
25
26
|
} from "./chunk-OYGMRRR7.js";
|
|
@@ -2176,7 +2177,8 @@ function buildResolvedSections(document2) {
|
|
|
2176
2177
|
const mainSurface = createEditorSurfaceSnapshot(
|
|
2177
2178
|
document2,
|
|
2178
2179
|
createSelectionSnapshot(0, 0),
|
|
2179
|
-
MAIN_STORY_TARGET
|
|
2180
|
+
MAIN_STORY_TARGET,
|
|
2181
|
+
{ editableTargetsByBlockPath: NO_EDITABLE_TARGETS_INDEX }
|
|
2180
2182
|
);
|
|
2181
2183
|
const sections = [];
|
|
2182
2184
|
let sectionStart = 0;
|
|
@@ -8996,6 +8998,8 @@ function buildSearchPattern(query, options = {}) {
|
|
|
8996
8998
|
function findSearchMatches(text, query, options = {}) {
|
|
8997
8999
|
const pattern = buildSearchPattern(query, options);
|
|
8998
9000
|
if (!pattern) return [];
|
|
9001
|
+
const limit = normalizeSearchLimit(options.limit);
|
|
9002
|
+
if (limit === 0) return [];
|
|
8999
9003
|
const results = [];
|
|
9000
9004
|
let match;
|
|
9001
9005
|
pattern.lastIndex = 0;
|
|
@@ -9006,12 +9010,21 @@ function findSearchMatches(text, query, options = {}) {
|
|
|
9006
9010
|
text: match[0],
|
|
9007
9011
|
index: results.length
|
|
9008
9012
|
});
|
|
9013
|
+
if (results.length >= limit) {
|
|
9014
|
+
break;
|
|
9015
|
+
}
|
|
9009
9016
|
if (match[0].length === 0) {
|
|
9010
9017
|
pattern.lastIndex += 1;
|
|
9011
9018
|
}
|
|
9012
9019
|
}
|
|
9013
9020
|
return results;
|
|
9014
9021
|
}
|
|
9022
|
+
function normalizeSearchLimit(limit) {
|
|
9023
|
+
if (limit === void 0 || !Number.isFinite(limit)) {
|
|
9024
|
+
return Number.POSITIVE_INFINITY;
|
|
9025
|
+
}
|
|
9026
|
+
return Math.max(0, Math.floor(limit));
|
|
9027
|
+
}
|
|
9015
9028
|
function createSearchExcerpt(text, from, to, radius = 24) {
|
|
9016
9029
|
const safeFrom = Math.max(0, Math.min(from, text.length));
|
|
9017
9030
|
const safeTo = Math.max(safeFrom, Math.min(to, text.length));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'prosemirror-state';
|
|
2
2
|
import 'prosemirror-model';
|
|
3
|
-
export { gc as Alignment, gd as FormattingMutationResult, ge as FormattingOperation, gf as TextMarkClearTarget, gg as TextMarkRangeOperation, gh as applyFormattingOperationToDocument, gi as applyIndentation, gj as applyTextMarkOperationToDocumentRange, gk as getFormattingStateFromRenderSnapshot, gl as isMarkActive, gm as makeSetAlignment, gn as makeSetFontFamily, go as makeSetFontSize, gp as makeSetHighlight, gq as makeSetTextColor, gr as makeToggleAllCaps, gs as makeToggleBold, gt as makeToggleItalic, gu as makeToggleSmallCaps, gv as makeToggleStrikethrough, gw as makeToggleSubscript, gx as makeToggleSuperscript, gy as makeToggleUnderline } from '../../public-types-
|
|
3
|
+
export { gc as Alignment, gd as FormattingMutationResult, ge as FormattingOperation, gf as TextMarkClearTarget, gg as TextMarkRangeOperation, gh as applyFormattingOperationToDocument, gi as applyIndentation, gj as applyTextMarkOperationToDocumentRange, gk as getFormattingStateFromRenderSnapshot, gl as isMarkActive, gm as makeSetAlignment, gn as makeSetFontFamily, go as makeSetFontSize, gp as makeSetHighlight, gq as makeSetTextColor, gr as makeToggleAllCaps, gs as makeToggleBold, gt as makeToggleItalic, gu as makeToggleSmallCaps, gv as makeToggleStrikethrough, gw as makeToggleSubscript, gx as makeToggleSuperscript, gy as makeToggleUnderline } from '../../public-types-D31xKNGc.cjs';
|
|
4
4
|
import '../../canonical-document-CfZIc-fC.cjs';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'yjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'prosemirror-state';
|
|
2
2
|
import 'prosemirror-model';
|
|
3
|
-
export { gc as Alignment, gd as FormattingMutationResult, ge as FormattingOperation, gf as TextMarkClearTarget, gg as TextMarkRangeOperation, gh as applyFormattingOperationToDocument, gi as applyIndentation, gj as applyTextMarkOperationToDocumentRange, gk as getFormattingStateFromRenderSnapshot, gl as isMarkActive, gm as makeSetAlignment, gn as makeSetFontFamily, go as makeSetFontSize, gp as makeSetHighlight, gq as makeSetTextColor, gr as makeToggleAllCaps, gs as makeToggleBold, gt as makeToggleItalic, gu as makeToggleSmallCaps, gv as makeToggleStrikethrough, gw as makeToggleSubscript, gx as makeToggleSuperscript, gy as makeToggleUnderline } from '../../public-types-
|
|
3
|
+
export { gc as Alignment, gd as FormattingMutationResult, ge as FormattingOperation, gf as TextMarkClearTarget, gg as TextMarkRangeOperation, gh as applyFormattingOperationToDocument, gi as applyIndentation, gj as applyTextMarkOperationToDocumentRange, gk as getFormattingStateFromRenderSnapshot, gl as isMarkActive, gm as makeSetAlignment, gn as makeSetFontFamily, go as makeSetFontSize, gp as makeSetHighlight, gq as makeSetTextColor, gr as makeToggleAllCaps, gs as makeToggleBold, gt as makeToggleItalic, gu as makeToggleSmallCaps, gv as makeToggleStrikethrough, gw as makeToggleSubscript, gx as makeToggleSuperscript, gy as makeToggleUnderline } from '../../public-types-DqYt8GdP.js';
|
|
4
4
|
import '../../canonical-document-CfZIc-fC.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'yjs';
|
|
@@ -5315,10 +5315,16 @@ var FormattingContextImpl = class {
|
|
|
5315
5315
|
// surface-projection calls `resolveParagraphCascade` on the same
|
|
5316
5316
|
// paragraph via `resolveParagraph` + numbering resolve + marker-rPr;
|
|
5317
5317
|
// each of those re-walked the style catalog before.
|
|
5318
|
-
|
|
5318
|
+
//
|
|
5319
|
+
// Defaults to a per-context instance, but the runtime can supply a
|
|
5320
|
+
// persistent `WeakMap` via `FormattingContextOptions.paragraphCascadeCache`
|
|
5321
|
+
// so unchanged paragraphs don't re-cascade on every keystroke. See the
|
|
5322
|
+
// contract on the option for invalidation semantics.
|
|
5323
|
+
paragraphCascadeCache;
|
|
5319
5324
|
constructor(doc, opts) {
|
|
5320
5325
|
this.doc = doc;
|
|
5321
5326
|
this.opts = opts;
|
|
5327
|
+
this.paragraphCascadeCache = opts.paragraphCascadeCache ?? /* @__PURE__ */ new WeakMap();
|
|
5322
5328
|
const canonicalTheme = doc.subParts?.canonicalTheme;
|
|
5323
5329
|
this.theme = opts.themeResolver ?? (canonicalTheme ? new ThemeColorResolver(canonicalTheme) : void 0);
|
|
5324
5330
|
this.numbering = opts.numberingPrefixResolver ?? createNumberingPrefixResolver(doc.numbering);
|
|
@@ -5803,7 +5809,8 @@ function createEditorSurfaceSnapshot(document, _selection, activeStory = { kind:
|
|
|
5803
5809
|
const formattingContext = createFormattingContext(document, {
|
|
5804
5810
|
...options.revisionMarkupMode ? { revisionMarkupMode: options.revisionMarkupMode } : {},
|
|
5805
5811
|
...options.getEffectiveMarkupMode ? { getEffectiveMarkupMode: options.getEffectiveMarkupMode } : {},
|
|
5806
|
-
...options.authorColorPalette ? { authorColorPalette: options.authorColorPalette } : {}
|
|
5812
|
+
...options.authorColorPalette ? { authorColorPalette: options.authorColorPalette } : {},
|
|
5813
|
+
...options.paragraphCascadeCache ? { paragraphCascadeCache: options.paragraphCascadeCache } : {}
|
|
5807
5814
|
});
|
|
5808
5815
|
const editableTargetsByBlockPath = options.editableTargetsByBlockPath ?? indexEditableTargetsByBlockPath(document);
|
|
5809
5816
|
const layoutIdentitiesByBlockPath = options.layoutIdentitiesByBlockPath;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CanonicalDocumentEnvelope, e as SelectionSnapshot, i as TransactionMapping } from '../../public-types-
|
|
1
|
+
import { C as CanonicalDocumentEnvelope, e as SelectionSnapshot, i as TransactionMapping } from '../../public-types-D31xKNGc.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CanonicalDocumentEnvelope, e as SelectionSnapshot, i as TransactionMapping } from '../../public-types-
|
|
1
|
+
import { C as CanonicalDocumentEnvelope, e as SelectionSnapshot, i as TransactionMapping } from '../../public-types-DqYt8GdP.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
insertImage,
|
|
3
3
|
repositionFloatingImage,
|
|
4
4
|
resizeImage
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-4CIHTMCH.js";
|
|
6
|
+
import "../../chunk-BJXSMPHD.js";
|
|
7
|
+
import "../../chunk-TSNK4ECL.js";
|
|
8
8
|
import "../../chunk-QIO6V46H.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-EZFF6GKF.js";
|
|
10
10
|
import "../../chunk-OYGMRRR7.js";
|
|
11
11
|
import "../../chunk-5KTJKTNE.js";
|
|
12
12
|
import "../../chunk-UFVDIR2C.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as SelectionSnapshot, M as MarginPresetDefinition, k as PageFormatDefinition, R as RuntimeRenderSnapshot } from '../../public-types-
|
|
1
|
+
import { j as SelectionSnapshot, M as MarginPresetDefinition, k as PageFormatDefinition, R as RuntimeRenderSnapshot } from '../../public-types-D31xKNGc.cjs';
|
|
2
2
|
import { C as CanonicalDocument, P as PageSize, a as PageMargins, b as ColumnProperties, c as PageNumbering } from '../../canonical-document-CfZIc-fC.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as SelectionSnapshot, M as MarginPresetDefinition, k as PageFormatDefinition, R as RuntimeRenderSnapshot } from '../../public-types-
|
|
1
|
+
import { j as SelectionSnapshot, M as MarginPresetDefinition, k as PageFormatDefinition, R as RuntimeRenderSnapshot } from '../../public-types-DqYt8GdP.js';
|
|
2
2
|
import { C as CanonicalDocument, P as PageSize, a as PageMargins, b as ColumnProperties, c as PageNumbering } from '../../canonical-document-CfZIc-fC.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PersistedEditorSnapshot, R as RuntimeRenderSnapshot } from '../../public-types-
|
|
1
|
+
import { P as PersistedEditorSnapshot, R as RuntimeRenderSnapshot } from '../../public-types-D31xKNGc.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PersistedEditorSnapshot, R as RuntimeRenderSnapshot } from '../../public-types-
|
|
1
|
+
import { P as PersistedEditorSnapshot, R as RuntimeRenderSnapshot } from '../../public-types-DqYt8GdP.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
@@ -4880,10 +4880,16 @@ var FormattingContextImpl = class {
|
|
|
4880
4880
|
// surface-projection calls `resolveParagraphCascade` on the same
|
|
4881
4881
|
// paragraph via `resolveParagraph` + numbering resolve + marker-rPr;
|
|
4882
4882
|
// each of those re-walked the style catalog before.
|
|
4883
|
-
|
|
4883
|
+
//
|
|
4884
|
+
// Defaults to a per-context instance, but the runtime can supply a
|
|
4885
|
+
// persistent `WeakMap` via `FormattingContextOptions.paragraphCascadeCache`
|
|
4886
|
+
// so unchanged paragraphs don't re-cascade on every keystroke. See the
|
|
4887
|
+
// contract on the option for invalidation semantics.
|
|
4888
|
+
paragraphCascadeCache;
|
|
4884
4889
|
constructor(doc, opts) {
|
|
4885
4890
|
this.doc = doc;
|
|
4886
4891
|
this.opts = opts;
|
|
4892
|
+
this.paragraphCascadeCache = opts.paragraphCascadeCache ?? /* @__PURE__ */ new WeakMap();
|
|
4887
4893
|
const canonicalTheme = doc.subParts?.canonicalTheme;
|
|
4888
4894
|
this.theme = opts.themeResolver ?? (canonicalTheme ? new ThemeColorResolver(canonicalTheme) : void 0);
|
|
4889
4895
|
this.numbering = opts.numberingPrefixResolver ?? createNumberingPrefixResolver(doc.numbering);
|
|
@@ -5367,7 +5373,8 @@ function createEditorSurfaceSnapshot(document, _selection, activeStory = { kind:
|
|
|
5367
5373
|
const formattingContext = createFormattingContext(document, {
|
|
5368
5374
|
...options.revisionMarkupMode ? { revisionMarkupMode: options.revisionMarkupMode } : {},
|
|
5369
5375
|
...options.getEffectiveMarkupMode ? { getEffectiveMarkupMode: options.getEffectiveMarkupMode } : {},
|
|
5370
|
-
...options.authorColorPalette ? { authorColorPalette: options.authorColorPalette } : {}
|
|
5376
|
+
...options.authorColorPalette ? { authorColorPalette: options.authorColorPalette } : {},
|
|
5377
|
+
...options.paragraphCascadeCache ? { paragraphCascadeCache: options.paragraphCascadeCache } : {}
|
|
5371
5378
|
});
|
|
5372
5379
|
const editableTargetsByBlockPath = options.editableTargetsByBlockPath ?? indexEditableTargetsByBlockPath(document);
|
|
5373
5380
|
const layoutIdentitiesByBlockPath = options.layoutIdentitiesByBlockPath;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { gz as CellLocator, gA as TableStructureOperation, gB as applyTableStructureOperation, gC as applyTableStructureOperationForEditableTarget, gD as getTableStructureContext, gE as removeCellFromRow, gF as removeTableRowPure, gG as tableStructureActionHandleForTarget } from '../../public-types-
|
|
1
|
+
export { gz as CellLocator, gA as TableStructureOperation, gB as applyTableStructureOperation, gC as applyTableStructureOperationForEditableTarget, gD as getTableStructureContext, gE as removeCellFromRow, gF as removeTableRowPure, gG as tableStructureActionHandleForTarget } from '../../public-types-D31xKNGc.cjs';
|
|
2
2
|
import '../../canonical-document-CfZIc-fC.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { gz as CellLocator, gA as TableStructureOperation, gB as applyTableStructureOperation, gC as applyTableStructureOperationForEditableTarget, gD as getTableStructureContext, gE as removeCellFromRow, gF as removeTableRowPure, gG as tableStructureActionHandleForTarget } from '../../public-types-
|
|
1
|
+
export { gz as CellLocator, gA as TableStructureOperation, gB as applyTableStructureOperation, gC as applyTableStructureOperationForEditableTarget, gD as getTableStructureContext, gE as removeCellFromRow, gF as removeTableRowPure, gG as tableStructureActionHandleForTarget } from '../../public-types-DqYt8GdP.js';
|
|
2
2
|
import '../../canonical-document-CfZIc-fC.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
removeCellFromRow,
|
|
6
6
|
removeTableRowPure,
|
|
7
7
|
tableStructureActionHandleForTarget
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-UR2LW63N.js";
|
|
9
|
+
import "../../chunk-TSNK4ECL.js";
|
|
10
|
+
import "../../chunk-EZFF6GKF.js";
|
|
11
11
|
import "../../chunk-OYGMRRR7.js";
|
|
12
12
|
import "../../chunk-5KTJKTNE.js";
|
|
13
13
|
import "../../chunk-UFVDIR2C.js";
|
|
@@ -5390,10 +5390,16 @@ var FormattingContextImpl = class {
|
|
|
5390
5390
|
// surface-projection calls `resolveParagraphCascade` on the same
|
|
5391
5391
|
// paragraph via `resolveParagraph` + numbering resolve + marker-rPr;
|
|
5392
5392
|
// each of those re-walked the style catalog before.
|
|
5393
|
-
|
|
5393
|
+
//
|
|
5394
|
+
// Defaults to a per-context instance, but the runtime can supply a
|
|
5395
|
+
// persistent `WeakMap` via `FormattingContextOptions.paragraphCascadeCache`
|
|
5396
|
+
// so unchanged paragraphs don't re-cascade on every keystroke. See the
|
|
5397
|
+
// contract on the option for invalidation semantics.
|
|
5398
|
+
paragraphCascadeCache;
|
|
5394
5399
|
constructor(doc, opts) {
|
|
5395
5400
|
this.doc = doc;
|
|
5396
5401
|
this.opts = opts;
|
|
5402
|
+
this.paragraphCascadeCache = opts.paragraphCascadeCache ?? /* @__PURE__ */ new WeakMap();
|
|
5397
5403
|
const canonicalTheme = doc.subParts?.canonicalTheme;
|
|
5398
5404
|
this.theme = opts.themeResolver ?? (canonicalTheme ? new ThemeColorResolver(canonicalTheme) : void 0);
|
|
5399
5405
|
this.numbering = opts.numberingPrefixResolver ?? createNumberingPrefixResolver(doc.numbering);
|
|
@@ -5878,7 +5884,8 @@ function createEditorSurfaceSnapshot(document, _selection, activeStory = { kind:
|
|
|
5878
5884
|
const formattingContext = createFormattingContext(document, {
|
|
5879
5885
|
...options.revisionMarkupMode ? { revisionMarkupMode: options.revisionMarkupMode } : {},
|
|
5880
5886
|
...options.getEffectiveMarkupMode ? { getEffectiveMarkupMode: options.getEffectiveMarkupMode } : {},
|
|
5881
|
-
...options.authorColorPalette ? { authorColorPalette: options.authorColorPalette } : {}
|
|
5887
|
+
...options.authorColorPalette ? { authorColorPalette: options.authorColorPalette } : {},
|
|
5888
|
+
...options.paragraphCascadeCache ? { paragraphCascadeCache: options.paragraphCascadeCache } : {}
|
|
5882
5889
|
});
|
|
5883
5890
|
const editableTargetsByBlockPath = options.editableTargetsByBlockPath ?? indexEditableTargetsByBlockPath(document);
|
|
5884
5891
|
const layoutIdentitiesByBlockPath = options.layoutIdentitiesByBlockPath;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TextTransactionTextTarget, d as EditorSurfaceSnapshot, S as ScopeSurfaceTelemetry, C as CanonicalDocumentEnvelope, e as SelectionSnapshot, f as TextTransactionResult, g as StructuralMutationResult, I as InsertTableOptions, h as TextFormattingDirective, i as TransactionMapping } from '../../public-types-
|
|
1
|
+
import { T as TextTransactionTextTarget, d as EditorSurfaceSnapshot, S as ScopeSurfaceTelemetry, C as CanonicalDocumentEnvelope, e as SelectionSnapshot, f as TextTransactionResult, g as StructuralMutationResult, I as InsertTableOptions, h as TextFormattingDirective, i as TransactionMapping } from '../../public-types-D31xKNGc.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TextTransactionTextTarget, d as EditorSurfaceSnapshot, S as ScopeSurfaceTelemetry, C as CanonicalDocumentEnvelope, e as SelectionSnapshot, f as TextTransactionResult, g as StructuralMutationResult, I as InsertTableOptions, h as TextFormattingDirective, i as TransactionMapping } from '../../public-types-
|
|
1
|
+
import { T as TextTransactionTextTarget, d as EditorSurfaceSnapshot, S as ScopeSurfaceTelemetry, C as CanonicalDocumentEnvelope, e as SelectionSnapshot, f as TextTransactionResult, g as StructuralMutationResult, I as InsertTableOptions, h as TextFormattingDirective, i as TransactionMapping } from '../../public-types-DqYt8GdP.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
insertText,
|
|
9
9
|
outdentParagraphAtSelection,
|
|
10
10
|
splitParagraph
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-2BNXARVO.js";
|
|
12
12
|
import "../../chunk-Y4XZCMCS.js";
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-BJXSMPHD.js";
|
|
14
|
+
import "../../chunk-TSNK4ECL.js";
|
|
15
15
|
import "../../chunk-QIO6V46H.js";
|
|
16
|
-
import "../../chunk-
|
|
16
|
+
import "../../chunk-EZFF6GKF.js";
|
|
17
17
|
import "../../chunk-OYGMRRR7.js";
|
|
18
18
|
import "../../chunk-5KTJKTNE.js";
|
|
19
19
|
import "../../chunk-UFVDIR2C.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { fq as Assoc, fr as BoundaryAssoc, fs as DEFAULT_BOUNDARY_ASSOC, ft as DetachedAnchor, fu as DocRange, b7 as EditorAnchorProjection, fv as InternalEditorAnchorProjection, fw as MAIN_STORY_TARGET, fx as MappingResult, fy as MappingStep, fz as NodeAnchor, fA as Position, fB as RangeAnchor, i as TransactionMapping, fC as anchorUnaffectedByMapping, fD as areAnchorsEqual, fE as createDetachedAnchor, fF as createEmptyMapping, fG as createNodeAnchor, fH as createRangeAnchor, fI as getEffectiveRange, fJ as mapAnchor, fK as mapPosition, fL as mapRange, fM as normalizeRange, fN as storyTargetsEqual } from '../../public-types-
|
|
1
|
+
export { fq as Assoc, fr as BoundaryAssoc, fs as DEFAULT_BOUNDARY_ASSOC, ft as DetachedAnchor, fu as DocRange, b7 as EditorAnchorProjection, fv as InternalEditorAnchorProjection, fw as MAIN_STORY_TARGET, fx as MappingResult, fy as MappingStep, fz as NodeAnchor, fA as Position, fB as RangeAnchor, i as TransactionMapping, fC as anchorUnaffectedByMapping, fD as areAnchorsEqual, fE as createDetachedAnchor, fF as createEmptyMapping, fG as createNodeAnchor, fH as createRangeAnchor, fI as getEffectiveRange, fJ as mapAnchor, fK as mapPosition, fL as mapRange, fM as normalizeRange, fN as storyTargetsEqual } from '../../public-types-D31xKNGc.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { fq as Assoc, fr as BoundaryAssoc, fs as DEFAULT_BOUNDARY_ASSOC, ft as DetachedAnchor, fu as DocRange, b7 as EditorAnchorProjection, fv as InternalEditorAnchorProjection, fw as MAIN_STORY_TARGET, fx as MappingResult, fy as MappingStep, fz as NodeAnchor, fA as Position, fB as RangeAnchor, i as TransactionMapping, fC as anchorUnaffectedByMapping, fD as areAnchorsEqual, fE as createDetachedAnchor, fF as createEmptyMapping, fG as createNodeAnchor, fH as createRangeAnchor, fI as getEffectiveRange, fJ as mapAnchor, fK as mapPosition, fL as mapRange, fM as normalizeRange, fN as storyTargetsEqual } from '../../public-types-
|
|
1
|
+
export { fq as Assoc, fr as BoundaryAssoc, fs as DEFAULT_BOUNDARY_ASSOC, ft as DetachedAnchor, fu as DocRange, b7 as EditorAnchorProjection, fv as InternalEditorAnchorProjection, fw as MAIN_STORY_TARGET, fx as MappingResult, fy as MappingStep, fz as NodeAnchor, fA as Position, fB as RangeAnchor, i as TransactionMapping, fC as anchorUnaffectedByMapping, fD as areAnchorsEqual, fE as createDetachedAnchor, fF as createEmptyMapping, fG as createNodeAnchor, fH as createRangeAnchor, fI as getEffectiveRange, fJ as mapAnchor, fK as mapPosition, fL as mapRange, fM as normalizeRange, fN as storyTargetsEqual } from '../../public-types-DqYt8GdP.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CanonicalDocumentEnvelope, fO as CommandStateSnapshot, fP as CommentEntryRecord, fQ as CommentResolutionRecord, fR as CommentSidebarSnapshot, fS as CommentThreadRecord, ca as CompatibilityFeatureClass, cb as CompatibilityFeatureEntry, fT as CompatibilityPanelSnapshot, r as CompatibilityReport, fU as CreateEditorStateOptions, fV as DocumentStats, t as EditorError, cu as EditorErrorCode, fW as EditorRuntimeState, fX as EditorState, cJ as EditorWarning, cK as EditorWarningCode, fY as PersistedEditorSnapshot, fZ as ReviewStore, f_ as RevisionMetadataRecord, f$ as RevisionRecord, g0 as RuntimePhase, g1 as RuntimeRenderSnapshot, e as SelectionSnapshot, g2 as TrackedChangesSnapshot, g3 as createDefaultCanonicalDocument, g4 as createEditorState, g5 as createEmptyCompatibilityReport, g6 as createEmptyReviewStore, g7 as createPersistedEditorSnapshot, g8 as createSelectionSnapshot, g9 as deriveDocumentStats, ga as deriveRenderSnapshot, gb as normalizeCommentThreadRecord } from '../../public-types-
|
|
1
|
+
export { C as CanonicalDocumentEnvelope, fO as CommandStateSnapshot, fP as CommentEntryRecord, fQ as CommentResolutionRecord, fR as CommentSidebarSnapshot, fS as CommentThreadRecord, ca as CompatibilityFeatureClass, cb as CompatibilityFeatureEntry, fT as CompatibilityPanelSnapshot, r as CompatibilityReport, fU as CreateEditorStateOptions, fV as DocumentStats, t as EditorError, cu as EditorErrorCode, fW as EditorRuntimeState, fX as EditorState, cJ as EditorWarning, cK as EditorWarningCode, fY as PersistedEditorSnapshot, fZ as ReviewStore, f_ as RevisionMetadataRecord, f$ as RevisionRecord, g0 as RuntimePhase, g1 as RuntimeRenderSnapshot, e as SelectionSnapshot, g2 as TrackedChangesSnapshot, g3 as createDefaultCanonicalDocument, g4 as createEditorState, g5 as createEmptyCompatibilityReport, g6 as createEmptyReviewStore, g7 as createPersistedEditorSnapshot, g8 as createSelectionSnapshot, g9 as deriveDocumentStats, ga as deriveRenderSnapshot, gb as normalizeCommentThreadRecord } from '../../public-types-D31xKNGc.cjs';
|
|
2
2
|
export { o as createCanonicalDocumentId } from '../../canonical-document-CfZIc-fC.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CanonicalDocumentEnvelope, fO as CommandStateSnapshot, fP as CommentEntryRecord, fQ as CommentResolutionRecord, fR as CommentSidebarSnapshot, fS as CommentThreadRecord, ca as CompatibilityFeatureClass, cb as CompatibilityFeatureEntry, fT as CompatibilityPanelSnapshot, r as CompatibilityReport, fU as CreateEditorStateOptions, fV as DocumentStats, t as EditorError, cu as EditorErrorCode, fW as EditorRuntimeState, fX as EditorState, cJ as EditorWarning, cK as EditorWarningCode, fY as PersistedEditorSnapshot, fZ as ReviewStore, f_ as RevisionMetadataRecord, f$ as RevisionRecord, g0 as RuntimePhase, g1 as RuntimeRenderSnapshot, e as SelectionSnapshot, g2 as TrackedChangesSnapshot, g3 as createDefaultCanonicalDocument, g4 as createEditorState, g5 as createEmptyCompatibilityReport, g6 as createEmptyReviewStore, g7 as createPersistedEditorSnapshot, g8 as createSelectionSnapshot, g9 as deriveDocumentStats, ga as deriveRenderSnapshot, gb as normalizeCommentThreadRecord } from '../../public-types-
|
|
1
|
+
export { C as CanonicalDocumentEnvelope, fO as CommandStateSnapshot, fP as CommentEntryRecord, fQ as CommentResolutionRecord, fR as CommentSidebarSnapshot, fS as CommentThreadRecord, ca as CompatibilityFeatureClass, cb as CompatibilityFeatureEntry, fT as CompatibilityPanelSnapshot, r as CompatibilityReport, fU as CreateEditorStateOptions, fV as DocumentStats, t as EditorError, cu as EditorErrorCode, fW as EditorRuntimeState, fX as EditorState, cJ as EditorWarning, cK as EditorWarningCode, fY as PersistedEditorSnapshot, fZ as ReviewStore, f_ as RevisionMetadataRecord, f$ as RevisionRecord, g0 as RuntimePhase, g1 as RuntimeRenderSnapshot, e as SelectionSnapshot, g2 as TrackedChangesSnapshot, g3 as createDefaultCanonicalDocument, g4 as createEditorState, g5 as createEmptyCompatibilityReport, g6 as createEmptyReviewStore, g7 as createPersistedEditorSnapshot, g8 as createSelectionSnapshot, g9 as deriveDocumentStats, ga as deriveRenderSnapshot, gb as normalizeCommentThreadRecord } from '../../public-types-DqYt8GdP.js';
|
|
2
2
|
export { o as createCanonicalDocumentId } from '../../canonical-document-CfZIc-fC.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|