@beyondwork/docx-react-component 1.0.129 → 1.0.131
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 +595 -18
- package/dist/api/public-types.d.cts +1 -1
- package/dist/api/public-types.d.ts +1 -1
- package/dist/api/public-types.js +4 -4
- package/dist/api/v3.cjs +1164 -332
- package/dist/api/v3.d.cts +2 -2
- package/dist/api/v3.d.ts +2 -2
- package/dist/api/v3.js +13 -13
- package/dist/{chunk-OTQIW2TC.js → chunk-35RHOE6I.js} +105 -4
- package/dist/{chunk-PGKUJZXV.js → chunk-3YCQM2RV.js} +6 -6
- package/dist/{chunk-JJGVE5J7.js → chunk-4YCWECLZ.js} +1 -1
- package/dist/{chunk-EZKJXIPH.js → chunk-6TBLDBCL.js} +1 -1
- package/dist/{chunk-SKPTKQHF.js → chunk-7G5GR3VV.js} +122 -23
- package/dist/{chunk-HUIHBBAQ.js → chunk-A3GSNB4G.js} +17 -6
- package/dist/{chunk-5DGKFNQT.js → chunk-A66ZVUAT.js} +150 -1
- package/dist/{chunk-YIYM4ZAP.js → chunk-CI2TD3T4.js} +1 -1
- package/dist/{chunk-63FYIGCT.js → chunk-DGA7M77X.js} +2 -2
- package/dist/{chunk-EB6M3GE6.js → chunk-FM4K4XFJ.js} +100 -97
- package/dist/{chunk-VNLDQJ47.js → chunk-HYHCRMR7.js} +1 -1
- package/dist/{chunk-DJU2W4E4.js → chunk-KNHMXKC6.js} +2 -2
- package/dist/{chunk-Q3QYGKFE.js → chunk-M7YRJX6V.js} +10 -21
- package/dist/{chunk-KFCQYZXR.js → chunk-OVLZQ6FZ.js} +61 -0
- package/dist/{chunk-W34X3KBR.js → chunk-PHMWH23E.js} +1 -1
- package/dist/{chunk-DDN2AIGE.js → chunk-Q7Y57KOK.js} +2 -2
- package/dist/{chunk-LJH64PV3.js → chunk-QXKQPUOM.js} +3 -3
- package/dist/{chunk-CX42VC67.js → chunk-SYQWQ6FE.js} +1 -1
- package/dist/{chunk-5DSHUYSY.js → chunk-T5YYFDZB.js} +1 -1
- package/dist/{chunk-RMRTQGW3.js → chunk-THVM6EP5.js} +371 -13
- package/dist/{chunk-XMHSGPLN.js → chunk-VRKK2CSZ.js} +111 -90
- package/dist/{chunk-OL2UEHRP.js → chunk-WUDSNHWF.js} +1 -1
- package/dist/{chunk-XQCAMKIQ.js → chunk-WZDKNF37.js} +250 -106
- package/dist/{chunk-PRAZBHNF.js → chunk-YLL7MF5C.js} +15 -15
- package/dist/{chunk-YZDZ4FGR.js → chunk-ZVC23LKV.js} +1 -1
- package/dist/compare.cjs +100 -97
- package/dist/compare.js +3 -3
- 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 +16 -5
- 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 +5 -5
- 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 +16 -5
- 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 +4 -4
- package/dist/core/commands/text-commands.cjs +16 -5
- 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 +5 -5
- 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 +1280 -347
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +24 -24
- package/dist/io/docx-session.cjs +216 -203
- package/dist/io/docx-session.d.cts +3 -3
- package/dist/io/docx-session.d.ts +3 -3
- package/dist/io/docx-session.js +6 -6
- package/dist/legal.cjs +9 -20
- package/dist/legal.js +3 -3
- package/dist/{loader-4qsw4eIU.d.ts → loader-B-aL5HGD.d.ts} +2 -2
- package/dist/{loader-B8TKhmQi.d.cts → loader-DiY_ZgKl.d.cts} +2 -2
- package/dist/{measurement-backend-canvas-Q3MJMEYX.js → measurement-backend-canvas-F7ZYDACK.js} +1 -1
- package/dist/{public-types-p9b8rfy8.d.ts → public-types-DyqnxxO9.d.ts} +124 -1
- package/dist/{public-types-B5CRoR6f.d.cts → public-types-gvubspUI.d.cts} +124 -1
- package/dist/public-types.cjs +595 -18
- package/dist/public-types.d.cts +1 -1
- package/dist/public-types.d.ts +1 -1
- package/dist/public-types.js +4 -4
- package/dist/runtime/collab.d.cts +2 -2
- package/dist/runtime/collab.d.ts +2 -2
- package/dist/runtime/document-runtime.cjs +908 -129
- package/dist/runtime/document-runtime.d.cts +1 -1
- package/dist/runtime/document-runtime.d.ts +1 -1
- package/dist/runtime/document-runtime.js +17 -17
- package/dist/{session-BnGIjaex.d.cts → session-BUN6B-Vj.d.cts} +2 -2
- package/dist/{session-vEYKf-w3.d.ts → session-CDB0hohT.d.ts} +2 -2
- package/dist/session.cjs +216 -203
- package/dist/session.d.cts +4 -4
- package/dist/session.d.ts +4 -4
- package/dist/session.js +7 -7
- package/dist/tailwind.cjs +595 -18
- package/dist/tailwind.d.cts +1 -1
- package/dist/tailwind.d.ts +1 -1
- package/dist/tailwind.js +8 -8
- package/dist/{types-BLuvZ6cQ.d.cts → types-C4bz3kDU.d.cts} +1 -1
- package/dist/{types-Dutlyj0T.d.ts → types-VWH6CRvG.d.ts} +1 -1
- 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 +5 -5
- package/dist/ui-tailwind.cjs +595 -18
- package/dist/ui-tailwind.d.cts +2 -2
- package/dist/ui-tailwind.d.ts +2 -2
- package/dist/ui-tailwind.js +8 -8
- package/package.json +4 -1
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
resolveScopeRange,
|
|
19
19
|
scopeSpecificity,
|
|
20
20
|
searchDocument
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7G5GR3VV.js";
|
|
22
22
|
import {
|
|
23
23
|
BROADCAST_COMMAND_TYPES,
|
|
24
24
|
COMMAND_EVENT_SCHEMA_VERSION,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
buildPageAnchorElementId,
|
|
30
30
|
createUiApi,
|
|
31
31
|
emitUxResponse
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-CI2TD3T4.js";
|
|
33
33
|
import {
|
|
34
34
|
DEFAULT_PX_PER_TWIP,
|
|
35
35
|
DEFAULT_REGISTRY_ENTRIES,
|
|
@@ -37,24 +37,24 @@ import {
|
|
|
37
37
|
LAYCACHE_SCHEMA_VERSION,
|
|
38
38
|
LAYOUT_ENGINE_VERSION,
|
|
39
39
|
createScopeTagRegistry
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-THVM6EP5.js";
|
|
41
41
|
import {
|
|
42
42
|
chartModelStore,
|
|
43
43
|
createFormattingContext
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-A3GSNB4G.js";
|
|
45
45
|
import {
|
|
46
46
|
createSelectionSnapshot,
|
|
47
47
|
deriveDocumentStats
|
|
48
48
|
} from "./chunk-OYGMRRR7.js";
|
|
49
49
|
import {
|
|
50
50
|
DocxSession
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-DGA7M77X.js";
|
|
52
52
|
import {
|
|
53
53
|
WORKFLOW_PAYLOAD_PART_PATH,
|
|
54
54
|
buildEditorStateXml,
|
|
55
55
|
parseEditorStateXml,
|
|
56
56
|
parseWorkflowPayloadEnvelopeFromPackage
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-VRKK2CSZ.js";
|
|
58
58
|
import {
|
|
59
59
|
EMU_PER_PX,
|
|
60
60
|
GRADIENT_STOP_UNITS,
|
|
@@ -63,10 +63,10 @@ import {
|
|
|
63
63
|
createHeaderFooterStoryKey,
|
|
64
64
|
createNoteStoryKey,
|
|
65
65
|
validateEditableTargetRef
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-A66ZVUAT.js";
|
|
67
67
|
import {
|
|
68
68
|
readOpcPackage
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-WUDSNHWF.js";
|
|
70
70
|
|
|
71
71
|
// src/api/v3/_mocks.ts
|
|
72
72
|
function mockPayload(reason, shape, body) {
|
|
@@ -6775,7 +6775,7 @@ var listOperationMetadata = actionMethodMetadata(
|
|
|
6775
6775
|
"listOperation",
|
|
6776
6776
|
"mutate",
|
|
6777
6777
|
"actions-list-operation",
|
|
6778
|
-
"Apply list toggle, indent, outdent, restart, or continue-numbering commands
|
|
6778
|
+
"Apply list toggle, indent, outdent, restart, or continue-numbering commands through opaque list action handles or command-safe list scope targets.",
|
|
6779
6779
|
{
|
|
6780
6780
|
uiVisible: true,
|
|
6781
6781
|
expectsUxResponse: "inline-change",
|
|
@@ -8510,25 +8510,16 @@ function checkPlanStepCapability(runtime, step, before) {
|
|
|
8510
8510
|
return null;
|
|
8511
8511
|
}
|
|
8512
8512
|
if (step.kind === "listOperation") {
|
|
8513
|
-
const resolved =
|
|
8513
|
+
const resolved = resolveListOperationTarget(runtime, step.target);
|
|
8514
8514
|
if (!resolved.ok) return resolved.blockerDetails[0] ?? null;
|
|
8515
|
-
const
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
);
|
|
8523
|
-
}
|
|
8524
|
-
if (paragraphIndexFromHandle(scope.handle) === null) {
|
|
8525
|
-
return blockerWithOwner(
|
|
8526
|
-
`actions:list-operation:paragraph-index-unresolved:${scope.handle.scopeId}`,
|
|
8527
|
-
"blocked",
|
|
8528
|
-
"The list operation target did not resolve to a current paragraph index.",
|
|
8529
|
-
"Refresh the scope handle and retry; route persistent failures to L08 scope resolution.",
|
|
8530
|
-
"L08 semantic scope compiler"
|
|
8531
|
-
);
|
|
8515
|
+
const command = runtimeListCommandForOperation(step.operation);
|
|
8516
|
+
const preview = createListsFamily(runtime).previewCommand({
|
|
8517
|
+
...resolved.input,
|
|
8518
|
+
command,
|
|
8519
|
+
...step.operation.kind === "restart-numbering" && step.operation.startAt !== void 0 ? { startAt: step.operation.startAt } : {}
|
|
8520
|
+
});
|
|
8521
|
+
if (preview.blockers.length > 0) {
|
|
8522
|
+
return listBlockerDetails("actions:list-operation:preflight", preview.blockers)[0] ?? null;
|
|
8532
8523
|
}
|
|
8533
8524
|
return null;
|
|
8534
8525
|
}
|
|
@@ -8685,70 +8676,253 @@ function applyModeledCommand(runtime, targetInput, kind, commandInput, reference
|
|
|
8685
8676
|
};
|
|
8686
8677
|
}
|
|
8687
8678
|
function applyListOperation(runtime, input) {
|
|
8688
|
-
const
|
|
8689
|
-
if (!
|
|
8679
|
+
const resolvedTarget = resolveListOperationTarget(runtime, input.target);
|
|
8680
|
+
if (!resolvedTarget.ok) return blockedApplyFromResolution(resolvedTarget);
|
|
8681
|
+
const command = runtimeListCommandForOperation(input.operation);
|
|
8682
|
+
const result = createListsFamily(runtime).applyCommand({
|
|
8683
|
+
...resolvedTarget.input,
|
|
8684
|
+
command,
|
|
8685
|
+
...input.operation.kind === "restart-numbering" && input.operation.startAt !== void 0 ? { startAt: input.operation.startAt } : {}
|
|
8686
|
+
});
|
|
8687
|
+
if (!result.applied) {
|
|
8688
|
+
const details = result.blockers.length > 0 ? listBlockerDetails("actions:list-operation", result.blockers) : [
|
|
8689
|
+
blockerWithOwner(
|
|
8690
|
+
`actions:list-operation:runtime-noop:${resolvedTarget.before?.addressKey ?? "unknown"}`,
|
|
8691
|
+
"blocked",
|
|
8692
|
+
"The runtime list command produced no document change for the selected list target.",
|
|
8693
|
+
"Refresh the list action handle and retry; route persistent failures with before/after readback to L07 runtime list commands.",
|
|
8694
|
+
"L07 runtime list commands"
|
|
8695
|
+
)
|
|
8696
|
+
];
|
|
8697
|
+
return {
|
|
8698
|
+
status: details.some((detail) => detail.category === "unsupported") ? "unsupported" : "blocked",
|
|
8699
|
+
applied: false,
|
|
8700
|
+
changed: false,
|
|
8701
|
+
target: summarizeListTarget(resolvedTarget, result.before ?? resolvedTarget.before),
|
|
8702
|
+
blockers: Object.freeze(details.map((detail) => detail.code)),
|
|
8703
|
+
blockerDetails: Object.freeze(details),
|
|
8704
|
+
listReadback: listOperationReadback(result, resolvedTarget.before)
|
|
8705
|
+
};
|
|
8706
|
+
}
|
|
8707
|
+
const compiledAfter = resolvedTarget.scopeHandle ? createScopeCompilerService(runtime).compileScopeById(resolvedTarget.scopeHandle.scopeId) : null;
|
|
8708
|
+
const target = compiledAfter ? summarizeTarget({ kind: "scope", scope: compiledAfter.scope, handle: compiledAfter.scope.handle }) : summarizeListTarget(resolvedTarget, result.after ?? result.before ?? resolvedTarget.before);
|
|
8709
|
+
return {
|
|
8710
|
+
status: "applied",
|
|
8711
|
+
applied: true,
|
|
8712
|
+
changed: result.applied,
|
|
8713
|
+
target,
|
|
8714
|
+
commandReference: {
|
|
8715
|
+
command: commandReferenceForListCommand(result.command),
|
|
8716
|
+
actorId: input.actorId ?? "v3-ai-api",
|
|
8717
|
+
origin: input.origin ?? "agent",
|
|
8718
|
+
emittedAtUtc: currentAuditTimestamp(runtime)
|
|
8719
|
+
},
|
|
8720
|
+
listReadback: listOperationReadback(result, resolvedTarget.before)
|
|
8721
|
+
};
|
|
8722
|
+
}
|
|
8723
|
+
function resolveListOperationTarget(runtime, targetInput) {
|
|
8724
|
+
const lists = createListsFamily(runtime);
|
|
8725
|
+
if ("actionHandle" in targetInput) {
|
|
8726
|
+
const addressKey = listAddressKeyFromActionHandle(targetInput.actionHandle);
|
|
8727
|
+
if (!addressKey) {
|
|
8728
|
+
const detail = blockerWithOwner(
|
|
8729
|
+
`actions:list-operation:action-handle-malformed:${targetInput.actionHandle}`,
|
|
8730
|
+
"unsupported",
|
|
8731
|
+
"List operations require an opaque list action handle from runtime.lists or list editable-target evidence.",
|
|
8732
|
+
"Call runtime.lists.list or refresh the scope bundle and retry with a list-action:* or scope-command:text-leaf:* list handle.",
|
|
8733
|
+
"L07 runtime list commands and L08 semantic scopes"
|
|
8734
|
+
);
|
|
8735
|
+
return {
|
|
8736
|
+
ok: false,
|
|
8737
|
+
blockers: Object.freeze([detail.code]),
|
|
8738
|
+
blockerDetails: Object.freeze([detail])
|
|
8739
|
+
};
|
|
8740
|
+
}
|
|
8741
|
+
const before2 = lists.get({ addressKey });
|
|
8742
|
+
if (!before2) {
|
|
8743
|
+
const detail = blockerWithOwner(
|
|
8744
|
+
`actions:list-operation:action-handle-not-found:${targetInput.actionHandle}`,
|
|
8745
|
+
"unresolved-target",
|
|
8746
|
+
"No current list target matches the supplied opaque action handle.",
|
|
8747
|
+
"Refresh runtime.lists.list or the scope bundle, then retry with the current list action handle.",
|
|
8748
|
+
"L07 runtime list commands"
|
|
8749
|
+
);
|
|
8750
|
+
return {
|
|
8751
|
+
ok: false,
|
|
8752
|
+
blockers: Object.freeze([detail.code]),
|
|
8753
|
+
blockerDetails: Object.freeze([detail])
|
|
8754
|
+
};
|
|
8755
|
+
}
|
|
8756
|
+
return { ok: true, input: { addressKey }, before: before2 };
|
|
8757
|
+
}
|
|
8758
|
+
const resolvedScope = resolveScopeExactTarget(runtime, targetInput, "listOperation");
|
|
8759
|
+
if (!resolvedScope.ok) return resolvedScope;
|
|
8690
8760
|
const scope = resolvedScope.target.scope;
|
|
8691
8761
|
if (scope.kind !== "list-item" && scope.kind !== "paragraph" && scope.kind !== "heading") {
|
|
8692
|
-
|
|
8762
|
+
const detail = blocker(
|
|
8693
8763
|
`actions:list-operation:target-kind-unsupported:${scope.kind}`,
|
|
8694
8764
|
"unsupported",
|
|
8695
|
-
"List operations require a paragraph-like scope
|
|
8696
|
-
"Use ai.actions.locateAll
|
|
8765
|
+
"List operations require a list item or command-safe paragraph-like scope target.",
|
|
8766
|
+
"Use ai.actions.locateAll, ai.listScopes, or runtime.lists.list to select a current list item target."
|
|
8697
8767
|
);
|
|
8768
|
+
return {
|
|
8769
|
+
ok: false,
|
|
8770
|
+
blockers: Object.freeze([detail.code]),
|
|
8771
|
+
blockerDetails: Object.freeze([detail])
|
|
8772
|
+
};
|
|
8698
8773
|
}
|
|
8699
|
-
const
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8774
|
+
const bundle = createScopeCompilerService(runtime).compileBundleById(
|
|
8775
|
+
scope.handle.scopeId,
|
|
8776
|
+
currentAuditTimestamp(runtime)
|
|
8777
|
+
);
|
|
8778
|
+
const entries = bundle?.evidence.editableTargets?.entries ?? [];
|
|
8779
|
+
const listEntry = entries.find(
|
|
8780
|
+
(entry) => entry.commandFamily === "text-leaf" && entry.runtimeCommand.status === "supported" && entry.runtimeCommand.intents.includes("list-structure-action") && entry.runtimeCommand.canonicalAddress?.operationScope === "list-text" && entry.runtimeCommand.canonicalAddress.addressKind === "list-item-text"
|
|
8781
|
+
);
|
|
8782
|
+
if (!listEntry) {
|
|
8783
|
+
const detail = blockerWithOwner(
|
|
8784
|
+
`actions:list-operation:list-target-missing:${scope.handle.scopeId}`,
|
|
8703
8785
|
"blocked",
|
|
8704
|
-
"The
|
|
8705
|
-
"Refresh the scope
|
|
8706
|
-
|
|
8707
|
-
blockerWithOwner(
|
|
8708
|
-
`actions:list-operation:paragraph-index-unresolved:${scope.handle.scopeId}`,
|
|
8709
|
-
"blocked",
|
|
8710
|
-
"The list operation target did not resolve to a current paragraph index.",
|
|
8711
|
-
"Refresh the scope handle and retry; route persistent failures to L08 scope resolution.",
|
|
8712
|
-
"L08 semantic scope compiler"
|
|
8713
|
-
)
|
|
8714
|
-
]
|
|
8786
|
+
"The selected scope does not expose a command-safe list structure target.",
|
|
8787
|
+
"Refresh the scope bundle and route missing list editable-target evidence to L08/L07; do not derive a paragraph index from the scope handle.",
|
|
8788
|
+
"L08 semantic scopes and L07 runtime list commands"
|
|
8715
8789
|
);
|
|
8790
|
+
return {
|
|
8791
|
+
ok: false,
|
|
8792
|
+
blockers: Object.freeze([detail.code]),
|
|
8793
|
+
blockerDetails: Object.freeze([detail])
|
|
8794
|
+
};
|
|
8716
8795
|
}
|
|
8717
|
-
const
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8796
|
+
const currentTarget = collectEditableTargetRefs(runtime.getCanonicalDocument()).find(
|
|
8797
|
+
(target) => target.targetKey === listEntry.targetKey || target.listAddress?.addressKey === listEntry.runtimeCommand.canonicalAddress?.addressKey
|
|
8798
|
+
);
|
|
8799
|
+
if (!currentTarget) {
|
|
8800
|
+
const detail = blockerWithOwner(
|
|
8801
|
+
`actions:list-operation:list-target-not-current:${scope.handle.scopeId}`,
|
|
8802
|
+
"unresolved-target",
|
|
8803
|
+
"The list editable target evidence is stale in the current document.",
|
|
8804
|
+
"Refresh the scope bundle and retry with the current opaque list target.",
|
|
8805
|
+
"L08 semantic scopes and L07 runtime list commands"
|
|
8806
|
+
);
|
|
8807
|
+
return {
|
|
8808
|
+
ok: false,
|
|
8809
|
+
blockers: Object.freeze([detail.code]),
|
|
8810
|
+
blockerDetails: Object.freeze([detail])
|
|
8811
|
+
};
|
|
8812
|
+
}
|
|
8813
|
+
const before = lists.get({ editableTarget: currentTarget });
|
|
8814
|
+
if (!before) {
|
|
8815
|
+
const detail = blockerWithOwner(
|
|
8816
|
+
`actions:list-operation:list-readback-missing:${scope.handle.scopeId}`,
|
|
8724
8817
|
"blocked",
|
|
8725
|
-
"The list
|
|
8726
|
-
"
|
|
8727
|
-
|
|
8728
|
-
blockerWithOwner(
|
|
8729
|
-
`actions:list-operation:runtime-noop:${scope.handle.scopeId}`,
|
|
8730
|
-
"blocked",
|
|
8731
|
-
"The list runtime command produced no document change for the selected scope.",
|
|
8732
|
-
"Select a list-compatible paragraph and retry, or route to L03/L07 list command support with the scope handle.",
|
|
8733
|
-
"L03 numbering/list semantics and L07 runtime list commands"
|
|
8734
|
-
)
|
|
8735
|
-
]
|
|
8818
|
+
"The list target was present in scope evidence but runtime.lists could not produce readback.",
|
|
8819
|
+
"Route the target with editable-target evidence to L07 runtime list readback.",
|
|
8820
|
+
"L07 runtime list commands"
|
|
8736
8821
|
);
|
|
8822
|
+
return {
|
|
8823
|
+
ok: false,
|
|
8824
|
+
blockers: Object.freeze([detail.code]),
|
|
8825
|
+
blockerDetails: Object.freeze([detail])
|
|
8826
|
+
};
|
|
8737
8827
|
}
|
|
8738
|
-
const compiledAfter = createScopeCompilerService(runtime).compileScopeById(scope.handle.scopeId);
|
|
8739
8828
|
return {
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8829
|
+
ok: true,
|
|
8830
|
+
input: { editableTarget: currentTarget },
|
|
8831
|
+
before,
|
|
8832
|
+
scopeHandle: scope.handle
|
|
8833
|
+
};
|
|
8834
|
+
}
|
|
8835
|
+
function listAddressKeyFromActionHandle(actionHandle) {
|
|
8836
|
+
const listPrefix = "list-action:";
|
|
8837
|
+
if (actionHandle.startsWith(listPrefix)) return actionHandle.slice(listPrefix.length) || null;
|
|
8838
|
+
const scopeCommandPrefix = "scope-command:text-leaf:";
|
|
8839
|
+
if (actionHandle.startsWith(scopeCommandPrefix)) {
|
|
8840
|
+
return actionHandle.slice(scopeCommandPrefix.length) || null;
|
|
8841
|
+
}
|
|
8842
|
+
return null;
|
|
8843
|
+
}
|
|
8844
|
+
function runtimeListCommandForOperation(operation) {
|
|
8845
|
+
switch (operation.kind) {
|
|
8846
|
+
case "toggle":
|
|
8847
|
+
return operation.listKind === "numbered" ? "toggle-numbered" : "toggle-bulleted";
|
|
8848
|
+
case "indent":
|
|
8849
|
+
return "indent";
|
|
8850
|
+
case "outdent":
|
|
8851
|
+
return "outdent";
|
|
8852
|
+
case "restart-numbering":
|
|
8853
|
+
return "restart-numbering";
|
|
8854
|
+
case "continue-numbering":
|
|
8855
|
+
return "continue-numbering";
|
|
8856
|
+
}
|
|
8857
|
+
}
|
|
8858
|
+
function commandReferenceForListCommand(command) {
|
|
8859
|
+
switch (command) {
|
|
8860
|
+
case "toggle-numbered":
|
|
8861
|
+
case "toggle-bulleted":
|
|
8862
|
+
return "list.toggle";
|
|
8863
|
+
case "indent":
|
|
8864
|
+
return "list.indent";
|
|
8865
|
+
case "outdent":
|
|
8866
|
+
return "list.outdent";
|
|
8867
|
+
case "restart-numbering":
|
|
8868
|
+
return "list.restart-numbering";
|
|
8869
|
+
case "continue-numbering":
|
|
8870
|
+
return "list.continue-numbering";
|
|
8871
|
+
default:
|
|
8872
|
+
return "list.toggle";
|
|
8873
|
+
}
|
|
8874
|
+
}
|
|
8875
|
+
function listOperationReadback(result, fallbackBefore) {
|
|
8876
|
+
const before = sanitizeListReadback(result.before ?? fallbackBefore);
|
|
8877
|
+
const after = sanitizeListReadback(result.after);
|
|
8878
|
+
return {
|
|
8879
|
+
...before ? { before } : {},
|
|
8880
|
+
...after ? { after } : {}
|
|
8881
|
+
};
|
|
8882
|
+
}
|
|
8883
|
+
function sanitizeListReadback(readback) {
|
|
8884
|
+
if (!readback) return void 0;
|
|
8885
|
+
return {
|
|
8886
|
+
actionHandle: readback.actionHandle,
|
|
8887
|
+
kind: readback.kind,
|
|
8888
|
+
storyKey: readback.storyKey,
|
|
8889
|
+
addressKey: readback.addressKey,
|
|
8890
|
+
numberingInstanceId: readback.numberingInstanceId,
|
|
8891
|
+
...readback.abstractNumberingId ? { abstractNumberingId: readback.abstractNumberingId } : {},
|
|
8892
|
+
level: readback.level,
|
|
8893
|
+
...readback.listKind ? { listKind: readback.listKind } : {},
|
|
8894
|
+
editability: readback.editability,
|
|
8895
|
+
blockers: readback.blockers,
|
|
8896
|
+
supportedCommands: readback.supportedCommands,
|
|
8897
|
+
unsupportedCommands: readback.unsupportedCommands,
|
|
8898
|
+
staleDiscriminators: readback.staleDiscriminators
|
|
8750
8899
|
};
|
|
8751
8900
|
}
|
|
8901
|
+
function summarizeListTarget(target, readback) {
|
|
8902
|
+
const current = readback ?? target.before;
|
|
8903
|
+
return {
|
|
8904
|
+
kind: "list-item",
|
|
8905
|
+
...target.scopeHandle ? { handle: target.scopeHandle } : {},
|
|
8906
|
+
...current?.actionHandle ? { actionHandle: current.actionHandle } : {},
|
|
8907
|
+
canRewriteText: current?.editability === "editable" && (current.blockers.length ?? 0) === 0,
|
|
8908
|
+
canInsertAdjacentText: false,
|
|
8909
|
+
canFlag: Boolean(target.scopeHandle),
|
|
8910
|
+
canMark: Boolean(target.scopeHandle)
|
|
8911
|
+
};
|
|
8912
|
+
}
|
|
8913
|
+
function listBlockerDetails(prefix, blockers) {
|
|
8914
|
+
return Object.freeze(
|
|
8915
|
+
blockers.map(
|
|
8916
|
+
(entry) => blockerWithOwner(
|
|
8917
|
+
`${prefix}:${entry.code}:${entry.addressKey ?? entry.targetKey ?? "unknown"}`,
|
|
8918
|
+
entry.code === "list-command-unsupported" ? "unsupported" : "blocked",
|
|
8919
|
+
entry.message,
|
|
8920
|
+
"Refresh the opaque list target/readback and route persistent blockers to the owning runtime list layer.",
|
|
8921
|
+
entry.ownerLayer === "L07" ? "L07 runtime list commands" : entry.ownerLayer
|
|
8922
|
+
)
|
|
8923
|
+
)
|
|
8924
|
+
);
|
|
8925
|
+
}
|
|
8752
8926
|
function projectTableApplyResult(result) {
|
|
8753
8927
|
return {
|
|
8754
8928
|
status: result.applied ? "applied" : "blocked",
|
|
@@ -8876,36 +9050,6 @@ function tableSelectionStepHasDescriptor(operation) {
|
|
|
8876
9050
|
operation && "selectionDescriptor" in operation && operation.selectionDescriptor
|
|
8877
9051
|
);
|
|
8878
9052
|
}
|
|
8879
|
-
function listCommandForOperation(operation, paragraphIndex, origin) {
|
|
8880
|
-
switch (operation.kind) {
|
|
8881
|
-
case "toggle":
|
|
8882
|
-
return {
|
|
8883
|
-
type: "list.toggle",
|
|
8884
|
-
kind: operation.listKind,
|
|
8885
|
-
paragraphIndexes: [paragraphIndex],
|
|
8886
|
-
origin
|
|
8887
|
-
};
|
|
8888
|
-
case "indent":
|
|
8889
|
-
return { type: "list.indent", paragraphIndexes: [paragraphIndex], origin };
|
|
8890
|
-
case "outdent":
|
|
8891
|
-
return { type: "list.outdent", paragraphIndexes: [paragraphIndex], origin };
|
|
8892
|
-
case "restart-numbering":
|
|
8893
|
-
return {
|
|
8894
|
-
type: "list.restart-numbering",
|
|
8895
|
-
paragraphIndex,
|
|
8896
|
-
...operation.startAt !== void 0 ? { startAt: operation.startAt } : {},
|
|
8897
|
-
origin
|
|
8898
|
-
};
|
|
8899
|
-
case "continue-numbering":
|
|
8900
|
-
return { type: "list.continue-numbering", paragraphIndex, origin };
|
|
8901
|
-
}
|
|
8902
|
-
}
|
|
8903
|
-
function paragraphIndexFromHandle(handle) {
|
|
8904
|
-
const raw = handle.semanticPath[handle.semanticPath.length - 1];
|
|
8905
|
-
if (raw === void 0) return null;
|
|
8906
|
-
const index = Number(raw);
|
|
8907
|
-
return Number.isSafeInteger(index) && index >= 0 ? index : null;
|
|
8908
|
-
}
|
|
8909
9053
|
function actionOrigin(runtime, input) {
|
|
8910
9054
|
return { source: "api", timestamp: currentAuditTimestamp(runtime) };
|
|
8911
9055
|
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-M6XR534O.js";
|
|
12
12
|
import {
|
|
13
13
|
buildBookmarkNameMap
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZVC23LKV.js";
|
|
15
15
|
import {
|
|
16
16
|
deleteSelectionOrBackward,
|
|
17
17
|
deleteSelectionOrForward,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
insertText,
|
|
23
23
|
outdentParagraphAtSelection,
|
|
24
24
|
splitParagraph
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-QXKQPUOM.js";
|
|
26
26
|
import {
|
|
27
27
|
applyFormattingOperationToDocument,
|
|
28
28
|
applyTextMarkOperationToDocumentRange,
|
|
@@ -32,18 +32,18 @@ import {
|
|
|
32
32
|
insertImage,
|
|
33
33
|
repositionFloatingImage,
|
|
34
34
|
resizeImage
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KNHMXKC6.js";
|
|
36
36
|
import {
|
|
37
37
|
applyTextTransaction
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-T5YYFDZB.js";
|
|
39
39
|
import {
|
|
40
40
|
applyTableStructureOperationForEditableTarget,
|
|
41
41
|
removeCellFromRow,
|
|
42
42
|
removeTableRowPure
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-Q7Y57KOK.js";
|
|
44
44
|
import {
|
|
45
45
|
resolveParagraphScope
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-PHMWH23E.js";
|
|
47
47
|
import {
|
|
48
48
|
buildGeometryDebugEntry,
|
|
49
49
|
collectLineBoxesForRegion,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
createRenderKernel,
|
|
52
52
|
incrementInvalidationCounter,
|
|
53
53
|
recordPerfSample
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-35RHOE6I.js";
|
|
55
55
|
import {
|
|
56
56
|
AI_ACTION_POLICIES,
|
|
57
57
|
allocateNumberingInstance,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
resolveScope,
|
|
80
80
|
serializeFragmentToWordML,
|
|
81
81
|
setStartOverride
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-7G5GR3VV.js";
|
|
83
83
|
import {
|
|
84
84
|
ISSUE_METADATA_ID,
|
|
85
85
|
LAYOUT_ENGINE_VERSION,
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
setWorkspaceMode,
|
|
115
115
|
setZoomLevel,
|
|
116
116
|
snapCommentAnchorAwayFromTable
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-THVM6EP5.js";
|
|
118
118
|
import {
|
|
119
119
|
countLogicalPositions,
|
|
120
120
|
createPlainText,
|
|
@@ -133,11 +133,11 @@ import {
|
|
|
133
133
|
replaceStoryBlocks,
|
|
134
134
|
resolvePageFieldDisplayText,
|
|
135
135
|
storyTargetKey
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-A3GSNB4G.js";
|
|
137
137
|
import {
|
|
138
138
|
createCommentSidebarProjection,
|
|
139
139
|
createCommentStoreFromRuntimeComments
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-SYQWQ6FE.js";
|
|
141
141
|
import {
|
|
142
142
|
createEditorState,
|
|
143
143
|
createPersistedEditorSnapshot,
|
|
@@ -157,12 +157,12 @@ import {
|
|
|
157
157
|
persistedSnapshotFromEditorSessionState,
|
|
158
158
|
remapRevisionStore,
|
|
159
159
|
setRevisionStatus
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-4YCWECLZ.js";
|
|
161
161
|
import {
|
|
162
162
|
isSupportedFieldFamily,
|
|
163
163
|
parseTocLevelRange,
|
|
164
164
|
resolveRefFieldText
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-M7YRJX6V.js";
|
|
166
166
|
import {
|
|
167
167
|
collectEditableTargetRefs,
|
|
168
168
|
collectEditableTargetRefsForStoryBlockRanges,
|
|
@@ -171,10 +171,10 @@ import {
|
|
|
171
171
|
createHeaderFooterStoryKey,
|
|
172
172
|
sha256TextHex,
|
|
173
173
|
validateEditableTargetRef
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-A66ZVUAT.js";
|
|
175
175
|
import {
|
|
176
176
|
setActiveSerializeTelemetryBus
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-FM4K4XFJ.js";
|
|
178
178
|
import {
|
|
179
179
|
describeOpaqueFragment,
|
|
180
180
|
findOpaqueFragmentsIntersectingRange,
|