@superdoc-dev/cli 0.3.0-next.35 → 0.3.0-next.37

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.
Files changed (2) hide show
  1. package/dist/index.js +279 -30
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -1155,8 +1155,17 @@ function camelToKebab(value) {
1155
1155
  return value.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`);
1156
1156
  }
1157
1157
  function formatInlineAliasDescription(key) {
1158
+ if (key === "rtl") {
1159
+ return "Set or clear the `rtl` inline run property on the target text range. This does not change paragraph direction; use `format.paragraph.setDirection` for paragraph-level RTL.";
1160
+ }
1158
1161
  return `Set or clear the \`${key}\` inline run property on the target text range.`;
1159
1162
  }
1163
+ function formatInlineAliasExpectedResult(key) {
1164
+ if (key === "rtl") {
1165
+ return "Returns a TextMutationReceipt confirming only the inline run property patch was applied to the target range; paragraph direction is unchanged.";
1166
+ }
1167
+ return "Returns a TextMutationReceipt confirming the inline run property patch was applied to the target range.";
1168
+ }
1160
1169
  function projectFromDefinitions(fn) {
1161
1170
  return Object.fromEntries(OPERATION_IDS.map((id) => [id, fn(id, OPERATION_DEFINITIONS[id])]));
1162
1171
  }
