@harbour-enterprises/superdoc 1.0.0-beta.56 → 1.0.0-beta.57

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 (27) hide show
  1. package/dist/chunks/{PdfViewer-DsYaXp0H.es.js → PdfViewer-BpJ5YJmq.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-CnvD--7P.cjs → PdfViewer-DvAhx37Y.cjs} +1 -1
  3. package/dist/chunks/{index-DF1aQt8V.es.js → index-BE9w4viZ.es.js} +3 -3
  4. package/dist/chunks/{index-BpBdSm3V.cjs → index-BbXDEDIW.cjs} +3 -3
  5. package/dist/chunks/{index-DYnUncjo-Br0s3gQs.es.js → index-D5IkZjf9-CPmfOXHq.es.js} +1 -1
  6. package/dist/chunks/{index-DYnUncjo-Uv8YzgRb.cjs → index-D5IkZjf9-XnnWMFi7.cjs} +1 -1
  7. package/dist/chunks/{super-editor.es-BxMwj135.es.js → super-editor.es-BY9i51n2.es.js} +92 -25
  8. package/dist/chunks/{super-editor.es-DkFw0sfq.cjs → super-editor.es-BjELk3Xl.cjs} +92 -25
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-DwC5XPQX.js → converter-Aoe_RSZD.js} +1 -1
  11. package/dist/super-editor/chunks/{docx-zipper-BkCzC50U.js → docx-zipper-Ct68kitw.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-CoKNeouN.js → editor-Dfqm3VkC.js} +93 -26
  13. package/dist/super-editor/chunks/{index-DYnUncjo.js → index-D5IkZjf9.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-DUWk-Bwi.js → toolbar-Dj_HCM6i.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.cjs +1 -1
  22. package/dist/super-editor.es.js +1 -1
  23. package/dist/superdoc.cjs +2 -2
  24. package/dist/superdoc.es.js +2 -2
  25. package/dist/superdoc.umd.js +94 -27
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -42449,7 +42449,7 @@ const _SuperConverter = class _SuperConverter {
42449
42449
  static getStoredSuperdocVersion(docx) {
42450
42450
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
42451
42451
  }
42452
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.56") {
42452
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.57") {
42453
42453
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
42454
42454
  }
42455
42455
  /**
@@ -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-DwC5XPQX.js";
1
+ import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-Aoe_RSZD.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, _dimmingOverlay, _EditorOverlayManager_instances, findDecorationContainer_fn, ensureEditorHost_fn, positionEditorHost_fn, hideDimmingOverlay_fn, showHeaderFooterBorder_fn, hideHeaderFooterBorder_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay2, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _dragHandlerCleanup, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _multiSectionIdentifier, _headerLayoutResults, _footerLayoutResults, _headerLayoutsByRId, _footerLayoutsByRId, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _overlayManager, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _lastSelectedImageBlockId, _dragAnchor, _isDragging, _dragExtensionMode, _remoteCursorState, _remoteCursorElements, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _scrollTimeout, _lastRemoteCursorRenderTime, _remoteCursorThrottleTimeout, _PresentationEditor_instances, collectCommentPositions_fn, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, updateLocalAwarenessCursor_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupDragHandlers_fn, focusEditorAfterImageSelection_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, calculateExtendedSelection_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handlePointerUp, _handleDragOver, _handleDrop, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, layoutPerRIdHeaderFooters_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, computeAnchorMap_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, _isEditable, _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 changeListLevel, O as findParentNode, Q as isList, U as updateNumberingProperties, V as ListHelpers, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName$1, $ as TrackInsertMarkName$1, a0 as v4, a1 as TrackFormatMarkName$1, 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 resolveRunProperties, at as encodeCSSFromPPr, au as twipsToPixels$2, 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-DwC5XPQX.js";
16
- import { D as DocxZipper } from "./docx-zipper-BkCzC50U.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 changeListLevel, O as findParentNode, Q as isList, U as updateNumberingProperties, V as ListHelpers, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName$1, $ as TrackInsertMarkName$1, a0 as v4, a1 as TrackFormatMarkName$1, 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 resolveRunProperties, at as encodeCSSFromPPr, au as twipsToPixels$2, 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-Aoe_RSZD.js";
16
+ import { D as DocxZipper } from "./docx-zipper-Ct68kitw.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() {
@@ -13918,7 +13918,7 @@ const isHeadless = (editor) => {
13918
13918
  const shouldSkipNodeView = (editor) => {
13919
13919
  return isHeadless(editor);
13920
13920
  };
13921
- const summaryVersion = "1.0.0-beta.56";
13921
+ const summaryVersion = "1.0.0-beta.57";
13922
13922
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
13923
13923
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
13924
13924
  function mapAttributes(attrs) {
@@ -14710,7 +14710,7 @@ const _Editor = class _Editor extends EventEmitter {
14710
14710
  { default: remarkStringify },
14711
14711
  { default: remarkGfm }
14712
14712
  ] = await Promise.all([
14713
- import("./index-DYnUncjo.js"),
14713
+ import("./index-D5IkZjf9.js"),
14714
14714
  import("./index-DRCvimau.js"),
14715
14715
  import("./index-C_x_N6Uh.js"),
14716
14716
  import("./index-D_sWOSiG.js"),
@@ -14915,7 +14915,7 @@ const _Editor = class _Editor extends EventEmitter {
14915
14915
  * Process collaboration migrations
14916
14916
  */
14917
14917
  processCollaborationMigrations() {
14918
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.56");
14918
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.57");
14919
14919
  if (!this.options.ydoc) return;
14920
14920
  const metaMap = this.options.ydoc.getMap("meta");
14921
14921
  let docVersion = metaMap.get("version");
@@ -17479,6 +17479,7 @@ const normalizeAlignment = (value) => {
17479
17479
  case "center":
17480
17480
  case "right":
17481
17481
  case "justify":
17482
+ case "left":
17482
17483
  return value;
17483
17484
  case "both":
17484
17485
  case "distribute":
@@ -27034,9 +27035,11 @@ const _DomPainter = class _DomPainter {
27034
27035
  const hasExplicitSegmentPositioning = line.segments?.some((seg) => seg.x !== void 0);
27035
27036
  const isFirstLine = index2 === 0 && !fragment.continuesFromPrev;
27036
27037
  if (!isListFirstLine) {
27037
- if (isFirstLine && hasExplicitSegmentPositioning && firstLineOffset !== 0) {
27038
- const adjustedPadding = paraIndentLeft + firstLineOffset;
27039
- lineEl.style.paddingLeft = `${adjustedPadding}px`;
27038
+ if (hasExplicitSegmentPositioning) {
27039
+ if (isFirstLine && firstLineOffset !== 0) {
27040
+ const adjustedPadding = paraIndentLeft + firstLineOffset;
27041
+ lineEl.style.paddingLeft = `${adjustedPadding}px`;
27042
+ }
27040
27043
  } else if (paraIndentLeft) {
27041
27044
  lineEl.style.paddingLeft = `${paraIndentLeft}px`;
27042
27045
  }
@@ -28467,6 +28470,13 @@ const _DomPainter = class _DomPainter {
28467
28470
  }
28468
28471
  }
28469
28472
  if (hasExplicitPositioning && line.segments) {
28473
+ const paraIndent = block.attrs?.indent;
28474
+ const indentLeft = paraIndent?.left ?? 0;
28475
+ const firstLine = paraIndent?.firstLine ?? 0;
28476
+ const hanging = paraIndent?.hanging ?? 0;
28477
+ const isFirstLineOfPara = lineIndex === 0 || lineIndex === void 0;
28478
+ const firstLineOffsetForCumX = isFirstLineOfPara ? firstLine - hanging : 0;
28479
+ const indentOffset = indentLeft + firstLineOffsetForCumX;
28470
28480
  let cumulativeX = 0;
28471
28481
  const segmentsByRun = /* @__PURE__ */ new Map();
28472
28482
  line.segments.forEach((segment) => {
@@ -28498,7 +28508,7 @@ const _DomPainter = class _DomPainter {
28498
28508
  const actualTabWidth = tabEndX - tabStartX;
28499
28509
  const tabEl = this.doc.createElement("span");
28500
28510
  tabEl.style.position = "absolute";
28501
- tabEl.style.left = `${tabStartX}px`;
28511
+ tabEl.style.left = `${tabStartX + indentOffset}px`;
28502
28512
  tabEl.style.top = "0px";
28503
28513
  tabEl.style.width = `${actualTabWidth}px`;
28504
28514
  tabEl.style.height = `${line.lineHeight}px`;
@@ -28529,12 +28539,13 @@ const _DomPainter = class _DomPainter {
28529
28539
  elem.setAttribute("styleid", styleId);
28530
28540
  }
28531
28541
  const runSegments2 = segmentsByRun.get(runIndex);
28532
- const segX = runSegments2 && runSegments2[0]?.x !== void 0 ? runSegments2[0].x : cumulativeX;
28542
+ const baseSegX = runSegments2 && runSegments2[0]?.x !== void 0 ? runSegments2[0].x : cumulativeX;
28543
+ const segX = baseSegX + indentOffset;
28533
28544
  const segWidth = (runSegments2 && runSegments2[0]?.width !== void 0 ? runSegments2[0].width : elem.offsetWidth) ?? 0;
28534
28545
  elem.style.position = "absolute";
28535
28546
  elem.style.left = `${segX}px`;
28536
28547
  el.appendChild(elem);
28537
- cumulativeX = segX + segWidth;
28548
+ cumulativeX = baseSegX + segWidth;
28538
28549
  }
28539
28550
  continue;
28540
28551
  }
@@ -28551,12 +28562,13 @@ const _DomPainter = class _DomPainter {
28551
28562
  elem.setAttribute("styleid", styleId);
28552
28563
  }
28553
28564
  const runSegments2 = segmentsByRun.get(runIndex);
28554
- const segX = runSegments2 && runSegments2[0]?.x !== void 0 ? runSegments2[0].x : cumulativeX;
28565
+ const baseSegX = runSegments2 && runSegments2[0]?.x !== void 0 ? runSegments2[0].x : cumulativeX;
28566
+ const segX = baseSegX + indentOffset;
28555
28567
  const segWidth = (runSegments2 && runSegments2[0]?.width !== void 0 ? runSegments2[0].width : 0) ?? 0;
28556
28568
  elem.style.position = "absolute";
28557
28569
  elem.style.left = `${segX}px`;
28558
28570
  el.appendChild(elem);
28559
- cumulativeX = segX + segWidth;
28571
+ cumulativeX = baseSegX + segWidth;
28560
28572
  }
28561
28573
  continue;
28562
28574
  }
@@ -28586,7 +28598,8 @@ const _DomPainter = class _DomPainter {
28586
28598
  if (styleId) {
28587
28599
  elem.setAttribute("styleid", styleId);
28588
28600
  }
28589
- const xPos = segment.x !== void 0 ? segment.x : cumulativeX;
28601
+ const baseX = segment.x !== void 0 ? segment.x : cumulativeX;
28602
+ const xPos = baseX + indentOffset;
28590
28603
  elem.style.position = "absolute";
28591
28604
  elem.style.left = `${xPos}px`;
28592
28605
  el.appendChild(elem);
@@ -28600,7 +28613,7 @@ const _DomPainter = class _DomPainter {
28600
28613
  width = measureEl.offsetWidth;
28601
28614
  this.doc.body.removeChild(measureEl);
28602
28615
  }
28603
- cumulativeX = xPos + width;
28616
+ cumulativeX = baseX + width;
28604
28617
  }
28605
28618
  });
28606
28619
  }
@@ -30990,6 +31003,32 @@ function layoutDrawingBlock({
30990
31003
  state.page.fragments.push(fragment);
30991
31004
  state.cursorY += requiredHeight;
30992
31005
  }
31006
+ function getTableIndentWidth(attrs) {
31007
+ if (!attrs) {
31008
+ return 0;
31009
+ }
31010
+ const tableIndent = attrs.tableIndent;
31011
+ if (!tableIndent || typeof tableIndent !== "object") {
31012
+ return 0;
31013
+ }
31014
+ const width = tableIndent.width;
31015
+ if (width === void 0 || width === null) {
31016
+ return 0;
31017
+ }
31018
+ if (typeof width !== "number") {
31019
+ return 0;
31020
+ }
31021
+ if (!Number.isFinite(width)) {
31022
+ return 0;
31023
+ }
31024
+ return width;
31025
+ }
31026
+ function applyTableIndent(x, width, indent) {
31027
+ return {
31028
+ x: x + indent,
31029
+ width: Math.max(0, width - indent)
31030
+ };
31031
+ }
30993
31032
  function calculateColumnMinWidth(columnIndex, measure) {
30994
31033
  const DEFAULT_MIN_WIDTH = 25;
30995
31034
  const measuredWidth = measure.columnWidths[columnIndex] || DEFAULT_MIN_WIDTH;
@@ -31204,14 +31243,18 @@ function layoutMonolithicTable(context) {
31204
31243
  columnBoundaries: generateColumnBoundaries(context.measure),
31205
31244
  coordinateSystem: "fragment"
31206
31245
  };
31246
+ const tableIndent = getTableIndentWidth(context.block.attrs);
31247
+ const baseX = context.columnX(state.columnIndex);
31248
+ const baseWidth = Math.min(context.columnWidth, context.measure.totalWidth || context.columnWidth);
31249
+ const { x, width } = applyTableIndent(baseX, baseWidth, tableIndent);
31207
31250
  const fragment = {
31208
31251
  kind: "table",
31209
31252
  blockId: context.block.id,
31210
31253
  fromRow: 0,
31211
31254
  toRow: context.block.rows.length,
31212
- x: context.columnX(state.columnIndex),
31255
+ x,
31213
31256
  y: state.cursorY,
31214
- width: Math.min(context.columnWidth, context.measure.totalWidth || context.columnWidth),
31257
+ width,
31215
31258
  height,
31216
31259
  metadata
31217
31260
  };
@@ -31278,14 +31321,18 @@ function layoutTableBlock({
31278
31321
  columnBoundaries: generateColumnBoundaries(measure),
31279
31322
  coordinateSystem: "fragment"
31280
31323
  };
31324
+ const tableIndent = getTableIndentWidth(block.attrs);
31325
+ const baseX = columnX(state.columnIndex);
31326
+ const baseWidth = Math.min(columnWidth, measure.totalWidth || columnWidth);
31327
+ const { x, width } = applyTableIndent(baseX, baseWidth, tableIndent);
31281
31328
  const fragment = {
31282
31329
  kind: "table",
31283
31330
  blockId: block.id,
31284
31331
  fromRow: 0,
31285
31332
  toRow: 0,
31286
- x: columnX(state.columnIndex),
31333
+ x,
31287
31334
  y: state.cursorY,
31288
- width: Math.min(columnWidth, measure.totalWidth || columnWidth),
31335
+ width,
31289
31336
  height,
31290
31337
  metadata
31291
31338
  };
@@ -31333,14 +31380,18 @@ function layoutTableBlock({
31333
31380
  });
31334
31381
  const fragmentHeight2 = continuationPartialRow.partialHeight + (repeatHeaderCount > 0 ? headerHeight : 0);
31335
31382
  if (fragmentHeight2 > 0 && madeProgress) {
31383
+ const tableIndent2 = getTableIndentWidth(block.attrs);
31384
+ const baseX2 = columnX(state.columnIndex);
31385
+ const baseWidth2 = Math.min(columnWidth, measure.totalWidth || columnWidth);
31386
+ const { x: x2, width: width2 } = applyTableIndent(baseX2, baseWidth2, tableIndent2);
31336
31387
  const fragment2 = {
31337
31388
  kind: "table",
31338
31389
  blockId: block.id,
31339
31390
  fromRow: rowIndex,
31340
31391
  toRow: rowIndex + 1,
31341
- x: columnX(state.columnIndex),
31392
+ x: x2,
31342
31393
  y: state.cursorY,
31343
- width: Math.min(columnWidth, measure.totalWidth || columnWidth),
31394
+ width: width2,
31344
31395
  height: fragmentHeight2,
31345
31396
  continuesFromPrev: true,
31346
31397
  continuesOnNext: hasRemainingLinesAfterContinuation || rowIndex + 1 < block.rows.length,
@@ -31373,14 +31424,18 @@ function layoutTableBlock({
31373
31424
  const forcedPartialRow = computePartialRow(bodyStartRow, block.rows[bodyStartRow], measure, availableForBody);
31374
31425
  const forcedEndRow = bodyStartRow + 1;
31375
31426
  const fragmentHeight2 = forcedPartialRow.partialHeight + (repeatHeaderCount > 0 ? headerHeight : 0);
31427
+ const tableIndent2 = getTableIndentWidth(block.attrs);
31428
+ const baseX2 = columnX(state.columnIndex);
31429
+ const baseWidth2 = Math.min(columnWidth, measure.totalWidth || columnWidth);
31430
+ const { x: x2, width: width2 } = applyTableIndent(baseX2, baseWidth2, tableIndent2);
31376
31431
  const fragment2 = {
31377
31432
  kind: "table",
31378
31433
  blockId: block.id,
31379
31434
  fromRow: bodyStartRow,
31380
31435
  toRow: forcedEndRow,
31381
- x: columnX(state.columnIndex),
31436
+ x: x2,
31382
31437
  y: state.cursorY,
31383
- width: Math.min(columnWidth, measure.totalWidth || columnWidth),
31438
+ width: width2,
31384
31439
  height: fragmentHeight2,
31385
31440
  continuesFromPrev: isTableContinuation,
31386
31441
  continuesOnNext: !forcedPartialRow.isLastPart || forcedEndRow < block.rows.length,
@@ -31404,14 +31459,18 @@ function layoutTableBlock({
31404
31459
  measure
31405
31460
  );
31406
31461
  }
31462
+ const tableIndent = getTableIndentWidth(block.attrs);
31463
+ const baseX = columnX(state.columnIndex);
31464
+ const baseWidth = Math.min(columnWidth, measure.totalWidth || columnWidth);
31465
+ const { x, width } = applyTableIndent(baseX, baseWidth, tableIndent);
31407
31466
  const fragment = {
31408
31467
  kind: "table",
31409
31468
  blockId: block.id,
31410
31469
  fromRow: bodyStartRow,
31411
31470
  toRow: endRow,
31412
- x: columnX(state.columnIndex),
31471
+ x,
31413
31472
  y: state.cursorY,
31414
- width: Math.min(columnWidth, measure.totalWidth || columnWidth),
31473
+ width,
31415
31474
  height: fragmentHeight,
31416
31475
  continuesFromPrev: isTableContinuation,
31417
31476
  continuesOnNext: endRow < block.rows.length || (partialRow ? !partialRow.isLastPart : false),
@@ -36199,7 +36258,15 @@ async function measureParagraphBlock(block, maxWidth) {
36199
36258
  currentLine.width = roundValue(currentLine.width + boundarySpacing + wordOnlyWidth);
36200
36259
  currentLine.maxFontInfo = updateMaxFontInfo(currentLine.maxFontSize, currentLine.maxFontInfo, run);
36201
36260
  currentLine.maxFontSize = Math.max(currentLine.maxFontSize, run.fontSize);
36202
- appendSegment(currentLine.segments, runIndex, wordStartChar, wordEndNoSpace, wordOnlyWidth, segmentStartX);
36261
+ const useExplicitXHere = wordIndex === 0 && segmentStartX !== void 0;
36262
+ appendSegment(
36263
+ currentLine.segments,
36264
+ runIndex,
36265
+ wordStartChar,
36266
+ wordEndNoSpace,
36267
+ wordOnlyWidth,
36268
+ useExplicitXHere ? segmentStartX : void 0
36269
+ );
36203
36270
  const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
36204
36271
  const completedLine = { ...currentLine, ...metrics };
36205
36272
  addBarTabsToLine(completedLine);
@@ -1,4 +1,4 @@
1
- import { aK as getDefaultExportFromCjs } from "./converter-DwC5XPQX.js";
1
+ import { aK as getDefaultExportFromCjs } from "./converter-Aoe_RSZD.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-DwC5XPQX.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CoKNeouN.js";
2
+ import { p as process$1 } from "./converter-Aoe_RSZD.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-Dfqm3VkC.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-DwC5XPQX.js";
1
+ import { ac } from "./chunks/converter-Aoe_RSZD.js";
2
2
  export {
3
3
  ac as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-DwC5XPQX.js";
2
- import { D } from "./chunks/docx-zipper-BkCzC50U.js";
1
+ import "./chunks/converter-Aoe_RSZD.js";
2
+ import { D } from "./chunks/docx-zipper-Ct68kitw.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-CoKNeouN.js";
2
- import "./chunks/converter-DwC5XPQX.js";
3
- import "./chunks/docx-zipper-BkCzC50U.js";
1
+ import { E } from "./chunks/editor-Dfqm3VkC.js";
2
+ import "./chunks/converter-Aoe_RSZD.js";
3
+ import "./chunks/docx-zipper-Ct68kitw.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-BkCzC50U.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-Ct68kitw.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -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 _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
12
- import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-DwC5XPQX.js";
13
- import { ac, i, a9, aQ } from "./chunks/converter-DwC5XPQX.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, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-CoKNeouN.js";
15
- import { z, F, B, T, w, C, x } from "./chunks/editor-CoKNeouN.js";
12
+ import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-Aoe_RSZD.js";
13
+ import { ac, i, a9, aQ } from "./chunks/converter-Aoe_RSZD.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, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-Dfqm3VkC.js";
15
+ import { z, F, B, T, w, C, x } from "./chunks/editor-Dfqm3VkC.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, defineComponent, reactive, onUnmounted, renderSlot, useCssVars, 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-DUWk-Bwi.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-Dj_HCM6i.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-BkCzC50U.js";
19
+ import { D } from "./chunks/docx-zipper-Ct68kitw.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-DUWk-Bwi.js";
3
- import "./chunks/editor-CoKNeouN.js";
2
+ import { T } from "./chunks/toolbar-Dj_HCM6i.js";
3
+ import "./chunks/editor-Dfqm3VkC.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-DkFw0sfq.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BjELk3Xl.cjs");
4
4
  require("./chunks/vue-jWLMl8Ts.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, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-BxMwj135.es.js";
1
+ import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-BY9i51n2.es.js";
2
2
  import "./chunks/vue-Dysv_7z5.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-DkFw0sfq.cjs");
4
- const superdoc = require("./chunks/index-BpBdSm3V.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BjELk3Xl.cjs");
4
+ const superdoc = require("./chunks/index-BbXDEDIW.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
7
7
  exports.Editor = superEditor_es.Editor;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-BxMwj135.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-DF1aQt8V.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-BY9i51n2.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-BE9w4viZ.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
4
  export {
5
5
  a as AnnotatorHelpers,