superdoc 1.0.0-beta.19 → 1.0.0-beta.20

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 (29) hide show
  1. package/dist/chunks/{PdfViewer-D_4g-jsZ.es.js → PdfViewer-CPnD95lv.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-BLFV17De.cjs → PdfViewer-DbSf6FKU.cjs} +1 -1
  3. package/dist/chunks/{index-NPXppXmC.es.js → index-BSHAWPko.es.js} +3 -3
  4. package/dist/chunks/{index-CRpn1mWd-B4eH8Zok.es.js → index-DHhKY9FZ-CyEU4GWR.es.js} +1 -1
  5. package/dist/chunks/{index-CRpn1mWd-BUbbd3Jq.cjs → index-DHhKY9FZ-DORT-UR6.cjs} +1 -1
  6. package/dist/chunks/{index-k02voMEs.cjs → index-DLco7m-w.cjs} +3 -3
  7. package/dist/chunks/{super-editor.es-C_Gk8cDd.cjs → super-editor.es-B6lsvAAY.cjs} +117 -38
  8. package/dist/chunks/{super-editor.es-CHU4dmes.es.js → super-editor.es-C0tdU_gq.es.js} +117 -38
  9. package/dist/style.css +6 -6
  10. package/dist/super-editor/ai-writer.es.js +2 -2
  11. package/dist/super-editor/chunks/{converter-Cu26_LdN.js → converter-m2x13P8G.js} +2 -2
  12. package/dist/super-editor/chunks/{docx-zipper-C8lozSFd.js → docx-zipper-CRSKJF-o.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-BXC2Hzba.js → editor-C9r_Jbbg.js} +56 -35
  14. package/dist/super-editor/chunks/{index-CRpn1mWd.js → index-DHhKY9FZ.js} +1 -1
  15. package/dist/super-editor/chunks/{toolbar-BglLOe8y.js → toolbar-fnptYAcU.js} +2 -2
  16. package/dist/super-editor/converter.es.js +1 -1
  17. package/dist/super-editor/docx-zipper.es.js +2 -2
  18. package/dist/super-editor/editor.es.js +3 -3
  19. package/dist/super-editor/file-zipper.es.js +1 -1
  20. package/dist/super-editor/style.css +6 -6
  21. package/dist/super-editor/super-editor.es.js +67 -9
  22. package/dist/super-editor/toolbar.es.js +2 -2
  23. package/dist/super-editor.cjs +1 -1
  24. package/dist/super-editor.es.js +1 -1
  25. package/dist/superdoc.cjs +2 -2
  26. package/dist/superdoc.es.js +2 -2
  27. package/dist/superdoc.umd.js +119 -40
  28. package/dist/superdoc.umd.js.map +1 -1
  29. package/package.json +1 -1
@@ -33468,7 +33468,7 @@ const encode$1 = (params2, encodedAttrs = {}) => {
33468
33468
  text = elements[0].text;
33469
33469
  const xmlSpace = encodedAttrs.xmlSpace ?? elements[0]?.attributes?.["xml:space"];
33470
33470
  if (xmlSpace !== "preserve" && typeof text === "string") {
33471
- text = text.replace(/^\s+/, "").replace(/\s+$/, "");
33471
+ text = text.replace(/^[ \t\n\r]+/, "").replace(/[ \t\n\r]+$/, "");
33472
33472
  }
33473
33473
  text = text.replace(/\[\[sdspace\]\]/g, "");
33474
33474
  } else if (!elements.length && encodedAttrs.xmlSpace === "preserve") {
@@ -36371,7 +36371,7 @@ const _SuperConverter = class _SuperConverter2 {
36371
36371
  static getStoredSuperdocVersion(docx) {
36372
36372
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
36373
36373
  }
36374
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.19") {
36374
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.20") {
36375
36375
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
36376
36376
  }
36377
36377
  /**
@@ -53488,7 +53488,7 @@ const isHeadless = (editor) => {
53488
53488
  const shouldSkipNodeView = (editor) => {
53489
53489
  return isHeadless(editor);
53490
53490
  };
53491
- const summaryVersion = "1.0.0-beta.19";
53491
+ const summaryVersion = "1.0.0-beta.20";
53492
53492
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
53493
53493
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
53494
53494
  function mapAttributes(attrs) {
@@ -54264,7 +54264,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
54264
54264
  { default: remarkStringify },
54265
54265
  { default: remarkGfm }
54266
54266
  ] = await Promise.all([
54267
- import("./index-CRpn1mWd-B4eH8Zok.es.js"),
54267
+ import("./index-DHhKY9FZ-CyEU4GWR.es.js"),
54268
54268
  import("./index-DRCvimau-Cw339678.es.js"),
54269
54269
  import("./index-C_x_N6Uh-DJn8hIEt.es.js"),
54270
54270
  import("./index-D_sWOSiG-DE96TaT5.es.js"),
@@ -54469,7 +54469,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
54469
54469
  * Process collaboration migrations
54470
54470
  */
54471
54471
  processCollaborationMigrations() {
54472
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.19");
54472
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.20");
54473
54473
  if (!this.options.ydoc) return;
54474
54474
  const metaMap = this.options.ydoc.getMap("meta");
54475
54475
  let docVersion = metaMap.get("version");
@@ -56483,6 +56483,12 @@ const applyTextStyleMark = (run2, attrs, themeColors) => {
56483
56483
  run2.letterSpacing = spacing;
56484
56484
  }
56485
56485
  }
56486
+ if (typeof attrs.textTransform === "string") {
56487
+ const transform = attrs.textTransform;
56488
+ if (transform === "uppercase" || transform === "lowercase" || transform === "capitalize" || transform === "none") {
56489
+ run2.textTransform = transform;
56490
+ }
56491
+ }
56486
56492
  };
