superdoc 1.0.0-beta.55 → 1.0.0-beta.56
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-ObG30G-u.cjs → PdfViewer-CnvD--7P.cjs} +1 -1
- package/dist/chunks/{PdfViewer-ARRkZgYS.es.js → PdfViewer-DsYaXp0H.es.js} +1 -1
- package/dist/chunks/{index-DFHwDXHd.cjs → index-BpBdSm3V.cjs} +3 -3
- package/dist/chunks/{index-Bwqb03qi.es.js → index-DF1aQt8V.es.js} +3 -3
- package/dist/chunks/{index-bqjMjne1-DBB94Dlj.es.js → index-DYnUncjo-Br0s3gQs.es.js} +1 -1
- package/dist/chunks/{index-bqjMjne1-CJi4d9NS.cjs → index-DYnUncjo-Uv8YzgRb.cjs} +1 -1
- package/dist/chunks/{super-editor.es-7Twgz-8H.es.js → super-editor.es-BxMwj135.es.js} +43 -17
- package/dist/chunks/{super-editor.es-C2Ob7BbN.cjs → super-editor.es-DkFw0sfq.cjs} +43 -17
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-D33MGATy.js → converter-DwC5XPQX.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-C7Fp89_I.js → docx-zipper-BkCzC50U.js} +1 -1
- package/dist/super-editor/chunks/{editor-BiFHsy25.js → editor-CoKNeouN.js} +44 -18
- package/dist/super-editor/chunks/{index-bqjMjne1.js → index-DYnUncjo.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BNta2qOv.js → toolbar-DUWk-Bwi.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 +45 -19
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,8 +12,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, dispatchWithFallback_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, getPluginKeyName_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _map, _editor2, _descriptors, _collections, _editorEntries, _maxCachedEditors, _editorAccessOrder, _pendingCreations, _cacheHits, _cacheMisses, _evictions, _HeaderFooterEditorManager_instances, hasConverter_fn, extractCollections_fn, collectDescriptors_fn, teardownMissingEditors_fn, teardownEditors_fn, createEditor_fn, createEditorContainer_fn, registerConverterEditor_fn, unregisterConverterEditor_fn, updateAccessOrder_fn, enforceCacheSizeLimit_fn, _manager, _mediaFiles, _blockCache, _HeaderFooterLayoutAdapter_instances, getBlocks_fn, getConverterContext_fn, _selectionOverlay, _activeEditorHost, _activeDecorationContainer, _activeRegion, _borderLine, _dimmingOverlay, _EditorOverlayManager_instances, findDecorationContainer_fn, ensureEditorHost_fn, positionEditorHost_fn, hideDimmingOverlay_fn, showHeaderFooterBorder_fn, hideHeaderFooterBorder_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay2, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _dragHandlerCleanup, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _multiSectionIdentifier, _headerLayoutResults, _footerLayoutResults, _headerLayoutsByRId, _footerLayoutsByRId, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _overlayManager, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _lastSelectedImageBlockId, _dragAnchor, _isDragging, _dragExtensionMode, _remoteCursorState, _remoteCursorElements, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _scrollTimeout, _lastRemoteCursorRenderTime, _remoteCursorThrottleTimeout, _PresentationEditor_instances, collectCommentPositions_fn, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, updateLocalAwarenessCursor_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupDragHandlers_fn, focusEditorAfterImageSelection_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, calculateExtendedSelection_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handlePointerUp, _handleDragOver, _handleDrop, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, layoutPerRIdHeaderFooters_fn, updateDecorationProviders_fn, createDecorationProvider_fn, findHeaderFooterPageForPageNumber_fn, computeDecorationBox_fn, rebuildHeaderFooterRegions_fn, hitTestHeaderFooterRegion_fn, pointInRegion_fn, activateHeaderFooterRegion_fn, enterHeaderFooterMode_fn, exitHeaderFooterMode_fn, getActiveDomTarget_fn, emitHeaderFooterModeChanged_fn, emitHeaderFooterEditingContext_fn, updateAwarenessSession_fn, updateModeBanner_fn, announce_fn, validateHeaderFooterEditPermission_fn, emitHeaderFooterEditBlocked_fn, resolveDescriptorForRegion_fn, createDefaultHeaderFooter_fn, getPageElement_fn, scrollPageIntoView_fn, computeAnchorMap_fn, waitForPageMount_fn, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, syncTrackedChangesPreferences_fn, deriveTrackedChangesMode_fn, deriveTrackedChangesEnabled_fn, getTrackChangesPluginState_fn, computeDefaultLayoutDefaults_fn, parseColumns_fn, inchesToPx_fn, applyZoom_fn, createLayoutMetrics_fn, convertPageLocalToOverlayCoords_fn, normalizeClientPoint_fn, computeCaretLayoutRect_fn, computeCaretLayoutRectFromDOM_fn, computeTableCaretLayoutRect_fn, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _layoutSurfaces, _getTargetDom, _isEditable, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, checkShouldUpdate_fn, updateHTMLAttributes_fn, updateDOMStyles_fn, resolveNeighborParagraphProperties_fn, updateListStyles_fn, initList_fn, checkIsList_fn, createMarker_fn, createSeparator_fn, calculateTabSeparatorStyle_fn, calculateMarkerStyle_fn, removeList_fn, getParagraphContext_fn, scheduleAnimation_fn, cancelScheduledAnimation_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _VectorShapeView_instances, ensureParentPositioned_fn, _ShapeGroupView_instances, ensureParentPositioned_fn2;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as changeListLevel, O as findParentNode, Q as isList, U as updateNumberingProperties, V as ListHelpers, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName$1, $ as TrackInsertMarkName$1, a0 as v4, a1 as TrackFormatMarkName$1, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as decodeRPrFromMarks, ar as calculateResolvedParagraphProperties, as as resolveRunProperties, at as encodeCSSFromPPr, au as twipsToPixels$2, av as encodeCSSFromRPr, aw as generateOrderedListIndex, ax as docxNumberingHelpers, ay as InputRule, az as convertSizeToCSS, aA as SelectionRange, aB as Transform, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-
|
|
16
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as changeListLevel, O as findParentNode, Q as isList, U as updateNumberingProperties, V as ListHelpers, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName$1, $ as TrackInsertMarkName$1, a0 as v4, a1 as TrackFormatMarkName$1, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as decodeRPrFromMarks, ar as calculateResolvedParagraphProperties, as as resolveRunProperties, at as encodeCSSFromPPr, au as twipsToPixels$2, av as encodeCSSFromRPr, aw as generateOrderedListIndex, ax as docxNumberingHelpers, ay as InputRule, az as convertSizeToCSS, aA as SelectionRange, aB as Transform, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-DwC5XPQX.js";
|
|
16
|
+
import { D as DocxZipper } from "./docx-zipper-BkCzC50U.js";
|
|
17
17
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
|
|
18
18
|
var GOOD_LEAF_SIZE = 200;
|
|
19
19
|
var RopeSequence = function RopeSequence2() {
|
|
@@ -13918,7 +13918,7 @@ const isHeadless = (editor) => {
|
|
|
13918
13918
|
const shouldSkipNodeView = (editor) => {
|
|
13919
13919
|
return isHeadless(editor);
|
|
13920
13920
|
};
|
|
13921
|
-
const summaryVersion = "1.0.0-beta.
|
|
13921
|
+
const summaryVersion = "1.0.0-beta.56";
|
|
13922
13922
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
13923
13923
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
13924
13924
|
function mapAttributes(attrs) {
|
|
@@ -14710,7 +14710,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14710
14710
|
{ default: remarkStringify },
|
|
14711
14711
|
{ default: remarkGfm }
|
|
14712
14712
|
] = await Promise.all([
|
|
14713
|
-
import("./index-
|
|
14713
|
+
import("./index-DYnUncjo.js"),
|
|
14714
14714
|
import("./index-DRCvimau.js"),
|
|
14715
14715
|
import("./index-C_x_N6Uh.js"),
|
|
14716
14716
|
import("./index-D_sWOSiG.js"),
|
|
@@ -14915,7 +14915,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14915
14915
|
* Process collaboration migrations
|
|
14916
14916
|
*/
|
|
14917
14917
|
processCollaborationMigrations() {
|
|
14918
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
14918
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.56");
|
|
14919
14919
|
if (!this.options.ydoc) return;
|
|
14920
14920
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
14921
14921
|
let docVersion = metaMap.get("version");
|
|
@@ -15950,7 +15950,15 @@ const VALID_TRACKED_MODES = ["review", "original", "final", "off"];
|
|
|
15950
15950
|
const DEFAULT_HYPERLINK_CONFIG$1 = {
|
|
15951
15951
|
enableRichHyperlinks: false
|
|
15952
15952
|
};
|
|
15953
|
-
const ATOMIC_INLINE_TYPES = /* @__PURE__ */ new Set([
|
|
15953
|
+
const ATOMIC_INLINE_TYPES = /* @__PURE__ */ new Set([
|
|
15954
|
+
"image",
|
|
15955
|
+
"hardBreak",
|
|
15956
|
+
"lineBreak",
|
|
15957
|
+
"page-number",
|
|
15958
|
+
"total-page-number",
|
|
15959
|
+
"passthroughInline",
|
|
15960
|
+
"bookmarkEnd"
|
|
15961
|
+
]);
|
|
15954
15962
|
const TOKEN_INLINE_TYPES = /* @__PURE__ */ new Map([
|
|
15955
15963
|
["page-number", "pageNumber"],
|
|
15956
15964
|
["total-page-number", "totalPageCount"]
|
|
@@ -34574,6 +34582,7 @@ const rangesOverlap = (startA, endA, startB, endB) => {
|
|
|
34574
34582
|
return effectiveEndA > startB && startA < endB;
|
|
34575
34583
|
};
|
|
34576
34584
|
function hitTestPage(layout, point) {
|
|
34585
|
+
const pageGap = layout.pageGap ?? 0;
|
|
34577
34586
|
let cursorY = 0;
|
|
34578
34587
|
for (let pageIndex = 0; pageIndex < layout.pages.length; pageIndex += 1) {
|
|
34579
34588
|
const page = layout.pages[pageIndex];
|
|
@@ -34582,7 +34591,7 @@ function hitTestPage(layout, point) {
|
|
|
34582
34591
|
if (point.y >= top2 && point.y < bottom2) {
|
|
34583
34592
|
return { pageIndex, page };
|
|
34584
34593
|
}
|
|
34585
|
-
cursorY = bottom2;
|
|
34594
|
+
cursorY = bottom2 + pageGap;
|
|
34586
34595
|
}
|
|
34587
34596
|
return null;
|
|
34588
34597
|
}
|
|
@@ -34791,9 +34800,10 @@ function clickToPosition(layout, blocks, measures, containerPoint, domContainer,
|
|
|
34791
34800
|
if (!pageHit) {
|
|
34792
34801
|
return null;
|
|
34793
34802
|
}
|
|
34803
|
+
const pageGap = layout.pageGap ?? 0;
|
|
34794
34804
|
const pageRelativePoint = {
|
|
34795
34805
|
x: containerPoint.x,
|
|
34796
|
-
y: containerPoint.y - pageHit.pageIndex * layout.pageSize.h
|
|
34806
|
+
y: containerPoint.y - pageHit.pageIndex * (layout.pageSize.h + pageGap)
|
|
34797
34807
|
};
|
|
34798
34808
|
logClickStage("log", "page-hit", {
|
|
34799
34809
|
pageIndex: pageHit.pageIndex
|
|
@@ -35014,7 +35024,7 @@ function selectionToRects(layout, blocks, measures, from2, to) {
|
|
|
35014
35024
|
const rectY = fragment.y + lineOffset;
|
|
35015
35025
|
rects.push({
|
|
35016
35026
|
x: rectX,
|
|
35017
|
-
y: rectY + pageIndex * layout.pageSize.h,
|
|
35027
|
+
y: rectY + pageIndex * (layout.pageSize.h + (layout.pageGap ?? 0)),
|
|
35018
35028
|
width: rectWidth,
|
|
35019
35029
|
height: line.lineHeight,
|
|
35020
35030
|
pageIndex
|
|
@@ -35131,7 +35141,7 @@ function selectionToRects(layout, blocks, measures, from2, to) {
|
|
|
35131
35141
|
const rectY = fragment.y + rowOffset + blockTopCursor + lineOffset;
|
|
35132
35142
|
rects.push({
|
|
35133
35143
|
x: rectX,
|
|
35134
|
-
y: rectY + pageIndex * layout.pageSize.h,
|
|
35144
|
+
y: rectY + pageIndex * (layout.pageSize.h + (layout.pageGap ?? 0)),
|
|
35135
35145
|
width: rectWidth,
|
|
35136
35146
|
height: line.lineHeight,
|
|
35137
35147
|
pageIndex
|
|
@@ -35160,7 +35170,7 @@ function selectionToRects(layout, blocks, measures, from2, to) {
|
|
|
35160
35170
|
if (!rangesOverlap(pmRange.pmStart, pmRange.pmEnd, from2, to)) return;
|
|
35161
35171
|
rects.push({
|
|
35162
35172
|
x: fragment.x,
|
|
35163
|
-
y: fragment.y + pageIndex * layout.pageSize.h,
|
|
35173
|
+
y: fragment.y + pageIndex * (layout.pageSize.h + (layout.pageGap ?? 0)),
|
|
35164
35174
|
width: fragment.width,
|
|
35165
35175
|
height: fragment.height,
|
|
35166
35176
|
pageIndex
|
|
@@ -38183,6 +38193,8 @@ function isValidFieldAnnotationAttributes(attrs) {
|
|
|
38183
38193
|
const FIELD_ANNOTATION_DATA_TYPE = "fieldAnnotation";
|
|
38184
38194
|
const DEFAULT_PAGE_SIZE = { w: 612, h: 792 };
|
|
38185
38195
|
const DEFAULT_MARGINS = { top: 72, right: 72, bottom: 72, left: 72 };
|
|
38196
|
+
const DEFAULT_VIRTUALIZED_PAGE_GAP = 72;
|
|
38197
|
+
const DEFAULT_PAGE_GAP = 24;
|
|
38186
38198
|
const WORD_CHARACTER_REGEX = /[\p{L}\p{N}''_~-]/u;
|
|
38187
38199
|
const MULTI_CLICK_TIME_THRESHOLD_MS = 400;
|
|
38188
38200
|
const MULTI_CLICK_DISTANCE_THRESHOLD_PX = 5;
|
|
@@ -39313,8 +39325,9 @@ const _PresentationEditor = class _PresentationEditor extends EventEmitter {
|
|
|
39313
39325
|
const rawRects = layoutRectSource();
|
|
39314
39326
|
if (!rawRects.length) return [];
|
|
39315
39327
|
const pageHeight = __privateGet(this, _session).mode === "body" ? __privateMethod(this, _PresentationEditor_instances, getBodyPageHeight_fn).call(this) : __privateMethod(this, _PresentationEditor_instances, getHeaderFooterPageHeight_fn).call(this);
|
|
39328
|
+
const pageGap = __privateGet(this, _layoutState).layout?.pageGap ?? 0;
|
|
39316
39329
|
return rawRects.map((rect) => {
|
|
39317
|
-
const pageLocalY = rect.y - rect.pageIndex * pageHeight;
|
|
39330
|
+
const pageLocalY = rect.y - rect.pageIndex * (pageHeight + pageGap);
|
|
39318
39331
|
const coords = __privateMethod(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect.pageIndex, rect.x, pageLocalY);
|
|
39319
39332
|
if (!coords) return null;
|
|
39320
39333
|
const absLeft = coords.x * zoom + overlayRect.left;
|
|
@@ -39566,7 +39579,8 @@ const _PresentationEditor = class _PresentationEditor extends EventEmitter {
|
|
|
39566
39579
|
return null;
|
|
39567
39580
|
}
|
|
39568
39581
|
const pageHeight = __privateMethod(this, _PresentationEditor_instances, getBodyPageHeight_fn).call(this);
|
|
39569
|
-
const
|
|
39582
|
+
const pageGap = __privateGet(this, _layoutState).layout?.pageGap ?? 0;
|
|
39583
|
+
const pageLocalY = rect2.y - rect2.pageIndex * (pageHeight + pageGap);
|
|
39570
39584
|
const coords = __privateMethod(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect2.pageIndex, rect2.x, pageLocalY);
|
|
39571
39585
|
if (!coords) {
|
|
39572
39586
|
return null;
|
|
@@ -40483,10 +40497,11 @@ renderRemoteSelection_fn = function(cursor) {
|
|
|
40483
40497
|
const color = __privateMethod(this, _PresentationEditor_instances, getValidatedColor_fn).call(this, cursor);
|
|
40484
40498
|
const opacity = __privateGet(this, _layoutOptions).presence?.highlightOpacity ?? 0.35;
|
|
40485
40499
|
const pageHeight = layout.pageSize?.h ?? __privateGet(this, _layoutOptions).pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
40500
|
+
const pageGap = layout.pageGap ?? 0;
|
|
40486
40501
|
const doc2 = __privateGet(this, _visibleHost).ownerDocument ?? document;
|
|
40487
40502
|
const limitedRects = rects.slice(0, MAX_SELECTION_RECTS_PER_USER);
|
|
40488
40503
|
limitedRects.forEach((rect) => {
|
|
40489
|
-
const pageLocalY = rect.y - rect.pageIndex * pageHeight;
|
|
40504
|
+
const pageLocalY = rect.y - rect.pageIndex * (pageHeight + pageGap);
|
|
40490
40505
|
const coords = __privateMethod(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect.pageIndex, rect.x, pageLocalY);
|
|
40491
40506
|
if (!coords) return;
|
|
40492
40507
|
const selectionEl = doc2.createElement("div");
|
|
@@ -41042,6 +41057,12 @@ rerender_fn = async function() {
|
|
|
41042
41057
|
return;
|
|
41043
41058
|
}
|
|
41044
41059
|
({ layout, measures } = result);
|
|
41060
|
+
if (__privateGet(this, _layoutOptions).virtualization?.enabled) {
|
|
41061
|
+
const gap = __privateGet(this, _layoutOptions).virtualization.gap ?? DEFAULT_VIRTUALIZED_PAGE_GAP;
|
|
41062
|
+
layout.pageGap = Math.max(0, gap);
|
|
41063
|
+
} else {
|
|
41064
|
+
layout.pageGap = DEFAULT_PAGE_GAP;
|
|
41065
|
+
}
|
|
41045
41066
|
headerLayouts = result.headers;
|
|
41046
41067
|
footerLayouts = result.footers;
|
|
41047
41068
|
} catch (error) {
|
|
@@ -41614,9 +41635,10 @@ hitTestHeaderFooterRegion_fn = function(x, y) {
|
|
|
41614
41635
|
const layout = __privateGet(this, _layoutState).layout;
|
|
41615
41636
|
if (!layout) return null;
|
|
41616
41637
|
const pageHeight = layout.pageSize?.h ?? __privateGet(this, _layoutOptions).pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
41638
|
+
const pageGap = layout.pageGap ?? 0;
|
|
41617
41639
|
if (pageHeight <= 0) return null;
|
|
41618
|
-
const pageIndex = Math.max(0, Math.floor(y / pageHeight));
|
|
41619
|
-
const pageLocalY = y - pageIndex * pageHeight;
|
|
41640
|
+
const pageIndex = Math.max(0, Math.floor(y / (pageHeight + pageGap)));
|
|
41641
|
+
const pageLocalY = y - pageIndex * (pageHeight + pageGap);
|
|
41620
41642
|
const headerRegion = __privateGet(this, _headerRegions).get(pageIndex);
|
|
41621
41643
|
if (headerRegion && __privateMethod(this, _PresentationEditor_instances, pointInRegion_fn).call(this, headerRegion, x, pageLocalY)) {
|
|
41622
41644
|
return headerRegion;
|
|
@@ -42070,8 +42092,9 @@ renderSelectionRects_fn = function(rects) {
|
|
|
42070
42092
|
return;
|
|
42071
42093
|
}
|
|
42072
42094
|
const pageHeight = __privateMethod(this, _PresentationEditor_instances, getBodyPageHeight_fn).call(this);
|
|
42095
|
+
const pageGap = __privateGet(this, _layoutState).layout?.pageGap ?? 0;
|
|
42073
42096
|
rects.forEach((rect, _index) => {
|
|
42074
|
-
const pageLocalY = rect.y - rect.pageIndex * pageHeight;
|
|
42097
|
+
const pageLocalY = rect.y - rect.pageIndex * (pageHeight + pageGap);
|
|
42075
42098
|
const coords = __privateMethod(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect.pageIndex, rect.x, pageLocalY);
|
|
42076
42099
|
if (!coords) {
|
|
42077
42100
|
return;
|
|
@@ -42356,9 +42379,10 @@ convertPageLocalToOverlayCoords_fn = function(pageIndex, pageLocalX, pageLocalY)
|
|
|
42356
42379
|
return null;
|
|
42357
42380
|
}
|
|
42358
42381
|
const pageHeight = __privateGet(this, _layoutOptions).pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
42382
|
+
const pageGap = __privateGet(this, _layoutState).layout?.pageGap ?? 0;
|
|
42359
42383
|
return {
|
|
42360
42384
|
x: pageLocalX,
|
|
42361
|
-
y: pageIndex * pageHeight + pageLocalY
|
|
42385
|
+
y: pageIndex * (pageHeight + pageGap) + pageLocalY
|
|
42362
42386
|
};
|
|
42363
42387
|
};
|
|
42364
42388
|
normalizeClientPoint_fn = function(clientX, clientY) {
|
|
@@ -56182,6 +56206,8 @@ const PassthroughInline = Node$1.create({
|
|
|
56182
56206
|
name: "passthroughInline",
|
|
56183
56207
|
group: "inline",
|
|
56184
56208
|
inline: true,
|
|
56209
|
+
// IMPORTANT: This node is registered in pm-adapter/src/constants.ts ATOMIC_INLINE_TYPES
|
|
56210
|
+
// If you change atom to false, you MUST remove it from that set to avoid positioning bugs
|
|
56185
56211
|
atom: true,
|
|
56186
56212
|
draggable: false,
|
|
56187
56213
|
selectable: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, onMounted, onBeforeUnmount, createVNode, readonly, watch, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
|
-
import { p as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { p as process$1 } from "./converter-DwC5XPQX.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CoKNeouN.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-CoKNeouN.js";
|
|
2
|
+
import "./chunks/converter-DwC5XPQX.js";
|
|
3
|
+
import "./chunks/docx-zipper-BkCzC50U.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
11
11
|
var _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
|
|
12
|
-
import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { ac, i, a9, aQ } from "./chunks/converter-
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as 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 { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-DwC5XPQX.js";
|
|
13
|
+
import { ac, i, a9, aQ } from "./chunks/converter-DwC5XPQX.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-CoKNeouN.js";
|
|
15
|
+
import { z, F, B, T, w, C, x } from "./chunks/editor-CoKNeouN.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, defineComponent, reactive, onUnmounted, renderSlot, useCssVars, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-DUWk-Bwi.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-BkCzC50U.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-DkFw0sfq.cjs");
|
|
4
4
|
require("./chunks/vue-jWLMl8Ts.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-BxMwj135.es.js";
|
|
2
2
|
import "./chunks/vue-Dysv_7z5.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-DkFw0sfq.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-BpBdSm3V.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-BxMwj135.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-DF1aQt8V.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
|
@@ -42186,7 +42186,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42186
42186
|
static getStoredSuperdocVersion(docx) {
|
|
42187
42187
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42188
42188
|
}
|
|
42189
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42189
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.56") {
|
|
42190
42190
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42191
42191
|
}
|
|
42192
42192
|
/**
|
|
@@ -67225,7 +67225,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67225
67225
|
const shouldSkipNodeView = (editor) => {
|
|
67226
67226
|
return isHeadless(editor);
|
|
67227
67227
|
};
|
|
67228
|
-
const summaryVersion = "1.0.0-beta.
|
|
67228
|
+
const summaryVersion = "1.0.0-beta.56";
|
|
67229
67229
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
67230
67230
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
67231
67231
|
function mapAttributes(attrs) {
|
|
@@ -68014,7 +68014,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68014
68014
|
{ default: remarkStringify2 },
|
|
68015
68015
|
{ default: remarkGfm2 }
|
|
68016
68016
|
] = await Promise.all([
|
|
68017
|
-
Promise.resolve().then(() =>
|
|
68017
|
+
Promise.resolve().then(() => indexDYnUncjo),
|
|
68018
68018
|
Promise.resolve().then(() => indexDRCvimau),
|
|
68019
68019
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
68020
68020
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -68219,7 +68219,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68219
68219
|
* Process collaboration migrations
|
|
68220
68220
|
*/
|
|
68221
68221
|
processCollaborationMigrations() {
|
|
68222
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
68222
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.56");
|
|
68223
68223
|
if (!this.options.ydoc) return;
|
|
68224
68224
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
68225
68225
|
let docVersion = metaMap.get("version");
|
|
@@ -69166,7 +69166,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
69166
69166
|
const DEFAULT_HYPERLINK_CONFIG$1 = {
|
|
69167
69167
|
enableRichHyperlinks: false
|
|
69168
69168
|
};
|
|
69169
|
-
const ATOMIC_INLINE_TYPES = /* @__PURE__ */ new Set([
|
|
69169
|
+
const ATOMIC_INLINE_TYPES = /* @__PURE__ */ new Set([
|
|
69170
|
+
"image",
|
|
69171
|
+
"hardBreak",
|
|
69172
|
+
"lineBreak",
|
|
69173
|
+
"page-number",
|
|
69174
|
+
"total-page-number",
|
|
69175
|
+
"passthroughInline",
|
|
69176
|
+
"bookmarkEnd"
|
|
69177
|
+
]);
|
|
69170
69178
|
const TOKEN_INLINE_TYPES = /* @__PURE__ */ new Map([
|
|
69171
69179
|
["page-number", "pageNumber"],
|
|
69172
69180
|
["total-page-number", "totalPageCount"]
|
|
@@ -87790,6 +87798,7 @@ ${l}
|
|
|
87790
87798
|
return effectiveEndA > startB && startA < endB;
|
|
87791
87799
|
};
|
|
87792
87800
|
function hitTestPage(layout, point2) {
|
|
87801
|
+
const pageGap = layout.pageGap ?? 0;
|
|
87793
87802
|
let cursorY = 0;
|
|
87794
87803
|
for (let pageIndex = 0; pageIndex < layout.pages.length; pageIndex += 1) {
|
|
87795
87804
|
const page = layout.pages[pageIndex];
|
|
@@ -87798,7 +87807,7 @@ ${l}
|
|
|
87798
87807
|
if (point2.y >= top2 && point2.y < bottom2) {
|
|
87799
87808
|
return { pageIndex, page };
|
|
87800
87809
|
}
|
|
87801
|
-
cursorY = bottom2;
|
|
87810
|
+
cursorY = bottom2 + pageGap;
|
|
87802
87811
|
}
|
|
87803
87812
|
return null;
|
|
87804
87813
|
}
|
|
@@ -88007,9 +88016,10 @@ ${l}
|
|
|
88007
88016
|
if (!pageHit) {
|
|
88008
88017
|
return null;
|
|
88009
88018
|
}
|
|
88019
|
+
const pageGap = layout.pageGap ?? 0;
|
|
88010
88020
|
const pageRelativePoint = {
|
|
88011
88021
|
x: containerPoint.x,
|
|
88012
|
-
y: containerPoint.y - pageHit.pageIndex * layout.pageSize.h
|
|
88022
|
+
y: containerPoint.y - pageHit.pageIndex * (layout.pageSize.h + pageGap)
|
|
88013
88023
|
};
|
|
88014
88024
|
logClickStage("log", "page-hit", {
|
|
88015
88025
|
pageIndex: pageHit.pageIndex
|
|
@@ -88230,7 +88240,7 @@ ${l}
|
|
|
88230
88240
|
const rectY = fragment.y + lineOffset;
|
|
88231
88241
|
rects.push({
|
|
88232
88242
|
x: rectX,
|
|
88233
|
-
y: rectY + pageIndex * layout.pageSize.h,
|
|
88243
|
+
y: rectY + pageIndex * (layout.pageSize.h + (layout.pageGap ?? 0)),
|
|
88234
88244
|
width: rectWidth,
|
|
88235
88245
|
height: line.lineHeight,
|
|
88236
88246
|
pageIndex
|
|
@@ -88347,7 +88357,7 @@ ${l}
|
|
|
88347
88357
|
const rectY = fragment.y + rowOffset + blockTopCursor + lineOffset;
|
|
88348
88358
|
rects.push({
|
|
88349
88359
|
x: rectX,
|
|
88350
|
-
y: rectY + pageIndex * layout.pageSize.h,
|
|
88360
|
+
y: rectY + pageIndex * (layout.pageSize.h + (layout.pageGap ?? 0)),
|
|
88351
88361
|
width: rectWidth,
|
|
88352
88362
|
height: line.lineHeight,
|
|
88353
88363
|
pageIndex
|
|
@@ -88376,7 +88386,7 @@ ${l}
|
|
|
88376
88386
|
if (!rangesOverlap(pmRange.pmStart, pmRange.pmEnd, from2, to)) return;
|
|
88377
88387
|
rects.push({
|
|
88378
88388
|
x: fragment.x,
|
|
88379
|
-
y: fragment.y + pageIndex * layout.pageSize.h,
|
|
88389
|
+
y: fragment.y + pageIndex * (layout.pageSize.h + (layout.pageGap ?? 0)),
|
|
88380
88390
|
width: fragment.width,
|
|
88381
88391
|
height: fragment.height,
|
|
88382
88392
|
pageIndex
|
|
@@ -91290,6 +91300,8 @@ ${l}
|
|
|
91290
91300
|
const FIELD_ANNOTATION_DATA_TYPE = "fieldAnnotation";
|
|
91291
91301
|
const DEFAULT_PAGE_SIZE = { w: 612, h: 792 };
|
|
91292
91302
|
const DEFAULT_MARGINS = { top: 72, right: 72, bottom: 72, left: 72 };
|
|
91303
|
+
const DEFAULT_VIRTUALIZED_PAGE_GAP = 72;
|
|
91304
|
+
const DEFAULT_PAGE_GAP = 24;
|
|
91293
91305
|
const WORD_CHARACTER_REGEX = /[\p{L}\p{N}''_~-]/u;
|
|
91294
91306
|
const MULTI_CLICK_TIME_THRESHOLD_MS = 400;
|
|
91295
91307
|
const MULTI_CLICK_DISTANCE_THRESHOLD_PX = 5;
|
|
@@ -92364,8 +92376,9 @@ ${l}
|
|
|
92364
92376
|
const rawRects = layoutRectSource();
|
|
92365
92377
|
if (!rawRects.length) return [];
|
|
92366
92378
|
const pageHeight = __privateGet$1(this, _session).mode === "body" ? __privateMethod$1(this, _PresentationEditor_instances, getBodyPageHeight_fn).call(this) : __privateMethod$1(this, _PresentationEditor_instances, getHeaderFooterPageHeight_fn).call(this);
|
|
92379
|
+
const pageGap = __privateGet$1(this, _layoutState).layout?.pageGap ?? 0;
|
|
92367
92380
|
return rawRects.map((rect) => {
|
|
92368
|
-
const pageLocalY = rect.y - rect.pageIndex * pageHeight;
|
|
92381
|
+
const pageLocalY = rect.y - rect.pageIndex * (pageHeight + pageGap);
|
|
92369
92382
|
const coords = __privateMethod$1(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect.pageIndex, rect.x, pageLocalY);
|
|
92370
92383
|
if (!coords) return null;
|
|
92371
92384
|
const absLeft = coords.x * zoom + overlayRect.left;
|
|
@@ -92617,7 +92630,8 @@ ${l}
|
|
|
92617
92630
|
return null;
|
|
92618
92631
|
}
|
|
92619
92632
|
const pageHeight = __privateMethod$1(this, _PresentationEditor_instances, getBodyPageHeight_fn).call(this);
|
|
92620
|
-
const
|
|
92633
|
+
const pageGap = __privateGet$1(this, _layoutState).layout?.pageGap ?? 0;
|
|
92634
|
+
const pageLocalY = rect2.y - rect2.pageIndex * (pageHeight + pageGap);
|
|
92621
92635
|
const coords = __privateMethod$1(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect2.pageIndex, rect2.x, pageLocalY);
|
|
92622
92636
|
if (!coords) {
|
|
92623
92637
|
return null;
|
|
@@ -93361,10 +93375,11 @@ ${l}
|
|
|
93361
93375
|
const color2 = __privateMethod$1(this, _PresentationEditor_instances, getValidatedColor_fn).call(this, cursor);
|
|
93362
93376
|
const opacity = __privateGet$1(this, _layoutOptions).presence?.highlightOpacity ?? 0.35;
|
|
93363
93377
|
const pageHeight = layout.pageSize?.h ?? __privateGet$1(this, _layoutOptions).pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
93378
|
+
const pageGap = layout.pageGap ?? 0;
|
|
93364
93379
|
const doc2 = __privateGet$1(this, _visibleHost).ownerDocument ?? document;
|
|
93365
93380
|
const limitedRects = rects.slice(0, MAX_SELECTION_RECTS_PER_USER);
|
|
93366
93381
|
limitedRects.forEach((rect) => {
|
|
93367
|
-
const pageLocalY = rect.y - rect.pageIndex * pageHeight;
|
|
93382
|
+
const pageLocalY = rect.y - rect.pageIndex * (pageHeight + pageGap);
|
|
93368
93383
|
const coords = __privateMethod$1(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect.pageIndex, rect.x, pageLocalY);
|
|
93369
93384
|
if (!coords) return;
|
|
93370
93385
|
const selectionEl = doc2.createElement("div");
|
|
@@ -93827,6 +93842,12 @@ ${l}
|
|
|
93827
93842
|
return;
|
|
93828
93843
|
}
|
|
93829
93844
|
({ layout, measures } = result);
|
|
93845
|
+
if (__privateGet$1(this, _layoutOptions).virtualization?.enabled) {
|
|
93846
|
+
const gap = __privateGet$1(this, _layoutOptions).virtualization.gap ?? DEFAULT_VIRTUALIZED_PAGE_GAP;
|
|
93847
|
+
layout.pageGap = Math.max(0, gap);
|
|
93848
|
+
} else {
|
|
93849
|
+
layout.pageGap = DEFAULT_PAGE_GAP;
|
|
93850
|
+
}
|
|
93830
93851
|
headerLayouts = result.headers;
|
|
93831
93852
|
footerLayouts = result.footers;
|
|
93832
93853
|
} catch (error) {
|
|
@@ -94314,9 +94335,10 @@ ${l}
|
|
|
94314
94335
|
const layout = __privateGet$1(this, _layoutState).layout;
|
|
94315
94336
|
if (!layout) return null;
|
|
94316
94337
|
const pageHeight = layout.pageSize?.h ?? __privateGet$1(this, _layoutOptions).pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
94338
|
+
const pageGap = layout.pageGap ?? 0;
|
|
94317
94339
|
if (pageHeight <= 0) return null;
|
|
94318
|
-
const pageIndex = Math.max(0, Math.floor(y2 / pageHeight));
|
|
94319
|
-
const pageLocalY = y2 - pageIndex * pageHeight;
|
|
94340
|
+
const pageIndex = Math.max(0, Math.floor(y2 / (pageHeight + pageGap)));
|
|
94341
|
+
const pageLocalY = y2 - pageIndex * (pageHeight + pageGap);
|
|
94320
94342
|
const headerRegion = __privateGet$1(this, _headerRegions).get(pageIndex);
|
|
94321
94343
|
if (headerRegion && __privateMethod$1(this, _PresentationEditor_instances, pointInRegion_fn).call(this, headerRegion, x2, pageLocalY)) {
|
|
94322
94344
|
return headerRegion;
|
|
@@ -94741,8 +94763,9 @@ ${l}
|
|
|
94741
94763
|
return;
|
|
94742
94764
|
}
|
|
94743
94765
|
const pageHeight = __privateMethod$1(this, _PresentationEditor_instances, getBodyPageHeight_fn).call(this);
|
|
94766
|
+
const pageGap = __privateGet$1(this, _layoutState).layout?.pageGap ?? 0;
|
|
94744
94767
|
rects.forEach((rect, _index) => {
|
|
94745
|
-
const pageLocalY = rect.y - rect.pageIndex * pageHeight;
|
|
94768
|
+
const pageLocalY = rect.y - rect.pageIndex * (pageHeight + pageGap);
|
|
94746
94769
|
const coords = __privateMethod$1(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect.pageIndex, rect.x, pageLocalY);
|
|
94747
94770
|
if (!coords) {
|
|
94748
94771
|
return;
|
|
@@ -95000,9 +95023,10 @@ ${l}
|
|
|
95000
95023
|
return null;
|
|
95001
95024
|
}
|
|
95002
95025
|
const pageHeight = __privateGet$1(this, _layoutOptions).pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
95026
|
+
const pageGap = __privateGet$1(this, _layoutState).layout?.pageGap ?? 0;
|
|
95003
95027
|
return {
|
|
95004
95028
|
x: pageLocalX,
|
|
95005
|
-
y: pageIndex * pageHeight + pageLocalY
|
|
95029
|
+
y: pageIndex * (pageHeight + pageGap) + pageLocalY
|
|
95006
95030
|
};
|
|
95007
95031
|
};
|
|
95008
95032
|
normalizeClientPoint_fn = function(clientX, clientY) {
|
|
@@ -108653,6 +108677,8 @@ ${l}
|
|
|
108653
108677
|
name: "passthroughInline",
|
|
108654
108678
|
group: "inline",
|
|
108655
108679
|
inline: true,
|
|
108680
|
+
// IMPORTANT: This node is registered in pm-adapter/src/constants.ts ATOMIC_INLINE_TYPES
|
|
108681
|
+
// If you change atom to false, you MUST remove it from that set to avoid positioning bugs
|
|
108656
108682
|
atom: true,
|
|
108657
108683
|
draggable: false,
|
|
108658
108684
|
selectable: false,
|
|
@@ -148971,7 +148997,7 @@ ${style2}
|
|
|
148971
148997
|
this.config.colors = shuffleArray(this.config.colors);
|
|
148972
148998
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
148973
148999
|
this.colorIndex = 0;
|
|
148974
|
-
this.version = "1.0.0-beta.
|
|
149000
|
+
this.version = "1.0.0-beta.56";
|
|
148975
149001
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
148976
149002
|
this.superdocId = config2.superdocId || v4();
|
|
148977
149003
|
this.colors = this.config.colors;
|
|
@@ -151437,7 +151463,7 @@ ${style2}
|
|
|
151437
151463
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
151438
151464
|
);
|
|
151439
151465
|
}
|
|
151440
|
-
const
|
|
151466
|
+
const indexDYnUncjo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
151441
151467
|
__proto__: null,
|
|
151442
151468
|
unified
|
|
151443
151469
|
}, Symbol.toStringTag, { value: "Module" }));
|