superdoc 1.0.0-beta.61 → 1.0.0-beta.62
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.
- package/dist/chunks/{PdfViewer-CuTlpPQO.cjs → PdfViewer-Dm3bZ_1B.cjs} +1 -1
- package/dist/chunks/{PdfViewer-BHLsVrSe.es.js → PdfViewer-rmkhzY1H.es.js} +1 -1
- package/dist/chunks/{index-DeFp1DEO.es.js → index-5vPj3xiM.es.js} +3 -3
- package/dist/chunks/{index-E5x6cBKw.cjs → index-VQNmJYMh.cjs} +3 -3
- package/dist/chunks/{index-u8dj63PM-VgHx1nNP.cjs → index-XOsGE2PW-BL-ekicF.cjs} +1 -1
- package/dist/chunks/{index-u8dj63PM-Bfomc8Z6.es.js → index-XOsGE2PW-hNAnvmsK.es.js} +1 -1
- package/dist/chunks/{super-editor.es-CI3WoKIG.es.js → super-editor.es-BIEE4joF.es.js} +190 -62
- package/dist/chunks/{super-editor.es-nY9_xN6Z.cjs → super-editor.es-CxtR72x8.cjs} +190 -62
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DaSkPzA9.js → converter-Bo9KIIo_.js} +164 -46
- package/dist/super-editor/chunks/{docx-zipper-Cx1zgQ8B.js → docx-zipper-Cw0Rbwvk.js} +1 -1
- package/dist/super-editor/chunks/{editor-45pxcsTR.js → editor-v-i8Oo_X.js} +28 -18
- package/dist/super-editor/chunks/{index-u8dj63PM.js → index-XOsGE2PW.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-C4OC-AnI.js → toolbar-CiKH0Ttu.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +192 -64
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -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, computeExpectedSectionType_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-
|
|
16
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
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-Bo9KIIo_.js";
|
|
16
|
+
import { D as DocxZipper } from "./docx-zipper-Cw0Rbwvk.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() {
|
|
@@ -13923,7 +13923,7 @@ const isHeadless = (editor) => {
|
|
|
13923
13923
|
const shouldSkipNodeView = (editor) => {
|
|
13924
13924
|
return isHeadless(editor);
|
|
13925
13925
|
};
|
|
13926
|
-
const summaryVersion = "1.0.0-beta.
|
|
13926
|
+
const summaryVersion = "1.0.0-beta.62";
|
|
13927
13927
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
13928
13928
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
13929
13929
|
function mapAttributes(attrs) {
|
|
@@ -14715,7 +14715,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14715
14715
|
{ default: remarkStringify },
|
|
14716
14716
|
{ default: remarkGfm }
|
|
14717
14717
|
] = await Promise.all([
|
|
14718
|
-
import("./index-
|
|
14718
|
+
import("./index-XOsGE2PW.js"),
|
|
14719
14719
|
import("./index-DRCvimau.js"),
|
|
14720
14720
|
import("./index-C_x_N6Uh.js"),
|
|
14721
14721
|
import("./index-D_sWOSiG.js"),
|
|
@@ -14920,7 +14920,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14920
14920
|
* Process collaboration migrations
|
|
14921
14921
|
*/
|
|
14922
14922
|
processCollaborationMigrations() {
|
|
14923
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
14923
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.62");
|
|
14924
14924
|
if (!this.options.ydoc) return;
|
|
14925
14925
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
14926
14926
|
let docVersion = metaMap.get("version");
|
|
@@ -18981,12 +18981,6 @@ const Engines = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
18981
18981
|
resolveSpacingIndent: resolveSpacingIndent$1,
|
|
18982
18982
|
scaleWrapPolygon
|
|
18983
18983
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18984
|
-
const extractHeaderFooterSpace = (margins) => {
|
|
18985
|
-
return {
|
|
18986
|
-
headerSpace: margins?.header ?? 0,
|
|
18987
|
-
footerSpace: margins?.footer ?? 0
|
|
18988
|
-
};
|
|
18989
|
-
};
|
|
18990
18984
|
const hasParagraphStyleContext = (context) => {
|
|
18991
18985
|
return Boolean(context?.docx);
|
|
18992
18986
|
};
|
|
@@ -27238,6 +27232,7 @@ const _DomPainter = class _DomPainter {
|
|
|
27238
27232
|
container.style.height = `${data.height}px`;
|
|
27239
27233
|
container.style.top = `${Math.max(0, offset2)}px`;
|
|
27240
27234
|
container.style.zIndex = "1";
|
|
27235
|
+
container.style.overflow = "visible";
|
|
27241
27236
|
let footerYOffset = 0;
|
|
27242
27237
|
if (kind === "footer" && data.fragments.length > 0) {
|
|
27243
27238
|
const contentHeight = typeof data.contentHeight === "number" ? data.contentHeight : data.fragments.reduce((max2, f2) => {
|
|
@@ -36250,7 +36245,14 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
36250
36245
|
leftJustifiedMarkerSpace = markerBoxWidth + gutterWidth;
|
|
36251
36246
|
}
|
|
36252
36247
|
}
|
|
36253
|
-
|
|
36248
|
+
let initialAvailableWidth;
|
|
36249
|
+
const isFirstLineIndentMode = wordLayout?.firstLineIndentMode === true;
|
|
36250
|
+
const textStartPx = wordLayout?.textStartPx;
|
|
36251
|
+
if (isFirstLineIndentMode && typeof textStartPx === "number" && textStartPx > 0) {
|
|
36252
|
+
initialAvailableWidth = Math.max(1, maxWidth - textStartPx - indentRight);
|
|
36253
|
+
} else {
|
|
36254
|
+
initialAvailableWidth = Math.max(1, contentWidth - firstLineOffset - leftJustifiedMarkerSpace);
|
|
36255
|
+
}
|
|
36254
36256
|
const tabStops = buildTabStopsPx(
|
|
36255
36257
|
indent,
|
|
36256
36258
|
block.attrs?.tabs,
|
|
@@ -38273,7 +38275,9 @@ class HeaderFooterLayoutAdapter {
|
|
|
38273
38275
|
const batch = {};
|
|
38274
38276
|
let hasBlocks = false;
|
|
38275
38277
|
descriptors.forEach((descriptor) => {
|
|
38276
|
-
if (!descriptor.variant)
|
|
38278
|
+
if (!descriptor.variant) {
|
|
38279
|
+
return;
|
|
38280
|
+
}
|
|
38277
38281
|
const blocks = __privateMethod(this, _HeaderFooterLayoutAdapter_instances, getBlocks_fn).call(this, descriptor);
|
|
38278
38282
|
if (blocks && blocks.length > 0) {
|
|
38279
38283
|
batch[descriptor.variant] = blocks;
|
|
@@ -41993,14 +41997,20 @@ computeHeaderFooterConstraints_fn = function() {
|
|
|
41993
41997
|
const margins = __privateGet(this, _layoutOptions).margins ?? DEFAULT_MARGINS;
|
|
41994
41998
|
const marginLeft = margins.left ?? DEFAULT_MARGINS.left;
|
|
41995
41999
|
const marginRight = margins.right ?? DEFAULT_MARGINS.right;
|
|
41996
|
-
const
|
|
41997
|
-
if (!Number.isFinite(
|
|
42000
|
+
const bodyContentWidth = pageSize.w - (marginLeft + marginRight);
|
|
42001
|
+
if (!Number.isFinite(bodyContentWidth) || bodyContentWidth <= 0) {
|
|
41998
42002
|
return null;
|
|
41999
42003
|
}
|
|
42000
|
-
const
|
|
42001
|
-
const
|
|
42004
|
+
const measurementWidth = bodyContentWidth;
|
|
42005
|
+
const marginTop = margins.top ?? DEFAULT_MARGINS.top;
|
|
42006
|
+
const marginBottom = margins.bottom ?? DEFAULT_MARGINS.bottom;
|
|
42007
|
+
const headerMargin = margins.header ?? 0;
|
|
42008
|
+
const footerMargin = margins.footer ?? 0;
|
|
42009
|
+
const headerContentSpace = Math.max(marginTop - headerMargin, 0);
|
|
42010
|
+
const footerContentSpace = Math.max(marginBottom - footerMargin, 0);
|
|
42011
|
+
const height = Math.max(headerContentSpace, footerContentSpace, 1);
|
|
42002
42012
|
return {
|
|
42003
|
-
width,
|
|
42013
|
+
width: measurementWidth,
|
|
42004
42014
|
height,
|
|
42005
42015
|
// Pass actual page dimensions for page-relative anchor positioning in headers/footers
|
|
42006
42016
|
pageWidth: pageSize.w,
|
|
@@ -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-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { p as process$1 } from "./converter-Bo9KIIo_.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-v-i8Oo_X.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-v-i8Oo_X.js";
|
|
2
|
+
import "./chunks/converter-Bo9KIIo_.js";
|
|
3
|
+
import "./chunks/docx-zipper-Cw0Rbwvk.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -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-
|
|
13
|
-
import { ac, i, a9, aQ } from "./chunks/converter-
|
|
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 generateRulerDefinition, n as clampHandlePosition, o as calculateMarginFromHandle, p as measureCache, q as isHeadless, E as Editor, t as getStarterExtensions, P as PresentationEditor, v as Placeholder, w as getRichTextExtensions, D as DecorationSet, x as Decoration, M as Mark, z as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { F, I, G, T, B, H, C } from "./chunks/editor-
|
|
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-Bo9KIIo_.js";
|
|
13
|
+
import { ac, i, a9, aQ } from "./chunks/converter-Bo9KIIo_.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 generateRulerDefinition, n as clampHandlePosition, o as calculateMarginFromHandle, p as measureCache, q as isHeadless, E as Editor, t as getStarterExtensions, P as PresentationEditor, v as Placeholder, w as getRichTextExtensions, D as DecorationSet, x as Decoration, M as Mark, z as Extension, A as Attribute, N as Node } from "./chunks/editor-v-i8Oo_X.js";
|
|
15
|
+
import { F, I, G, T, B, H, C } from "./chunks/editor-v-i8Oo_X.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, Teleport, 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-
|
|
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-CiKH0Ttu.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-Cw0Rbwvk.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
package/dist/super-editor.cjs
CHANGED
|
@@ -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-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-CxtR72x8.cjs");
|
|
4
4
|
require("./chunks/vue-jWLMl8Ts.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -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-
|
|
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-BIEE4joF.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-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-CxtR72x8.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-VQNmJYMh.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;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-BIEE4joF.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-5vPj3xiM.es.js";
|
|
3
3
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
export {
|
|
5
5
|
a as AnnotatorHelpers,
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -42132,11 +42132,71 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42132
42132
|
return JSON.parse(xmljs.xml2json(newXml, null, 2));
|
|
42133
42133
|
}
|
|
42134
42134
|
/**
|
|
42135
|
-
*
|
|
42135
|
+
* Checks if an element name matches the expected local name, with or without namespace prefix.
|
|
42136
|
+
* This helper supports custom namespace prefixes in DOCX files (e.g., 'op:Properties', 'custom:property').
|
|
42137
|
+
*
|
|
42138
|
+
* @private
|
|
42139
|
+
* @static
|
|
42140
|
+
* @param {string|undefined|null} elementName - The element name to check (may include namespace prefix)
|
|
42141
|
+
* @param {string} expectedLocalName - The expected local name without prefix
|
|
42142
|
+
* @returns {boolean} True if the element name matches (with or without prefix)
|
|
42143
|
+
*
|
|
42144
|
+
* @example
|
|
42145
|
+
* // Exact match without prefix
|
|
42146
|
+
* _matchesElementName('Properties', 'Properties') // => true
|
|
42147
|
+
*
|
|
42148
|
+
* @example
|
|
42149
|
+
* // Match with namespace prefix
|
|
42150
|
+
* _matchesElementName('op:Properties', 'Properties') // => true
|
|
42151
|
+
* _matchesElementName('custom:property', 'property') // => true
|
|
42152
|
+
*
|
|
42153
|
+
* @example
|
|
42154
|
+
* // No match
|
|
42155
|
+
* _matchesElementName('SomeOtherElement', 'Properties') // => false
|
|
42156
|
+
* _matchesElementName(':Properties', 'Properties') // => false (empty prefix)
|
|
42157
|
+
*/
|
|
42158
|
+
static _matchesElementName(elementName, expectedLocalName) {
|
|
42159
|
+
if (!elementName || typeof elementName !== "string") return false;
|
|
42160
|
+
if (!expectedLocalName) return false;
|
|
42161
|
+
if (elementName === expectedLocalName) return true;
|
|
42162
|
+
if (elementName.endsWith(`:${expectedLocalName}`)) {
|
|
42163
|
+
const prefix2 = elementName.slice(0, -(expectedLocalName.length + 1));
|
|
42164
|
+
return prefix2.length > 0;
|
|
42165
|
+
}
|
|
42166
|
+
return false;
|
|
42167
|
+
}
|
|
42168
|
+
/**
|
|
42169
|
+
* Generic method to get a stored custom property from docx.
|
|
42170
|
+
* Supports both standard and custom namespace prefixes (e.g., 'op:Properties', 'custom:property').
|
|
42171
|
+
*
|
|
42136
42172
|
* @static
|
|
42137
42173
|
* @param {Array} docx - Array of docx file objects
|
|
42138
42174
|
* @param {string} propertyName - Name of the property to retrieve
|
|
42139
42175
|
* @returns {string|null} The property value or null if not found
|
|
42176
|
+
*
|
|
42177
|
+
* Returns null in the following cases:
|
|
42178
|
+
* - docx array is empty or doesn't contain 'docProps/custom.xml'
|
|
42179
|
+
* - custom.xml cannot be parsed
|
|
42180
|
+
* - Properties element is not found (with or without namespace prefix)
|
|
42181
|
+
* - Property with the specified name is not found
|
|
42182
|
+
* - Property has malformed structure (missing nested elements or text)
|
|
42183
|
+
* - Any error occurs during parsing or retrieval
|
|
42184
|
+
*
|
|
42185
|
+
* @example
|
|
42186
|
+
* // Standard property without namespace prefix
|
|
42187
|
+
* const version = SuperConverter.getStoredCustomProperty(docx, 'SuperdocVersion');
|
|
42188
|
+
* // => '1.2.3'
|
|
42189
|
+
*
|
|
42190
|
+
* @example
|
|
42191
|
+
* // Property with namespace prefix (e.g., from Office 365)
|
|
42192
|
+
* const guid = SuperConverter.getStoredCustomProperty(docx, 'DocumentGuid');
|
|
42193
|
+
* // Works with both 'Properties' and 'op:Properties' elements
|
|
42194
|
+
* // => 'abc-123-def-456'
|
|
42195
|
+
*
|
|
42196
|
+
* @example
|
|
42197
|
+
* // Non-existent property
|
|
42198
|
+
* const missing = SuperConverter.getStoredCustomProperty(docx, 'NonExistent');
|
|
42199
|
+
* // => null
|
|
42140
42200
|
*/
|
|
42141
42201
|
static getStoredCustomProperty(docx, propertyName) {
|
|
42142
42202
|
try {
|
|
@@ -42145,10 +42205,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42145
42205
|
const converter = new _SuperConverter2();
|
|
42146
42206
|
const content2 = customXml.content;
|
|
42147
42207
|
const contentJson = converter.parseXmlToJson(content2);
|
|
42148
|
-
const properties = contentJson
|
|
42208
|
+
const properties = contentJson?.elements?.find((el) => _SuperConverter2._matchesElementName(el.name, "Properties"));
|
|
42149
42209
|
if (!properties?.elements) return null;
|
|
42150
|
-
const property2 = properties.elements.find(
|
|
42210
|
+
const property2 = properties.elements.find(
|
|
42211
|
+
(el) => _SuperConverter2._matchesElementName(el.name, "property") && el.attributes?.name === propertyName
|
|
42212
|
+
);
|
|
42151
42213
|
if (!property2) return null;
|
|
42214
|
+
if (!property2.elements?.[0]?.elements?.[0]?.text) {
|
|
42215
|
+
console.warn(`Malformed property structure for "${propertyName}"`);
|
|
42216
|
+
return null;
|
|
42217
|
+
}
|
|
42152
42218
|
return property2.elements[0].elements[0].text;
|
|
42153
42219
|
} catch (e) {
|
|
42154
42220
|
console.warn(`Error getting custom property ${propertyName}:`, e);
|
|
@@ -42156,60 +42222,112 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42156
42222
|
}
|
|
42157
42223
|
}
|
|
42158
42224
|
/**
|
|
42159
|
-
* Generic method to set a stored custom property in docx
|
|
42225
|
+
* Generic method to set a stored custom property in docx.
|
|
42226
|
+
* Supports both standard and custom namespace prefixes (e.g., 'op:Properties', 'custom:property').
|
|
42227
|
+
*
|
|
42160
42228
|
* @static
|
|
42161
|
-
* @param {Object} docx - The docx object to store the property in
|
|
42229
|
+
* @param {Object} docx - The docx object to store the property in (converted XML structure)
|
|
42162
42230
|
* @param {string} propertyName - Name of the property
|
|
42163
42231
|
* @param {string|Function} value - Value or function that returns the value
|
|
42164
42232
|
* @param {boolean} preserveExisting - If true, won't overwrite existing values
|
|
42165
|
-
* @returns {string} The stored value
|
|
42233
|
+
* @returns {string|null} The stored value, or null if Properties element is not found
|
|
42234
|
+
*
|
|
42235
|
+
* @throws {Error} If an error occurs during property setting (logged as warning)
|
|
42236
|
+
*
|
|
42237
|
+
* @example
|
|
42238
|
+
* // Set a new property
|
|
42239
|
+
* const value = SuperConverter.setStoredCustomProperty(docx, 'MyProperty', 'MyValue');
|
|
42240
|
+
* // => 'MyValue'
|
|
42241
|
+
*
|
|
42242
|
+
* @example
|
|
42243
|
+
* // Set a property with a function
|
|
42244
|
+
* const guid = SuperConverter.setStoredCustomProperty(docx, 'DocumentGuid', () => uuidv4());
|
|
42245
|
+
* // => 'abc-123-def-456'
|
|
42246
|
+
*
|
|
42247
|
+
* @example
|
|
42248
|
+
* // Preserve existing value
|
|
42249
|
+
* SuperConverter.setStoredCustomProperty(docx, 'MyProperty', 'NewValue', true);
|
|
42250
|
+
* // => 'MyValue' (original value preserved)
|
|
42251
|
+
*
|
|
42252
|
+
* @example
|
|
42253
|
+
* // Works with namespace prefixes
|
|
42254
|
+
* // If docx has 'op:Properties' and 'op:property' elements, this will handle them correctly
|
|
42255
|
+
* const version = SuperConverter.setStoredCustomProperty(docx, 'Version', '2.0.0');
|
|
42256
|
+
* // => '2.0.0'
|
|
42166
42257
|
*/
|
|
42167
42258
|
static setStoredCustomProperty(docx, propertyName, value, preserveExisting = false) {
|
|
42168
|
-
|
|
42169
|
-
|
|
42170
|
-
|
|
42171
|
-
|
|
42172
|
-
|
|
42173
|
-
|
|
42174
|
-
|
|
42175
|
-
|
|
42176
|
-
|
|
42177
|
-
|
|
42178
|
-
|
|
42179
|
-
|
|
42180
|
-
|
|
42181
|
-
|
|
42182
|
-
|
|
42183
|
-
|
|
42184
|
-
|
|
42185
|
-
|
|
42186
|
-
|
|
42187
|
-
|
|
42188
|
-
|
|
42189
|
-
|
|
42190
|
-
|
|
42191
|
-
|
|
42192
|
-
|
|
42193
|
-
name:
|
|
42194
|
-
|
|
42195
|
-
|
|
42196
|
-
|
|
42197
|
-
|
|
42198
|
-
|
|
42199
|
-
|
|
42200
|
-
|
|
42201
|
-
|
|
42202
|
-
|
|
42203
|
-
|
|
42204
|
-
|
|
42205
|
-
|
|
42259
|
+
try {
|
|
42260
|
+
const customLocation = "docProps/custom.xml";
|
|
42261
|
+
if (!docx[customLocation]) docx[customLocation] = generateCustomXml();
|
|
42262
|
+
const customXml = docx[customLocation];
|
|
42263
|
+
const properties = customXml.elements?.find((el) => _SuperConverter2._matchesElementName(el.name, "Properties"));
|
|
42264
|
+
if (!properties) return null;
|
|
42265
|
+
if (!properties.elements) properties.elements = [];
|
|
42266
|
+
let property2 = properties.elements.find(
|
|
42267
|
+
(el) => _SuperConverter2._matchesElementName(el.name, "property") && el.attributes?.name === propertyName
|
|
42268
|
+
);
|
|
42269
|
+
if (property2 && preserveExisting) {
|
|
42270
|
+
if (!property2.elements?.[0]?.elements?.[0]?.text) {
|
|
42271
|
+
console.warn(`Malformed existing property structure for "${propertyName}"`);
|
|
42272
|
+
return null;
|
|
42273
|
+
}
|
|
42274
|
+
return property2.elements[0].elements[0].text;
|
|
42275
|
+
}
|
|
42276
|
+
const finalValue = typeof value === "function" ? value() : value;
|
|
42277
|
+
if (!property2) {
|
|
42278
|
+
const existingPids = properties.elements.filter((el) => el.attributes?.pid).map((el) => parseInt(el.attributes.pid, 10)).filter(Number.isInteger);
|
|
42279
|
+
const pid = existingPids.length > 0 ? Math.max(...existingPids) + 1 : 2;
|
|
42280
|
+
property2 = {
|
|
42281
|
+
type: "element",
|
|
42282
|
+
name: "property",
|
|
42283
|
+
attributes: {
|
|
42284
|
+
name: propertyName,
|
|
42285
|
+
fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",
|
|
42286
|
+
pid
|
|
42287
|
+
},
|
|
42288
|
+
elements: [
|
|
42289
|
+
{
|
|
42290
|
+
type: "element",
|
|
42291
|
+
name: "vt:lpwstr",
|
|
42292
|
+
elements: [
|
|
42293
|
+
{
|
|
42294
|
+
type: "text",
|
|
42295
|
+
text: finalValue
|
|
42296
|
+
}
|
|
42297
|
+
]
|
|
42298
|
+
}
|
|
42299
|
+
]
|
|
42300
|
+
};
|
|
42301
|
+
properties.elements.push(property2);
|
|
42302
|
+
} else {
|
|
42303
|
+
if (!property2.elements?.[0]?.elements?.[0]) {
|
|
42304
|
+
console.warn(`Malformed property structure for "${propertyName}", recreating structure`);
|
|
42305
|
+
property2.elements = [
|
|
42306
|
+
{
|
|
42307
|
+
type: "element",
|
|
42308
|
+
name: "vt:lpwstr",
|
|
42309
|
+
elements: [
|
|
42310
|
+
{
|
|
42311
|
+
type: "text",
|
|
42312
|
+
text: finalValue
|
|
42313
|
+
}
|
|
42314
|
+
]
|
|
42315
|
+
}
|
|
42316
|
+
];
|
|
42317
|
+
} else {
|
|
42318
|
+
property2.elements[0].elements[0].text = finalValue;
|
|
42319
|
+
}
|
|
42320
|
+
}
|
|
42321
|
+
return finalValue;
|
|
42322
|
+
} catch (e) {
|
|
42323
|
+
console.warn(`Error setting custom property ${propertyName}:`, e);
|
|
42324
|
+
return null;
|
|
42206
42325
|
}
|
|
42207
|
-
return finalValue;
|
|
42208
42326
|
}
|
|
42209
42327
|
static getStoredSuperdocVersion(docx) {
|
|
42210
42328
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42211
42329
|
}
|
|
42212
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42330
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.62") {
|
|
42213
42331
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42214
42332
|
}
|
|
42215
42333
|
/**
|
|
@@ -67255,7 +67373,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67255
67373
|
const shouldSkipNodeView = (editor) => {
|
|
67256
67374
|
return isHeadless(editor);
|
|
67257
67375
|
};
|
|
67258
|
-
const summaryVersion = "1.0.0-beta.
|
|
67376
|
+
const summaryVersion = "1.0.0-beta.62";
|
|
67259
67377
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
67260
67378
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
67261
67379
|
function mapAttributes(attrs) {
|
|
@@ -68044,7 +68162,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68044
68162
|
{ default: remarkStringify2 },
|
|
68045
68163
|
{ default: remarkGfm2 }
|
|
68046
68164
|
] = await Promise.all([
|
|
68047
|
-
Promise.resolve().then(() =>
|
|
68165
|
+
Promise.resolve().then(() => indexXOsGE2PW),
|
|
68048
68166
|
Promise.resolve().then(() => indexDRCvimau),
|
|
68049
68167
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
68050
68168
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -68249,7 +68367,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68249
68367
|
* Process collaboration migrations
|
|
68250
68368
|
*/
|
|
68251
68369
|
processCollaborationMigrations() {
|
|
68252
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
68370
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.62");
|
|
68253
68371
|
if (!this.options.ydoc) return;
|
|
68254
68372
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
68255
68373
|
let docVersion = metaMap.get("version");
|
|
@@ -72222,12 +72340,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72222
72340
|
resolveSpacingIndent: resolveSpacingIndent$1,
|
|
72223
72341
|
scaleWrapPolygon
|
|
72224
72342
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
72225
|
-
const extractHeaderFooterSpace = (margins) => {
|
|
72226
|
-
return {
|
|
72227
|
-
headerSpace: margins?.header ?? 0,
|
|
72228
|
-
footerSpace: margins?.footer ?? 0
|
|
72229
|
-
};
|
|
72230
|
-
};
|
|
72231
72343
|
const hasParagraphStyleContext = (context) => {
|
|
72232
72344
|
return Boolean(context?.docx);
|
|
72233
72345
|
};
|
|
@@ -80479,6 +80591,7 @@ ${l}
|
|
|
80479
80591
|
container.style.height = `${data.height}px`;
|
|
80480
80592
|
container.style.top = `${Math.max(0, offset2)}px`;
|
|
80481
80593
|
container.style.zIndex = "1";
|
|
80594
|
+
container.style.overflow = "visible";
|
|
80482
80595
|
let footerYOffset = 0;
|
|
80483
80596
|
if (kind === "footer" && data.fragments.length > 0) {
|
|
80484
80597
|
const contentHeight = typeof data.contentHeight === "number" ? data.contentHeight : data.fragments.reduce((max2, f2) => {
|
|
@@ -89491,7 +89604,14 @@ ${l}
|
|
|
89491
89604
|
leftJustifiedMarkerSpace = markerBoxWidth + gutterWidth;
|
|
89492
89605
|
}
|
|
89493
89606
|
}
|
|
89494
|
-
|
|
89607
|
+
let initialAvailableWidth;
|
|
89608
|
+
const isFirstLineIndentMode = wordLayout?.firstLineIndentMode === true;
|
|
89609
|
+
const textStartPx = wordLayout?.textStartPx;
|
|
89610
|
+
if (isFirstLineIndentMode && typeof textStartPx === "number" && textStartPx > 0) {
|
|
89611
|
+
initialAvailableWidth = Math.max(1, maxWidth - textStartPx - indentRight);
|
|
89612
|
+
} else {
|
|
89613
|
+
initialAvailableWidth = Math.max(1, contentWidth - firstLineOffset - leftJustifiedMarkerSpace);
|
|
89614
|
+
}
|
|
89495
89615
|
const tabStops = buildTabStopsPx(
|
|
89496
89616
|
indent2,
|
|
89497
89617
|
block.attrs?.tabs,
|
|
@@ -91467,7 +91587,9 @@ ${l}
|
|
|
91467
91587
|
const batch2 = {};
|
|
91468
91588
|
let hasBlocks = false;
|
|
91469
91589
|
descriptors.forEach((descriptor) => {
|
|
91470
|
-
if (!descriptor.variant)
|
|
91590
|
+
if (!descriptor.variant) {
|
|
91591
|
+
return;
|
|
91592
|
+
}
|
|
91471
91593
|
const blocks2 = __privateMethod$1(this, _HeaderFooterLayoutAdapter_instances, getBlocks_fn).call(this, descriptor);
|
|
91472
91594
|
if (blocks2 && blocks2.length > 0) {
|
|
91473
91595
|
batch2[descriptor.variant] = blocks2;
|
|
@@ -94734,14 +94856,20 @@ ${l}
|
|
|
94734
94856
|
const margins = __privateGet$1(this, _layoutOptions).margins ?? DEFAULT_MARGINS;
|
|
94735
94857
|
const marginLeft = margins.left ?? DEFAULT_MARGINS.left;
|
|
94736
94858
|
const marginRight = margins.right ?? DEFAULT_MARGINS.right;
|
|
94737
|
-
const
|
|
94738
|
-
if (!Number.isFinite(
|
|
94859
|
+
const bodyContentWidth = pageSize.w - (marginLeft + marginRight);
|
|
94860
|
+
if (!Number.isFinite(bodyContentWidth) || bodyContentWidth <= 0) {
|
|
94739
94861
|
return null;
|
|
94740
94862
|
}
|
|
94741
|
-
const
|
|
94742
|
-
const
|
|
94863
|
+
const measurementWidth = bodyContentWidth;
|
|
94864
|
+
const marginTop = margins.top ?? DEFAULT_MARGINS.top;
|
|
94865
|
+
const marginBottom = margins.bottom ?? DEFAULT_MARGINS.bottom;
|
|
94866
|
+
const headerMargin = margins.header ?? 0;
|
|
94867
|
+
const footerMargin = margins.footer ?? 0;
|
|
94868
|
+
const headerContentSpace = Math.max(marginTop - headerMargin, 0);
|
|
94869
|
+
const footerContentSpace = Math.max(marginBottom - footerMargin, 0);
|
|
94870
|
+
const height = Math.max(headerContentSpace, footerContentSpace, 1);
|
|
94743
94871
|
return {
|
|
94744
|
-
width,
|
|
94872
|
+
width: measurementWidth,
|
|
94745
94873
|
height,
|
|
94746
94874
|
// Pass actual page dimensions for page-relative anchor positioning in headers/footers
|
|
94747
94875
|
pageWidth: pageSize.w,
|
|
@@ -149717,7 +149845,7 @@ ${style2}
|
|
|
149717
149845
|
this.config.colors = shuffleArray(this.config.colors);
|
|
149718
149846
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
149719
149847
|
this.colorIndex = 0;
|
|
149720
|
-
this.version = "1.0.0-beta.
|
|
149848
|
+
this.version = "1.0.0-beta.62";
|
|
149721
149849
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
149722
149850
|
this.superdocId = config2.superdocId || v4();
|
|
149723
149851
|
this.colors = this.config.colors;
|
|
@@ -152189,7 +152317,7 @@ ${style2}
|
|
|
152189
152317
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
152190
152318
|
);
|
|
152191
152319
|
}
|
|
152192
|
-
const
|
|
152320
|
+
const indexXOsGE2PW = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
152193
152321
|
__proto__: null,
|
|
152194
152322
|
unified
|
|
152195
152323
|
}, Symbol.toStringTag, { value: "Module" }));
|