@superdoc-dev/cli 0.17.0-next.41 → 0.17.0-next.43

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 +324 -129
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -68164,7 +68164,7 @@ var init_remark_gfm_BUJjZJLy_es = __esm(() => {
68164
68164
  emptyOptions2 = {};
68165
68165
  });
68166
68166
 
68167
- // ../../packages/superdoc/dist/chunks/SuperConverter--x_mSI6o.es.js
68167
+ // ../../packages/superdoc/dist/chunks/SuperConverter-DIgF4xk_.es.js
68168
68168
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
68169
68169
  const fieldValue = extension$1.config[field];
68170
68170
  if (typeof fieldValue === "function")
@@ -90006,6 +90006,7 @@ function getFormattingStateAtPos(state, pos, editor, options = {}) {
90006
90006
  const context = getParagraphRunContext($pos, editor);
90007
90007
  const currentRunProperties = context?.runProperties || null;
90008
90008
  const cursorMarks = $pos.marks();
90009
+ const directMarkRunProperties = decodeRPrFromMarks(cursorMarks);
90009
90010
  const hasStoredMarks = storedMarks !== null;
90010
90011
  const hasExplicitEmptyStoredMarks = hasStoredMarks && storedMarks.length === 0;
90011
90012
  const resolvedMarks = [];
@@ -90033,7 +90034,9 @@ function getFormattingStateAtPos(state, pos, editor, options = {}) {
90033
90034
  inlineMarks: [],
90034
90035
  resolvedRunProperties: {},
90035
90036
  inlineRunProperties: {},
90036
- styleRunProperties: {}
90037
+ styleRunProperties: {},
90038
+ directMarkRunProperties: {},
90039
+ mixedRunProperties: null
90037
90040
  };
90038
90041
  const resolvedFromSelection = getInheritedRunProperties($pos, editor, preferParagraphRunProperties || !hasStoredMarks && context?.isEmpty ? context?.paragraphAttrs?.paragraphProperties?.runProperties || null : inlineRunProperties);
90039
90042
  const resolvedRunProperties = resolvedFromSelection?.resolvedRunProperties ?? inlineRunProperties;
@@ -90047,7 +90050,9 @@ function getFormattingStateAtPos(state, pos, editor, options = {}) {
90047
90050
  inlineMarks,
90048
90051
  resolvedRunProperties,
90049
90052
  inlineRunProperties,
90050
- styleRunProperties
90053
+ styleRunProperties,
90054
+ directMarkRunProperties,
90055
+ mixedRunProperties: null
90051
90056
  };
90052
90057
  }
