@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
package/dist/api/v3.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as MockPayload, A as ApiStatus, U as UxIntent, w as RuntimeApiHandle, x as UiControllerFactory, y as ApiV3Ui } from '../public-types-
|
|
2
|
-
export { z as AgentMetadata, B as AiPe2EvidenceOptions, D as AiPe2GraphOracleReference, F as AiPe2OracleEvidence, G as AiPe2OracleEvidenceProvider, H as AiPe2OracleEvidenceProviderInput, J as AiPe2OracleVerdict, K as ApiV3, N as ApiV3FnMetadata, O as ApiV3UiChrome, Q as ApiV3UiDebug, V as ApiV3UiLists, W as ApiV3UiOverlays, X as ApiV3UiSession, Y as ApiV3UiSurface, Z as ApiV3UiViewport, _ as BroadcastsVia, $ as ChromeDebugMode, a0 as ChromeDocumentMode, a1 as ChromeHostPosture, a2 as ChromeMarkupDisplay, a3 as ChromePosture, a4 as ChromeReviewMode, a5 as ChromeSurface, a6 as ChromeSurfaceKind, a7 as CreateApiV3Opts, a8 as DebugAttachment, a9 as DebugSession, aa as GeometryRect, ab as LiveEvidence, ac as MockShape, ad as OverlayAnchorQuery, ae as PersistsTo, af as ScrollTarget, ag as ScrollTargetBehavior, ah as SelectionRangeInput, ai as SourceLayer, aj as StateClass, ak as SubscriptionShape, al as UiBinding, am as UiController, an as UiControllerKind, ao as UiListCommand, ap as UiListCommandAvailability, aq as UiListCommandPreview, ar as UiListReadbackFilter, as as UiListReadbackSnapshot, at as UiListReadbackTarget, au as UiListener, av as UiUnsubscribe, aw as ViewportState, ax as createApiV3, ay as validateApiV3Metadata } from '../public-types-
|
|
1
|
+
import { v as MockPayload, A as ApiStatus, U as UxIntent, w as RuntimeApiHandle, x as UiControllerFactory, y as ApiV3Ui } from '../public-types-D31xKNGc.cjs';
|
|
2
|
+
export { z as AgentMetadata, B as AiPe2EvidenceOptions, D as AiPe2GraphOracleReference, F as AiPe2OracleEvidence, G as AiPe2OracleEvidenceProvider, H as AiPe2OracleEvidenceProviderInput, J as AiPe2OracleVerdict, K as ApiV3, N as ApiV3FnMetadata, O as ApiV3UiChrome, Q as ApiV3UiDebug, V as ApiV3UiLists, W as ApiV3UiOverlays, X as ApiV3UiSession, Y as ApiV3UiSurface, Z as ApiV3UiViewport, _ as BroadcastsVia, $ as ChromeDebugMode, a0 as ChromeDocumentMode, a1 as ChromeHostPosture, a2 as ChromeMarkupDisplay, a3 as ChromePosture, a4 as ChromeReviewMode, a5 as ChromeSurface, a6 as ChromeSurfaceKind, a7 as CreateApiV3Opts, a8 as DebugAttachment, a9 as DebugSession, aa as GeometryRect, ab as LiveEvidence, ac as MockShape, ad as OverlayAnchorQuery, ae as PersistsTo, af as ScrollTarget, ag as ScrollTargetBehavior, ah as SelectionRangeInput, ai as SourceLayer, aj as StateClass, ak as SubscriptionShape, al as UiBinding, am as UiController, an as UiControllerKind, ao as UiListCommand, ap as UiListCommandAvailability, aq as UiListCommandPreview, ar as UiListReadbackFilter, as as UiListReadbackSnapshot, at as UiListReadbackTarget, au as UiListener, av as UiUnsubscribe, aw as ViewportState, ax as createApiV3, ay as validateApiV3Metadata } from '../public-types-D31xKNGc.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
package/dist/api/v3.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as MockPayload, A as ApiStatus, U as UxIntent, w as RuntimeApiHandle, x as UiControllerFactory, y as ApiV3Ui } from '../public-types-
|
|
2
|
-
export { z as AgentMetadata, B as AiPe2EvidenceOptions, D as AiPe2GraphOracleReference, F as AiPe2OracleEvidence, G as AiPe2OracleEvidenceProvider, H as AiPe2OracleEvidenceProviderInput, J as AiPe2OracleVerdict, K as ApiV3, N as ApiV3FnMetadata, O as ApiV3UiChrome, Q as ApiV3UiDebug, V as ApiV3UiLists, W as ApiV3UiOverlays, X as ApiV3UiSession, Y as ApiV3UiSurface, Z as ApiV3UiViewport, _ as BroadcastsVia, $ as ChromeDebugMode, a0 as ChromeDocumentMode, a1 as ChromeHostPosture, a2 as ChromeMarkupDisplay, a3 as ChromePosture, a4 as ChromeReviewMode, a5 as ChromeSurface, a6 as ChromeSurfaceKind, a7 as CreateApiV3Opts, a8 as DebugAttachment, a9 as DebugSession, aa as GeometryRect, ab as LiveEvidence, ac as MockShape, ad as OverlayAnchorQuery, ae as PersistsTo, af as ScrollTarget, ag as ScrollTargetBehavior, ah as SelectionRangeInput, ai as SourceLayer, aj as StateClass, ak as SubscriptionShape, al as UiBinding, am as UiController, an as UiControllerKind, ao as UiListCommand, ap as UiListCommandAvailability, aq as UiListCommandPreview, ar as UiListReadbackFilter, as as UiListReadbackSnapshot, at as UiListReadbackTarget, au as UiListener, av as UiUnsubscribe, aw as ViewportState, ax as createApiV3, ay as validateApiV3Metadata } from '../public-types-
|
|
1
|
+
import { v as MockPayload, A as ApiStatus, U as UxIntent, w as RuntimeApiHandle, x as UiControllerFactory, y as ApiV3Ui } from '../public-types-DqYt8GdP.js';
|
|
2
|
+
export { z as AgentMetadata, B as AiPe2EvidenceOptions, D as AiPe2GraphOracleReference, F as AiPe2OracleEvidence, G as AiPe2OracleEvidenceProvider, H as AiPe2OracleEvidenceProviderInput, J as AiPe2OracleVerdict, K as ApiV3, N as ApiV3FnMetadata, O as ApiV3UiChrome, Q as ApiV3UiDebug, V as ApiV3UiLists, W as ApiV3UiOverlays, X as ApiV3UiSession, Y as ApiV3UiSurface, Z as ApiV3UiViewport, _ as BroadcastsVia, $ as ChromeDebugMode, a0 as ChromeDocumentMode, a1 as ChromeHostPosture, a2 as ChromeMarkupDisplay, a3 as ChromePosture, a4 as ChromeReviewMode, a5 as ChromeSurface, a6 as ChromeSurfaceKind, a7 as CreateApiV3Opts, a8 as DebugAttachment, a9 as DebugSession, aa as GeometryRect, ab as LiveEvidence, ac as MockShape, ad as OverlayAnchorQuery, ae as PersistsTo, af as ScrollTarget, ag as ScrollTargetBehavior, ah as SelectionRangeInput, ai as SourceLayer, aj as StateClass, ak as SubscriptionShape, al as UiBinding, am as UiController, an as UiControllerKind, ao as UiListCommand, ap as UiListCommandAvailability, aq as UiListCommandPreview, ar as UiListReadbackFilter, as as UiListReadbackSnapshot, at as UiListReadbackTarget, au as UiListener, av as UiUnsubscribe, aw as ViewportState, ax as createApiV3, ay as validateApiV3Metadata } from '../public-types-DqYt8GdP.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
package/dist/api/v3.js
CHANGED
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
mockId,
|
|
6
6
|
mockPayload,
|
|
7
7
|
validateApiV3Metadata
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-EPFVMUKF.js";
|
|
9
|
+
import "../chunk-5CCYF333.js";
|
|
10
10
|
import "../chunk-C2LWJ4CZ.js";
|
|
11
11
|
import {
|
|
12
12
|
createUiApi,
|
|
13
13
|
emitUxResponse
|
|
14
14
|
} from "../chunk-NJFKPDNG.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-P7XDEVS6.js";
|
|
16
16
|
import "../chunk-OVLZQ6FZ.js";
|
|
17
17
|
import "../chunk-QIO6V46H.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-EZFF6GKF.js";
|
|
19
19
|
import "../chunk-OYGMRRR7.js";
|
|
20
20
|
import "../chunk-V2JF42SI.js";
|
|
21
21
|
import "../chunk-EFEW7BTT.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-Y4XZCMCS.js";
|
|
4
4
|
import {
|
|
5
5
|
applyTextTransaction
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BJXSMPHD.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-TSNK4ECL.js";
|
|
15
15
|
import {
|
|
16
16
|
NO_EDITABLE_TARGETS_INDEX,
|
|
17
17
|
createEditorSurfaceSnapshot
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EZFF6GKF.js";
|
|
19
19
|
import {
|
|
20
20
|
createSelectionSnapshot
|
|
21
21
|
} from "./chunk-OYGMRRR7.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TextTransactionError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BJXSMPHD.js";
|
|
4
4
|
import {
|
|
5
5
|
replaceParagraphScope,
|
|
6
6
|
resolveParagraphScope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TSNK4ECL.js";
|
|
8
8
|
import {
|
|
9
9
|
cloneParagraphProperties,
|
|
10
10
|
cloneStoryUnit,
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
resolveSectionForStoryTarget,
|
|
8
8
|
searchSecondaryStories,
|
|
9
9
|
searchSurfaceBlocks
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-P7XDEVS6.js";
|
|
11
11
|
import {
|
|
12
12
|
createEditorSurfaceSnapshot,
|
|
13
13
|
createFormattingContext,
|
|
14
14
|
resolveTableStyleResolution
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EZFF6GKF.js";
|
|
16
16
|
import {
|
|
17
17
|
createSelectionSnapshot
|
|
18
18
|
} from "./chunk-OYGMRRR7.js";
|
|
@@ -2262,11 +2262,9 @@ function compileParagraphReplacement(entry, proposed, options) {
|
|
|
2262
2262
|
};
|
|
2263
2263
|
}
|
|
2264
2264
|
if (proposed.proposedContent.kind === "structured") {
|
|
2265
|
-
if (options.posture === "suggest-mode") {
|
|
2266
|
-
return null;
|
|
2267
|
-
}
|
|
2268
2265
|
const fragment = proposed.proposedContent.structured;
|
|
2269
2266
|
if (!isStructuredReplacementContent(fragment)) return null;
|
|
2267
|
+
const stepKind = options.posture === "suggest-mode" ? "fragment-replace-tracked" : "fragment-replace";
|
|
2270
2268
|
const blockCount = fragment.blocks.length;
|
|
2271
2269
|
const summaryScope = rangeKind === "inline-marker" ? `paragraph #${entry.blockIndex} inline-marker range [${effectiveRange.from}..${effectiveRange.to}]` : rangeKind === "opaque-preserving-text" ? `paragraph #${entry.blockIndex} opaque-preserving text range [${effectiveRange.from}..${effectiveRange.to}]` : `paragraph #${entry.blockIndex}`;
|
|
2272
2270
|
const actionVerb = proposed.operation === "insert-before" ? "insert before" : proposed.operation === "insert-after" ? "insert after" : "replace";
|
|
@@ -2277,8 +2275,8 @@ function compileParagraphReplacement(entry, proposed, options) {
|
|
|
2277
2275
|
operation: proposed.operation,
|
|
2278
2276
|
steps: Object.freeze([
|
|
2279
2277
|
{
|
|
2280
|
-
kind:
|
|
2281
|
-
summary: actionSummary
|
|
2278
|
+
kind: stepKind,
|
|
2279
|
+
summary: stepKind === "fragment-replace" ? actionSummary : `suggest-mode ${actionSummary}`,
|
|
2282
2280
|
...textLeafEditableTargetHint(entry, blockRange) ? { editableTargetHint: textLeafEditableTargetHint(entry, blockRange) } : {},
|
|
2283
2281
|
range: { from: operationRange.from, to: operationRange.to },
|
|
2284
2282
|
fragment
|
|
@@ -2365,7 +2363,7 @@ function compileScopeKind(entry, options) {
|
|
|
2365
2363
|
};
|
|
2366
2364
|
}
|
|
2367
2365
|
function compileScopeReplacement(entry, proposed, options) {
|
|
2368
|
-
if (entry.handle.provenance !== "marker-backed" || proposed.operation !== "replace"
|
|
2366
|
+
if (entry.handle.provenance !== "marker-backed" || proposed.operation !== "replace") {
|
|
2369
2367
|
return null;
|
|
2370
2368
|
}
|
|
2371
2369
|
const markerRange = buildScopePositionMap(options.document).markerScopes.get(
|
|
@@ -2374,14 +2372,15 @@ function compileScopeReplacement(entry, proposed, options) {
|
|
|
2374
2372
|
if (!markerRange) return null;
|
|
2375
2373
|
if (proposed.proposedContent.kind === "text") {
|
|
2376
2374
|
const text = proposed.proposedContent.text ?? "";
|
|
2375
|
+
const stepKind = options.posture === "suggest-mode" ? "text-insert-tracked" : "text-replace";
|
|
2377
2376
|
return {
|
|
2378
2377
|
scopeId: entry.handle.scopeId,
|
|
2379
2378
|
targetKind: "scope",
|
|
2380
2379
|
operation: proposed.operation,
|
|
2381
2380
|
steps: Object.freeze([
|
|
2382
2381
|
{
|
|
2383
|
-
kind:
|
|
2384
|
-
summary: `replace multi-paragraph scope ${entry.handle.scopeId} text [${markerRange.from}..${markerRange.to}] (len ${text.length})`,
|
|
2382
|
+
kind: stepKind,
|
|
2383
|
+
summary: stepKind === "text-replace" ? `replace multi-paragraph scope ${entry.handle.scopeId} text [${markerRange.from}..${markerRange.to}] (len ${text.length})` : `suggest-mode replace multi-paragraph scope ${entry.handle.scopeId} text [${markerRange.from}..${markerRange.to}] (len ${text.length})`,
|
|
2385
2384
|
range: { from: markerRange.from, to: markerRange.to },
|
|
2386
2385
|
text,
|
|
2387
2386
|
...proposed.formatting ? { formatting: proposed.formatting } : {}
|
|
@@ -2394,14 +2393,15 @@ function compileScopeReplacement(entry, proposed, options) {
|
|
|
2394
2393
|
if (proposed.proposedContent.kind === "structured") {
|
|
2395
2394
|
const fragment = proposed.proposedContent.structured;
|
|
2396
2395
|
if (!isStructuredReplacementContent(fragment)) return null;
|
|
2396
|
+
const stepKind = options.posture === "suggest-mode" ? "fragment-replace-tracked" : "fragment-replace";
|
|
2397
2397
|
return {
|
|
2398
2398
|
scopeId: entry.handle.scopeId,
|
|
2399
2399
|
targetKind: "scope",
|
|
2400
2400
|
operation: proposed.operation,
|
|
2401
2401
|
steps: Object.freeze([
|
|
2402
2402
|
{
|
|
2403
|
-
kind:
|
|
2404
|
-
summary: `replace multi-paragraph scope ${entry.handle.scopeId} with structured fragment [${markerRange.from}..${markerRange.to}] (${fragment.blocks.length} block(s))`,
|
|
2403
|
+
kind: stepKind,
|
|
2404
|
+
summary: stepKind === "fragment-replace" ? `replace multi-paragraph scope ${entry.handle.scopeId} with structured fragment [${markerRange.from}..${markerRange.to}] (${fragment.blocks.length} block(s))` : `suggest-mode replace multi-paragraph scope ${entry.handle.scopeId} with structured fragment [${markerRange.from}..${markerRange.to}] (${fragment.blocks.length} block(s))`,
|
|
2405
2405
|
range: { from: markerRange.from, to: markerRange.to },
|
|
2406
2406
|
fragment
|
|
2407
2407
|
}
|
|
@@ -2783,6 +2783,99 @@ function paragraphFirstMarkerStart(paragraph, knownScopeIds) {
|
|
|
2783
2783
|
}
|
|
2784
2784
|
return null;
|
|
2785
2785
|
}
|
|
2786
|
+
function paragraphHasMarkerEnd(paragraph, scopeId) {
|
|
2787
|
+
return paragraph.children.some(
|
|
2788
|
+
(child) => child.type === "scope_marker_end" && child.scopeId === scopeId
|
|
2789
|
+
);
|
|
2790
|
+
}
|
|
2791
|
+
function paragraphSameParagraphMarkerScopeId(paragraph, knownScopeIds) {
|
|
2792
|
+
const markerScopeId = paragraphFirstMarkerStart(paragraph, knownScopeIds);
|
|
2793
|
+
if (!markerScopeId) return null;
|
|
2794
|
+
return paragraphHasMarkerEnd(paragraph, markerScopeId) ? markerScopeId : null;
|
|
2795
|
+
}
|
|
2796
|
+
function markerStableRefOverride(markerScopeId, semanticPath, overlay) {
|
|
2797
|
+
const hint = stableRefHintForScopeId(markerScopeId, overlay);
|
|
2798
|
+
if (hint === "semantic-path") {
|
|
2799
|
+
return {
|
|
2800
|
+
kind: "semantic-path",
|
|
2801
|
+
value: semanticPath.join("/")
|
|
2802
|
+
};
|
|
2803
|
+
}
|
|
2804
|
+
return { kind: "scope-id", value: markerScopeId };
|
|
2805
|
+
}
|
|
2806
|
+
function enumerateNestedMarkerBackedParagraphs(blocks, input) {
|
|
2807
|
+
const out = [];
|
|
2808
|
+
for (let childIndex = 0; childIndex < blocks.length; childIndex += 1) {
|
|
2809
|
+
const block = blocks[childIndex];
|
|
2810
|
+
if (!block) continue;
|
|
2811
|
+
if (block.type === "paragraph") {
|
|
2812
|
+
const markerScopeId = paragraphSameParagraphMarkerScopeId(
|
|
2813
|
+
block,
|
|
2814
|
+
input.knownOverlayScopeIds
|
|
2815
|
+
);
|
|
2816
|
+
if (!markerScopeId) continue;
|
|
2817
|
+
const kind = detectParagraphKind(block);
|
|
2818
|
+
const semanticPath = [
|
|
2819
|
+
...input.semanticPrefix,
|
|
2820
|
+
kind,
|
|
2821
|
+
String(childIndex)
|
|
2822
|
+
];
|
|
2823
|
+
const handle = buildHandle(
|
|
2824
|
+
markerScopeId,
|
|
2825
|
+
input.documentId,
|
|
2826
|
+
semanticPath,
|
|
2827
|
+
"marker-backed",
|
|
2828
|
+
"marker-backed",
|
|
2829
|
+
input.parentScopeId,
|
|
2830
|
+
markerStableRefOverride(markerScopeId, semanticPath, input.overlay)
|
|
2831
|
+
);
|
|
2832
|
+
out.push({
|
|
2833
|
+
kind,
|
|
2834
|
+
handle,
|
|
2835
|
+
paragraph: block,
|
|
2836
|
+
blockIndex: input.rootBlockIndex,
|
|
2837
|
+
classifications: input.classificationIndex.get(markerScopeId) ?? Object.freeze([])
|
|
2838
|
+
});
|
|
2839
|
+
continue;
|
|
2840
|
+
}
|
|
2841
|
+
if (block.type === "sdt") {
|
|
2842
|
+
out.push(
|
|
2843
|
+
...enumerateNestedMarkerBackedParagraphs(block.children, {
|
|
2844
|
+
...input,
|
|
2845
|
+
semanticPrefix: [
|
|
2846
|
+
...input.semanticPrefix,
|
|
2847
|
+
"sdt",
|
|
2848
|
+
String(childIndex)
|
|
2849
|
+
]
|
|
2850
|
+
})
|
|
2851
|
+
);
|
|
2852
|
+
continue;
|
|
2853
|
+
}
|
|
2854
|
+
if (block.type === "table") {
|
|
2855
|
+
for (let rowIdx = 0; rowIdx < block.rows.length; rowIdx += 1) {
|
|
2856
|
+
const row = block.rows[rowIdx];
|
|
2857
|
+
for (let cellIdx = 0; cellIdx < row.cells.length; cellIdx += 1) {
|
|
2858
|
+
const cell = row.cells[cellIdx];
|
|
2859
|
+
out.push(
|
|
2860
|
+
...enumerateNestedMarkerBackedParagraphs(cell.children, {
|
|
2861
|
+
...input,
|
|
2862
|
+
semanticPrefix: [
|
|
2863
|
+
...input.semanticPrefix,
|
|
2864
|
+
"table",
|
|
2865
|
+
String(childIndex),
|
|
2866
|
+
"row",
|
|
2867
|
+
String(rowIdx),
|
|
2868
|
+
"cell",
|
|
2869
|
+
String(cellIdx)
|
|
2870
|
+
]
|
|
2871
|
+
})
|
|
2872
|
+
);
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
return out;
|
|
2878
|
+
}
|
|
2786
2879
|
function enumerateFieldsInParagraph(paragraph, blockIndex, documentId, parentScopeId) {
|
|
2787
2880
|
const out = [];
|
|
2788
2881
|
for (let i = 0; i < paragraph.children.length; i += 1) {
|
|
@@ -3065,6 +3158,17 @@ function enumerateScopes(document, inputs = {}) {
|
|
|
3065
3158
|
cellIndex: cellIdx,
|
|
3066
3159
|
classifications: Object.freeze([])
|
|
3067
3160
|
});
|
|
3161
|
+
for (const nested of enumerateNestedMarkerBackedParagraphs(cell.children, {
|
|
3162
|
+
documentId,
|
|
3163
|
+
rootBlockIndex: index,
|
|
3164
|
+
semanticPrefix: cellSemanticPath,
|
|
3165
|
+
parentScopeId: cellScopeId,
|
|
3166
|
+
knownOverlayScopeIds,
|
|
3167
|
+
classificationIndex,
|
|
3168
|
+
overlay: inputs.overlay
|
|
3169
|
+
})) {
|
|
3170
|
+
results.push(nested);
|
|
3171
|
+
}
|
|
3068
3172
|
}
|
|
3069
3173
|
}
|
|
3070
3174
|
}
|
|
@@ -3550,16 +3654,12 @@ function replaceTextCapability(scope, context) {
|
|
|
3550
3654
|
);
|
|
3551
3655
|
}
|
|
3552
3656
|
if (scope.kind === "scope") {
|
|
3553
|
-
if (scope.workflow.effectiveMode === "suggest") {
|
|
3554
|
-
return unsupported(
|
|
3555
|
-
"compile-refused:scope:multi-paragraph-suggesting-not-implemented",
|
|
3556
|
-
["compile-refused:scope:multi-paragraph-suggesting-not-implemented"],
|
|
3557
|
-
["guard:suggest-mode", ...evidenceWarnings(context)]
|
|
3558
|
-
);
|
|
3559
|
-
}
|
|
3560
3657
|
return supported(
|
|
3561
3658
|
"compile-supported:scope:multi-paragraph-text-replace",
|
|
3562
|
-
|
|
3659
|
+
[
|
|
3660
|
+
...scope.workflow.effectiveMode === "suggest" ? ["guard:suggest-mode"] : [],
|
|
3661
|
+
...evidenceWarnings(context)
|
|
3662
|
+
]
|
|
3563
3663
|
);
|
|
3564
3664
|
}
|
|
3565
3665
|
if (!PARAGRAPH_LIKE.has(scope.kind)) {
|
|
@@ -3613,34 +3713,24 @@ function replaceFragmentCapability(scope, context) {
|
|
|
3613
3713
|
);
|
|
3614
3714
|
}
|
|
3615
3715
|
if (scope.kind === "scope") {
|
|
3616
|
-
if (scope.workflow.effectiveMode === "suggest") {
|
|
3617
|
-
return unsupported(
|
|
3618
|
-
"compile-refused:scope:multi-paragraph-structured-suggesting-not-implemented",
|
|
3619
|
-
[
|
|
3620
|
-
"compile-refused:scope:multi-paragraph-structured-suggesting-not-implemented"
|
|
3621
|
-
],
|
|
3622
|
-
["guard:suggest-mode", ...evidenceWarnings(context)]
|
|
3623
|
-
);
|
|
3624
|
-
}
|
|
3625
3716
|
return supported(
|
|
3626
3717
|
"compile-supported:scope:multi-paragraph-fragment-replace",
|
|
3627
|
-
|
|
3718
|
+
[
|
|
3719
|
+
...scope.workflow.effectiveMode === "suggest" ? ["guard:suggest-mode"] : [],
|
|
3720
|
+
...evidenceWarnings(context)
|
|
3721
|
+
]
|
|
3628
3722
|
);
|
|
3629
3723
|
}
|
|
3630
3724
|
if (!PARAGRAPH_LIKE.has(scope.kind)) {
|
|
3631
3725
|
const reason = `compile-refused:${scope.kind}`;
|
|
3632
3726
|
return unsupported(reason, [reason], evidenceWarnings(context));
|
|
3633
3727
|
}
|
|
3634
|
-
if (scope.workflow.effectiveMode === "suggest") {
|
|
3635
|
-
return unsupported(
|
|
3636
|
-
`compile-refused:${scope.kind}:structured-suggesting-not-implemented`,
|
|
3637
|
-
[`compile-refused:${scope.kind}:structured-suggesting-not-implemented`],
|
|
3638
|
-
["guard:suggest-mode"]
|
|
3639
|
-
);
|
|
3640
|
-
}
|
|
3641
3728
|
return supported(
|
|
3642
|
-
"compile-supported:paragraph-like:fragment-replace",
|
|
3643
|
-
|
|
3729
|
+
scope.workflow.effectiveMode === "suggest" ? "compile-supported:paragraph-like:fragment-replace-tracked" : "compile-supported:paragraph-like:fragment-replace",
|
|
3730
|
+
[
|
|
3731
|
+
...scope.workflow.effectiveMode === "suggest" ? ["guard:suggest-mode"] : [],
|
|
3732
|
+
...evidenceWarnings(context)
|
|
3733
|
+
]
|
|
3644
3734
|
);
|
|
3645
3735
|
}
|
|
3646
3736
|
function formattingCapability(scope, context) {
|
|
@@ -4694,6 +4784,14 @@ function supportedNonTextCommandEvidence(target) {
|
|
|
4694
4784
|
if (target.commandFamily === "link-bookmark") {
|
|
4695
4785
|
return linkBookmarkCommandEvidence(target, []);
|
|
4696
4786
|
}
|
|
4787
|
+
if (target.commandFamily === "object" && isImageObjectTarget(target) && typeof target.object?.mediaId === "string" && target.object.mediaId.length > 0 && onlyBlockers(target.posture.blockers, ["unmodeled-target"])) {
|
|
4788
|
+
return {
|
|
4789
|
+
status: "supported",
|
|
4790
|
+
commandFamily: target.commandFamily,
|
|
4791
|
+
intents: commandIntentsForTarget(target),
|
|
4792
|
+
reason: "l07:image-layout-target-supported"
|
|
4793
|
+
};
|
|
4794
|
+
}
|
|
4697
4795
|
return null;
|
|
4698
4796
|
}
|
|
4699
4797
|
function onlyBlockers(blockers, allowed) {
|
|
@@ -7593,9 +7691,7 @@ function applyScopeReplacement(inputs) {
|
|
|
7593
7691
|
});
|
|
7594
7692
|
if (!plan) {
|
|
7595
7693
|
const paragraphLike = resolvedScope.kind === "paragraph" || resolvedScope.kind === "heading" || resolvedScope.kind === "list-item";
|
|
7596
|
-
const blockers = resolvedScope.kind === "scope" &&
|
|
7597
|
-
proposed.proposedContent.kind === "structured" ? "compile-refused:scope:multi-paragraph-structured-suggesting-not-implemented" : "compile-refused:scope:multi-paragraph-suggesting-not-implemented"
|
|
7598
|
-
] : resolvedScope.kind === "scope" && proposed.operation !== "replace" ? [
|
|
7694
|
+
const blockers = resolvedScope.kind === "scope" && proposed.operation !== "replace" ? [
|
|
7599
7695
|
`compile-refused:scope:operation-not-implemented:${proposed.operation}`
|
|
7600
7696
|
] : resolvedScope.kind === "scope" ? multiParagraphReplacementBlockers(
|
|
7601
7697
|
proposed.proposedContent.kind === "structured" ? "fragment" : "text"
|