@harbour-enterprises/superdoc 0.24.0-next.4 → 0.24.0-next.5

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 (33) hide show
  1. package/dist/chunks/{PdfViewer-kOVuv-4I.cjs → PdfViewer-D6AmuQ3v.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-D7C8g2G4.es.js → PdfViewer-XhwjWR8o.es.js} +1 -1
  3. package/dist/chunks/{index-BFKwBQjS.cjs → index-DAdhqIN8.cjs} +66 -10
  4. package/dist/chunks/{index-CnEAVnHQ.es.js → index-OjiyjDUm.es.js} +66 -10
  5. package/dist/chunks/{super-editor.es-BmGTQ05x.cjs → super-editor.es-BPK2gF1W.cjs} +484 -132
  6. package/dist/chunks/{super-editor.es-CBPoWvjs.es.js → super-editor.es-bHlpz8m_.es.js} +484 -132
  7. package/dist/core/SuperDoc.d.ts.map +1 -1
  8. package/dist/core/helpers/export.d.ts +1 -1
  9. package/dist/core/helpers/export.d.ts.map +1 -1
  10. package/dist/core/types/index.d.ts.map +1 -1
  11. package/dist/style.css +10 -0
  12. package/dist/super-editor/ai-writer.es.js +2 -2
  13. package/dist/super-editor/chunks/{converter-DpPj67OW.js → converter-D-9mYZ83.js} +419 -192
  14. package/dist/super-editor/chunks/{docx-zipper-6Kc95yG-.js → docx-zipper-C1p3F7Ok.js} +1 -1
  15. package/dist/super-editor/chunks/{editor-Dx6AhT5N.js → editor-lJoa5ADp.js} +170 -43
  16. package/dist/super-editor/chunks/{toolbar-CXSg2lJ9.js → toolbar-B5-QnQ4l.js} +2 -2
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/style.css +10 -0
  22. package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts +1 -0
  23. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr/tr-helpers.d.ts +16 -0
  24. package/dist/super-editor/super-editor/src/extensions/table/TableView.d.ts +1 -1
  25. package/dist/super-editor/super-editor.es.js +7 -7
  26. package/dist/super-editor/toolbar.es.js +2 -2
  27. package/dist/super-editor.cjs +1 -1
  28. package/dist/super-editor.es.js +1 -1
  29. package/dist/superdoc.cjs +2 -2
  30. package/dist/superdoc.es.js +2 -2
  31. package/dist/superdoc.umd.js +548 -140
  32. package/dist/superdoc.umd.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { p as process$1, ax as commonjsGlobal, B as Buffer, ay as getDefaultExportFromCjs, az as getContentTypesFromXml, aA as xmljs } from "./converter-DpPj67OW.js";
1
+ import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-D-9mYZ83.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,9 +12,9 @@ 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, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFontsWithLocalFonts_fn, determineUnsupportedFontsWithCanvas_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
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 ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberigHelpers, ap as parseIndentElement, aq as combineIndents, ar as SelectionRange, as as Transform, at as isInTable$1, au as generateDocxRandomId, av as insertNewRelationship, aw as inchesToPixels } from "./converter-DpPj67OW.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 ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberigHelpers, ap as parseIndentElement, aq as combineIndents, ar as twipsToPixels, as as PIXELS_PER_INCH, at as SelectionRange, au as Transform, av as isInTable$1, aw as generateDocxRandomId, ax as insertNewRelationship, ay as inchesToPixels } from "./converter-D-9mYZ83.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-6Kc95yG-.js";
17
+ import { D as DocxZipper } from "./docx-zipper-C1p3F7Ok.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -21123,8 +21123,11 @@ const HardBreak = Node$1.create({
21123
21123
  }
21124
21124
  });
