@harbour-enterprises/superdoc 1.7.0-next.4 → 1.7.0-next.5
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-BcYeJkY0.es.js → PdfViewer-CMz0vPEp.es.js} +2 -2
- package/dist/chunks/{PdfViewer-BDTHAzzV.cjs → PdfViewer-DbdY4nxk.cjs} +2 -2
- package/dist/chunks/{SuperConverter-CqGLfodX.cjs → SuperConverter-CGlcEWcs.cjs} +1 -1
- package/dist/chunks/{SuperConverter-j7x609IP.es.js → SuperConverter-DU1Tqi67.es.js} +1 -1
- package/dist/chunks/{index-BeeVE9Em.es.js → index-BQo9zrNo.es.js} +4 -4
- package/dist/chunks/{index-Ro90aGrx.cjs → index-Clk0gT7d.cjs} +4 -4
- package/dist/chunks/{index-YC_l8mFU.es.js → index-DYUIpqx9.es.js} +58 -15
- package/dist/chunks/{index-DtyOJBt1.cjs → index-i_RngoBn.cjs} +58 -15
- package/dist/style.css +7 -7
- 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 +59 -16
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -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-BQo9zrNo.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-DYUIpqx9.es.js";
|
|
4
4
|
function self(vars) {
|
|
5
5
|
const {
|
|
6
6
|
opacityDisabled,
|
|
@@ -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-Clk0gT7d.cjs");
|
|
5
|
+
const index = require("./index-i_RngoBn.cjs");
|
|
6
6
|
function self(vars) {
|
|
7
7
|
const {
|
|
8
8
|
opacityDisabled,
|
|
@@ -32770,7 +32770,7 @@ class SuperConverter {
|
|
|
32770
32770
|
static getStoredSuperdocVersion(docx) {
|
|
32771
32771
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
32772
32772
|
}
|
|
32773
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.
|
|
32773
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.5") {
|
|
32774
32774
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
32775
32775
|
}
|
|
32776
32776
|
/**
|
|
@@ -32769,7 +32769,7 @@ class SuperConverter {
|
|
|
32769
32769
|
static getStoredSuperdocVersion(docx) {
|
|
32770
32770
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
32771
32771
|
}
|
|
32772
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.
|
|
32772
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.5") {
|
|
32773
32773
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
32774
32774
|
}
|
|
32775
32775
|
/**
|
|
@@ -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-DYUIpqx9.es.js";
|
|
2
|
+
import "./SuperConverter-DU1Tqi67.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-CMz0vPEp.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.7.0-next.
|
|
8470
|
+
this.version = "1.7.0-next.5";
|
|
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
|
"use strict";
|
|
2
|
-
const index = require("./index-
|
|
3
|
-
require("./SuperConverter-
|
|
2
|
+
const index = require("./index-i_RngoBn.cjs");
|
|
3
|
+
require("./SuperConverter-CGlcEWcs.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-DbdY4nxk.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.7.0-next.
|
|
8487
|
+
this.version = "1.7.0-next.5";
|
|
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;
|
|
@@ -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-DU1Tqi67.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.7.0-next.
|
|
15774
|
+
const summaryVersion = "1.7.0-next.5";
|
|
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.7.0-next.
|
|
18441
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.7.0-next.5");
|
|
18442
18442
|
if (!this.options.ydoc) return;
|
|
18443
18443
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
18444
18444
|
let docVersion = metaMap.get("version");
|
|
@@ -33099,7 +33099,7 @@ const getParagraphAttrs = (block) => {
|
|
|
33099
33099
|
const asString = (value) => {
|
|
33100
33100
|
return typeof value === "string" ? value : void 0;
|
|
33101
33101
|
};
|
|
33102
|
-
const asBoolean = (value) => {
|
|
33102
|
+
const asBoolean$1 = (value) => {
|
|
33103
33103
|
if (value === true || value === 1) return true;
|
|
33104
33104
|
if (typeof value === "string") {
|
|
33105
33105
|
const normalized = value.toLowerCase();
|
|
@@ -33280,8 +33280,9 @@ function layoutParagraphBlock(ctx2, anchors) {
|
|
|
33280
33280
|
const attrs = getParagraphAttrs(block);
|
|
33281
33281
|
const spacing = attrs?.spacing ?? {};
|
|
33282
33282
|
const styleId = asString(attrs?.styleId);
|
|
33283
|
-
const contextualSpacing = asBoolean(attrs?.contextualSpacing);
|
|
33283
|
+
const contextualSpacing = asBoolean$1(attrs?.contextualSpacing);
|
|
33284
33284
|
let spacingBefore = Math.max(0, Number(spacing.before ?? spacing.lineSpaceBefore ?? 0));
|
|
33285
|
+
const baseSpacingBefore = spacingBefore;
|
|
33285
33286
|
const spacingAfter = Math.max(0, Number(spacing.after ?? spacing.lineSpaceAfter ?? 0));
|
|
33286
33287
|
let appliedSpacingBefore = spacingBefore === 0;
|
|
33287
33288
|
let lastState = null;
|
|
@@ -33376,6 +33377,21 @@ function layoutParagraphBlock(ctx2, anchors) {
|
|
|
33376
33377
|
state.trailingSpacing = 0;
|
|
33377
33378
|
}
|
|
33378
33379
|
}
|
|
33380
|
+
const keepLines = attrs?.keepLines === true;
|
|
33381
|
+
if (keepLines && fromLine === 0) {
|
|
33382
|
+
const prevTrailing = state.trailingSpacing ?? 0;
|
|
33383
|
+
const neededSpacingBefore = Math.max(spacingBefore - prevTrailing, 0);
|
|
33384
|
+
const pageContentHeight = state.contentBottom - state.topMargin;
|
|
33385
|
+
const fullHeight = lines.reduce((sum, line) => sum + (line.lineHeight || 0), 0);
|
|
33386
|
+
const fitsOnBlankPage = fullHeight + baseSpacingBefore <= pageContentHeight;
|
|
33387
|
+
const remainingHeightAfterSpacing = state.contentBottom - (state.cursorY + neededSpacingBefore);
|
|
33388
|
+
if (fitsOnBlankPage && state.page.fragments.length > 0 && fullHeight > remainingHeightAfterSpacing) {
|
|
33389
|
+
state = advanceColumn(state);
|
|
33390
|
+
spacingBefore = baseSpacingBefore;
|
|
33391
|
+
appliedSpacingBefore = spacingBefore === 0;
|
|
33392
|
+
continue;
|
|
33393
|
+
}
|
|
33394
|
+
}
|
|
33379
33395
|
if (!appliedSpacingBefore && spacingBefore > 0) {
|
|
33380
33396
|
while (!appliedSpacingBefore) {
|
|
33381
33397
|
const prevTrailing = state.trailingSpacing ?? 0;
|
|
@@ -34619,6 +34635,14 @@ function getMeasureHeight(block, measure) {
|
|
|
34619
34635
|
const DEFAULT_PAGE_SIZE$2 = { w: 612, h: 792 };
|
|
34620
34636
|
const DEFAULT_MARGINS$2 = { top: 72, right: 72, bottom: 72, left: 72 };
|
|
34621
34637
|
const COLUMN_EPSILON$1 = 1e-4;
|
|
34638
|
+
const asBoolean = (value) => {
|
|
34639
|
+
if (value === true || value === 1) return true;
|
|
34640
|
+
if (typeof value === "string") {
|
|
34641
|
+
const normalized = value.toLowerCase();
|
|
34642
|
+
return normalized === "true" || normalized === "1" || normalized === "on";
|
|
34643
|
+
}
|
|
34644
|
+
return false;
|
|
34645
|
+
};
|
|
34622
34646
|
const layoutDebugEnabled$1 = typeof process$1 !== "undefined" && typeof process$1.env !== "undefined" && Boolean(process$1.env.SD_DEBUG_LAYOUT);
|
|
34623
34647
|
const layoutLog = (...args) => {
|
|
34624
34648
|
if (!layoutDebugEnabled$1) return;
|
|
@@ -35442,11 +35466,23 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
35442
35466
|
if (!shouldSkipAnchoredTable) {
|
|
35443
35467
|
let state = paginator.ensurePage();
|
|
35444
35468
|
const availableHeight = state.contentBottom - state.cursorY;
|
|
35469
|
+
const spacingBefore = getParagraphSpacingBefore(paraBlock);
|
|
35445
35470
|
const spacingAfter = getParagraphSpacingAfter$1(paraBlock);
|
|
35471
|
+
const prevTrailing = Number.isFinite(state.trailingSpacing) && state.trailingSpacing > 0 ? state.trailingSpacing : 0;
|
|
35472
|
+
const currentStyleId = typeof paraBlock.attrs?.styleId === "string" ? paraBlock.attrs?.styleId : void 0;
|
|
35473
|
+
const currentContextualSpacing = asBoolean(paraBlock.attrs?.contextualSpacing);
|
|
35474
|
+
const contextualSpacingApplies = currentContextualSpacing && currentStyleId && state.lastParagraphStyleId === currentStyleId;
|
|
35475
|
+
const effectiveSpacingBefore = contextualSpacingApplies ? 0 : Math.max(spacingBefore - prevTrailing, 0);
|
|
35446
35476
|
const currentHeight = getMeasureHeight(paraBlock, measure);
|
|
35447
35477
|
const nextHeight = getMeasureHeight(nextBlock, nextMeasure);
|
|
35448
35478
|
const nextIsParagraph = nextBlock.kind === "paragraph" && nextMeasure.kind === "paragraph";
|
|
35449
35479
|
const nextSpacingBefore = nextIsParagraph ? getParagraphSpacingBefore(nextBlock) : 0;
|
|
35480
|
+
const nextStyleId = nextIsParagraph && typeof nextBlock.attrs?.styleId === "string" ? nextBlock.attrs?.styleId : void 0;
|
|
35481
|
+
const nextContextualSpacing = nextIsParagraph && asBoolean(nextBlock.attrs?.contextualSpacing);
|
|
35482
|
+
const sameStyleAsNext = currentStyleId && nextStyleId && nextStyleId === currentStyleId;
|
|
35483
|
+
const effectiveSpacingAfter = currentContextualSpacing && sameStyleAsNext ? 0 : spacingAfter;
|
|
35484
|
+
const effectiveNextSpacingBefore = nextContextualSpacing && sameStyleAsNext ? 0 : nextSpacingBefore;
|
|
35485
|
+
const interParagraphSpacing = nextIsParagraph ? Math.max(effectiveSpacingAfter, effectiveNextSpacingBefore) : effectiveSpacingAfter;
|
|
35450
35486
|
const nextFirstLineHeight = (() => {
|
|
35451
35487
|
if (!nextIsParagraph) {
|
|
35452
35488
|
return nextHeight;
|
|
@@ -35457,8 +35493,9 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
35457
35493
|
}
|
|
35458
35494
|
return nextHeight;
|
|
35459
35495
|
})();
|
|
35460
|
-
const combinedHeight = nextIsParagraph ? currentHeight +
|
|
35461
|
-
|
|
35496
|
+
const combinedHeight = nextIsParagraph ? effectiveSpacingBefore + currentHeight + interParagraphSpacing + nextFirstLineHeight : effectiveSpacingBefore + currentHeight + spacingAfter + nextHeight;
|
|
35497
|
+
const effectiveAvailableHeight = contextualSpacingApplies ? availableHeight + prevTrailing : availableHeight;
|
|
35498
|
+
if (combinedHeight > effectiveAvailableHeight && state.page.fragments.length > 0) {
|
|
35462
35499
|
state = paginator.advanceColumn(state);
|
|
35463
35500
|
}
|
|
35464
35501
|
}
|
|
@@ -51443,6 +51480,11 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51443
51480
|
totalHeight: metrics.lineHeight
|
|
51444
51481
|
};
|
|
51445
51482
|
}
|
|
51483
|
+
const firstTextRunWithSize = block.runs.find(
|
|
51484
|
+
(run) => "text" in run && "fontSize" in run && typeof run.fontSize === "number"
|
|
51485
|
+
);
|
|
51486
|
+
const fallbackFontSize = firstTextRunWithSize?.fontSize ?? 12;
|
|
51487
|
+
const fallbackFontInfo = firstTextRunWithSize ? getFontInfoFromRun(firstTextRunWithSize) : void 0;
|
|
51446
51488
|
let currentLine = null;
|
|
51447
51489
|
const getEffectiveWidth = (baseWidth) => {
|
|
51448
51490
|
if (dropCapMeasure && lines.length < dropCapMeasure.lines && dropCapMeasure.mode === "drop") {
|
|
@@ -51450,7 +51492,8 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51450
51492
|
}
|
|
51451
51493
|
return baseWidth;
|
|
51452
51494
|
};
|
|
51453
|
-
let lastFontSize =
|
|
51495
|
+
let lastFontSize = fallbackFontSize;
|
|
51496
|
+
let hasSeenTextRun = false;
|
|
51454
51497
|
let tabStopCursor = 0;
|
|
51455
51498
|
let pendingTabAlignment = null;
|
|
51456
51499
|
let pendingRunSpacing = 0;
|
|
@@ -51575,11 +51618,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51575
51618
|
lines.push(completedLine);
|
|
51576
51619
|
currentLine = null;
|
|
51577
51620
|
} else {
|
|
51578
|
-
const
|
|
51579
|
-
(r2) => r2.kind !== "tab" && r2.kind !== "lineBreak" && r2.kind !== "break" && !("src" in r2) && "fontSize" in r2
|
|
51580
|
-
);
|
|
51581
|
-
const fallbackSize = textRunWithSize?.fontSize ?? 12;
|
|
51582
|
-
const metrics = calculateTypographyMetrics(fallbackSize, spacing);
|
|
51621
|
+
const metrics = calculateTypographyMetrics(fallbackFontSize, spacing, fallbackFontInfo);
|
|
51583
51622
|
const emptyLine = {
|
|
51584
51623
|
fromRun: runIndex,
|
|
51585
51624
|
fromChar: 0,
|
|
@@ -51599,6 +51638,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51599
51638
|
continue;
|
|
51600
51639
|
}
|
|
51601
51640
|
if (isLineBreakRun(run)) {
|
|
51641
|
+
const lineBreakFontInfo = hasSeenTextRun ? void 0 : fallbackFontInfo;
|
|
51602
51642
|
if (currentLine) {
|
|
51603
51643
|
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
51604
51644
|
const completedLine = {
|
|
@@ -51608,7 +51648,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51608
51648
|
addBarTabsToLine(completedLine);
|
|
51609
51649
|
lines.push(completedLine);
|
|
51610
51650
|
} else {
|
|
51611
|
-
const metrics = calculateTypographyMetrics(lastFontSize, spacing);
|
|
51651
|
+
const metrics = calculateTypographyMetrics(lastFontSize, spacing, lineBreakFontInfo);
|
|
51612
51652
|
const emptyLine = {
|
|
51613
51653
|
fromRun: runIndex,
|
|
51614
51654
|
fromChar: 0,
|
|
@@ -51631,6 +51671,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51631
51671
|
toChar: 0,
|
|
51632
51672
|
width: 0,
|
|
51633
51673
|
maxFontSize: lastFontSize,
|
|
51674
|
+
maxFontInfo: lineBreakFontInfo,
|
|
51634
51675
|
maxWidth: nextLineMaxWidth,
|
|
51635
51676
|
segments: [],
|
|
51636
51677
|
spaceCount: 0
|
|
@@ -51924,6 +51965,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51924
51965
|
continue;
|
|
51925
51966
|
}
|
|
51926
51967
|
lastFontSize = run.fontSize;
|
|
51968
|
+
hasSeenTextRun = true;
|
|
51927
51969
|
const { font } = buildFontString(run);
|
|
51928
51970
|
const tabSegments = run.text.split(" ");
|
|
51929
51971
|
let charPosInRun = 0;
|
|
@@ -94888,6 +94930,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
94888
94930
|
};
|
|
94889
94931
|
const getExtensions = () => getStarterExtensions();
|
|
94890
94932
|
const initEditor = async ({ content, media = {}, mediaFiles = {}, fonts = {} } = {}) => {
|
|
94933
|
+
if (!editorElem.value) return;
|
|
94891
94934
|
const { editorCtor, ...editorOptions } = props.options || {};
|
|
94892
94935
|
const EditorCtor = editorCtor ?? Editor;
|
|
94893
94936
|
clearSelectedImage();
|
|
@@ -95196,7 +95239,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
95196
95239
|
};
|
|
95197
95240
|
}
|
|
95198
95241
|
});
|
|
95199
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
95242
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-bb7d8a50"]]);
|
|
95200
95243
|
const _hoisted_1 = ["innerHTML"];
|
|
95201
95244
|
const _sfc_main = {
|
|
95202
95245
|
__name: "SuperInput",
|
|
@@ -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-CGlcEWcs.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.7.0-next.
|
|
15791
|
+
const summaryVersion = "1.7.0-next.5";
|
|
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.7.0-next.
|
|
18458
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.7.0-next.5");
|
|
18459
18459
|
if (!this.options.ydoc) return;
|
|
18460
18460
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
18461
18461
|
let docVersion = metaMap.get("version");
|
|
@@ -33116,7 +33116,7 @@ const getParagraphAttrs = (block) => {
|
|
|
33116
33116
|
const asString = (value) => {
|
|
33117
33117
|
return typeof value === "string" ? value : void 0;
|
|
33118
33118
|
};
|
|
33119
|
-
const asBoolean = (value) => {
|
|
33119
|
+
const asBoolean$1 = (value) => {
|
|
33120
33120
|
if (value === true || value === 1) return true;
|
|
33121
33121
|
if (typeof value === "string") {
|
|
33122
33122
|
const normalized = value.toLowerCase();
|
|
@@ -33297,8 +33297,9 @@ function layoutParagraphBlock(ctx2, anchors) {
|
|
|
33297
33297
|
const attrs = getParagraphAttrs(block);
|
|
33298
33298
|
const spacing = attrs?.spacing ?? {};
|
|
33299
33299
|
const styleId = asString(attrs?.styleId);
|
|
33300
|
-
const contextualSpacing = asBoolean(attrs?.contextualSpacing);
|
|
33300
|
+
const contextualSpacing = asBoolean$1(attrs?.contextualSpacing);
|
|
33301
33301
|
let spacingBefore = Math.max(0, Number(spacing.before ?? spacing.lineSpaceBefore ?? 0));
|
|
33302
|
+
const baseSpacingBefore = spacingBefore;
|
|
33302
33303
|
const spacingAfter = Math.max(0, Number(spacing.after ?? spacing.lineSpaceAfter ?? 0));
|
|
33303
33304
|
let appliedSpacingBefore = spacingBefore === 0;
|
|
33304
33305
|
let lastState = null;
|
|
@@ -33393,6 +33394,21 @@ function layoutParagraphBlock(ctx2, anchors) {
|
|
|
33393
33394
|
state.trailingSpacing = 0;
|
|
33394
33395
|
}
|
|
33395
33396
|
}
|
|
33397
|
+
const keepLines = attrs?.keepLines === true;
|
|
33398
|
+
if (keepLines && fromLine === 0) {
|
|
33399
|
+
const prevTrailing = state.trailingSpacing ?? 0;
|
|
33400
|
+
const neededSpacingBefore = Math.max(spacingBefore - prevTrailing, 0);
|
|
33401
|
+
const pageContentHeight = state.contentBottom - state.topMargin;
|
|
33402
|
+
const fullHeight = lines.reduce((sum, line) => sum + (line.lineHeight || 0), 0);
|
|
33403
|
+
const fitsOnBlankPage = fullHeight + baseSpacingBefore <= pageContentHeight;
|
|
33404
|
+
const remainingHeightAfterSpacing = state.contentBottom - (state.cursorY + neededSpacingBefore);
|
|
33405
|
+
if (fitsOnBlankPage && state.page.fragments.length > 0 && fullHeight > remainingHeightAfterSpacing) {
|
|
33406
|
+
state = advanceColumn(state);
|
|
33407
|
+
spacingBefore = baseSpacingBefore;
|
|
33408
|
+
appliedSpacingBefore = spacingBefore === 0;
|
|
33409
|
+
continue;
|
|
33410
|
+
}
|
|
33411
|
+
}
|
|
33396
33412
|
if (!appliedSpacingBefore && spacingBefore > 0) {
|
|
33397
33413
|
while (!appliedSpacingBefore) {
|
|
33398
33414
|
const prevTrailing = state.trailingSpacing ?? 0;
|
|
@@ -34636,6 +34652,14 @@ function getMeasureHeight(block, measure) {
|
|
|
34636
34652
|
const DEFAULT_PAGE_SIZE$2 = { w: 612, h: 792 };
|
|
34637
34653
|
const DEFAULT_MARGINS$2 = { top: 72, right: 72, bottom: 72, left: 72 };
|
|
34638
34654
|
const COLUMN_EPSILON$1 = 1e-4;
|
|
34655
|
+
const asBoolean = (value) => {
|
|
34656
|
+
if (value === true || value === 1) return true;
|
|
34657
|
+
if (typeof value === "string") {
|
|
34658
|
+
const normalized = value.toLowerCase();
|
|
34659
|
+
return normalized === "true" || normalized === "1" || normalized === "on";
|
|
34660
|
+
}
|
|
34661
|
+
return false;
|
|
34662
|
+
};
|
|
34639
34663
|
const layoutDebugEnabled$1 = typeof vue.process$1 !== "undefined" && typeof vue.process$1.env !== "undefined" && Boolean(vue.process$1.env.SD_DEBUG_LAYOUT);
|
|
34640
34664
|
const layoutLog = (...args) => {
|
|
34641
34665
|
if (!layoutDebugEnabled$1) return;
|
|
@@ -35459,11 +35483,23 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
35459
35483
|
if (!shouldSkipAnchoredTable) {
|
|
35460
35484
|
let state = paginator.ensurePage();
|
|
35461
35485
|
const availableHeight = state.contentBottom - state.cursorY;
|
|
35486
|
+
const spacingBefore = getParagraphSpacingBefore(paraBlock);
|
|
35462
35487
|
const spacingAfter = getParagraphSpacingAfter$1(paraBlock);
|
|
35488
|
+
const prevTrailing = Number.isFinite(state.trailingSpacing) && state.trailingSpacing > 0 ? state.trailingSpacing : 0;
|
|
35489
|
+
const currentStyleId = typeof paraBlock.attrs?.styleId === "string" ? paraBlock.attrs?.styleId : void 0;
|
|
35490
|
+
const currentContextualSpacing = asBoolean(paraBlock.attrs?.contextualSpacing);
|
|
35491
|
+
const contextualSpacingApplies = currentContextualSpacing && currentStyleId && state.lastParagraphStyleId === currentStyleId;
|
|
35492
|
+
const effectiveSpacingBefore = contextualSpacingApplies ? 0 : Math.max(spacingBefore - prevTrailing, 0);
|
|
35463
35493
|
const currentHeight = getMeasureHeight(paraBlock, measure);
|
|
35464
35494
|
const nextHeight = getMeasureHeight(nextBlock, nextMeasure);
|
|
35465
35495
|
const nextIsParagraph = nextBlock.kind === "paragraph" && nextMeasure.kind === "paragraph";
|
|
35466
35496
|
const nextSpacingBefore = nextIsParagraph ? getParagraphSpacingBefore(nextBlock) : 0;
|
|
35497
|
+
const nextStyleId = nextIsParagraph && typeof nextBlock.attrs?.styleId === "string" ? nextBlock.attrs?.styleId : void 0;
|
|
35498
|
+
const nextContextualSpacing = nextIsParagraph && asBoolean(nextBlock.attrs?.contextualSpacing);
|
|
35499
|
+
const sameStyleAsNext = currentStyleId && nextStyleId && nextStyleId === currentStyleId;
|
|
35500
|
+
const effectiveSpacingAfter = currentContextualSpacing && sameStyleAsNext ? 0 : spacingAfter;
|
|
35501
|
+
const effectiveNextSpacingBefore = nextContextualSpacing && sameStyleAsNext ? 0 : nextSpacingBefore;
|
|
35502
|
+
const interParagraphSpacing = nextIsParagraph ? Math.max(effectiveSpacingAfter, effectiveNextSpacingBefore) : effectiveSpacingAfter;
|
|
35467
35503
|
const nextFirstLineHeight = (() => {
|
|
35468
35504
|
if (!nextIsParagraph) {
|
|
35469
35505
|
return nextHeight;
|
|
@@ -35474,8 +35510,9 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
35474
35510
|
}
|
|
35475
35511
|
return nextHeight;
|
|
35476
35512
|
})();
|
|
35477
|
-
const combinedHeight = nextIsParagraph ? currentHeight +
|
|
35478
|
-
|
|
35513
|
+
const combinedHeight = nextIsParagraph ? effectiveSpacingBefore + currentHeight + interParagraphSpacing + nextFirstLineHeight : effectiveSpacingBefore + currentHeight + spacingAfter + nextHeight;
|
|
35514
|
+
const effectiveAvailableHeight = contextualSpacingApplies ? availableHeight + prevTrailing : availableHeight;
|
|
35515
|
+
if (combinedHeight > effectiveAvailableHeight && state.page.fragments.length > 0) {
|
|
35479
35516
|
state = paginator.advanceColumn(state);
|
|
35480
35517
|
}
|
|
35481
35518
|
}
|
|
@@ -51460,6 +51497,11 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51460
51497
|
totalHeight: metrics.lineHeight
|
|
51461
51498
|
};
|
|
51462
51499
|
}
|
|
51500
|
+
const firstTextRunWithSize = block.runs.find(
|
|
51501
|
+
(run) => "text" in run && "fontSize" in run && typeof run.fontSize === "number"
|
|
51502
|
+
);
|
|
51503
|
+
const fallbackFontSize = firstTextRunWithSize?.fontSize ?? 12;
|
|
51504
|
+
const fallbackFontInfo = firstTextRunWithSize ? getFontInfoFromRun(firstTextRunWithSize) : void 0;
|
|
51463
51505
|
let currentLine = null;
|
|
51464
51506
|
const getEffectiveWidth = (baseWidth) => {
|
|
51465
51507
|
if (dropCapMeasure && lines.length < dropCapMeasure.lines && dropCapMeasure.mode === "drop") {
|
|
@@ -51467,7 +51509,8 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51467
51509
|
}
|
|
51468
51510
|
return baseWidth;
|
|
51469
51511
|
};
|
|
51470
|
-
let lastFontSize =
|
|
51512
|
+
let lastFontSize = fallbackFontSize;
|
|
51513
|
+
let hasSeenTextRun = false;
|
|
51471
51514
|
let tabStopCursor = 0;
|
|
51472
51515
|
let pendingTabAlignment = null;
|
|
51473
51516
|
let pendingRunSpacing = 0;
|
|
@@ -51592,11 +51635,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51592
51635
|
lines.push(completedLine);
|
|
51593
51636
|
currentLine = null;
|
|
51594
51637
|
} else {
|
|
51595
|
-
const
|
|
51596
|
-
(r2) => r2.kind !== "tab" && r2.kind !== "lineBreak" && r2.kind !== "break" && !("src" in r2) && "fontSize" in r2
|
|
51597
|
-
);
|
|
51598
|
-
const fallbackSize = textRunWithSize?.fontSize ?? 12;
|
|
51599
|
-
const metrics = calculateTypographyMetrics(fallbackSize, spacing);
|
|
51638
|
+
const metrics = calculateTypographyMetrics(fallbackFontSize, spacing, fallbackFontInfo);
|
|
51600
51639
|
const emptyLine = {
|
|
51601
51640
|
fromRun: runIndex,
|
|
51602
51641
|
fromChar: 0,
|
|
@@ -51616,6 +51655,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51616
51655
|
continue;
|
|
51617
51656
|
}
|
|
51618
51657
|
if (isLineBreakRun(run)) {
|
|
51658
|
+
const lineBreakFontInfo = hasSeenTextRun ? void 0 : fallbackFontInfo;
|
|
51619
51659
|
if (currentLine) {
|
|
51620
51660
|
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
51621
51661
|
const completedLine = {
|
|
@@ -51625,7 +51665,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51625
51665
|
addBarTabsToLine(completedLine);
|
|
51626
51666
|
lines.push(completedLine);
|
|
51627
51667
|
} else {
|
|
51628
|
-
const metrics = calculateTypographyMetrics(lastFontSize, spacing);
|
|
51668
|
+
const metrics = calculateTypographyMetrics(lastFontSize, spacing, lineBreakFontInfo);
|
|
51629
51669
|
const emptyLine = {
|
|
51630
51670
|
fromRun: runIndex,
|
|
51631
51671
|
fromChar: 0,
|
|
@@ -51648,6 +51688,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51648
51688
|
toChar: 0,
|
|
51649
51689
|
width: 0,
|
|
51650
51690
|
maxFontSize: lastFontSize,
|
|
51691
|
+
maxFontInfo: lineBreakFontInfo,
|
|
51651
51692
|
maxWidth: nextLineMaxWidth,
|
|
51652
51693
|
segments: [],
|
|
51653
51694
|
spaceCount: 0
|
|
@@ -51941,6 +51982,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51941
51982
|
continue;
|
|
51942
51983
|
}
|
|
51943
51984
|
lastFontSize = run.fontSize;
|
|
51985
|
+
hasSeenTextRun = true;
|
|
51944
51986
|
const { font } = buildFontString(run);
|
|
51945
51987
|
const tabSegments = run.text.split(" ");
|
|
51946
51988
|
let charPosInRun = 0;
|
|
@@ -94905,6 +94947,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
94905
94947
|
};
|
|
94906
94948
|
const getExtensions = () => getStarterExtensions();
|
|
94907
94949
|
const initEditor = async ({ content, media = {}, mediaFiles = {}, fonts = {} } = {}) => {
|
|
94950
|
+
if (!editorElem.value) return;
|
|
94908
94951
|
const { editorCtor, ...editorOptions } = props.options || {};
|
|
94909
94952
|
const EditorCtor = editorCtor ?? Editor;
|
|
94910
94953
|
clearSelectedImage();
|
|
@@ -95213,7 +95256,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
95213
95256
|
};
|
|
95214
95257
|
}
|
|
95215
95258
|
});
|
|
95216
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
95259
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-bb7d8a50"]]);
|
|
95217
95260
|
const _hoisted_1 = ["innerHTML"];
|
|
95218
95261
|
const _sfc_main = {
|
|
95219
95262
|
__name: "SuperInput",
|
package/dist/style.css
CHANGED
|
@@ -1992,10 +1992,10 @@ to {
|
|
|
1992
1992
|
box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
|
|
1993
1993
|
}
|
|
1994
1994
|
|
|
1995
|
-
.editor-element[data-v-
|
|
1995
|
+
.editor-element[data-v-bb7d8a50] {
|
|
1996
1996
|
position: relative;
|
|
1997
1997
|
}
|
|
1998
|
-
.super-editor-container[data-v-
|
|
1998
|
+
.super-editor-container[data-v-bb7d8a50] {
|
|
1999
1999
|
width: auto;
|
|
2000
2000
|
height: auto;
|
|
2001
2001
|
/* min-width is controlled via inline style (containerStyle) to scale with zoom */
|
|
@@ -2004,20 +2004,20 @@ to {
|
|
|
2004
2004
|
display: flex;
|
|
2005
2005
|
flex-direction: column;
|
|
2006
2006
|
}
|
|
2007
|
-
.ruler-host[data-v-
|
|
2007
|
+
.ruler-host[data-v-bb7d8a50] {
|
|
2008
2008
|
display: flex;
|
|
2009
2009
|
justify-content: center;
|
|
2010
2010
|
width: 100%;
|
|
2011
2011
|
box-sizing: border-box;
|
|
2012
2012
|
}
|
|
2013
|
-
.ruler[data-v-
|
|
2013
|
+
.ruler[data-v-bb7d8a50] {
|
|
2014
2014
|
margin-bottom: 2px;
|
|
2015
2015
|
}
|
|
2016
|
-
.super-editor[data-v-
|
|
2016
|
+
.super-editor[data-v-bb7d8a50] {
|
|
2017
2017
|
color: initial;
|
|
2018
2018
|
overflow: hidden;
|
|
2019
2019
|
}
|
|
2020
|
-
.placeholder-editor[data-v-
|
|
2020
|
+
.placeholder-editor[data-v-bb7d8a50] {
|
|
2021
2021
|
position: absolute;
|
|
2022
2022
|
top: 0;
|
|
2023
2023
|
left: 0;
|
|
@@ -2029,7 +2029,7 @@ to {
|
|
|
2029
2029
|
background-color: white;
|
|
2030
2030
|
box-sizing: border-box;
|
|
2031
2031
|
}
|
|
2032
|
-
.placeholder-title[data-v-
|
|
2032
|
+
.placeholder-title[data-v-bb7d8a50] {
|
|
2033
2033
|
display: flex;
|
|
2034
2034
|
justify-content: center;
|
|
2035
2035
|
margin-bottom: 40px;
|
|
@@ -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-CGlcEWcs.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-DU1Tqi67.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-i_RngoBn.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-CGlcEWcs.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-DYUIpqx9.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-DYUIpqx9.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-DU1Tqi67.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-i_RngoBn.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-Clk0gT7d.cjs");
|
|
5
|
+
const superEditor_converter = require("./chunks/SuperConverter-CGlcEWcs.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-DYUIpqx9.es.js";
|
|
2
|
+
import { D, H, P, S, c } from "./chunks/index-BQo9zrNo.es.js";
|
|
3
|
+
import { S as S2, r } from "./chunks/SuperConverter-DU1Tqi67.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";
|