90053
90058
  function getFormattingStateForRange(state, from4, to, editor) {
@@ -90067,9 +90072,14 @@ function getFormattingStateForRange(state, from4, to, editor) {
90067
90072
  return aggregateFormattingSegments(state, editor, segments);
90068
90073
  }
90069
90074
  function aggregateFormattingSegments(state, editor, segments) {
90070
- const resolvedRunProperties = intersectRunProperties(segments.map((segment) => segment.resolvedRunProperties));
90071
- const inlineRunProperties = intersectRunProperties(segments.map((segment) => segment.inlineRunProperties));
90072
- const styleRunProperties = intersectRunProperties(segments.map((segment) => segment.styleRunProperties));
90075
+ const resolvedRunPropertiesList = segments.map((segment) => segment.resolvedRunProperties);
90076
+ const inlineRunPropertiesList = segments.map((segment) => segment.inlineRunProperties);
90077
+ const styleRunPropertiesList = segments.map((segment) => segment.styleRunProperties);
90078
+ const directMarkRunPropertiesList = segments.map((segment) => segment.directMarkRunProperties);
90079
+ const resolvedRunProperties = intersectRunProperties(resolvedRunPropertiesList);
90080
+ const inlineRunProperties = intersectRunProperties(inlineRunPropertiesList);
90081
+ const styleRunProperties = intersectRunProperties(styleRunPropertiesList);
90082
+ const directMarkRunProperties = intersectRunProperties(directMarkRunPropertiesList);
90073
90083
  const resolvedMarks = createMarksFromRunProperties(state, resolvedRunProperties, editor);
90074
90084
  const inlineMarks = createMarksFromRunProperties(state, inlineRunProperties, editor);
90075
90085
  return {
@@ -90077,7 +90087,9 @@ function aggregateFormattingSegments(state, editor, segments) {
90077
90087
  inlineMarks,
90078
90088
  resolvedRunProperties,
90079
90089
  inlineRunProperties,
90080
- styleRunProperties
90090
+ styleRunProperties,
90091
+ directMarkRunProperties,
90092
+ mixedRunProperties: getMixedRunProperties(resolvedRunPropertiesList, directMarkRunPropertiesList)
90081
90093
  };
90082
90094
  }
90083
90095
  function mergeResolvedMarksWithInlineFallback(resolvedMarks, inlineMarks) {
@@ -90102,6 +90114,41 @@ function intersectRunProperties(runPropertiesList) {
90102
90114
  });
90103
90115
  return Object.keys(intersection).length ? intersection : null;
90104
90116
  }
90117
+ function getMixedRunProperties(runPropertiesList, directRunPropertiesList = []) {
90118
+ const filtered = runPropertiesList.filter((props) => props && typeof props === "object");
90119
+ if (filtered.length <= 1)
90120
+ return null;
90121
+ const keys$1 = new Set(filtered.flatMap((props) => Object.keys(props)));
90122
+ const mixed = {};
90123
+ keys$1.forEach((key) => {
90124
+ if (key === "fontFamily" && hasUniformDirectFontFamily(directRunPropertiesList))
90125
+ return;
90126
+ const values = filtered.map((props) => Object.prototype.hasOwnProperty.call(props, key) ? props[key] : undefined);
90127
+ const first = JSON.stringify(values[0]);
90128
+ if (values.some((value) => JSON.stringify(value) !== first))
90129
+ mixed[key] = true;
90130
+ });
90131
+ return Object.keys(mixed).length ? mixed : null;
90132
+ }
90133
+ function hasUniformDirectFontFamily(runPropertiesList) {
90134
+ if (runPropertiesList.length <= 1)
90135
+ return false;
90136
+ let firstValue;
90137
+ let hasFirstValue = false;
90138
+ for (const props of runPropertiesList) {
90139
+ if (!props || typeof props !== "object" || !Object.prototype.hasOwnProperty.call(props, "fontFamily"))
90140
+ return false;
90141
+ const value = props.fontFamily;
90142
+ if (!hasFirstValue) {
90143
+ firstValue = value;
90144
+ hasFirstValue = true;
90145
+ continue;
90146
+ }
90147
+ if (JSON.stringify(value) !== JSON.stringify(firstValue))
90148
+ return false;
90149
+ }
90150
+ return hasFirstValue;
90151
+ }
90105
90152
  function getInheritedRunProperties($pos, editor, inlineRunProperties) {
90106
90153
  if (!editor)
90107
90154
  return {
@@ -104688,34 +104735,62 @@ function hydrateImageBlocks(blocks, mediaFiles) {
104688
104735
  if (blk.kind === "drawing") {
104689
104736
  const drawingBlock = blk;
104690
104737
  if (drawingBlock.drawingKind === "vectorShape" || drawingBlock.drawingKind === "textboxShape") {
104691
- const parts = drawingBlock.textContent?.parts;
104692
- if (!parts || parts.length === 0)
104693
- return blk;
104694
- let partsChanged = false;
104695
- const hydratedParts = parts.map((part) => {
104696
- if (part?.kind !== "image" || !part.src || part.src.startsWith("data:"))
104738
+ let blockChanged = false;
104739
+ let nextBlock = drawingBlock;
104740
+ if (drawingBlock.drawingKind === "textboxShape") {
104741
+ const contentBlocks = drawingBlock.contentBlocks;
104742
+ if (Array.isArray(contentBlocks) && contentBlocks.length > 0) {
104743
+ let contentBlocksChanged = false;
104744
+ const hydratedContentBlocks = contentBlocks.map((paragraphBlock) => {
104745
+ if (paragraphBlock.kind !== "paragraph" || !paragraphBlock.runs?.length)
104746
+ return paragraphBlock;
104747
+ const hydratedRuns = hydrateRuns(paragraphBlock.runs);
104748
+ if (hydratedRuns !== paragraphBlock.runs) {
104749
+ contentBlocksChanged = true;
104750
+ return {
104751
+ ...paragraphBlock,
104752
+ runs: hydratedRuns
104753
+ };
104754
+ }
104755
+ return paragraphBlock;
104756
+ });
104757
+ if (contentBlocksChanged) {
104758
+ blockChanged = true;
104759
+ nextBlock = {
104760
+ ...drawingBlock,
104761
+ contentBlocks: hydratedContentBlocks
104762
+ };
104763
+ }
104764
+ }
104765
+ }
104766
+ const parts = nextBlock.textContent?.parts;
104767
+ if (parts && parts.length > 0) {
104768
+ let partsChanged = false;
104769
+ const hydratedParts = parts.map((part) => {
104770
+ if (part?.kind !== "image" || !part.src || part.src.startsWith("data:"))
104771
+ return part;
104772
+ const resolvedSrc = resolveImageSrc(part.src, part.rId, undefined, part.extension);
104773
+ if (resolvedSrc) {
104774
+ partsChanged = true;
104775
+ return {
104776
+ ...part,
104777
+ src: resolvedSrc
104778
+ };
104779
+ }
104697
104780
  return part;
104698
- const resolvedSrc = resolveImageSrc(part.src, part.rId, undefined, part.extension);
104699
- if (resolvedSrc) {
104700
- partsChanged = true;
104701
- return {
104702
- ...part,
104703
- src: resolvedSrc
104781
+ });
104782
+ if (partsChanged) {
104783
+ blockChanged = true;
104784
+ nextBlock = {
104785
+ ...nextBlock,
104786
+ textContent: {
104787
+ ...nextBlock.textContent,
104788
+ parts: hydratedParts
104789
+ }
104704
104790
  };
104705
104791
  }
104706
- return part;
104707
- });
104708
- if (partsChanged) {
104709
- const vectorShapeBlock = drawingBlock;
104710
- return {
104711
- ...vectorShapeBlock,
104712
- textContent: {
104713
- ...vectorShapeBlock.textContent,
104714
- parts: hydratedParts
104715
- }
104716
- };
104717
104792
  }
104718
- return blk;
104793
+ return blockChanged ? nextBlock : blk;
104719
104794
  }
104720
104795
  if (drawingBlock.drawingKind !== "shapeGroup")
104721
104796
  return blk;
@@ -106880,6 +106955,7 @@ function shapeContainerNodeToDrawingBlock(node3, nextBlockId, positions) {
106880
106955
  const textContent = shapeTextboxNode ? extractTextboxTextContent(shapeTextboxNode) : undefined;
106881
106956
  return buildDrawingBlock({
106882
106957
  ...rawAttrs,
106958
+ ...resolveInlineAlignmentFromWrapper(rawAttrs),
106883
106959
  ...textContent ? { textContent } : {},
106884
106960
  ...rawAttrs.textAlign == null && textContent?.horizontalAlign ? { textAlign: textContent.horizontalAlign } : {},
106885
106961
  ...rawAttrs.textInsets == null ? { textInsets: resolveTextboxInsetsFromAttrs(textboxAttrs) } : {},
@@ -135099,6 +135175,37 @@ Docs: https://docs.superdoc.dev/getting-started/fonts`);
135099
135175
  required.bottom = Math.max(required.bottom, Math.max(0, childY + childHeight + paintExtent.bottom - height));
135100
135176
  }
135101
135177
  return hasEffectExtent(required) ? required : undefined;
135178
+ }, resolveWrapperAlignment = (justification) => {
135179
+ switch (justification) {
135180
+ case "center":
135181
+ case "distribute":
135182
+ return "center";
135183
+ case "right":
135184
+ case "end":
135185
+ return "right";
135186
+ default:
135187
+ return;
135188
+ }
135189
+ }, resolveInlineAlignmentFromWrapper = (rawAttrs) => {
135190
+ if (rawAttrs.wrap?.type !== "Inline" || !isPlainObject3(rawAttrs.wrapperParagraph))
135191
+ return {};
135192
+ const wrapper = rawAttrs.wrapperParagraph;
135193
+ const justification = (isPlainObject3(wrapper.paragraphProperties) ? wrapper.paragraphProperties : undefined)?.justification;
135194
+ const textAlign = typeof wrapper.textAlign === "string" ? wrapper.textAlign : undefined;
135195
+ const effectiveAlignment = resolveWrapperAlignment(justification) ?? textAlign;
135196
+ if (effectiveAlignment !== "center" && effectiveAlignment !== "right")
135197
+ return {};
135198
+ const metadata = { inlineParagraphAlignment: effectiveAlignment };
135199
+ const { paragraphAttrs } = computeParagraphAttrs({
135200
+ type: "paragraph",
135201
+ attrs: wrapper
135202
+ });
135203
+ const indent2 = paragraphAttrs.indent;
135204
+ if (typeof indent2?.left === "number")
135205
+ metadata.paragraphIndentLeft = indent2.left;
135206
+ if (typeof indent2?.right === "number")
135207
+ metadata.paragraphIndentRight = indent2.right;
135208
+ return metadata;
135102
135209
  }, getAttrs$1 = (node3) => {
135103
135210
  return isPlainObject3(node3.attrs) ? { ...node3.attrs } : {};
135104
135211
  }, parseFullWidth = (value) => {
@@ -136401,7 +136508,7 @@ Docs: https://docs.superdoc.dev/getting-started/fonts`);
136401
136508
  state.kern = kernNode.attributes["w:val"];
136402
136509
  }
136403
136510
  }, SuperConverter;
136404
- var init_SuperConverter_x_mSI6o_es = __esm(() => {
136511
+ var init_SuperConverter_DIgF4xk__es = __esm(() => {
136405
136512
  init_rolldown_runtime_Bg48TavK_es();
136406
136513
  init_jszip_C49i9kUs_es();
136407
136514
  init_xml_js_CqGKpaft_es();
@@ -165327,7 +165434,7 @@ var init_SuperConverter_x_mSI6o_es = __esm(() => {
165327
165434
  };
165328
165435
  });
165329
165436
 
165330
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-D1KbRv5B.es.js
165437
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-BT4yIoZ-.es.js
165331
165438
  function parseSizeUnit(val = "0") {
165332
165439
  const length3 = val.toString() || "0";
165333
165440
  const value = Number.parseFloat(length3);
@@ -175292,6 +175399,14 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN2, P
175292
175399
  if (!rawActiveMark || !hasFormattingAttrs(rawActiveMark))
175293
175400
  return false;
175294
175401
  return isNegatedMark(rawActiveMark.name, rawActiveMark.attrs);
175402
+ }, getPrimaryFontFamily = (value) => {
175403
+ if (typeof value === "string")
175404
+ return value.split(",")[0].trim();
175405
+ if (!value || typeof value !== "object")
175406
+ return null;
175407
+ const fontFamily = value;
175408
+ const primary = fontFamily.ascii ?? fontFamily.hAnsi ?? fontFamily.eastAsia ?? fontFamily.cs;
175409
+ return typeof primary === "string" ? primary.split(",")[0].trim() : null;
175295
175410
  }, isFormatCommandsStorage = (value) => {
175296
175411
  return typeof value === "object" && value !== null && "storedStyle" in value;
175297
175412
  }, hasStoredCopyFormat = (context) => {
@@ -175384,15 +175499,20 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN2, P
175384
175499
  disabled: true,
175385
175500
  value: null
175386
175501
  };
175387
- const normalizedValues = getFormattingAttr(formatting, "fontFamily", "fontFamily").map((value$1) => normalizeFontFamilyValue(value$1));
175502
+ const values = getFormattingAttr(formatting, "fontFamily", "fontFamily");
175503
+ const selectionFormattingState = stateEditor?.state?.selection?.empty === false ? getSelectionFormattingState(stateEditor.state, stateEditor) : null;
175504
+ const normalizedValues = values.map((value$1) => normalizeFontFamilyValue(value$1));
175388
175505
  const uniqueValues = [...new Set(normalizedValues)];
175389
- const canUseLinkedStyle = !(uniqueValues.length > 0) && isFormattingActivatedFromLinkedStyle(context, "font-family");
175506
+ const hasDirectValue = uniqueValues.length > 0;
175507
+ const hasMixedFontFamily = Boolean(selectionFormattingState?.mixedRunProperties?.fontFamily);
175508
+ const directSelectionValue = normalizeFontFamilyValue(getPrimaryFontFamily(selectionFormattingState?.directMarkRunProperties?.fontFamily));
175509
+ const canUseLinkedStyle = !hasDirectValue && !hasMixedFontFamily && isFormattingActivatedFromLinkedStyle(context, "font-family");
175390
175510
  const paragraphProps = canUseLinkedStyle ? getCurrentResolvedParagraphProperties(context) : null;
175391
175511
  const documentEditor = context?.presentationEditor?.editor ?? context?.editor ?? null;
175392
175512
  const linkedStyleValue = normalizeFontFamilyValue((canUseLinkedStyle ? documentEditor?.converter?.linkedStyles?.find((style) => style.id === paragraphProps?.styleId) : null)?.definition?.styles?.["font-family"]) ?? null;
175393
- const value = uniqueValues.length === 1 ? uniqueValues[0] : linkedStyleValue;
175513
+ const value = hasMixedFontFamily ? null : directSelectionValue || (uniqueValues.length === 1 ? uniqueValues[0] : linkedStyleValue);
175394
175514
  return {
175395
- active: uniqueValues.length > 0 || linkedStyleValue != null,
175515
+ active: hasMixedFontFamily || uniqueValues.length > 0 || directSelectionValue != null || linkedStyleValue != null,
175396
175516
  disabled: false,
175397
175517
  value
175398
175518
  };
@@ -176117,9 +176237,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN2, P
176117
176237
  }
176118
176238
  };
176119
176239
  };
176120
- var init_create_headless_toolbar_D1KbRv5B_es = __esm(() => {
176240
+ var init_create_headless_toolbar_BT4yIoZ_es = __esm(() => {
176121
176241
  init_rolldown_runtime_Bg48TavK_es();
176122
- init_SuperConverter_x_mSI6o_es();
176242
+ init_SuperConverter_DIgF4xk__es();
176123
176243
  init_jszip_C49i9kUs_es();
176124
176244
  init_uuid_B2wVPhPi_es();
176125
176245
  init_constants_D9qj59G2_es();
@@ -226212,7 +226332,7 @@ var init_remark_gfm_DCND_V_3_es = __esm(() => {
226212
226332
  init_remark_gfm_BUJjZJLy_es();
226213
226333
  });
226214
226334
 
226215
- // ../../packages/superdoc/dist/chunks/src-Fy-l94Cn.es.js
226335
+ // ../../packages/superdoc/dist/chunks/src-BrcexyXf.es.js
226216
226336
  function deleteProps(obj, propOrProps) {
226217
226337
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
226218
226338
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -271516,7 +271636,7 @@ function layoutDrawingBlock({ block, measure, columns, ensurePage, advanceColumn
271516
271636
  const indentRight = typeof attrs?.hrIndentRight === "number" ? attrs.hrIndentRight : 0;
271517
271637
  const maxWidthForBlock = attrs?.isFullWidth === true && maxWidth > 0 ? Math.max(1, maxWidth - indentLeft - indentRight) : maxWidth;
271518
271638
  const rawWrap = attrs?.wrap;
271519
- const isInlineShapeGroup = block.drawingKind === "shapeGroup" && rawWrap?.type === "Inline";
271639
+ const isInlineAlignableDrawing = (block.drawingKind === "shapeGroup" || block.drawingKind === "textboxShape") && rawWrap?.type === "Inline";
271520
271640
  const inlineParagraphAlignment = attrs?.inlineParagraphAlignment === "center" || attrs?.inlineParagraphAlignment === "right" ? attrs.inlineParagraphAlignment : undefined;
271521
271641
  if (width > maxWidthForBlock && maxWidthForBlock > 0) {
271522
271642
  const scale = maxWidthForBlock / width;
@@ -271535,7 +271655,7 @@ function layoutDrawingBlock({ block, measure, columns, ensurePage, advanceColumn
271535
271655
  state = advanceColumn(state);
271536
271656
  const pmRange = extractBlockPmRange(block);
271537
271657
  let x = columnX(state) + marginLeft + indentLeft;
271538
- if (isInlineShapeGroup && inlineParagraphAlignment) {
271658
+ if (isInlineAlignableDrawing && inlineParagraphAlignment) {
271539
271659
  const pIndentLeft = typeof attrs?.paragraphIndentLeft === "number" ? attrs.paragraphIndentLeft : 0;
271540
271660
  const pIndentRight = typeof attrs?.paragraphIndentRight === "number" ? attrs.paragraphIndentRight : 0;
271541
271661
  const alignBox = Math.max(0, maxWidthForBlock - pIndentLeft - pIndentRight);
@@ -275860,6 +275980,17 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
275860
275980
  endChar = text5.length > 0 ? text5.length : start$1 + 1;
275861
275981
  continue;
275862
275982
  }
275983
+ if (text5.length === 0 && isAtomicLayoutRun(run2)) {
275984
+ const atomicWidth = getAtomicRunLayoutWidth(run2);
275985
+ if (width > 0 && width + atomicWidth > effectiveMaxWidth - WIDTH_FUDGE_PX) {
275986
+ didBreakInThisLine = true;
275987
+ break;
275988
+ }
275989
+ width += atomicWidth;
275990
+ endRun = r$1;
275991
+ endChar = 1;
275992
+ continue;
275993
+ }
275863
275994
  for (let c = start$1;c < text5.length; c += 1) {
275864
275995
  const ch = text5[c];
275865
275996
  if (ch === "\t") {
@@ -275948,6 +276079,7 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
275948
276079
  endRun = startRun;
275949
276080
  endChar = startChar + 1;
275950
276081
  }
276082
+ const lineMaxAtomicHeight = getLineMaxAtomicHeight(runs2, startRun, startChar, endRun, endChar);
275951
276083
  const line = {
275952
276084
  fromRun: startRun,
275953
276085
  fromChar: startChar,
@@ -275956,8 +276088,9 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
275956
276088
  width,
275957
276089
  ascent: 0,
275958
276090
  descent: 0,
275959
- lineHeight: lineHeightForRuns(runs2, startRun, endRun, lastMeasuredFontSize),
275960
- maxWidth: effectiveMaxWidth
276091
+ lineHeight: Math.max(lineHeightForRuns(runs2, startRun, endRun, lastMeasuredFontSize), lineMaxAtomicHeight),
276092
+ maxWidth: effectiveMaxWidth,
276093
+ ...lineMaxAtomicHeight > 0 ? { maxImageHeight: lineMaxAtomicHeight } : {}
275961
276094
  };
275962
276095
  lines.push(line);
275963
276096
  if (lineMaxTextFontSize > 0)
@@ -284669,14 +284802,14 @@ function capitalizeText$1(text5, fullText, startOffset) {
284669
284802
  return result;
284670
284803
  }
284671
284804
  function measureFieldAnnotationWidth(run2, fontContext) {
284672
- const fontSize = typeof run2.fontSize === "number" ? run2.fontSize : typeof run2.fontSize === "string" ? parseFloat(run2.fontSize) || DEFAULT_FIELD_ANNOTATION_FONT_SIZE$1 : DEFAULT_FIELD_ANNOTATION_FONT_SIZE$1;
284805
+ const fontSize = typeof run2.fontSize === "number" ? run2.fontSize : typeof run2.fontSize === "string" ? parseFloat(run2.fontSize) || DEFAULT_FIELD_ANNOTATION_FONT_SIZE : DEFAULT_FIELD_ANNOTATION_FONT_SIZE;
284673
284806
  const font = buildFontString$1({
284674
284807
  fontFamily: normalizeFontFamily$1(run2.fontFamily ?? "Arial"),
284675
284808
  fontSize,
284676
284809
  bold: run2.bold,
284677
284810
  italic: run2.italic
284678
284811
  }, fontContext);
284679
- return getMeasuredTextWidth(applyTextTransform$1(run2.displayLabel || "", { text: run2.displayLabel || "" }), font, 0, getCanvasContext$1()) + (run2.highlighted === false ? 0 : FIELD_ANNOTATION_PILL_PADDING$1);
284812
+ return getMeasuredTextWidth(applyTextTransform$1(run2.displayLabel || "", { text: run2.displayLabel || "" }), font, 0, getCanvasContext$1()) + (run2.highlighted === false ? 0 : FIELD_ANNOTATION_PILL_PADDING);
284680
284813
  }
284681
284814
  function isExplicitLineBreakRun(run2) {
284682
284815
  return run2.kind === "lineBreak" || run2.kind === "break" && run2.breakType === "line";
@@ -284862,6 +284995,15 @@ function measureTabAlignmentGroup(startRunIndex, runs2, ctx$1, decimalSeparator
284862
284995
  endRunIndex: runs2.length
284863
284996
  };
284864
284997
  let foundDecimal = false;
284998
+ const measureAtomicText$1 = (text5, atomicRun, fontSize) => {
284999
+ const { font } = buildFontString({
285000
+ fontFamily: atomicRun.fontFamily ?? "Arial",
285001
+ fontSize,
285002
+ bold: atomicRun.bold,
285003
+ italic: atomicRun.italic
285004
+ }, fontContext);
285005
+ return measureRunWidth(text5, font, ctx$1, atomicRun, 0);
285006
+ };
284865
285007
  for (let i3 = startRunIndex;i3 < runs2.length; i3++) {
284866
285008
  const run2 = runs2[i3];
284867
285009
  if (isTabRun(run2)) {
@@ -284903,40 +285045,13 @@ function measureTabAlignmentGroup(startRunIndex, runs2, ctx$1, decimalSeparator
284903
285045
  });
284904
285046
  continue;
284905
285047
  }
284906
- if (isImageRun(run2)) {
284907
- const leftSpace = run2.distLeft ?? 0;
284908
- const rightSpace = run2.distRight ?? 0;
284909
- const imageWidth = run2.width + leftSpace + rightSpace;
285048
+ if (isImageRun(run2) || run2.kind === "math" || isFieldAnnotationRun(run2)) {
285049
+ const { width } = getAtomicRunLayoutSize(run2, measureAtomicText$1);
284910
285050
  result.runs.push({
284911
285051
  runIndex: i3,
284912
- width: imageWidth
284913
- });
284914
- result.totalWidth += imageWidth;
284915
- continue;
284916
- }
284917
- if (run2.kind === "math") {
284918
- const mathWidth = run2.width ?? 20;
284919
- result.runs.push({
284920
- runIndex: i3,
284921
- width: mathWidth
284922
- });
284923
- result.totalWidth += mathWidth;
284924
- continue;
284925
- }
284926
- if (isFieldAnnotationRun(run2)) {
284927
- const fontSize = run2.fontSize ?? DEFAULT_FIELD_ANNOTATION_FONT_SIZE;
284928
- const { font } = buildFontString({
284929
- fontFamily: run2.fontFamily ?? "Arial",
284930
- fontSize,
284931
- bold: run2.bold,
284932
- italic: run2.italic
284933
- }, fontContext);
284934
- const pillWidth = (run2.displayLabel ? measureRunWidth(run2.displayLabel, font, ctx$1, run2, 0) : 0) + FIELD_ANNOTATION_PILL_PADDING;
284935
- result.runs.push({
284936
- runIndex: i3,
284937
- width: pillWidth
285052
+ width
284938
285053
  });
284939
- result.totalWidth += pillWidth;
285054
+ result.totalWidth += width;
284940
285055
  continue;
284941
285056
  }
284942
285057
  result.runs.push({
@@ -284966,6 +285081,13 @@ async function measureBlock(block, constraints, fontContext = DEFAULT_FONT_MEASU
284966
285081
  }
284967
285082
  async function measureParagraphBlock(block, maxWidth, fontContext) {
284968
285083
  const ctx$1 = getCanvasContext();
285084
+ const measureAtomicText$1 = (text5, run2, fontSize) => {
285085
+ const family2 = fontContext.resolvePhysical(run2.fontFamily || "Arial, sans-serif", faceOf(run2));
285086
+ const weight = run2.bold ? "bold" : "normal";
285087
+ ctx$1.font = `${run2.italic ? "italic" : "normal"} ${weight} ${fontSize}px ${family2}`;
285088
+ const displayText = applyTextTransform(text5, run2);
285089
+ return displayText ? ctx$1.measureText(displayText).width : 0;
285090
+ };
284969
285091
  const wordLayout = block.attrs?.wordLayout;
284970
285092
  const firstTextRunWithSize = block.runs.find((run2) => isTextRun$22(run2) && ("fontSize" in run2) && run2.fontSize != null);
284971
285093
  const fallbackFontSize = normalizeFontSize2((firstTextRunWithSize ?? block.runs.find((run2) => typeof run2.fontSize === "number" && run2.fontSize > 0))?.fontSize, DEFAULT_PARAGRAPH_FONT_SIZE);
@@ -285495,12 +285617,7 @@ async function measureParagraphBlock(block, maxWidth, fontContext) {
285495
285617
  continue;
285496
285618
  }
285497
285619
  if (isImageRun(run2)) {
285498
- const leftSpace = run2.distLeft ?? 0;
285499
- const rightSpace = run2.distRight ?? 0;
285500
- const imageWidth = run2.width + leftSpace + rightSpace;
285501
- const topSpace = run2.distTop ?? 0;
285502
- const bottomSpace = run2.distBottom ?? 0;
285503
- const imageHeight = run2.height + topSpace + bottomSpace;
285620
+ const { width: imageWidth, height: imageHeight } = getAtomicRunLayoutSize(run2, measureAtomicText$1);
285504
285621
  let imageStartX;
285505
285622
  if (activeTabGroup && currentLine) {
285506
285623
  imageStartX = activeTabGroup.currentX;
@@ -285591,9 +285708,7 @@ async function measureParagraphBlock(block, maxWidth, fontContext) {
285591
285708
  continue;
285592
285709
  }
285593
285710
  if (run2.kind === "math") {
285594
- const mathRun = run2;
285595
- const mathWidth = mathRun.width ?? 20;
285596
- const mathHeight = mathRun.height ?? 24;
285711
+ const { width: mathWidth, height: mathHeight } = getAtomicRunLayoutSize(run2, measureAtomicText$1);
285597
285712
  if (!currentLine)
285598
285713
  currentLine = {
285599
285714
  fromRun: runIndex,
@@ -285630,26 +285745,7 @@ async function measureParagraphBlock(block, maxWidth, fontContext) {
285630
285745
  continue;
285631
285746
  }
285632
285747
  if (isFieldAnnotationRun(run2)) {
285633
- const displayText = applyTextTransform(run2.displayLabel || "", run2);
285634
- const annotationFontSize = typeof run2.fontSize === "number" ? run2.fontSize : typeof run2.fontSize === "string" ? parseFloat(run2.fontSize) || DEFAULT_FIELD_ANNOTATION_FONT_SIZE : DEFAULT_FIELD_ANNOTATION_FONT_SIZE;
285635
- const annotationFontFamily = fontContext.resolvePhysical(run2.fontFamily || "Arial, sans-serif", faceOf(run2));
285636
- const fontWeight = run2.bold ? "bold" : "normal";
285637
- ctx$1.font = `${run2.italic ? "italic" : "normal"} ${fontWeight} ${annotationFontSize}px ${annotationFontFamily}`;
285638
- const textWidth = displayText ? ctx$1.measureText(displayText).width : 0;
285639
- const annotationHorizontalPadding = run2.highlighted === false ? 0 : FIELD_ANNOTATION_PILL_PADDING;
285640
- const annotationVerticalPadding = run2.highlighted === false ? 0 : FIELD_ANNOTATION_VERTICAL_PADDING;
285641
- const annotationWidth = textWidth + annotationHorizontalPadding;
285642
- let annotationHeight = annotationFontSize * FIELD_ANNOTATION_LINE_HEIGHT_MULTIPLIER + annotationVerticalPadding;
285643
- if (run2.variant === "signature" && run2.imageSrc) {
285644
- const signatureHeight = 28 + annotationVerticalPadding;
285645
- annotationHeight = Math.max(annotationHeight, signatureHeight);
285646
- }
285647
- if (run2.variant === "image" && run2.imageSrc && run2.size?.height) {
285648
- const imageHeight = run2.size.height + annotationVerticalPadding;
285649
- annotationHeight = Math.max(annotationHeight, imageHeight);
285650
- }
285651
- if (run2.variant === "html" && run2.size?.height)
285652
- annotationHeight = Math.max(annotationHeight, run2.size.height);
285748
+ const { width: annotationWidth, height: annotationHeight } = getAtomicRunLayoutSize(run2, measureAtomicText$1);
285653
285749
  let annotationStartX;
285654
285750
  if (pendingTabAlignment && currentLine)
285655
285751
  annotationStartX = alignPendingTabForWidth(annotationWidth);
@@ -303010,7 +303106,12 @@ var Node$13 = class Node$14 {
303010
303106
  suppressActiveHighlight: true,
303011
303107
  attributes: { ariaLabel: "Font family" },
303012
303108
  options: fontOptions,
303013
- onActivate: ({ fontFamily }) => {
303109
+ onActivate: ({ fontFamily } = {}, isMultiple = false) => {
303110
+ if (isMultiple) {
303111
+ fontButton.label.value = "";
303112
+ fontButton.selectedValue.value = "";
303113
+ return;
303114
+ }
303014
303115
  if (!fontFamily)
303015
303116
  return;
303016
303117
  fontFamily = fontFamily.split(",")[0];
@@ -309558,7 +309659,7 @@ menclose::after {
309558
309659
  left: borders.right,
309559
309660
  right: borders.left
309560
309661
  };
309561
- }, getFiniteNumber = (value) => {
309662
+ }, FIELD_ANNOTATION_LINE_HEIGHT_MULTIPLIER = 1.2, getFiniteNumber = (value) => {
309562
309663
  if (typeof value !== "number" || !Number.isFinite(value))
309563
309664
  return;
309564
309665
  return value;
@@ -318066,7 +318167,51 @@ menclose::after {
318066
318167
  getStats() {
318067
318168
  return this.cache.getStats();
318068
318169
  }
318069
- }, sharedHeaderFooterCache, HEADER_FOOTER_VARIANTS$12, canvas = null, ctx = null, isWordChar$1 = (char) => {
318170
+ }, sharedHeaderFooterCache, HEADER_FOOTER_VARIANTS$12, isAtomicLayoutRun = (run2) => typeof run2.src === "string" || run2.kind === "math" || run2.kind === "fieldAnnotation", resolveFieldAnnotationFontSize = (value) => {
318171
+ if (typeof value === "number" && Number.isFinite(value))
318172
+ return value;
318173
+ if (typeof value === "string") {
318174
+ const parsed = parseFloat(value);
318175
+ if (Number.isFinite(parsed) && parsed > 0)
318176
+ return parsed;
318177
+ }
318178
+ return 16;
318179
+ }, getImageRunSize = (run2) => {
318180
+ const distLeft = run2.distLeft ?? 0;
318181
+ const distRight = run2.distRight ?? 0;
318182
+ const distTop = run2.distTop ?? 0;
318183
+ const distBottom = run2.distBottom ?? 0;
318184
+ return {
318185
+ width: (run2.width ?? 0) + distLeft + distRight,
318186
+ height: (run2.height ?? 0) + distTop + distBottom
318187
+ };
318188
+ }, getMathRunSize = (run2) => ({
318189
+ width: run2.width ?? 20,
318190
+ height: run2.height ?? 24
318191
+ }), getFieldAnnotationRunSize = (run2, measureText$1) => {
318192
+ const fontSize = resolveFieldAnnotationFontSize(run2.fontSize);
318193
+ const horizontalPadding = run2.highlighted === false ? 0 : 8;
318194
+ const verticalPadding = run2.highlighted === false ? 0 : 6;
318195
+ const label = run2.displayLabel ?? "";
318196
+ const width = (label ? measureText$1(label, run2, fontSize) : 0) + horizontalPadding;
318197
+ let height = fontSize * FIELD_ANNOTATION_LINE_HEIGHT_MULTIPLIER + verticalPadding;
318198
+ if (run2.variant === "signature" && run2.imageSrc)
318199
+ height = Math.max(height, 28 + verticalPadding);
318200
+ if (run2.variant === "image" && run2.imageSrc && run2.size?.height)
318201
+ height = Math.max(height, run2.size.height + verticalPadding);
318202
+ if (run2.variant === "html" && run2.size?.height)
318203
+ height = Math.max(height, run2.size.height);
318204
+ return {
318205
+ width,
318206
+ height
318207
+ };
318208
+ }, getAtomicRunLayoutSize = (run2, measureText$1) => {
318209
+ if (typeof run2.src === "string")
318210
+ return getImageRunSize(run2);
318211
+ if (run2.kind === "math")
318212
+ return getMathRunSize(run2);
318213
+ return getFieldAnnotationRunSize(run2, measureText$1);
318214
+ }, canvas = null, ctx = null, isWordChar$1 = (char) => {
318070
318215
  if (!char)
318071
318216
  return false;
318072
318217
  const code6 = char.charCodeAt(0);
@@ -318095,6 +318240,26 @@ menclose::after {
318095
318240
  }, DEFAULT_TAB_INTERVAL_TWIPS$12 = 720, TWIPS_PER_PX$2, TAB_EPSILON$1 = 0.1, WIDTH_FUDGE_PX = 0.5, twipsToPx$1 = (twips) => twips / TWIPS_PER_PX$2, pxToTwips$1 = (px) => Math.round(px * TWIPS_PER_PX$2), sanitizeIndent$1 = (value) => typeof value === "number" && Number.isFinite(value) ? Math.max(0, value) : 0, sanitizeRawIndent = (value) => typeof value === "number" && Number.isFinite(value) ? value : 0, sanitizeDecimalSeparator$1 = (value) => value === "," ? "," : ".", getRunWidth = (run2) => {
318096
318241
  const width = run2.width;
318097
318242
  return typeof width === "number" ? width : 0;
318243
+ }, measureAtomicText = (text5, run2, fontSize) => {
318244
+ const family2 = run2.fontFamily || "Arial";
318245
+ const context = getCtx();
318246
+ if (!context)
318247
+ return Math.max(0, text5.length * (fontSize * 0.6));
318248
+ context.font = `${run2.italic ? "italic " : ""}${run2.bold ? "bold " : ""}${fontSize}px ${family2}`.trim();
318249
+ return context.measureText(text5).width;
318250
+ }, getAtomicRunLayoutWidth = (run2) => getAtomicRunLayoutSize(run2, measureAtomicText).width, getAtomicRunLayoutHeight = (run2) => getAtomicRunLayoutSize(run2, measureAtomicText).height, getLineMaxAtomicHeight = (runs2, fromRun, fromChar, toRun, toChar) => {
318251
+ let max$2 = 0;
318252
+ for (let r$1 = fromRun;r$1 <= toRun; r$1 += 1) {
318253
+ const run2 = runs2[r$1];
318254
+ if (!isAtomicLayoutRun(run2))
318255
+ continue;
318256
+ if (r$1 === toRun && toChar === 0)
318257
+ continue;
318258
+ if (r$1 === fromRun && r$1 === toRun && toChar <= fromChar)
318259
+ continue;
318260
+ max$2 = Math.max(max$2, getAtomicRunLayoutHeight(run2));
318261
+ }
318262
+ return max$2;
318098
318263
  }, isLineBreakRun$1 = (run2) => run2.kind === "lineBreak" || run2.kind === "break" && run2.breakType === "line", markerFontString = (run2) => {
318099
318264
  const size$1 = run2?.fontSize ?? 16;
318100
318265
  const family2 = run2?.fontFamily ?? "Arial";
@@ -318167,7 +318332,7 @@ menclose::after {
318167
318332
  };
318168
318333
  const text5 = runText(run2);
318169
318334
  if (!text5) {
318170
- const runWidth = getRunWidth(run2);
318335
+ const runWidth = isAtomicLayoutRun(run2) ? getAtomicRunLayoutWidth(run2) : getRunWidth(run2);
318171
318336
  if (runWidth > 0) {
318172
318337
  totalWidth += runWidth;
318173
318338
  endRun = r$1;
@@ -318226,7 +318391,7 @@ menclose::after {
318226
318391
  break;
318227
318392
  const text5 = runText(run2);
318228
318393
  if (!text5) {
318229
- totalWidth += getRunWidth(run2);
318394
+ totalWidth += isAtomicLayoutRun(run2) ? getAtomicRunLayoutWidth(run2) : getRunWidth(run2);
318230
318395
  continue;
318231
318396
  }
318232
318397
  const sliceStart = r$1 === startRunIndex ? startChar : 0;
@@ -318404,7 +318569,21 @@ menclose::after {
318404
318569
  }
318405
318570
  const text5 = runText(run2);
318406
318571
  if (!text5) {
318407
- cursorX += getRunWidth(run2);
318572
+ const atomicWidth = isAtomicLayoutRun(run2) ? getAtomicRunLayoutWidth(run2) : getRunWidth(run2);
318573
+ const pendingTabAlign = consumePendingTabAlignStart();
318574
+ if (pendingTabAlign != null) {
318575
+ const segment = {
318576
+ runIndex,
318577
+ fromChar: 0,
318578
+ toChar: 1,
318579
+ width: atomicWidth,
318580
+ x: pendingTabAlign.paintX,
318581
+ ...pendingTabAlign.precedingTabEndX !== undefined ? { precedingTabEndX: pendingTabAlign.precedingTabEndX } : {}
318582
+ };
318583
+ cursorX = pendingTabAlign.layoutX + atomicWidth;
318584
+ segments.push(segment);
318585
+ } else
318586
+ cursorX += atomicWidth;
318408
318587
  lineWidth = Math.max(lineWidth, cursorX);
318409
318588
  continue;
318410
318589
  }
@@ -323822,7 +324001,7 @@ menclose::after {
323822
324001
  }
323823
324002
  }, EMUS_PER_INCH = 914400, maxSize = 5000, cache, makeKey = (text5, font, letterSpacing) => {
323824
324003
  return `${text5}|${font}|${letterSpacing || 0}`;
323825
- }, fontMetricsCache, MAX_CACHE_SIZE = 1000, METRICS_TEST_STRING = "MHgypbdlÁÉÍ", DEFAULT_MIN_COLUMN_WIDTH = 8, TWIPS_PER_PX$1 = 15, PLACEHOLDER_COLUMN_MAX_WIDTH = 1, DEFAULT_CELL_PADDING$1, DEFAULT_FIELD_ANNOTATION_FONT_SIZE$1 = 16, FIELD_ANNOTATION_PILL_PADDING$1 = 8, TABLE_CELL_METRICS_CACHE_SIZE = 2000, TABLE_AUTOFIT_RESULT_CACHE_SIZE = 500, NO_WRAP_MAX_WIDTH, TOKEN_BOUNDARY_PATTERN, LruCache = class {
324004
+ }, fontMetricsCache, MAX_CACHE_SIZE = 1000, METRICS_TEST_STRING = "MHgypbdlÁÉÍ", DEFAULT_MIN_COLUMN_WIDTH = 8, TWIPS_PER_PX$1 = 15, PLACEHOLDER_COLUMN_MAX_WIDTH = 1, DEFAULT_CELL_PADDING$1, DEFAULT_FIELD_ANNOTATION_FONT_SIZE = 16, FIELD_ANNOTATION_PILL_PADDING = 8, TABLE_CELL_METRICS_CACHE_SIZE = 2000, TABLE_AUTOFIT_RESULT_CACHE_SIZE = 500, NO_WRAP_MAX_WIDTH, TOKEN_BOUNDARY_PATTERN, LruCache = class {
323826
324005
  constructor(maxSize$1) {
323827
324006
  this.cache = /* @__PURE__ */ new Map;
323828
324007
  this.maxSize = maxSize$1;
@@ -323856,7 +324035,7 @@ menclose::after {
323856
324035
  this.cache.delete(oldestKey);
323857
324036
  }
323858
324037
  }
323859
- }, tableCellMetricsCache, autoFitTableResultCache, canvasContext$1 = null, computeTabStops2, measurementConfig, canvasContext = null, DEFAULT_TAB_INTERVAL_TWIPS2 = 720, TWIPS_PER_PX2, twipsToPx2 = (twips) => twips / TWIPS_PER_PX2, pxToTwips = (px) => Math.round(px * TWIPS_PER_PX2), DEFAULT_TAB_INTERVAL_PX, TAB_EPSILON = 0.1, DEFAULT_CELL_PADDING, DEFAULT_DECIMAL_SEPARATOR2 = ".", ALLOWED_TAB_VALS, FIELD_ANNOTATION_PILL_PADDING = 8, FIELD_ANNOTATION_LINE_HEIGHT_MULTIPLIER = 1.2, FIELD_ANNOTATION_VERTICAL_PADDING = 6, DEFAULT_FIELD_ANNOTATION_FONT_SIZE = 16, DEFAULT_PARAGRAPH_FONT_SIZE = 12, DEFAULT_PARAGRAPH_FONT_FAMILY = "Arial", isValidFontSize = (value) => typeof value === "number" && Number.isFinite(value) && value > 0, normalizeFontSize2 = (value, fallback = DEFAULT_PARAGRAPH_FONT_SIZE) => {
324038
+ }, tableCellMetricsCache, autoFitTableResultCache, canvasContext$1 = null, computeTabStops2, measurementConfig, canvasContext = null, DEFAULT_TAB_INTERVAL_TWIPS2 = 720, TWIPS_PER_PX2, twipsToPx2 = (twips) => twips / TWIPS_PER_PX2, pxToTwips = (px) => Math.round(px * TWIPS_PER_PX2), DEFAULT_TAB_INTERVAL_PX, TAB_EPSILON = 0.1, DEFAULT_CELL_PADDING, DEFAULT_DECIMAL_SEPARATOR2 = ".", ALLOWED_TAB_VALS, DEFAULT_PARAGRAPH_FONT_SIZE = 12, DEFAULT_PARAGRAPH_FONT_FAMILY = "Arial", isValidFontSize = (value) => typeof value === "number" && Number.isFinite(value) && value > 0, normalizeFontSize2 = (value, fallback = DEFAULT_PARAGRAPH_FONT_SIZE) => {
323860
324039
  if (isValidFontSize(value))
323861
324040
  return value;
323862
324041
  if (typeof value === "string") {
@@ -326428,13 +326607,13 @@ menclose::after {
326428
326607
  return;
326429
326608
  console.log(...args$1);
326430
326609
  }, 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;
326431
- var init_src_Fy_l94Cn_es = __esm(() => {
326610
+ var init_src_BrcexyXf_es = __esm(() => {
326432
326611
  init_rolldown_runtime_Bg48TavK_es();
326433
- init_SuperConverter_x_mSI6o_es();
326612
+ init_SuperConverter_DIgF4xk__es();
326434
326613
  init_jszip_C49i9kUs_es();
326435
326614
  init_xml_js_CqGKpaft_es();
326436
326615
  init_uuid_B2wVPhPi_es();
326437
- init_create_headless_toolbar_D1KbRv5B_es();
326616
+ init_create_headless_toolbar_BT4yIoZ_es();
326438
326617
  init_constants_D9qj59G2_es();
326439
326618
  init_unified_BDuVPlMu_es();
326440
326619
  init_remark_gfm_BUJjZJLy_es();
@@ -333196,10 +333375,18 @@ ${err.toString()}`);
333196
333375
  addCommands() {
333197
333376
  return {
333198
333377
  setFontFamily: (fontFamily) => ({ chain }) => {
333199
- return chain().setMark("textStyle", { fontFamily }).run();
333378
+ return chain().setMark("textStyle", {
333379
+ fontFamily,
333380
+ eastAsiaFontFamily: null,
333381
+ csFontFamily: null
333382
+ }).run();
333200
333383
  },
333201
333384
  unsetFontFamily: () => ({ chain }) => {
333202
- return chain().setMark("textStyle", { fontFamily: null }).removeEmptyTextStyle().run();
333385
+ return chain().setMark("textStyle", {
333386
+ fontFamily: null,
333387
+ eastAsiaFontFamily: null,
333388
+ csFontFamily: null
333389
+ }).removeEmptyTextStyle().run();
333203
333390
  }
333204
333391
  };
333205
333392
  }
@@ -339636,6 +339823,10 @@ ${err.toString()}`);
339636
339823
  return { style: attrs.style };
339637
339824
  } },
339638
339825
  wrapAttributes: { rendered: false },
339826
+ wrapperParagraph: {
339827
+ default: null,
339828
+ rendered: false
339829
+ },
339639
339830
  anchorData: { rendered: false },
339640
339831
  marginOffset: { rendered: false },
339641
339832
  attributes: { rendered: false },
@@ -356364,7 +356555,7 @@ function print() { __p += __j.call(arguments, '') }
356364
356555
  return null;
356365
356556
  return getParagraphFontFamilyFromProperties(calculateResolvedParagraphProperties(this.activeEditor, paragraphParent.node, state.doc.resolve(paragraphParent.pos)), this.activeEditor?.converter?.convertedXml ?? {}) || null;
356366
356557
  }
356367
- #isFontSizeMixedState(commandState) {
356558
+ #isMixedState(commandState) {
356368
356559
  return Boolean(commandState?.active) && commandState?.value == null;
356369
356560
  }
356370
356561
  #applyHeadlessState(item) {
@@ -356408,6 +356599,10 @@ function print() { __p += __j.call(arguments, '') }
356408
356599
  item.activate({ fontFamily: commandState.value });
356409
356600
  return;
356410
356601
  }
356602
+ if (this.#isMixedState(commandState)) {
356603
+ item.activate({}, true);
356604
+ return;
356605
+ }
356411
356606
  const fallbackFontFamily = this.#getFontFamilyFallbackValue();
356412
356607
  if (fallbackFontFamily) {
356413
356608
  item.activate({ fontFamily: fallbackFontFamily });
@@ -356420,7 +356615,7 @@ function print() { __p += __j.call(arguments, '') }
356420
356615
  item.activate({ fontSize: commandState.value });
356421
356616
  return;
356422
356617
  }
356423
- if (this.#isFontSizeMixedState(commandState)) {
356618
+ if (this.#isMixedState(commandState)) {
356424
356619
  item.activate({}, true);
356425
356620
  return;
356426
356621
  }
@@ -369677,11 +369872,11 @@ function print() { __p += __j.call(arguments, '') }
369677
369872
  ]);
369678
369873
  });
369679
369874
 
369680
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-Du-2OQ-7.es.js
369875
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-B-QEvuPe.es.js
369681
369876
  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;
369682
- var init_create_super_doc_ui_Du_2OQ_7_es = __esm(() => {
369683
- init_SuperConverter_x_mSI6o_es();
369684
- init_create_headless_toolbar_D1KbRv5B_es();
369877
+ var init_create_super_doc_ui_B_QEvuPe_es = __esm(() => {
369878
+ init_SuperConverter_DIgF4xk__es();
369879
+ init_create_headless_toolbar_BT4yIoZ_es();
369685
369880
  DEFAULT_TEXT_ALIGN_OPTIONS = [
369686
369881
  {
369687
369882
  label: "Left",
@@ -369972,15 +370167,15 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
369972
370167
 
369973
370168
  // ../../packages/superdoc/dist/super-editor.es.js
369974
370169
  var init_super_editor_es = __esm(() => {
369975
- init_src_Fy_l94Cn_es();
369976
- init_SuperConverter_x_mSI6o_es();
370170
+ init_src_BrcexyXf_es();
370171
+ init_SuperConverter_DIgF4xk__es();
369977
370172
  init_jszip_C49i9kUs_es();
369978
370173
  init_xml_js_CqGKpaft_es();
369979
- init_create_headless_toolbar_D1KbRv5B_es();
370174
+ init_create_headless_toolbar_BT4yIoZ_es();
369980
370175
  init_constants_D9qj59G2_es();
369981
370176
  init_unified_BDuVPlMu_es();
369982
370177
  init_DocxZipper_BzS208BW_es();
369983
- init_create_super_doc_ui_Du_2OQ_7_es();
370178
+ init_create_super_doc_ui_B_QEvuPe_es();
369984
370179
  init_ui_CGB3qmy3_es();
369985
370180
  init_eventemitter3_UwU_CLPU_es();
369986
370181
  init_errors_C_DoKMoN_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.17.0-next.41",
3
+ "version": "0.17.0-next.43",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -26,20 +26,20 @@
26
26
  "lib0": "^0.2.114",
27
27
  "typescript": "^5.9.2",
28
28
  "y-protocols": "^1.0.6",
29
- "@superdoc/super-editor": "0.0.1",
30
29
  "@superdoc/document-api": "0.1.0-alpha.0",
31
- "superdoc": "1.43.1"
30
+ "superdoc": "1.43.1",
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-x64": "0.17.0-next.41",
39
- "@superdoc-dev/cli-darwin-arm64": "0.17.0-next.41",
40
- "@superdoc-dev/cli-linux-x64": "0.17.0-next.41",
41
- "@superdoc-dev/cli-linux-arm64": "0.17.0-next.41",
42
- "@superdoc-dev/cli-windows-x64": "0.17.0-next.41"
38
+ "@superdoc-dev/cli-darwin-arm64": "0.17.0-next.43",
39
+ "@superdoc-dev/cli-linux-x64": "0.17.0-next.43",
40
+ "@superdoc-dev/cli-darwin-x64": "0.17.0-next.43",
41
+ "@superdoc-dev/cli-linux-arm64": "0.17.0-next.43",
42
+ "@superdoc-dev/cli-windows-x64": "0.17.0-next.43"
43
43
  },
44
44
  "scripts": {
45
45
  "predev": "node scripts/ensure-superdoc-build.js",