21125
21125
  const getColStyleDeclaration = (minWidth, width) => {
21126
- if (width) {
21127
- return ["width", `${Math.max(width, minWidth)}px`];
21126
+ if (width != null) {
21127
+ const numericWidth = Number(width);
21128
+ if (Number.isFinite(numericWidth) && numericWidth >= 0) {
21129
+ return ["width", `${numericWidth}px`];
21130
+ }
21128
21131
  }
21129
21132
  return ["min-width", `${minWidth}px`];
21130
21133
  };
@@ -21146,7 +21149,7 @@ const createTableView = ({ editor }) => {
21146
21149
  this.table = this.dom.appendChild(document.createElement("table"));
21147
21150
  this.colgroup = this.table.appendChild(document.createElement("colgroup"));
21148
21151
  updateTable(this.editor, this.node, this.table);
21149
- updateColumns(node, this.colgroup, this.table, cellMinWidth);
21152
+ updateColumns(node, this.colgroup, this.table, cellMinWidth, void 0, void 0, this.editor);
21150
21153
  this.contentDOM = this.table.appendChild(document.createElement("tbody"));
21151
21154
  setTimeout(() => {
21152
21155
  updateTableWrapper(this.dom, this.table);
@@ -21158,7 +21161,7 @@ const createTableView = ({ editor }) => {
21158
21161
  }
21159
21162
  this.node = node;
21160
21163
  updateTable(this.editor, node, this.table);
21161
- updateColumns(node, this.colgroup, this.table, this.cellMinWidth);
21164
+ updateColumns(node, this.colgroup, this.table, this.cellMinWidth, void 0, void 0, this.editor);
21162
21165
  updateTableWrapper(this.dom, this.table);
21163
21166
  return true;
21164
21167
  }
@@ -21171,46 +21174,105 @@ const createTableView = ({ editor }) => {
21171
21174
  }
21172
21175
  };
21173
21176
  };
21174
- function updateColumns(node, colgroup, table, cellMinWidth, overrideCol, overrideValue) {
21175
- let totalWidth = 0;
21176
- let fixedWidth = true;
21177
- let nextDOM = colgroup.firstChild;
21177
+ function updateColumns(node, colgroup, table, cellMinWidth, overrideCol, overrideValue, editor) {
21178
+ const gridColumns = Array.isArray(node.attrs?.grid) && node.attrs.grid.length ? node.attrs.grid.map((col) => twipsToPixels(col.col)) : null;
21179
+ const totalColumns = gridColumns?.length ?? null;
21180
+ const pageBody = table.closest(".page__body");
21181
+ const wrapper = table.parentElement;
21182
+ let availableWidth = pageBody?.getBoundingClientRect?.().width;
21183
+ if (!availableWidth && wrapper) {
21184
+ availableWidth = wrapper.getBoundingClientRect().width;
21185
+ }
21186
+ if (typeof availableWidth === "number" && !Number.isNaN(availableWidth)) {
21187
+ availableWidth = Math.max(availableWidth - 2, 0);
21188
+ } else {
21189
+ availableWidth = null;
21190
+ }
21191
+ const pageStyles = editor?.converter?.pageStyles;
21192
+ if (pageStyles?.pageSize?.width) {
21193
+ const toNumber = (v) => typeof v === "number" ? v : parseFloat(v) || 0;
21194
+ const pageWidth = toNumber(pageStyles.pageSize.width);
21195
+ const marginLeft = toNumber(pageStyles.pageMargins?.left);
21196
+ const marginRight = toNumber(pageStyles.pageMargins?.right);
21197
+ const pageAvailableWidthPx = Math.max((pageWidth - marginLeft - marginRight) * PIXELS_PER_INCH, 0);
21198
+ if (pageAvailableWidthPx > 0) {
21199
+ availableWidth = availableWidth ? Math.min(availableWidth, pageAvailableWidthPx) : pageAvailableWidthPx;
21200
+ }
21201
+ }
21202
+ const resolveColumnWidth = (colIndex2, colwidthValue) => {
21203
+ if (overrideCol === colIndex2) return overrideValue;
21204
+ if (colwidthValue != null) return colwidthValue;
21205
+ if (gridColumns && gridColumns[colIndex2] != null) return gridColumns[colIndex2];
21206
+ return null;
21207
+ };
21208
+ const widths = [];
21178
21209
  const row = node.firstChild;
21210
+ let colIndex = 0;
21179
21211
  if (row !== null) {
21180
- for (let i = 0, col = 0; i < row.childCount; i++) {
21181
- const { colspan, colwidth } = row.child(i).attrs;
21182
- for (let j = 0; j < colspan; j++, col++) {
21183
- const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j];
21184
- const cssWidth = hasWidth ? `${hasWidth}px` : "";
21185
- totalWidth += hasWidth || cellMinWidth;
21186
- if (!hasWidth) fixedWidth = false;
21187
- if (!nextDOM) {
21188
- const col2 = document.createElement("col");
21189
- const [propKey, propVal] = getColStyleDeclaration(cellMinWidth, hasWidth);
21190
- col2.style.setProperty(propKey, propVal);
21191
- colgroup.appendChild(col2);
21192
- } else {
21193
- if (nextDOM.style.width !== cssWidth) {
21194
- const [propKey, propVal] = getColStyleDeclaration(cellMinWidth, hasWidth);
21195
- nextDOM.style.setProperty(propKey, propVal);
21196
- }
21197
- nextDOM = nextDOM.nextSibling;
21198
- }
21212
+ for (let i = 0; i < row.childCount; i++) {
21213
+ const child = row.child(i);
21214
+ const { colspan, colwidth } = child.attrs;
21215
+ for (let span = 0; span < colspan; span += 1, colIndex += 1) {
21216
+ widths.push(resolveColumnWidth(colIndex, colwidth && colwidth[span]));
21199
21217
  }
21200
21218
  }
21201
21219
  }
21202
- while (nextDOM) {
21203
- const after = nextDOM.nextSibling;
21204
- nextDOM.parentNode?.removeChild(nextDOM);
21205
- nextDOM = after;
21220
+ if (totalColumns != null && colIndex < totalColumns) {
21221
+ for (let col = colIndex; col < totalColumns; col += 1) {
21222
+ widths.push(resolveColumnWidth(col));
21223
+ }
21206
21224
  }
21207
- if (fixedWidth) {
21208
- table.style.width = `${totalWidth}px`;
21225
+ const normalizedWidths = widths.map((widthPx) => {
21226
+ const numericWidth = Number(widthPx);
21227
+ if (!Number.isFinite(numericWidth)) return null;
21228
+ if (numericWidth < 0) return null;
21229
+ if (numericWidth === 0) return 0;
21230
+ if (numericWidth < 1) return 0;
21231
+ return numericWidth;
21232
+ });
21233
+ const rawTotalWidth = normalizedWidths.reduce((sum, width) => sum + (width != null ? width : cellMinWidth), 0);
21234
+ let scale = 1;
21235
+ if (availableWidth && rawTotalWidth > 0 && rawTotalWidth > availableWidth) {
21236
+ scale = availableWidth / rawTotalWidth;
21237
+ }
21238
+ let totalWidth = 0;
21239
+ let hasUndefinedWidth = false;
21240
+ let dom = colgroup.firstChild;
21241
+ normalizedWidths.forEach((width) => {
21242
+ let scaledWidth = width;
21243
+ if (scaledWidth != null) {
21244
+ scaledWidth = scaledWidth * scale;
21245
+ }
21246
+ const [propKey, propVal] = getColStyleDeclaration(cellMinWidth, scaledWidth);
21247
+ if (scaledWidth == null) {
21248
+ totalWidth += cellMinWidth;
21249
+ hasUndefinedWidth = true;
21250
+ } else {
21251
+ totalWidth += scaledWidth;
21252
+ }
21253
+ if (!dom) {
21254
+ const colElement = document.createElement("col");
21255
+ colElement.style.setProperty(propKey, propVal);
21256
+ colgroup.appendChild(colElement);
21257
+ } else {
21258
+ dom.style.setProperty(propKey, propVal);
21259
+ dom = dom.nextSibling;
21260
+ }
21261
+ });
21262
+ while (dom) {
21263
+ const next = dom.nextSibling;
21264
+ dom.parentNode?.removeChild(dom);
21265
+ dom = next;
21266
+ }
21267
+ if (scale < 1 || !hasUndefinedWidth) {
21268
+ const clampedWidth = Math.min(totalWidth, availableWidth || totalWidth);
21269
+ table.style.width = `${clampedWidth}px`;
21209
21270
  table.style.minWidth = "";
21210
21271
  } else {
21211
21272
  table.style.width = "";
21212
21273
  table.style.minWidth = `${totalWidth}px`;
21213
21274
  }
21275
+ table.style.maxWidth = "100%";
21214
21276
  }
21215
21277
  function updateTable(editor, node, table) {
21216
21278
  const allExtensionsAttrs = editor.extensionService.attributes;
@@ -21288,22 +21350,61 @@ const createTable = (schema, rowsCount, colsCount, withHeaderRow, cellContent =
21288
21350
  const tableBorders = createTableBorders();
21289
21351
  return types.table.createChecked({ borders: tableBorders }, rows);
21290
21352
  };
21353
+ const MIN_MEANINGFUL_WIDTH_PX = 1;
21291
21354
  const createColGroup = (node, cellMinWidth, overrideCol, overrideValue) => {
21292
21355
  let totalWidth = 0;
21293
21356
  let fixedWidth = true;
21294
21357
  const cols = [];
21295
21358
  const colsValues = [];
21296
21359
  const row = node.firstChild;
21360
+ const gridColumns = Array.isArray(node.attrs?.grid) && node.attrs.grid.length ? node.attrs.grid.map((col) => twipsToPixels(col.col)) : null;
21297
21361
  if (!row) return {};
21298
- for (let i = 0, col = 0; i < row.childCount; i++) {
21299
- const { colspan, colwidth } = row.child(i).attrs;
21300
- for (let j = 0; j < colspan; j++, col++) {
21301
- const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j];
21302
- totalWidth += hasWidth || cellMinWidth;
21303
- if (!hasWidth) fixedWidth = false;
21304
- const [prop, value] = getColStyleDeclaration(cellMinWidth, hasWidth);
21362
+ const totalColumns = gridColumns?.length;
21363
+ const resolveColumnWidth = (colIndex2, colwidthValue) => {
21364
+ if (overrideCol === colIndex2) return overrideValue;
21365
+ if (colwidthValue != null) return colwidthValue;
21366
+ if (gridColumns && gridColumns[colIndex2] != null) return gridColumns[colIndex2];
21367
+ return null;
21368
+ };
21369
+ let colIndex = 0;
21370
+ for (let i = 0; i < row.childCount; i++) {
21371
+ const child = row.child(i);
21372
+ const { colspan, colwidth } = child.attrs;
21373
+ for (let j = 0; j < colspan; j++, colIndex++) {
21374
+ const candidateWidth = resolveColumnWidth(colIndex, colwidth && colwidth[j]);
21375
+ const numericWidth = Number(candidateWidth);
21376
+ let effectiveWidth = Number.isFinite(numericWidth) && numericWidth > 0 ? numericWidth : null;
21377
+ if (effectiveWidth != null && effectiveWidth < MIN_MEANINGFUL_WIDTH_PX) {
21378
+ effectiveWidth = 0;
21379
+ }
21380
+ if (effectiveWidth == null) {
21381
+ totalWidth += cellMinWidth;
21382
+ fixedWidth = false;
21383
+ } else {
21384
+ totalWidth += effectiveWidth;
21385
+ }
21386
+ const [prop, value] = getColStyleDeclaration(cellMinWidth, effectiveWidth);
21387
+ cols.push(["col", { style: `${prop}: ${value}` }]);
21388
+ colsValues.push(parseFloat(value));
21389
+ }
21390
+ }
21391
+ if (totalColumns != null) {
21392
+ for (let col = colIndex; col < totalColumns; col++) {
21393
+ const candidateWidth = resolveColumnWidth(col);
21394
+ const numericWidth = Number(candidateWidth);
21395
+ let effectiveWidth = Number.isFinite(numericWidth) && numericWidth > 0 ? numericWidth : null;
21396
+ if (effectiveWidth != null && effectiveWidth < MIN_MEANINGFUL_WIDTH_PX) {
21397
+ effectiveWidth = 0;
21398
+ }
21399
+ if (effectiveWidth == null) {
21400
+ totalWidth += cellMinWidth;
21401
+ fixedWidth = false;
21402
+ } else {
21403
+ totalWidth += effectiveWidth;
21404
+ }
21405
+ const [prop, value] = getColStyleDeclaration(cellMinWidth, effectiveWidth);
21305
21406
  cols.push(["col", { style: `${prop}: ${value}` }]);
21306
- colsValues.push(parseInt(value, 10));
21407
+ colsValues.push(parseFloat(value));
21307
21408
  }
21308
21409
  }
21309
21410
  const tableWidth = fixedWidth ? `${totalWidth}px` : "";
@@ -24206,6 +24307,19 @@ const TableHeader = Node$1.create({
24206
24307
  "data-colwidth": attrs.colwidth.join(",")
24207
24308
  };
24208
24309
  }
24310
+ },
24311
+ __placeholder: {
24312
+ default: null,
24313
+ parseDOM: (element) => {
24314
+ const value = element.getAttribute("data-placeholder");
24315
+ return value || null;
24316
+ },
24317
+ renderDOM({ __placeholder }) {
24318
+ if (!__placeholder) return {};
24319
+ return {
24320
+ "data-placeholder": __placeholder
24321
+ };
24322
+ }
24209
24323
  }
24210
24324
  };
24211
24325
  },
@@ -24366,6 +24480,19 @@ const TableCell = Node$1.create({
24366
24480
  default: "px",
24367
24481
  rendered: false
24368
24482
  },
24483
+ __placeholder: {
24484
+ default: null,
24485
+ parseDOM: (element) => {
24486
+ const value = element.getAttribute("data-placeholder");
24487
+ return value || null;
24488
+ },
24489
+ renderDOM({ __placeholder }) {
24490
+ if (!__placeholder) return {};
24491
+ return {
24492
+ "data-placeholder": __placeholder
24493
+ };
24494
+ }
24495
+ },
24369
24496
  /**
24370
24497
  * @category Attribute
24371
24498
  * @param {TableCellProperties} tableCellProperties - Properties for the table cell.
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, 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-DpPj67OW.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-Dx6AhT5N.js";
2
+ import { p as process$1 } from "./converter-D-9mYZ83.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-lJoa5ADp.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 { a5 } from "./chunks/converter-DpPj67OW.js";
1
+ import { a5 } from "./chunks/converter-D-9mYZ83.js";
2
2
  import "vue";
3
3
  export {
4
4
  a5 as SuperConverter
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-DpPj67OW.js";
2
- import { D } from "./chunks/docx-zipper-6Kc95yG-.js";
1
+ import "./chunks/converter-D-9mYZ83.js";
2
+ import { D } from "./chunks/docx-zipper-C1p3F7Ok.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-Dx6AhT5N.js";
2
- import "./chunks/converter-DpPj67OW.js";
3
- import "./chunks/docx-zipper-6Kc95yG-.js";
1
+ import { E } from "./chunks/editor-lJoa5ADp.js";
2
+ import "./chunks/converter-D-9mYZ83.js";
3
+ import "./chunks/docx-zipper-C1p3F7Ok.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-6Kc95yG-.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-C1p3F7Ok.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -592,6 +592,16 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
592
592
  box-sizing: border-box;
593
593
  overflow-wrap: anywhere;
594
594
  }
595
+ .ProseMirror td[data-placeholder],
596
+ .ProseMirror th[data-placeholder] {
597
+ padding: 0 !important;
598
+ border: 0 !important;
599
+ background: transparent !important;
600
+ }
601
+ .ProseMirror td[data-placeholder] > *,
602
+ .ProseMirror th[data-placeholder] > * {
603
+ display: none !important;
604
+ }
595
605
  .ProseMirror th {
596
606
  font-weight: bold;
597
607
  text-align: left;
@@ -1,3 +1,4 @@
1
+ export const PIXELS_PER_INCH: 96;
1
2
  export function inchesToTwips(inches: any): number;
2
3
  export function twipsToInches(twips: any): number;
3
4
  export function twipsToPixels(twips: any): number;
@@ -0,0 +1,16 @@
1
+ export function createPlaceholderCell(gridWidth: number, reason: string): {
2
+ type: "tableCell";
3
+ attrs: any;
4
+ content: any[];
5
+ };
6
+ export function advancePastRowSpans(pendingRowSpans: number[], startIndex: number, totalColumns: number): number;
7
+ export function fillPlaceholderColumns({ content, pendingRowSpans, currentIndex, targetIndex, totalColumns, gridColumnWidths, reason, }: {
8
+ content: any[];
9
+ pendingRowSpans: number[];
10
+ currentIndex: number;
11
+ targetIndex: number;
12
+ totalColumns: number;
13
+ gridColumnWidths?: number[];
14
+ reason: string;
15
+ }): number;
16
+ export function isPlaceholderCell(cell: import("@translator").SCEncoderResult | undefined): boolean;
@@ -1,4 +1,4 @@
1
- export function updateColumns(node: any, colgroup: any, table: any, cellMinWidth: any, overrideCol: any, overrideValue: any): void;
1
+ export function updateColumns(node: any, colgroup: any, table: any, cellMinWidth: any, overrideCol: any, overrideValue: any, editor: any): void;
2
2
  export function createTableView({ editor }: {
3
3
  editor: any;
4
4
  }): {
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
12
- import { ay as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aB as vClickOutside, H as findParentNode, aC as getActiveFormatting, at as isInTable, aD as readFromClipboard, aE as handleClipboardPaste, aF as getFileObject, aG as runPropertyTranslators, aH as translator, aI as translator$1, aJ as translator$2, aK as translator$3, aL as translator$4, aM as translator$5, aN as translator$6, aO as translator$7, aP as translator$8, aQ as translator$9, aR as translator$a, aS as translator$b, aT as translator$c, aU as translator$d, aV as translator$e, aW as commentRangeEndTranslator, aX as commentRangeStartTranslator, aY as translator$f, aZ as translator$g, a_ as translator$h, a$ as translator$i, b0 as translator$j, b1 as translator$k, b2 as translator$l, b3 as translator$m, b4 as translator$n, b5 as translator$o, b6 as translator$p, b7 as translator$q, b8 as translator$r, b9 as translator$s, ba as translator$t, bb as translator$u, bc as translator$v, bd as translator$w, be as translator$x, bf as translator$y, bg as translator$z, bh as translator$A, bi as translator$B, bj as translator$C, bk as translator$D, bl as translator$E, bm as translator$F, bn as translator$G, bo as translator$H, bp as translator$I, bq as translator$J, br as translator$K, bs as translator$L, bt as translator$M, bu as translator$N, bv as translator$O, bw as translator$P, bx as translator$Q, by as translator$R, bz as translator$S, bA as translator$T, bB as translator$U, bC as translator$V, bD as translator$W, bE as translator$X, bF as translator$Y, bG as translator$Z, bH as translator$_, bI as translator$$, bJ as translator$10, bK as translator$11, bL as translator$12, bM as translator$13, bN as translator$14, bO as translator$15, bP as translator$16, bQ as translator$17, bR as translator$18, bS as translator$19, bT as translator$1a, bU as translator$1b, bV as translator$1c, bW as translator$1d, bX as translator$1e, bY as translator$1f, bZ as translator$1g, b_ as translator$1h, a as Plugin } from "./chunks/converter-DpPj67OW.js";
13
- import { b$, a5, i, a2 } from "./chunks/converter-DpPj67OW.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-Dx6AhT5N.js";
15
- import { n, C, o, T, l, p, m } from "./chunks/editor-Dx6AhT5N.js";
12
+ import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, H as findParentNode, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, a as Plugin } from "./chunks/converter-D-9mYZ83.js";
13
+ import { c1, a5, i, a2 } from "./chunks/converter-D-9mYZ83.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-lJoa5ADp.js";
15
+ import { n, C, o, T, l, p, m } from "./chunks/editor-lJoa5ADp.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-CXSg2lJ9.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-B5-QnQ4l.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-6Kc95yG-.js";
19
+ import { D } from "./chunks/docx-zipper-C1p3F7Ok.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -5131,7 +5131,7 @@ const Extensions = {
5131
5131
  export {
5132
5132
  AIWriter,
5133
5133
  n as AnnotatorHelpers,
5134
- b$ as BasicUpload,
5134
+ c1 as BasicUpload,
5135
5135
  C as CommentsPluginKey,
5136
5136
  D as DocxZipper,
5137
5137
  Editor,
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-CXSg2lJ9.js";
3
- import "./chunks/editor-Dx6AhT5N.js";
2
+ import { T } from "./chunks/toolbar-B5-QnQ4l.js";
3
+ import "./chunks/editor-lJoa5ADp.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-BmGTQ05x.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BPK2gF1W.cjs");
4
4
  require("./chunks/vue-DKMj1I9B.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-CBPoWvjs.es.js";
1
+ import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-bHlpz8m_.es.js";
2
2
  import "./chunks/vue-ZWZLQtoU.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-BmGTQ05x.cjs");
4
- const superdoc = require("./chunks/index-BFKwBQjS.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BPK2gF1W.cjs");
4
+ const superdoc = require("./chunks/index-DAdhqIN8.cjs");
5
5
  require("./chunks/vue-DKMj1I9B.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
7
7
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-CBPoWvjs.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-CnEAVnHQ.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-bHlpz8m_.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-OjiyjDUm.es.js";
3
3
  import "./chunks/vue-ZWZLQtoU.es.js";
4
4
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
5
5
  export {