56487
56493
  const DEFAULT_HYPERLINK_CONFIG = {
56488
56494
  enableRichHyperlinks: false
@@ -58491,6 +58497,16 @@ const parseNumberAttr = (value) => {
58491
58497
  const num = typeof value === "number" ? value : Number.parseInt(String(value), 10);
58492
58498
  return Number.isFinite(num) ? num : void 0;
58493
58499
  };
58500
+ const mergeSpacingSources = (base2, paragraphProps, attrs) => {
58501
+ const isObject2 = (v2) => v2 !== null && typeof v2 === "object";
58502
+ const baseObj = isObject2(base2) ? base2 : {};
58503
+ const propsObj = isObject2(paragraphProps) ? paragraphProps : {};
58504
+ const attrsObj = isObject2(attrs) ? attrs : {};
58505
+ if (Object.keys(baseObj).length === 0 && Object.keys(propsObj).length === 0 && Object.keys(attrsObj).length === 0) {
58506
+ return void 0;
58507
+ }
58508
+ return { ...baseObj, ...propsObj, ...attrsObj };
58509
+ };
58494
58510
  const normalizeNumFmt = (value) => {
58495
58511
  if (typeof value !== "string") return void 0;
58496
58512
  switch (value) {
@@ -59025,8 +59041,8 @@ const computeParagraphAttrs = (para, styleContext, listCounterContext, converter
59025
59041
  const attrs = para.attrs ?? {};
59026
59042
  const paragraphProps = typeof attrs.paragraphProperties === "object" && attrs.paragraphProperties !== null ? attrs.paragraphProperties : {};
59027
59043
  const hydrated = hydrationOverride ?? hydrateParagraphStyleAttrs(para, converterContext);
59028
- const spacingSource = attrs.spacing !== void 0 ? attrs.spacing : paragraphProps.spacing !== void 0 ? paragraphProps.spacing : hydrated?.spacing;
59029
- const normalizedSpacing = normalizeParagraphSpacing(spacingSource);
59044
+ const mergedSpacing = mergeSpacingSources(hydrated?.spacing, paragraphProps.spacing, attrs.spacing);
59045
+ const normalizedSpacing = normalizeParagraphSpacing(mergedSpacing);
59030
59046
  const indentSource = attrs.indent ?? paragraphProps.indent ?? hydrated?.indent;
59031
59047
  const normalizedIndent = normalizePxIndent(indentSource) ?? normalizeParagraphIndent(indentSource ?? attrs.textIndent);
59032
59048
  const unwrapTabStops = (tabStops) => {
@@ -69445,6 +69461,12 @@ const renderTableCell = (deps) => {
69445
69461
  fromLine,
69446
69462
  toLine
69447
69463
  } = deps;
69464
+ const attrs = cell?.attrs;
69465
+ const padding = attrs?.padding || { top: 2, left: 4, right: 4, bottom: 2 };
69466
+ const paddingLeft = padding.left ?? 4;
69467
+ const paddingTop = padding.top ?? 2;
69468
+ const paddingRight = padding.right ?? 4;
69469
+ const paddingBottom = padding.bottom ?? 2;
69448
69470
  const cellEl = doc2.createElement("div");
69449
69471
  cellEl.style.position = "absolute";
69450
69472
  cellEl.style.left = `${x2}px`;
@@ -69453,39 +69475,25 @@ const renderTableCell = (deps) => {
69453
69475
  cellEl.style.height = `${rowHeight}px`;
69454
69476
  cellEl.style.boxSizing = "border-box";
69455
69477
  cellEl.style.overflow = "hidden";
69478
+ cellEl.style.paddingLeft = `${paddingLeft}px`;
69479
+ cellEl.style.paddingTop = `${paddingTop}px`;
69480
+ cellEl.style.paddingRight = `${paddingRight}px`;
69481
+ cellEl.style.paddingBottom = `${paddingBottom}px`;
69456
69482
  if (borders) {
69457
69483
  applyCellBorders(cellEl, borders);
69458
69484
  }
69459
69485
  if (cell?.attrs?.background) {
69460
69486
  cellEl.style.backgroundColor = cell.attrs.background;
69461
69487
  }
69462
- if (cell?.attrs?.verticalAlign) {
69463
- cellEl.style.display = "flex";
69464
- cellEl.style.flexDirection = "column";
69465
- cellEl.style.justifyContent = cell.attrs.verticalAlign === "top" ? "flex-start" : cell.attrs.verticalAlign === "bottom" ? "flex-end" : "center";
69466
- }
69467
- let contentElement;
69468
- const attrs = cell?.attrs;
69469
- const padding = attrs?.padding || { top: 2, left: 4, right: 4, bottom: 2 };
69470
- const paddingLeft = padding.left ?? 4;
69471
- const paddingTop = padding.top ?? 2;
69472
- const paddingRight = padding.right ?? 4;
69473
- const paddingBottom = padding.bottom ?? 2;
69474
69488
  const cellBlocks = cell?.blocks ?? (cell?.paragraph ? [cell.paragraph] : []);
69475
69489
  const blockMeasures = cellMeasure?.blocks ?? (cellMeasure?.paragraph ? [cellMeasure.paragraph] : []);
69476
69490
  if (cellBlocks.length > 0 && blockMeasures.length > 0) {
69477
69491
  const content = doc2.createElement("div");
69478
- content.style.position = "absolute";
69479
- content.style.left = `${x2 + paddingLeft}px`;
69480
- content.style.top = `${y2 + paddingTop}px`;
69481
- const contentWidth = Math.max(0, cellMeasure.width - paddingLeft - paddingRight);
69482
- const contentHeight = Math.max(0, rowHeight - paddingTop - paddingBottom);
69483
- content.style.width = `${contentWidth + 1}px`;
69484
- content.style.height = `${contentHeight}px`;
69492
+ content.style.position = "relative";
69493
+ content.style.width = "100%";
69494
+ content.style.height = "100%";
69485
69495
  content.style.display = "flex";
69486
69496
  content.style.flexDirection = "column";
69487
- content.style.overflowX = "visible";
69488
- content.style.overflowY = "hidden";
69489
69497
  if (cell?.attrs?.verticalAlign === "center") {
69490
69498
  content.style.justifyContent = "center";
69491
69499
  } else if (cell?.attrs?.verticalAlign === "bottom") {
@@ -69493,6 +69501,7 @@ const renderTableCell = (deps) => {
69493
69501
  } else {
69494
69502
  content.style.justifyContent = "flex-start";
69495
69503
  }
69504
+ cellEl.appendChild(content);
69496
69505
  const blockLineCounts = [];
69497
69506
  for (let i = 0; i < Math.min(blockMeasures.length, cellBlocks.length); i++) {
69498
69507
  const bm = blockMeasures[i];
@@ -69544,14 +69553,19 @@ const renderTableCell = (deps) => {
69544
69553
  if (renderedHeight > 0) {
69545
69554
  paraWrapper.style.height = `${renderedHeight}px`;
69546
69555
  }
69556
+ if (renderedEntireBlock) {
69557
+ const spacingAfter = block.attrs?.spacing?.after;
69558
+ if (typeof spacingAfter === "number" && spacingAfter > 0) {
69559
+ paraWrapper.style.marginBottom = `${spacingAfter}px`;
69560
+ }
69561
+ }
69547
69562
  cumulativeLineCount += blockLineCount;
69548
69563
  } else {
69549
69564
  cumulativeLineCount += 0;
69550
69565
  }
69551
69566
  }
69552
- contentElement = content;
69553
69567
  }
69554
- return { cellElement: cellEl, contentElement };
69568
+ return { cellElement: cellEl };
69555
69569
  };
69556
69570
  const renderTableRow = (deps) => {
69557
69571
  const {
@@ -69654,7 +69668,7 @@ const renderTableRow = (deps) => {
69654
69668
  }
69655
69669
  const fromLine = partialRow?.fromLineByCell?.[cellIndex];
69656
69670
  const toLine = partialRow?.toLineByCell?.[cellIndex];
69657
- const { cellElement, contentElement } = renderTableCell({
69671
+ const { cellElement } = renderTableCell({
69658
69672
  doc: doc2,
69659
69673
  x: x2,
69660
69674
  y: y2,
@@ -69669,9 +69683,6 @@ const renderTableRow = (deps) => {
69669
69683
  toLine
69670
69684
  });
69671
69685
  container.appendChild(cellElement);
69672
- if (contentElement) {
69673
- container.appendChild(contentElement);
69674
- }
69675
69686
  }
69676
69687
  };
69677
69688
  const renderTableFragment = (deps) => {
@@ -72514,6 +72525,9 @@ const applyRunStyles = (element, run2, _isLink = false) => {
72514
72525
  if (run2.highlight) {
72515
72526
  element.style.backgroundColor = run2.highlight;
72516
72527
  }
72528
+ if (run2.textTransform) {
72529
+ element.style.textTransform = run2.textTransform;
72530
+ }
72517
72531
  const decorations = [];
72518
72532
  if (run2.underline) {
72519
72533
  decorations.push("underline");
@@ -73630,11 +73644,18 @@ async function measureTableBlock(block, constraints) {
73630
73644
  const blockMeasures = [];
73631
73645
  let contentHeight = 0;
73632
73646
  const cellBlocks = cell.blocks ?? (cell.paragraph ? [cell.paragraph] : []);
73633
- for (const block2 of cellBlocks) {
73647
+ for (let blockIndex = 0; blockIndex < cellBlocks.length; blockIndex++) {
73648
+ const block2 = cellBlocks[blockIndex];
73634
73649
  const measure = await measureBlock(block2, { maxWidth: contentWidth, maxHeight: Infinity });
73635
73650
  blockMeasures.push(measure);
73636
73651
  const blockHeight = "totalHeight" in measure ? measure.totalHeight : "height" in measure ? measure.height : 0;
73637
73652
  contentHeight += blockHeight;
73653
+ if (block2.kind === "paragraph") {
73654
+ const spacingAfter = block2.attrs?.spacing?.after;
73655
+ if (typeof spacingAfter === "number" && spacingAfter > 0) {
73656
+ contentHeight += spacingAfter;
73657
+ }
73658
+ }
73638
73659
  }
73639
73660
  const totalCellHeight = contentHeight + paddingTop + paddingBottom;
73640
73661
  cellMeasures.push({
@@ -113997,6 +114018,8 @@ const _hoisted_2 = {
113997
114018
  };
113998
114019
  const _hoisted_3 = { class: "placeholder-title" };
113999
114020
  const DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
114021
+ const TABLE_RESIZE_HOVER_THRESHOLD = 8;
114022
+ const TABLE_RESIZE_THROTTLE_MS = 16;
114000
114023
  const _sfc_main$1 = {
114001
114024
  __name: "SuperEditor",
114002
114025
  props: {
@@ -114066,7 +114089,58 @@ const _sfc_main$1 = {
114066
114089
  imageElement: null,
114067
114090
  blockId: null
114068
114091
  });
114092
+ let lastUpdateTableResizeTimestamp = 0;
114093
+ const isNearColumnBoundary = (event, tableElement) => {
114094
+ if (!event || typeof event.clientX !== "number" || typeof event.clientY !== "number") {
114095
+ console.warn("[isNearColumnBoundary] Invalid event: missing clientX or clientY", event);
114096
+ return false;
114097
+ }
114098
+ if (!tableElement || !(tableElement instanceof HTMLElement)) {
114099
+ console.warn("[isNearColumnBoundary] Invalid tableElement: not an HTMLElement", tableElement);
114100
+ return false;
114101
+ }
114102
+ const boundariesAttr = tableElement.getAttribute("data-table-boundaries");
114103
+ if (!boundariesAttr) return false;
114104
+ try {
114105
+ const metadata = JSON.parse(boundariesAttr);
114106
+ if (!metadata.columns || !Array.isArray(metadata.columns)) return false;
114107
+ const tableRect = tableElement.getBoundingClientRect();
114108
+ const mouseX = event.clientX - tableRect.left;
114109
+ const mouseY = event.clientY - tableRect.top;
114110
+ for (let i2 = 0; i2 < metadata.columns.length; i2++) {
114111
+ const col = metadata.columns[i2];
114112
+ const boundaryX = col.x + col.w;
114113
+ if (Math.abs(mouseX - boundaryX) <= TABLE_RESIZE_HOVER_THRESHOLD) {
114114
+ const segmentColIndex = i2 + 1;
114115
+ const segments = metadata.segments?.[segmentColIndex];
114116
+ if (!segments || segments.length === 0) {
114117
+ if (i2 === metadata.columns.length - 1) return true;
114118
+ continue;
114119
+ }
114120
+ for (const seg of segments) {
114121
+ const segTop = seg.y || 0;
114122
+ const segBottom = seg.h != null ? segTop + seg.h : tableRect.height;
114123
+ if (mouseY >= segTop && mouseY <= segBottom) {
114124
+ return true;
114125
+ }
114126
+ }
114127
+ }
114128
+ }
114129
+ if (Math.abs(mouseX) <= TABLE_RESIZE_HOVER_THRESHOLD) {
114130
+ return true;
114131
+ }
114132
+ return false;
114133
+ } catch (e) {
114134
+ console.warn("[isNearColumnBoundary] Failed to parse table boundary metadata:", e);
114135
+ return false;
114136
+ }
114137
+ };
114069
114138
  const updateTableResizeOverlay = (event) => {
114139
+ const now = Date.now();
114140
+ if (now - lastUpdateTableResizeTimestamp < TABLE_RESIZE_THROTTLE_MS) {
114141
+ return;
114142
+ }
114143
+ lastUpdateTableResizeTimestamp = now;
114070
114144
  if (!editorElem.value) return;
114071
114145
  let target = event.target;
114072
114146
  while (target && target !== editorElem.value) {
@@ -114074,8 +114148,13 @@ const _sfc_main$1 = {
114074
114148
  return;
114075
114149
  }
114076
114150
  if (target.classList?.contains("superdoc-table-fragment") && target.hasAttribute("data-table-boundaries")) {
114077
- tableResizeState.visible = true;
114078
- tableResizeState.tableElement = target;
114151
+ if (isNearColumnBoundary(event, target)) {
114152
+ tableResizeState.visible = true;
114153
+ tableResizeState.tableElement = target;
114154
+ } else {
114155
+ tableResizeState.visible = false;
114156
+ tableResizeState.tableElement = null;
114157
+ }
114079
114158
  return;
114080
114159
  }
114081
114160
  target = target.parentElement;
@@ -114402,7 +114481,7 @@ const _sfc_main$1 = {
114402
114481
  };
114403
114482
  }
114404
114483
  };
114405
- const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-08b32c3d"]]);
114484
+ const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ed5a08ee"]]);
114406
114485
  const _hoisted_1 = ["innerHTML"];
114407
114486
  const _sfc_main = {
114408
114487
  __name: "SuperInput",
package/dist/style.css CHANGED
@@ -2343,10 +2343,10 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2343
2343
  box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
2344
2344
  }
2345
2345
 
2346
- .editor-element[data-v-08b32c3d] {
2346
+ .editor-element[data-v-ed5a08ee] {
2347
2347
  position: relative;
2348
2348
  }
2349
- .super-editor-container[data-v-08b32c3d] {
2349
+ .super-editor-container[data-v-ed5a08ee] {
2350
2350
  width: auto;
2351
2351
  height: auto;
2352
2352
  min-width: 8in;
@@ -2355,14 +2355,14 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2355
2355
  display: flex;
2356
2356
  flex-direction: column;
2357
2357
  }
2358
- .ruler[data-v-08b32c3d] {
2358
+ .ruler[data-v-ed5a08ee] {
2359
2359
  margin-bottom: 2px;
2360
2360
  }
2361
- .super-editor[data-v-08b32c3d] {
2361
+ .super-editor[data-v-ed5a08ee] {
2362
2362
  color: initial;
2363
2363
  overflow: hidden;
2364
2364
  }
2365
- .placeholder-editor[data-v-08b32c3d] {
2365
+ .placeholder-editor[data-v-ed5a08ee] {
2366
2366
  position: absolute;
2367
2367
  top: 0;
2368
2368
  left: 0;
@@ -2374,7 +2374,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2374
2374
  background-color: white;
2375
2375
  box-sizing: border-box;
2376
2376
  }
2377
- .placeholder-title[data-v-08b32c3d] {
2377
+ .placeholder-title[data-v-ed5a08ee] {
2378
2378
  display: flex;
2379
2379
  justify-content: center;
2380
2380
  margin-bottom: 40px;
@@ -1,6 +1,6 @@
1
1
  import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
2
- import { T as TextSelection } from "./chunks/converter-Cu26_LdN.js";
3
- import { _ as _export_sfc } from "./chunks/editor-BXC2Hzba.js";
2
+ import { T as TextSelection } from "./chunks/converter-m2x13P8G.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-C9r_Jbbg.js";
4
4
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
5
5
  const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
6
6
  async function baseInsightsFetch(payload, options = {}) {
@@ -33474,7 +33474,7 @@ const encode$1 = (params, encodedAttrs = {}) => {
33474
33474
  text = elements[0].text;
33475
33475
  const xmlSpace = encodedAttrs.xmlSpace ?? elements[0]?.attributes?.["xml:space"];
33476
33476
  if (xmlSpace !== "preserve" && typeof text === "string") {
33477
- text = text.replace(/^\s+/, "").replace(/\s+$/, "");
33477
+ text = text.replace(/^[ \t\n\r]+/, "").replace(/[ \t\n\r]+$/, "");
33478
33478
  }
33479
33479
  text = text.replace(/\[\[sdspace\]\]/g, "");
33480
33480
  } else if (!elements.length && encodedAttrs.xmlSpace === "preserve") {
@@ -36652,7 +36652,7 @@ const _SuperConverter = class _SuperConverter {
36652
36652
  static getStoredSuperdocVersion(docx) {
36653
36653
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
36654
36654
  }
36655
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.19") {
36655
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.20") {
36656
36656
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
36657
36657
  }
36658
36658
  /**
@@ -1,4 +1,4 @@
1
- import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-Cu26_LdN.js";
1
+ import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-m2x13P8G.js";
2
2
  function commonjsRequire(path) {
3
3
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -12,8 +12,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, dispatchWithFallback_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, getPluginKeyName_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _map, _editor2, _descriptors, _collections, _editorEntries, _maxCachedEditors, _editorAccessOrder, _pendingCreations, _cacheHits, _cacheMisses, _evictions, _HeaderFooterEditorManager_instances, hasConverter_fn, extractCollections_fn, collectDescriptors_fn, teardownMissingEditors_fn, teardownEditors_fn, createEditor_fn, createEditorContainer_fn, registerConverterEditor_fn, unregisterConverterEditor_fn, updateAccessOrder_fn, enforceCacheSizeLimit_fn, _manager, _mediaFiles, _blockCache, _HeaderFooterLayoutAdapter_instances, getBlocks_fn, getConverterContext_fn, _selectionOverlay, _activeEditorHost, _activeDecorationContainer, _activeRegion, _borderLine, _EditorOverlayManager_instances, findDecorationContainer_fn, ensureEditorHost_fn, positionEditorHost_fn, showHeaderFooterBorder_fn, hideHeaderFooterBorder_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay2, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _headerLayoutResults, _footerLayoutResults, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _overlayManager, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _lastSelectedImageBlockId, _remoteCursorState, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _remoteCursorRafHandle, _scrollTimeout, _PresentationEditor_instances, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, updateDecorationProviders_fn, createDecorationProvider_fn, findHeaderFooterPageForPageNumber_fn, computeDecorationBox_fn, rebuildHeaderFooterRegions_fn, hitTestHeaderFooterRegion_fn, pointInRegion_fn, activateHeaderFooterRegion_fn, enterHeaderFooterMode_fn, exitHeaderFooterMode_fn, getActiveDomTarget_fn, emitHeaderFooterModeChanged_fn, emitHeaderFooterEditingContext_fn, updateAwarenessSession_fn, updateModeBanner_fn, announce_fn, validateHeaderFooterEditPermission_fn, emitHeaderFooterEditBlocked_fn, resolveDescriptorForRegion_fn, createDefaultHeaderFooter_fn, getPageElement_fn, scrollPageIntoView_fn, waitForPageMount_fn, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, syncTrackedChangesPreferences_fn, deriveTrackedChangesMode_fn, deriveTrackedChangesEnabled_fn, getTrackChangesPluginState_fn, computeDefaultLayoutDefaults_fn, parseColumns_fn, inchesToPx_fn, applyZoom_fn, createLayoutMetrics_fn, convertPageLocalToOverlayCoords_fn, normalizeClientPoint_fn, computeCaretLayoutRect_fn, computeCaretLayoutRectFromDOM_fn, computeTableCaretLayoutRect_fn, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _layoutSurfaces, _getTargetDom, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, checkShouldUpdate_fn, updateHTMLAttributes_fn, updateDOMStyles_fn, resolveNeighborParagraphProperties_fn, updateListStyles_fn, initList_fn, checkIsList_fn, createMarker_fn, createSeparator_fn, calculateTabSeparatorStyle_fn, calculateMarkerStyle_fn, removeList_fn, getParagraphContext_fn, scheduleAnimation_fn, cancelScheduledAnimation_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _VectorShapeView_instances, ensureParentPositioned_fn, _ShapeGroupView_instances, ensureParentPositioned_fn2;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as ListHelpers, O as updateNumberingProperties, Q as changeListLevel, U as findParentNode, V as isList, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName, $ as TrackInsertMarkName, a0 as v4, a1 as TrackFormatMarkName, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as decodeRPrFromMarks, ar as calculateResolvedParagraphProperties, as as encodeCSSFromPPr, at as twipsToPixels$2, au as resolveRunProperties, av as encodeCSSFromRPr, aw as generateOrderedListIndex, ax as docxNumberingHelpers, ay as InputRule, az as convertSizeToCSS, aA as SelectionRange, aB as Transform, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-Cu26_LdN.js";
16
- import { D as DocxZipper } from "./docx-zipper-C8lozSFd.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as ListHelpers, O as updateNumberingProperties, Q as changeListLevel, U as findParentNode, V as isList, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName, $ as TrackInsertMarkName, a0 as v4, a1 as TrackFormatMarkName, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as decodeRPrFromMarks, ar as calculateResolvedParagraphProperties, as as encodeCSSFromPPr, at as twipsToPixels$2, au as resolveRunProperties, av as encodeCSSFromRPr, aw as generateOrderedListIndex, ax as docxNumberingHelpers, ay as InputRule, az as convertSizeToCSS, aA as SelectionRange, aB as Transform, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-m2x13P8G.js";
16
+ import { D as DocxZipper } from "./docx-zipper-CRSKJF-o.js";
17
17
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
@@ -13857,7 +13857,7 @@ const isHeadless = (editor) => {
13857
13857
  const shouldSkipNodeView = (editor) => {
13858
13858
  return isHeadless(editor);
13859
13859
  };
13860
- const summaryVersion = "1.0.0-beta.19";
13860
+ const summaryVersion = "1.0.0-beta.20";
13861
13861
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
13862
13862
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
13863
13863
  function mapAttributes(attrs) {
@@ -14636,7 +14636,7 @@ const _Editor = class _Editor extends EventEmitter {
14636
14636
  { default: remarkStringify },
14637
14637
  { default: remarkGfm }
14638
14638
  ] = await Promise.all([
14639
- import("./index-CRpn1mWd.js"),
14639
+ import("./index-DHhKY9FZ.js"),
14640
14640
  import("./index-DRCvimau.js"),
14641
14641
  import("./index-C_x_N6Uh.js"),
14642
14642
  import("./index-D_sWOSiG.js"),
@@ -14841,7 +14841,7 @@ const _Editor = class _Editor extends EventEmitter {
14841
14841
  * Process collaboration migrations
14842
14842
  */
14843
14843
  processCollaborationMigrations() {
14844
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.19");
14844
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.20");
14845
14845
  if (!this.options.ydoc) return;
14846
14846
  const metaMap = this.options.ydoc.getMap("meta");
14847
14847
  let docVersion = metaMap.get("version");
@@ -16943,6 +16943,12 @@ const applyTextStyleMark = (run, attrs, themeColors) => {
16943
16943
  run.letterSpacing = spacing;
16944
16944
  }
16945
16945
  }
16946
+ if (typeof attrs.textTransform === "string") {
16947
+ const transform = attrs.textTransform;
16948
+ if (transform === "uppercase" || transform === "lowercase" || transform === "capitalize" || transform === "none") {
16949
+ run.textTransform = transform;
16950
+ }
16951
+ }
16946
16952
  };
16947
16953
  const DEFAULT_HYPERLINK_CONFIG = {
16948
16954
  enableRichHyperlinks: false
@@ -18951,6 +18957,16 @@ const parseNumberAttr = (value) => {
18951
18957
  const num = typeof value === "number" ? value : Number.parseInt(String(value), 10);
18952
18958
  return Number.isFinite(num) ? num : void 0;
18953
18959
  };
18960
+ const mergeSpacingSources = (base2, paragraphProps, attrs) => {
18961
+ const isObject2 = (v) => v !== null && typeof v === "object";
18962
+ const baseObj = isObject2(base2) ? base2 : {};
18963
+ const propsObj = isObject2(paragraphProps) ? paragraphProps : {};
18964
+ const attrsObj = isObject2(attrs) ? attrs : {};
18965
+ if (Object.keys(baseObj).length === 0 && Object.keys(propsObj).length === 0 && Object.keys(attrsObj).length === 0) {
18966
+ return void 0;
18967
+ }
18968
+ return { ...baseObj, ...propsObj, ...attrsObj };
18969
+ };
18954
18970
  const normalizeNumFmt = (value) => {
18955
18971
  if (typeof value !== "string") return void 0;
18956
18972
  switch (value) {
@@ -19485,8 +19501,8 @@ const computeParagraphAttrs = (para, styleContext, listCounterContext, converter
19485
19501
  const attrs = para.attrs ?? {};
19486
19502
  const paragraphProps = typeof attrs.paragraphProperties === "object" && attrs.paragraphProperties !== null ? attrs.paragraphProperties : {};
19487
19503
  const hydrated = hydrationOverride ?? hydrateParagraphStyleAttrs(para, converterContext);
19488
- const spacingSource = attrs.spacing !== void 0 ? attrs.spacing : paragraphProps.spacing !== void 0 ? paragraphProps.spacing : hydrated?.spacing;
19489
- const normalizedSpacing = normalizeParagraphSpacing(spacingSource);
19504
+ const mergedSpacing = mergeSpacingSources(hydrated?.spacing, paragraphProps.spacing, attrs.spacing);
19505
+ const normalizedSpacing = normalizeParagraphSpacing(mergedSpacing);
19490
19506
  const indentSource = attrs.indent ?? paragraphProps.indent ?? hydrated?.indent;
19491
19507
  const normalizedIndent = normalizePxIndent(indentSource) ?? normalizeParagraphIndent(indentSource ?? attrs.textIndent);
19492
19508
  const unwrapTabStops = (tabStops) => {
@@ -29905,6 +29921,12 @@ const renderTableCell = (deps) => {
29905
29921
  fromLine,
29906
29922
  toLine
29907
29923
  } = deps;
29924
+ const attrs = cell?.attrs;
29925
+ const padding = attrs?.padding || { top: 2, left: 4, right: 4, bottom: 2 };
29926
+ const paddingLeft = padding.left ?? 4;
29927
+ const paddingTop = padding.top ?? 2;
29928
+ const paddingRight = padding.right ?? 4;
29929
+ const paddingBottom = padding.bottom ?? 2;
29908
29930
  const cellEl = doc2.createElement("div");
29909
29931
  cellEl.style.position = "absolute";
29910
29932
  cellEl.style.left = `${x}px`;
@@ -29913,39 +29935,25 @@ const renderTableCell = (deps) => {
29913
29935
  cellEl.style.height = `${rowHeight}px`;
29914
29936
  cellEl.style.boxSizing = "border-box";
29915
29937
  cellEl.style.overflow = "hidden";
29938
+ cellEl.style.paddingLeft = `${paddingLeft}px`;
29939
+ cellEl.style.paddingTop = `${paddingTop}px`;
29940
+ cellEl.style.paddingRight = `${paddingRight}px`;
29941
+ cellEl.style.paddingBottom = `${paddingBottom}px`;
29916
29942
  if (borders) {
29917
29943
  applyCellBorders(cellEl, borders);
29918
29944
  }
29919
29945
  if (cell?.attrs?.background) {
29920
29946
  cellEl.style.backgroundColor = cell.attrs.background;
29921
29947
  }
29922
- if (cell?.attrs?.verticalAlign) {
29923
- cellEl.style.display = "flex";
29924
- cellEl.style.flexDirection = "column";
29925
- cellEl.style.justifyContent = cell.attrs.verticalAlign === "top" ? "flex-start" : cell.attrs.verticalAlign === "bottom" ? "flex-end" : "center";
29926
- }
29927
- let contentElement;
29928
- const attrs = cell?.attrs;
29929
- const padding = attrs?.padding || { top: 2, left: 4, right: 4, bottom: 2 };
29930
- const paddingLeft = padding.left ?? 4;
29931
- const paddingTop = padding.top ?? 2;
29932
- const paddingRight = padding.right ?? 4;
29933
- const paddingBottom = padding.bottom ?? 2;
29934
29948
  const cellBlocks = cell?.blocks ?? (cell?.paragraph ? [cell.paragraph] : []);
29935
29949
  const blockMeasures = cellMeasure?.blocks ?? (cellMeasure?.paragraph ? [cellMeasure.paragraph] : []);
29936
29950
  if (cellBlocks.length > 0 && blockMeasures.length > 0) {
29937
29951
  const content = doc2.createElement("div");
29938
- content.style.position = "absolute";
29939
- content.style.left = `${x + paddingLeft}px`;
29940
- content.style.top = `${y + paddingTop}px`;
29941
- const contentWidth = Math.max(0, cellMeasure.width - paddingLeft - paddingRight);
29942
- const contentHeight = Math.max(0, rowHeight - paddingTop - paddingBottom);
29943
- content.style.width = `${contentWidth + 1}px`;
29944
- content.style.height = `${contentHeight}px`;
29952
+ content.style.position = "relative";
29953
+ content.style.width = "100%";
29954
+ content.style.height = "100%";
29945
29955
  content.style.display = "flex";
29946
29956
  content.style.flexDirection = "column";
29947
- content.style.overflowX = "visible";
29948
- content.style.overflowY = "hidden";
29949
29957
  if (cell?.attrs?.verticalAlign === "center") {
29950
29958
  content.style.justifyContent = "center";
29951
29959
  } else if (cell?.attrs?.verticalAlign === "bottom") {
@@ -29953,6 +29961,7 @@ const renderTableCell = (deps) => {
29953
29961
  } else {
29954
29962
  content.style.justifyContent = "flex-start";
29955
29963
  }
29964
+ cellEl.appendChild(content);
29956
29965
  const blockLineCounts = [];
29957
29966
  for (let i = 0; i < Math.min(blockMeasures.length, cellBlocks.length); i++) {
29958
29967
  const bm = blockMeasures[i];
@@ -30004,14 +30013,19 @@ const renderTableCell = (deps) => {
30004
30013
  if (renderedHeight > 0) {
30005
30014
  paraWrapper.style.height = `${renderedHeight}px`;
30006
30015
  }
30016
+ if (renderedEntireBlock) {
30017
+ const spacingAfter = block.attrs?.spacing?.after;
30018
+ if (typeof spacingAfter === "number" && spacingAfter > 0) {
30019
+ paraWrapper.style.marginBottom = `${spacingAfter}px`;
30020
+ }
30021
+ }
30007
30022
  cumulativeLineCount += blockLineCount;
30008
30023
  } else {
30009
30024
  cumulativeLineCount += 0;
30010
30025
  }
30011
30026
  }
30012
- contentElement = content;
30013
30027
  }
30014
- return { cellElement: cellEl, contentElement };
30028
+ return { cellElement: cellEl };
30015
30029
  };
30016
30030
  const renderTableRow = (deps) => {
30017
30031
  const {
@@ -30114,7 +30128,7 @@ const renderTableRow = (deps) => {
30114
30128
  }
30115
30129
  const fromLine = partialRow?.fromLineByCell?.[cellIndex];
30116
30130
  const toLine = partialRow?.toLineByCell?.[cellIndex];
30117
- const { cellElement, contentElement } = renderTableCell({
30131
+ const { cellElement } = renderTableCell({
30118
30132
  doc: doc2,
30119
30133
  x,
30120
30134
  y,
@@ -30129,9 +30143,6 @@ const renderTableRow = (deps) => {
30129
30143
  toLine
30130
30144
  });
30131
30145
  container.appendChild(cellElement);
30132
- if (contentElement) {
30133
- container.appendChild(contentElement);
30134
- }
30135
30146
  }
30136
30147
  };
30137
30148
  const renderTableFragment = (deps) => {
@@ -32974,6 +32985,9 @@ const applyRunStyles = (element, run, _isLink = false) => {
32974
32985
  if (run.highlight) {
32975
32986
  element.style.backgroundColor = run.highlight;
32976
32987
  }
32988
+ if (run.textTransform) {
32989
+ element.style.textTransform = run.textTransform;
32990
+ }
32977
32991
  const decorations = [];
32978
32992
  if (run.underline) {
32979
32993
  decorations.push("underline");
@@ -34090,11 +34104,18 @@ async function measureTableBlock(block, constraints) {
34090
34104
  const blockMeasures = [];
34091
34105
  let contentHeight = 0;
34092
34106
  const cellBlocks = cell.blocks ?? (cell.paragraph ? [cell.paragraph] : []);
34093
- for (const block2 of cellBlocks) {
34107
+ for (let blockIndex = 0; blockIndex < cellBlocks.length; blockIndex++) {
34108
+ const block2 = cellBlocks[blockIndex];
34094
34109
  const measure = await measureBlock(block2, { maxWidth: contentWidth, maxHeight: Infinity });
34095
34110
  blockMeasures.push(measure);
34096
34111
  const blockHeight = "totalHeight" in measure ? measure.totalHeight : "height" in measure ? measure.height : 0;
34097
34112
  contentHeight += blockHeight;
34113
+ if (block2.kind === "paragraph") {
34114
+ const spacingAfter = block2.attrs?.spacing?.after;
34115
+ if (typeof spacingAfter === "number" && spacingAfter > 0) {
34116
+ contentHeight += spacingAfter;
34117
+ }
34118
+ }
34098
34119
  }
34099
34120
  const totalCellHeight = contentHeight + paddingTop + paddingBottom;
34100
34121
  cellMeasures.push({
@@ -1,4 +1,4 @@
1
- import { aK as getDefaultExportFromCjs } from "./converter-Cu26_LdN.js";
1
+ import { aK as getDefaultExportFromCjs } from "./converter-m2x13P8G.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, onMounted, onBeforeUnmount, createVNode, readonly, watch, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-Cu26_LdN.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BXC2Hzba.js";
2
+ import { p as process$1 } from "./converter-m2x13P8G.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-C9r_Jbbg.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { ac } from "./chunks/converter-Cu26_LdN.js";
1
+ import { ac } from "./chunks/converter-m2x13P8G.js";
2
2
  export {
3
3
  ac as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-Cu26_LdN.js";
2
- import { D } from "./chunks/docx-zipper-C8lozSFd.js";
1
+ import "./chunks/converter-m2x13P8G.js";
2
+ import { D } from "./chunks/docx-zipper-CRSKJF-o.js";
3
3
  export {
4
4
  D as default
5
5
  };