superdoc 1.8.2-next.3 → 1.8.2-next.4

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.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-De9wkgLl.cjs");
4
- const superdoc = require("./index-DFfL-kVP.cjs");
5
- const index = require("./index-DxtNEV8s.cjs");
4
+ const superdoc = require("./index-BDt0SMPG.cjs");
5
+ const index = require("./index-Cm1X7-Lz.cjs");
6
6
  function self(vars) {
7
7
  const {
8
8
  opacityDisabled,
@@ -1,6 +1,6 @@
1
1
  import { d as defineComponent, h, T as Transition, p as process$1, w as watchEffect, c as computed, r as ref, f as onMounted, X as onUnmounted, E as createElementBlock, G as openBlock, K as createBaseVNode, M as createCommentVNode, I as createVNode, v as unref } from "./vue-BnBKJwCW.es.js";
2
- import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-Dwj0MeWB.es.js";
3
- import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-BE_axAgp.es.js";
2
+ import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-BCicU4sm.es.js";
3
+ import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-Cq-aFnBK.es.js";
4
4
  function self(vars) {
5
5
  const {
6
6
  opacityDisabled,
@@ -9666,6 +9666,7 @@ function handleTableCellNode({
9666
9666
  rowIndex = 0,
9667
9667
  totalRows = 1,
9668
9668
  totalColumns,
9669
+ preferTableGridWidths = false,
9669
9670
  _referencedStyles
9670
9671
  }) {
9671
9672
  const { nodeListHandler } = params;
@@ -9694,7 +9695,10 @@ function handleTableCellNode({
9694
9695
  referencedStyles
9695
9696
  });
9696
9697
  if (colspan > 1) attributes["colspan"] = colspan;
9697
- let width = tableCellProperties.cellWidth?.value ? twipsToPixels(tableCellProperties.cellWidth?.value) : null;
9698
+ let width = null;
9699
+ if (!preferTableGridWidths) {
9700
+ width = tableCellProperties.cellWidth?.value ? twipsToPixels(tableCellProperties.cellWidth?.value) : null;
9701
+ }
9698
9702
  const widthType = tableCellProperties.cellWidth?.type;
9699
9703
  if (widthType) attributes["widthType"] = widthType;
9700
9704
  if (!width && columnWidth) width = columnWidth;
@@ -10083,6 +10087,7 @@ function encode$B(params, encodedAttrs) {
10083
10087
  rowIndex,
10084
10088
  totalRows,
10085
10089
  totalColumns,
10090
+ preferTableGridWidths,
10086
10091
  _referencedStyles
10087
10092
  } = params.extraParams;
10088
10093
  const schemaNode = handleTableCellNode({
@@ -10101,6 +10106,7 @@ function encode$B(params, encodedAttrs) {
10101
10106
  rowIndex,
10102
10107
  totalRows,
10103
10108
  totalColumns,
10109
+ preferTableGridWidths,
10104
10110
  _referencedStyles
10105
10111
  });
10106
10112
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -27189,6 +27195,28 @@ const buildFallbackGridForTable = ({ params, rows, tableWidth, tableWidthMeasure
27189
27195
  };
27190
27196
  const XML_NODE_NAME$f = "w:tbl";
27191
27197
  const SD_NODE_NAME$e = "table";
27198
+ const INDENT_TWIPS_TOLERANCE = 5;
27199
+ const sumColumnTwips = (columns = []) => columns.reduce((sum, col) => {
27200
+ const raw = col?.col;
27201
+ const value = typeof raw === "number" ? raw : Number.parseInt(raw, 10);
27202
+ return Number.isFinite(value) ? sum + value : sum;
27203
+ }, 0);
27204
+ const getFirstRowCellWidthSumTwips = (rows = []) => {
27205
+ const firstRow = rows.find((row) => row?.elements?.some((el) => el.name === "w:tc"));
27206
+ if (!firstRow?.elements) return null;
27207
+ const cells = firstRow.elements.filter((el) => el.name === "w:tc");
27208
+ if (!cells.length) return null;
27209
+ let sum = 0;
27210
+ for (const cell of cells) {
27211
+ const tcPr = cell.elements?.find((el) => el.name === "w:tcPr");
27212
+ const tcW = tcPr?.elements?.find((el) => el.name === "w:tcW");
27213
+ const rawWidth = tcW?.attributes?.["w:w"];
27214
+ const width = typeof rawWidth === "number" ? rawWidth : Number.parseInt(rawWidth, 10);
27215
+ if (!Number.isFinite(width)) return null;
27216
+ sum += width;
27217
+ }
27218
+ return sum;
27219
+ };
27192
27220
  const encode$u = (params, encodedAttrs) => {
27193
27221
  const { nodes } = params;
27194
27222
  const node = nodes[0];
@@ -27250,6 +27278,13 @@ const encode$u = (params, encodedAttrs) => {
27250
27278
  };
27251
27279
  const rows = node.elements.filter((el) => el.name === "w:tr");
27252
27280
  let columnWidths = Array.isArray(encodedAttrs["grid"]) ? encodedAttrs["grid"].map((item) => twipsToPixels(item.col)) : [];
27281
+ const tableIndentTwips = encodedAttrs.tableProperties?.tableIndent?.value;
27282
+ const hasIndent = Number.isFinite(tableIndentTwips) && tableIndentTwips !== 0;
27283
+ const hasExplicitGrid = Boolean(tblGrid);
27284
+ const gridTwipsTotal = hasExplicitGrid ? sumColumnTwips(encodedAttrs["grid"]) : null;
27285
+ const rowTcWTwipsTotal = hasExplicitGrid && hasIndent ? getFirstRowCellWidthSumTwips(rows) : null;
27286
+ const indentDiff = rowTcWTwipsTotal != null && gridTwipsTotal != null ? rowTcWTwipsTotal - gridTwipsTotal : null;
27287
+ const preferTableGridWidths = hasExplicitGrid && hasIndent && gridTwipsTotal != null && rowTcWTwipsTotal != null && Math.sign(indentDiff) === Math.sign(tableIndentTwips) && Math.abs(indentDiff - tableIndentTwips) <= INDENT_TWIPS_TOLERANCE;
27253
27288
  if (!columnWidths.length) {
27254
27289
  const fallback = buildFallbackGridForTable({
27255
27290
  params,
@@ -27282,6 +27317,7 @@ const encode$u = (params, encodedAttrs) => {
27282
27317
  rowIndex,
27283
27318
  totalRows,
27284
27319
  totalColumns,
27320
+ preferTableGridWidths,
27285
27321
  _referencedStyles: referencedStyles
27286
27322
  }
27287
27323
  });
@@ -33527,7 +33563,7 @@ class SuperConverter {
33527
33563
  static getStoredSuperdocVersion(docx) {
33528
33564
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
33529
33565
  }
33530
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.8.2-next.3") {
33566
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.8.2-next.4") {
33531
33567
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
33532
33568
  }
33533
33569
  /**
@@ -9667,6 +9667,7 @@ function handleTableCellNode({
9667
9667
  rowIndex = 0,
9668
9668
  totalRows = 1,
9669
9669
  totalColumns,
9670
+ preferTableGridWidths = false,
9670
9671
  _referencedStyles
9671
9672
  }) {
9672
9673
  const { nodeListHandler } = params;
@@ -9695,7 +9696,10 @@ function handleTableCellNode({
9695
9696
  referencedStyles
9696
9697
  });
9697
9698
  if (colspan > 1) attributes["colspan"] = colspan;
9698
- let width = tableCellProperties.cellWidth?.value ? helpers.twipsToPixels(tableCellProperties.cellWidth?.value) : null;
9699
+ let width = null;
9700
+ if (!preferTableGridWidths) {
9701
+ width = tableCellProperties.cellWidth?.value ? helpers.twipsToPixels(tableCellProperties.cellWidth?.value) : null;
9702
+ }
9699
9703
  const widthType = tableCellProperties.cellWidth?.type;
9700
9704
  if (widthType) attributes["widthType"] = widthType;
9701
9705
  if (!width && columnWidth) width = columnWidth;
@@ -10084,6 +10088,7 @@ function encode$B(params, encodedAttrs) {
10084
10088
  rowIndex,
10085
10089
  totalRows,
10086
10090
  totalColumns,
10091
+ preferTableGridWidths,
10087
10092
  _referencedStyles
10088
10093
  } = params.extraParams;
10089
10094
  const schemaNode = handleTableCellNode({
@@ -10102,6 +10107,7 @@ function encode$B(params, encodedAttrs) {
10102
10107
  rowIndex,
10103
10108
  totalRows,
10104
10109
  totalColumns,
10110
+ preferTableGridWidths,
10105
10111
  _referencedStyles
10106
10112
  });
10107
10113
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -27190,6 +27196,28 @@ const buildFallbackGridForTable = ({ params, rows, tableWidth, tableWidthMeasure
27190
27196
  };
27191
27197
  const XML_NODE_NAME$f = "w:tbl";
27192
27198
  const SD_NODE_NAME$e = "table";
27199
+ const INDENT_TWIPS_TOLERANCE = 5;
27200
+ const sumColumnTwips = (columns = []) => columns.reduce((sum, col) => {
27201
+ const raw = col?.col;
27202
+ const value = typeof raw === "number" ? raw : Number.parseInt(raw, 10);
27203
+ return Number.isFinite(value) ? sum + value : sum;
27204
+ }, 0);
27205
+ const getFirstRowCellWidthSumTwips = (rows = []) => {
27206
+ const firstRow = rows.find((row) => row?.elements?.some((el) => el.name === "w:tc"));
27207
+ if (!firstRow?.elements) return null;
27208
+ const cells = firstRow.elements.filter((el) => el.name === "w:tc");
27209
+ if (!cells.length) return null;
27210
+ let sum = 0;
27211
+ for (const cell of cells) {
27212
+ const tcPr = cell.elements?.find((el) => el.name === "w:tcPr");
27213
+ const tcW = tcPr?.elements?.find((el) => el.name === "w:tcW");
27214
+ const rawWidth = tcW?.attributes?.["w:w"];
27215
+ const width = typeof rawWidth === "number" ? rawWidth : Number.parseInt(rawWidth, 10);
27216
+ if (!Number.isFinite(width)) return null;
27217
+ sum += width;
27218
+ }
27219
+ return sum;
27220
+ };
27193
27221
  const encode$u = (params, encodedAttrs) => {
27194
27222
  const { nodes } = params;
27195
27223
  const node = nodes[0];
@@ -27251,6 +27279,13 @@ const encode$u = (params, encodedAttrs) => {
27251
27279
  };
27252
27280
  const rows = node.elements.filter((el) => el.name === "w:tr");
27253
27281
  let columnWidths = Array.isArray(encodedAttrs["grid"]) ? encodedAttrs["grid"].map((item) => helpers.twipsToPixels(item.col)) : [];
27282
+ const tableIndentTwips = encodedAttrs.tableProperties?.tableIndent?.value;
27283
+ const hasIndent = Number.isFinite(tableIndentTwips) && tableIndentTwips !== 0;
27284
+ const hasExplicitGrid = Boolean(tblGrid);
27285
+ const gridTwipsTotal = hasExplicitGrid ? sumColumnTwips(encodedAttrs["grid"]) : null;
27286
+ const rowTcWTwipsTotal = hasExplicitGrid && hasIndent ? getFirstRowCellWidthSumTwips(rows) : null;
27287
+ const indentDiff = rowTcWTwipsTotal != null && gridTwipsTotal != null ? rowTcWTwipsTotal - gridTwipsTotal : null;
27288
+ const preferTableGridWidths = hasExplicitGrid && hasIndent && gridTwipsTotal != null && rowTcWTwipsTotal != null && Math.sign(indentDiff) === Math.sign(tableIndentTwips) && Math.abs(indentDiff - tableIndentTwips) <= INDENT_TWIPS_TOLERANCE;
27254
27289
  if (!columnWidths.length) {
27255
27290
  const fallback = buildFallbackGridForTable({
27256
27291
  params,
@@ -27283,6 +27318,7 @@ const encode$u = (params, encodedAttrs) => {
27283
27318
  rowIndex,
27284
27319
  totalRows,
27285
27320
  totalColumns,
27321
+ preferTableGridWidths,
27286
27322
  _referencedStyles: referencedStyles
27287
27323
  }
27288
27324
  });
@@ -33528,7 +33564,7 @@ class SuperConverter {
33528
33564
  static getStoredSuperdocVersion(docx) {
33529
33565
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
33530
33566
  }
33531
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.8.2-next.3") {
33567
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.8.2-next.4") {
33532
33568
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
33533
33569
  }
33534
33570
  /**
@@ -1,10 +1,10 @@
1
- import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-BE_axAgp.es.js";
1
+ import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-Cq-aFnBK.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
3
  import { E as EventEmitter } from "./eventemitter3-CwrdEv8r.es.js";
4
4
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
5
5
  import "./jszip-B1fkPkPJ.es.js";
6
6
  import "./helpers-CraselFS.es.js";
7
- import "./SuperConverter-DMi2ouTd.es.js";
7
+ import "./SuperConverter-B7668oVY.es.js";
8
8
  import { i as inject, a as provide, c as computed, o as onBeforeUnmount, p as process$1, b as onBeforeMount, d as defineComponent, h, t as toRef, T as Transition, e as TransitionGroup, w as watchEffect, r as ref, f as onMounted, g as Teleport, F as Fragment, j as reactive, k as effectScope, m as markRaw, l as toRaw, n as isRef, q as isReactive, s as getCurrentInstance, u as watch, v as unref, x as hasInjectionContext, y as nextTick, z as getCurrentScope, A as onScopeDispose, B as toRefs, C as global, D as shallowRef, E as createElementBlock, G as openBlock, H as toDisplayString, I as createVNode, J as withCtx, K as createBaseVNode, L as normalizeStyle, M as createCommentVNode, N as createBlock, O as withModifiers, P as normalizeClass, Q as resolveDirective, R as withDirectives, S as renderList, U as createApp, V as resolveDynamicComponent, W as defineAsyncComponent } from "./vue-BnBKJwCW.es.js";
9
9
  import "./jszip.min-DCl8qkFO.es.js";
10
10
  import { createZip } from "../super-editor/file-zipper.es.js";
@@ -7672,7 +7672,7 @@ const _sfc_main = {
7672
7672
  __name: "SuperDoc",
7673
7673
  emits: ["selection-update"],
7674
7674
  setup(__props, { emit: __emit }) {
7675
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-D-5y5dCS.es.js"));
7675
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-hG1Tu8iv.es.js"));
7676
7676
  const superdocStore = useSuperdocStore();
7677
7677
  const commentsStore = useCommentsStore();
7678
7678
  const {
@@ -8657,7 +8657,7 @@ class SuperDoc extends EventEmitter {
8657
8657
  this.config.colors = shuffleArray(this.config.colors);
8658
8658
  this.userColorMap = /* @__PURE__ */ new Map();
8659
8659
  this.colorIndex = 0;
8660
- this.version = "1.8.2-next.3";
8660
+ this.version = "1.8.2-next.4";
8661
8661
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8662
8662
  this.superdocId = config.superdocId || v4();
8663
8663
  this.colors = this.config.colors;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
- const index = require("./index-DxtNEV8s.cjs");
2
+ const index = require("./index-Cm1X7-Lz.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
4
  const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
5
5
  const provider = require("@hocuspocus/provider");
6
6
  require("./jszip-C8_CqJxM.cjs");
7
7
  require("./helpers-C7_u3NNJ.cjs");
8
- require("./SuperConverter-DR54GBE5.cjs");
8
+ require("./SuperConverter-CmfkG_P-.cjs");
9
9
  const vue = require("./vue-De9wkgLl.cjs");
10
10
  require("./jszip.min-BPh2MMAa.cjs");
11
11
  const superEditor_fileZipper = require("../super-editor/file-zipper.cjs");
@@ -7689,7 +7689,7 @@ const _sfc_main = {
7689
7689
  __name: "SuperDoc",
7690
7690
  emits: ["selection-update"],
7691
7691
  setup(__props, { emit: __emit }) {
7692
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-Bb2jmPCy.cjs")));
7692
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-D-1pvbsl.cjs")));
7693
7693
  const superdocStore = useSuperdocStore();
7694
7694
  const commentsStore = useCommentsStore();
7695
7695
  const {
@@ -8674,7 +8674,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
8674
8674
  this.config.colors = shuffleArray(this.config.colors);
8675
8675
  this.userColorMap = /* @__PURE__ */ new Map();
8676
8676
  this.colorIndex = 0;
8677
- this.version = "1.8.2-next.3";
8677
+ this.version = "1.8.2-next.4";
8678
8678
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8679
8679
  this.superdocId = config.superdocId || uuid.v4();
8680
8680
  this.colors = this.config.colors;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const jszip = require("./jszip-C8_CqJxM.cjs");
3
3
  const helpers$1 = require("./helpers-C7_u3NNJ.cjs");
4
- const superEditor_converter = require("./SuperConverter-DR54GBE5.cjs");
4
+ const superEditor_converter = require("./SuperConverter-CmfkG_P-.cjs");
5
5
  const vue = require("./vue-De9wkgLl.cjs");
6
6
  require("./jszip.min-BPh2MMAa.cjs");
7
7
  const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
@@ -15790,7 +15790,7 @@ const canUseDOM = () => {
15790
15790
  return false;
15791
15791
  }
15792
15792
  };
15793
- const summaryVersion = "1.8.2-next.3";
15793
+ const summaryVersion = "1.8.2-next.4";
15794
15794
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15795
15795
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15796
15796
  function mapAttributes(attrs) {
@@ -18513,7 +18513,7 @@ class Editor extends EventEmitter {
18513
18513
  * Process collaboration migrations
18514
18514
  */
18515
18515
  processCollaborationMigrations() {
18516
- console.debug("[checkVersionMigrations] Current editor version", "1.8.2-next.3");
18516
+ console.debug("[checkVersionMigrations] Current editor version", "1.8.2-next.4");
18517
18517
  if (!this.options.ydoc) return;
18518
18518
  const metaMap = this.options.ydoc.getMap("meta");
18519
18519
  let docVersion = metaMap.get("version");
@@ -24931,6 +24931,7 @@ const renderTableCell = (deps) => {
24931
24931
  context,
24932
24932
  applySdtDataset,
24933
24933
  tableSdt,
24934
+ tableIndent,
24934
24935
  fromLine,
24935
24936
  toLine
24936
24937
  } = deps;
@@ -25242,7 +25243,9 @@ const renderTableCell = (deps) => {
25242
25243
  }
25243
25244
  const objectWidth = anchoredMeasure.width;
25244
25245
  const objectHeight = anchoredMeasure.height;
25245
- const left2 = anchor.offsetH ?? 0;
25246
+ const baseLeft = anchor.offsetH ?? 0;
25247
+ const indentOffset = typeof tableIndent === "number" && Number.isFinite(tableIndent) ? tableIndent : 0;
25248
+ const left2 = anchor.hRelativeFrom === "column" ? baseLeft - x - indentOffset : baseLeft;
25246
25249
  const top2 = anchor.offsetV ?? 0;
25247
25250
  const behindDoc = anchor.behindDoc === true || anchoredBlock.wrap?.type === "None" && anchoredBlock.wrap?.behindDoc;
25248
25251
  const zIndex = anchoredBlock.kind === "drawing" && typeof anchoredBlock.zIndex === "number" ? anchoredBlock.zIndex : behindDoc ? -1 : 1;
@@ -25351,6 +25354,7 @@ const renderTableRow = (deps) => {
25351
25354
  tableBorders,
25352
25355
  columnWidths,
25353
25356
  allRowHeights,
25357
+ tableIndent,
25354
25358
  context,
25355
25359
  renderLine,
25356
25360
  renderDrawingContent,
@@ -25457,7 +25461,8 @@ const renderTableRow = (deps) => {
25457
25461
  applySdtDataset,
25458
25462
  tableSdt,
25459
25463
  fromLine,
25460
- toLine
25464
+ toLine,
25465
+ tableIndent
25461
25466
  });
25462
25467
  container.appendChild(cellElement);
25463
25468
  }
@@ -25503,6 +25508,8 @@ const renderTableFragment = (deps) => {
25503
25508
  const block = lookup.block;
25504
25509
  const measure = lookup.measure;
25505
25510
  const tableBorders = block.attrs?.borders;
25511
+ const tableIndentValue = block.attrs?.tableIndent?.width;
25512
+ const tableIndent = typeof tableIndentValue === "number" && Number.isFinite(tableIndentValue) ? tableIndentValue : 0;
25506
25513
  const container = doc2.createElement("div");
25507
25514
  container.classList.add(CLASS_NAMES$1.fragment);
25508
25515
  applyStyles2(container, fragmentStyles);
@@ -25602,6 +25609,7 @@ const renderTableFragment = (deps) => {
25602
25609
  tableBorders,
25603
25610
  columnWidths: measure.columnWidths,
25604
25611
  allRowHeights,
25612
+ tableIndent,
25605
25613
  context,
25606
25614
  renderLine,
25607
25615
  renderDrawingContent,
@@ -25633,6 +25641,7 @@ const renderTableFragment = (deps) => {
25633
25641
  tableBorders,
25634
25642
  columnWidths: measure.columnWidths,
25635
25643
  allRowHeights,
25644
+ tableIndent,
25636
25645
  context,
25637
25646
  renderLine,
25638
25647
  renderDrawingContent,
@@ -36781,6 +36790,9 @@ function tableNodeToBlock({
36781
36790
  } else if (hydratedTableStyle?.tableWidth) {
36782
36791
  tableAttrs.tableWidth = hydratedTableStyle.tableWidth;
36783
36792
  }
36793
+ if (node.attrs?.tableIndent && typeof node.attrs.tableIndent === "object") {
36794
+ tableAttrs.tableIndent = { ...node.attrs.tableIndent };
36795
+ }
36784
36796
  const tableLayout = node.attrs?.tableLayout;
36785
36797
  if (tableLayout) {
36786
36798
  tableAttrs.tableLayout = tableLayout;
@@ -1,6 +1,6 @@
1
1
  import { B as Buffer$2 } from "./jszip-B1fkPkPJ.es.js";
2
2
  import { t as twipsToInches, i as inchesToTwips, p as ptToTwips, l as linesToTwips, a as twipsToLines, b as pixelsToTwips, r as resolveOpcTargetPath, h as halfPointToPoints, c as twipsToPixels$2, d as convertSizeToCSS, e as inchesToPixels } from "./helpers-CraselFS.es.js";
3
- import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, F as Fragment, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName, O as TrackInsertMarkName, Q as TrackFormatMarkName, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as resolveParagraphProperties, a0 as resolveDocxFontFamily, a1 as _getReferencedTableStyles, a2 as decodeRPrFromMarks, a3 as calculateResolvedParagraphProperties, a4 as encodeCSSFromPPr, a5 as encodeCSSFromRPr, a6 as generateOrderedListIndex, a7 as docxNumberingHelpers, a8 as InputRule, a9 as insertNewRelationship, aa as kebabCase$1, ab as getUnderlineCssString } from "./SuperConverter-DMi2ouTd.es.js";
3
+ import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, F as Fragment, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName, O as TrackInsertMarkName, Q as TrackFormatMarkName, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as resolveParagraphProperties, a0 as resolveDocxFontFamily, a1 as _getReferencedTableStyles, a2 as decodeRPrFromMarks, a3 as calculateResolvedParagraphProperties, a4 as encodeCSSFromPPr, a5 as encodeCSSFromRPr, a6 as generateOrderedListIndex, a7 as docxNumberingHelpers, a8 as InputRule, a9 as insertNewRelationship, aa as kebabCase$1, ab as getUnderlineCssString } from "./SuperConverter-B7668oVY.es.js";
4
4
  import { p as process$1, r as ref, C as global$1, c as computed, E as createElementBlock, F as Fragment$1, S as renderList, O as withModifiers, G as openBlock, P as normalizeClass, M as createCommentVNode, H as toDisplayString, K as createBaseVNode, U as createApp, f as onMounted, X as onUnmounted, R as withDirectives, v as unref, Y as vModelText, y as nextTick, L as normalizeStyle, u as watch, Z as withKeys, _ as createTextVNode, I as createVNode, h as h$1, $ as readonly, s as getCurrentInstance, o as onBeforeUnmount, j as reactive, b as onBeforeMount, i as inject, a0 as onActivated, a1 as onDeactivated, a2 as Comment, d as defineComponent, a as provide, g as Teleport, t as toRef, a3 as renderSlot, a4 as isVNode, D as shallowRef, w as watchEffect, T as Transition, a5 as mergeProps, a6 as vShow, a7 as cloneVNode, a8 as Text$2, m as markRaw, N as createBlock, J as withCtx, a9 as useCssVars, V as resolveDynamicComponent, aa as normalizeProps, ab as guardReactiveProps } from "./vue-BnBKJwCW.es.js";
5
5
  import "./jszip.min-DCl8qkFO.es.js";
6
6
  import { E as EventEmitter$1 } from "./eventemitter3-CwrdEv8r.es.js";
@@ -15773,7 +15773,7 @@ const canUseDOM = () => {
15773
15773
  return false;
15774
15774
  }
15775
15775
  };
15776
- const summaryVersion = "1.8.2-next.3";
15776
+ const summaryVersion = "1.8.2-next.4";
15777
15777
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15778
15778
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15779
15779
  function mapAttributes(attrs) {
@@ -18496,7 +18496,7 @@ class Editor extends EventEmitter {
18496
18496
  * Process collaboration migrations
18497
18497
  */
18498
18498
  processCollaborationMigrations() {
18499
- console.debug("[checkVersionMigrations] Current editor version", "1.8.2-next.3");
18499
+ console.debug("[checkVersionMigrations] Current editor version", "1.8.2-next.4");
18500
18500
  if (!this.options.ydoc) return;
18501
18501
  const metaMap = this.options.ydoc.getMap("meta");
18502
18502
  let docVersion = metaMap.get("version");
@@ -24914,6 +24914,7 @@ const renderTableCell = (deps) => {
24914
24914
  context,
24915
24915
  applySdtDataset,
24916
24916
  tableSdt,
24917
+ tableIndent,
24917
24918
  fromLine,
24918
24919
  toLine
24919
24920
  } = deps;
@@ -25225,7 +25226,9 @@ const renderTableCell = (deps) => {
25225
25226
  }
25226
25227
  const objectWidth = anchoredMeasure.width;
25227
25228
  const objectHeight = anchoredMeasure.height;
25228
- const left2 = anchor.offsetH ?? 0;
25229
+ const baseLeft = anchor.offsetH ?? 0;
25230
+ const indentOffset = typeof tableIndent === "number" && Number.isFinite(tableIndent) ? tableIndent : 0;
25231
+ const left2 = anchor.hRelativeFrom === "column" ? baseLeft - x - indentOffset : baseLeft;
25229
25232
  const top2 = anchor.offsetV ?? 0;
25230
25233
  const behindDoc = anchor.behindDoc === true || anchoredBlock.wrap?.type === "None" && anchoredBlock.wrap?.behindDoc;
25231
25234
  const zIndex = anchoredBlock.kind === "drawing" && typeof anchoredBlock.zIndex === "number" ? anchoredBlock.zIndex : behindDoc ? -1 : 1;
@@ -25334,6 +25337,7 @@ const renderTableRow = (deps) => {
25334
25337
  tableBorders,
25335
25338
  columnWidths,
25336
25339
  allRowHeights,
25340
+ tableIndent,
25337
25341
  context,
25338
25342
  renderLine,
25339
25343
  renderDrawingContent,
@@ -25440,7 +25444,8 @@ const renderTableRow = (deps) => {
25440
25444
  applySdtDataset,
25441
25445
  tableSdt,
25442
25446
  fromLine,
25443
- toLine
25447
+ toLine,
25448
+ tableIndent
25444
25449
  });
25445
25450
  container.appendChild(cellElement);
25446
25451
  }
@@ -25486,6 +25491,8 @@ const renderTableFragment = (deps) => {
25486
25491
  const block = lookup.block;
25487
25492
  const measure = lookup.measure;
25488
25493
  const tableBorders = block.attrs?.borders;
25494
+ const tableIndentValue = block.attrs?.tableIndent?.width;
25495
+ const tableIndent = typeof tableIndentValue === "number" && Number.isFinite(tableIndentValue) ? tableIndentValue : 0;
25489
25496
  const container = doc2.createElement("div");
25490
25497
  container.classList.add(CLASS_NAMES$1.fragment);
25491
25498
  applyStyles2(container, fragmentStyles);
@@ -25585,6 +25592,7 @@ const renderTableFragment = (deps) => {
25585
25592
  tableBorders,
25586
25593
  columnWidths: measure.columnWidths,
25587
25594
  allRowHeights,
25595
+ tableIndent,
25588
25596
  context,
25589
25597
  renderLine,
25590
25598
  renderDrawingContent,
@@ -25616,6 +25624,7 @@ const renderTableFragment = (deps) => {
25616
25624
  tableBorders,
25617
25625
  columnWidths: measure.columnWidths,
25618
25626
  allRowHeights,
25627
+ tableIndent,
25619
25628
  context,
25620
25629
  renderLine,
25621
25630
  renderDrawingContent,
@@ -36764,6 +36773,9 @@ function tableNodeToBlock({
36764
36773
  } else if (hydratedTableStyle?.tableWidth) {
36765
36774
  tableAttrs.tableWidth = hydratedTableStyle.tableWidth;
36766
36775
  }
36776
+ if (node.attrs?.tableIndent && typeof node.attrs.tableIndent === "object") {
36777
+ tableAttrs.tableIndent = { ...node.attrs.tableIndent };
36778
+ }
36767
36779
  const tableLayout = node.attrs?.tableLayout;
36768
36780
  if (tableLayout) {
36769
36781
  tableAttrs.tableLayout = tableLayout;
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("../chunks/jszip-C8_CqJxM.cjs");
4
4
  require("../chunks/helpers-C7_u3NNJ.cjs");
5
- const superEditor_converter = require("../chunks/SuperConverter-DR54GBE5.cjs");
5
+ const superEditor_converter = require("../chunks/SuperConverter-CmfkG_P-.cjs");
6
6
  require("../chunks/uuid-R7L08bOx.cjs");
7
7
  exports.SuperConverter = superEditor_converter.SuperConverter;
@@ -1,6 +1,6 @@
1
1
  import "../chunks/jszip-B1fkPkPJ.es.js";
2
2
  import "../chunks/helpers-CraselFS.es.js";
3
- import { S } from "../chunks/SuperConverter-DMi2ouTd.es.js";
3
+ import { S } from "../chunks/SuperConverter-B7668oVY.es.js";
4
4
  import "../chunks/uuid-CjlX8hrF.es.js";
5
5
  export {
6
6
  S as SuperConverter
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-DxtNEV8s.cjs");
3
+ const index = require("./chunks/index-Cm1X7-Lz.cjs");
4
4
  const superEditor_docxZipper = require("./super-editor/docx-zipper.cjs");
5
5
  const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
6
6
  const vue = require("./chunks/vue-De9wkgLl.cjs");
7
- const superEditor_converter = require("./chunks/SuperConverter-DR54GBE5.cjs");
7
+ const superEditor_converter = require("./chunks/SuperConverter-CmfkG_P-.cjs");
8
8
  function isNodeType(node, name) {
9
9
  return node.type.name === name;
10
10
  }
@@ -1,9 +1,9 @@
1
- import { ax as Node, ay as Mark } from "./chunks/index-BE_axAgp.es.js";
2
- import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-BE_axAgp.es.js";
1
+ import { ax as Node, ay as Mark } from "./chunks/index-Cq-aFnBK.es.js";
2
+ import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-Cq-aFnBK.es.js";
3
3
  import { default as default2 } from "./super-editor/docx-zipper.es.js";
4
4
  import { createZip } from "./super-editor/file-zipper.es.js";
5
5
  import { d as defineComponent, E as createElementBlock, G as openBlock, K as createBaseVNode } from "./chunks/vue-BnBKJwCW.es.js";
6
- import { S, r } from "./chunks/SuperConverter-DMi2ouTd.es.js";
6
+ import { S, r } from "./chunks/SuperConverter-B7668oVY.es.js";
7
7
  function isNodeType(node, name) {
8
8
  return node.type.name === name;
9
9
  }
package/dist/superdoc.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-DxtNEV8s.cjs");
4
- const superdoc = require("./chunks/index-DFfL-kVP.cjs");
3
+ const index = require("./chunks/index-Cm1X7-Lz.cjs");
4
+ const superdoc = require("./chunks/index-BDt0SMPG.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
- const superEditor_converter = require("./chunks/SuperConverter-DR54GBE5.cjs");
6
+ const superEditor_converter = require("./chunks/SuperConverter-CmfkG_P-.cjs");
7
7
  require("./chunks/jszip-C8_CqJxM.cjs");
8
8
  require("./chunks/helpers-C7_u3NNJ.cjs");
9
9
  require("./chunks/jszip.min-BPh2MMAa.cjs");
@@ -1,7 +1,7 @@
1
- import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-BE_axAgp.es.js";
2
- import { D, H, P, S, c } from "./chunks/index-Dwj0MeWB.es.js";
1
+ import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-Cq-aFnBK.es.js";
2
+ import { D, H, P, S, c } from "./chunks/index-BCicU4sm.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
- import { S as S2, r } from "./chunks/SuperConverter-DMi2ouTd.es.js";
4
+ import { S as S2, r } from "./chunks/SuperConverter-B7668oVY.es.js";
5
5
  import "./chunks/jszip-B1fkPkPJ.es.js";
6
6
  import "./chunks/helpers-CraselFS.es.js";
7
7
  import "./chunks/jszip.min-DCl8qkFO.es.js";