@harbour-enterprises/superdoc 1.6.0 → 1.6.1-next.1
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-DneIW1MC.cjs → PdfViewer-BVmqJGOJ.cjs} +2 -2
- package/dist/chunks/{PdfViewer-DPSkB45m.es.js → PdfViewer-DBn8Nfjt.es.js} +2 -2
- package/dist/chunks/{SuperConverter-C1FmNI_x.cjs → SuperConverter-ACl3uGQE.cjs} +1 -1
- package/dist/chunks/{SuperConverter-pC_QUKG4.es.js → SuperConverter-moeez8-1.es.js} +1 -1
- package/dist/chunks/{index-Dz63gTr1.es.js → index-BInFuKPd.es.js} +4 -4
- package/dist/chunks/{index-59rQIJqV.es.js → index-BkkKmsZx.es.js} +24 -7
- package/dist/chunks/{index-DSu4sode.cjs → index-DuEhB1Tb.cjs} +24 -7
- package/dist/chunks/{index-C1onnoG6.cjs → index-QQFL_n3g.cjs} +4 -4
- package/dist/super-editor/converter.cjs +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +3 -3
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +25 -8
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-De9wkgLl.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
5
|
-
const index = require("./index-
|
|
4
|
+
const superdoc = require("./index-QQFL_n3g.cjs");
|
|
5
|
+
const index = require("./index-DuEhB1Tb.cjs");
|
|
6
6
|
function self(vars) {
|
|
7
7
|
const {
|
|
8
8
|
opacityDisabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as defineComponent, h, T as Transition, p as process$1, w as watchEffect, c as computed, r as ref, f as onMounted, X as onUnmounted, E as createElementBlock, G as openBlock, K as createBaseVNode, M as createCommentVNode, I as createVNode, v as unref } from "./vue-BnBKJwCW.es.js";
|
|
2
|
-
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-
|
|
3
|
-
import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-
|
|
2
|
+
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-BInFuKPd.es.js";
|
|
3
|
+
import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-BkkKmsZx.es.js";
|
|
4
4
|
function self(vars) {
|
|
5
5
|
const {
|
|
6
6
|
opacityDisabled,
|
|
@@ -32670,7 +32670,7 @@ class SuperConverter {
|
|
|
32670
32670
|
static getStoredSuperdocVersion(docx) {
|
|
32671
32671
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
32672
32672
|
}
|
|
32673
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.6.
|
|
32673
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.6.1-next.1") {
|
|
32674
32674
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
32675
32675
|
}
|
|
32676
32676
|
/**
|
|
@@ -32669,7 +32669,7 @@ class SuperConverter {
|
|
|
32669
32669
|
static getStoredSuperdocVersion(docx) {
|
|
32670
32670
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
32671
32671
|
}
|
|
32672
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.6.
|
|
32672
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.6.1-next.1") {
|
|
32673
32673
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
32674
32674
|
}
|
|
32675
32675
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-
|
|
2
|
-
import "./SuperConverter-
|
|
1
|
+
import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-BkkKmsZx.es.js";
|
|
2
|
+
import "./SuperConverter-moeez8-1.es.js";
|
|
3
3
|
import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
import { E as EventEmitter } from "./eventemitter3-CwrdEv8r.es.js";
|
|
5
5
|
import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
|
|
@@ -7513,7 +7513,7 @@ const _sfc_main = {
|
|
|
7513
7513
|
__name: "SuperDoc",
|
|
7514
7514
|
emits: ["selection-update"],
|
|
7515
7515
|
setup(__props, { emit: __emit }) {
|
|
7516
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
7516
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-DBn8Nfjt.es.js"));
|
|
7517
7517
|
const superdocStore = useSuperdocStore();
|
|
7518
7518
|
const commentsStore = useCommentsStore();
|
|
7519
7519
|
const {
|
|
@@ -8467,7 +8467,7 @@ class SuperDoc extends EventEmitter {
|
|
|
8467
8467
|
this.config.colors = shuffleArray(this.config.colors);
|
|
8468
8468
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
8469
8469
|
this.colorIndex = 0;
|
|
8470
|
-
this.version = "1.6.
|
|
8470
|
+
this.version = "1.6.1-next.1";
|
|
8471
8471
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
8472
8472
|
this.superdocId = config.superdocId || v4();
|
|
8473
8473
|
this.colors = this.config.colors;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as Buffer$2 } from "./jszip-B1fkPkPJ.es.js";
|
|
2
2
|
import { t as twipsToInches, i as inchesToTwips, p as ptToTwips, l as linesToTwips, a as twipsToLines, b as pixelsToTwips, h as halfPointToPoints, c as twipsToPixels$2, d as convertSizeToCSS, e as inchesToPixels } from "./helpers-C8e9wR5l.es.js";
|
|
3
|
-
import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as combineIndentProperties, a4 as _getReferencedTableStyles, a5 as decodeRPrFromMarks, a6 as calculateResolvedParagraphProperties, a7 as encodeCSSFromPPr, a8 as encodeCSSFromRPr, a9 as generateOrderedListIndex, aa as docxNumberingHelpers, ab as InputRule, ac as insertNewRelationship, ad as kebabCase$1, ae as getUnderlineCssString } from "./SuperConverter-
|
|
3
|
+
import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as combineIndentProperties, a4 as _getReferencedTableStyles, a5 as decodeRPrFromMarks, a6 as calculateResolvedParagraphProperties, a7 as encodeCSSFromPPr, a8 as encodeCSSFromRPr, a9 as generateOrderedListIndex, aa as docxNumberingHelpers, ab as InputRule, ac as insertNewRelationship, ad as kebabCase$1, ae as getUnderlineCssString } from "./SuperConverter-moeez8-1.es.js";
|
|
4
4
|
import { p as process$1, r as ref, C as global$1, c as computed, E as createElementBlock, F as Fragment$1, S as renderList, O as withModifiers, G as openBlock, P as normalizeClass, M as createCommentVNode, H as toDisplayString, K as createBaseVNode, U as createApp, f as onMounted, X as onUnmounted, R as withDirectives, v as unref, Y as vModelText, y as nextTick, L as normalizeStyle, u as watch, Z as withKeys, _ as createTextVNode, I as createVNode, h as h$1, $ as readonly, s as getCurrentInstance, o as onBeforeUnmount, j as reactive, b as onBeforeMount, i as inject, a0 as onActivated, a1 as onDeactivated, a2 as Comment, d as defineComponent, a as provide, g as Teleport, t as toRef, a3 as renderSlot, a4 as isVNode, D as shallowRef, w as watchEffect, T as Transition, a5 as mergeProps, a6 as vShow, a7 as cloneVNode, a8 as Text$2, m as markRaw, N as createBlock, J as withCtx, a9 as useCssVars, V as resolveDynamicComponent, aa as normalizeProps, ab as guardReactiveProps } from "./vue-BnBKJwCW.es.js";
|
|
5
5
|
import "./jszip.min-DCl8qkFO.es.js";
|
|
6
6
|
import { E as EventEmitter$1 } from "./eventemitter3-CwrdEv8r.es.js";
|
|
@@ -15771,7 +15771,7 @@ const canUseDOM = () => {
|
|
|
15771
15771
|
return false;
|
|
15772
15772
|
}
|
|
15773
15773
|
};
|
|
15774
|
-
const summaryVersion = "1.6.
|
|
15774
|
+
const summaryVersion = "1.6.1-next.1";
|
|
15775
15775
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
15776
15776
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
15777
15777
|
function mapAttributes(attrs) {
|
|
@@ -18438,7 +18438,7 @@ class Editor extends EventEmitter {
|
|
|
18438
18438
|
* Process collaboration migrations
|
|
18439
18439
|
*/
|
|
18440
18440
|
processCollaborationMigrations() {
|
|
18441
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.6.
|
|
18441
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.6.1-next.1");
|
|
18442
18442
|
if (!this.options.ydoc) return;
|
|
18443
18443
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
18444
18444
|
let docVersion = metaMap.get("version");
|
|
@@ -34518,10 +34518,12 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
34518
34518
|
next.pendingColumns = null;
|
|
34519
34519
|
}
|
|
34520
34520
|
if (block.headerRefs || block.footerRefs) {
|
|
34521
|
-
|
|
34521
|
+
const baseSectionRefs = pendingSectionRefs ?? activeSectionRefs;
|
|
34522
|
+
const nextSectionRefs = {
|
|
34522
34523
|
...block.headerRefs && { headerRefs: block.headerRefs },
|
|
34523
34524
|
...block.footerRefs && { footerRefs: block.footerRefs }
|
|
34524
34525
|
};
|
|
34526
|
+
pendingSectionRefs = mergeSectionRefs(baseSectionRefs, nextSectionRefs);
|
|
34525
34527
|
layoutLog(`[Layout] First section: Scheduled pendingSectionRefs:`, pendingSectionRefs);
|
|
34526
34528
|
}
|
|
34527
34529
|
const firstSectionIndexRaw = block.attrs?.sectionIndex;
|
|
@@ -34586,10 +34588,12 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
34586
34588
|
pendingNumbering = { ...block.numbering };
|
|
34587
34589
|
}
|
|
34588
34590
|
if (block.headerRefs || block.footerRefs) {
|
|
34589
|
-
|
|
34591
|
+
const baseSectionRefs = pendingSectionRefs ?? activeSectionRefs;
|
|
34592
|
+
const nextSectionRefs = {
|
|
34590
34593
|
...block.headerRefs && { headerRefs: block.headerRefs },
|
|
34591
34594
|
...block.footerRefs && { footerRefs: block.footerRefs }
|
|
34592
34595
|
};
|
|
34596
|
+
pendingSectionRefs = mergeSectionRefs(baseSectionRefs, nextSectionRefs);
|
|
34593
34597
|
layoutLog(`[Layout] Compat fallback: Scheduled pendingSectionRefs:`, pendingSectionRefs);
|
|
34594
34598
|
}
|
|
34595
34599
|
if (block.attrs?.requirePageBoundary) {
|
|
@@ -34635,6 +34639,17 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
34635
34639
|
let activeNumberFormat = "decimal";
|
|
34636
34640
|
let activePageCounter = 1;
|
|
34637
34641
|
let pendingNumbering = null;
|
|
34642
|
+
const normalizeRefs = (refs) => refs && Object.keys(refs).length > 0 ? refs : void 0;
|
|
34643
|
+
const mergeSectionRefs = (base2, next) => {
|
|
34644
|
+
if (!base2 && !next) return null;
|
|
34645
|
+
const headerRefs = normalizeRefs(next?.headerRefs) ?? normalizeRefs(base2?.headerRefs);
|
|
34646
|
+
const footerRefs = normalizeRefs(next?.footerRefs) ?? normalizeRefs(base2?.footerRefs);
|
|
34647
|
+
if (!headerRefs && !footerRefs) return null;
|
|
34648
|
+
return {
|
|
34649
|
+
...headerRefs && { headerRefs },
|
|
34650
|
+
...footerRefs && { footerRefs }
|
|
34651
|
+
};
|
|
34652
|
+
};
|
|
34638
34653
|
const sectionMetadataList = options.sectionMetadata ?? [];
|
|
34639
34654
|
const initialSectionMetadata = sectionMetadataList[0];
|
|
34640
34655
|
if (initialSectionMetadata?.numbering?.format) {
|
|
@@ -34730,7 +34745,7 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
34730
34745
|
pendingNumbering = null;
|
|
34731
34746
|
}
|
|
34732
34747
|
if (pendingSectionRefs) {
|
|
34733
|
-
activeSectionRefs = pendingSectionRefs;
|
|
34748
|
+
activeSectionRefs = mergeSectionRefs(activeSectionRefs, pendingSectionRefs);
|
|
34734
34749
|
pendingSectionRefs = null;
|
|
34735
34750
|
}
|
|
34736
34751
|
if (pendingSectionIndex !== null) {
|
|
@@ -35033,10 +35048,12 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
35033
35048
|
}
|
|
35034
35049
|
}
|
|
35035
35050
|
if (effectiveBlock.headerRefs || effectiveBlock.footerRefs) {
|
|
35036
|
-
|
|
35051
|
+
const baseSectionRefs = pendingSectionRefs ?? activeSectionRefs;
|
|
35052
|
+
const nextSectionRefs = {
|
|
35037
35053
|
...effectiveBlock.headerRefs && { headerRefs: effectiveBlock.headerRefs },
|
|
35038
35054
|
...effectiveBlock.footerRefs && { footerRefs: effectiveBlock.footerRefs }
|
|
35039
35055
|
};
|
|
35056
|
+
pendingSectionRefs = mergeSectionRefs(baseSectionRefs, nextSectionRefs);
|
|
35040
35057
|
layoutLog(`[Layout] After scheduleSectionBreakCompat: Scheduled pendingSectionRefs:`, pendingSectionRefs);
|
|
35041
35058
|
}
|
|
35042
35059
|
const sectionIndexRaw = effectiveBlock.attrs?.sectionIndex;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jszip = require("./jszip-C8_CqJxM.cjs");
|
|
3
3
|
const helpers$1 = require("./helpers-nOdwpmwb.cjs");
|
|
4
|
-
const superEditor_converter = require("./SuperConverter-
|
|
4
|
+
const superEditor_converter = require("./SuperConverter-ACl3uGQE.cjs");
|
|
5
5
|
const vue = require("./vue-De9wkgLl.cjs");
|
|
6
6
|
require("./jszip.min-BPh2MMAa.cjs");
|
|
7
7
|
const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
|
|
@@ -15788,7 +15788,7 @@ const canUseDOM = () => {
|
|
|
15788
15788
|
return false;
|
|
15789
15789
|
}
|
|
15790
15790
|
};
|
|
15791
|
-
const summaryVersion = "1.6.
|
|
15791
|
+
const summaryVersion = "1.6.1-next.1";
|
|
15792
15792
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
15793
15793
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
15794
15794
|
function mapAttributes(attrs) {
|
|
@@ -18455,7 +18455,7 @@ class Editor extends EventEmitter {
|
|
|
18455
18455
|
* Process collaboration migrations
|
|
18456
18456
|
*/
|
|
18457
18457
|
processCollaborationMigrations() {
|
|
18458
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.6.
|
|
18458
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.6.1-next.1");
|
|
18459
18459
|
if (!this.options.ydoc) return;
|
|
18460
18460
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
18461
18461
|
let docVersion = metaMap.get("version");
|
|
@@ -34535,10 +34535,12 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
34535
34535
|
next.pendingColumns = null;
|
|
34536
34536
|
}
|
|
34537
34537
|
if (block.headerRefs || block.footerRefs) {
|
|
34538
|
-
|
|
34538
|
+
const baseSectionRefs = pendingSectionRefs ?? activeSectionRefs;
|
|
34539
|
+
const nextSectionRefs = {
|
|
34539
34540
|
...block.headerRefs && { headerRefs: block.headerRefs },
|
|
34540
34541
|
...block.footerRefs && { footerRefs: block.footerRefs }
|
|
34541
34542
|
};
|
|
34543
|
+
pendingSectionRefs = mergeSectionRefs(baseSectionRefs, nextSectionRefs);
|
|
34542
34544
|
layoutLog(`[Layout] First section: Scheduled pendingSectionRefs:`, pendingSectionRefs);
|
|
34543
34545
|
}
|
|
34544
34546
|
const firstSectionIndexRaw = block.attrs?.sectionIndex;
|
|
@@ -34603,10 +34605,12 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
34603
34605
|
pendingNumbering = { ...block.numbering };
|
|
34604
34606
|
}
|
|
34605
34607
|
if (block.headerRefs || block.footerRefs) {
|
|
34606
|
-
|
|
34608
|
+
const baseSectionRefs = pendingSectionRefs ?? activeSectionRefs;
|
|
34609
|
+
const nextSectionRefs = {
|
|
34607
34610
|
...block.headerRefs && { headerRefs: block.headerRefs },
|
|
34608
34611
|
...block.footerRefs && { footerRefs: block.footerRefs }
|
|
34609
34612
|
};
|
|
34613
|
+
pendingSectionRefs = mergeSectionRefs(baseSectionRefs, nextSectionRefs);
|
|
34610
34614
|
layoutLog(`[Layout] Compat fallback: Scheduled pendingSectionRefs:`, pendingSectionRefs);
|
|
34611
34615
|
}
|
|
34612
34616
|
if (block.attrs?.requirePageBoundary) {
|
|
@@ -34652,6 +34656,17 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
34652
34656
|
let activeNumberFormat = "decimal";
|
|
34653
34657
|
let activePageCounter = 1;
|
|
34654
34658
|
let pendingNumbering = null;
|
|
34659
|
+
const normalizeRefs = (refs) => refs && Object.keys(refs).length > 0 ? refs : void 0;
|
|
34660
|
+
const mergeSectionRefs = (base2, next) => {
|
|
34661
|
+
if (!base2 && !next) return null;
|
|
34662
|
+
const headerRefs = normalizeRefs(next?.headerRefs) ?? normalizeRefs(base2?.headerRefs);
|
|
34663
|
+
const footerRefs = normalizeRefs(next?.footerRefs) ?? normalizeRefs(base2?.footerRefs);
|
|
34664
|
+
if (!headerRefs && !footerRefs) return null;
|
|
34665
|
+
return {
|
|
34666
|
+
...headerRefs && { headerRefs },
|
|
34667
|
+
...footerRefs && { footerRefs }
|
|
34668
|
+
};
|
|
34669
|
+
};
|
|
34655
34670
|
const sectionMetadataList = options.sectionMetadata ?? [];
|
|
34656
34671
|
const initialSectionMetadata = sectionMetadataList[0];
|
|
34657
34672
|
if (initialSectionMetadata?.numbering?.format) {
|
|
@@ -34747,7 +34762,7 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
34747
34762
|
pendingNumbering = null;
|
|
34748
34763
|
}
|
|
34749
34764
|
if (pendingSectionRefs) {
|
|
34750
|
-
activeSectionRefs = pendingSectionRefs;
|
|
34765
|
+
activeSectionRefs = mergeSectionRefs(activeSectionRefs, pendingSectionRefs);
|
|
34751
34766
|
pendingSectionRefs = null;
|
|
34752
34767
|
}
|
|
34753
34768
|
if (pendingSectionIndex !== null) {
|
|
@@ -35050,10 +35065,12 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
35050
35065
|
}
|
|
35051
35066
|
}
|
|
35052
35067
|
if (effectiveBlock.headerRefs || effectiveBlock.footerRefs) {
|
|
35053
|
-
|
|
35068
|
+
const baseSectionRefs = pendingSectionRefs ?? activeSectionRefs;
|
|
35069
|
+
const nextSectionRefs = {
|
|
35054
35070
|
...effectiveBlock.headerRefs && { headerRefs: effectiveBlock.headerRefs },
|
|
35055
35071
|
...effectiveBlock.footerRefs && { footerRefs: effectiveBlock.footerRefs }
|
|
35056
35072
|
};
|
|
35073
|
+
pendingSectionRefs = mergeSectionRefs(baseSectionRefs, nextSectionRefs);
|
|
35057
35074
|
layoutLog(`[Layout] After scheduleSectionBreakCompat: Scheduled pendingSectionRefs:`, pendingSectionRefs);
|
|
35058
35075
|
}
|
|
35059
35076
|
const sectionIndexRaw = effectiveBlock.attrs?.sectionIndex;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const index = require("./index-
|
|
3
|
-
require("./SuperConverter-
|
|
2
|
+
const index = require("./index-DuEhB1Tb.cjs");
|
|
3
|
+
require("./SuperConverter-ACl3uGQE.cjs");
|
|
4
4
|
const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
|
|
5
5
|
const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
|
|
6
6
|
const provider = require("@hocuspocus/provider");
|
|
@@ -7530,7 +7530,7 @@ const _sfc_main = {
|
|
|
7530
7530
|
__name: "SuperDoc",
|
|
7531
7531
|
emits: ["selection-update"],
|
|
7532
7532
|
setup(__props, { emit: __emit }) {
|
|
7533
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
7533
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-BVmqJGOJ.cjs")));
|
|
7534
7534
|
const superdocStore = useSuperdocStore();
|
|
7535
7535
|
const commentsStore = useCommentsStore();
|
|
7536
7536
|
const {
|
|
@@ -8484,7 +8484,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
8484
8484
|
this.config.colors = shuffleArray(this.config.colors);
|
|
8485
8485
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
8486
8486
|
this.colorIndex = 0;
|
|
8487
|
-
this.version = "1.6.
|
|
8487
|
+
this.version = "1.6.1-next.1";
|
|
8488
8488
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
8489
8489
|
this.superdocId = config.superdocId || uuid.v4();
|
|
8490
8490
|
this.colors = this.config.colors;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("../chunks/jszip-C8_CqJxM.cjs");
|
|
4
4
|
require("../chunks/helpers-nOdwpmwb.cjs");
|
|
5
|
-
const superEditor_converter = require("../chunks/SuperConverter-
|
|
5
|
+
const superEditor_converter = require("../chunks/SuperConverter-ACl3uGQE.cjs");
|
|
6
6
|
require("../chunks/uuid-R7L08bOx.cjs");
|
|
7
7
|
exports.SuperConverter = superEditor_converter.SuperConverter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunks/jszip-B1fkPkPJ.es.js";
|
|
2
2
|
import "../chunks/helpers-C8e9wR5l.es.js";
|
|
3
|
-
import { S } from "../chunks/SuperConverter-
|
|
3
|
+
import { S } from "../chunks/SuperConverter-moeez8-1.es.js";
|
|
4
4
|
import "../chunks/uuid-CjlX8hrF.es.js";
|
|
5
5
|
export {
|
|
6
6
|
S as SuperConverter
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./chunks/index-
|
|
3
|
+
const index = require("./chunks/index-DuEhB1Tb.cjs");
|
|
4
4
|
const superEditor_docxZipper = require("./super-editor/docx-zipper.cjs");
|
|
5
5
|
const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
|
|
6
6
|
const vue = require("./chunks/vue-De9wkgLl.cjs");
|
|
7
|
-
const superEditor_converter = require("./chunks/SuperConverter-
|
|
7
|
+
const superEditor_converter = require("./chunks/SuperConverter-ACl3uGQE.cjs");
|
|
8
8
|
function isNodeType(node, name) {
|
|
9
9
|
return node.type.name === name;
|
|
10
10
|
}
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ax as Node, ay as Mark } from "./chunks/index-
|
|
2
|
-
import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-
|
|
1
|
+
import { ax as Node, ay as Mark } from "./chunks/index-BkkKmsZx.es.js";
|
|
2
|
+
import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-BkkKmsZx.es.js";
|
|
3
3
|
import { default as default2 } from "./super-editor/docx-zipper.es.js";
|
|
4
4
|
import { createZip } from "./super-editor/file-zipper.es.js";
|
|
5
5
|
import { d as defineComponent, E as createElementBlock, G as openBlock, K as createBaseVNode } from "./chunks/vue-BnBKJwCW.es.js";
|
|
6
|
-
import { S, r } from "./chunks/SuperConverter-
|
|
6
|
+
import { S, r } from "./chunks/SuperConverter-moeez8-1.es.js";
|
|
7
7
|
function isNodeType(node, name) {
|
|
8
8
|
return node.type.name === name;
|
|
9
9
|
}
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./chunks/index-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
5
|
-
const superEditor_converter = require("./chunks/SuperConverter-
|
|
3
|
+
const index = require("./chunks/index-DuEhB1Tb.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-QQFL_n3g.cjs");
|
|
5
|
+
const superEditor_converter = require("./chunks/SuperConverter-ACl3uGQE.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
7
7
|
require("./chunks/jszip-C8_CqJxM.cjs");
|
|
8
8
|
require("./chunks/helpers-nOdwpmwb.cjs");
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-
|
|
2
|
-
import { D, H, P, S, c } from "./chunks/index-
|
|
3
|
-
import { S as S2, r } from "./chunks/SuperConverter-
|
|
1
|
+
import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-BkkKmsZx.es.js";
|
|
2
|
+
import { D, H, P, S, c } from "./chunks/index-BInFuKPd.es.js";
|
|
3
|
+
import { S as S2, r } from "./chunks/SuperConverter-moeez8-1.es.js";
|
|
4
4
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
5
5
|
import "./chunks/jszip-B1fkPkPJ.es.js";
|
|
6
6
|
import "./chunks/helpers-C8e9wR5l.es.js";
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -38097,7 +38097,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38097
38097
|
static getStoredSuperdocVersion(docx) {
|
|
38098
38098
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
38099
38099
|
}
|
|
38100
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.6.
|
|
38100
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.6.1-next.1") {
|
|
38101
38101
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
38102
38102
|
}
|
|
38103
38103
|
/**
|
|
@@ -64267,7 +64267,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
64267
64267
|
return false;
|
|
64268
64268
|
}
|
|
64269
64269
|
};
|
|
64270
|
-
const summaryVersion = "1.6.
|
|
64270
|
+
const summaryVersion = "1.6.1-next.1";
|
|
64271
64271
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
64272
64272
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
64273
64273
|
function mapAttributes(attrs) {
|
|
@@ -66935,7 +66935,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
66935
66935
|
* Process collaboration migrations
|
|
66936
66936
|
*/
|
|
66937
66937
|
processCollaborationMigrations() {
|
|
66938
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.6.
|
|
66938
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.6.1-next.1");
|
|
66939
66939
|
if (!this.options.ydoc) return;
|
|
66940
66940
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
66941
66941
|
let docVersion = metaMap.get("version");
|
|
@@ -83016,10 +83016,12 @@ ${o}
|
|
|
83016
83016
|
next2.pendingColumns = null;
|
|
83017
83017
|
}
|
|
83018
83018
|
if (block.headerRefs || block.footerRefs) {
|
|
83019
|
-
|
|
83019
|
+
const baseSectionRefs = pendingSectionRefs ?? activeSectionRefs;
|
|
83020
|
+
const nextSectionRefs = {
|
|
83020
83021
|
...block.headerRefs && { headerRefs: block.headerRefs },
|
|
83021
83022
|
...block.footerRefs && { footerRefs: block.footerRefs }
|
|
83022
83023
|
};
|
|
83024
|
+
pendingSectionRefs = mergeSectionRefs(baseSectionRefs, nextSectionRefs);
|
|
83023
83025
|
layoutLog(`[Layout] First section: Scheduled pendingSectionRefs:`, pendingSectionRefs);
|
|
83024
83026
|
}
|
|
83025
83027
|
const firstSectionIndexRaw = block.attrs?.sectionIndex;
|
|
@@ -83084,10 +83086,12 @@ ${o}
|
|
|
83084
83086
|
pendingNumbering = { ...block.numbering };
|
|
83085
83087
|
}
|
|
83086
83088
|
if (block.headerRefs || block.footerRefs) {
|
|
83087
|
-
|
|
83089
|
+
const baseSectionRefs = pendingSectionRefs ?? activeSectionRefs;
|
|
83090
|
+
const nextSectionRefs = {
|
|
83088
83091
|
...block.headerRefs && { headerRefs: block.headerRefs },
|
|
83089
83092
|
...block.footerRefs && { footerRefs: block.footerRefs }
|
|
83090
83093
|
};
|
|
83094
|
+
pendingSectionRefs = mergeSectionRefs(baseSectionRefs, nextSectionRefs);
|
|
83091
83095
|
layoutLog(`[Layout] Compat fallback: Scheduled pendingSectionRefs:`, pendingSectionRefs);
|
|
83092
83096
|
}
|
|
83093
83097
|
if (block.attrs?.requirePageBoundary) {
|
|
@@ -83133,6 +83137,17 @@ ${o}
|
|
|
83133
83137
|
let activeNumberFormat = "decimal";
|
|
83134
83138
|
let activePageCounter = 1;
|
|
83135
83139
|
let pendingNumbering = null;
|
|
83140
|
+
const normalizeRefs = (refs) => refs && Object.keys(refs).length > 0 ? refs : void 0;
|
|
83141
|
+
const mergeSectionRefs = (base2, next2) => {
|
|
83142
|
+
if (!base2 && !next2) return null;
|
|
83143
|
+
const headerRefs = normalizeRefs(next2?.headerRefs) ?? normalizeRefs(base2?.headerRefs);
|
|
83144
|
+
const footerRefs = normalizeRefs(next2?.footerRefs) ?? normalizeRefs(base2?.footerRefs);
|
|
83145
|
+
if (!headerRefs && !footerRefs) return null;
|
|
83146
|
+
return {
|
|
83147
|
+
...headerRefs && { headerRefs },
|
|
83148
|
+
...footerRefs && { footerRefs }
|
|
83149
|
+
};
|
|
83150
|
+
};
|
|
83136
83151
|
const sectionMetadataList = options.sectionMetadata ?? [];
|
|
83137
83152
|
const initialSectionMetadata = sectionMetadataList[0];
|
|
83138
83153
|
if (initialSectionMetadata?.numbering?.format) {
|
|
@@ -83228,7 +83243,7 @@ ${o}
|
|
|
83228
83243
|
pendingNumbering = null;
|
|
83229
83244
|
}
|
|
83230
83245
|
if (pendingSectionRefs) {
|
|
83231
|
-
activeSectionRefs = pendingSectionRefs;
|
|
83246
|
+
activeSectionRefs = mergeSectionRefs(activeSectionRefs, pendingSectionRefs);
|
|
83232
83247
|
pendingSectionRefs = null;
|
|
83233
83248
|
}
|
|
83234
83249
|
if (pendingSectionIndex !== null) {
|
|
@@ -83531,10 +83546,12 @@ ${o}
|
|
|
83531
83546
|
}
|
|
83532
83547
|
}
|
|
83533
83548
|
if (effectiveBlock.headerRefs || effectiveBlock.footerRefs) {
|
|
83534
|
-
|
|
83549
|
+
const baseSectionRefs = pendingSectionRefs ?? activeSectionRefs;
|
|
83550
|
+
const nextSectionRefs = {
|
|
83535
83551
|
...effectiveBlock.headerRefs && { headerRefs: effectiveBlock.headerRefs },
|
|
83536
83552
|
...effectiveBlock.footerRefs && { footerRefs: effectiveBlock.footerRefs }
|
|
83537
83553
|
};
|
|
83554
|
+
pendingSectionRefs = mergeSectionRefs(baseSectionRefs, nextSectionRefs);
|
|
83538
83555
|
layoutLog(`[Layout] After scheduleSectionBreakCompat: Scheduled pendingSectionRefs:`, pendingSectionRefs);
|
|
83539
83556
|
}
|
|
83540
83557
|
const sectionIndexRaw = effectiveBlock.attrs?.sectionIndex;
|
|
@@ -150353,7 +150370,7 @@ ${reason}`);
|
|
|
150353
150370
|
this.config.colors = shuffleArray(this.config.colors);
|
|
150354
150371
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
150355
150372
|
this.colorIndex = 0;
|
|
150356
|
-
this.version = "1.6.
|
|
150373
|
+
this.version = "1.6.1-next.1";
|
|
150357
150374
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
150358
150375
|
this.superdocId = config2.superdocId || v4();
|
|
150359
150376
|
this.colors = this.config.colors;
|