superdoc 1.0.0-beta.21 → 1.0.0-beta.22
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-CEwbF85g.es.js → PdfViewer-B42JCeYb.es.js} +1 -1
- package/dist/chunks/{PdfViewer-CqAQvFv3.cjs → PdfViewer-CswYWp1h.cjs} +1 -1
- package/dist/chunks/{index-DSuc12CK-DH_DeF0B.es.js → index-895wSAjT-C4ksiI6n.es.js} +1 -1
- package/dist/chunks/{index-DSuc12CK-Dpg5Hd9W.cjs → index-895wSAjT-CWlZl8zz.cjs} +1 -1
- package/dist/chunks/{index-Dy-eAVHL.cjs → index-CK4eX_iu.cjs} +7 -5
- package/dist/chunks/{index-BFobqgP4.es.js → index-DBmh710D.es.js} +7 -5
- package/dist/chunks/{super-editor.es-C2UuUFg3.cjs → super-editor.es-BkRizaIE.cjs} +206 -77
- package/dist/chunks/{super-editor.es-B5YJmpPg.es.js → super-editor.es-V792hb-6.es.js} +206 -77
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-Cw0V00On.js → converter-DhkZt4Pv.js} +6 -6
- package/dist/super-editor/chunks/{docx-zipper-D7k6lS5l.js → docx-zipper-Bajmc-RM.js} +1 -1
- package/dist/super-editor/chunks/{editor-CDWzRc4H.js → editor-oZjoYNA0.js} +208 -78
- package/dist/super-editor/chunks/{index-DSuc12CK.js → index-895wSAjT.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-CHJspeuY.js → toolbar-Bn5LTbq9.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 +212 -81
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { y as defineComponent, z as h, O as Transition, a0 as process$1, J as watchEffect, a as computed, r as ref, j as onMounted, W as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, u as createVNode, v as unref } from "./vue-Dysv_7z5.es.js";
|
|
2
|
-
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-
|
|
2
|
+
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-DBmh710D.es.js";
|
|
3
3
|
function self(vars) {
|
|
4
4
|
const {
|
|
5
5
|
opacityDisabled,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-jWLMl8Ts.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
4
|
+
const superdoc = require("./index-CK4eX_iu.cjs");
|
|
5
5
|
function self(vars) {
|
|
6
6
|
const {
|
|
7
7
|
opacityDisabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./super-editor.es-
|
|
3
|
+
const superEditor_es = require("./super-editor.es-BkRizaIE.cjs");
|
|
4
4
|
const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
|
|
5
5
|
function bail(error) {
|
|
6
6
|
if (error) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const superEditor_es = require("./super-editor.es-
|
|
2
|
+
const superEditor_es = require("./super-editor.es-BkRizaIE.cjs");
|
|
3
3
|
const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
|
|
4
4
|
const eventemitter3 = require("./eventemitter3-DQmQUge-.cjs");
|
|
5
5
|
const provider = require("@hocuspocus/provider");
|
|
@@ -17231,7 +17231,7 @@ const _sfc_main = {
|
|
|
17231
17231
|
__name: "SuperDoc",
|
|
17232
17232
|
emits: ["selection-update"],
|
|
17233
17233
|
setup(__props, { emit: __emit }) {
|
|
17234
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
17234
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-CswYWp1h.cjs")));
|
|
17235
17235
|
const superdocStore = useSuperdocStore();
|
|
17236
17236
|
const commentsStore = useCommentsStore();
|
|
17237
17237
|
const {
|
|
@@ -18084,7 +18084,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
18084
18084
|
this.config.colors = shuffleArray(this.config.colors);
|
|
18085
18085
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
18086
18086
|
this.colorIndex = 0;
|
|
18087
|
-
this.version = "1.0.0-beta.
|
|
18087
|
+
this.version = "1.0.0-beta.22";
|
|
18088
18088
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
18089
18089
|
this.superdocId = config.superdocId || uuid.v4();
|
|
18090
18090
|
this.colors = this.config.colors;
|
|
@@ -18495,7 +18495,9 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
18495
18495
|
editing: () => this.#setModeEditing(),
|
|
18496
18496
|
suggesting: () => this.#setModeSuggesting()
|
|
18497
18497
|
};
|
|
18498
|
-
if (types[type])
|
|
18498
|
+
if (types[type]) {
|
|
18499
|
+
types[type]();
|
|
18500
|
+
}
|
|
18499
18501
|
}
|
|
18500
18502
|
/**
|
|
18501
18503
|
* Set the document mode on a document's editor (PresentationEditor or Editor).
|
|
@@ -18567,7 +18569,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
18567
18569
|
}
|
|
18568
18570
|
#setModeViewing() {
|
|
18569
18571
|
this.toolbar.activeEditor = null;
|
|
18570
|
-
this.setTrackedChangesPreferences({ mode: "
|
|
18572
|
+
this.setTrackedChangesPreferences({ mode: "original", enabled: false });
|
|
18571
18573
|
this.superdocStore.documents.forEach((doc) => {
|
|
18572
18574
|
doc.removeComments();
|
|
18573
18575
|
this.#applyDocumentMode(doc, "viewing");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-
|
|
1
|
+
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-V792hb-6.es.js";
|
|
2
2
|
import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
|
|
3
3
|
import { E as EventEmitter } from "./eventemitter3-CcXAdeql.es.js";
|
|
4
4
|
import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
|
|
@@ -17214,7 +17214,7 @@ const _sfc_main = {
|
|
|
17214
17214
|
__name: "SuperDoc",
|
|
17215
17215
|
emits: ["selection-update"],
|
|
17216
17216
|
setup(__props, { emit: __emit }) {
|
|
17217
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
17217
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-B42JCeYb.es.js"));
|
|
17218
17218
|
const superdocStore = useSuperdocStore();
|
|
17219
17219
|
const commentsStore = useCommentsStore();
|
|
17220
17220
|
const {
|
|
@@ -18067,7 +18067,7 @@ class SuperDoc extends EventEmitter {
|
|
|
18067
18067
|
this.config.colors = shuffleArray(this.config.colors);
|
|
18068
18068
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
18069
18069
|
this.colorIndex = 0;
|
|
18070
|
-
this.version = "1.0.0-beta.
|
|
18070
|
+
this.version = "1.0.0-beta.22";
|
|
18071
18071
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
18072
18072
|
this.superdocId = config.superdocId || v4();
|
|
18073
18073
|
this.colors = this.config.colors;
|
|
@@ -18478,7 +18478,9 @@ class SuperDoc extends EventEmitter {
|
|
|
18478
18478
|
editing: () => this.#setModeEditing(),
|
|
18479
18479
|
suggesting: () => this.#setModeSuggesting()
|
|
18480
18480
|
};
|
|
18481
|
-
if (types[type])
|
|
18481
|
+
if (types[type]) {
|
|
18482
|
+
types[type]();
|
|
18483
|
+
}
|
|
18482
18484
|
}
|
|
18483
18485
|
/**
|
|
18484
18486
|
* Set the document mode on a document's editor (PresentationEditor or Editor).
|
|
@@ -18550,7 +18552,7 @@ class SuperDoc extends EventEmitter {
|
|
|
18550
18552
|
}
|
|
18551
18553
|
#setModeViewing() {
|
|
18552
18554
|
this.toolbar.activeEditor = null;
|
|
18553
|
-
this.setTrackedChangesPreferences({ mode: "
|
|
18555
|
+
this.setTrackedChangesPreferences({ mode: "original", enabled: false });
|
|
18554
18556
|
this.superdocStore.documents.forEach((doc) => {
|
|
18555
18557
|
doc.removeComments();
|
|
18556
18558
|
this.#applyDocumentMode(doc, "viewing");
|
|
@@ -36388,7 +36388,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
36388
36388
|
static getStoredSuperdocVersion(docx) {
|
|
36389
36389
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
36390
36390
|
}
|
|
36391
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
36391
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.22") {
|
|
36392
36392
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
36393
36393
|
}
|
|
36394
36394
|
/**
|
|
@@ -39694,7 +39694,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
|
|
|
39694
39694
|
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);
|
|
39695
39695
|
var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
|
|
39696
39696
|
var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
|
|
39697
|
-
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, _EditorOverlayManager_instances, findDecorationContainer_fn, ensureEditorHost_fn, positionEditorHost_fn, showHeaderFooterBorder_fn, hideHeaderFooterBorder_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay2, _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, _multiSectionIdentifier, _headerLayoutResults, _footerLayoutResults, _headerLayoutsByRId, _footerLayoutsByRId, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _overlayManager, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _lastSelectedImageBlockId, _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, layoutPerRIdHeaderFooters_fn, updateDecorationProviders_fn, createDecorationProvider_fn, findHeaderFooterPageForPageNumber_fn, computeDecorationBox_fn, rebuildHeaderFooterRegions_fn, hitTestHeaderFooterRegion_fn, pointInRegion_fn, activateHeaderFooterRegion_fn, enterHeaderFooterMode_fn, exitHeaderFooterMode_fn, getActiveDomTarget_fn, emitHeaderFooterModeChanged_fn, emitHeaderFooterEditingContext_fn, updateAwarenessSession_fn, updateModeBanner_fn, announce_fn, validateHeaderFooterEditPermission_fn, emitHeaderFooterEditBlocked_fn, resolveDescriptorForRegion_fn, createDefaultHeaderFooter_fn, getPageElement_fn, scrollPageIntoView_fn, 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, _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;
|
|
39697
|
+
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, _EditorOverlayManager_instances, findDecorationContainer_fn, ensureEditorHost_fn, positionEditorHost_fn, showHeaderFooterBorder_fn, hideHeaderFooterBorder_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay2, _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, _multiSectionIdentifier, _headerLayoutResults, _footerLayoutResults, _headerLayoutsByRId, _footerLayoutsByRId, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _overlayManager, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _lastSelectedImageBlockId, _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, layoutPerRIdHeaderFooters_fn, updateDecorationProviders_fn, createDecorationProvider_fn, findHeaderFooterPageForPageNumber_fn, computeDecorationBox_fn, rebuildHeaderFooterRegions_fn, hitTestHeaderFooterRegion_fn, pointInRegion_fn, activateHeaderFooterRegion_fn, enterHeaderFooterMode_fn, exitHeaderFooterMode_fn, getActiveDomTarget_fn, emitHeaderFooterModeChanged_fn, emitHeaderFooterEditingContext_fn, updateAwarenessSession_fn, updateModeBanner_fn, announce_fn, validateHeaderFooterEditPermission_fn, emitHeaderFooterEditBlocked_fn, resolveDescriptorForRegion_fn, createDefaultHeaderFooter_fn, getPageElement_fn, scrollPageIntoView_fn, 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;
|
|
39698
39698
|
var GOOD_LEAF_SIZE = 200;
|
|
39699
39699
|
var RopeSequence = function RopeSequence2() {
|
|
39700
39700
|
};
|
|
@@ -49596,6 +49596,59 @@ function skipTab(dir) {
|
|
|
49596
49596
|
return true;
|
|
49597
49597
|
};
|
|
49598
49598
|
}
|
|
49599
|
+
const decreaseListIndent = () => ({ editor, tr, dispatch }) => {
|
|
49600
|
+
const handled = changeListLevel(-1, editor, tr);
|
|
49601
|
+
if (handled && dispatch) {
|
|
49602
|
+
dispatch(tr);
|
|
49603
|
+
}
|
|
49604
|
+
return handled;
|
|
49605
|
+
};
|
|
49606
|
+
const removeNumberingProperties = ({ checkType = "startParagraph" } = {}) => (props) => {
|
|
49607
|
+
const { tr, state: state2, editor, dispatch } = props;
|
|
49608
|
+
const { node: paragraph, pos } = findParentNode(isList)(state2.selection) || {};
|
|
49609
|
+
if (!paragraph) return false;
|
|
49610
|
+
if (checkType === "empty" && !isVisuallyEmptyParagraph(paragraph)) return false;
|
|
49611
|
+
if (checkType === "startParagraph") {
|
|
49612
|
+
const { $from, empty: empty2 } = state2.selection;
|
|
49613
|
+
if ((!empty2 || $from.parentOffset !== 0) && !isVisuallyEmptyParagraph(paragraph)) return false;
|
|
49614
|
+
}
|
|
49615
|
+
const ilvl = getResolvedParagraphProperties(paragraph).numberingProperties.ilvl;
|
|
49616
|
+
if (ilvl > 0) {
|
|
49617
|
+
const outdented = decreaseListIndent()(props);
|
|
49618
|
+
if (outdented) {
|
|
49619
|
+
tr.scrollIntoView();
|
|
49620
|
+
}
|
|
49621
|
+
return outdented;
|
|
49622
|
+
} else {
|
|
49623
|
+
updateNumberingProperties(null, paragraph, pos, editor, tr);
|
|
49624
|
+
}
|
|
49625
|
+
if (dispatch) dispatch(tr);
|
|
49626
|
+
return true;
|
|
49627
|
+
};
|
|
49628
|
+
function isVisuallyEmptyParagraph(node) {
|
|
49629
|
+
if (!node || node.type.name !== "paragraph") return false;
|
|
49630
|
+
let hasHardBreak = false;
|
|
49631
|
+
node.descendants((n) => {
|
|
49632
|
+
if (n.type && n.type.name === "hardBreak") {
|
|
49633
|
+
hasHardBreak = true;
|
|
49634
|
+
return false;
|
|
49635
|
+
}
|
|
49636
|
+
return true;
|
|
49637
|
+
});
|
|
49638
|
+
if (hasHardBreak) return false;
|
|
49639
|
+
const text = (node.textContent || "").replace(/\u200b/g, "").trim();
|
|
49640
|
+
if (text.length > 0) return false;
|
|
49641
|
+
let hasInlineLeaf = false;
|
|
49642
|
+
node.descendants((n) => {
|
|
49643
|
+
if (n.isInline && n.isLeaf && n.type?.name !== "hardBreak" && n.type?.name !== "run") {
|
|
49644
|
+
hasInlineLeaf = true;
|
|
49645
|
+
return false;
|
|
49646
|
+
}
|
|
49647
|
+
return true;
|
|
49648
|
+
});
|
|
49649
|
+
if (hasInlineLeaf) return false;
|
|
49650
|
+
return true;
|
|
49651
|
+
}
|
|
49599
49652
|
const toggleList = (listType) => ({ editor, state: state2, tr, dispatch }) => {
|
|
49600
49653
|
let predicate;
|
|
49601
49654
|
if (listType === "orderedList") {
|
|
@@ -49615,19 +49668,22 @@ const toggleList = (listType) => ({ editor, state: state2, tr, dispatch }) => {
|
|
|
49615
49668
|
const { from: from2, to } = selection;
|
|
49616
49669
|
let firstListNode = null;
|
|
49617
49670
|
let hasNonListParagraphs = false;
|
|
49618
|
-
let
|
|
49671
|
+
let allParagraphsInSelection = [];
|
|
49619
49672
|
state2.doc.nodesBetween(from2, to, (node, pos) => {
|
|
49620
49673
|
if (node.type.name === "paragraph") {
|
|
49621
|
-
|
|
49622
|
-
if (!firstListNode && predicate(node)) {
|
|
49623
|
-
firstListNode = node;
|
|
49624
|
-
} else if (!predicate(node)) {
|
|
49625
|
-
hasNonListParagraphs = true;
|
|
49626
|
-
}
|
|
49674
|
+
allParagraphsInSelection.push({ node, pos });
|
|
49627
49675
|
return false;
|
|
49628
49676
|
}
|
|
49629
49677
|
return true;
|
|
49630
49678
|
});
|
|
49679
|
+
let paragraphsInSelection = allParagraphsInSelection.length === 1 ? allParagraphsInSelection : allParagraphsInSelection.filter(({ node }) => !isVisuallyEmptyParagraph(node));
|
|
49680
|
+
for (const { node } of paragraphsInSelection) {
|
|
49681
|
+
if (!firstListNode && predicate(node)) {
|
|
49682
|
+
firstListNode = node;
|
|
49683
|
+
} else if (!predicate(node)) {
|
|
49684
|
+
hasNonListParagraphs = true;
|
|
49685
|
+
}
|
|
49686
|
+
}
|
|
49631
49687
|
if (!firstListNode && from2 > 0) {
|
|
49632
49688
|
const $from = state2.doc.resolve(from2);
|
|
49633
49689
|
const parentIndex = $from.index(-1);
|
|
@@ -49671,11 +49727,30 @@ const toggleList = (listType) => ({ editor, state: state2, tr, dispatch }) => {
|
|
|
49671
49727
|
}
|
|
49672
49728
|
updateNumberingProperties(sharedNumberingProperties, node, pos, editor, tr);
|
|
49673
49729
|
}
|
|
49674
|
-
|
|
49675
|
-
|
|
49676
|
-
|
|
49677
|
-
|
|
49678
|
-
|
|
49730
|
+
if (paragraphsInSelection.length > 0) {
|
|
49731
|
+
const firstPara = paragraphsInSelection[0];
|
|
49732
|
+
const lastPara = paragraphsInSelection[paragraphsInSelection.length - 1];
|
|
49733
|
+
const mappedFirstPos = tr.mapping.map(firstPara.pos);
|
|
49734
|
+
const mappedLastPos = tr.mapping.map(lastPara.pos);
|
|
49735
|
+
const $firstPos = tr.doc.resolve(mappedFirstPos);
|
|
49736
|
+
const $lastPos = tr.doc.resolve(mappedLastPos);
|
|
49737
|
+
const firstNode = $firstPos.nodeAfter;
|
|
49738
|
+
const lastNode = $lastPos.nodeAfter;
|
|
49739
|
+
if (firstNode && lastNode) {
|
|
49740
|
+
let selFrom = mappedFirstPos + 1;
|
|
49741
|
+
let selTo = mappedLastPos + lastNode.nodeSize - 1;
|
|
49742
|
+
if (firstNode.firstChild && firstNode.firstChild.type.name === "run") {
|
|
49743
|
+
selFrom = mappedFirstPos + 2;
|
|
49744
|
+
}
|
|
49745
|
+
if (lastNode.lastChild && lastNode.lastChild.type.name === "run") {
|
|
49746
|
+
selTo = mappedLastPos + lastNode.nodeSize - 2;
|
|
49747
|
+
}
|
|
49748
|
+
if (selFrom >= 0 && selTo <= tr.doc.content.size && selFrom <= selTo) {
|
|
49749
|
+
try {
|
|
49750
|
+
tr.setSelection(TextSelection$1.create(tr.doc, selFrom, selTo));
|
|
49751
|
+
} catch {
|
|
49752
|
+
}
|
|
49753
|
+
}
|
|
49679
49754
|
}
|
|
49680
49755
|
}
|
|
49681
49756
|
if (dispatch) dispatch(tr);
|
|
@@ -49688,59 +49763,6 @@ const increaseListIndent = () => ({ editor, tr, dispatch }) => {
|
|
|
49688
49763
|
}
|
|
49689
49764
|
return handled;
|
|
49690
49765
|
};
|
|
49691
|
-
const decreaseListIndent = () => ({ editor, tr, dispatch }) => {
|
|
49692
|
-
const handled = changeListLevel(-1, editor, tr);
|
|
49693
|
-
if (handled && dispatch) {
|
|
49694
|
-
dispatch(tr);
|
|
49695
|
-
}
|
|
49696
|
-
return handled;
|
|
49697
|
-
};
|
|
49698
|
-
const removeNumberingProperties = ({ checkType = "startParagraph" } = {}) => (props) => {
|
|
49699
|
-
const { tr, state: state2, editor, dispatch } = props;
|
|
49700
|
-
const { node: paragraph, pos } = findParentNode(isList)(state2.selection) || {};
|
|
49701
|
-
if (!paragraph) return false;
|
|
49702
|
-
if (checkType === "empty" && !isVisuallyEmptyParagraph(paragraph)) return false;
|
|
49703
|
-
if (checkType === "startParagraph") {
|
|
49704
|
-
const { $from, empty: empty2 } = state2.selection;
|
|
49705
|
-
if ((!empty2 || $from.parentOffset !== 0) && !isVisuallyEmptyParagraph(paragraph)) return false;
|
|
49706
|
-
}
|
|
49707
|
-
const ilvl = getResolvedParagraphProperties(paragraph).numberingProperties.ilvl;
|
|
49708
|
-
if (ilvl > 0) {
|
|
49709
|
-
const outdented = decreaseListIndent()(props);
|
|
49710
|
-
if (outdented) {
|
|
49711
|
-
tr.scrollIntoView();
|
|
49712
|
-
}
|
|
49713
|
-
return outdented;
|
|
49714
|
-
} else {
|
|
49715
|
-
updateNumberingProperties(null, paragraph, pos, editor, tr);
|
|
49716
|
-
}
|
|
49717
|
-
if (dispatch) dispatch(tr);
|
|
49718
|
-
return true;
|
|
49719
|
-
};
|
|
49720
|
-
function isVisuallyEmptyParagraph(node) {
|
|
49721
|
-
if (!node || node.type.name !== "paragraph") return false;
|
|
49722
|
-
let hasHardBreak = false;
|
|
49723
|
-
node.descendants((n) => {
|
|
49724
|
-
if (n.type && n.type.name === "hardBreak") {
|
|
49725
|
-
hasHardBreak = true;
|
|
49726
|
-
return false;
|
|
49727
|
-
}
|
|
49728
|
-
return true;
|
|
49729
|
-
});
|
|
49730
|
-
if (hasHardBreak) return false;
|
|
49731
|
-
const text = (node.textContent || "").replace(/\u200b/g, "").trim();
|
|
49732
|
-
if (text.length > 0) return false;
|
|
49733
|
-
let hasInlineLeaf = false;
|
|
49734
|
-
node.descendants((n) => {
|
|
49735
|
-
if (n.isInline && n.isLeaf && n.type?.name !== "hardBreak" && n.type?.name !== "run") {
|
|
49736
|
-
hasInlineLeaf = true;
|
|
49737
|
-
return false;
|
|
49738
|
-
}
|
|
49739
|
-
return true;
|
|
49740
|
-
});
|
|
49741
|
-
if (hasInlineLeaf) return false;
|
|
49742
|
-
return true;
|
|
49743
|
-
}
|
|
49744
49766
|
const restoreSelection = () => ({ editor, state: state2, tr }) => {
|
|
49745
49767
|
if (editor.options.lastSelection) {
|
|
49746
49768
|
const selectionTr = tr.setSelection(
|
|
@@ -49823,6 +49845,7 @@ const commands$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
49823
49845
|
insertTabCharacter,
|
|
49824
49846
|
insertTabNode,
|
|
49825
49847
|
isStyleTokenEnabled,
|
|
49848
|
+
isVisuallyEmptyParagraph,
|
|
49826
49849
|
joinBackward,
|
|
49827
49850
|
joinDown,
|
|
49828
49851
|
joinForward,
|
|
@@ -49941,12 +49964,38 @@ const Keymap = Extension.create({
|
|
|
49941
49964
|
const Editable = Extension.create({
|
|
49942
49965
|
name: "editable",
|
|
49943
49966
|
addPmPlugins() {
|
|
49967
|
+
const editor = this.editor;
|
|
49944
49968
|
const editablePlugin = new Plugin({
|
|
49945
49969
|
key: new PluginKey("editable"),
|
|
49946
49970
|
props: {
|
|
49947
|
-
editable: () =>
|
|
49948
|
-
|
|
49949
|
-
|
|
49971
|
+
editable: () => editor.options.editable,
|
|
49972
|
+
handleDOMEvents: {
|
|
49973
|
+
beforeinput: (_view, event) => {
|
|
49974
|
+
if (!editor.options.editable) {
|
|
49975
|
+
event.preventDefault();
|
|
49976
|
+
return true;
|
|
49977
|
+
}
|
|
49978
|
+
return false;
|
|
49979
|
+
},
|
|
49980
|
+
mousedown: (_view, event) => {
|
|
49981
|
+
if (!editor.options.editable) {
|
|
49982
|
+
event.preventDefault();
|
|
49983
|
+
return true;
|
|
49984
|
+
}
|
|
49985
|
+
return false;
|
|
49986
|
+
},
|
|
49987
|
+
focus: (view, event) => {
|
|
49988
|
+
if (!editor.options.editable) {
|
|
49989
|
+
event.preventDefault();
|
|
49990
|
+
view.dom.blur();
|
|
49991
|
+
return true;
|
|
49992
|
+
}
|
|
49993
|
+
return false;
|
|
49994
|
+
}
|
|
49995
|
+
},
|
|
49996
|
+
handleClick: () => !editor.options.editable,
|
|
49997
|
+
handleDoubleClick: () => !editor.options.editable,
|
|
49998
|
+
handleTripleClick: () => !editor.options.editable
|
|
49950
49999
|
}
|
|
49951
50000
|
});
|
|
49952
50001
|
return [editablePlugin];
|
|
@@ -53504,7 +53553,7 @@ const isHeadless = (editor) => {
|
|
|
53504
53553
|
const shouldSkipNodeView = (editor) => {
|
|
53505
53554
|
return isHeadless(editor);
|
|
53506
53555
|
};
|
|
53507
|
-
const summaryVersion = "1.0.0-beta.
|
|
53556
|
+
const summaryVersion = "1.0.0-beta.22";
|
|
53508
53557
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
53509
53558
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
53510
53559
|
function mapAttributes(attrs) {
|
|
@@ -53909,10 +53958,23 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
53909
53958
|
this.view.updateState(this.state);
|
|
53910
53959
|
}
|
|
53911
53960
|
/**
|
|
53912
|
-
* Set whether the editor is editable
|
|
53961
|
+
* Set whether the editor is editable.
|
|
53962
|
+
*
|
|
53963
|
+
* When setting to non-editable, this method:
|
|
53964
|
+
* - Forces ProseMirror to re-evaluate the editable prop from the Editable plugin
|
|
53965
|
+
* - Blurs the editor to remove the cursor
|
|
53966
|
+
*
|
|
53967
|
+
* @param editable - Whether the editor should accept user input (default: true)
|
|
53968
|
+
* @param emitUpdate - Whether to emit an update event after changing editability (default: true)
|
|
53913
53969
|
*/
|
|
53914
53970
|
setEditable(editable = true, emitUpdate = true) {
|
|
53915
53971
|
this.setOptions({ editable });
|
|
53972
|
+
if (this.view) {
|
|
53973
|
+
this.view.setProps({});
|
|
53974
|
+
if (!editable && this.view.dom) {
|
|
53975
|
+
this.view.dom.blur();
|
|
53976
|
+
}
|
|
53977
|
+
}
|
|
53916
53978
|
if (emitUpdate) {
|
|
53917
53979
|
this.emit("update", { editor: this, transaction: this.state.tr });
|
|
53918
53980
|
}
|
|
@@ -54280,7 +54342,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
54280
54342
|
{ default: remarkStringify },
|
|
54281
54343
|
{ default: remarkGfm }
|
|
54282
54344
|
] = await Promise.all([
|
|
54283
|
-
Promise.resolve().then(() => require("./index-
|
|
54345
|
+
Promise.resolve().then(() => require("./index-895wSAjT-CWlZl8zz.cjs")),
|
|
54284
54346
|
Promise.resolve().then(() => require("./index-DRCvimau-H4Ck3S9a.cjs")),
|
|
54285
54347
|
Promise.resolve().then(() => require("./index-C_x_N6Uh-Db3CUJMX.cjs")),
|
|
54286
54348
|
Promise.resolve().then(() => require("./index-D_sWOSiG-BtDZzJ6I.cjs")),
|
|
@@ -54485,7 +54547,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
54485
54547
|
* Process collaboration migrations
|
|
54486
54548
|
*/
|
|
54487
54549
|
processCollaborationMigrations() {
|
|
54488
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
54550
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.22");
|
|
54489
54551
|
if (!this.options.ydoc) return;
|
|
54490
54552
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
54491
54553
|
let docVersion = metaMap.get("version");
|
|
@@ -72556,9 +72618,36 @@ const fragmentSignature = (fragment, lookup2) => {
|
|
|
72556
72618
|
}
|
|
72557
72619
|
return base2;
|
|
72558
72620
|
};
|
|
72621
|
+
const hasListMarkerProperties = (attrs) => {
|
|
72622
|
+
if (!attrs || typeof attrs !== "object") return false;
|
|
72623
|
+
const obj = attrs;
|
|
72624
|
+
if (!obj.numberingProperties || typeof obj.numberingProperties !== "object") return false;
|
|
72625
|
+
const numProps = obj.numberingProperties;
|
|
72626
|
+
if ("numId" in numProps) {
|
|
72627
|
+
const numId = numProps.numId;
|
|
72628
|
+
if (typeof numId !== "number" && typeof numId !== "string") return false;
|
|
72629
|
+
}
|
|
72630
|
+
if ("ilvl" in numProps) {
|
|
72631
|
+
const ilvl = numProps.ilvl;
|
|
72632
|
+
if (typeof ilvl !== "number") return false;
|
|
72633
|
+
}
|
|
72634
|
+
if ("wordLayout" in obj && obj.wordLayout !== void 0) {
|
|
72635
|
+
if (typeof obj.wordLayout !== "object" || obj.wordLayout === null) return false;
|
|
72636
|
+
const wordLayout = obj.wordLayout;
|
|
72637
|
+
if ("marker" in wordLayout && wordLayout.marker !== void 0) {
|
|
72638
|
+
if (typeof wordLayout.marker !== "object" || wordLayout.marker === null) return false;
|
|
72639
|
+
const marker = wordLayout.marker;
|
|
72640
|
+
if ("markerText" in marker && marker.markerText !== void 0) {
|
|
72641
|
+
if (typeof marker.markerText !== "string") return false;
|
|
72642
|
+
}
|
|
72643
|
+
}
|
|
72644
|
+
}
|
|
72645
|
+
return true;
|
|
72646
|
+
};
|
|
72559
72647
|
const deriveBlockVersion = (block) => {
|
|
72560
72648
|
if (block.kind === "paragraph") {
|
|
72561
|
-
|
|
72649
|
+
const markerVersion = hasListMarkerProperties(block.attrs) ? `marker:${block.attrs.numberingProperties.numId ?? ""}:${block.attrs.numberingProperties.ilvl ?? 0}:${block.attrs.wordLayout?.marker?.markerText ?? ""}` : "";
|
|
72650
|
+
const runsVersion = block.runs.map((run2) => {
|
|
72562
72651
|
if (run2.kind === "image") {
|
|
72563
72652
|
const imgRun = run2;
|
|
72564
72653
|
return [
|
|
@@ -72601,6 +72690,7 @@ const deriveBlockVersion = (block) => {
|
|
|
72601
72690
|
textRun.token ?? ""
|
|
72602
72691
|
].join(",");
|
|
72603
72692
|
}).join("|");
|
|
72693
|
+
return markerVersion ? `${markerVersion}|${runsVersion}` : runsVersion;
|
|
72604
72694
|
}
|
|
72605
72695
|
if (block.kind === "list") {
|
|
72606
72696
|
return block.items.map((item) => `${item.id}:${item.marker.text}:${deriveBlockVersion(item.paragraph)}`).join("|");
|
|
@@ -77104,7 +77194,12 @@ setupPointerHandlers_fn = function() {
|
|
|
77104
77194
|
setupInputBridge_fn = function() {
|
|
77105
77195
|
__privateGet$1(this, _inputBridge)?.destroy();
|
|
77106
77196
|
const win = __privateGet$1(this, _visibleHost).ownerDocument?.defaultView ?? window;
|
|
77107
|
-
__privateSet(this, _inputBridge, new PresentationInputBridge(
|
|
77197
|
+
__privateSet(this, _inputBridge, new PresentationInputBridge(
|
|
77198
|
+
win,
|
|
77199
|
+
__privateGet$1(this, _visibleHost),
|
|
77200
|
+
() => __privateMethod$1(this, _PresentationEditor_instances, getActiveDomTarget_fn).call(this),
|
|
77201
|
+
() => __privateGet$1(this, _documentMode) !== "viewing"
|
|
77202
|
+
));
|
|
77108
77203
|
__privateGet$1(this, _inputBridge).bind();
|
|
77109
77204
|
};
|
|
77110
77205
|
initHeaderFooterRegistry_fn = function() {
|
|
@@ -77492,6 +77587,10 @@ updateSelection_fn = function() {
|
|
|
77492
77587
|
if (!__privateGet$1(this, _localSelectionLayer)) {
|
|
77493
77588
|
return;
|
|
77494
77589
|
}
|
|
77590
|
+
if (__privateGet$1(this, _documentMode) === "viewing") {
|
|
77591
|
+
__privateGet$1(this, _localSelectionLayer).innerHTML = "";
|
|
77592
|
+
return;
|
|
77593
|
+
}
|
|
77495
77594
|
const layout = __privateGet$1(this, _layoutState).layout;
|
|
77496
77595
|
const selection = this.getActiveEditor().state?.selection;
|
|
77497
77596
|
__privateGet$1(this, _localSelectionLayer).innerHTML = "";
|
|
@@ -78797,11 +78896,27 @@ _PresentationEditor.CURSOR_STYLES = {
|
|
|
78797
78896
|
};
|
|
78798
78897
|
let PresentationEditor = _PresentationEditor;
|
|
78799
78898
|
class PresentationInputBridge {
|
|
78800
|
-
|
|
78899
|
+
/**
|
|
78900
|
+
* Creates a new PresentationInputBridge that forwards user input events from the visible layout
|
|
78901
|
+
* surface to the hidden editor DOM. This enables input handling when the actual editor is not
|
|
78902
|
+
* directly visible to the user.
|
|
78903
|
+
*
|
|
78904
|
+
* @param windowRoot - The window object containing the layout surface and editor target
|
|
78905
|
+
* @param layoutSurface - The visible HTML element that receives user input events (e.g., keyboard, mouse)
|
|
78906
|
+
* @param getTargetDom - Callback that returns the hidden editor's DOM element where events should be forwarded
|
|
78907
|
+
* @param isEditable - Callback that returns whether the editor is in an editable mode (editing/suggesting).
|
|
78908
|
+
* When this returns false (e.g., in viewing mode), keyboard, text, and composition
|
|
78909
|
+
* events will not be forwarded to prevent document modification.
|
|
78910
|
+
* @param onTargetChanged - Optional callback invoked when the target editor DOM element changes
|
|
78911
|
+
* @param options - Optional configuration including:
|
|
78912
|
+
* - useWindowFallback: Whether to attach window-level event listeners as fallback
|
|
78913
|
+
*/
|
|
78914
|
+
constructor(windowRoot, layoutSurface, getTargetDom, isEditable, onTargetChanged, options) {
|
|
78801
78915
|
__privateAdd$1(this, _PresentationInputBridge_instances);
|
|
78802
78916
|
__privateAdd$1(this, _windowRoot);
|
|
78803
78917
|
__privateAdd$1(this, _layoutSurfaces);
|
|
78804
78918
|
__privateAdd$1(this, _getTargetDom);
|
|
78919
|
+
__privateAdd$1(this, _isEditable);
|
|
78805
78920
|
__privateAdd$1(this, _onTargetChanged);
|
|
78806
78921
|
__privateAdd$1(this, _listeners);
|
|
78807
78922
|
__privateAdd$1(this, _currentTarget, null);
|
|
@@ -78810,6 +78925,7 @@ class PresentationInputBridge {
|
|
|
78810
78925
|
__privateSet(this, _windowRoot, windowRoot);
|
|
78811
78926
|
__privateSet(this, _layoutSurfaces, /* @__PURE__ */ new Set([layoutSurface]));
|
|
78812
78927
|
__privateSet(this, _getTargetDom, getTargetDom);
|
|
78928
|
+
__privateSet(this, _isEditable, isEditable);
|
|
78813
78929
|
__privateSet(this, _onTargetChanged, onTargetChanged);
|
|
78814
78930
|
__privateSet(this, _listeners, []);
|
|
78815
78931
|
__privateSet(this, _useWindowFallback, options?.useWindowFallback ?? false);
|
|
@@ -78876,6 +78992,7 @@ class PresentationInputBridge {
|
|
|
78876
78992
|
_windowRoot = /* @__PURE__ */ new WeakMap();
|
|
78877
78993
|
_layoutSurfaces = /* @__PURE__ */ new WeakMap();
|
|
78878
78994
|
_getTargetDom = /* @__PURE__ */ new WeakMap();
|
|
78995
|
+
_isEditable = /* @__PURE__ */ new WeakMap();
|
|
78879
78996
|
_onTargetChanged = /* @__PURE__ */ new WeakMap();
|
|
78880
78997
|
_listeners = /* @__PURE__ */ new WeakMap();
|
|
78881
78998
|
_currentTarget = /* @__PURE__ */ new WeakMap();
|
|
@@ -78906,6 +79023,9 @@ dispatchToTarget_fn = function(originalEvent, synthetic) {
|
|
|
78906
79023
|
}
|
|
78907
79024
|
};
|
|
78908
79025
|
forwardKeyboardEvent_fn = function(event) {
|
|
79026
|
+
if (!__privateGet$1(this, _isEditable).call(this)) {
|
|
79027
|
+
return;
|
|
79028
|
+
}
|
|
78909
79029
|
if (__privateMethod$1(this, _PresentationInputBridge_instances, shouldSkipSurface_fn).call(this, event)) {
|
|
78910
79030
|
return;
|
|
78911
79031
|
}
|
|
@@ -78933,6 +79053,9 @@ forwardKeyboardEvent_fn = function(event) {
|
|
|
78933
79053
|
__privateMethod$1(this, _PresentationInputBridge_instances, dispatchToTarget_fn).call(this, event, synthetic);
|
|
78934
79054
|
};
|
|
78935
79055
|
forwardTextEvent_fn = function(event) {
|
|
79056
|
+
if (!__privateGet$1(this, _isEditable).call(this)) {
|
|
79057
|
+
return;
|
|
79058
|
+
}
|
|
78936
79059
|
if (__privateMethod$1(this, _PresentationInputBridge_instances, shouldSkipSurface_fn).call(this, event)) {
|
|
78937
79060
|
return;
|
|
78938
79061
|
}
|
|
@@ -78963,6 +79086,9 @@ forwardTextEvent_fn = function(event) {
|
|
|
78963
79086
|
});
|
|
78964
79087
|
};
|
|
78965
79088
|
forwardCompositionEvent_fn = function(event) {
|
|
79089
|
+
if (!__privateGet$1(this, _isEditable).call(this)) {
|
|
79090
|
+
return;
|
|
79091
|
+
}
|
|
78966
79092
|
if (__privateMethod$1(this, _PresentationInputBridge_instances, shouldSkipSurface_fn).call(this, event)) {
|
|
78967
79093
|
return;
|
|
78968
79094
|
}
|
|
@@ -78982,6 +79108,9 @@ forwardCompositionEvent_fn = function(event) {
|
|
|
78982
79108
|
__privateMethod$1(this, _PresentationInputBridge_instances, dispatchToTarget_fn).call(this, event, synthetic);
|
|
78983
79109
|
};
|
|
78984
79110
|
forwardContextMenu_fn = function(event) {
|
|
79111
|
+
if (!__privateGet$1(this, _isEditable).call(this)) {
|
|
79112
|
+
return;
|
|
79113
|
+
}
|
|
78985
79114
|
if (__privateMethod$1(this, _PresentationInputBridge_instances, shouldSkipSurface_fn).call(this, event)) {
|
|
78986
79115
|
return;
|
|
78987
79116
|
}
|