@superdoc-dev/cli 0.17.0-next.35 → 0.17.0-next.36
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/index.js +308 -73
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -2917,6 +2917,21 @@ More content with **bold** and *italic*.`
|
|
|
2917
2917
|
referenceDocPath: "format/paragraph/clear-direction.mdx",
|
|
2918
2918
|
referenceGroup: "format.paragraph"
|
|
2919
2919
|
},
|
|
2920
|
+
"format.paragraph.setNumbering": {
|
|
2921
|
+
memberPath: "format.paragraph.setNumbering",
|
|
2922
|
+
description: "Attach numbering (numId + level) to an existing paragraph or heading so it joins a numbered sequence. Numbering is a paragraph property; the node and its style are otherwise unchanged, though any direct paragraph indent is cleared so the numbering level controls indentation. Direct edits only; tracked mode is unsupported.",
|
|
2923
|
+
expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the block already carries this numbering. On a successful apply, resolution.target reflects the post-mutation address (a numbered plain paragraph re-resolves to listItem; a heading stays a heading); a dryRun returns the input target.",
|
|
2924
|
+
requiresDocumentContext: true,
|
|
2925
|
+
metadata: mutationOperation({
|
|
2926
|
+
idempotency: "conditional",
|
|
2927
|
+
supportsDryRun: true,
|
|
2928
|
+
supportsTrackedMode: false,
|
|
2929
|
+
possibleFailureCodes: ["NO_OP"],
|
|
2930
|
+
throws: T_PARAGRAPH_MUTATION
|
|
2931
|
+
}),
|
|
2932
|
+
referenceDocPath: "format/paragraph/set-numbering.mdx",
|
|
2933
|
+
referenceGroup: "format.paragraph"
|
|
2934
|
+
},
|
|
2920
2935
|
"lists.list": {
|
|
2921
2936
|
memberPath: "lists.list",
|
|
2922
2937
|
description: "List all list nodes in the document, optionally filtered by scope.",
|
|
@@ -7916,6 +7931,23 @@ function validateClearDirection(input) {
|
|
|
7916
7931
|
assertParagraphTarget(input, "format.paragraph.clearDirection");
|
|
7917
7932
|
assertNoUnknownFields(input, CLEAR_DIRECTION_KEYS, "format.paragraph.clearDirection");
|
|
7918
7933
|
}
|
|
7934
|
+
function validateSetNumbering(input) {
|
|
7935
|
+
const op = "format.paragraph.setNumbering";
|
|
7936
|
+
assertParagraphTarget(input, op);
|
|
7937
|
+
assertNoUnknownFields(input, SET_NUMBERING_KEYS, op);
|
|
7938
|
+
const rec = input;
|
|
7939
|
+
if (rec.numId === undefined) {
|
|
7940
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${op} requires a numId field.`);
|
|
7941
|
+
}
|
|
7942
|
+
if (typeof rec.numId !== "number" || !Number.isInteger(rec.numId) || rec.numId < 1) {
|
|
7943
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${op} numId must be a positive integer (numId 0 is the no-numbering sentinel). Got ${JSON.stringify(rec.numId)}.`, { field: "numId", value: rec.numId });
|
|
7944
|
+
}
|
|
7945
|
+
if (rec.level !== undefined) {
|
|
7946
|
+
if (typeof rec.level !== "number" || !Number.isInteger(rec.level) || rec.level < 0 || rec.level > 8) {
|
|
7947
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${op} level must be an integer 0-8. Got ${JSON.stringify(rec.level)}.`, { field: "level", value: rec.level });
|
|
7948
|
+
}
|
|
7949
|
+
}
|
|
7950
|
+
}
|
|
7919
7951
|
function executeParagraphsSetStyle(adapter, input, options) {
|
|
7920
7952
|
validateSetStyle(input);
|
|
7921
7953
|
return adapter.setStyle(input, normalizeMutationOptions(options));
|
|
@@ -8014,7 +8046,11 @@ function executeParagraphsClearDirection(adapter, input, options) {
|
|
|
8014
8046
|
validateClearDirection(input);
|
|
8015
8047
|
return adapter.clearDirection(input, normalizeMutationOptions(options));
|
|
8016
8048
|
}
|
|
8017
|
-
|
|
8049
|
+
function executeParagraphsSetNumbering(adapter, input, options) {
|
|
8050
|
+
validateSetNumbering(input);
|
|
8051
|
+
return adapter.setNumbering(input, normalizeMutationOptions(options));
|
|
8052
|
+
}
|
|
8053
|
+
var PARAGRAPH_BLOCK_TYPES, SET_STYLE_KEYS, CLEAR_STYLE_KEYS, RESET_DIRECT_FORMATTING_KEYS, SET_ALIGNMENT_KEYS, CLEAR_ALIGNMENT_KEYS, SET_INDENTATION_KEYS, CLEAR_INDENTATION_KEYS, SET_SPACING_KEYS, CLEAR_SPACING_KEYS, SET_KEEP_OPTIONS_KEYS, SET_OUTLINE_LEVEL_KEYS, SET_FLOW_OPTIONS_KEYS, SET_TAB_STOP_KEYS, CLEAR_TAB_STOP_KEYS, CLEAR_ALL_TAB_STOPS_KEYS, SET_BORDER_KEYS, CLEAR_BORDER_KEYS, SET_SHADING_KEYS, CLEAR_SHADING_KEYS, SET_MARK_RUN_PROPS_KEYS, MARK_RUN_PROPS_FIELD_KEYS, MARK_RUN_COLOR_REF_KEYS, MARK_RUN_FONTS_KEYS, MARK_RUN_LANG_KEYS, MARK_RUN_UNDERLINE_KEYS, MARK_RUN_SHADING_KEYS, MARK_RUN_BORDER_KEYS, MARK_RUN_COLOR_MODE_VALUES, MARK_RUN_VERTICAL_ALIGN_VALUES, SET_DIRECTION_KEYS, SET_NUMBERING_KEYS, CLEAR_DIRECTION_KEYS;
|
|
8018
8054
|
var init_paragraphs = __esm(() => {
|
|
8019
8055
|
init_errors2();
|
|
8020
8056
|
init_validation_primitives();
|
|
@@ -8106,6 +8142,7 @@ var init_paragraphs = __esm(() => {
|
|
|
8106
8142
|
MARK_RUN_COLOR_MODE_VALUES = ["rgb", "theme", "auto"];
|
|
8107
8143
|
MARK_RUN_VERTICAL_ALIGN_VALUES = ["baseline", "superscript", "subscript"];
|
|
8108
8144
|
SET_DIRECTION_KEYS = new Set(["target", "direction", "alignmentPolicy"]);
|
|
8145
|
+
SET_NUMBERING_KEYS = new Set(["target", "numId", "level"]);
|
|
8109
8146
|
CLEAR_DIRECTION_KEYS = new Set(["target"]);
|
|
8110
8147
|
});
|
|
8111
8148
|
|
|
@@ -9429,7 +9466,7 @@ function buildInternalContractSchemas() {
|
|
|
9429
9466
|
operations
|
|
9430
9467
|
};
|
|
9431
9468
|
}
|
|
9432
|
-
var trackChangeTypeValues, nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, knownTargetKindValues, SHARED_DEFS, rangeSchema, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema, textTargetSchema, commentTrackedChangeTargetSchema, textSearchCommentTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, listsV2BlockTargetSchema, paragraphTargetSchema, sectionAddressSchema, inlineNodeAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, commentTrackedChangeLinkSchema, targetLocatorSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, commentsCreateSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchRunSchema, matchBlockSchema, storyLocatorSchema, markRunColorRefSchema, markRunFontsSchema, markRunLanguagesSchema, markRunUnderlineSchema, markRunShadingSchema, markRunBorderSchema, markRunPropsSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, headingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, listsExitSuccessSchema, nodeSummarySchema, nodeInfoSchema, matchContextSchema, unknownNodeDiagnosticSchema, textSelectorSchema, nodeSelectorSchema, selectorShorthandSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentStyleInfoSchema, documentStylesSchema, documentDefaultsSchema, documentInfoSchema, listKindSchema, listInsertPositionSchema, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeWordRevisionIdsSchema, trackChangeSourceIdsSchema, trackChangeBroadTypeEnum, trackChangeGroupingEnum, trackChangeCanonicalizationKindEnum, trackChangeAddressKindEnum, trackChangeSourcePlatformEnum, trackChangeReplacementSideSchema, trackChangeReplacementSchema, trackChangeOverlapRelationshipSchema, trackChangeOverlapLayerSchema, trackChangeOverlapInfoSchema, trackChangeFormattingSnapshotSchema, trackChangeTargetSchema, trackChangeSnapshotSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, reviewDecideRangeTargetOptions, historyActionCollaborationSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern, tableBorderSpecSchema, nullableTableBorderSpecSchema, sdFragmentSchema, placementSchema, nestingPolicySchema, insertInputSchema, tableLocatorSchema, cellLocatorSchema, cellOrTableScopedCellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableCreateLocationSchema, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas, tocMutationFailureCodes, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkDestinationSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema, hyperlinkInfoSchema, contentControlTargetSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccListResultSchema, ccInfoSchema, refListQueryProperties, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, customXmlPartTargetSchema, customXmlPartMutation, customXmlPartCreateMutation, anchoredMetadataAttachMutation, anchoredMetadataMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffPayloadSchema, diffApplyResultSchema, operationSchemas;
|
|
9469
|
+
var trackChangeTypeValues, nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, knownTargetKindValues, SHARED_DEFS, rangeSchema, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema, textTargetSchema, commentTrackedChangeTargetSchema, textSearchCommentTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, listsV2BlockTargetSchema, paragraphTargetSchema, sectionAddressSchema, inlineNodeAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, commentTrackedChangeLinkSchema, targetLocatorSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, commentsCreateSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchRunSchema, matchBlockSchema, storyLocatorSchema, markRunColorRefSchema, markRunFontsSchema, markRunLanguagesSchema, markRunUnderlineSchema, markRunShadingSchema, markRunBorderSchema, markRunPropsSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, headingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, listsExitSuccessSchema, nodeSummarySchema, nodeInfoSchema, matchContextSchema, unknownNodeDiagnosticSchema, textSelectorSchema, planTextSelectorSchema, nodeSelectorSchema, selectorShorthandSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentStyleInfoSchema, documentStylesSchema, documentDefaultsSchema, documentInfoSchema, listKindSchema, listInsertPositionSchema, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeWordRevisionIdsSchema, trackChangeSourceIdsSchema, trackChangeBroadTypeEnum, trackChangeGroupingEnum, trackChangeCanonicalizationKindEnum, trackChangeAddressKindEnum, trackChangeSourcePlatformEnum, trackChangeReplacementSideSchema, trackChangeReplacementSchema, trackChangeOverlapRelationshipSchema, trackChangeOverlapLayerSchema, trackChangeOverlapInfoSchema, trackChangeFormattingSnapshotSchema, trackChangeTargetSchema, trackChangeSnapshotSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, reviewDecideRangeTargetOptions, historyActionCollaborationSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern, tableBorderSpecSchema, nullableTableBorderSpecSchema, sdFragmentSchema, placementSchema, nestingPolicySchema, insertInputSchema, tableLocatorSchema, cellLocatorSchema, cellOrTableScopedCellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableCreateLocationSchema, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas, tocMutationFailureCodes, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkDestinationSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema, hyperlinkInfoSchema, contentControlTargetSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccListResultSchema, ccInfoSchema, refListQueryProperties, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, customXmlPartTargetSchema, customXmlPartMutation, customXmlPartCreateMutation, anchoredMetadataAttachMutation, anchoredMetadataMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffPayloadSchema, diffApplyResultSchema, operationSchemas;
|
|
9433
9470
|
var init_schemas = __esm(() => {
|
|
9434
9471
|
init_command_catalog();
|
|
9435
9472
|
init_types2();
|
|
@@ -10035,6 +10072,20 @@ var init_schemas = __esm(() => {
|
|
|
10035
10072
|
hint: { type: "string" }
|
|
10036
10073
|
}, ["message"]);
|
|
10037
10074
|
textSelectorSchema = objectSchema({
|
|
10075
|
+
type: { const: "text", description: "Must be 'text' for text pattern search." },
|
|
10076
|
+
pattern: {
|
|
10077
|
+
type: "string",
|
|
10078
|
+
description: "Text to match. In regex mode, patterns are validated for syntax, maximum length, and safety before execution."
|
|
10079
|
+
},
|
|
10080
|
+
mode: {
|
|
10081
|
+
enum: ["contains", "regex"],
|
|
10082
|
+
description: "Match mode: 'contains' (literal substring, recommended for literal text) or 'regex' (validated regular expression)."
|
|
10083
|
+
},
|
|
10084
|
+
caseSensitive: { type: "boolean", description: "Case-sensitive matching. Default: false." },
|
|
10085
|
+
wholeWord: { type: "boolean", description: "Require word-boundary matches. Default: false." },
|
|
10086
|
+
includeDeletedText: { type: "boolean", description: "When true, includes text from pending tracked deletions. Default: false." }
|
|
10087
|
+
}, ["type", "pattern"]);
|
|
10088
|
+
planTextSelectorSchema = objectSchema({
|
|
10038
10089
|
type: { const: "text", description: "Must be 'text' for text pattern search." },
|
|
10039
10090
|
pattern: {
|
|
10040
10091
|
type: "string",
|
|
@@ -10063,7 +10114,8 @@ var init_schemas = __esm(() => {
|
|
|
10063
10114
|
pattern: { type: "string" },
|
|
10064
10115
|
mode: { enum: ["contains", "regex"] },
|
|
10065
10116
|
caseSensitive: { type: "boolean" },
|
|
10066
|
-
wholeWord: { type: "boolean" }
|
|
10117
|
+
wholeWord: { type: "boolean" },
|
|
10118
|
+
includeDeletedText: { type: "boolean" }
|
|
10067
10119
|
}, ["type", "pattern"]);
|
|
10068
10120
|
sdNodeSelectorSchema = objectSchema({
|
|
10069
10121
|
type: { const: "node" },
|
|
@@ -11520,6 +11572,15 @@ var init_schemas = __esm(() => {
|
|
|
11520
11572
|
color: { type: "string", description: "Text color when explicitly set (e.g. '#000000')." },
|
|
11521
11573
|
alignment: { type: "string", description: "Paragraph alignment." },
|
|
11522
11574
|
headingLevel: { type: "number", description: "Heading level (1-6)." },
|
|
11575
|
+
paragraphNumbering: {
|
|
11576
|
+
type: "object",
|
|
11577
|
+
description: "Numbering reference (numId + level) for numbered blocks, including numbered headings. Absent for non-numbered blocks.",
|
|
11578
|
+
properties: {
|
|
11579
|
+
numId: { type: "number" },
|
|
11580
|
+
level: { type: "number" }
|
|
11581
|
+
},
|
|
11582
|
+
additionalProperties: false
|
|
11583
|
+
},
|
|
11523
11584
|
ref: {
|
|
11524
11585
|
type: "string",
|
|
11525
11586
|
description: "Ref handle for this block. Pass directly to superdoc_format or superdoc_edit ref param. Only present for non-empty blocks."
|
|
@@ -11909,6 +11970,16 @@ var init_schemas = __esm(() => {
|
|
|
11909
11970
|
success: paragraphMutationSuccessSchema,
|
|
11910
11971
|
failure: paragraphMutationFailureSchemaFor("format.paragraph.clearDirection")
|
|
11911
11972
|
},
|
|
11973
|
+
"format.paragraph.setNumbering": {
|
|
11974
|
+
input: objectSchema({
|
|
11975
|
+
target: paragraphTargetSchema,
|
|
11976
|
+
numId: { type: "integer", minimum: 1 },
|
|
11977
|
+
level: { type: "integer", minimum: 0, maximum: 8 }
|
|
11978
|
+
}, ["target", "numId"]),
|
|
11979
|
+
output: paragraphMutationResultSchemaFor("format.paragraph.setNumbering"),
|
|
11980
|
+
success: paragraphMutationSuccessSchema,
|
|
11981
|
+
failure: paragraphMutationFailureSchemaFor("format.paragraph.setNumbering")
|
|
11982
|
+
},
|
|
11912
11983
|
"styles.apply": (() => {
|
|
11913
11984
|
const runInputSchema = objectSchema({
|
|
11914
11985
|
target: objectSchema({ scope: { const: "docDefaults" }, channel: { const: "run" } }, ["scope", "channel"]),
|
|
@@ -13077,7 +13148,12 @@ var init_schemas = __esm(() => {
|
|
|
13077
13148
|
commentId: { type: "string" },
|
|
13078
13149
|
text: { type: "string", description: "Updated comment text." },
|
|
13079
13150
|
target: {
|
|
13080
|
-
oneOf: [
|
|
13151
|
+
oneOf: [
|
|
13152
|
+
textAddressSchema,
|
|
13153
|
+
selectionTargetSchema,
|
|
13154
|
+
commentTrackedChangeTargetSchema,
|
|
13155
|
+
textSearchCommentTargetSchema
|
|
13156
|
+
],
|
|
13081
13157
|
description: "New anchor for the comment. Accepts a plain TextAddress, a SelectionTarget {kind:'selection', start, end}, a TextSearchCommentTarget {text, story?}, or a TrackedChangeCommentTarget, with or without kind, that names a logical tracked-change id as a convenience re-anchor target ."
|
|
13082
13158
|
},
|
|
13083
13159
|
status: {
|
|
@@ -13221,7 +13297,7 @@ var init_schemas = __esm(() => {
|
|
|
13221
13297
|
in: storyLocatorSchema,
|
|
13222
13298
|
select: {
|
|
13223
13299
|
description: "Search selector. Use {type:'text', pattern:'...'} for text search or {type:'node', nodeType:'paragraph'|'heading'|...} for node search.",
|
|
13224
|
-
oneOf: [
|
|
13300
|
+
oneOf: [planTextSelectorSchema, nodeSelectorSchema]
|
|
13225
13301
|
},
|
|
13226
13302
|
within: {
|
|
13227
13303
|
...blockNodeAddressSchema,
|
|
@@ -13263,7 +13339,7 @@ var init_schemas = __esm(() => {
|
|
|
13263
13339
|
...(() => {
|
|
13264
13340
|
const selectWhereSchema = objectSchema({
|
|
13265
13341
|
by: { const: "select", type: "string" },
|
|
13266
|
-
select: { oneOf: [
|
|
13342
|
+
select: { oneOf: [planTextSelectorSchema, nodeSelectorSchema] },
|
|
13267
13343
|
within: blockNodeAddressSchema,
|
|
13268
13344
|
require: { enum: ["first", "exactlyOne", "all"] }
|
|
13269
13345
|
}, ["by", "select", "require"]);
|
|
@@ -13288,7 +13364,7 @@ var init_schemas = __esm(() => {
|
|
|
13288
13364
|
oneOf: [
|
|
13289
13365
|
objectSchema({
|
|
13290
13366
|
by: { const: "select", type: "string" },
|
|
13291
|
-
select: { oneOf: [
|
|
13367
|
+
select: { oneOf: [planTextSelectorSchema, nodeSelectorSchema] },
|
|
13292
13368
|
within: blockNodeAddressSchema,
|
|
13293
13369
|
require: { enum: ["first", "exactlyOne"] }
|
|
13294
13370
|
}, ["by", "select", "require"]),
|
|
@@ -13299,7 +13375,7 @@ var init_schemas = __esm(() => {
|
|
|
13299
13375
|
};
|
|
13300
13376
|
const assertWhereSchema = objectSchema({
|
|
13301
13377
|
by: { const: "select", type: "string" },
|
|
13302
|
-
select: { oneOf: [
|
|
13378
|
+
select: { oneOf: [planTextSelectorSchema, nodeSelectorSchema] },
|
|
13303
13379
|
within: blockNodeAddressSchema
|
|
13304
13380
|
}, ["by", "select"]);
|
|
13305
13381
|
const replacementBlockSchema = objectSchema({ text: { type: "string" } }, ["text"]);
|
|
@@ -14966,7 +15042,10 @@ var init_schemas = __esm(() => {
|
|
|
14966
15042
|
"footnotes.insert": {
|
|
14967
15043
|
input: {
|
|
14968
15044
|
oneOf: [
|
|
14969
|
-
objectSchema({ at: textTargetSchema, type: { enum: ["footnote", "endnote"] }, content: { type: "string" } }, [
|
|
15045
|
+
objectSchema({ at: textTargetSchema, type: { enum: ["footnote", "endnote"] }, content: { type: "string" } }, [
|
|
15046
|
+
"type",
|
|
15047
|
+
"content"
|
|
15048
|
+
]),
|
|
14970
15049
|
objectSchema({
|
|
14971
15050
|
at: textTargetSchema,
|
|
14972
15051
|
type: { enum: ["footnote", "endnote"] },
|
|
@@ -17746,7 +17825,10 @@ function executeListsSetLevelLayout(adapter, input, options) {
|
|
|
17746
17825
|
}
|
|
17747
17826
|
function validateV2BlockTarget(value, field, operationName) {
|
|
17748
17827
|
if (!isRecord(value)) {
|
|
17749
|
-
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
|
|
17828
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
|
|
17829
|
+
field,
|
|
17830
|
+
value
|
|
17831
|
+
});
|
|
17750
17832
|
}
|
|
17751
17833
|
const v = value;
|
|
17752
17834
|
if (v.kind !== "block") {
|
|
@@ -17781,7 +17863,10 @@ function executeListsApply(adapter, input, options) {
|
|
|
17781
17863
|
validateV2BlockTarget(input.target, "target", "lists.apply");
|
|
17782
17864
|
requireEnum(input.seed, "seed", VALID_LIST_KINDS, "lists.apply");
|
|
17783
17865
|
if (input.reuseNumId !== undefined && typeof input.reuseNumId !== "string") {
|
|
17784
|
-
throw new DocumentApiValidationError("INVALID_INPUT", "lists.apply reuseNumId must be a string when provided.", {
|
|
17866
|
+
throw new DocumentApiValidationError("INVALID_INPUT", "lists.apply reuseNumId must be a string when provided.", {
|
|
17867
|
+
field: "reuseNumId",
|
|
17868
|
+
value: input.reuseNumId
|
|
17869
|
+
});
|
|
17785
17870
|
}
|
|
17786
17871
|
optionalInteger(input.ilvl, "ilvl", "lists.apply");
|
|
17787
17872
|
if (!adapter.apply)
|
|
@@ -18272,7 +18357,9 @@ function validateBlockNodeAddressParagraph(address2, operationLabel, field) {
|
|
|
18272
18357
|
}
|
|
18273
18358
|
function validateBlocksSplitInput(input) {
|
|
18274
18359
|
if (!input || typeof input !== "object") {
|
|
18275
|
-
throw new DocumentApiValidationError("INVALID_INPUT", "blocks.split requires an input object.", {
|
|
18360
|
+
throw new DocumentApiValidationError("INVALID_INPUT", "blocks.split requires an input object.", {
|
|
18361
|
+
fields: ["input"]
|
|
18362
|
+
});
|
|
18276
18363
|
}
|
|
18277
18364
|
validateBlockNodeAddressParagraph(input.target, "blocks.split", "target");
|
|
18278
18365
|
if (typeof input.offset !== "number" || !Number.isInteger(input.offset) || input.offset < 0) {
|
|
@@ -18281,19 +18368,25 @@ function validateBlocksSplitInput(input) {
|
|
|
18281
18368
|
}
|
|
18282
18369
|
function validateBlocksMergeInput(input) {
|
|
18283
18370
|
if (!input || typeof input !== "object") {
|
|
18284
|
-
throw new DocumentApiValidationError("INVALID_INPUT", "blocks.merge requires an input object.", {
|
|
18371
|
+
throw new DocumentApiValidationError("INVALID_INPUT", "blocks.merge requires an input object.", {
|
|
18372
|
+
fields: ["input"]
|
|
18373
|
+
});
|
|
18285
18374
|
}
|
|
18286
18375
|
validateBlockNodeAddressParagraph(input.first, "blocks.merge", "first");
|
|
18287
18376
|
validateBlockNodeAddressParagraph(input.second, "blocks.merge", "second");
|
|
18288
18377
|
}
|
|
18289
18378
|
function validateBlocksMoveInput(input) {
|
|
18290
18379
|
if (!input || typeof input !== "object") {
|
|
18291
|
-
throw new DocumentApiValidationError("INVALID_INPUT", "blocks.move requires an input object.", {
|
|
18380
|
+
throw new DocumentApiValidationError("INVALID_INPUT", "blocks.move requires an input object.", {
|
|
18381
|
+
fields: ["input"]
|
|
18382
|
+
});
|
|
18292
18383
|
}
|
|
18293
18384
|
validateBlockNodeAddressParagraph(input.source, "blocks.move", "source");
|
|
18294
18385
|
validateBlockNodeAddressParagraph(input.destination, "blocks.move", "destination");
|
|
18295
18386
|
if (input.placement !== "before" && input.placement !== "after") {
|
|
18296
|
-
throw new DocumentApiValidationError("INVALID_INPUT", 'blocks.move placement must be "before" or "after".', {
|
|
18387
|
+
throw new DocumentApiValidationError("INVALID_INPUT", 'blocks.move placement must be "before" or "after".', {
|
|
18388
|
+
fields: ["placement"]
|
|
18389
|
+
});
|
|
18297
18390
|
}
|
|
18298
18391
|
}
|
|
18299
18392
|
function unavailableBlocksResult(operationName) {
|
|
@@ -18725,6 +18818,7 @@ function buildDispatchTable(api) {
|
|
|
18725
18818
|
"format.paragraph.setMarkRunProps": (input, options) => api.format.paragraph.setMarkRunProps(input, options),
|
|
18726
18819
|
"format.paragraph.setDirection": (input, options) => api.format.paragraph.setDirection(input, options),
|
|
18727
18820
|
"format.paragraph.clearDirection": (input, options) => api.format.paragraph.clearDirection(input, options),
|
|
18821
|
+
"format.paragraph.setNumbering": (input, options) => api.format.paragraph.setNumbering(input, options),
|
|
18728
18822
|
"styles.apply": (input, options) => api.styles.apply(input, options),
|
|
18729
18823
|
"templates.apply": (input, options) => api.templates.apply(input, options),
|
|
18730
18824
|
"create.paragraph": (input, options) => api.create.paragraph(input, options),
|
|
@@ -19372,10 +19466,7 @@ function createPlanApi(invoke) {
|
|
|
19372
19466
|
var PLAN_EXECUTE_UNSUPPORTED_OPERATION_IDS;
|
|
19373
19467
|
var init_plan = __esm(() => {
|
|
19374
19468
|
init_errors2();
|
|
19375
|
-
PLAN_EXECUTE_UNSUPPORTED_OPERATION_IDS = new Set([
|
|
19376
|
-
"plan.execute",
|
|
19377
|
-
"templates.apply"
|
|
19378
|
-
]);
|
|
19469
|
+
PLAN_EXECUTE_UNSUPPORTED_OPERATION_IDS = new Set(["plan.execute", "templates.apply"]);
|
|
19379
19470
|
});
|
|
19380
19471
|
|
|
19381
19472
|
// ../../packages/document-api/dist/diff/diff.js
|
|
@@ -22136,6 +22227,9 @@ function createDocumentApi(adapters) {
|
|
|
22136
22227
|
},
|
|
22137
22228
|
clearDirection(input, options) {
|
|
22138
22229
|
return executeParagraphsClearDirection(adapters.paragraphs, input, options);
|
|
22230
|
+
},
|
|
22231
|
+
setNumbering(input, options) {
|
|
22232
|
+
return executeParagraphsSetNumbering(adapters.paragraphs, input, options);
|
|
22139
22233
|
}
|
|
22140
22234
|
}
|
|
22141
22235
|
},
|
|
@@ -46135,7 +46229,8 @@ var init_operation_hints = __esm(() => {
|
|
|
46135
46229
|
"format.paragraph.clearBorder",
|
|
46136
46230
|
"format.paragraph.setShading",
|
|
46137
46231
|
"format.paragraph.clearShading",
|
|
46138
|
-
"format.paragraph.setMarkRunProps"
|
|
46232
|
+
"format.paragraph.setMarkRunProps",
|
|
46233
|
+
"format.paragraph.setNumbering"
|
|
46139
46234
|
];
|
|
46140
46235
|
SUCCESS_VERB = {
|
|
46141
46236
|
get: "retrieved document",
|
|
@@ -69059,7 +69154,7 @@ var init_remark_gfm_BUJjZJLy_es = __esm(() => {
|
|
|
69059
69154
|
emptyOptions2 = {};
|
|
69060
69155
|
});
|
|
69061
69156
|
|
|
69062
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
69157
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-DVjSc-AY.es.js
|
|
69063
69158
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
69064
69159
|
const fieldValue = extension$1.config[field];
|
|
69065
69160
|
if (typeof fieldValue === "function")
|
|
@@ -70631,6 +70726,26 @@ function validateClearDirection2(input) {
|
|
|
70631
70726
|
assertParagraphTarget2(input, "format.paragraph.clearDirection");
|
|
70632
70727
|
assertNoUnknownFields3(input, CLEAR_DIRECTION_KEYS2, "format.paragraph.clearDirection");
|
|
70633
70728
|
}
|
|
70729
|
+
function validateSetNumbering2(input) {
|
|
70730
|
+
const op = "format.paragraph.setNumbering";
|
|
70731
|
+
assertParagraphTarget2(input, op);
|
|
70732
|
+
assertNoUnknownFields3(input, SET_NUMBERING_KEYS2, op);
|
|
70733
|
+
const rec = input;
|
|
70734
|
+
if (rec.numId === undefined)
|
|
70735
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${op} requires a numId field.`);
|
|
70736
|
+
if (typeof rec.numId !== "number" || !Number.isInteger(rec.numId) || rec.numId < 1)
|
|
70737
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${op} numId must be a positive integer (numId 0 is the no-numbering sentinel). Got ${JSON.stringify(rec.numId)}.`, {
|
|
70738
|
+
field: "numId",
|
|
70739
|
+
value: rec.numId
|
|
70740
|
+
});
|
|
70741
|
+
if (rec.level !== undefined) {
|
|
70742
|
+
if (typeof rec.level !== "number" || !Number.isInteger(rec.level) || rec.level < 0 || rec.level > 8)
|
|
70743
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${op} level must be an integer 0-8. Got ${JSON.stringify(rec.level)}.`, {
|
|
70744
|
+
field: "level",
|
|
70745
|
+
value: rec.level
|
|
70746
|
+
});
|
|
70747
|
+
}
|
|
70748
|
+
}
|
|
70634
70749
|
function executeParagraphsSetStyle2(adapter, input, options) {
|
|
70635
70750
|
validateSetStyle2(input);
|
|
70636
70751
|
return adapter.setStyle(input, normalizeMutationOptions2(options));
|
|
@@ -70728,6 +70843,10 @@ function executeParagraphsClearDirection2(adapter, input, options) {
|
|
|
70728
70843
|
validateClearDirection2(input);
|
|
70729
70844
|
return adapter.clearDirection(input, normalizeMutationOptions2(options));
|
|
70730
70845
|
}
|
|
70846
|
+
function executeParagraphsSetNumbering2(adapter, input, options) {
|
|
70847
|
+
validateSetNumbering2(input);
|
|
70848
|
+
return adapter.setNumbering(input, normalizeMutationOptions2(options));
|
|
70849
|
+
}
|
|
70731
70850
|
function getPropertyDefinition2(key, channel) {
|
|
70732
70851
|
return PROPERTY_INDEX2.get(`${channel}:${key}`);
|
|
70733
70852
|
}
|
|
@@ -73536,6 +73655,7 @@ function buildDispatchTable2(api) {
|
|
|
73536
73655
|
"format.paragraph.setMarkRunProps": (input, options) => api.format.paragraph.setMarkRunProps(input, options),
|
|
73537
73656
|
"format.paragraph.setDirection": (input, options) => api.format.paragraph.setDirection(input, options),
|
|
73538
73657
|
"format.paragraph.clearDirection": (input, options) => api.format.paragraph.clearDirection(input, options),
|
|
73658
|
+
"format.paragraph.setNumbering": (input, options) => api.format.paragraph.setNumbering(input, options),
|
|
73539
73659
|
"styles.apply": (input, options) => api.styles.apply(input, options),
|
|
73540
73660
|
"templates.apply": (input, options) => api.templates.apply(input, options),
|
|
73541
73661
|
"create.paragraph": (input, options) => api.create.paragraph(input, options),
|
|
@@ -76538,6 +76658,9 @@ function createDocumentApi2(adapters) {
|
|
|
76538
76658
|
},
|
|
76539
76659
|
clearDirection(input, options) {
|
|
76540
76660
|
return executeParagraphsClearDirection2(adapters.paragraphs, input, options);
|
|
76661
|
+
},
|
|
76662
|
+
setNumbering(input, options) {
|
|
76663
|
+
return executeParagraphsSetNumbering2(adapters.paragraphs, input, options);
|
|
76541
76664
|
}
|
|
76542
76665
|
}
|
|
76543
76666
|
},
|
|
@@ -109437,8 +109560,13 @@ function buildFallbackBlockNodeId(nodeType, pos, path2) {
|
|
|
109437
109560
|
}
|
|
109438
109561
|
function isListItem(attrs) {
|
|
109439
109562
|
const numbering = attrs?.paragraphProperties?.numberingProperties;
|
|
109440
|
-
if (numbering
|
|
109441
|
-
|
|
109563
|
+
if (numbering) {
|
|
109564
|
+
const numId = toFiniteNumber(numbering.numId);
|
|
109565
|
+
if (numId != null && numId !== 0)
|
|
109566
|
+
return true;
|
|
109567
|
+
if (numId == null && numbering.ilvl != null)
|
|
109568
|
+
return true;
|
|
109569
|
+
}
|
|
109442
109570
|
const listRendering = attrs?.listRendering;
|
|
109443
109571
|
if (listRendering?.markerText)
|
|
109444
109572
|
return true;
|
|
@@ -117454,7 +117582,7 @@ var isRegExp = (value) => {
|
|
|
117454
117582
|
tracked: false,
|
|
117455
117583
|
carrier: runAttributeCarrier2(runPropertyKey ?? key),
|
|
117456
117584
|
schema
|
|
117457
|
-
}), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, PROPERTY_VALIDATOR_MAP2, TABLE_COLOR_PATTERN2, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_DIRECTIONS2, ALIGNMENT_POLICIES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, SET_MARK_RUN_PROPS_KEYS2, MARK_RUN_PROPS_FIELD_KEYS2, MARK_RUN_COLOR_REF_KEYS2, MARK_RUN_FONTS_KEYS2, MARK_RUN_LANG_KEYS2, MARK_RUN_UNDERLINE_KEYS2, MARK_RUN_SHADING_KEYS2, MARK_RUN_BORDER_KEYS2, MARK_RUN_COLOR_MODE_VALUES2, MARK_RUN_VERTICAL_ALIGN_VALUES2, SET_DIRECTION_KEYS2, CLEAR_DIRECTION_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY2, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, SELECTION_CURRENT_ALLOWED_KEYS2, CREATE_COMMENT_ALLOWED_KEYS2, TRACKED_CHANGE_COMMENT_TARGET_ALLOWED_KEYS2, TEXT_SEARCH_COMMENT_TARGET_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, VALID_BEHAVIORS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, TEXT_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, LIST_KINDS2, LIST_INSERT_POSITIONS2, JOIN_DIRECTIONS2, MUTATION_SCOPES2, LEVEL_ALIGNMENTS2, TRAILING_CHARACTERS2, LIST_PRESET_IDS2, VALID_BLOCK_NODE_TYPES$1, VALID_LIST_KINDS2, VALID_INSERT_POSITIONS2, VALID_JOIN_DIRECTIONS2, VALID_MUTATION_SCOPES2, VALID_LEVEL_ALIGNMENTS2, VALID_TRAILING_CHARACTERS2, VALID_LIST_PRESETS2, VALID_CONTINUITY_VALUES2, VALID_SEQUENCE_MODES2, VALID_LIST_CREATE_MODES2, VALID_V2_LIST_BLOCK_NODE_TYPES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, VALID_HEADING_LEVELS2, SECTION_BREAK_TYPES$1, SECTION_BREAK_REPRESENTATIONS2, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES3, BODY_STORY_LOCATOR2, PARAGRAPH_SHAPE_TYPES2, PLAN_EXECUTE_UNSUPPORTED_OPERATION_IDS2, SNAPSHOT_VERSIONS2, PAYLOAD_VERSIONS2, VALID_STYLE_OPTION_FLAGS2, VALID_APPLY_TO_VALUES2, VALID_BORDER_EDGE_KEYS2, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT2 = 250, SECTION_BREAK_TYPES3, SECTION_ORIENTATIONS2, SECTION_VERTICAL_ALIGNS2, SECTION_DIRECTIONS2, HEADER_FOOTER_KINDS3, HEADER_FOOTER_VARIANTS3, LINE_NUMBER_RESTARTS2, PAGE_NUMBER_FORMATS2, PAGE_NUMBER_CHAPTER_SEPARATORS2, PAGE_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, VALID_TOC_UPDATE_MODES2, EDIT_ENTRY_PATCH_ALLOWED_KEYS2, PATCH_FIELDS2, CONTENT_CONTROL_TYPES2, LOCK_MODES2, CONTENT_CONTROL_APPEARANCES2, VALID_NODE_KINDS2, VALID_LOCK_MODES$1, VALID_CC_TYPES2, VALID_CC_APPEARANCES2, VALID_CONTENT_FORMATS2, VALID_RAW_PATCH_OPS2, VALID_SET_MODES2, VALID_CREATE_LOCATION_KINDS2, DEFAULT_PROTECTION_STATE, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$220) => ({
|
|
117585
|
+
}), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, PROPERTY_VALIDATOR_MAP2, TABLE_COLOR_PATTERN2, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_DIRECTIONS2, ALIGNMENT_POLICIES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, SET_MARK_RUN_PROPS_KEYS2, MARK_RUN_PROPS_FIELD_KEYS2, MARK_RUN_COLOR_REF_KEYS2, MARK_RUN_FONTS_KEYS2, MARK_RUN_LANG_KEYS2, MARK_RUN_UNDERLINE_KEYS2, MARK_RUN_SHADING_KEYS2, MARK_RUN_BORDER_KEYS2, MARK_RUN_COLOR_MODE_VALUES2, MARK_RUN_VERTICAL_ALIGN_VALUES2, SET_DIRECTION_KEYS2, SET_NUMBERING_KEYS2, CLEAR_DIRECTION_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY2, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, SELECTION_CURRENT_ALLOWED_KEYS2, CREATE_COMMENT_ALLOWED_KEYS2, TRACKED_CHANGE_COMMENT_TARGET_ALLOWED_KEYS2, TEXT_SEARCH_COMMENT_TARGET_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, VALID_BEHAVIORS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, TEXT_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, LIST_KINDS2, LIST_INSERT_POSITIONS2, JOIN_DIRECTIONS2, MUTATION_SCOPES2, LEVEL_ALIGNMENTS2, TRAILING_CHARACTERS2, LIST_PRESET_IDS2, VALID_BLOCK_NODE_TYPES$1, VALID_LIST_KINDS2, VALID_INSERT_POSITIONS2, VALID_JOIN_DIRECTIONS2, VALID_MUTATION_SCOPES2, VALID_LEVEL_ALIGNMENTS2, VALID_TRAILING_CHARACTERS2, VALID_LIST_PRESETS2, VALID_CONTINUITY_VALUES2, VALID_SEQUENCE_MODES2, VALID_LIST_CREATE_MODES2, VALID_V2_LIST_BLOCK_NODE_TYPES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, VALID_HEADING_LEVELS2, SECTION_BREAK_TYPES$1, SECTION_BREAK_REPRESENTATIONS2, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES3, BODY_STORY_LOCATOR2, PARAGRAPH_SHAPE_TYPES2, PLAN_EXECUTE_UNSUPPORTED_OPERATION_IDS2, SNAPSHOT_VERSIONS2, PAYLOAD_VERSIONS2, VALID_STYLE_OPTION_FLAGS2, VALID_APPLY_TO_VALUES2, VALID_BORDER_EDGE_KEYS2, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT2 = 250, SECTION_BREAK_TYPES3, SECTION_ORIENTATIONS2, SECTION_VERTICAL_ALIGNS2, SECTION_DIRECTIONS2, HEADER_FOOTER_KINDS3, HEADER_FOOTER_VARIANTS3, LINE_NUMBER_RESTARTS2, PAGE_NUMBER_FORMATS2, PAGE_NUMBER_CHAPTER_SEPARATORS2, PAGE_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, VALID_TOC_UPDATE_MODES2, EDIT_ENTRY_PATCH_ALLOWED_KEYS2, PATCH_FIELDS2, CONTENT_CONTROL_TYPES2, LOCK_MODES2, CONTENT_CONTROL_APPEARANCES2, VALID_NODE_KINDS2, VALID_LOCK_MODES$1, VALID_CC_TYPES2, VALID_CC_APPEARANCES2, VALID_CONTENT_FORMATS2, VALID_RAW_PATCH_OPS2, VALID_SET_MODES2, VALID_CREATE_LOCATION_KINDS2, DEFAULT_PROTECTION_STATE, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$220) => ({
|
|
117458
117586
|
handlerName,
|
|
117459
117587
|
handler: (params3) => {
|
|
117460
117588
|
const { nodes } = params3;
|
|
@@ -127720,7 +127848,10 @@ var isRegExp = (value) => {
|
|
|
127720
127848
|
abstractId
|
|
127721
127849
|
};
|
|
127722
127850
|
}, hasListDefinition = (editor, numId, ilvl) => {
|
|
127723
|
-
const
|
|
127851
|
+
const numbering = editor?.converter?.numbering;
|
|
127852
|
+
if (!numbering)
|
|
127853
|
+
return false;
|
|
127854
|
+
const { definitions, abstracts } = numbering;
|
|
127724
127855
|
const numDef = definitions[numId];
|
|
127725
127856
|
if (!numDef)
|
|
127726
127857
|
return false;
|
|
@@ -137024,7 +137155,7 @@ Docs: https://docs.superdoc.dev/getting-started/fonts`);
|
|
|
137024
137155
|
state.kern = kernNode.attributes["w:val"];
|
|
137025
137156
|
}
|
|
137026
137157
|
}, SuperConverter;
|
|
137027
|
-
var
|
|
137158
|
+
var init_SuperConverter_DVjSc_AY_es = __esm(() => {
|
|
137028
137159
|
init_rolldown_runtime_Bg48TavK_es();
|
|
137029
137160
|
init_jszip_C49i9kUs_es();
|
|
137030
137161
|
init_xml_js_CqGKpaft_es();
|
|
@@ -140054,6 +140185,11 @@ var init_SuperConverter_Bdmhv7BA_es = __esm(() => {
|
|
|
140054
140185
|
"direction",
|
|
140055
140186
|
"alignmentPolicy"
|
|
140056
140187
|
]);
|
|
140188
|
+
SET_NUMBERING_KEYS2 = new Set([
|
|
140189
|
+
"target",
|
|
140190
|
+
"numId",
|
|
140191
|
+
"level"
|
|
140192
|
+
]);
|
|
140057
140193
|
CLEAR_DIRECTION_KEYS2 = new Set(["target"]);
|
|
140058
140194
|
ST_ON_OFF_ON_VALUES2 = new Set([
|
|
140059
140195
|
"true",
|
|
@@ -166028,7 +166164,7 @@ var init_SuperConverter_Bdmhv7BA_es = __esm(() => {
|
|
|
166028
166164
|
};
|
|
166029
166165
|
});
|
|
166030
166166
|
|
|
166031
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
166167
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-DYtdH4mX.es.js
|
|
166032
166168
|
function parseSizeUnit(val = "0") {
|
|
166033
166169
|
const length3 = val.toString() || "0";
|
|
166034
166170
|
const value = Number.parseFloat(length3);
|
|
@@ -167916,7 +168052,7 @@ function executeTextSelector(editor, index2, query2, diagnostics, options = {})
|
|
|
167916
168052
|
total: 0
|
|
167917
168053
|
};
|
|
167918
168054
|
const search2 = requireEditorCommand(editor.commands?.search, "find (search)");
|
|
167919
|
-
const searchModel = options.searchModel ?? "visible";
|
|
168055
|
+
const searchModel = options.searchModel ?? (selector.includeDeletedText ? "raw" : "visible");
|
|
167920
168056
|
const textOffsetOptions = { textModel: searchModel };
|
|
167921
168057
|
pattern.lastIndex = 0;
|
|
167922
168058
|
const rawResult = search2(pattern, {
|
|
@@ -169331,6 +169467,56 @@ function paragraphsSetFlowOptionsWrapper(editor, input, options) {
|
|
|
169331
169467
|
return result;
|
|
169332
169468
|
}, options);
|
|
169333
169469
|
}
|
|
169470
|
+
function numberedSubtype(nodeType) {
|
|
169471
|
+
return nodeType === "heading" ? "heading" : "listItem";
|
|
169472
|
+
}
|
|
169473
|
+
function buildNumberedTarget(editor, candidate, fallback) {
|
|
169474
|
+
const originalType = candidate.nodeType;
|
|
169475
|
+
const subtype = numberedSubtype(originalType);
|
|
169476
|
+
const withStory = (nodeType, nodeId) => ({
|
|
169477
|
+
kind: "block",
|
|
169478
|
+
nodeType,
|
|
169479
|
+
nodeId,
|
|
169480
|
+
...fallback.story ? { story: fallback.story } : {}
|
|
169481
|
+
});
|
|
169482
|
+
if (subtype === originalType)
|
|
169483
|
+
return withStory(subtype, candidate.nodeId);
|
|
169484
|
+
const resolved = getBlockIndex(editor).candidates.find((c) => c.pos === candidate.pos);
|
|
169485
|
+
if (resolved && PARAGRAPH_NODE_TYPES.has(resolved.nodeType))
|
|
169486
|
+
return withStory(resolved.nodeType, resolved.nodeId);
|
|
169487
|
+
return fallback;
|
|
169488
|
+
}
|
|
169489
|
+
function paragraphsSetNumberingWrapper(editor, input, options) {
|
|
169490
|
+
rejectTrackedMode("format.paragraph.setNumbering", options);
|
|
169491
|
+
const candidate = resolveParagraphBlock(editor, input.target);
|
|
169492
|
+
const numId = input.numId;
|
|
169493
|
+
const level = input.level ?? 0;
|
|
169494
|
+
if (!ListHelpers.hasListDefinition(editor, numId, level))
|
|
169495
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", `No numbering definition resolves for numId ${numId} at level ${level}.`, {
|
|
169496
|
+
numId,
|
|
169497
|
+
level
|
|
169498
|
+
});
|
|
169499
|
+
if (options?.dryRun)
|
|
169500
|
+
return successResult(input.target);
|
|
169501
|
+
if (executeDomainCommand(editor, () => {
|
|
169502
|
+
const node3 = editor.state.doc.nodeAt(candidate.pos);
|
|
169503
|
+
if (!node3)
|
|
169504
|
+
return false;
|
|
169505
|
+
const existing = node3.attrs.paragraphProperties?.numberingProperties;
|
|
169506
|
+
if (existing && toFiniteNumber(existing.numId) === numId && (toFiniteNumber(existing.ilvl) ?? 0) === level)
|
|
169507
|
+
return false;
|
|
169508
|
+
const tr = editor.state.tr;
|
|
169509
|
+
updateNumberingProperties({
|
|
169510
|
+
numId,
|
|
169511
|
+
ilvl: level
|
|
169512
|
+
}, node3, candidate.pos, editor, tr);
|
|
169513
|
+
editor.dispatch(tr);
|
|
169514
|
+
clearIndexCache(editor);
|
|
169515
|
+
return true;
|
|
169516
|
+
}, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
|
|
169517
|
+
return noOpResult("format.paragraph.setNumbering");
|
|
169518
|
+
return successResult(buildNumberedTarget(editor, candidate, input.target));
|
|
169519
|
+
}
|
|
169334
169520
|
function paragraphsSetTabStopWrapper(editor, input, options) {
|
|
169335
169521
|
rejectTrackedMode("format.paragraph.setTabStop", options);
|
|
169336
169522
|
return mutateParagraphProperties(editor, resolveParagraphBlock(editor, input.target), "format.paragraph.setTabStop", input.target, (pPr) => {
|
|
@@ -176721,9 +176907,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN2, P
|
|
|
176721
176907
|
}
|
|
176722
176908
|
};
|
|
176723
176909
|
};
|
|
176724
|
-
var
|
|
176910
|
+
var init_create_headless_toolbar_DYtdH4mX_es = __esm(() => {
|
|
176725
176911
|
init_rolldown_runtime_Bg48TavK_es();
|
|
176726
|
-
|
|
176912
|
+
init_SuperConverter_DVjSc_AY_es();
|
|
176727
176913
|
init_jszip_C49i9kUs_es();
|
|
176728
176914
|
init_uuid_B2wVPhPi_es();
|
|
176729
176915
|
init_constants_D9qj59G2_es();
|
|
@@ -226817,7 +227003,7 @@ var init_remark_gfm_DCND_V_3_es = __esm(() => {
|
|
|
226817
227003
|
init_remark_gfm_BUJjZJLy_es();
|
|
226818
227004
|
});
|
|
226819
227005
|
|
|
226820
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
227006
|
+
// ../../packages/superdoc/dist/chunks/src-9y-vcUyr.es.js
|
|
226821
227007
|
function deleteProps(obj, propOrProps) {
|
|
226822
227008
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
226823
227009
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -242586,8 +242772,9 @@ function queryMatchAdapter(editor, input2) {
|
|
|
242586
242772
|
throw planError("INVALID_INPUT", `limit/offset are not valid when require is "${require$1}"`);
|
|
242587
242773
|
const isTextSelector = input2.select.type === "text";
|
|
242588
242774
|
const effectiveResolved = hasStyleCascade && isTextSelector;
|
|
242775
|
+
const { includeDeletedText: _stripped, ...textSelectWithoutDeleted } = isTextSelector ? input2.select : {};
|
|
242589
242776
|
const result = findLegacyAdapter(storyEditor, {
|
|
242590
|
-
select: input2.select,
|
|
242777
|
+
select: isTextSelector ? textSelectWithoutDeleted : input2.select,
|
|
242591
242778
|
within: input2.within,
|
|
242592
242779
|
includeNodes: input2.includeNodes,
|
|
242593
242780
|
limit: isTextSelector ? undefined : input2.limit,
|
|
@@ -248273,6 +248460,19 @@ function resolveBlockFontSizePt(styleCtx, styleId$1) {
|
|
|
248273
248460
|
return styleCtx.docDefaultsFontSizeHp / 2;
|
|
248274
248461
|
return OOXML_DEFAULT_FONT_SIZE_PT;
|
|
248275
248462
|
}
|
|
248463
|
+
function extractBlockNumbering(node3) {
|
|
248464
|
+
const attrs = node3.attrs;
|
|
248465
|
+
const numbering = attrs?.paragraphProperties?.numberingProperties ?? attrs?.numberingProperties;
|
|
248466
|
+
if (!numbering)
|
|
248467
|
+
return;
|
|
248468
|
+
const numId = toFiniteNumber(numbering.numId);
|
|
248469
|
+
if (numId === undefined || numId === 0)
|
|
248470
|
+
return;
|
|
248471
|
+
return {
|
|
248472
|
+
numId,
|
|
248473
|
+
level: toFiniteNumber(numbering.ilvl) ?? 0
|
|
248474
|
+
};
|
|
248475
|
+
}
|
|
248276
248476
|
function extractBlockFormatting(node3, styleCtx) {
|
|
248277
248477
|
const pProps = node3.attrs.paragraphProperties;
|
|
248278
248478
|
const styleId$1 = pProps?.styleId ?? null;
|
|
@@ -248397,6 +248597,7 @@ function blocksListWrapper(editor, input2) {
|
|
|
248397
248597
|
blocks: paged.map((candidate, i3) => {
|
|
248398
248598
|
const textLength = computeTextContentLength(candidate.node);
|
|
248399
248599
|
const fullText = input2?.includeText ? extractBlockText$1(candidate.node) : undefined;
|
|
248600
|
+
const numbering = extractBlockNumbering(candidate.node);
|
|
248400
248601
|
const ref$1 = textLength > 0 ? encodeV4Ref({
|
|
248401
248602
|
v: 4,
|
|
248402
248603
|
rev,
|
|
@@ -248418,6 +248619,7 @@ function blocksListWrapper(editor, input2) {
|
|
|
248418
248619
|
...fullText !== undefined ? { text: fullText } : {},
|
|
248419
248620
|
isEmpty: textLength === 0,
|
|
248420
248621
|
...extractBlockFormatting(candidate.node, styleCtx),
|
|
248622
|
+
...numbering ? { paragraphNumbering: numbering } : {},
|
|
248421
248623
|
...ref$1 ? { ref: ref$1 } : {}
|
|
248422
248624
|
};
|
|
248423
248625
|
}),
|
|
@@ -264886,7 +265088,8 @@ function assembleDocumentApiAdapters(editor) {
|
|
|
264886
265088
|
clearShading: (input2, options) => paragraphsClearShadingWrapper(editor, input2, options),
|
|
264887
265089
|
setMarkRunProps: () => capabilityUnavailable("format.paragraph.setMarkRunProps is only available on v2-backed sessions."),
|
|
264888
265090
|
setDirection: (input2, options) => paragraphsSetDirectionWrapper(editor, input2, options),
|
|
264889
|
-
clearDirection: (input2, options) => paragraphsClearDirectionWrapper(editor, input2, options)
|
|
265091
|
+
clearDirection: (input2, options) => paragraphsClearDirectionWrapper(editor, input2, options),
|
|
265092
|
+
setNumbering: (input2, options) => paragraphsSetNumberingWrapper(editor, input2, options)
|
|
264890
265093
|
},
|
|
264891
265094
|
trackChanges: {
|
|
264892
265095
|
list: (input2) => trackChangesListWrapper(editor, input2),
|
|
@@ -280733,6 +280936,13 @@ function renderRemoteCursors(options) {
|
|
|
280733
280936
|
options.remoteCursorElements.delete(clientId);
|
|
280734
280937
|
}
|
|
280735
280938
|
});
|
|
280939
|
+
options.remoteCursorOverlay?.querySelectorAll(".presentation-editor__remote-selection[data-client-id]")?.forEach((selectionEl) => {
|
|
280940
|
+
const clientIdAttr = selectionEl.getAttribute("data-client-id");
|
|
280941
|
+
if (clientIdAttr === null)
|
|
280942
|
+
return;
|
|
280943
|
+
if (!visibleClientIds.has(Number(clientIdAttr)))
|
|
280944
|
+
selectionEl.remove();
|
|
280945
|
+
});
|
|
280736
280946
|
}
|
|
280737
280947
|
function renderRemoteCaret(options) {
|
|
280738
280948
|
const caretLayout = options.computeCaretLayoutRect(options.cursor.head);
|
|
@@ -301640,32 +301850,39 @@ var Node$13 = class Node$14 {
|
|
|
301640
301850
|
const ranges = searchIndex.offsetRangeToDocRanges(indexMatch.start, indexMatch.end);
|
|
301641
301851
|
if (ranges.length === 0)
|
|
301642
301852
|
continue;
|
|
301643
|
-
const
|
|
301644
|
-
|
|
301645
|
-
const match$1 = {
|
|
301853
|
+
const matchText = typeof indexMatch.text === "string" ? indexMatch.text : ranges.map((r$1) => doc$12.textBetween(r$1.from, r$1.to)).join("");
|
|
301854
|
+
matches2.push({
|
|
301646
301855
|
from: ranges[0].from,
|
|
301647
301856
|
to: ranges[ranges.length - 1].to,
|
|
301648
301857
|
text: matchText,
|
|
301649
301858
|
id: v4_default(),
|
|
301650
301859
|
ranges,
|
|
301651
301860
|
trackerIds: []
|
|
301652
|
-
};
|
|
301653
|
-
|
|
301654
|
-
|
|
301655
|
-
|
|
301656
|
-
|
|
301657
|
-
|
|
301658
|
-
|
|
301659
|
-
|
|
301660
|
-
|
|
301661
|
-
|
|
301662
|
-
|
|
301663
|
-
|
|
301664
|
-
|
|
301665
|
-
|
|
301666
|
-
}
|
|
301861
|
+
});
|
|
301862
|
+
}
|
|
301863
|
+
if (positionTracker?.trackMany && matches2.length > 0) {
|
|
301864
|
+
const allTrackedRanges = [];
|
|
301865
|
+
for (const match$1 of matches2)
|
|
301866
|
+
match$1.ranges.forEach((range, rangeIndex) => {
|
|
301867
|
+
allTrackedRanges.push({
|
|
301868
|
+
from: range.from,
|
|
301869
|
+
to: range.to,
|
|
301870
|
+
spec: {
|
|
301871
|
+
type: SEARCH_POSITION_TRACKER_TYPE,
|
|
301872
|
+
metadata: { rangeIndex }
|
|
301873
|
+
}
|
|
301874
|
+
});
|
|
301875
|
+
});
|
|
301876
|
+
const allIds = positionTracker.trackMany(allTrackedRanges);
|
|
301877
|
+
if (allIds.length !== allTrackedRanges.length)
|
|
301878
|
+
throw new Error(`Search position tracker returned ${allIds.length} ids for ${allTrackedRanges.length} ranges; expected one id per range.`);
|
|
301879
|
+
let offset$1 = 0;
|
|
301880
|
+
for (const match$1 of matches2) {
|
|
301881
|
+
const count2 = match$1.ranges.length;
|
|
301882
|
+
match$1.trackerIds = allIds.slice(offset$1, offset$1 + count2);
|
|
301883
|
+
match$1.id = match$1.trackerIds[0];
|
|
301884
|
+
offset$1 += count2;
|
|
301667
301885
|
}
|
|
301668
|
-
matches2.push(match$1);
|
|
301669
301886
|
}
|
|
301670
301887
|
return matches2;
|
|
301671
301888
|
}, resolveMatchSelectionRange = (match$1, positionTracker) => {
|
|
@@ -310801,7 +311018,7 @@ menclose::after {
|
|
|
310801
311018
|
}
|
|
310802
311019
|
}
|
|
310803
311020
|
return { cellElement: cellEl };
|
|
310804
|
-
}, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_OVERLAP_INSERT_DELETE_CLASS = "track-overlap-insert-delete-dec",
|
|
311021
|
+
}, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_OVERLAP_INSERT_DELETE_CLASS = "track-overlap-insert-delete-dec", TRACK_CHANGE_BACKGROUND_FOCUSED_ALPHA = 68, expandHexColor = (hex) => {
|
|
310805
311022
|
const normalized = hex.replace("#", "");
|
|
310806
311023
|
if (normalized.length === 3)
|
|
310807
311024
|
return normalized.split("").map((char) => char + char).join("");
|
|
@@ -310811,7 +311028,7 @@ menclose::after {
|
|
|
310811
311028
|
}, colorWithAlpha = (color2, alpha) => {
|
|
310812
311029
|
const expanded = color2.trim().startsWith("#") ? expandHexColor(color2.trim()) : null;
|
|
310813
311030
|
if (!expanded)
|
|
310814
|
-
return
|
|
311031
|
+
return null;
|
|
310815
311032
|
return `#${expanded}${Math.max(0, Math.min(255, alpha)).toString(16).padStart(2, "0")}`;
|
|
310816
311033
|
}, setColorVar = (elem, name, value) => {
|
|
310817
311034
|
elem.style.setProperty(name, value);
|
|
@@ -310819,24 +311036,23 @@ menclose::after {
|
|
|
310819
311036
|
const color2 = layer.color;
|
|
310820
311037
|
if (!color2)
|
|
310821
311038
|
return;
|
|
310822
|
-
const background = colorWithAlpha(color2, TRACK_CHANGE_BACKGROUND_ALPHA);
|
|
310823
311039
|
const backgroundFocused = colorWithAlpha(color2, TRACK_CHANGE_BACKGROUND_FOCUSED_ALPHA);
|
|
310824
311040
|
switch (layer.kind) {
|
|
310825
311041
|
case "insert":
|
|
310826
311042
|
setColorVar(elem, "--sd-tracked-changes-insert-border", color2);
|
|
310827
|
-
|
|
310828
|
-
|
|
311043
|
+
if (backgroundFocused)
|
|
311044
|
+
setColorVar(elem, "--sd-tracked-changes-insert-background-focused", backgroundFocused);
|
|
310829
311045
|
break;
|
|
310830
311046
|
case "delete":
|
|
310831
311047
|
setColorVar(elem, "--sd-tracked-changes-delete-border", color2);
|
|
310832
|
-
|
|
310833
|
-
|
|
311048
|
+
if (backgroundFocused)
|
|
311049
|
+
setColorVar(elem, "--sd-tracked-changes-delete-background-focused", backgroundFocused);
|
|
310834
311050
|
setColorVar(elem, "--sd-tracked-changes-delete-text", color2);
|
|
310835
311051
|
break;
|
|
310836
311052
|
case "format":
|
|
310837
311053
|
setColorVar(elem, "--sd-tracked-changes-format-border", color2);
|
|
310838
|
-
|
|
310839
|
-
|
|
311054
|
+
if (backgroundFocused)
|
|
311055
|
+
setColorVar(elem, "--sd-tracked-changes-format-background-focused", backgroundFocused);
|
|
310840
311056
|
break;
|
|
310841
311057
|
default:
|
|
310842
311058
|
break;
|
|
@@ -316139,6 +316355,7 @@ menclose::after {
|
|
|
316139
316355
|
trackedChange.author ?? "",
|
|
316140
316356
|
trackedChange.authorEmail ?? "",
|
|
316141
316357
|
trackedChange.authorImage ?? "",
|
|
316358
|
+
trackedChange.color ?? "",
|
|
316142
316359
|
trackedChange.date ?? "",
|
|
316143
316360
|
trackedChange.before ? JSON.stringify(trackedChange.before) : "",
|
|
316144
316361
|
trackedChange.after ? JSON.stringify(trackedChange.after) : ""
|
|
@@ -325767,13 +325984,13 @@ menclose::after {
|
|
|
325767
325984
|
return;
|
|
325768
325985
|
console.log(...args$1);
|
|
325769
325986
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions, TRACKED_MARK_NAMES;
|
|
325770
|
-
var
|
|
325987
|
+
var init_src_9y_vcUyr_es = __esm(() => {
|
|
325771
325988
|
init_rolldown_runtime_Bg48TavK_es();
|
|
325772
|
-
|
|
325989
|
+
init_SuperConverter_DVjSc_AY_es();
|
|
325773
325990
|
init_jszip_C49i9kUs_es();
|
|
325774
325991
|
init_xml_js_CqGKpaft_es();
|
|
325775
325992
|
init_uuid_B2wVPhPi_es();
|
|
325776
|
-
|
|
325993
|
+
init_create_headless_toolbar_DYtdH4mX_es();
|
|
325777
325994
|
init_constants_D9qj59G2_es();
|
|
325778
325995
|
init_unified_BDuVPlMu_es();
|
|
325779
325996
|
init_remark_gfm_BUJjZJLy_es();
|
|
@@ -327143,6 +327360,21 @@ var init_src_C3y2aHWQ_es = __esm(() => {
|
|
|
327143
327360
|
referenceDocPath: "format/paragraph/clear-direction.mdx",
|
|
327144
327361
|
referenceGroup: "format.paragraph"
|
|
327145
327362
|
},
|
|
327363
|
+
"format.paragraph.setNumbering": {
|
|
327364
|
+
memberPath: "format.paragraph.setNumbering",
|
|
327365
|
+
description: "Attach numbering (numId + level) to an existing paragraph or heading so it joins a numbered sequence. Numbering is a paragraph property; the node and its style are otherwise unchanged, though any direct paragraph indent is cleared so the numbering level controls indentation. Direct edits only; tracked mode is unsupported.",
|
|
327366
|
+
expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the block already carries this numbering. On a successful apply, resolution.target reflects the post-mutation address (a numbered plain paragraph re-resolves to listItem; a heading stays a heading); a dryRun returns the input target.",
|
|
327367
|
+
requiresDocumentContext: true,
|
|
327368
|
+
metadata: mutationOperation2({
|
|
327369
|
+
idempotency: "conditional",
|
|
327370
|
+
supportsDryRun: true,
|
|
327371
|
+
supportsTrackedMode: false,
|
|
327372
|
+
possibleFailureCodes: ["NO_OP"],
|
|
327373
|
+
throws: T_PARAGRAPH_MUTATION2
|
|
327374
|
+
}),
|
|
327375
|
+
referenceDocPath: "format/paragraph/set-numbering.mdx",
|
|
327376
|
+
referenceGroup: "format.paragraph"
|
|
327377
|
+
},
|
|
327146
327378
|
"lists.list": {
|
|
327147
327379
|
memberPath: "lists.list",
|
|
327148
327380
|
description: "List all list nodes in the document, optionally filtered by scope.",
|
|
@@ -367997,11 +368229,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
367997
368229
|
]);
|
|
367998
368230
|
});
|
|
367999
368231
|
|
|
368000
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
368232
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-RmuwqQZI.es.js
|
|
368001
368233
|
var DEFAULT_TEXT_ALIGN_OPTIONS, DEFAULT_LINE_HEIGHT_OPTIONS, DEFAULT_ZOOM_OPTIONS, DEFAULT_DOCUMENT_MODE_OPTIONS, DEFAULT_FONT_SIZE_OPTIONS, headlessToolbarConstants, MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS, FONT_SIZE_OPTIONS;
|
|
368002
|
-
var
|
|
368003
|
-
|
|
368004
|
-
|
|
368234
|
+
var init_create_super_doc_ui_RmuwqQZI_es = __esm(() => {
|
|
368235
|
+
init_SuperConverter_DVjSc_AY_es();
|
|
368236
|
+
init_create_headless_toolbar_DYtdH4mX_es();
|
|
368005
368237
|
DEFAULT_TEXT_ALIGN_OPTIONS = [
|
|
368006
368238
|
{
|
|
368007
368239
|
label: "Left",
|
|
@@ -368292,15 +368524,15 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
368292
368524
|
|
|
368293
368525
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
368294
368526
|
var init_super_editor_es = __esm(() => {
|
|
368295
|
-
|
|
368296
|
-
|
|
368527
|
+
init_src_9y_vcUyr_es();
|
|
368528
|
+
init_SuperConverter_DVjSc_AY_es();
|
|
368297
368529
|
init_jszip_C49i9kUs_es();
|
|
368298
368530
|
init_xml_js_CqGKpaft_es();
|
|
368299
|
-
|
|
368531
|
+
init_create_headless_toolbar_DYtdH4mX_es();
|
|
368300
368532
|
init_constants_D9qj59G2_es();
|
|
368301
368533
|
init_unified_BDuVPlMu_es();
|
|
368302
368534
|
init_DocxZipper_BzS208BW_es();
|
|
368303
|
-
|
|
368535
|
+
init_create_super_doc_ui_RmuwqQZI_es();
|
|
368304
368536
|
init_ui_CGB3qmy3_es();
|
|
368305
368537
|
init_eventemitter3_UwU_CLPU_es();
|
|
368306
368538
|
init_errors_C_DoKMoN_es();
|
|
@@ -428092,7 +428324,10 @@ async function tryRunLegacyCompatCommand(argv, rest, io) {
|
|
|
428092
428324
|
}
|
|
428093
428325
|
function assertV1Opened(opened, label2) {
|
|
428094
428326
|
if (opened.runtime !== "v1") {
|
|
428095
|
-
throw new CliError("RUNTIME_V2_UNAVAILABLE", `${label2}: this command is not available in the v2 runtime.`, {
|
|
428327
|
+
throw new CliError("RUNTIME_V2_UNAVAILABLE", `${label2}: this command is not available in the v2 runtime.`, {
|
|
428328
|
+
runtime: opened.runtime,
|
|
428329
|
+
command: label2
|
|
428330
|
+
});
|
|
428096
428331
|
}
|
|
428097
428332
|
return opened;
|
|
428098
428333
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.17.0-next.
|
|
3
|
+
"version": "0.17.0-next.36",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"typescript": "^5.9.2",
|
|
28
28
|
"y-protocols": "^1.0.6",
|
|
29
29
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
30
|
-
"
|
|
31
|
-
"superdoc": "
|
|
30
|
+
"superdoc": "1.41.0",
|
|
31
|
+
"@superdoc/super-editor": "0.0.1"
|
|
32
32
|
},
|
|
33
33
|
"module": "src/index.ts",
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@superdoc-dev/cli-darwin-
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-linux-
|
|
41
|
-
"@superdoc-dev/cli-
|
|
42
|
-
"@superdoc-dev/cli-
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.17.0-next.36",
|
|
39
|
+
"@superdoc-dev/cli-darwin-arm64": "0.17.0-next.36",
|
|
40
|
+
"@superdoc-dev/cli-linux-x64": "0.17.0-next.36",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.17.0-next.36",
|
|
42
|
+
"@superdoc-dev/cli-linux-arm64": "0.17.0-next.36"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"predev": "node scripts/ensure-superdoc-build.js",
|