@beyondwork/docx-react-component 1.0.122 → 1.0.123
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 +349 -62
- 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-QNGJRZ2D.js → chunk-4IPEZYQX.js} +1 -1
- package/dist/{chunk-3OFSP2IX.js → chunk-BOHHIVQ2.js} +3 -3
- package/dist/{chunk-EMDH4IQN.js → chunk-E5IBDE5E.js} +4 -3
- package/dist/{chunk-TFSXOIAI.js → chunk-FNWKE74J.js} +43 -3
- package/dist/{chunk-IT2DK3A7.js → chunk-H2YQKA55.js} +9 -7
- 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-TMU7JMXX.js → chunk-MB7RJBSN.js} +9 -21
- package/dist/{chunk-UWDWGQH5.js → chunk-ML4A4WUN.js} +1 -1
- package/dist/{chunk-GZW2ERUO.js → chunk-N4VIXI2Z.js} +3 -3
- package/dist/{chunk-S4ANOS2M.js → chunk-NNPVA5VL.js} +2 -2
- package/dist/{chunk-QFU7ZOAD.js → chunk-PFYUJU3Q.js} +176 -36
- package/dist/{chunk-37SEJQ3G.js → chunk-RSYN6FTS.js} +2 -2
- package/dist/{chunk-OBCP6VTG.js → chunk-RWERZWHR.js} +1 -1
- package/dist/{chunk-UHQOUTAX.js → chunk-SGSJ4DQA.js} +377 -50
- package/dist/{chunk-PCXTMEGY.js → chunk-UHJLCPLU.js} +24 -14
- 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 +1196 -197
- 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 +10 -21
- 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 +8 -20
- 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 +12 -618
- 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
package/dist/api/v3.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-
|
|
2
|
-
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-
|
|
1
|
+
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-DajNGKV4.cjs';
|
|
2
|
+
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-DajNGKV4.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
6
|
-
import '../canonical-document-
|
|
6
|
+
import '../canonical-document-CG2TgAzj.cjs';
|
|
7
7
|
import 'prosemirror-state';
|
|
8
8
|
import 'prosemirror-model';
|
|
9
9
|
|
package/dist/api/v3.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-
|
|
2
|
-
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-
|
|
1
|
+
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-CNnMHZM9.js';
|
|
2
|
+
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-CNnMHZM9.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
6
|
-
import '../canonical-document-
|
|
6
|
+
import '../canonical-document-CG2TgAzj.js';
|
|
7
7
|
import 'prosemirror-state';
|
|
8
8
|
import 'prosemirror-model';
|
|
9
9
|
|
package/dist/api/v3.js
CHANGED
|
@@ -5,24 +5,24 @@ import {
|
|
|
5
5
|
mockId,
|
|
6
6
|
mockPayload,
|
|
7
7
|
validateApiV3Metadata
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-H2YQKA55.js";
|
|
9
|
+
import "../chunk-UHJLCPLU.js";
|
|
10
10
|
import "../chunk-C2LWJ4CZ.js";
|
|
11
11
|
import {
|
|
12
12
|
createUiApi,
|
|
13
13
|
emitUxResponse
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-HXHQA4BU.js";
|
|
15
|
+
import "../chunk-ZRHLLPSJ.js";
|
|
16
16
|
import "../chunk-KFCQYZXR.js";
|
|
17
17
|
import "../chunk-QIO6V46H.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-H6IL5ABU.js";
|
|
19
19
|
import "../chunk-OYGMRRR7.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-NNPVA5VL.js";
|
|
21
|
+
import "../chunk-E5IBDE5E.js";
|
|
22
|
+
import "../chunk-ML4A4WUN.js";
|
|
23
|
+
import "../chunk-MB7RJBSN.js";
|
|
24
24
|
import "../chunk-4BJ6K26R.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-FNWKE74J.js";
|
|
26
26
|
import "../chunk-OL2UEHRP.js";
|
|
27
27
|
import "../chunk-EB6M3GE6.js";
|
|
28
28
|
import "../chunk-IHE7YOAY.js";
|
|
@@ -2486,4 +2486,4 @@ interface DiagnosticErrorEntry {
|
|
|
2486
2486
|
*/
|
|
2487
2487
|
declare function createCanonicalDocumentId(documentId: string): string;
|
|
2488
2488
|
|
|
2489
|
-
export { type TextProperties as $, type
|
|
2489
|
+
export { type TextProperties as $, type TableCellBorders as A, type BlockNode as B, type CanonicalDocument as C, type DocumentRootNode as D, type CellShading as E, type FieldFamily as F, type TextMark as G, type Mutable as H, type ISO8601DateTime as I, type ParagraphNode as J, type TableIndent as K, type TableCellMargins as L, type ModelValidationIssue as M, type TableNode as N, type OpaqueFragmentRecord as O, type PageSize as P, type FieldRegistryEntry as Q, type RevisionStoryTargetRecord as R, type SectionProperties as S, type TocRegion as T, type FootnoteProperties as U, type EndnoteProperties as V, type CanonicalTheme as W, type InlineNode as X, type CanonicalParagraphFormatting as Y, type CanonicalRunFormatting as Z, type FillSpec as _, type PageMargins as a, type StrokeSpec as a0, type ChartModel as a1, type ResolvedTheme as a2, type ColorRef as a3, type SupportedFieldFamily as a4, type HeaderDocument as a5, type FooterDocument as a6, type ParagraphBorders as a7, type AreaChartModel as a8, type Axis as a9, type UnsupportedReason as aA, type ValueAxis as aB, type AxisBase as aa, type BarChartModel as ab, type BubbleChartModel as ac, type BubbleSeries as ad, type CategoryAxis as ae, type CategoryLikeAxis as af, type ChartCommon as ag, type ColorMod as ah, type ComboChartModel as ai, type DataLabelsSpec as aj, type DataPointOverride as ak, type DateAxis as al, type Legend as am, type LineChartModel as an, type LineSeries as ao, type MarkerSpec as ap, type PieChartModel as aq, type PieSeries as ar, type ScatterChartModel as as, type ScatterSeries as at, type Series as au, type SeriesAxis as av, type SeriesBase as aw, type ShapeProperties as ax, type Title as ay, type UnsupportedChartModel as az, type ColumnProperties as b, type PageNumbering as c, type PreservationStore as d, type DocumentNode as e, type PersistedEditorSnapshotVersion as f, CDS_SCHEMA_VERSION as g, type CompatibilityReportVersion as h, type Base64 as i, type CommentThread as j, type CommentEntry as k, type CommentResolution as l, type RevisionMetadataRecord as m, type RevisionRecord as n, createCanonicalDocumentId as o, type CanonicalSourceRef as p, type SdtDataBindingState as q, type FieldRefreshStatus as r, type CanonicalAnchor as s, type PreserveOnlyObjectSizing as t, type TableCellNode as u, type TableLook as v, type TableStyleFormatting as w, type TableWidth as x, type TableBorders as y, type TableStyleConditionalRegion as z };
|
|
@@ -2486,4 +2486,4 @@ interface DiagnosticErrorEntry {
|
|
|
2486
2486
|
*/
|
|
2487
2487
|
declare function createCanonicalDocumentId(documentId: string): string;
|
|
2488
2488
|
|
|
2489
|
-
export { type TextProperties as $, type
|
|
2489
|
+
export { type TextProperties as $, type TableCellBorders as A, type BlockNode as B, type CanonicalDocument as C, type DocumentRootNode as D, type CellShading as E, type FieldFamily as F, type TextMark as G, type Mutable as H, type ISO8601DateTime as I, type ParagraphNode as J, type TableIndent as K, type TableCellMargins as L, type ModelValidationIssue as M, type TableNode as N, type OpaqueFragmentRecord as O, type PageSize as P, type FieldRegistryEntry as Q, type RevisionStoryTargetRecord as R, type SectionProperties as S, type TocRegion as T, type FootnoteProperties as U, type EndnoteProperties as V, type CanonicalTheme as W, type InlineNode as X, type CanonicalParagraphFormatting as Y, type CanonicalRunFormatting as Z, type FillSpec as _, type PageMargins as a, type StrokeSpec as a0, type ChartModel as a1, type ResolvedTheme as a2, type ColorRef as a3, type SupportedFieldFamily as a4, type HeaderDocument as a5, type FooterDocument as a6, type ParagraphBorders as a7, type AreaChartModel as a8, type Axis as a9, type UnsupportedReason as aA, type ValueAxis as aB, type AxisBase as aa, type BarChartModel as ab, type BubbleChartModel as ac, type BubbleSeries as ad, type CategoryAxis as ae, type CategoryLikeAxis as af, type ChartCommon as ag, type ColorMod as ah, type ComboChartModel as ai, type DataLabelsSpec as aj, type DataPointOverride as ak, type DateAxis as al, type Legend as am, type LineChartModel as an, type LineSeries as ao, type MarkerSpec as ap, type PieChartModel as aq, type PieSeries as ar, type ScatterChartModel as as, type ScatterSeries as at, type Series as au, type SeriesAxis as av, type SeriesBase as aw, type ShapeProperties as ax, type Title as ay, type UnsupportedChartModel as az, type ColumnProperties as b, type PageNumbering as c, type PreservationStore as d, type DocumentNode as e, type PersistedEditorSnapshotVersion as f, CDS_SCHEMA_VERSION as g, type CompatibilityReportVersion as h, type Base64 as i, type CommentThread as j, type CommentEntry as k, type CommentResolution as l, type RevisionMetadataRecord as m, type RevisionRecord as n, createCanonicalDocumentId as o, type CanonicalSourceRef as p, type SdtDataBindingState as q, type FieldRefreshStatus as r, type CanonicalAnchor as s, type PreserveOnlyObjectSizing as t, type TableCellNode as u, type TableLook as v, type TableStyleFormatting as w, type TableWidth as x, type TableBorders as y, type TableStyleConditionalRegion as z };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-Y4XZCMCS.js";
|
|
4
4
|
import {
|
|
5
5
|
applyTextTransaction
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IR7QV2BX.js";
|
|
7
7
|
import {
|
|
8
8
|
createInsertedTableBlock,
|
|
9
9
|
createNoopStructuralMutation,
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
replaceParagraphScope,
|
|
12
12
|
resolveInsertedTableStyleId,
|
|
13
13
|
resolveParagraphScope
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KOHQFZMM.js";
|
|
15
15
|
import {
|
|
16
16
|
NO_EDITABLE_TARGETS_INDEX,
|
|
17
17
|
createEditorSurfaceSnapshot
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-H6IL5ABU.js";
|
|
19
19
|
import {
|
|
20
20
|
createSelectionSnapshot
|
|
21
21
|
} from "./chunk-OYGMRRR7.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getRevisionActionability,
|
|
9
9
|
normalizeParsedTextDocument,
|
|
10
10
|
normalizeParsedTextDocumentAsync
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ML4A4WUN.js";
|
|
12
12
|
import {
|
|
13
13
|
OLE_RELATIONSHIP_TYPES,
|
|
14
14
|
buildFieldRegistry,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
resolveHighlightColor,
|
|
60
60
|
setActiveParseTelemetryBus,
|
|
61
61
|
toCanonicalNumberingInstanceId
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-MB7RJBSN.js";
|
|
63
63
|
import {
|
|
64
64
|
createPersistedSourcePackage,
|
|
65
65
|
decodeBytesBase64,
|
|
@@ -6990,7 +6990,8 @@ function parseCommentDefinitions(commentsXml, extensions, durableIds) {
|
|
|
6990
6990
|
const createdAt = normalizeImportedTimestamp2(
|
|
6991
6991
|
readStringAttr(child, "w:date")
|
|
6992
6992
|
);
|
|
6993
|
-
const
|
|
6993
|
+
const rawInitials = readStringAttr(child, "w:initials");
|
|
6994
|
+
const initials = rawInitials !== void 0 && rawInitials.trim().length > 0 ? rawInitials : void 0;
|
|
6994
6995
|
const paragraphNodes = child.children.filter(
|
|
6995
6996
|
(node) => node.type === "element" && localName(node.name) === "p"
|
|
6996
6997
|
);
|
|
@@ -276,6 +276,28 @@ function collectEditableTargetRefs(doc, cache) {
|
|
|
276
276
|
collectReviewEditableTargets(doc, targets);
|
|
277
277
|
return targets;
|
|
278
278
|
}
|
|
279
|
+
function collectEditableTargetRefsForStoryBlockRanges(doc, storyKey, ranges, cache) {
|
|
280
|
+
const targets = [];
|
|
281
|
+
const context = collectStoryBlockContexts(doc).find((entry) => entry.storyKey === storyKey);
|
|
282
|
+
if (!context) return targets;
|
|
283
|
+
const normalized = normalizeEditableTargetRanges(ranges, context.blocks.length);
|
|
284
|
+
for (const range of normalized) {
|
|
285
|
+
collectEditableTargetsInBlocks(
|
|
286
|
+
context.blocks.slice(range.start, range.end),
|
|
287
|
+
{
|
|
288
|
+
storyKey: context.storyKey,
|
|
289
|
+
basePath: context.basePath,
|
|
290
|
+
insideSdt: false,
|
|
291
|
+
insideTextBox: false,
|
|
292
|
+
tableDepth: 0
|
|
293
|
+
},
|
|
294
|
+
targets,
|
|
295
|
+
cache,
|
|
296
|
+
range.start
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
return targets;
|
|
300
|
+
}
|
|
279
301
|
function createEditableTargetBlockCache() {
|
|
280
302
|
const map = /* @__PURE__ */ new WeakMap();
|
|
281
303
|
return {
|
|
@@ -311,12 +333,13 @@ function buildBlockCacheSignature(context, blockIndex) {
|
|
|
311
333
|
owner?.targetKey ?? ""
|
|
312
334
|
].join("|");
|
|
313
335
|
}
|
|
314
|
-
function collectEditableTargetsInBlocks(blocks, context, targets, cache) {
|
|
336
|
+
function collectEditableTargetsInBlocks(blocks, context, targets, cache, blockIndexOffset = 0) {
|
|
315
337
|
for (let blockIndex = 0; blockIndex < blocks.length; blockIndex += 1) {
|
|
316
338
|
const block = blocks[blockIndex];
|
|
317
339
|
if (!block) continue;
|
|
318
|
-
const
|
|
319
|
-
const
|
|
340
|
+
const absoluteBlockIndex = blockIndex + blockIndexOffset;
|
|
341
|
+
const blockPath = `${context.basePath}/block[${absoluteBlockIndex}]`;
|
|
342
|
+
const signature = cache !== void 0 ? buildBlockCacheSignature(context, absoluteBlockIndex) : "";
|
|
320
343
|
if (cache !== void 0) {
|
|
321
344
|
const cached = cache.get(block);
|
|
322
345
|
if (cached !== void 0 && cached.blockPath === blockPath && cached.signature === signature) {
|
|
@@ -500,6 +523,22 @@ function collectEditableTargetsInTable(table, tablePath, context, targets, cache
|
|
|
500
523
|
}
|
|
501
524
|
}
|
|
502
525
|
}
|
|
526
|
+
function normalizeEditableTargetRanges(ranges, blockCount) {
|
|
527
|
+
const normalized = [];
|
|
528
|
+
const sortedRanges = [...ranges].sort((left, right) => left.start - right.start || left.end - right.end);
|
|
529
|
+
for (const range of sortedRanges) {
|
|
530
|
+
const start = Math.max(0, Math.min(blockCount, Math.floor(range.start)));
|
|
531
|
+
const end = Math.max(start, Math.min(blockCount, Math.ceil(range.end)));
|
|
532
|
+
if (start === end) continue;
|
|
533
|
+
const previous = normalized[normalized.length - 1];
|
|
534
|
+
if (previous && start <= previous.end) {
|
|
535
|
+
previous.end = Math.max(previous.end, end);
|
|
536
|
+
} else {
|
|
537
|
+
normalized.push({ start, end });
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
return normalized;
|
|
541
|
+
}
|
|
503
542
|
function findVerticalMergeOwner(owners, gridColumnStart, gridSpan) {
|
|
504
543
|
return owners.find(
|
|
505
544
|
(owner) => owner.gridColumnStart === gridColumnStart && owner.gridSpan === gridSpan
|
|
@@ -3057,6 +3096,7 @@ export {
|
|
|
3057
3096
|
createNoteStoryKey,
|
|
3058
3097
|
collectCanonicalLayoutInputs,
|
|
3059
3098
|
collectEditableTargetRefs,
|
|
3099
|
+
collectEditableTargetRefsForStoryBlockRanges,
|
|
3060
3100
|
createEditableTargetBlockCache,
|
|
3061
3101
|
validateEditableTargetRef,
|
|
3062
3102
|
collectCanonicalFieldRegionIdentities,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
resolveScopeRange,
|
|
18
18
|
scopeSpecificity,
|
|
19
19
|
searchDocument
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UHJLCPLU.js";
|
|
21
21
|
import {
|
|
22
22
|
BROADCAST_COMMAND_TYPES,
|
|
23
23
|
COMMAND_EVENT_SCHEMA_VERSION,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
buildPageAnchorElementId,
|
|
29
29
|
createUiApi,
|
|
30
30
|
emitUxResponse
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HXHQA4BU.js";
|
|
32
32
|
import {
|
|
33
33
|
DEFAULT_PX_PER_TWIP,
|
|
34
34
|
DEFAULT_REGISTRY_ENTRIES,
|
|
@@ -36,23 +36,23 @@ import {
|
|
|
36
36
|
LAYCACHE_SCHEMA_VERSION,
|
|
37
37
|
LAYOUT_ENGINE_VERSION,
|
|
38
38
|
createScopeTagRegistry
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ZRHLLPSJ.js";
|
|
40
40
|
import {
|
|
41
41
|
chartModelStore,
|
|
42
42
|
createFormattingContext
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-H6IL5ABU.js";
|
|
44
44
|
import {
|
|
45
45
|
deriveDocumentStats
|
|
46
46
|
} from "./chunk-OYGMRRR7.js";
|
|
47
47
|
import {
|
|
48
48
|
DocxSession
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-NNPVA5VL.js";
|
|
50
50
|
import {
|
|
51
51
|
WORKFLOW_PAYLOAD_PART_PATH,
|
|
52
52
|
buildEditorStateXml,
|
|
53
53
|
parseEditorStateXml,
|
|
54
54
|
parseWorkflowPayloadEnvelopeFromPackage
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-E5IBDE5E.js";
|
|
56
56
|
import {
|
|
57
57
|
EMU_PER_PX,
|
|
58
58
|
GRADIENT_STOP_UNITS,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
createHeaderFooterStoryKey,
|
|
62
62
|
createNoteStoryKey,
|
|
63
63
|
validateEditableTargetRef
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-FNWKE74J.js";
|
|
65
65
|
import {
|
|
66
66
|
readOpcPackage
|
|
67
67
|
} from "./chunk-OL2UEHRP.js";
|
|
@@ -1997,6 +1997,8 @@ function toV3PageLocalStoryObject(object) {
|
|
|
1997
1997
|
heightTwips: object.extentTwips.heightTwips
|
|
1998
1998
|
}
|
|
1999
1999
|
} : {},
|
|
2000
|
+
...object.anchorRectTwips ? { anchorRectTwips: cloneRect(object.anchorRectTwips) } : {},
|
|
2001
|
+
...object.textBoxBody ? { textBoxBody: object.textBoxBody } : {},
|
|
2000
2002
|
...object.relationshipIds ? { relationshipIds: [...object.relationshipIds] } : {},
|
|
2001
2003
|
...object.mediaIds ? { mediaIds: [...object.mediaIds] } : {},
|
|
2002
2004
|
preserveOnly: object.preserveOnly,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
MAIN_STORY_KEY,
|
|
5
5
|
collectCanonicalFieldRegionIdentities,
|
|
6
6
|
collectEditableTargetRefs
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FNWKE74J.js";
|
|
8
8
|
import {
|
|
9
9
|
describeOpaqueFragment,
|
|
10
10
|
describeStructuredWrapperBlock,
|
|
@@ -3153,6 +3153,8 @@ function createSurfaceBlock(block, document, cursor, counters, formattingContext
|
|
|
3153
3153
|
formattingContext,
|
|
3154
3154
|
promoteSecondaryStoryTextBoxes,
|
|
3155
3155
|
cullBuild,
|
|
3156
|
+
editableTargetsByBlockPath,
|
|
3157
|
+
blockPath,
|
|
3156
3158
|
blockPath !== void 0 ? editableTargetsByBlockPath.get(blockPath) : void 0
|
|
3157
3159
|
);
|
|
3158
3160
|
}
|
|
@@ -3559,7 +3561,7 @@ function getRecursableSdtBlockedReasonCode(block) {
|
|
|
3559
3561
|
].filter(Boolean).join(" ").toLowerCase();
|
|
3560
3562
|
return searchText.includes("table of contents") || /\btoc\b/u.test(searchText) ? "workflow_preserve_only" : null;
|
|
3561
3563
|
}
|
|
3562
|
-
function createParagraphBlock(paragraphIndex, paragraph, document, start, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTarget) {
|
|
3564
|
+
function createParagraphBlock(paragraphIndex, paragraph, document, start, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, blockPath, editableTarget) {
|
|
3563
3565
|
const themeResolver = formattingContext.theme;
|
|
3564
3566
|
const effectiveNumbering = formattingContext.resolveEffectiveParagraphNumbering(paragraph);
|
|
3565
3567
|
let resolvedNumbering = null;
|
|
@@ -3624,6 +3626,8 @@ function createParagraphBlock(paragraphIndex, paragraph, document, start, format
|
|
|
3624
3626
|
document,
|
|
3625
3627
|
cursor,
|
|
3626
3628
|
promoteSecondaryStoryTextBoxes,
|
|
3629
|
+
blockPath !== void 0 ? `${blockPath}/inline[${childIndex}]` : void 0,
|
|
3630
|
+
editableTargetsByBlockPath,
|
|
3627
3631
|
void 0,
|
|
3628
3632
|
cullBuild,
|
|
3629
3633
|
themeResolver,
|
|
@@ -3680,7 +3684,7 @@ function isVisibleTocResultInline(node) {
|
|
|
3680
3684
|
return false;
|
|
3681
3685
|
}
|
|
3682
3686
|
}
|
|
3683
|
-
function appendInlineSegments(paragraph, node, document, start, promoteSecondaryStoryTextBoxes, hyperlinkHref, cullBuild = false, themeResolver, formattingContext) {
|
|
3687
|
+
function appendInlineSegments(paragraph, node, document, start, promoteSecondaryStoryTextBoxes, inlinePath, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, hyperlinkHref, cullBuild = false, themeResolver, formattingContext) {
|
|
3684
3688
|
switch (node.type) {
|
|
3685
3689
|
case "text": {
|
|
3686
3690
|
const cloned = node.marks ? cloneMarks(node.marks) : { marks: [] };
|
|
@@ -3733,13 +3737,16 @@ function appendInlineSegments(paragraph, node, document, start, promoteSecondary
|
|
|
3733
3737
|
return { nextCursor: start + 1, lockedFragmentIds: [] };
|
|
3734
3738
|
case "hyperlink": {
|
|
3735
3739
|
let cursor = start;
|
|
3736
|
-
for (
|
|
3740
|
+
for (let childIndex = 0; childIndex < node.children.length; childIndex += 1) {
|
|
3741
|
+
const child = node.children[childIndex];
|
|
3737
3742
|
const result = appendInlineSegments(
|
|
3738
3743
|
paragraph,
|
|
3739
3744
|
child,
|
|
3740
3745
|
document,
|
|
3741
3746
|
cursor,
|
|
3742
3747
|
promoteSecondaryStoryTextBoxes,
|
|
3748
|
+
inlinePath !== void 0 ? `${inlinePath}/child[${childIndex}]` : void 0,
|
|
3749
|
+
editableTargetsByBlockPath,
|
|
3743
3750
|
node.href,
|
|
3744
3751
|
cullBuild,
|
|
3745
3752
|
themeResolver,
|
|
@@ -3798,6 +3805,33 @@ function appendInlineSegments(paragraph, node, document, start, promoteSecondary
|
|
|
3798
3805
|
if (isMicrosoftSensitivityLabelShape(node)) {
|
|
3799
3806
|
return { nextCursor: start + 1, lockedFragmentIds: [] };
|
|
3800
3807
|
}
|
|
3808
|
+
if (node.isTextBox && node.txbxBlocks !== void 0) {
|
|
3809
|
+
const txbxTextSegment = extractTxbxFirstTextSegment(node.txbxBlocks);
|
|
3810
|
+
const txbxText = txbxTextSegment?.text ?? node.text;
|
|
3811
|
+
const txbxBody = surfaceTextBoxBodyFromShape(
|
|
3812
|
+
node,
|
|
3813
|
+
void 0,
|
|
3814
|
+
inlinePath,
|
|
3815
|
+
editableTargetsByBlockPath
|
|
3816
|
+
);
|
|
3817
|
+
paragraph.segments.push({
|
|
3818
|
+
segmentId: `${paragraph.blockId}-segment-${paragraph.segments.length}`,
|
|
3819
|
+
kind: "shape",
|
|
3820
|
+
from: start,
|
|
3821
|
+
to: start + 1,
|
|
3822
|
+
label: "Text box",
|
|
3823
|
+
detail: createShapeDetail(node),
|
|
3824
|
+
...node.geometry !== void 0 ? { geometry: node.geometry } : {},
|
|
3825
|
+
isTextBox: true,
|
|
3826
|
+
...node.textBoxBody ? { textBoxBody: node.textBoxBody } : {},
|
|
3827
|
+
...node.preserveOnlyObject ? { preserveOnlyObject: surfacePreserveOnlyObject(node.preserveOnlyObject) } : {},
|
|
3828
|
+
...txbxText ? { txbxText } : {},
|
|
3829
|
+
...txbxBody ? { txbxBody } : {},
|
|
3830
|
+
...txbxTextSegment?.marks && txbxTextSegment.marks.length > 0 ? { txbxMarks: txbxTextSegment.marks } : {},
|
|
3831
|
+
...txbxTextSegment?.markAttrs ? { txbxMarkAttrs: txbxTextSegment.markAttrs } : {}
|
|
3832
|
+
});
|
|
3833
|
+
return { nextCursor: start + 1, lockedFragmentIds: [] };
|
|
3834
|
+
}
|
|
3801
3835
|
if (promoteSecondaryStoryTextBoxes && node.isTextBox && node.text) {
|
|
3802
3836
|
return appendTextBoxSegment(
|
|
3803
3837
|
paragraph,
|
|
@@ -3857,7 +3891,7 @@ function appendInlineSegments(paragraph, node, document, start, promoteSecondary
|
|
|
3857
3891
|
const anchor = surfaceAnchorFromGeometry(node.anchor);
|
|
3858
3892
|
const txbxTextSegment = c.isTextBox ? extractTxbxFirstTextSegment(c.txbxBlocks) : void 0;
|
|
3859
3893
|
const txbxText = txbxTextSegment?.text ?? (c.isTextBox ? c.text : void 0);
|
|
3860
|
-
const txbxBody = c.isTextBox ? surfaceTextBoxBodyFromShape(c, node.sourceRef) : void 0;
|
|
3894
|
+
const txbxBody = c.isTextBox ? surfaceTextBoxBodyFromShape(c, node.sourceRef, inlinePath, editableTargetsByBlockPath) : void 0;
|
|
3861
3895
|
const surfaceFill = c.fill;
|
|
3862
3896
|
paragraph.segments.push({
|
|
3863
3897
|
segmentId: `${paragraph.blockId}-segment-${paragraph.segments.length}`,
|
|
@@ -4034,13 +4068,16 @@ function appendInlineSegments(paragraph, node, document, start, promoteSecondary
|
|
|
4034
4068
|
const refHyperlinkHref = (node.fieldFamily === "REF" || node.fieldFamily === "PAGEREF" || node.fieldFamily === "NOTEREF") && node.switches?.hyperlink === true && node.fieldTarget ? `#${node.fieldTarget}` : void 0;
|
|
4035
4069
|
let cursor = start;
|
|
4036
4070
|
const lockedIds = [];
|
|
4037
|
-
for (
|
|
4071
|
+
for (let childIndex = 0; childIndex < node.children.length; childIndex += 1) {
|
|
4072
|
+
const child = node.children[childIndex];
|
|
4038
4073
|
const result = appendInlineSegments(
|
|
4039
4074
|
paragraph,
|
|
4040
4075
|
child,
|
|
4041
4076
|
document,
|
|
4042
4077
|
cursor,
|
|
4043
4078
|
promoteSecondaryStoryTextBoxes,
|
|
4079
|
+
inlinePath !== void 0 ? `${inlinePath}/child[${childIndex}]` : void 0,
|
|
4080
|
+
editableTargetsByBlockPath,
|
|
4044
4081
|
refHyperlinkHref ?? hyperlinkHref,
|
|
4045
4082
|
cullBuild,
|
|
4046
4083
|
themeResolver,
|
|
@@ -4287,7 +4324,7 @@ function extractTxbxFirstTextSegment(blocks) {
|
|
|
4287
4324
|
}
|
|
4288
4325
|
return void 0;
|
|
4289
4326
|
}
|
|
4290
|
-
function surfaceTextBoxBodyFromShape(shape, sourceRef) {
|
|
4327
|
+
function surfaceTextBoxBodyFromShape(shape, sourceRef, inlinePath, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH) {
|
|
4291
4328
|
if (!shape.isTextBox && shape.txbxContentXml === void 0 && shape.txbxBlocks === void 0) {
|
|
4292
4329
|
return void 0;
|
|
4293
4330
|
}
|
|
@@ -4313,9 +4350,12 @@ function surfaceTextBoxBodyFromShape(shape, sourceRef) {
|
|
|
4313
4350
|
(run, inlineIndex) => surfaceTextBoxRunFromLegacyRun(run, inlineIndex)
|
|
4314
4351
|
) ?? [];
|
|
4315
4352
|
const text = runs.map((run) => run.text ?? "").join("");
|
|
4353
|
+
const blockPath = inlinePath !== void 0 ? `${inlinePath}/txbx/block[${blockIndex}]` : void 0;
|
|
4354
|
+
const editableTarget = blockPath !== void 0 ? editableTargetsByBlockPath.get(blockPath) : void 0;
|
|
4316
4355
|
return [{
|
|
4317
4356
|
...block.sourceRef !== void 0 ? { sourceRef: block.sourceRef } : {},
|
|
4318
4357
|
blockIndex,
|
|
4358
|
+
...editableTarget !== void 0 ? { editableTarget } : {},
|
|
4319
4359
|
text,
|
|
4320
4360
|
textLength: Array.from(text).length,
|
|
4321
4361
|
...block.borders !== void 0 ? { borders: block.borders } : {},
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
NO_EDITABLE_TARGETS_INDEX,
|
|
12
12
|
createEditorSurfaceSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-H6IL5ABU.js";
|
|
14
14
|
import {
|
|
15
15
|
createSelectionSnapshot
|
|
16
16
|
} from "./chunk-OYGMRRR7.js";
|
|
@@ -148,6 +148,7 @@ function applyLinearTextTransaction(document, selection, intent, options) {
|
|
|
148
148
|
metadata: {
|
|
149
149
|
affectsComments: true,
|
|
150
150
|
affectsRevisions: true,
|
|
151
|
+
...createLocalTextPatchMetadata(story.units, unitFrom, unitTo, insertionUnits),
|
|
151
152
|
...containsParagraphBoundaryChange(story, normalizedRange, insertionUnits) ? { invalidatesStructures: true } : {}
|
|
152
153
|
}
|
|
153
154
|
},
|
|
@@ -215,6 +216,21 @@ function tryApplyTableParagraphTransaction(document, selection, intent, options)
|
|
|
215
216
|
storyText: localResult.storyText
|
|
216
217
|
};
|
|
217
218
|
}
|
|
219
|
+
function createLocalTextPatchMetadata(units, unitFrom, unitTo, insertionUnits) {
|
|
220
|
+
if (!insertionUnits.every((unit) => unit.kind === "text")) {
|
|
221
|
+
return {};
|
|
222
|
+
}
|
|
223
|
+
for (let index = unitFrom; index < unitTo; index += 1) {
|
|
224
|
+
if (units[index]?.kind !== "text") {
|
|
225
|
+
return {};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
localTextPatch: {
|
|
230
|
+
insertedText: insertionUnits.map((unit) => unit.kind === "text" ? unit.value : "").join("")
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
218
234
|
function tryApplyTargetedTextLeafTransaction(document, selection, intent, options) {
|
|
219
235
|
const scope = resolveTargetedTextLeafScope(document, selection, options.textTarget);
|
|
220
236
|
if (!scope) {
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
createNoopStructuralMutation,
|
|
4
4
|
findTableCellParagraphSelection,
|
|
5
5
|
findTopLevelParagraphSelectionNearBlock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KOHQFZMM.js";
|
|
7
7
|
import {
|
|
8
8
|
collectEditableTargetRefs,
|
|
9
9
|
collectStoryBlockContexts,
|
|
10
10
|
createHeaderFooterStoryKey
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FNWKE74J.js";
|
|
12
12
|
import {
|
|
13
13
|
createDetachedAnchor,
|
|
14
14
|
createNodeAnchor,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createHeaderFooterStoryKey,
|
|
7
7
|
createNoteStoryKey,
|
|
8
8
|
sha256TextHex
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FNWKE74J.js";
|
|
10
10
|
import {
|
|
11
11
|
SCOPE_MARKER_BOOKMARK_PREFIX,
|
|
12
12
|
buildGrabBagSourceChildFromParsed,
|
|
@@ -1487,7 +1487,6 @@ function parseInteger(value) {
|
|
|
1487
1487
|
// src/io/ooxml/parse-bookmark-references.ts
|
|
1488
1488
|
var HYPERLINK_ANCHOR_RE = /<(?:\w+:)?hyperlink\b[^>]*\bw:anchor\s*=\s*"([^"]*)"/gi;
|
|
1489
1489
|
var INSTR_TEXT_RE = /<(?:\w+:)?instrText\b[^>]*>([\s\S]*?)<\/(?:\w+:)?instrText>/gi;
|
|
1490
|
-
var SIMPLE_FIELD_INSTR_RE = /<(?:\w+:)?fldSimple\b[^>]*\bw:instr\s*=\s*"([^"]*)"/gi;
|
|
1491
1490
|
var TOC_FIELD_RE = /\bTOC\b/;
|
|
1492
1491
|
var REFLIKE_FIELD_RE = /\b(?:HYPERLINK|REF|PAGEREF|NOTEREF)\s+([A-Za-z0-9_:.\-]+)/g;
|
|
1493
1492
|
var DATA_BINDING_RE = /<(?:\w+:)?dataBinding\b/i;
|
|
@@ -1506,14 +1505,12 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
|
|
|
1506
1505
|
}
|
|
1507
1506
|
INSTR_TEXT_RE.lastIndex = 0;
|
|
1508
1507
|
while ((m = INSTR_TEXT_RE.exec(documentXml)) !== null) {
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
if (scanInstructionForRetainedBookmarks(m[1] ?? "", retained)) {
|
|
1516
|
-
retainAllToc = true;
|
|
1508
|
+
const instrText = m[1] ?? "";
|
|
1509
|
+
if (TOC_FIELD_RE.test(instrText)) retainAllToc = true;
|
|
1510
|
+
REFLIKE_FIELD_RE.lastIndex = 0;
|
|
1511
|
+
let r;
|
|
1512
|
+
while ((r = REFLIKE_FIELD_RE.exec(instrText)) !== null) {
|
|
1513
|
+
if (r[1]) retained.add(r[1]);
|
|
1517
1514
|
}
|
|
1518
1515
|
}
|
|
1519
1516
|
retainRevisionBoundedBookmarks(documentXml, retained);
|
|
@@ -1523,15 +1520,6 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
|
|
|
1523
1520
|
retainAll
|
|
1524
1521
|
};
|
|
1525
1522
|
}
|
|
1526
|
-
function scanInstructionForRetainedBookmarks(instruction, retained) {
|
|
1527
|
-
const hasTocField = TOC_FIELD_RE.test(instruction);
|
|
1528
|
-
REFLIKE_FIELD_RE.lastIndex = 0;
|
|
1529
|
-
let r;
|
|
1530
|
-
while ((r = REFLIKE_FIELD_RE.exec(instruction)) !== null) {
|
|
1531
|
-
if (r[1]) retained.add(r[1]);
|
|
1532
|
-
}
|
|
1533
|
-
return hasTocField;
|
|
1534
|
-
}
|
|
1535
1523
|
function retainRevisionBoundedBookmarks(documentXml, retained) {
|
|
1536
1524
|
const starts = /* @__PURE__ */ new Map();
|
|
1537
1525
|
BOOKMARK_START_RE.lastIndex = 0;
|
|
@@ -4428,7 +4416,7 @@ var SAFE_TABLE_FIELD_FAMILIES = /* @__PURE__ */ new Set([
|
|
|
4428
4416
|
"FORMULA"
|
|
4429
4417
|
]);
|
|
4430
4418
|
var RISKY_TABLE_MARKUP_RE = /<w:(ins|del|moveFrom|moveTo|rPrChange|pPrChange|tblPrChange|trPrChange|tcPrChange|sectPrChange|cellIns|cellDel|cellMerge|smartTag)\b/;
|
|
4431
|
-
var
|
|
4419
|
+
var SIMPLE_FIELD_INSTR_RE = /\bw:instr="([^"]*)"/g;
|
|
4432
4420
|
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;
|
|
4433
4421
|
function decodeXmlEntities(text) {
|
|
4434
4422
|
return text.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&");
|
|
@@ -4469,7 +4457,7 @@ function isSafeTableFieldInstruction(instruction) {
|
|
|
4469
4457
|
}
|
|
4470
4458
|
function tableRequiresOpaquePreservation(rawXml) {
|
|
4471
4459
|
if (RISKY_TABLE_MARKUP_RE.test(rawXml)) return true;
|
|
4472
|
-
const simpleInstructions = [...rawXml.matchAll(
|
|
4460
|
+
const simpleInstructions = [...rawXml.matchAll(SIMPLE_FIELD_INSTR_RE)].map(
|
|
4473
4461
|
(match) => match[1] ?? ""
|
|
4474
4462
|
);
|
|
4475
4463
|
const complexInstructions = extractComplexFieldInstructionsFromRaw(rawXml);
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
PAGE_STACK_GAP_PX,
|
|
4
4
|
defaultChromeReservations,
|
|
5
5
|
resolveDefaultZoom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZRHLLPSJ.js";
|
|
7
7
|
import {
|
|
8
8
|
storyTargetKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H6IL5ABU.js";
|
|
10
10
|
import {
|
|
11
11
|
MAIN_STORY_KEY,
|
|
12
12
|
collectCanonicalLayoutInputs,
|
|
13
13
|
collectStoryBlockContexts,
|
|
14
14
|
createHeaderFooterStoryKey,
|
|
15
15
|
createNoteStoryKey
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FNWKE74J.js";
|
|
17
17
|
import {
|
|
18
18
|
MAIN_STORY_TARGET
|
|
19
19
|
} from "./chunk-M2HUK3KF.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadDocxSessionAsync
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E5IBDE5E.js";
|
|
4
4
|
import {
|
|
5
5
|
buildCompatibilityReport,
|
|
6
6
|
createLoadScheduler
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ML4A4WUN.js";
|
|
8
8
|
import {
|
|
9
9
|
decodePersistedSourcePackageBytes,
|
|
10
10
|
hasValidPersistedSourcePackageDigest,
|