@@ -1234,7 +1243,7 @@ var init_operation_definitions = __esm(() => {
1234
1243
  const definition = {
1235
1244
  memberPath: operationId,
1236
1245
  description: formatInlineAliasDescription(entry.key),
1237
- expectedResult: "Returns a TextMutationReceipt confirming the inline run property patch was applied to the target range.",
1246
+ expectedResult: formatInlineAliasExpectedResult(entry.key),
1238
1247
  requiresDocumentContext: true,
1239
1248
  metadata: mutationOperation({
1240
1249
  idempotency: "conditional",
@@ -2175,6 +2184,38 @@ var init_operation_definitions = __esm(() => {
2175
2184
  referenceDocPath: "format/paragraph/clear-shading.mdx",
2176
2185
  referenceGroup: "format.paragraph"
2177
2186
  },
2187
+ "format.paragraph.setDirection": {
2188
+ memberPath: "format.paragraph.setDirection",
2189
+ description: "Set paragraph base direction (LTR or RTL via w:bidi). Optionally align text to match.",
2190
+ expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the direction already matches.",
2191
+ requiresDocumentContext: true,
2192
+ metadata: mutationOperation({
2193
+ idempotency: "conditional",
2194
+ supportsDryRun: true,
2195
+ supportsTrackedMode: false,
2196
+ possibleFailureCodes: ["NO_OP"],
2197
+ throws: T_PARAGRAPH_MUTATION
2198
+ }),
2199
+ referenceDocPath: "format/paragraph/set-direction.mdx",
2200
+ referenceGroup: "format.paragraph",
2201
+ intentGroup: "format",
2202
+ intentAction: "set_direction"
2203
+ },
2204
+ "format.paragraph.clearDirection": {
2205
+ memberPath: "format.paragraph.clearDirection",
2206
+ description: "Remove explicit paragraph direction, reverting to inherited or default (LTR).",
2207
+ expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if no direction is set.",
2208
+ requiresDocumentContext: true,
2209
+ metadata: mutationOperation({
2210
+ idempotency: "conditional",
2211
+ supportsDryRun: true,
2212
+ supportsTrackedMode: false,
2213
+ possibleFailureCodes: ["NO_OP"],
2214
+ throws: T_PARAGRAPH_MUTATION
2215
+ }),
2216
+ referenceDocPath: "format/paragraph/clear-direction.mdx",
2217
+ referenceGroup: "format.paragraph"
2218
+ },
2178
2219
  "lists.list": {
2179
2220
  memberPath: "lists.list",
2180
2221
  description: "List all list nodes in the document, optionally filtered by scope.",
@@ -6125,7 +6166,7 @@ function executeWrite(adapter, request, options) {
6125
6166
  }
6126
6167
 
6127
6168
  // ../../packages/document-api/src/paragraphs/paragraphs.types.ts
6128
- var PARAGRAPH_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TAB_STOP_LEADERS, BORDER_SIDES, CLEAR_BORDER_SIDES, LINE_RULES;
6169
+ var PARAGRAPH_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TAB_STOP_LEADERS, BORDER_SIDES, CLEAR_BORDER_SIDES, LINE_RULES, PARAGRAPH_DIRECTIONS, ALIGNMENT_POLICIES;
6129
6170
  var init_paragraphs_types = __esm(() => {
6130
6171
  PARAGRAPH_ALIGNMENTS = ["left", "center", "right", "justify"];
6131
6172
  TAB_STOP_ALIGNMENTS = ["left", "center", "right", "decimal", "bar"];
@@ -6133,6 +6174,8 @@ var init_paragraphs_types = __esm(() => {
6133
6174
  BORDER_SIDES = ["top", "bottom", "left", "right", "between", "bar"];
6134
6175
  CLEAR_BORDER_SIDES = ["top", "bottom", "left", "right", "between", "bar", "all"];
6135
6176
  LINE_RULES = ["auto", "exact", "atLeast"];
6177
+ PARAGRAPH_DIRECTIONS = ["ltr", "rtl"];
6178
+ ALIGNMENT_POLICIES = ["preserve", "matchDirection"];
6136
6179
  });
6137
6180
 
6138
6181
  // ../../packages/document-api/src/paragraphs/paragraphs.ts
@@ -6388,6 +6431,23 @@ function validateClearShading(input) {
6388
6431
  assertParagraphTarget(input, "format.paragraph.clearShading");
6389
6432
  assertNoUnknownFields(input, CLEAR_SHADING_KEYS, "format.paragraph.clearShading");
6390
6433
  }
6434
+ function validateSetDirection(input) {
6435
+ const op = "format.paragraph.setDirection";
6436
+ assertParagraphTarget(input, op);
6437
+ assertNoUnknownFields(input, SET_DIRECTION_KEYS, op);
6438
+ const rec = input;
6439
+ if (rec.direction === undefined) {
6440
+ throw new DocumentApiValidationError("INVALID_INPUT", `${op} requires a direction field.`);
6441
+ }
6442
+ assertOneOf(rec.direction, "direction", PARAGRAPH_DIRECTIONS, op);
6443
+ if (rec.alignmentPolicy !== undefined) {
6444
+ assertOneOf(rec.alignmentPolicy, "alignmentPolicy", ALIGNMENT_POLICIES, op);
6445
+ }
6446
+ }
6447
+ function validateClearDirection(input) {
6448
+ assertParagraphTarget(input, "format.paragraph.clearDirection");
6449
+ assertNoUnknownFields(input, CLEAR_DIRECTION_KEYS, "format.paragraph.clearDirection");
6450
+ }
6391
6451
  function executeParagraphsSetStyle(adapter, input, options) {
6392
6452
  validateSetStyle(input);
6393
6453
  return adapter.setStyle(input, normalizeMutationOptions(options));
@@ -6464,7 +6524,15 @@ function executeParagraphsClearShading(adapter, input, options) {
6464
6524
  validateClearShading(input);
6465
6525
  return adapter.clearShading(input, normalizeMutationOptions(options));
6466
6526
  }
6467
- 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;
6527
+ function executeParagraphsSetDirection(adapter, input, options) {
6528
+ validateSetDirection(input);
6529
+ return adapter.setDirection(input, normalizeMutationOptions(options));
6530
+ }
6531
+ function executeParagraphsClearDirection(adapter, input, options) {
6532
+ validateClearDirection(input);
6533
+ return adapter.clearDirection(input, normalizeMutationOptions(options));
6534
+ }
6535
+ 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_DIRECTION_KEYS, CLEAR_DIRECTION_KEYS;
6468
6536
  var init_paragraphs = __esm(() => {
6469
6537
  init_errors2();
6470
6538
  init_validation_primitives();
@@ -6490,6 +6558,8 @@ var init_paragraphs = __esm(() => {
6490
6558
  CLEAR_BORDER_KEYS = new Set(["target", "side"]);
6491
6559
  SET_SHADING_KEYS = new Set(["target", "fill", "color", "pattern"]);
6492
6560
  CLEAR_SHADING_KEYS = new Set(["target"]);
6561
+ SET_DIRECTION_KEYS = new Set(["target", "direction", "alignmentPolicy"]);
6562
+ CLEAR_DIRECTION_KEYS = new Set(["target"]);
6493
6563
  });
6494
6564
 
6495
6565
  // ../../packages/document-api/src/inline-semantics/token-sets.ts
@@ -9342,6 +9412,22 @@ var init_schemas = __esm(() => {
9342
9412
  success: paragraphMutationSuccessSchema,
9343
9413
  failure: paragraphMutationFailureSchemaFor("format.paragraph.clearShading")
9344
9414
  },
9415
+ "format.paragraph.setDirection": {
9416
+ input: objectSchema({
9417
+ target: paragraphTargetSchema,
9418
+ direction: { type: "string", enum: ["ltr", "rtl"] },
9419
+ alignmentPolicy: { type: "string", enum: ["preserve", "matchDirection"] }
9420
+ }, ["target", "direction"]),
9421
+ output: paragraphMutationResultSchemaFor("format.paragraph.setDirection"),
9422
+ success: paragraphMutationSuccessSchema,
9423
+ failure: paragraphMutationFailureSchemaFor("format.paragraph.setDirection")
9424
+ },
9425
+ "format.paragraph.clearDirection": {
9426
+ input: objectSchema({ target: paragraphTargetSchema }, ["target"]),
9427
+ output: paragraphMutationResultSchemaFor("format.paragraph.clearDirection"),
9428
+ success: paragraphMutationSuccessSchema,
9429
+ failure: paragraphMutationFailureSchemaFor("format.paragraph.clearDirection")
9430
+ },
9345
9431
  "styles.apply": (() => {
9346
9432
  const runInputSchema = objectSchema({
9347
9433
  target: objectSchema({ scope: { const: "docDefaults" }, channel: { const: "run" } }, ["scope", "channel"]),
@@ -10563,8 +10649,8 @@ var init_schemas = __esm(() => {
10563
10649
  ...objectSchema({
10564
10650
  target: tableAddressSchema,
10565
10651
  nodeId: { type: "string" },
10566
- atRowIndex: { type: "integer", minimum: 1 }
10567
- }, ["atRowIndex"]),
10652
+ rowIndex: { type: "integer", minimum: 1 }
10653
+ }, ["rowIndex"]),
10568
10654
  oneOf: [{ required: ["target"] }, { required: ["nodeId"] }]
10569
10655
  },
10570
10656
  output: tableMutationResultSchema,
@@ -14112,6 +14198,8 @@ function buildDispatchTable(api) {
14112
14198
  "format.paragraph.clearBorder": (input, options) => api.format.paragraph.clearBorder(input, options),
14113
14199
  "format.paragraph.setShading": (input, options) => api.format.paragraph.setShading(input, options),
14114
14200
  "format.paragraph.clearShading": (input, options) => api.format.paragraph.clearShading(input, options),
14201
+ "format.paragraph.setDirection": (input, options) => api.format.paragraph.setDirection(input, options),
14202
+ "format.paragraph.clearDirection": (input, options) => api.format.paragraph.clearDirection(input, options),
14115
14203
  "styles.apply": (input, options) => api.styles.apply(input, options),
14116
14204
  "create.paragraph": (input, options) => api.create.paragraph(input, options),
14117
14205
  "create.heading": (input, options) => api.create.heading(input, options),
@@ -14548,6 +14636,16 @@ function validateCellOrTableScopedCellLocator(input, operationName) {
14548
14636
  }
14549
14637
  }
14550
14638
  }
14639
+ function normalizeTablesSplitInput(input) {
14640
+ const legacy = input.atRowIndex;
14641
+ if (legacy === undefined)
14642
+ return input;
14643
+ if (input.rowIndex !== undefined && input.rowIndex !== legacy) {
14644
+ throw new DocumentApiValidationError("INVALID_TARGET", "tables.split: cannot provide both rowIndex and atRowIndex with different values.", { fields: ["rowIndex", "atRowIndex"] });
14645
+ }
14646
+ const { atRowIndex: _legacy, ...rest } = input;
14647
+ return { ...rest, rowIndex: legacy };
14648
+ }
14551
14649
  function executeTableLocatorOp(operationName, adapter, input, options) {
14552
14650
  validateTableLocator(input, operationName);
14553
14651
  return adapter(input, normalizeMutationOptions(options));
@@ -16360,6 +16458,12 @@ function createDocumentApi(adapters) {
16360
16458
  },
16361
16459
  clearShading(input, options) {
16362
16460
  return executeParagraphsClearShading(adapters.paragraphs, input, options);
16461
+ },
16462
+ setDirection(input, options) {
16463
+ return executeParagraphsSetDirection(adapters.paragraphs, input, options);
16464
+ },
16465
+ clearDirection(input, options) {
16466
+ return executeParagraphsClearDirection(adapters.paragraphs, input, options);
16363
16467
  }
16364
16468
  }
16365
16469
  },
@@ -16685,7 +16789,8 @@ function createDocumentApi(adapters) {
16685
16789
  return executeTableLocatorOp("tables.move", adapters.tables.move.bind(adapters.tables), input, options);
16686
16790
  },
16687
16791
  split(input, options) {
16688
- return executeTableLocatorOp("tables.split", adapters.tables.split.bind(adapters.tables), input, options);
16792
+ const normalized = normalizeTablesSplitInput(input);
16793
+ return executeRowLocatorOp("tables.split", adapters.tables.split.bind(adapters.tables), normalized, options);
16689
16794
  },
16690
16795
  convertToText(input, options) {
16691
16796
  return executeTableLocatorOp("tables.convertToText", adapters.tables.convertToText.bind(adapters.tables), input, options);
@@ -39682,7 +39787,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
39682
39787
  emptyOptions2 = {};
39683
39788
  });
39684
39789
 
39685
- // ../../packages/superdoc/dist/chunks/SuperConverter-hJPjNp5G.es.js
39790
+ // ../../packages/superdoc/dist/chunks/SuperConverter-BsjuwDIO.es.js
39686
39791
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
39687
39792
  const fieldValue = extension$1.config[field];
39688
39793
  if (typeof fieldValue === "function")
@@ -40715,8 +40820,15 @@ function camelToKebab3(value) {
40715
40820
  return value.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`);
40716
40821
  }
40717
40822
  function formatInlineAliasDescription2(key) {
40823
+ if (key === "rtl")
40824
+ return "Set or clear the `rtl` inline run property on the target text range. This does not change paragraph direction; use `format.paragraph.setDirection` for paragraph-level RTL.";
40718
40825
  return `Set or clear the \`${key}\` inline run property on the target text range.`;
40719
40826
  }
40827
+ function formatInlineAliasExpectedResult2(key) {
40828
+ if (key === "rtl")
40829
+ return "Returns a TextMutationReceipt confirming only the inline run property patch was applied to the target range; paragraph direction is unchanged.";
40830
+ return "Returns a TextMutationReceipt confirming the inline run property patch was applied to the target range.";
40831
+ }
40720
40832
  function projectFromDefinitions2(fn) {
40721
40833
  return Object.fromEntries(OPERATION_IDS2.map((id) => [id, fn(id, OPERATION_DEFINITIONS2[id])]));
40722
40834
  }
@@ -40995,6 +41107,21 @@ function validateClearShading2(input) {
40995
41107
  assertParagraphTarget2(input, "format.paragraph.clearShading");
40996
41108
  assertNoUnknownFields3(input, CLEAR_SHADING_KEYS2, "format.paragraph.clearShading");
40997
41109
  }
41110
+ function validateSetDirection2(input) {
41111
+ const op = "format.paragraph.setDirection";
41112
+ assertParagraphTarget2(input, op);
41113
+ assertNoUnknownFields3(input, SET_DIRECTION_KEYS2, op);
41114
+ const rec = input;
41115
+ if (rec.direction === undefined)
41116
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${op} requires a direction field.`);
41117
+ assertOneOf$2(rec.direction, "direction", PARAGRAPH_DIRECTIONS2, op);
41118
+ if (rec.alignmentPolicy !== undefined)
41119
+ assertOneOf$2(rec.alignmentPolicy, "alignmentPolicy", ALIGNMENT_POLICIES2, op);
41120
+ }
41121
+ function validateClearDirection2(input) {
41122
+ assertParagraphTarget2(input, "format.paragraph.clearDirection");
41123
+ assertNoUnknownFields3(input, CLEAR_DIRECTION_KEYS2, "format.paragraph.clearDirection");
41124
+ }
40998
41125
  function executeParagraphsSetStyle2(adapter, input, options) {
40999
41126
  validateSetStyle2(input);
41000
41127
  return adapter.setStyle(input, normalizeMutationOptions2(options));
@@ -41071,6 +41198,14 @@ function executeParagraphsClearShading2(adapter, input, options) {
41071
41198
  validateClearShading2(input);
41072
41199
  return adapter.clearShading(input, normalizeMutationOptions2(options));
41073
41200
  }
41201
+ function executeParagraphsSetDirection2(adapter, input, options) {
41202
+ validateSetDirection2(input);
41203
+ return adapter.setDirection(input, normalizeMutationOptions2(options));
41204
+ }
41205
+ function executeParagraphsClearDirection2(adapter, input, options) {
41206
+ validateClearDirection2(input);
41207
+ return adapter.clearDirection(input, normalizeMutationOptions2(options));
41208
+ }
41074
41209
  function getPropertyDefinition2(key, channel) {
41075
41210
  return PROPERTY_INDEX2.get(`${channel}:${key}`);
41076
41211
  }
@@ -43465,6 +43600,8 @@ function buildDispatchTable2(api) {
43465
43600
  "format.paragraph.clearBorder": (input, options) => api.format.paragraph.clearBorder(input, options),
43466
43601
  "format.paragraph.setShading": (input, options) => api.format.paragraph.setShading(input, options),
43467
43602
  "format.paragraph.clearShading": (input, options) => api.format.paragraph.clearShading(input, options),
43603
+ "format.paragraph.setDirection": (input, options) => api.format.paragraph.setDirection(input, options),
43604
+ "format.paragraph.clearDirection": (input, options) => api.format.paragraph.clearDirection(input, options),
43468
43605
  "styles.apply": (input, options) => api.styles.apply(input, options),
43469
43606
  "create.paragraph": (input, options) => api.create.paragraph(input, options),
43470
43607
  "create.heading": (input, options) => api.create.heading(input, options),
@@ -43863,6 +44000,18 @@ function validateCellOrTableScopedCellLocator2(input, operationName) {
43863
44000
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}: rowIndex and columnIndex are required when target is a table.`, { fields: ["rowIndex", "columnIndex"] });
43864
44001
  }
43865
44002
  }
44003
+ function normalizeTablesSplitInput2(input) {
44004
+ const legacy = input.atRowIndex;
44005
+ if (legacy === undefined)
44006
+ return input;
44007
+ if (input.rowIndex !== undefined && input.rowIndex !== legacy)
44008
+ throw new DocumentApiValidationError2("INVALID_TARGET", "tables.split: cannot provide both rowIndex and atRowIndex with different values.", { fields: ["rowIndex", "atRowIndex"] });
44009
+ const { atRowIndex: _legacy, ...rest } = input;
44010
+ return {
44011
+ ...rest,
44012
+ rowIndex: legacy
44013
+ };
44014
+ }
43866
44015
  function executeTableLocatorOp2(operationName, adapter, input, options) {
43867
44016
  validateTableLocator2(input, operationName);
43868
44017
  return adapter(input, normalizeMutationOptions2(options));
@@ -45395,6 +45544,12 @@ function createDocumentApi2(adapters) {
45395
45544
  },
45396
45545
  clearShading(input, options) {
45397
45546
  return executeParagraphsClearShading2(adapters.paragraphs, input, options);
45547
+ },
45548
+ setDirection(input, options) {
45549
+ return executeParagraphsSetDirection2(adapters.paragraphs, input, options);
45550
+ },
45551
+ clearDirection(input, options) {
45552
+ return executeParagraphsClearDirection2(adapters.paragraphs, input, options);
45398
45553
  }
45399
45554
  }
45400
45555
  },
@@ -45720,7 +45875,8 @@ function createDocumentApi2(adapters) {
45720
45875
  return executeTableLocatorOp2("tables.move", adapters.tables.move.bind(adapters.tables), input, options);
45721
45876
  },
45722
45877
  split(input, options) {
45723
- return executeTableLocatorOp2("tables.split", adapters.tables.split.bind(adapters.tables), input, options);
45878
+ const normalized = normalizeTablesSplitInput2(input);
45879
+ return executeRowLocatorOp2("tables.split", adapters.tables.split.bind(adapters.tables), normalized, options);
45724
45880
  },
45725
45881
  convertToText(input, options) {
45726
45882
  return executeTableLocatorOp2("tables.convertToText", adapters.tables.convertToText.bind(adapters.tables), input, options);
@@ -71669,7 +71825,7 @@ var isRegExp = (value) => {
71669
71825
  tracked: false,
71670
71826
  carrier: runAttributeCarrier2(runPropertyKey ?? key),
71671
71827
  schema
71672
- }), 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, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_HEADER_FOOTER_MUTATION2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, 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, 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, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, CREATE_COMMENT_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, LEGACY_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES2, SNAPSHOT_VERSION2 = "sd-diff-snapshot/v1", PAYLOAD_VERSION2 = "sd-diff-payload/v1", VALID_STYLE_OPTION_FLAGS2, TABLE_BORDER_COLOR_PATTERN2, 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_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, PATCH_FIELDS2, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$216) => ({
71828
+ }), 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, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_HEADER_FOOTER_MUTATION2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, 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_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, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, CREATE_COMMENT_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, LEGACY_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES2, SNAPSHOT_VERSION2 = "sd-diff-snapshot/v1", PAYLOAD_VERSION2 = "sd-diff-payload/v1", VALID_STYLE_OPTION_FLAGS2, TABLE_BORDER_COLOR_PATTERN2, 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_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, PATCH_FIELDS2, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$216) => ({
71673
71829
  handlerName,
71674
71830
  handler: (params) => {
71675
71831
  const { nodes } = params;
@@ -85700,7 +85856,7 @@ var isRegExp = (value) => {
85700
85856
  state.kern = kernNode.attributes["w:val"];
85701
85857
  }
85702
85858
  }, SuperConverter;
85703
- var init_SuperConverter_hJPjNp5G_es = __esm(() => {
85859
+ var init_SuperConverter_BsjuwDIO_es = __esm(() => {
85704
85860
  init_rolldown_runtime_B2q5OVn9_es();
85705
85861
  init_jszip_ChlR43oI_es();
85706
85862
  init_xml_js_BtmJ6bNs_es();
@@ -88680,7 +88836,7 @@ var init_SuperConverter_hJPjNp5G_es = __esm(() => {
88680
88836
  return [operationId, {
88681
88837
  memberPath: operationId,
88682
88838
  description: formatInlineAliasDescription2(entry.key),
88683
- expectedResult: "Returns a TextMutationReceipt confirming the inline run property patch was applied to the target range.",
88839
+ expectedResult: formatInlineAliasExpectedResult2(entry.key),
88684
88840
  requiresDocumentContext: true,
88685
88841
  metadata: mutationOperation2({
88686
88842
  idempotency: "conditional",
@@ -89705,6 +89861,38 @@ var init_SuperConverter_hJPjNp5G_es = __esm(() => {
89705
89861
  referenceDocPath: "format/paragraph/clear-shading.mdx",
89706
89862
  referenceGroup: "format.paragraph"
89707
89863
  },
89864
+ "format.paragraph.setDirection": {
89865
+ memberPath: "format.paragraph.setDirection",
89866
+ description: "Set paragraph base direction (LTR or RTL via w:bidi). Optionally align text to match.",
89867
+ expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the direction already matches.",
89868
+ requiresDocumentContext: true,
89869
+ metadata: mutationOperation2({
89870
+ idempotency: "conditional",
89871
+ supportsDryRun: true,
89872
+ supportsTrackedMode: false,
89873
+ possibleFailureCodes: ["NO_OP"],
89874
+ throws: T_PARAGRAPH_MUTATION2
89875
+ }),
89876
+ referenceDocPath: "format/paragraph/set-direction.mdx",
89877
+ referenceGroup: "format.paragraph",
89878
+ intentGroup: "format",
89879
+ intentAction: "set_direction"
89880
+ },
89881
+ "format.paragraph.clearDirection": {
89882
+ memberPath: "format.paragraph.clearDirection",
89883
+ description: "Remove explicit paragraph direction, reverting to inherited or default (LTR).",
89884
+ expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if no direction is set.",
89885
+ requiresDocumentContext: true,
89886
+ metadata: mutationOperation2({
89887
+ idempotency: "conditional",
89888
+ supportsDryRun: true,
89889
+ supportsTrackedMode: false,
89890
+ possibleFailureCodes: ["NO_OP"],
89891
+ throws: T_PARAGRAPH_MUTATION2
89892
+ }),
89893
+ referenceDocPath: "format/paragraph/clear-direction.mdx",
89894
+ referenceGroup: "format.paragraph"
89895
+ },
89708
89896
  "lists.list": {
89709
89897
  memberPath: "lists.list",
89710
89898
  description: "List all list nodes in the document, optionally filtered by scope.",
@@ -93912,6 +94100,8 @@ var init_SuperConverter_hJPjNp5G_es = __esm(() => {
93912
94100
  "exact",
93913
94101
  "atLeast"
93914
94102
  ];
94103
+ PARAGRAPH_DIRECTIONS2 = ["ltr", "rtl"];
94104
+ ALIGNMENT_POLICIES2 = ["preserve", "matchDirection"];
93915
94105
  PARAGRAPH_BLOCK_TYPES2 = new Set([
93916
94106
  "paragraph",
93917
94107
  "heading",
@@ -93975,6 +94165,12 @@ var init_SuperConverter_hJPjNp5G_es = __esm(() => {
93975
94165
  "pattern"
93976
94166
  ]);
93977
94167
  CLEAR_SHADING_KEYS2 = new Set(["target"]);
94168
+ SET_DIRECTION_KEYS2 = new Set([
94169
+ "target",
94170
+ "direction",
94171
+ "alignmentPolicy"
94172
+ ]);
94173
+ CLEAR_DIRECTION_KEYS2 = new Set(["target"]);
93978
94174
  ST_ON_OFF_ON_VALUES2 = new Set([
93979
94175
  "true",
93980
94176
  "1",
@@ -96581,7 +96777,17 @@ var init_SuperConverter_hJPjNp5G_es = __esm(() => {
96581
96777
  type: "string",
96582
96778
  minLength: 1
96583
96779
  }
96584
- }, ["target"]) }, paragraphMutationResultSchemaFor2("format.paragraph.setShading"), paragraphMutationFailureSchemaFor2("format.paragraph.setShading"), objectSchema2({ target: paragraphTargetSchema2 }, ["target"]), paragraphMutationResultSchemaFor2("format.paragraph.clearShading"), paragraphMutationFailureSchemaFor2("format.paragraph.clearShading"), (() => {
96780
+ }, ["target"]) }, paragraphMutationResultSchemaFor2("format.paragraph.setShading"), paragraphMutationFailureSchemaFor2("format.paragraph.setShading"), objectSchema2({ target: paragraphTargetSchema2 }, ["target"]), paragraphMutationResultSchemaFor2("format.paragraph.clearShading"), paragraphMutationFailureSchemaFor2("format.paragraph.clearShading"), objectSchema2({
96781
+ target: paragraphTargetSchema2,
96782
+ direction: {
96783
+ type: "string",
96784
+ enum: ["ltr", "rtl"]
96785
+ },
96786
+ alignmentPolicy: {
96787
+ type: "string",
96788
+ enum: ["preserve", "matchDirection"]
96789
+ }
96790
+ }, ["target", "direction"]), paragraphMutationResultSchemaFor2("format.paragraph.setDirection"), paragraphMutationFailureSchemaFor2("format.paragraph.setDirection"), objectSchema2({ target: paragraphTargetSchema2 }, ["target"]), paragraphMutationResultSchemaFor2("format.paragraph.clearDirection"), paragraphMutationFailureSchemaFor2("format.paragraph.clearDirection"), (() => {
96585
96791
  const runInputSchema = objectSchema2({
96586
96792
  target: objectSchema2({
96587
96793
  scope: { const: "docDefaults" },
@@ -97753,11 +97959,11 @@ var init_SuperConverter_hJPjNp5G_es = __esm(() => {
97753
97959
  }, ["destination"]) }, { ...objectSchema2({
97754
97960
  target: tableAddressSchema2,
97755
97961
  nodeId: { type: "string" },
97756
- atRowIndex: {
97962
+ rowIndex: {
97757
97963
  type: "integer",
97758
97964
  minimum: 1
97759
97965
  }
97760
- }, ["atRowIndex"]) }, { ...objectSchema2({
97966
+ }, ["rowIndex"]) }, { ...objectSchema2({
97761
97967
  target: tableAddressSchema2,
97762
97968
  nodeId: { type: "string" },
97763
97969
  delimiter: { enum: [
@@ -148302,7 +148508,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
148302
148508
  init_remark_gfm_z_sDF4ss_es();
148303
148509
  });
148304
148510
 
148305
- // ../../packages/superdoc/dist/chunks/src-99pz_-W7.es.js
148511
+ // ../../packages/superdoc/dist/chunks/src-DH8mR7rX.es.js
148306
148512
  function deleteProps(obj, propOrProps) {
148307
148513
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
148308
148514
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -153969,8 +154175,8 @@ function extractParagraphProps(attrs) {
153969
154175
  props.shading = ppAny.shading;
153970
154176
  hasProps = true;
153971
154177
  }
153972
- if (ppAny.bidi !== undefined) {
153973
- props.bidi = ppAny.bidi;
154178
+ if (ppAny.rightToLeft !== undefined) {
154179
+ props.bidi = ppAny.rightToLeft;
153974
154180
  hasProps = true;
153975
154181
  }
153976
154182
  if (ppAny.markRunProps) {
@@ -159174,7 +159380,7 @@ function buildParagraphProperties(styleRef, props) {
159174
159380
  if (props.shading)
159175
159381
  result.shading = props.shading;
159176
159382
  if (props.bidi !== undefined)
159177
- result.bidi = props.bidi;
159383
+ result.rightToLeft = props.bidi;
159178
159384
  if (props.outlineLevel !== undefined)
159179
159385
  result.outlineLevel = props.outlineLevel;
159180
159386
  if (props.markRunProps)
@@ -161976,6 +162182,24 @@ function paragraphsClearShadingWrapper(editor, input2, options) {
161976
162182
  return result;
161977
162183
  }, options);
161978
162184
  }
162185
+ function paragraphsSetDirectionWrapper(editor, input2, options) {
162186
+ rejectTrackedMode("format.paragraph.setDirection", options);
162187
+ return mutateParagraphProperties(editor, resolveParagraphBlock(editor, input2.target), "format.paragraph.setDirection", input2.target, (pPr) => {
162188
+ const result = { ...pPr };
162189
+ result.rightToLeft = input2.direction === "rtl";
162190
+ if (input2.alignmentPolicy === "matchDirection")
162191
+ result.justification = input2.direction === "rtl" ? "right" : "left";
162192
+ return result;
162193
+ }, options);
162194
+ }
162195
+ function paragraphsClearDirectionWrapper(editor, input2, options) {
162196
+ rejectTrackedMode("format.paragraph.clearDirection", options);
162197
+ return mutateParagraphProperties(editor, resolveParagraphBlock(editor, input2.target), "format.paragraph.clearDirection", input2.target, (pPr) => {
162198
+ const result = { ...pPr };
162199
+ delete result.rightToLeft;
162200
+ return result;
162201
+ }, options);
162202
+ }
161979
162203
  function buildTrackChangeInfo(editor, change) {
161980
162204
  const excerpt = normalizeExcerpt(editor.state.doc.textBetween(change.from, change.to, " ", ""));
161981
162205
  const type = resolveTrackedChangeType(change);
@@ -166467,7 +166691,7 @@ function tablesSplitAdapter(editor, input2, options) {
166467
166691
  rejectTrackedMode("tables.split", options);
166468
166692
  const { candidate, address: address2 } = resolveTableLocator(editor, input2, "tables.split");
166469
166693
  const tableNode = candidate.node;
166470
- if (input2.atRowIndex <= 0 || input2.atRowIndex >= tableNode.childCount)
166694
+ if (input2.rowIndex <= 0 || input2.rowIndex >= tableNode.childCount)
166471
166695
  return toTableFailure("INVALID_TARGET", "Split row index must be between 1 and rowCount-1.");
166472
166696
  if (options?.dryRun)
166473
166697
  return buildTableSuccess(address2);
@@ -166476,7 +166700,7 @@ function tablesSplitAdapter(editor, input2, options) {
166476
166700
  const tablePos = candidate.pos;
166477
166701
  const schema = editor.state.schema;
166478
166702
  const secondTableRows = [];
166479
- for (let i4 = input2.atRowIndex;i4 < tableNode.childCount; i4++)
166703
+ for (let i4 = input2.rowIndex;i4 < tableNode.childCount; i4++)
166480
166704
  secondTableRows.push(tableNode.child(i4));
166481
166705
  let rowPos = tablePos + 1;
166482
166706
  const rowPositions = [];
@@ -166485,7 +166709,7 @@ function tablesSplitAdapter(editor, input2, options) {
166485
166709
  rowPos += tableNode.child(i4).nodeSize;
166486
166710
  }
166487
166711
  const mapFrom = tr.mapping.maps.length;
166488
- for (let i4 = tableNode.childCount - 1;i4 >= input2.atRowIndex; i4--) {
166712
+ for (let i4 = tableNode.childCount - 1;i4 >= input2.rowIndex; i4--) {
166489
166713
  const rp = tr.mapping.slice(mapFrom).map(rowPositions[i4]);
166490
166714
  const rEnd = tr.mapping.slice(mapFrom).map(rowPositions[i4] + tableNode.child(i4).nodeSize);
166491
166715
  tr.delete(rp, rEnd);
@@ -179948,7 +180172,9 @@ function assembleDocumentApiAdapters(editor) {
179948
180172
  setBorder: (input2, options) => paragraphsSetBorderWrapper(editor, input2, options),
179949
180173
  clearBorder: (input2, options) => paragraphsClearBorderWrapper(editor, input2, options),
179950
180174
  setShading: (input2, options) => paragraphsSetShadingWrapper(editor, input2, options),
179951
- clearShading: (input2, options) => paragraphsClearShadingWrapper(editor, input2, options)
180175
+ clearShading: (input2, options) => paragraphsClearShadingWrapper(editor, input2, options),
180176
+ setDirection: (input2, options) => paragraphsSetDirectionWrapper(editor, input2, options),
180177
+ clearDirection: (input2, options) => paragraphsClearDirectionWrapper(editor, input2, options)
179952
180178
  },
179953
180179
  trackChanges: {
179954
180180
  list: (input2) => trackChangesListWrapper(editor, input2),
@@ -215890,7 +216116,8 @@ var Node$13 = class Node$14 {
215890
216116
  keepNext: resolvedParagraphProperties.keepNext,
215891
216117
  keepLines: resolvedParagraphProperties.keepLines,
215892
216118
  floatAlignment,
215893
- pageBreakBefore: resolvedParagraphProperties.pageBreakBefore
216119
+ pageBreakBefore: resolvedParagraphProperties.pageBreakBefore,
216120
+ direction: resolvedParagraphProperties.rightToLeft ? "rtl" : undefined
215894
216121
  };
215895
216122
  if (normalizedNumberingProperties && normalizedListRendering)
215896
216123
  paragraphAttrs.wordLayout = computeWordParagraphLayout({
@@ -228447,9 +228674,9 @@ var Node$13 = class Node$14 {
228447
228674
  return false;
228448
228675
  return Boolean(checker(attrs));
228449
228676
  }, SuperToolbar, ICONS, TEXTS, tableActionsOptions;
228450
- var init_src_99pz__W7_es = __esm(() => {
228677
+ var init_src_DH8mR7rX_es = __esm(() => {
228451
228678
  init_rolldown_runtime_B2q5OVn9_es();
228452
- init_SuperConverter_hJPjNp5G_es();
228679
+ init_SuperConverter_BsjuwDIO_es();
228453
228680
  init_jszip_ChlR43oI_es();
228454
228681
  init_uuid_qzgm05fK_es();
228455
228682
  init_constants_ep1_Gwqi_es();
@@ -261752,8 +261979,8 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
261752
261979
 
261753
261980
  // ../../packages/superdoc/dist/super-editor.es.js
261754
261981
  var init_super_editor_es = __esm(() => {
261755
- init_src_99pz__W7_es();
261756
- init_SuperConverter_hJPjNp5G_es();
261982
+ init_src_DH8mR7rX_es();
261983
+ init_SuperConverter_BsjuwDIO_es();
261757
261984
  init_jszip_ChlR43oI_es();
261758
261985
  init_xml_js_BtmJ6bNs_es();
261759
261986
  init_constants_ep1_Gwqi_es();
@@ -318412,7 +318639,7 @@ function buildAllMetadata() {
318412
318639
  return [operationId, metadata];
318413
318640
  }));
318414
318641
  }
318415
- function deriveOptionSpecs(params4) {
318642
+ function deriveOptionSpecs(operationId, params4) {
318416
318643
  const specs = [];
318417
318644
  for (const param of params4) {
318418
318645
  if (param.kind === "doc" && param.name !== "doc")
@@ -318423,9 +318650,17 @@ function deriveOptionSpecs(params4) {
318423
318650
  type: optionType
318424
318651
  });
318425
318652
  }
318653
+ const aliases = OPTION_FLAG_ALIASES[operationId];
318654
+ if (aliases) {
318655
+ for (const spec of specs) {
318656
+ if (aliases[spec.name]) {
318657
+ spec.aliases = aliases[spec.name];
318658
+ }
318659
+ }
318660
+ }
318426
318661
  return specs;
318427
318662
  }
318428
- var DOC_PARAM, SESSION_PARAM, OUT_PARAM, FORCE_PARAM, DRY_RUN_PARAM, CHANGE_MODE_PARAM, EXPECTED_REVISION_PARAM, USER_NAME_PARAM, USER_EMAIL_PARAM, AGENT_HIDDEN_PARAM_NAMES, OPERATION_CONSTRAINTS, PARAM_FLAG_OVERRIDES, PARAM_SCHEMA_OVERRIDES, PARAM_EXCLUSIONS, TEXT_TARGET_FLAT_PARAMS, INSERT_FLAT_PARAMS, LIST_TARGET_FLAT_PARAMS, FORMAT_OPERATION_IDS, EXTRA_CLI_PARAMS, CLI_ONLY_METADATA, CLI_OPERATION_METADATA, CLI_OPERATION_OPTION_SPECS;
318663
+ var DOC_PARAM, SESSION_PARAM, OUT_PARAM, FORCE_PARAM, DRY_RUN_PARAM, CHANGE_MODE_PARAM, EXPECTED_REVISION_PARAM, USER_NAME_PARAM, USER_EMAIL_PARAM, AGENT_HIDDEN_PARAM_NAMES, OPERATION_CONSTRAINTS, PARAM_FLAG_OVERRIDES, PARAM_SCHEMA_OVERRIDES, PARAM_EXCLUSIONS, TEXT_TARGET_FLAT_PARAMS, INSERT_FLAT_PARAMS, LIST_TARGET_FLAT_PARAMS, FORMAT_OPERATION_IDS, EXTRA_CLI_PARAMS, CLI_ONLY_METADATA, CLI_OPERATION_METADATA, OPTION_FLAG_ALIASES, CLI_OPERATION_OPTION_SPECS;
318429
318664
  var init_operation_params = __esm(() => {
318430
318665
  init_src();
318431
318666
  init_operation_set();
@@ -318714,7 +318949,13 @@ var init_operation_params = __esm(() => {
318714
318949
  }
318715
318950
  };
318716
318951
  CLI_OPERATION_METADATA = buildAllMetadata();
318717
- CLI_OPERATION_OPTION_SPECS = Object.fromEntries(CLI_OPERATION_IDS.map((operationId) => [operationId, deriveOptionSpecs(CLI_OPERATION_METADATA[operationId].params)]));
318952
+ OPTION_FLAG_ALIASES = {
318953
+ "doc.tables.split": { "row-index": ["at-row-index"] }
318954
+ };
318955
+ CLI_OPERATION_OPTION_SPECS = Object.fromEntries(CLI_OPERATION_IDS.map((operationId) => [
318956
+ operationId,
318957
+ deriveOptionSpecs(operationId, CLI_OPERATION_METADATA[operationId].params)
318958
+ ]));
318718
318959
  });
318719
318960
 
318720
318961
  // src/cli/response-schemas.ts
@@ -320782,6 +321023,13 @@ async function preflightCallContext(operationId, input2, context) {
320782
321023
  throw new CliError("NO_ACTIVE_DOCUMENT", `call: ${operationId} requires an active session or input.sessionId.`);
320783
321024
  }
320784
321025
  }
321026
+ function normalizeLegacyInput(operationId, input2) {
321027
+ if (operationId === "doc.tables.split" && input2.atRowIndex !== undefined) {
321028
+ const { atRowIndex, ...rest } = input2;
321029
+ return rest.rowIndex !== undefined ? rest : { ...rest, rowIndex: atRowIndex };
321030
+ }
321031
+ return input2;
321032
+ }
320785
321033
  async function executeOperation(request) {
320786
321034
  let input2;
320787
321035
  const baseContext = request.context;
@@ -320806,6 +321054,7 @@ async function executeOperation(request) {
320806
321054
  }
320807
321055
  input2 = pruneUndefinedDeep(request.input) ?? {};
320808
321056
  }
321057
+ input2 = normalizeLegacyInput(request.operationId, input2);
320809
321058
  validateOperationInputData(request.operationId, input2, commandName);
320810
321059
  await preflightCallContext(request.operationId, input2, baseContext);
320811
321060
  const effectiveContext = applySessionInputToContext(baseContext, input2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.3.0-next.35",
3
+ "version": "0.3.0-next.37",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -22,19 +22,19 @@
22
22
  "typescript": "^5.9.2",
23
23
  "@superdoc/document-api": "0.0.1",
24
24
  "@superdoc/pm-adapter": "0.0.0",
25
- "@superdoc/super-editor": "0.0.1",
26
- "superdoc": "1.20.0"
25
+ "superdoc": "1.20.0",
26
+ "@superdoc/super-editor": "0.0.1"
27
27
  },
28
28
  "module": "src/index.ts",
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
32
  "optionalDependencies": {
33
- "@superdoc-dev/cli-darwin-arm64": "0.3.0-next.35",
34
- "@superdoc-dev/cli-linux-x64": "0.3.0-next.35",
35
- "@superdoc-dev/cli-darwin-x64": "0.3.0-next.35",
36
- "@superdoc-dev/cli-linux-arm64": "0.3.0-next.35",
37
- "@superdoc-dev/cli-windows-x64": "0.3.0-next.35"
33
+ "@superdoc-dev/cli-darwin-arm64": "0.3.0-next.37",
34
+ "@superdoc-dev/cli-darwin-x64": "0.3.0-next.37",
35
+ "@superdoc-dev/cli-linux-arm64": "0.3.0-next.37",
36
+ "@superdoc-dev/cli-linux-x64": "0.3.0-next.37",
37
+ "@superdoc-dev/cli-windows-x64": "0.3.0-next.37"
38
38
  },
39
39
  "scripts": {
40
40
  "predev": "node scripts/ensure-superdoc-build.js",