@harbour-enterprises/superdoc 1.0.0-beta.8 → 1.0.0-beta.9
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-BfEwF25T.es.js → PdfViewer-CuFLNmIu.es.js} +1 -1
- package/dist/chunks/{PdfViewer-DJ7BWUbW.cjs → PdfViewer-IfeBMKsU.cjs} +1 -1
- package/dist/chunks/{index-DJrRlj1_-HA-nVwDO.es.js → index-BVhSHfFK-4HejWjUD.es.js} +1 -1
- package/dist/chunks/{index-DJrRlj1_-E5dmStMF.cjs → index-BVhSHfFK-CTmHktSn.cjs} +1 -1
- package/dist/chunks/{index-DMwWcmrk.cjs → index-CICIPNZT.cjs} +3 -3
- package/dist/chunks/{index-BCZ82zY5.es.js → index-WwpxSzB1.es.js} +3 -3
- package/dist/chunks/{super-editor.es-MRWI4sfo.es.js → super-editor.es-BJP3oxNX.es.js} +104 -12
- package/dist/chunks/{super-editor.es-Bo_fWMy6.cjs → super-editor.es-CCq8j_qB.cjs} +104 -12
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CflxlFnM.js → converter-VnZK3P1W.js} +27 -2
- package/dist/super-editor/chunks/{docx-zipper-DKWL4mo2.js → docx-zipper-Bw5zXmBh.js} +1 -1
- package/dist/super-editor/chunks/{editor-B9V7oJbW.js → editor-CKkHVssy.js} +100 -12
- package/dist/super-editor/chunks/{index-DJrRlj1_.js → index-BVhSHfFK.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-B5WlPN4s.js → toolbar-DPzMju-T.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 +106 -14
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,11 +9,11 @@ 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 __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
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, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _headerLayoutResults, _footerLayoutResults, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _remoteCursorState, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _remoteCursorRafHandle, _scrollTimeout, _PresentationEditor_instances, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, updateDecorationProviders_fn, createDecorationProvider_fn, 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, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, computeHeaderFooterCaretRect_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, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _layoutSurfaces, _getTargetDom, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, updateHTMLAttributes_fn, updateDOMStyles_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;
|
|
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, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _headerLayoutResults, _footerLayoutResults, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _remoteCursorState, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _remoteCursorRafHandle, _scrollTimeout, _PresentationEditor_instances, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, updateDecorationProviders_fn, createDecorationProvider_fn, 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, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, computeHeaderFooterCaretRect_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, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _layoutSurfaces, _getTargetDom, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, checkShouldUpdate_fn, updateHTMLAttributes_fn, updateDOMStyles_fn, resolveNeighborParagraphProperties_fn, updateListStyles_fn, initList_fn, checkIsList_fn, createMarker_fn, createSeparator_fn, calculateTabSeparatorStyle_fn, calculateMarkerStyle_fn, removeList_fn, getParagraphContext_fn, scheduleAnimation_fn, cancelScheduledAnimation_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as ListHelpers, O as updateNumberingProperties, Q as changeListLevel, U as findParentNode, V as isList, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName, $ as TrackInsertMarkName, a0 as v4, a1 as TrackFormatMarkName, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as calculateResolvedParagraphProperties, ar as encodeCSSFromPPr, as as twipsToPixels$2, at as resolveRunProperties, au as encodeCSSFromRPr, av as generateOrderedListIndex, aw as docxNumberingHelpers, ax as InputRule, ay as convertSizeToCSS, az as SelectionRange, aA as Transform, aB as findParentNodeClosestToPos, aC as isInTable$1, aD as generateDocxRandomId, aE as insertNewRelationship, aF as inchesToPixels, aG as kebabCase, aH 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 ListHelpers, O as updateNumberingProperties, Q as changeListLevel, U as findParentNode, V as isList, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName, $ as TrackInsertMarkName, a0 as v4, a1 as TrackFormatMarkName, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as calculateResolvedParagraphProperties, ar as encodeCSSFromPPr, as as twipsToPixels$2, at as resolveRunProperties, au as encodeCSSFromRPr, av as generateOrderedListIndex, aw as docxNumberingHelpers, ax as InputRule, ay as convertSizeToCSS, az as SelectionRange, aA as Transform, aB as findParentNodeClosestToPos, aC as isInTable$1, aD as generateDocxRandomId, aE as insertNewRelationship, aF as inchesToPixels, aG as kebabCase, aH as getUnderlineCssString } from "./converter-VnZK3P1W.js";
|
|
16
|
+
import { D as DocxZipper } from "./docx-zipper-Bw5zXmBh.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() {
|
|
@@ -13553,7 +13553,7 @@ const isHeadless = (editor) => {
|
|
|
13553
13553
|
const shouldSkipNodeView = (editor) => {
|
|
13554
13554
|
return isHeadless(editor);
|
|
13555
13555
|
};
|
|
13556
|
-
const summaryVersion = "1.0.0-beta.
|
|
13556
|
+
const summaryVersion = "1.0.0-beta.9";
|
|
13557
13557
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
13558
13558
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
13559
13559
|
function mapAttributes(attrs) {
|
|
@@ -14335,7 +14335,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14335
14335
|
{ default: remarkStringify },
|
|
14336
14336
|
{ default: remarkGfm }
|
|
14337
14337
|
] = await Promise.all([
|
|
14338
|
-
import("./index-
|
|
14338
|
+
import("./index-BVhSHfFK.js"),
|
|
14339
14339
|
import("./index-DRCvimau.js"),
|
|
14340
14340
|
import("./index-C_x_N6Uh.js"),
|
|
14341
14341
|
import("./index-D_sWOSiG.js"),
|
|
@@ -14540,7 +14540,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14540
14540
|
* Process collaboration migrations
|
|
14541
14541
|
*/
|
|
14542
14542
|
processCollaborationMigrations() {
|
|
14543
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
14543
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.9");
|
|
14544
14544
|
if (!this.options.ydoc) return;
|
|
14545
14545
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
14546
14546
|
let docVersion = metaMap.get("version");
|
|
@@ -36754,6 +36754,7 @@ function calcTabHeight(blockParent2) {
|
|
|
36754
36754
|
const fontSize = parseInt(parentTextStyleMark?.attrs.fontSize) * ptToPxRatio || defaultFontSize;
|
|
36755
36755
|
return `${fontSize * defaultLineHeight}px`;
|
|
36756
36756
|
}
|
|
36757
|
+
const nodeViewMap = /* @__PURE__ */ new WeakMap();
|
|
36757
36758
|
class ParagraphNodeView {
|
|
36758
36759
|
/**
|
|
36759
36760
|
* @param {import('prosemirror-model').Node} node Current paragraph node.
|
|
@@ -36770,6 +36771,8 @@ class ParagraphNodeView {
|
|
|
36770
36771
|
this.decorations = decorations;
|
|
36771
36772
|
this.extensionAttrs = extensionAttrs;
|
|
36772
36773
|
this._animationFrameRequest = null;
|
|
36774
|
+
this.surroundingContext = {};
|
|
36775
|
+
nodeViewMap.set(this.node, this);
|
|
36773
36776
|
calculateResolvedParagraphProperties(this.editor, this.node, this.editor.state.doc.resolve(this.getPos()));
|
|
36774
36777
|
this.dom = document.createElement("p");
|
|
36775
36778
|
this.contentDOM = document.createElement("span");
|
|
@@ -36789,18 +36792,26 @@ class ParagraphNodeView {
|
|
|
36789
36792
|
/**
|
|
36790
36793
|
* @param {import('prosemirror-model').Node} node
|
|
36791
36794
|
* @param {import('prosemirror-view').Decoration[]} decorations
|
|
36795
|
+
* @param {import('prosemirror-view').Decoration[]} innerDecorations
|
|
36796
|
+
* @param {boolean} [forceUpdate=false]
|
|
36797
|
+
* @returns {boolean}
|
|
36792
36798
|
*/
|
|
36793
|
-
update(node, decorations) {
|
|
36799
|
+
update(node, decorations, innerDecorations, forceUpdate = false) {
|
|
36800
|
+
if (nodeViewMap.get(this.node) === this) {
|
|
36801
|
+
nodeViewMap.delete(this.node);
|
|
36802
|
+
}
|
|
36803
|
+
const oldProps = getResolvedParagraphProperties(this.node);
|
|
36794
36804
|
const oldAttrs = this.node.attrs;
|
|
36795
|
-
const newAttrs = node.attrs;
|
|
36796
36805
|
this.node = node;
|
|
36797
36806
|
this.decorations = decorations;
|
|
36798
|
-
|
|
36807
|
+
this.innerDecorations = innerDecorations;
|
|
36808
|
+
nodeViewMap.set(this.node, this);
|
|
36809
|
+
if (!forceUpdate && !__privateMethod(this, _ParagraphNodeView_instances, checkShouldUpdate_fn).call(this, oldProps, oldAttrs, this.surroundingContext)) {
|
|
36799
36810
|
return true;
|
|
36800
36811
|
}
|
|
36801
36812
|
calculateResolvedParagraphProperties(this.editor, this.node, this.editor.state.doc.resolve(this.getPos()));
|
|
36802
36813
|
__privateMethod(this, _ParagraphNodeView_instances, updateHTMLAttributes_fn).call(this);
|
|
36803
|
-
__privateMethod(this, _ParagraphNodeView_instances, updateDOMStyles_fn).call(this);
|
|
36814
|
+
__privateMethod(this, _ParagraphNodeView_instances, updateDOMStyles_fn).call(this, oldProps);
|
|
36804
36815
|
if (!__privateMethod(this, _ParagraphNodeView_instances, checkIsList_fn).call(this)) {
|
|
36805
36816
|
__privateMethod(this, _ParagraphNodeView_instances, removeList_fn).call(this);
|
|
36806
36817
|
return true;
|
|
@@ -36843,9 +36854,26 @@ class ParagraphNodeView {
|
|
|
36843
36854
|
}
|
|
36844
36855
|
destroy() {
|
|
36845
36856
|
__privateMethod(this, _ParagraphNodeView_instances, cancelScheduledAnimation_fn).call(this);
|
|
36857
|
+
if (nodeViewMap.get(this.node) === this) {
|
|
36858
|
+
nodeViewMap.delete(this.node);
|
|
36859
|
+
}
|
|
36846
36860
|
}
|
|
36847
36861
|
}
|
|
36848
36862
|
_ParagraphNodeView_instances = new WeakSet();
|
|
36863
|
+
/**
|
|
36864
|
+
* Checks whether the node view should update based on changes to props, attrs, or surrounding context.
|
|
36865
|
+
* @param {Record<string, unknown>} oldProps
|
|
36866
|
+
* @param {Record<string, unknown>} oldAttrs
|
|
36867
|
+
* @param {Record<string, unknown>} oldSurroundingContext
|
|
36868
|
+
* @returns {boolean}
|
|
36869
|
+
*/
|
|
36870
|
+
checkShouldUpdate_fn = function(oldProps, oldAttrs, oldSurroundingContext) {
|
|
36871
|
+
__privateMethod(this, _ParagraphNodeView_instances, resolveNeighborParagraphProperties_fn).call(this);
|
|
36872
|
+
return JSON.stringify(oldAttrs) !== JSON.stringify(this.node.attrs) || JSON.stringify(oldProps) !== JSON.stringify(getResolvedParagraphProperties(this.node)) || JSON.stringify(oldSurroundingContext) !== JSON.stringify(this.surroundingContext);
|
|
36873
|
+
};
|
|
36874
|
+
/**
|
|
36875
|
+
* Updates the HTML attributes of the paragraph DOM element based on node attributes and properties.
|
|
36876
|
+
*/
|
|
36849
36877
|
updateHTMLAttributes_fn = function() {
|
|
36850
36878
|
const htmlAttributes = Attribute.getAttributesToRender(this.node, this.extensionAttrs);
|
|
36851
36879
|
htmlAttributes.style = htmlAttributes.style || "";
|
|
@@ -36873,14 +36901,74 @@ updateHTMLAttributes_fn = function() {
|
|
|
36873
36901
|
this.dom.setAttribute("styleid", paragraphProperties.styleId);
|
|
36874
36902
|
}
|
|
36875
36903
|
};
|
|
36876
|
-
|
|
36904
|
+
/**
|
|
36905
|
+
* Updates the CSS styles of the paragraph DOM element based on resolved paragraph properties.
|
|
36906
|
+
* @param {Record<string, unknown> | null} oldParagraphProperties
|
|
36907
|
+
*/
|
|
36908
|
+
updateDOMStyles_fn = function(oldParagraphProperties = null) {
|
|
36877
36909
|
this.dom.style.cssText = "";
|
|
36878
36910
|
const paragraphProperties = getResolvedParagraphProperties(this.node);
|
|
36879
|
-
|
|
36911
|
+
__privateMethod(this, _ParagraphNodeView_instances, resolveNeighborParagraphProperties_fn).call(this);
|
|
36912
|
+
const style = encodeCSSFromPPr(
|
|
36913
|
+
paragraphProperties,
|
|
36914
|
+
this.surroundingContext.hasPreviousParagraph,
|
|
36915
|
+
this.surroundingContext.nextParagraphProps
|
|
36916
|
+
);
|
|
36880
36917
|
Object.entries(style).forEach(([k2, v]) => {
|
|
36881
36918
|
this.dom.style[k2] = v;
|
|
36882
36919
|
});
|
|
36920
|
+
if (JSON.stringify(paragraphProperties.spacing) !== JSON.stringify(oldParagraphProperties?.spacing) || paragraphProperties.styleId !== oldParagraphProperties?.styleId || paragraphProperties.contextualSpacing !== oldParagraphProperties?.contextualSpacing) {
|
|
36921
|
+
const previousNodeView = this.surroundingContext.previousParagraph ? nodeViewMap.get(this.surroundingContext.previousParagraph) : null;
|
|
36922
|
+
if (previousNodeView) {
|
|
36923
|
+
try {
|
|
36924
|
+
previousNodeView.getPos();
|
|
36925
|
+
} catch {
|
|
36926
|
+
return;
|
|
36927
|
+
}
|
|
36928
|
+
previousNodeView.update(
|
|
36929
|
+
previousNodeView.node,
|
|
36930
|
+
previousNodeView.decorations,
|
|
36931
|
+
previousNodeView.innerDecorations,
|
|
36932
|
+
true
|
|
36933
|
+
);
|
|
36934
|
+
}
|
|
36935
|
+
}
|
|
36883
36936
|
};
|
|
36937
|
+
/**
|
|
36938
|
+
* Resolves properties of neighboring paragraphs to determine surrounding context.
|
|
36939
|
+
*/
|
|
36940
|
+
resolveNeighborParagraphProperties_fn = function() {
|
|
36941
|
+
const $pos = this.editor.state.doc.resolve(this.getPos());
|
|
36942
|
+
const parent = $pos.parent;
|
|
36943
|
+
const index2 = $pos.index();
|
|
36944
|
+
let hasPreviousParagraph = false;
|
|
36945
|
+
let previousParagraph = null;
|
|
36946
|
+
let nextParagraphProps = null;
|
|
36947
|
+
if (index2 > 0) {
|
|
36948
|
+
const previousNode = parent.child(index2 - 1);
|
|
36949
|
+
hasPreviousParagraph = previousNode.type.name === "paragraph" && !getResolvedParagraphProperties(previousNode)?.framePr?.dropCap;
|
|
36950
|
+
if (hasPreviousParagraph) {
|
|
36951
|
+
previousParagraph = previousNode;
|
|
36952
|
+
}
|
|
36953
|
+
}
|
|
36954
|
+
if (parent) {
|
|
36955
|
+
if (index2 < parent.childCount - 1) {
|
|
36956
|
+
const nextNode = parent.child(index2 + 1);
|
|
36957
|
+
if (nextNode.type.name === "paragraph") {
|
|
36958
|
+
nextParagraphProps = getResolvedParagraphProperties(nextNode);
|
|
36959
|
+
}
|
|
36960
|
+
}
|
|
36961
|
+
}
|
|
36962
|
+
this.surroundingContext = {
|
|
36963
|
+
hasPreviousParagraph,
|
|
36964
|
+
previousParagraph,
|
|
36965
|
+
nextParagraphProps
|
|
36966
|
+
};
|
|
36967
|
+
};
|
|
36968
|
+
/**
|
|
36969
|
+
* Updates the styles of the list marker and separator based on current node attributes.
|
|
36970
|
+
* @returns {boolean}
|
|
36971
|
+
*/
|
|
36884
36972
|
updateListStyles_fn = function() {
|
|
36885
36973
|
let { suffix, justification } = this.node.attrs.listRendering;
|
|
36886
36974
|
suffix = suffix ?? "tab";
|
|
@@ -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-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { p as process$1 } from "./converter-VnZK3P1W.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CKkHVssy.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-CKkHVssy.js";
|
|
2
|
+
import "./chunks/converter-VnZK3P1W.js";
|
|
3
|
+
import "./chunks/docx-zipper-Bw5zXmBh.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 { aJ as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aM as vClickOutside, aN as getActiveFormatting, aC as isInTable, U as findParentNode, aq as calculateResolvedParagraphProperties, a7 as twipsToLines, V as isList, al as parseSizeUnit, a8 as pixelsToTwips, aO as getFileObject, aP as translator, aQ as translator$1, aR as translator$2, aS as translator$3, aT as translator$4, aU as translator$5, aV as translator$6, aW as translator$7, aX as translator$8, aY as translator$9, aZ as translator$a, a_ as translator$b, a$ as translator$c, b0 as translator$d, b1 as translator$e, b2 as commentRangeEndTranslator, b3 as commentRangeStartTranslator, b4 as translator$f, b5 as translator$g, b6 as translator$h, b7 as translator$i, b8 as translator$j, b9 as translator$k, ba as translator$l, bb as translator$m, bc as translator$n, bd as translator$o, be as translator$p, bf as translator$q, bg as translator$r, bh as translator$s, bi as translator$t, bj as translator$u, bk as translator$v, bl as translator$w, bm as translator$x, bn as translator$y, bo as translator$z, bp as translator$A, bq as translator$B, br as translator$C, bs as translator$D, bt as translator$E, bu as translator$F, bv as translator$G, bw as translator$H, bx as translator$I, by as translator$J, bz as translator$K, bA as translator$L, bB as translator$M, bC as translator$N, bD as translator$O, bE as translator$P, bF as translator$Q, bG as translator$R, bH as translator$S, bI as translator$T, bJ as translator$U, bK as translator$V, bL as translator$W, bM as translator$X, bN as translator$Y, bO as translator$Z, bP as translator$_, bQ as translator$$, bR as translator$10, bS as translator$11, bT as translator$12, bU as translator$13, bV as translator$14, bW as translator$15, bX as translator$16, bY as translator$17, bZ as translator$18, b_ as translator$19, b$ as translator$1a, c0 as translator$1b, c1 as translator$1c, c2 as translator$1d, c3 as translator$1e, c4 as translator$1f, c5 as translator$1g, c6 as translator$1h, c7 as translator$1i, c8 as translator$1j, P as PluginKey, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { ac, i, a9 } 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 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-
|
|
15
|
-
import { z, F, B, T, w, C, x } from "./chunks/editor-
|
|
12
|
+
import { aJ as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aM as vClickOutside, aN as getActiveFormatting, aC as isInTable, U as findParentNode, aq as calculateResolvedParagraphProperties, a7 as twipsToLines, V as isList, al as parseSizeUnit, a8 as pixelsToTwips, aO as getFileObject, aP as translator, aQ as translator$1, aR as translator$2, aS as translator$3, aT as translator$4, aU as translator$5, aV as translator$6, aW as translator$7, aX as translator$8, aY as translator$9, aZ as translator$a, a_ as translator$b, a$ as translator$c, b0 as translator$d, b1 as translator$e, b2 as commentRangeEndTranslator, b3 as commentRangeStartTranslator, b4 as translator$f, b5 as translator$g, b6 as translator$h, b7 as translator$i, b8 as translator$j, b9 as translator$k, ba as translator$l, bb as translator$m, bc as translator$n, bd as translator$o, be as translator$p, bf as translator$q, bg as translator$r, bh as translator$s, bi as translator$t, bj as translator$u, bk as translator$v, bl as translator$w, bm as translator$x, bn as translator$y, bo as translator$z, bp as translator$A, bq as translator$B, br as translator$C, bs as translator$D, bt as translator$E, bu as translator$F, bv as translator$G, bw as translator$H, bx as translator$I, by as translator$J, bz as translator$K, bA as translator$L, bB as translator$M, bC as translator$N, bD as translator$O, bE as translator$P, bF as translator$Q, bG as translator$R, bH as translator$S, bI as translator$T, bJ as translator$U, bK as translator$V, bL as translator$W, bM as translator$X, bN as translator$Y, bO as translator$Z, bP as translator$_, bQ as translator$$, bR as translator$10, bS as translator$11, bT as translator$12, bU as translator$13, bV as translator$14, bW as translator$15, bX as translator$16, bY as translator$17, bZ as translator$18, b_ as translator$19, b$ as translator$1a, c0 as translator$1b, c1 as translator$1c, c2 as translator$1d, c3 as translator$1e, c4 as translator$1f, c5 as translator$1g, c6 as translator$1h, c7 as translator$1i, c8 as translator$1j, P as PluginKey, a as Plugin } from "./chunks/converter-VnZK3P1W.js";
|
|
13
|
+
import { ac, i, a9 } from "./chunks/converter-VnZK3P1W.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-CKkHVssy.js";
|
|
15
|
+
import { z, F, B, T, w, C, x } from "./chunks/editor-CKkHVssy.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, 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-
|
|
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-DPzMju-T.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-Bw5zXmBh.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-CCq8j_qB.cjs");
|
|
4
4
|
require("./chunks/vue-ARQSyfaw.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-BJP3oxNX.es.js";
|
|
2
2
|
import "./chunks/vue-CztqUvm1.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-CCq8j_qB.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-CICIPNZT.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-BJP3oxNX.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-WwpxSzB1.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
|
@@ -19530,18 +19530,43 @@
|
|
|
19530
19530
|
}
|
|
19531
19531
|
return marks;
|
|
19532
19532
|
}
|
|
19533
|
-
function encodeCSSFromPPr(paragraphProperties) {
|
|
19533
|
+
function encodeCSSFromPPr(paragraphProperties, hasPreviousParagraph, nextParagraphProps) {
|
|
19534
19534
|
if (!paragraphProperties || typeof paragraphProperties !== "object") {
|
|
19535
19535
|
return {};
|
|
19536
19536
|
}
|
|
19537
19537
|
let css = {};
|
|
19538
19538
|
const { spacing, indent: indent2, borders, justification } = paragraphProperties;
|
|
19539
|
+
const nextStyleId = nextParagraphProps?.styleId;
|
|
19539
19540
|
if (spacing) {
|
|
19541
|
+
const getEffectiveBefore = (nextSpacing, isListItem) => {
|
|
19542
|
+
if (!nextSpacing) return 0;
|
|
19543
|
+
if (nextSpacing.beforeAutospacing && isListItem) {
|
|
19544
|
+
return 0;
|
|
19545
|
+
}
|
|
19546
|
+
return nextSpacing.before || 0;
|
|
19547
|
+
};
|
|
19540
19548
|
const isDropCap = Boolean(paragraphProperties.framePr?.dropCap);
|
|
19541
19549
|
const spacingCopy = { ...spacing };
|
|
19550
|
+
if (hasPreviousParagraph) {
|
|
19551
|
+
delete spacingCopy.before;
|
|
19552
|
+
}
|
|
19542
19553
|
if (isDropCap) {
|
|
19543
19554
|
spacingCopy.line = linesToTwips(1);
|
|
19544
19555
|
spacingCopy.lineRule = "auto";
|
|
19556
|
+
delete spacingCopy.after;
|
|
19557
|
+
} else {
|
|
19558
|
+
const nextBefore = getEffectiveBefore(
|
|
19559
|
+
nextParagraphProps?.spacing,
|
|
19560
|
+
Boolean(nextParagraphProps?.numberingProperties)
|
|
19561
|
+
);
|
|
19562
|
+
spacingCopy.after = Math.max(spacingCopy.after || 0, nextBefore);
|
|
19563
|
+
if (paragraphProperties.contextualSpacing && nextStyleId != null && nextStyleId === paragraphProperties.styleId) {
|
|
19564
|
+
spacingCopy.after -= paragraphProperties.spacing?.after || 0;
|
|
19565
|
+
}
|
|
19566
|
+
if (nextParagraphProps?.contextualSpacing && nextStyleId != null && nextStyleId === paragraphProperties.styleId) {
|
|
19567
|
+
spacingCopy.after -= nextBefore;
|
|
19568
|
+
}
|
|
19569
|
+
spacingCopy.after = Math.max(spacingCopy.after, 0);
|
|
19545
19570
|
}
|
|
19546
19571
|
const spacingStyle = getSpacingStyle(spacingCopy, Boolean(paragraphProperties.numberingProperties));
|
|
19547
19572
|
css = { ...css, ...spacingStyle };
|
|
@@ -35581,7 +35606,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35581
35606
|
static getStoredSuperdocVersion(docx) {
|
|
35582
35607
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35583
35608
|
}
|
|
35584
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
35609
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.9") {
|
|
35585
35610
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
35586
35611
|
}
|
|
35587
35612
|
/**
|
|
@@ -46562,7 +46587,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
46562
46587
|
var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
46563
46588
|
var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
|
|
46564
46589
|
var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
|
|
46565
|
-
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, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _headerLayoutResults, _footerLayoutResults, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _remoteCursorState, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _remoteCursorRafHandle, _scrollTimeout, _PresentationEditor_instances, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, updateDecorationProviders_fn, createDecorationProvider_fn, 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, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, computeHeaderFooterCaretRect_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, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _layoutSurfaces, _getTargetDom, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, updateHTMLAttributes_fn, updateDOMStyles_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;
|
|
46590
|
+
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, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _headerLayoutResults, _footerLayoutResults, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _remoteCursorState, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _remoteCursorRafHandle, _scrollTimeout, _PresentationEditor_instances, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, updateDecorationProviders_fn, createDecorationProvider_fn, 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, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, computeHeaderFooterCaretRect_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, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _layoutSurfaces, _getTargetDom, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, checkShouldUpdate_fn, updateHTMLAttributes_fn, updateDOMStyles_fn, resolveNeighborParagraphProperties_fn, updateListStyles_fn, initList_fn, checkIsList_fn, createMarker_fn, createSeparator_fn, calculateTabSeparatorStyle_fn, calculateMarkerStyle_fn, removeList_fn, getParagraphContext_fn, scheduleAnimation_fn, cancelScheduledAnimation_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
|
|
46566
46591
|
var GOOD_LEAF_SIZE = 200;
|
|
46567
46592
|
var RopeSequence = function RopeSequence2() {
|
|
46568
46593
|
};
|
|
@@ -60069,7 +60094,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
60069
60094
|
const shouldSkipNodeView = (editor) => {
|
|
60070
60095
|
return isHeadless(editor);
|
|
60071
60096
|
};
|
|
60072
|
-
const summaryVersion = "1.0.0-beta.
|
|
60097
|
+
const summaryVersion = "1.0.0-beta.9";
|
|
60073
60098
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
60074
60099
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
60075
60100
|
function mapAttributes(attrs) {
|
|
@@ -60848,7 +60873,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
60848
60873
|
{ default: remarkStringify2 },
|
|
60849
60874
|
{ default: remarkGfm2 }
|
|
60850
60875
|
] = await Promise.all([
|
|
60851
|
-
Promise.resolve().then(() =>
|
|
60876
|
+
Promise.resolve().then(() => indexBVhSHfFK),
|
|
60852
60877
|
Promise.resolve().then(() => indexDRCvimau),
|
|
60853
60878
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
60854
60879
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -61053,7 +61078,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61053
61078
|
* Process collaboration migrations
|
|
61054
61079
|
*/
|
|
61055
61080
|
processCollaborationMigrations() {
|
|
61056
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
61081
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.9");
|
|
61057
61082
|
if (!this.options.ydoc) return;
|
|
61058
61083
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
61059
61084
|
let docVersion = metaMap.get("version");
|
|
@@ -82864,6 +82889,7 @@ ${l}
|
|
|
82864
82889
|
const fontSize2 = parseInt(parentTextStyleMark?.attrs.fontSize) * ptToPxRatio || defaultFontSize;
|
|
82865
82890
|
return `${fontSize2 * defaultLineHeight}px`;
|
|
82866
82891
|
}
|
|
82892
|
+
const nodeViewMap = /* @__PURE__ */ new WeakMap();
|
|
82867
82893
|
class ParagraphNodeView {
|
|
82868
82894
|
/**
|
|
82869
82895
|
* @param {import('prosemirror-model').Node} node Current paragraph node.
|
|
@@ -82880,6 +82906,8 @@ ${l}
|
|
|
82880
82906
|
this.decorations = decorations;
|
|
82881
82907
|
this.extensionAttrs = extensionAttrs;
|
|
82882
82908
|
this._animationFrameRequest = null;
|
|
82909
|
+
this.surroundingContext = {};
|
|
82910
|
+
nodeViewMap.set(this.node, this);
|
|
82883
82911
|
calculateResolvedParagraphProperties(this.editor, this.node, this.editor.state.doc.resolve(this.getPos()));
|
|
82884
82912
|
this.dom = document.createElement("p");
|
|
82885
82913
|
this.contentDOM = document.createElement("span");
|
|
@@ -82899,18 +82927,26 @@ ${l}
|
|
|
82899
82927
|
/**
|
|
82900
82928
|
* @param {import('prosemirror-model').Node} node
|
|
82901
82929
|
* @param {import('prosemirror-view').Decoration[]} decorations
|
|
82930
|
+
* @param {import('prosemirror-view').Decoration[]} innerDecorations
|
|
82931
|
+
* @param {boolean} [forceUpdate=false]
|
|
82932
|
+
* @returns {boolean}
|
|
82902
82933
|
*/
|
|
82903
|
-
update(node2, decorations) {
|
|
82934
|
+
update(node2, decorations, innerDecorations, forceUpdate = false) {
|
|
82935
|
+
if (nodeViewMap.get(this.node) === this) {
|
|
82936
|
+
nodeViewMap.delete(this.node);
|
|
82937
|
+
}
|
|
82938
|
+
const oldProps = getResolvedParagraphProperties(this.node);
|
|
82904
82939
|
const oldAttrs = this.node.attrs;
|
|
82905
|
-
const newAttrs = node2.attrs;
|
|
82906
82940
|
this.node = node2;
|
|
82907
82941
|
this.decorations = decorations;
|
|
82908
|
-
|
|
82942
|
+
this.innerDecorations = innerDecorations;
|
|
82943
|
+
nodeViewMap.set(this.node, this);
|
|
82944
|
+
if (!forceUpdate && !__privateMethod$1(this, _ParagraphNodeView_instances, checkShouldUpdate_fn).call(this, oldProps, oldAttrs, this.surroundingContext)) {
|
|
82909
82945
|
return true;
|
|
82910
82946
|
}
|
|
82911
82947
|
calculateResolvedParagraphProperties(this.editor, this.node, this.editor.state.doc.resolve(this.getPos()));
|
|
82912
82948
|
__privateMethod$1(this, _ParagraphNodeView_instances, updateHTMLAttributes_fn).call(this);
|
|
82913
|
-
__privateMethod$1(this, _ParagraphNodeView_instances, updateDOMStyles_fn).call(this);
|
|
82949
|
+
__privateMethod$1(this, _ParagraphNodeView_instances, updateDOMStyles_fn).call(this, oldProps);
|
|
82914
82950
|
if (!__privateMethod$1(this, _ParagraphNodeView_instances, checkIsList_fn).call(this)) {
|
|
82915
82951
|
__privateMethod$1(this, _ParagraphNodeView_instances, removeList_fn).call(this);
|
|
82916
82952
|
return true;
|
|
@@ -82953,9 +82989,16 @@ ${l}
|
|
|
82953
82989
|
}
|
|
82954
82990
|
destroy() {
|
|
82955
82991
|
__privateMethod$1(this, _ParagraphNodeView_instances, cancelScheduledAnimation_fn).call(this);
|
|
82992
|
+
if (nodeViewMap.get(this.node) === this) {
|
|
82993
|
+
nodeViewMap.delete(this.node);
|
|
82994
|
+
}
|
|
82956
82995
|
}
|
|
82957
82996
|
}
|
|
82958
82997
|
_ParagraphNodeView_instances = /* @__PURE__ */ new WeakSet();
|
|
82998
|
+
checkShouldUpdate_fn = function(oldProps, oldAttrs, oldSurroundingContext) {
|
|
82999
|
+
__privateMethod$1(this, _ParagraphNodeView_instances, resolveNeighborParagraphProperties_fn).call(this);
|
|
83000
|
+
return JSON.stringify(oldAttrs) !== JSON.stringify(this.node.attrs) || JSON.stringify(oldProps) !== JSON.stringify(getResolvedParagraphProperties(this.node)) || JSON.stringify(oldSurroundingContext) !== JSON.stringify(this.surroundingContext);
|
|
83001
|
+
};
|
|
82959
83002
|
updateHTMLAttributes_fn = function() {
|
|
82960
83003
|
const htmlAttributes = Attribute.getAttributesToRender(this.node, this.extensionAttrs);
|
|
82961
83004
|
htmlAttributes.style = htmlAttributes.style || "";
|
|
@@ -82983,13 +83026,62 @@ ${l}
|
|
|
82983
83026
|
this.dom.setAttribute("styleid", paragraphProperties.styleId);
|
|
82984
83027
|
}
|
|
82985
83028
|
};
|
|
82986
|
-
updateDOMStyles_fn = function() {
|
|
83029
|
+
updateDOMStyles_fn = function(oldParagraphProperties = null) {
|
|
82987
83030
|
this.dom.style.cssText = "";
|
|
82988
83031
|
const paragraphProperties = getResolvedParagraphProperties(this.node);
|
|
82989
|
-
|
|
83032
|
+
__privateMethod$1(this, _ParagraphNodeView_instances, resolveNeighborParagraphProperties_fn).call(this);
|
|
83033
|
+
const style2 = encodeCSSFromPPr(
|
|
83034
|
+
paragraphProperties,
|
|
83035
|
+
this.surroundingContext.hasPreviousParagraph,
|
|
83036
|
+
this.surroundingContext.nextParagraphProps
|
|
83037
|
+
);
|
|
82990
83038
|
Object.entries(style2).forEach(([k2, v2]) => {
|
|
82991
83039
|
this.dom.style[k2] = v2;
|
|
82992
83040
|
});
|
|
83041
|
+
if (JSON.stringify(paragraphProperties.spacing) !== JSON.stringify(oldParagraphProperties?.spacing) || paragraphProperties.styleId !== oldParagraphProperties?.styleId || paragraphProperties.contextualSpacing !== oldParagraphProperties?.contextualSpacing) {
|
|
83042
|
+
const previousNodeView = this.surroundingContext.previousParagraph ? nodeViewMap.get(this.surroundingContext.previousParagraph) : null;
|
|
83043
|
+
if (previousNodeView) {
|
|
83044
|
+
try {
|
|
83045
|
+
previousNodeView.getPos();
|
|
83046
|
+
} catch {
|
|
83047
|
+
return;
|
|
83048
|
+
}
|
|
83049
|
+
previousNodeView.update(
|
|
83050
|
+
previousNodeView.node,
|
|
83051
|
+
previousNodeView.decorations,
|
|
83052
|
+
previousNodeView.innerDecorations,
|
|
83053
|
+
true
|
|
83054
|
+
);
|
|
83055
|
+
}
|
|
83056
|
+
}
|
|
83057
|
+
};
|
|
83058
|
+
resolveNeighborParagraphProperties_fn = function() {
|
|
83059
|
+
const $pos = this.editor.state.doc.resolve(this.getPos());
|
|
83060
|
+
const parent = $pos.parent;
|
|
83061
|
+
const index2 = $pos.index();
|
|
83062
|
+
let hasPreviousParagraph = false;
|
|
83063
|
+
let previousParagraph = null;
|
|
83064
|
+
let nextParagraphProps = null;
|
|
83065
|
+
if (index2 > 0) {
|
|
83066
|
+
const previousNode = parent.child(index2 - 1);
|
|
83067
|
+
hasPreviousParagraph = previousNode.type.name === "paragraph" && !getResolvedParagraphProperties(previousNode)?.framePr?.dropCap;
|
|
83068
|
+
if (hasPreviousParagraph) {
|
|
83069
|
+
previousParagraph = previousNode;
|
|
83070
|
+
}
|
|
83071
|
+
}
|
|
83072
|
+
if (parent) {
|
|
83073
|
+
if (index2 < parent.childCount - 1) {
|
|
83074
|
+
const nextNode = parent.child(index2 + 1);
|
|
83075
|
+
if (nextNode.type.name === "paragraph") {
|
|
83076
|
+
nextParagraphProps = getResolvedParagraphProperties(nextNode);
|
|
83077
|
+
}
|
|
83078
|
+
}
|
|
83079
|
+
}
|
|
83080
|
+
this.surroundingContext = {
|
|
83081
|
+
hasPreviousParagraph,
|
|
83082
|
+
previousParagraph,
|
|
83083
|
+
nextParagraphProps
|
|
83084
|
+
};
|
|
82993
83085
|
};
|
|
82994
83086
|
updateListStyles_fn = function() {
|
|
82995
83087
|
let { suffix: suffix2, justification } = this.node.attrs.listRendering;
|
|
@@ -131641,7 +131733,7 @@ ${style2}
|
|
|
131641
131733
|
this.config.colors = shuffleArray(this.config.colors);
|
|
131642
131734
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
131643
131735
|
this.colorIndex = 0;
|
|
131644
|
-
this.version = "1.0.0-beta.
|
|
131736
|
+
this.version = "1.0.0-beta.9";
|
|
131645
131737
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
131646
131738
|
this.superdocId = config2.superdocId || v4();
|
|
131647
131739
|
this.colors = this.config.colors;
|
|
@@ -134084,7 +134176,7 @@ ${style2}
|
|
|
134084
134176
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
134085
134177
|
);
|
|
134086
134178
|
}
|
|
134087
|
-
const
|
|
134179
|
+
const indexBVhSHfFK = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
134088
134180
|
__proto__: null,
|
|
134089
134181
|
unified
|
|
134090
134182
|
}, Symbol.toStringTag, { value: "Module" }));
|